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 0.1.51 to 0.1.52

LICENSE.md

3

dist/index.js

@@ -151,5 +151,2 @@ (function () {

}
else if (!parent && elem.toString() === '[object ShadowRoot]') {
parent = findParentForm(elem.host);
}
return parent;

@@ -156,0 +153,0 @@ };

{
"name": "element-internals-polyfill",
"version": "0.1.51",
"version": "0.1.52",
"description": "A polyfill for the element internals specification",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -135,2 +135,20 @@ # Element Internals Polyfill

For example, if you are creating a control that has a checked property, you will likely could set the `internals.ariaChecked` property to `'true'`. In polyfilled browsers, this will result in adding `aria-checked="true"` to the host's attributes. In fully-supported browsers, this attribute will not be reflected although the checked property will be reflected in the accessibility object model.
```javascript
class CheckedControl extends HTMLElement {
#checked = false;
#internals = this.attachInternals();
get checked() {
return this.#checked;
}
set checked(isChecked) {
this.#checked = isChecked;
this.#internals.ariaChecked = isChecked.toString();
}
}
```
### State API

@@ -137,0 +155,0 @@

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