Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

element-internals-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-internals-polyfill - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

7

dist/CustomStateSet.d.ts
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:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc