LibWeb: Implement scoped custom element registries

This commit is contained in:
Sam Atkins
2026-02-27 17:05:47 +00:00
committed by Tim Ledbetter
parent 90c39c214d
commit ed6a5f25a0
Notes: github-actions[bot] 2026-03-27 19:50:58 +00:00
48 changed files with 1243 additions and 749 deletions

View File

@@ -3,11 +3,14 @@
// https://html.spec.whatwg.org/multipage/custom-elements.html#customelementregistry
[Exposed=Window]
interface CustomElementRegistry {
constructor();
[CEReactions] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {});
(CustomElementConstructor or undefined) get(DOMString name);
DOMString? getName(CustomElementConstructor constructor);
Promise<CustomElementConstructor> whenDefined(DOMString name);
[CEReactions] undefined upgrade(Node root);
[CEReactions, ImplementedAs=initialize_for_bindings] undefined initialize(Node root);
};
callback CustomElementConstructor = HTMLElement ();