import type { AttributeEdit, TextEdit } from './object-urls.js'; /** * Whether a checkbox or a radio is ticked now, or `undefined` for any other element. * * The one reading of `checked` both the accessibility state and the form state * take: the property, which a click moves, and never the attribute, which says * only how the markup started. */ export declare function liveChecked(element: Element): boolean | undefined; /** The edit that makes one control's markup say what it holds. */ export type FormEdit = { readonly attribute: 'value' | 'checked' | 'selected'; /** `null` removes the attribute. */ readonly value: string | null; } | { readonly text: string; }; export interface FormState { /** The edit `element` needs, or `undefined` when its markup already says it. */ editOf(element: Element): FormEdit | undefined; /** * `root.outerHTML`, with every edit in the subtree written in, and `also`: * attributes and text another reading of the page found it must write, by * element. * * The edits go onto a copy imported into an inert document, never onto the * page. Writing them on the live tree and taking them off again is not an * inspection: adding `selected` back to an option the page's script moved * away from re-selects it, and adding `checked` back to a radio its group * unchecked unchecks the other one. An inert document has no browsing * context, so the copy runs no custom element constructor and fetches * nothing. With no edit, the copy is never made. */ serialize(root: Element, also?: ReadonlyMap): string; } /** One reader per acquisition: it remembers each `