element-internals-polyfill
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -416,2 +416,8 @@ (function () { | ||
const customStateMap = new WeakMap(); | ||
function addState(ref, stateName) { | ||
ref.toggleAttribute(stateName, true); | ||
if (ref.part) { | ||
ref.part.add(stateName); | ||
} | ||
} | ||
class CustomStateSet extends Set { | ||
@@ -434,6 +440,11 @@ static get isPolyfilled() { | ||
const ref = customStateMap.get(this); | ||
ref.toggleAttribute(`state${state}`, true); | ||
if (ref.part) { | ||
ref.part.add(`state${state}`); | ||
const stateName = `state${state}`; | ||
if (ref.isConnected) { | ||
addState(ref, stateName); | ||
} | ||
else { | ||
setTimeout(() => { | ||
addState(ref, stateName); | ||
}); | ||
} | ||
return result; | ||
@@ -440,0 +451,0 @@ } |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"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
64411
1199