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.41 to 0.1.42

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.1.42](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.41...v0.1.42) (2021-07-25)
### Bug Fixes
* remove lit-specific code which is unneeded after a previous fix ([d819cef](https://github.com/calebdwilliams/element-internals-polyfill/commit/d819cefe76aa883be2bad44b630bcad2ff5af10c))
### [0.1.41](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.40...v0.1.41) (2021-07-25)

@@ -7,0 +14,0 @@

2

dist/index.d.ts
import { ElementInternals } from './element-internals';
import { CustomStateSet } from './CustomStateSet';
import './element-internals';
import { CustomStateSet } from './CustomStateSet';
export * from './types';

@@ -5,0 +5,0 @@ declare global {

@@ -29,12 +29,2 @@ (function () {

});
const getHostRoot = (node) => {
if (node instanceof Document) {
return node;
}
let parent = node.parentNode;
if (parent && parent.toString() !== '[object ShadowRoot]') {
parent = getHostRoot(parent);
}
return parent;
};
const removeHiddenInputs = (internals) => {

@@ -51,8 +41,3 @@ const hiddenInputs = hiddenInputMap.get(internals);

input.name = ref.getAttribute('name');
if (ref.updateComplete) {
ref.updateComplete.then(() => ref.after(input));
}
else {
ref.after(input);
}
ref.after(input);
hiddenInputMap.get(internals).push(input);

@@ -405,3 +390,3 @@ return input;

const id = ref.getAttribute('id');
const hostRoot = getHostRoot(ref);
const hostRoot = ref.getRootNode();
if (hostRoot && id) {

@@ -408,0 +393,0 @@ return hostRoot ? hostRoot.querySelectorAll(`[for=${id}]`) : [];

@@ -66,5 +66,2 @@ import { CustomStateSet } from "./CustomStateSet";

}
export interface ILitElement extends ICustomElement {
updateComplete: Promise<void>;
}
export declare type LabelsList = NodeListOf<HTMLLabelElement> | [];

@@ -1,4 +0,2 @@

import { ICustomElement, IElementInternals, ILitElement, LabelsList } from './types.js';
/** Recursively get the host root */
export declare const getHostRoot: (node: Node) => Node & ParentNode;
import { ICustomElement, IElementInternals, LabelsList } from './types.js';
/**

@@ -16,3 +14,3 @@ * Removes all hidden inputs for the given element internals instance

*/
export declare const createHiddenInput: (ref: ICustomElement | ILitElement, internals: IElementInternals) => HTMLInputElement | null;
export declare const createHiddenInput: (ref: ICustomElement, internals: IElementInternals) => HTMLInputElement | null;
/**

@@ -19,0 +17,0 @@ * Initialize a ref by setting up an attribute observe on it

{
"name": "element-internals-polyfill",
"version": "0.1.41",
"version": "0.1.42",
"description": "A polyfill for the element internals specification",

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

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