element-internals-polyfill
Advanced tools
Comparing version 0.1.9 to 0.1.26
@@ -5,2 +5,46 @@ # Changelog | ||
### [0.1.26](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.24...v0.1.26) (2021-03-12) | ||
### [0.1.25](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.24...v0.1.25) (2021-03-12) | ||
### [0.1.24](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.23...v0.1.24) (2021-03-12) | ||
### [0.1.23](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.22...v0.1.23) (2021-03-12) | ||
### [0.1.22](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.21...v0.1.22) (2021-03-12) | ||
### [0.1.21](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.20...v0.1.21) (2021-03-12) | ||
### [0.1.20](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.19...v0.1.20) (2021-03-12) | ||
### [0.1.19](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.18...v0.1.19) (2021-03-12) | ||
### [0.1.18](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.17...v0.1.18) (2021-03-12) | ||
### [0.1.17](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.16...v0.1.17) (2021-03-12) | ||
### [0.1.16](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.15...v0.1.16) (2021-03-12) | ||
### [0.1.15](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.9...v0.1.15) (2021-03-12) | ||
### Bug Fixes | ||
* add hidden input for lit-element after render completes ([#27](https://github.com/calebdwilliams/element-internals-polyfill/issues/27)) ([ebbb8ef](https://github.com/calebdwilliams/element-internals-polyfill/commit/ebbb8efe15fc923e4828091973739a7a8df1ed0a)) | ||
### [0.1.14](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.13...v0.1.14) (2021-03-08) | ||
### [0.1.13](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.12...v0.1.13) (2021-03-08) | ||
### [0.1.12](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.11...v0.1.12) (2021-03-08) | ||
### [0.1.11](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.10...v0.1.11) (2021-03-08) | ||
### [0.1.10](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.9...v0.1.10) (2021-03-08) | ||
### Bug Fixes | ||
* add hidden input for lit-element after render completes ([0b93a0a](https://github.com/calebdwilliams/element-internals-polyfill/commit/0b93a0a94158ca83caa82a1b9bd1a3381ca7b322)) | ||
### [0.1.9](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.8...v0.1.9) (2021-02-23) | ||
@@ -7,0 +51,0 @@ |
@@ -52,3 +52,3 @@ import { IElementInternals, ICustomElement, LabelsList } from './types'; | ||
/** Sets the element's value within the form */ | ||
setFormValue(value: string | FormData): void; | ||
setFormValue(value: string | FormData | null): void; | ||
/** | ||
@@ -55,0 +55,0 @@ * Sets the element's validity. The first argument is a partial ValidityState object |
@@ -74,3 +74,8 @@ (function () { | ||
input.name = ref.getAttribute('name'); | ||
ref.after(input); | ||
if (ref.updateComplete) { | ||
ref.updateComplete.then(() => ref.after(input)); | ||
} | ||
else { | ||
ref.after(input); | ||
} | ||
hiddenInputMap.get(internals).push(input); | ||
@@ -77,0 +82,0 @@ return input; |
@@ -44,3 +44,3 @@ export interface IAom { | ||
reportValidity: () => boolean; | ||
setFormValue: (value: string | FormData) => void; | ||
setFormValue: (value: string | FormData | null) => void; | ||
setValidity: (validityChanges: Partial<globalThis.ValidityState>, validationMessage?: string, anchor?: HTMLElement) => void; | ||
@@ -61,2 +61,5 @@ validationMessage: string; | ||
} | ||
export interface ILitElement extends ICustomElement { | ||
updateComplete: Promise<void>; | ||
} | ||
export declare type LabelsList = NodeListOf<HTMLLabelElement> | []; |
@@ -1,2 +0,2 @@ | ||
import { ICustomElement, IElementInternals, LabelsList } from './types.js'; | ||
import { ICustomElement, IElementInternals, ILitElement, LabelsList } from './types.js'; | ||
/** Recursively get the host root */ | ||
@@ -16,3 +16,3 @@ export declare const getHostRoot: (node: Node) => Node & ParentNode; | ||
*/ | ||
export declare const createHiddenInput: (ref: ICustomElement, internals: IElementInternals) => HTMLInputElement | null; | ||
export declare const createHiddenInput: (ref: ICustomElement | ILitElement, internals: IElementInternals) => HTMLInputElement | null; | ||
/** | ||
@@ -19,0 +19,0 @@ * Initialize a ref by setting up an attribute observe on it |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "0.1.9", | ||
"version": "0.1.26", | ||
"description": "A polyfill for the element internals specification", | ||
@@ -13,3 +13,3 @@ "main": "dist/index.js", | ||
"pretest": "npm run build", | ||
"test": "karma start karma.conf.js --coverage", | ||
"test": "web-test-runner test/*.test.js --node-resolve --playwright --browsers chromium firefox webkit", | ||
"test:watch": "npm run test -- --watch", | ||
@@ -50,5 +50,6 @@ "test:coverage": "npm run test -- --coverage", | ||
"@open-wc/testing-helpers": "^1.7.1", | ||
"@open-wc/testing-karma": "^3.4.0", | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"@rollup/plugin-typescript": "^6.0.0", | ||
"@web/test-runner": "^0.12.16", | ||
"@web/test-runner-playwright": "^0.8.4", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
@@ -76,5 +77,5 @@ "babel-plugin-transform-async-to-promises": "^0.8.15", | ||
"tsc": "^1.20150623.0", | ||
"tslib": "^2.1.0", | ||
"typescript": "^4.0.3" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
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
58043
849
32