New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

minifill

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifill - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

19

dist/minifill.js
/*!
* minifill.js v0.0.12 (https://thednp.github.io/minifill/)
* minifill.js v0.0.13 (https://thednp.github.io/minifill/)
* Copyright 2015-2020 © thednp

@@ -514,3 +514,3 @@ * Licensed under MIT (https://github.com/thednp/minifill/blob/master/LICENSE)

if( !Element.prototype.classList ) {
if( !('classList' in Element.prototype) ) {
var ClassLIST = function(elem){

@@ -697,13 +697,6 @@ var classArr = (elem.getAttribute('class')||'').trim().split(/\s+/) || [];

if ( !self.performance.now ){
if (typeof (self) === 'undefined' && typeof (process) !== 'undefined' && process.hrtime) {
self.performance.now = function now() {
var time = process.hrtime();
return time[0] * 1000 + time[1] / 1000000;
};
} else {
var nowOffset = Date.now();
self.performance.now = function now(){
return Date.now() - nowOffset;
};
}
var nowOffset = Date.now();
self.performance.now = function now(){
return Date.now() - nowOffset;
};
}

@@ -710,0 +703,0 @@

@@ -1,3 +0,3 @@

// minifill.js v0.0.12 | 2020 © thednp | MIT-License
// minifill.js v0.0.13 | 2020 © thednp | MIT-License
"use strict";
var t,e,n,o,r,i,a;if(self.Document||(self.Document=self.HTMLDocument),self.Window||(self.constructor?self.Window=self.constructor:(self.Window=self.constructor=new Function("return function Window() {}")()).prototype=self),window.HTMLElement||(window.HTMLElement=window.Element),window.Node||(window.Node=window.Element),t=Object.defineProperty,e=Object.prototype.hasOwnProperty.call(Object.prototype,"__defineGetter__"),n="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(o,r,i){if(t&&(o===window||o===document||o===Element.prototype||o instanceof Element))return t(o,r,i);if(null===o||!(o instanceof Object||"object"==typeof o))throw new TypeError("Object.defineProperty called on non-object");if(!(i instanceof Object))throw new TypeError("Property description must be an object");var a=String(r),c="value"in i||"writable"in i,s="get"in i&&typeof i.get,p="set"in i&&typeof i.set;if(s){if("function"!==s)throw new TypeError("Getter must be a function");if(!e)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(c)throw new TypeError(n);Object.__defineGetter__.call(o,a,i.get)}else o[a]=i.value;if(p){if("function"!==p)throw new TypeError("Setter must be a function");if(!e)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(c)throw new TypeError(n);Object.__defineSetter__.call(o,a,i.set)}return"value"in i&&(o[a]=i.value),o},"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){var n=arguments;if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),r=1;r<arguments.length;r++){var i=n[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[a])}return o},writable:!0,configurable:!0}),"function"!=typeof Object.create&&(Object.create=function(t,e){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object prototype may only be an Object: "+t);if(null===t||void 0!==e)throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument, nor a second argument.");function n(){}return n.prototype=t,new n}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),Function.prototype.bind||(Function.prototype.bind=function(){var t=Array.prototype.slice,e=this,n=arguments[0],o=t.call(arguments,1);if("function"!=typeof e)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var r=o.concat(t.call(arguments));return e.apply(n,r)}}),Array.from||(Array.from=(o=Object.prototype.toString,r=function(t){return"function"==typeof t||"[object Function]"===o.call(t)},i=Math.pow(2,53)-1,a=function(t){var e=function(t){var e=Number(t);return isNaN(e)?0:0!==e&&isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),i)},function(t){var e=this,n=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!r(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var c,s=a(n.length),p=r(e)?Object(new e(s)):new Array(s),l=0;l<s;)c=n[l],p[l]=i?void 0===o?i(c,l):i.call(o,c,l):c,l+=1;return p.length=s,p})),Array.prototype.every||(Array.prototype.every=function(t,e){var n,o;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t&&"[object Function]"!==Object.prototype.toString.call(t))throw new TypeError;for(arguments.length>1&&(n=e),o=0;o<i;){var a;if(o in r)if(a=r[o],!(n?t.call(n,a,o,r):t(a,o,r)))return!1;o++}return!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw TypeError("predicate must be a function");for(var o=arguments[1],r=0;r<n;){var i=e[r];if(t.call(o,i,r,e))return i;r++}},configurable:!0,writable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");e=e||this;for(var n=0,o=this.length;n!==o;++n)t.call(e,this[n],n,this)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e=Object(this),n=parseInt(e.length)||0;if(0===n)return!1;var o,r,i=parseInt(arguments[1])||0;for(i>=0?o=i:(o=n+i)<0&&(o=0);o<n;){if(t===(r=e[o])||t!=t&&r!=r)return!0;o++}return!1}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(null==this)throw new TypeError(this+"is not an object");var e=this instanceof String?this.split(""):this,n=Math.max(Math.min(e.length,9007199254740991),0)||0,o=Number(arguments[1])||0;for(o=(o<0?Math.max(n+o,0):o)-1;++o<n;)if(o in e&&e[o]===t)return o;return-1}),Array.prototype.map||(Array.prototype.map=function(t){var e,n,o;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=new Array(i),o=0;o<i;){var a,c;o in r&&(a=r[o],c=t.call(e,a,o,r),n[o]=c),o++}return n}),Array.prototype.some||(Array.prototype.some=function(t,e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;for(var n=Object(this),o=n.length>>>0,r=0;r<o;r++)if(r in n&&t.call(e,n[r],r,n))return!0;return!1}),Array.prototype.indexOf&&String.prototype.indexOf||(Array.prototype.indexOf=String.prototype.indexOf=function(t){if(null==this)throw new TypeError(this+"is undefined or null");var e=this instanceof String?this.split(""):this,n=Math.max(Math.min(e.length,9007199254740991),0)||0,o=Number(arguments[1])||0;for(o=(o<0?Math.max(n+o,0):o)-1;++o<n;)if(o in e&&e[o]===t)return o;return-1}),window.addEventListener&&Window.prototype.addEventListener||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function(){var t=this,e=arguments[0],n=arguments[1];t._events||(t._events={}),t._events[e]||(t._events[e]=function(e){var n,o=t._events[e.type].list,r=o.slice(),i=-1,a=r.length;for(e.preventDefault=function(){!1!==e.cancelable&&(e.returnValue=!1)},e.stopPropagation=function(){e.cancelBubble=!0},e.stopImmediatePropagation=function(){e.cancelBubble=!0,e.cancelImmediate=!0},e.currentTarget=t,e.relatedTarget=e.fromElement||null,e.target=e.target||e.srcElement||t,e.timeStamp=(new Date).getTime(),e.clientX&&(e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop);++i<a&&!e.cancelImmediate;)i in r&&(n=r[i],-1!==o.indexOf(n)&&"function"==typeof n&&n.call(t,e))},t._events[e].list=[],t.attachEvent&&t.attachEvent("on"+e,t._events[e])),t._events[e].list.push(n)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function(){var t,e=this,n=arguments[0],o=arguments[1];e._events&&e._events[n]&&e._events[n].list&&-1!==(t=e._events[n].list.indexOf(o))&&(e._events[n].list.splice(t,1),e._events[n].list.length||(e.detachEvent&&e.detachEvent("on"+n,e._events[n]),delete e._events[n]))}),document.getElementsByClassName||(document.getElementsByClassName=Element.prototype.getElementsByClassName=function(t){return this.querySelectorAll("."+String(t).split(/\s+/).join("."))}),window.Event&&Window.prototype.Event||(window.Event=Window.prototype.Event=Document.prototype.Event=Element.prototype.Event=function(t,e){if(!t)throw new Error("Not enough arguments");var n,o=!(!e||void 0===e.bubbles)&&e.bubbles,r=!(!e||void 0===e.cancelable)&&e.cancelable;return"createEvent"in document?(n=document.createEvent("Event")).initEvent(t,o,r):((n=document.createEventObject()).type=t,n.bubbles=o,n.cancelable=r),n}),window.CustomEvent&&Window.prototype.CustomEvent||(window.CustomEvent=Window.prototype.CustomEvent=Document.prototype.CustomEvent=Element.prototype.CustomEvent=function(t,e){if(!t)throw Error('TypeError: Failed to construct "CustomEvent": An event name must be provided.');var n=new Event(t,e);return n.detail=e&&e.detail||null,n}),window.dispatchEvent&&Window.prototype.dispatchEvent&&Document.prototype.dispatchEvent&&Element.prototype.dispatchEvent||(window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(t){if(!arguments.length)throw new Error("Not enough arguments");if(!t||"string"!=typeof t.type)throw new Error("DOM Events Exception 0");var e=this,n=t.type;try{if(!t.bubbles){t.cancelBubble=!0;var o=function(t){t.cancelBubble=!0,(e||window).detachEvent("on"+n,o)};this.attachEvent("on"+n,o)}this.fireEvent("on"+n,t)}catch(o){t.target=e;do{t.currentTarget=e,"_events"in e&&"function"==typeof e._events[n]&&e._events[n].call(e,t),"function"==typeof e["on"+n]&&e["on"+n].call(e,t),e=9===e.nodeType?e.parentWindow:e.parentNode}while(e&&!t.cancelBubble)}return!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector),!Element.prototype.classList){var c=function(t){var e=(t.getAttribute("class")||"").trim().split(/\s+/)||[];this.contains=function(t){return e.indexOf(t)>-1},this.add=function(n){this.contains(n)||(e.push(n),t.setAttribute("class",e.join(" ")))},this.remove=function(n){this.contains(n)&&(e.splice(e.indexOf(n),1),t.setAttribute("class",e.join(" ")))},this.toggle=function(t){this.contains(t)?this.remove(t):this.add(t)}};Object.defineProperty(Element.prototype,"classList",{get:function(){return new c(this)}})}if(Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e="SVGElement"in window&&e instanceof SVGElement?e.parentNode:e.parentElement}return null}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Date.now||(Date.now=function(){return(new Date).getTime()}),Node.prototype.contains||(Node.prototype.contains=function(t){for(;t=t.parentNode;)if(t===this)return!0;return!1}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");e=e||window;for(var n=0;n<this.length;n++)t.call(e,this[n],n,this)}),window.getComputedStyle||function(){function t(e,n,o){var r,i=e.document&&e.currentStyle[n].match(/([\d\.]+)(%|cm|em|in|mm|pc|pt|)/)||[0,0,""],a=i[1],c=i[2];return o=o?/%|em/.test(c)&&e.parentElement?t(e.parentElement,"fontSize",null):16:o,r="fontSize"==n?o:/width/i.test(n)?e.clientWidth:e.clientHeight,"%"==c?a/100*r:"cm"==c?.3937*a*96:"em"==c?a*o:"in"==c?96*a:"mm"==c?.3937*a*96/10:"pc"==c?12*a*96/72:"pt"==c?96*a/72:a}function e(t,e){var n="border"==e?"Width":"",o=e+"Top"+n,r=e+"Right"+n,i=e+"Bottom"+n,a=e+"Left"+n;t[e]=(t[o]==t[r]&&t[o]==t[i]&&t[o]==t[a]?[t[o]]:t[o]==t[i]&&t[a]==t[r]?[t[o],t[r]]:t[a]==t[r]?[t[o],t[r],t[i]]:[t[o],t[r],t[i],t[a]]).join(" ")}function n(n){var o,r=n.currentStyle,i=t(n,"fontSize"),a=function(t){return"-"+t.toLowerCase()};for(o in r)if(Array.prototype.push.call(this,"styleFloat"==o?"float":o.replace(/[A-Z]/,a)),"width"==o)this[o]=n.offsetWidth+"px";else if("height"==o)this[o]=n.offsetHeight+"px";else if("styleFloat"==o)this.float=r[o];else if(/margin.|padding.|border.+W/.test(o)&&"auto"!=this[o])this[o]=Math.round(t(n,o,i))+"px";else if(/^outline/.test(o))try{this[o]=r[o]}catch(t){this.outlineColor=r.color,this.outlineStyle=this.outlineStyle||"none",this.outlineWidth=this.outlineWidth||"0px",this.outline=[this.outlineColor,this.outlineWidth,this.outlineStyle].join(" ")}else this[o]=r[o];e(this,"margin"),e(this,"padding"),e(this,"border"),this.fontSize=Math.round(i)+"px"}n.prototype={constructor:n,getPropertyPriority:function(){throw new Error("NotSupportedError: DOM Exception 9")},getPropertyValue:function(t){return this[t.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]},item:function(t){return this[t]},removeProperty:function(){throw new Error("NoModificationAllowedError: DOM Exception 7")},setProperty:function(){throw new Error("NoModificationAllowedError: DOM Exception 7")},getPropertyCSSValue:function(){throw new Error("NotSupportedError: DOM Exception 9")}},window.getComputedStyle=function(t){return new n(t)}}(),self.performance||(self.performance={}),!self.performance.now)if("undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime)self.performance.now=function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};else{var s=Date.now();self.performance.now=function(){return Date.now()-s}}if(!window.requestAnimationFrame){var p=Date.now();window.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+p-e;return n<0&&(n=0),p=e,setTimeout((function(){p=Date.now(),t(performance.now())}),n)},window.cancelAnimationFrame=function(t){clearTimeout(t)}}
var t,e,n,o,r,i,a;if(self.Document||(self.Document=self.HTMLDocument),self.Window||(self.constructor?self.Window=self.constructor:(self.Window=self.constructor=new Function("return function Window() {}")()).prototype=self),window.HTMLElement||(window.HTMLElement=window.Element),window.Node||(window.Node=window.Element),t=Object.defineProperty,e=Object.prototype.hasOwnProperty.call(Object.prototype,"__defineGetter__"),n="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(o,r,i){if(t&&(o===window||o===document||o===Element.prototype||o instanceof Element))return t(o,r,i);if(null===o||!(o instanceof Object||"object"==typeof o))throw new TypeError("Object.defineProperty called on non-object");if(!(i instanceof Object))throw new TypeError("Property description must be an object");var a=String(r),c="value"in i||"writable"in i,s="get"in i&&typeof i.get,p="set"in i&&typeof i.set;if(s){if("function"!==s)throw new TypeError("Getter must be a function");if(!e)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(c)throw new TypeError(n);Object.__defineGetter__.call(o,a,i.get)}else o[a]=i.value;if(p){if("function"!==p)throw new TypeError("Setter must be a function");if(!e)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(c)throw new TypeError(n);Object.__defineSetter__.call(o,a,i.set)}return"value"in i&&(o[a]=i.value),o},"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){var n=arguments;if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),r=1;r<arguments.length;r++){var i=n[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[a])}return o},writable:!0,configurable:!0}),"function"!=typeof Object.create&&(Object.create=function(t,e){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object prototype may only be an Object: "+t);if(null===t||void 0!==e)throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument, nor a second argument.");function n(){}return n.prototype=t,new n}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),Function.prototype.bind||(Function.prototype.bind=function(){var t=Array.prototype.slice,e=this,n=arguments[0],o=t.call(arguments,1);if("function"!=typeof e)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var r=o.concat(t.call(arguments));return e.apply(n,r)}}),Array.from||(Array.from=(o=Object.prototype.toString,r=function(t){return"function"==typeof t||"[object Function]"===o.call(t)},i=Math.pow(2,53)-1,a=function(t){var e=function(t){var e=Number(t);return isNaN(e)?0:0!==e&&isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),i)},function(t){var e=this,n=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!r(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var c,s=a(n.length),p=r(e)?Object(new e(s)):new Array(s),l=0;l<s;)c=n[l],p[l]=i?void 0===o?i(c,l):i.call(o,c,l):c,l+=1;return p.length=s,p})),Array.prototype.every||(Array.prototype.every=function(t,e){var n,o;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t&&"[object Function]"!==Object.prototype.toString.call(t))throw new TypeError;for(arguments.length>1&&(n=e),o=0;o<i;){var a;if(o in r)if(a=r[o],!(n?t.call(n,a,o,r):t(a,o,r)))return!1;o++}return!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw TypeError("predicate must be a function");for(var o=arguments[1],r=0;r<n;){var i=e[r];if(t.call(o,i,r,e))return i;r++}},configurable:!0,writable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");e=e||this;for(var n=0,o=this.length;n!==o;++n)t.call(e,this[n],n,this)}),Array.prototype.includes||(Array.prototype.includes=function(t){var e=Object(this),n=parseInt(e.length)||0;if(0===n)return!1;var o,r,i=parseInt(arguments[1])||0;for(i>=0?o=i:(o=n+i)<0&&(o=0);o<n;){if(t===(r=e[o])||t!=t&&r!=r)return!0;o++}return!1}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(null==this)throw new TypeError(this+"is not an object");var e=this instanceof String?this.split(""):this,n=Math.max(Math.min(e.length,9007199254740991),0)||0,o=Number(arguments[1])||0;for(o=(o<0?Math.max(n+o,0):o)-1;++o<n;)if(o in e&&e[o]===t)return o;return-1}),Array.prototype.map||(Array.prototype.map=function(t){var e,n,o;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=new Array(i),o=0;o<i;){var a,c;o in r&&(a=r[o],c=t.call(e,a,o,r),n[o]=c),o++}return n}),Array.prototype.some||(Array.prototype.some=function(t,e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;for(var n=Object(this),o=n.length>>>0,r=0;r<o;r++)if(r in n&&t.call(e,n[r],r,n))return!0;return!1}),Array.prototype.indexOf&&String.prototype.indexOf||(Array.prototype.indexOf=String.prototype.indexOf=function(t){if(null==this)throw new TypeError(this+"is undefined or null");var e=this instanceof String?this.split(""):this,n=Math.max(Math.min(e.length,9007199254740991),0)||0,o=Number(arguments[1])||0;for(o=(o<0?Math.max(n+o,0):o)-1;++o<n;)if(o in e&&e[o]===t)return o;return-1}),window.addEventListener&&Window.prototype.addEventListener||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function(){var t=this,e=arguments[0],n=arguments[1];t._events||(t._events={}),t._events[e]||(t._events[e]=function(e){var n,o=t._events[e.type].list,r=o.slice(),i=-1,a=r.length;for(e.preventDefault=function(){!1!==e.cancelable&&(e.returnValue=!1)},e.stopPropagation=function(){e.cancelBubble=!0},e.stopImmediatePropagation=function(){e.cancelBubble=!0,e.cancelImmediate=!0},e.currentTarget=t,e.relatedTarget=e.fromElement||null,e.target=e.target||e.srcElement||t,e.timeStamp=(new Date).getTime(),e.clientX&&(e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop);++i<a&&!e.cancelImmediate;)i in r&&(n=r[i],-1!==o.indexOf(n)&&"function"==typeof n&&n.call(t,e))},t._events[e].list=[],t.attachEvent&&t.attachEvent("on"+e,t._events[e])),t._events[e].list.push(n)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function(){var t,e=this,n=arguments[0],o=arguments[1];e._events&&e._events[n]&&e._events[n].list&&-1!==(t=e._events[n].list.indexOf(o))&&(e._events[n].list.splice(t,1),e._events[n].list.length||(e.detachEvent&&e.detachEvent("on"+n,e._events[n]),delete e._events[n]))}),document.getElementsByClassName||(document.getElementsByClassName=Element.prototype.getElementsByClassName=function(t){return this.querySelectorAll("."+String(t).split(/\s+/).join("."))}),window.Event&&Window.prototype.Event||(window.Event=Window.prototype.Event=Document.prototype.Event=Element.prototype.Event=function(t,e){if(!t)throw new Error("Not enough arguments");var n,o=!(!e||void 0===e.bubbles)&&e.bubbles,r=!(!e||void 0===e.cancelable)&&e.cancelable;return"createEvent"in document?(n=document.createEvent("Event")).initEvent(t,o,r):((n=document.createEventObject()).type=t,n.bubbles=o,n.cancelable=r),n}),window.CustomEvent&&Window.prototype.CustomEvent||(window.CustomEvent=Window.prototype.CustomEvent=Document.prototype.CustomEvent=Element.prototype.CustomEvent=function(t,e){if(!t)throw Error('TypeError: Failed to construct "CustomEvent": An event name must be provided.');var n=new Event(t,e);return n.detail=e&&e.detail||null,n}),window.dispatchEvent&&Window.prototype.dispatchEvent&&Document.prototype.dispatchEvent&&Element.prototype.dispatchEvent||(window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(t){if(!arguments.length)throw new Error("Not enough arguments");if(!t||"string"!=typeof t.type)throw new Error("DOM Events Exception 0");var e=this,n=t.type;try{if(!t.bubbles){t.cancelBubble=!0;var o=function(t){t.cancelBubble=!0,(e||window).detachEvent("on"+n,o)};this.attachEvent("on"+n,o)}this.fireEvent("on"+n,t)}catch(o){t.target=e;do{t.currentTarget=e,"_events"in e&&"function"==typeof e._events[n]&&e._events[n].call(e,t),"function"==typeof e["on"+n]&&e["on"+n].call(e,t),e=9===e.nodeType?e.parentWindow:e.parentNode}while(e&&!t.cancelBubble)}return!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector),!("classList"in Element.prototype)){var c=function(t){var e=(t.getAttribute("class")||"").trim().split(/\s+/)||[];this.contains=function(t){return e.indexOf(t)>-1},this.add=function(n){this.contains(n)||(e.push(n),t.setAttribute("class",e.join(" ")))},this.remove=function(n){this.contains(n)&&(e.splice(e.indexOf(n),1),t.setAttribute("class",e.join(" ")))},this.toggle=function(t){this.contains(t)?this.remove(t):this.add(t)}};Object.defineProperty(Element.prototype,"classList",{get:function(){return new c(this)}})}if(Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e="SVGElement"in window&&e instanceof SVGElement?e.parentNode:e.parentElement}return null}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Date.now||(Date.now=function(){return(new Date).getTime()}),Node.prototype.contains||(Node.prototype.contains=function(t){for(;t=t.parentNode;)if(t===this)return!0;return!1}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");e=e||window;for(var n=0;n<this.length;n++)t.call(e,this[n],n,this)}),window.getComputedStyle||function(){function t(e,n,o){var r,i=e.document&&e.currentStyle[n].match(/([\d\.]+)(%|cm|em|in|mm|pc|pt|)/)||[0,0,""],a=i[1],c=i[2];return o=o?/%|em/.test(c)&&e.parentElement?t(e.parentElement,"fontSize",null):16:o,r="fontSize"==n?o:/width/i.test(n)?e.clientWidth:e.clientHeight,"%"==c?a/100*r:"cm"==c?.3937*a*96:"em"==c?a*o:"in"==c?96*a:"mm"==c?.3937*a*96/10:"pc"==c?12*a*96/72:"pt"==c?96*a/72:a}function e(t,e){var n="border"==e?"Width":"",o=e+"Top"+n,r=e+"Right"+n,i=e+"Bottom"+n,a=e+"Left"+n;t[e]=(t[o]==t[r]&&t[o]==t[i]&&t[o]==t[a]?[t[o]]:t[o]==t[i]&&t[a]==t[r]?[t[o],t[r]]:t[a]==t[r]?[t[o],t[r],t[i]]:[t[o],t[r],t[i],t[a]]).join(" ")}function n(n){var o,r=n.currentStyle,i=t(n,"fontSize"),a=function(t){return"-"+t.toLowerCase()};for(o in r)if(Array.prototype.push.call(this,"styleFloat"==o?"float":o.replace(/[A-Z]/,a)),"width"==o)this[o]=n.offsetWidth+"px";else if("height"==o)this[o]=n.offsetHeight+"px";else if("styleFloat"==o)this.float=r[o];else if(/margin.|padding.|border.+W/.test(o)&&"auto"!=this[o])this[o]=Math.round(t(n,o,i))+"px";else if(/^outline/.test(o))try{this[o]=r[o]}catch(t){this.outlineColor=r.color,this.outlineStyle=this.outlineStyle||"none",this.outlineWidth=this.outlineWidth||"0px",this.outline=[this.outlineColor,this.outlineWidth,this.outlineStyle].join(" ")}else this[o]=r[o];e(this,"margin"),e(this,"padding"),e(this,"border"),this.fontSize=Math.round(i)+"px"}n.prototype={constructor:n,getPropertyPriority:function(){throw new Error("NotSupportedError: DOM Exception 9")},getPropertyValue:function(t){return this[t.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]},item:function(t){return this[t]},removeProperty:function(){throw new Error("NoModificationAllowedError: DOM Exception 7")},setProperty:function(){throw new Error("NoModificationAllowedError: DOM Exception 7")},getPropertyCSSValue:function(){throw new Error("NotSupportedError: DOM Exception 9")}},window.getComputedStyle=function(t){return new n(t)}}(),self.performance||(self.performance={}),!self.performance.now){var s=Date.now();self.performance.now=function(){return Date.now()-s}}if(!window.requestAnimationFrame){var p=Date.now();window.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+p-e;return n<0&&(n=0),p=e,setTimeout((function(){p=Date.now(),t(performance.now())}),n)},window.cancelAnimationFrame=function(t){clearTimeout(t)}}
{
"name": "minifill",
"version": "0.0.12",
"version": "0.0.13",
"description": "Essential polyfill for the web",

@@ -5,0 +5,0 @@ "main": "dist/minifill.min.js",

// Element.prototype.classList by Remy Sharp
// updated by thdnp
if( !Element.prototype.classList ) {
if( !('classList' in Element.prototype) ) {
var ClassLIST = function(elem){

@@ -5,0 +5,0 @@ var classArr = (elem.getAttribute('class')||'').trim().split(/\s+/) || [];

@@ -6,13 +6,6 @@ if ( !self.performance ) {

if ( !self.performance.now ){
if (typeof (self) === 'undefined' && typeof (process) !== 'undefined' && process.hrtime) {
self.performance.now = function now() {
var time = process.hrtime();
return time[0] * 1000 + time[1] / 1000000;
};
} else {
var nowOffset = Date.now();
self.performance.now = function now(){
return Date.now() - nowOffset;
}
var nowOffset = Date.now();
self.performance.now = function now(){
return Date.now() - nowOffset;
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc