element-internals-polyfill
Advanced tools
Comparing version 1.1.11 to 1.1.12
import { ICustomElement } from "./types"; | ||
export declare class CustomStateSet extends Set<string> { | ||
export declare type CustomState = `--${string}`; | ||
export declare class CustomStateSet extends Set<CustomState> { | ||
static get isPolyfilled(): boolean; | ||
constructor(ref: ICustomElement); | ||
add(state: string): this; | ||
add(state: CustomState): this; | ||
clear(): void; | ||
delete(state: string): boolean; | ||
delete(state: CustomState): boolean; | ||
} |
@@ -468,3 +468,3 @@ (function () { | ||
if (hostRoot && id) { | ||
return hostRoot.querySelectorAll(`[for=${id}]`); | ||
return hostRoot.querySelectorAll(`[for="${id}"]`); | ||
} | ||
@@ -471,0 +471,0 @@ return []; |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"description": "A polyfill for the element internals specification", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -155,3 +155,3 @@ # Element Internals Polyfill | ||
`ElementInternals` exposes an API for creating custom states on an element. For instance if a developer wanted to signify to users that an element was in state `foo`, they could call `internals.states.set('--foo')`. This would make the element match the selector `:--foo`. Unfortunately in non-supporting browsers this is an invalid selector and will throw an error in JS and would cause the parsing of a CSS rule to fail. As a result, this polyfill will add states using the `state--foo` attribute to the host element, as well as a `state--foo` shadow part in supporting browsers. | ||
`ElementInternals` exposes an API for creating custom states on an element. For instance if a developer wanted to signify to users that an element was in state `foo`, they could call `internals.states.add('--foo')`. This would make the element match the selector `:--foo`. Unfortunately in non-supporting browsers this is an invalid selector and will throw an error in JS and would cause the parsing of a CSS rule to fail. As a result, this polyfill will add states using the `state--foo` attribute to the host element, as well as a `state--foo` shadow part in supporting browsers. | ||
@@ -158,0 +158,0 @@ In order to properly select these elements in CSS, you will need to duplicate your rule as follows: |
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
55057
1003