Skip to content

Conversation

@rniwa
Copy link
Contributor

@rniwa rniwa commented Nov 19, 2025

</head>
<body>
<div id="host-window"><template shadowrootmode="open"><a-b></a-b></template></div>
<div id="host-null"><template shadowrootmode="open" shadowrootcustomelementregistry=""><a-b></a-b></template></div>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was never used in the test.

@rniwa rniwa force-pushed the add-scoped-custom-element-registry-customelementregistry-attribute branch from 72bf811 to accfde2 Compare November 19, 2025 04:07
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ja-y-son might also want to review these.

Comment on lines 6 to 7
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

Comment on lines 6 to 7
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

Comment on lines 5 to 6
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

…ing null to createEleent and attachShadow per

- whatwg/dom#1424
- whatwg/dom#1423

Also update the existing tests to account for the behavior differences.`
@rniwa rniwa force-pushed the add-scoped-custom-element-registry-customelementregistry-attribute branch from accfde2 to 237753b Compare November 19, 2025 17:45
@rniwa rniwa closed this Nov 19, 2025
@rniwa rniwa reopened this Nov 19, 2025
assert_equals(doc.createElement(elementName, {customElementRegistry: null}).customElementRegistry, null);
assert_equals(doc.createElementNS('http://www.w3.org/1999/xhtml', 'div', {customElementRegistry: null}).customElementRegistry, null);
}, `document.createElement should create a ${elementDescription} with null registry if customElement is set to null`);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd imagine the test for null registry option on createElement to be placed in Document-createElement.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me address these comments in a follow up since the corresponding WebKit change has already landed.

test((test) => {
const [doc, win] = makeIframe(test);
const host = doc.createElement(elementName);
const shadowRoot = host.attachShadow({mode: 'closed', customElementRegistry: null})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, would imagine this to be placed in ShadowRoot-init-customElementRegistry.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to create test cases for cross document append where append does upgrade due to element getting registry on adopt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good idea. Will do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add tests to ensure the subtree of the element with customelementregistry attribute also has null registry in both HTML and XHTML?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good idea. Will do.

@rniwa rniwa merged commit cc1c056 into web-platform-tests:master Nov 20, 2025
35 checks passed
@rniwa rniwa deleted the add-scoped-custom-element-registry-customelementregistry-attribute branch November 20, 2025 02:06
annevk added a commit to whatwg/dom that referenced this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants