element-internals-polyfill
Advanced tools
Comparing version 0.1.52 to 0.1.53
@@ -569,12 +569,11 @@ (function () { | ||
} | ||
Object.defineProperty(HTMLElement.prototype, 'attachInternals', { | ||
get() { | ||
return () => { | ||
if (this.tagName.indexOf('-') === -1) { | ||
throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`); | ||
} | ||
return new ElementInternals(this); | ||
}; | ||
HTMLElement.prototype.attachInternals = function () { | ||
if (this.tagName.indexOf('-') === -1) { | ||
throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`); | ||
} | ||
}); | ||
if (internalsMap.has(this)) { | ||
throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`); | ||
} | ||
return new ElementInternals(this); | ||
}; | ||
const attachShadow = Element.prototype.attachShadow; | ||
@@ -581,0 +580,0 @@ Element.prototype.attachShadow = attachShadowObserver; |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "0.1.52", | ||
"version": "0.1.53", | ||
"description": "A polyfill for the element internals specification", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52030
942