Chrome 146 / Safari 26 add createElement option customElementRegistry#29216
Open
hamishwillee wants to merge 1 commit intomdn:mainfrom
Open
Chrome 146 / Safari 26 add createElement option customElementRegistry#29216hamishwillee wants to merge 1 commit intomdn:mainfrom
createElement option customElementRegistry#29216hamishwillee wants to merge 1 commit intomdn:mainfrom
Conversation
Contributor
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
This was referenced Mar 10, 2026
caugner
requested changes
Mar 13, 2026
| "opera": "mirror", | ||
| "opera_android": "mirror", | ||
| "safari": { | ||
| "version_added": false |
Contributor
There was a problem hiding this comment.
Assuming Safari supports the subfeatures:
Suggested change
| "version_added": "26" |
The collector test for createElementNS passes in Safari 26.3. The test for options_parameter fails, but it only tests the is option.
| "opera": "mirror", | ||
| "opera_android": "mirror", | ||
| "safari": { | ||
| "version_added": "26" |
Contributor
There was a problem hiding this comment.
According to https://collector.openwebdocs.org/tests/api/Document/createElementNS, is is not supported.
In Webkit, ElementCreationOptions only has a single member, customElementRegistry, so is seems to be unsupported.
Suggested change
| "version_added": "26" | |
| "version_added": false |
createElement option customElementRegistry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a new option
customElementRegistryto theoptionsparameter that can be passed toDocument.createElement()orDocument.createElementNS().According to https://developer.chrome.com/blog/scoped-registries?hl=en#scope_to_an_individual_element support was added in Chrome 146 and Safari 26 - that seems likely for Safari from https://webkit.org/blog/17674/release-notes-for-safari-technology-preview-234/ and from the related APIs such as https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/CustomElementRegistry
This adds both an
options.customElementRegistryandoptions.isparameter to the two methods. The assumption is thatiswas supported in Chrome from start (seems likely), and from Safari in 26. I can't see information confirming this for Safari, but I think it likely.Note, no evidence Firefox supports either yet.
This fell out of work being done for