polyfill-library 3.109.0 → 3.111.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +151 -54
- package/lib/index.js +2 -2
- package/lib/sources.js +6 -2
- package/package.json +8 -5
- package/polyfills/__dist/AggregateError/meta.json +1 -0
- package/polyfills/__dist/AggregateError/min.js +1 -0
- package/polyfills/__dist/AggregateError/raw.js +30 -0
- package/polyfills/__dist/Array.from/meta.json +1 -1
- package/polyfills/__dist/Array.of/meta.json +1 -1
- package/polyfills/__dist/Array.prototype.@@iterator/meta.json +1 -1
- package/polyfills/__dist/Array.prototype.at/meta.json +1 -0
- package/polyfills/__dist/Array.prototype.at/min.js +1 -0
- package/polyfills/__dist/Array.prototype.at/raw.js +21 -0
- package/polyfills/__dist/Array.prototype.fill/meta.json +1 -1
- package/polyfills/__dist/Array.prototype.includes/meta.json +1 -1
- package/polyfills/__dist/Array.prototype.values/meta.json +1 -1
- package/polyfills/__dist/ArrayBuffer/meta.json +1 -1
- package/polyfills/__dist/ArrayBuffer/min.js +1 -1
- package/polyfills/__dist/ArrayBuffer/raw.js +8 -6
- package/polyfills/__dist/ArrayBuffer.isView/meta.json +1 -0
- package/polyfills/__dist/ArrayBuffer.isView/min.js +1 -0
- package/polyfills/__dist/ArrayBuffer.isView/raw.js +13 -0
- package/polyfills/__dist/IntersectionObserver/meta.json +1 -1
- package/polyfills/__dist/Node.prototype.isSameNode/meta.json +1 -0
- package/polyfills/__dist/Node.prototype.isSameNode/min.js +1 -0
- package/polyfills/__dist/Node.prototype.isSameNode/raw.js +27 -0
- package/polyfills/__dist/Object.assign/meta.json +1 -1
- package/polyfills/__dist/Promise.allSettled/meta.json +1 -0
- package/polyfills/__dist/Promise.allSettled/min.js +1 -0
- package/polyfills/__dist/Promise.allSettled/raw.js +41 -0
- package/polyfills/__dist/Promise.any/meta.json +1 -0
- package/polyfills/__dist/Promise.any/min.js +1 -0
- package/polyfills/__dist/Promise.any/raw.js +45 -0
- package/polyfills/__dist/Reflect/meta.json +1 -1
- package/polyfills/__dist/Reflect.apply/meta.json +1 -1
- package/polyfills/__dist/Reflect.construct/meta.json +1 -1
- package/polyfills/__dist/Reflect.defineProperty/meta.json +1 -1
- package/polyfills/__dist/Reflect.deleteProperty/meta.json +1 -1
- package/polyfills/__dist/Reflect.get/meta.json +1 -1
- package/polyfills/__dist/Reflect.getOwnPropertyDescriptor/meta.json +1 -1
- package/polyfills/__dist/Reflect.getPrototypeOf/meta.json +1 -1
- package/polyfills/__dist/Reflect.has/meta.json +1 -1
- package/polyfills/__dist/Reflect.isExtensible/meta.json +1 -1
- package/polyfills/__dist/Reflect.ownKeys/meta.json +1 -1
- package/polyfills/__dist/Reflect.preventExtensions/meta.json +1 -1
- package/polyfills/__dist/Reflect.set/meta.json +1 -1
- package/polyfills/__dist/Reflect.setPrototypeOf/meta.json +1 -1
- package/polyfills/__dist/String.prototype.at/meta.json +1 -0
- package/polyfills/__dist/String.prototype.at/min.js +1 -0
- package/polyfills/__dist/String.prototype.at/raw.js +23 -0
- package/polyfills/__dist/String.prototype.endsWith/meta.json +1 -1
- package/polyfills/__dist/String.prototype.padStart/meta.json +1 -1
- package/polyfills/__dist/String.prototype.startsWith/meta.json +1 -1
- package/polyfills/__dist/TextEncoder/meta.json +1 -1
- package/polyfills/__dist/TextEncoder/min.js +1 -1
- package/polyfills/__dist/TextEncoder/raw.js +67 -44
- package/polyfills/__dist/TypedArray.prototype.at/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.at/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.at/raw.js +57 -0
- package/polyfills/__dist/URL/meta.json +1 -1
- package/polyfills/__dist/URL/min.js +1 -1
- package/polyfills/__dist/URL/raw.js +24 -2
- package/polyfills/__dist/_ESAbstract.IterableToList/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.IterableToList/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.IterableToList/raw.js +31 -0
- package/polyfills/__dist/_ESAbstract.LengthOfArrayLike/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.LengthOfArrayLike/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.LengthOfArrayLike/raw.js +8 -0
- package/polyfills/__dist/_ESAbstract.ToIntegerOrInfinity/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.ToIntegerOrInfinity/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.ToIntegerOrInfinity/raw.js +20 -0
- package/polyfills/__dist/aliases.json +1 -1
- package/polyfills/__dist/document.currentScript/meta.json +1 -1
- package/polyfills/__dist/document.visibilityState/meta.json +1 -1
- package/polyfills/__dist/localStorage/meta.json +1 -1
- package/polyfills/__dist/localStorage/min.js +1 -1
- package/polyfills/__dist/localStorage/raw.js +30 -8
- package/polyfills/__dist/requestAnimationFrame/meta.json +1 -1
- package/polyfills/__dist/smoothscroll/meta.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"repo":"https://github.com/amiller-gh/currentScript-polyfill","license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript","spec":"https://html.spec.whatwg.org/multipage/dom.html#dom-document-currentscript","browsers":{"ie":"*"},"detectSource":"\"document\"in self&&\"currentScript\"in self.document\n","baseDir":"document/currentScript","hasTests":true,"isTestable":true,"isPublic":true,"size":332}
|
1
|
+
{"dependencies":["Object.defineProperty"],"repo":"https://github.com/amiller-gh/currentScript-polyfill","license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript","spec":"https://html.spec.whatwg.org/multipage/dom.html#dom-document-currentscript","browsers":{"ie":"*"},"detectSource":"\"document\"in self&&\"currentScript\"in self.document\n","baseDir":"document/currentScript","hasTests":true,"isTestable":true,"isPublic":true,"size":332}
|
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:visib","caniuse:pagevisibility","modernizr:pagevisibility","PageVisibility"],"dependencies":["CustomEvent"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API","spec":"http://www.w3.org/TR/page-visibility/","notes":["The alias `PageVisibility` works for this feature for backwards compatibility with the name under which it was previously (erroneously) available"],"browsers":{"firefox":"10 - 17","safari":"4","android":"4.4
|
1
|
+
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:visib","caniuse:pagevisibility","modernizr:pagevisibility","PageVisibility"],"dependencies":["CustomEvent"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API","spec":"http://www.w3.org/TR/page-visibility/","notes":["The alias `PageVisibility` works for this feature for backwards compatibility with the name under which it was previously (erroneously) available"],"browsers":{"firefox":"10 - 17","safari":"4","android":"<4.4.3","opera":"15 - 19","chrome":"14 - 32"},"detectSource":"\"document\"in self&&\"hidden\"in document&&\"visibilityState\"in document\n","baseDir":"document/visibilityState","hasTests":true,"isTestable":true,"isPublic":true,"size":338}
|
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["caniuse:namevalue-storage","modernizr:localstorage"],"dependencies":["Array.prototype.forEach","Window"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage","spec":"http://dev.w3.org/html5/webstorage/#dom-localstorage","browsers":{"ie":"6 - 7","op_mini":"*"},"detectSource":"(function(){try{return self.localStorage.setItem(\"storage_test\",1),self.localStorage.removeItem(\"storage_test\"),!0}catch(t){return!1}})()\n","baseDir":"localStorage","hasTests":
|
1
|
+
{"aliases":["caniuse:namevalue-storage","modernizr:localstorage"],"dependencies":["Array.prototype.forEach","Array.prototype.map","atob","Window"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage","spec":"http://dev.w3.org/html5/webstorage/#dom-localstorage","browsers":{"ie":"6 - 7","op_mini":"*"},"detectSource":"(function(){try{return self.localStorage.setItem(\"storage_test\",1),self.localStorage.removeItem(\"storage_test\"),!0}catch(t){return!1}})()\n","baseDir":"localStorage","hasTests":true,"isTestable":true,"isPublic":true,"size":1480}
|
@@ -1 +1 @@
|
|
1
|
-
!function(){function t(){}function e(t){var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&"length"!==e&&n.push(e);return n}function n(){var t=[],n=e(
|
1
|
+
!function(){function t(){}function e(t){var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&"length"!==e&&n.push(e);return n}function n(){var t=[],n=e(c),a=n.map(r);t.concat(n).forEach(function(t,e){t in c?l.setAttribute(o(a[e]),c[t]):l.removeAttribute(o(a[e]))}),l.setAttribute(u,a.join(",")),l.save(u)}function r(t){return btoa(String(t)).replace(/\+/g,"_").replace(/\//g,"-").replace(/=/g,"")}function a(t){return atob(String(t).replace(/_/g,"+").replace(/-/g,"/"))}function o(t){return u+"_"+t}if(t.prototype={clear:function(){e(this).forEach(this.removeItem,this)},constructor:t,getItem:function(){var t=String(arguments[0]);return t in this?this[t]:null},key:function(){var t=parseInt(arguments[0],10)||0;return e(this)[t]||null},removeItem:function(){var t=String(arguments[0]);Object.prototype.hasOwnProperty.call(this,t)&&(delete this[t],--this.length),n()},setItem:function(){var t=String(arguments[0]),e=String(arguments[1]);Object.prototype.hasOwnProperty.call(this,t)||++this.length,this[t]=e,n()}},!function(){try{return!!self.localStorage}catch(t){return!1}}()){var i,c=self.localStorage=new t,l=self.document.lastChild.lastChild.appendChild(self.document.createElement("x-local-storage")),u="base64_userdata";try{l.addBehavior("#default#userdata"),l.load(u)}catch(s){}i=l.getAttribute(u)?l.getAttribute(u).split(",").map(a):[],c.length=i.length,i.forEach(function(t){c[t]=l.getAttribute(o(r(t)))}),self.attachEvent&&self.attachEvent("onunload",n)}}();
|
@@ -57,20 +57,40 @@
|
|
57
57
|
var unloadkeys = [];
|
58
58
|
|
59
59
|
var keys = getKeys(localStorage);
|
60
|
+
var encodedKeys = keys.map(encodeKey);
|
60
61
|
|
61
|
-
unloadkeys.concat(keys).forEach(function (key) {
|
62
|
+
unloadkeys.concat(keys).forEach(function (key, i) {
|
62
63
|
if (key in localStorage) {
|
63
|
-
element.setAttribute(
|
64
|
+
element.setAttribute(makeAttributeName(encodedKeys[i]), localStorage[key]);
|
64
65
|
} else {
|
65
|
-
element.removeAttribute(
|
66
|
+
element.removeAttribute(makeAttributeName(encodedKeys[i]));
|
66
67
|
}
|
67
68
|
});
|
68
69
|
|
69
|
-
element.setAttribute(userdata,
|
70
|
+
element.setAttribute(userdata, encodedKeys.join(','));
|
70
71
|
|
71
72
|
element.save(userdata);
|
72
73
|
}
|
73
74
|
|
75
|
+
function encodeKey (key) {
|
76
|
+
return btoa(String(key))
|
77
|
+
.replace(/\+/g, '_')
|
78
|
+
.replace(/\//g, '-')
|
79
|
+
.replace(/=/g, '');
|
80
|
+
}
|
81
|
+
|
82
|
+
function decodeKey (encodedKey) {
|
83
|
+
return atob(
|
84
|
+
String(encodedKey)
|
85
|
+
.replace(/_/g, '+')
|
86
|
+
.replace(/-/g, '/')
|
87
|
+
);
|
88
|
+
}
|
89
|
+
|
90
|
+
function makeAttributeName (encodedKey) {
|
91
|
+
return userdata + '_' + encodedKey;
|
92
|
+
}
|
93
|
+
|
74
94
|
var localStorageExists = (function() {
|
75
95
|
try {
|
76
96
|
return !!self.localStorage;
|
@@ -86,24 +106,26 @@
|
|
86
106
|
// set storage element
|
87
107
|
element = self.document.lastChild.lastChild.appendChild(self.document.createElement('x-local-storage')),
|
88
108
|
// set userdata key and prefix
|
89
|
-
userdata = '
|
109
|
+
userdata = 'base64_userdata',
|
90
110
|
keys;
|
91
111
|
|
92
112
|
// proprietary ie local storage
|
93
113
|
try {
|
94
|
-
element.addBehavior('#default#'
|
114
|
+
element.addBehavior('#default#userdata');
|
95
115
|
element.load(userdata);
|
96
116
|
// eslint-disable-next-line no-empty
|
97
117
|
} catch (error) {}
|
98
118
|
|
99
119
|
// get keys
|
100
|
-
keys = element.getAttribute(userdata)
|
120
|
+
keys = element.getAttribute(userdata)
|
121
|
+
? element.getAttribute(userdata).split(',').map(decodeKey)
|
122
|
+
: [];
|
101
123
|
|
102
124
|
localStorage.length = keys.length;
|
103
125
|
|
104
126
|
// assign keys to localStorage
|
105
127
|
keys.forEach(function (key) {
|
106
|
-
localStorage[key] = element.getAttribute(
|
128
|
+
localStorage[key] = element.getAttribute(makeAttributeName(encodeKey(key)));
|
107
129
|
});
|
108
130
|
|
109
131
|
if (self.attachEvent) {
|
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:requestanimationframe","modernizr:requestanimationframe"],"dependencies":["Date.now"],"license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame","browsers":{"android":"
|
1
|
+
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:requestanimationframe","modernizr:requestanimationframe"],"dependencies":["Date.now"],"license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame","browsers":{"android":"<37","bb":"7","chrome":"<46","ie":"6 - 9","ios_saf":"3.2 - 6","firefox":"3.6 - 22","opera":"<15","op_mini":"5 - *","op_mob":"10 - 12.1","safari":"3.1 - 6","firefox_mob":"3.6"},"detectSource":"\"requestAnimationFrame\"in self\n","baseDir":"requestAnimationFrame","hasTests":true,"isTestable":true,"isPublic":true,"size":655}
|
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["scroll","scrollBy","scrollIntoView","Element.prototype.scroll","Element.prototype.scrollBy","Element.prototype.scrollIntoView","window.scroll","window.scrollBy"],"dependencies":["requestAnimationFrame","Function.prototype.bind","getComputedStyle","Object.defineProperty"],"license":"MIT","spec":"https://drafts.csswg.org/cssom-view/#smooth-scrolling","repo":"https://github.com/magic-akari/seamless-scroll-polyfill","docs":"https://developer.mozilla.org/en/docs/Web/CSS/scroll-behavior","browsers":{"edge":"<79","edge_mob":"*","ie":"9 - *","ie_mob":"9 - *","firefox":"4 - 36","opera":"*","safari":"*","chrome":"* - 60","ios_saf":"*","android":"
|
1
|
+
{"aliases":["scroll","scrollBy","scrollIntoView","Element.prototype.scroll","Element.prototype.scrollBy","Element.prototype.scrollIntoView","window.scroll","window.scrollBy"],"dependencies":["requestAnimationFrame","Function.prototype.bind","getComputedStyle","Object.defineProperty"],"license":"MIT","spec":"https://drafts.csswg.org/cssom-view/#smooth-scrolling","repo":"https://github.com/magic-akari/seamless-scroll-polyfill","docs":"https://developer.mozilla.org/en/docs/Web/CSS/scroll-behavior","browsers":{"edge":"<79","edge_mob":"*","ie":"9 - *","ie_mob":"9 - *","firefox":"4 - 36","opera":"*","safari":"*","chrome":"* - 60","ios_saf":"*","android":"<61"},"install":{"module":"seamless-scroll-polyfill","postinstall":"update.task.js"},"detectSource":"(function(){if(\"document\"in self&&\"documentElement\"in self.document&&\"style\"in self.document.documentElement&&\"scrollBehavior\"in document.documentElement.style)return!0\nif(Element.prototype.scrollTo&&Element.prototype.scrollTo.toString().indexOf(\"[native code]\")>-1)return!1\ntry{var e=!1,t={top:1,left:0}\nObject.defineProperty(t,\"behavior\",{get:function(){return e=!0,\"smooth\"},enumerable:!0})\nvar o=document.createElement(\"DIV\"),n=document.createElement(\"DIV\")\nreturn o.setAttribute(\"style\",\"height: 1px; overflow: scroll;\"),n.setAttribute(\"style\",\"height: 2px; overflow: scroll;\"),o.appendChild(n),o.scrollTo(t),e}catch(r){return!1}})()\n","baseDir":"smoothscroll","hasTests":true,"isTestable":true,"isPublic":true,"size":9772}
|