element-internals-polyfill
Version:
A polyfill for the element internals specification
20 lines (19 loc) • 692 B
TypeScript
import { ElementInternals } from "./element-internals.js";
import { CustomStateSet } from "./CustomStateSet.js";
import "./element-internals.js";
export * from "./types.js";
export { forceCustomStateSetPolyfill, forceElementInternalsPolyfill, } from "./element-internals.js";
declare global {
interface Window {
CustomStateSet: typeof CustomStateSet;
ElementInternals: typeof ElementInternals;
ShadyDOM: any;
}
interface HTMLElement {
/**
* Attaches an ElementInternals instance to a custom element. Calling this method
* on a built-in element will throw an error.
*/
attachInternals(): ElementInternals;
}
}