Skip to content

Commit 077858c

Browse files
keithamuschromium-wpt-export-bot
authored andcommitted
Scaffold out basic IDL for revamped scoped registry
This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <[email protected]> Commit-Queue: Keith Cirkel <[email protected]> Commit-Queue: David Baron <[email protected]> Auto-Submit: Keith Cirkel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1446589}
1 parent 84067a9 commit 077858c

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// META: script=/resources/WebIDLParser.js
2+
// META: script=/resources/idlharness.js
3+
// META: global=window,dedicatedworker,shadowrealm-in-window
4+
5+
idl_test(
6+
["scoped-custom-elements-registry.tentative"],
7+
["html", "dom"],
8+
(idl_array) => {
9+
let element = document.createElement("div");
10+
let shadowRoot = element.attachShadow({ mode: "open" });
11+
let customElementRegistry = new CustomElementRegistry();
12+
let templateElement = document.createElement("template");
13+
idl_array.add_objects({
14+
document,
15+
element,
16+
shadowRoot,
17+
customElementRegistry,
18+
templateElement,
19+
});
20+
},
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[Exposed=Window]
2+
partial interface CustomElementRegistry {
3+
constructor();
4+
undefined initialize(Node root);
5+
};
6+
7+
[Exposed=Window]
8+
partial interface HTMLTemplateElement {
9+
[CEReactions] attribute DOMString shadowRootCustomElementRegistry;
10+
};
11+
12+
[Exposed=Window]
13+
partial interface Document {
14+
readonly attribute CustomElementRegistry? customElementRegistry;
15+
};
16+
17+
[Exposed=Window]
18+
partial interface Element {
19+
readonly attribute CustomElementRegistry? customElementRegistry;
20+
};
21+
22+
[Exposed=Window]
23+
partial interface ShadowRoot {
24+
readonly attribute CustomElementRegistry? customElementRegistry;
25+
};
26+
27+
dictionary ImportNodeOptions {
28+
CustomElementRegistry customElementRegistry;
29+
boolean selfOnly = false;
30+
};
31+
32+
partial dictionary ShadowRootInit {
33+
CustomElementRegistry customElementRegistry;
34+
};
35+
36+
partial dictionary ElementCreationOptions {
37+
CustomElementRegistry customElementRegistry;
38+
};

0 commit comments

Comments
 (0)