mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
Includes reimporting the test we already had, which has changed significantly. Most of these fail, but importing them now to track progress.
30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
<!doctype html>
|
|
<title>Scoped Custom Element Registries: declarative shadow root</title>
|
|
<script src="../../resources/testharness.js"></script>
|
|
<script src="../../resources/testharnessreport.js"></script>
|
|
<div id="host">
|
|
<template shadowrootmode="open" shadowrootcustomelementregistry>
|
|
<custom-element></custom-element>
|
|
<div></div>
|
|
</template>
|
|
</div>
|
|
<script>
|
|
test(() => {
|
|
const customElement = host.shadowRoot.firstElementChild;
|
|
assert_equals(customElement.customElementRegistry, null);
|
|
customElement.attachShadow({
|
|
mode: "open"
|
|
});
|
|
assert_equals(customElement.shadowRoot.customElementRegistry, null);
|
|
}, "Custom element inside 'shadowrootcustomelementregistry' declarative shadow root");
|
|
|
|
test(() => {
|
|
const divElement = host.shadowRoot.lastElementChild;
|
|
assert_equals(divElement.customElementRegistry, null);
|
|
divElement.attachShadow({
|
|
mode: "open"
|
|
});
|
|
assert_equals(divElement.shadowRoot.customElementRegistry, null);
|
|
}, "Built-in element inside 'shadowrootcustomelementregistry' declarative shadow root");
|
|
</script>
|