element-internals-polyfill
Advanced tools
Comparing version 0.1.54 to 0.1.55
@@ -355,3 +355,3 @@ (function () { | ||
add(state) { | ||
if (!/^--/.exec(state) || typeof state !== 'string') { | ||
if (!/^--/.test(state) || typeof state !== 'string') { | ||
throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${state} must start with '--'.`); | ||
@@ -362,2 +362,5 @@ } | ||
ref.toggleAttribute(`state${state}`, true); | ||
if (ref.part) { | ||
ref.part.add(`state--${state}`); | ||
} | ||
return result; | ||
@@ -375,2 +378,5 @@ } | ||
ref.toggleAttribute(`state${state}`, false); | ||
if (ref.part) { | ||
ref.part.remove(`state--${state}`); | ||
} | ||
return result; | ||
@@ -500,3 +506,3 @@ } | ||
if (shadowRoot) { | ||
return shadowRootMap.get(ref); | ||
return shadowRoot; | ||
} | ||
@@ -503,0 +509,0 @@ return null; |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "0.1.54", | ||
"version": "0.1.55", | ||
"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
52267
949