@shgysk8zer0/polyfills 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/all.js +3 -3
- package/all.min.js +6 -6
- package/all.min.js.map +1 -1
- package/element.js +1 -1
- package/package.json +3 -2
- package/url.js +10 -0
- package/utils.js +9 -0
package/element.js
CHANGED
|
@@ -126,7 +126,7 @@ if (! (HTMLImageElement.prototype.decode instanceof Function)) {
|
|
|
126
126
|
if (
|
|
127
127
|
! (Element.prototype.setHTML instanceof Function)
|
|
128
128
|
&& 'Sanitizer' in globalThis
|
|
129
|
-
&& globalThis.Sanitizer.sanitizeFor instanceof Function
|
|
129
|
+
&& globalThis.Sanitizer.prototype.sanitizeFor instanceof Function
|
|
130
130
|
) {
|
|
131
131
|
Element.prototype.setHTML = function setHTML(input, { sanitizer = new globalThis.Sanitizer() } = {}) {
|
|
132
132
|
if (
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgysk8zer0/polyfills",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"private": false,
|
|
5
|
+
"type": "module",
|
|
5
6
|
"description": "A collection of JavaScript polyfills",
|
|
6
7
|
"main": "all.min.js",
|
|
7
8
|
"module": "all.js",
|
|
@@ -53,6 +54,6 @@
|
|
|
53
54
|
"eslint": "^8.40.0",
|
|
54
55
|
"htmlhint": "^1.1.4",
|
|
55
56
|
"http-server": "^14.1.1",
|
|
56
|
-
"rollup": "^
|
|
57
|
+
"rollup": "^3.23.0"
|
|
57
58
|
}
|
|
58
59
|
}
|
package/url.js
ADDED
package/utils.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function polyfillMethod(parent, name, value, {
|
|
2
|
+
writable = true,
|
|
3
|
+
enumerable = true,
|
|
4
|
+
configurable = true,
|
|
5
|
+
} = {}) {
|
|
6
|
+
if (! (parent[name] instanceof Function)) {
|
|
7
|
+
Object.defineProperty(parent, name, { value, writable, enumerable, configurable });
|
|
8
|
+
}
|
|
9
|
+
}
|