/** * What each element keeps in its `ElementInternals`: custom states, the form * value and validity. Internals are private to the element that attached * them, so the only way to see them from outside is to be there when * `attachInternals()` hands them over. {@link installInternalsHook} wraps it * to keep each element's internals, and the calls that change them, in a * weak map; the element gets the same object back and behaves as before. * * Only elements that attach their internals after the hook is installed are * seen, so it runs ahead of the app: the dev server's head script, the * standalone script and the extension's `document_start` script install it. */ import type { InspectorFormValue, InspectorInternals } from '../../types/inspector.js'; /** * Wraps `HTMLElement.prototype.attachInternals` to track what each element * attaches. Idempotent across runtimes, and a no-op where there is no * `attachInternals`. */ export declare const installInternalsHook: () => void; /** * Calls `onChange` after `el`'s custom states, form value or validity * change through its internals. Returns a function that stops it; a no-op * for an element with no tracked internals. */ export declare const onInternalsChange: (el: Element, onChange: () => void) => (() => void); /** * A value `setFormValue()` takes, summarized for the panel. Anything else * reads as its string, as the browser would convert it. */ export declare const summarizeFormValue: (v: unknown) => InspectorFormValue; /** * `el`'s custom states, form value and validity, read now; `undefined` for * an element whose internals the hook did not see. Never throws. */ export declare const readInternals: (el: Element) => InspectorInternals | undefined; //# sourceMappingURL=element-internals.d.ts.map