-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Introduce customelementregistry global attribute #12000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ja-y-son
wants to merge
2
commits into
whatwg:main
Choose a base branch
from
ja-y-son:cer-attr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3413,6 +3413,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
| <li><dfn data-x-href="https://dom.spec.whatwg.org/#valid-attribute-local-name">valid attribute local name</dfn></li> | ||
| <li><dfn data-x-href="https://dom.spec.whatwg.org/#valid-element-local-name">valid element local name</dfn></li> | ||
| <li><dfn data-x-href="https://dom.spec.whatwg.org/#is-a-global-custom-element-registry">is a global custom element registry</dfn></li> | ||
| <li><dfn data-x-fref="https://dom.spec.whatwg.org/#concept-element-keep-custom-elemenet-registry-null">keep element custom element registry null</dfn></li> | ||
| </ul> | ||
|
|
||
| <p>The following features are defined in <cite>UI Events</cite>: <ref>UIEVENTS</ref></p> | ||
|
|
@@ -13898,6 +13899,7 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E% | |
| <li><code data-x="attr-autocorrect">autocorrect</code></li> | ||
| <li><code data-x="attr-fe-autofocus">autofocus</code></li> | ||
| <li><code data-x="attr-contenteditable">contenteditable</code></li> | ||
| <li><code data-x="attr-customelementregistry">customelementregistry</code></li> | ||
| <li><code data-x="attr-dir">dir</code></li> | ||
| <li><code data-x="attr-draggable">draggable</code></li> | ||
| <li><code data-x="attr-enterkeyhint">enterkeyhint</code></li> | ||
|
|
@@ -77450,6 +77452,14 @@ console.assert(el instanceof SpiderMan); // upgraded!</code></pre> | |
| <code>CustomElementRegistry</code> object, it intentionally cannot be changed any further. This | ||
| simplifies reasoning about code and allows implementations to optimize.</p> | ||
|
|
||
| <h4>The <code data-x="attr-customelementregistry">customelementregistry</code> attribute</h4> | ||
|
|
||
| <p> The | ||
| <dfn element-attr for="html-global"><code data-x="attr-customelementregistry">customelementregistry</code></dfn> | ||
| attribute is used to specify whether the parser should be | ||
| <span data-x="look up a custom element registry">looking up a custom element registry</span> | ||
| when the parser runs <span>Create an element for the token</span>. The value is boolean.</p> | ||
|
|
||
|
|
||
| <h4><dfn data-x="custom-element-upgrades">Upgrades</dfn></h4> | ||
|
|
||
|
|
@@ -139553,8 +139563,15 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> { | |
| <li><p>Let <var>is</var> be the value of the "<code data-x="attr-is">is</code>" attribute in | ||
| <var>token</var>, if such an attribute exists; otherwise null.</p></li> | ||
|
|
||
| <li><p>Let <var>registry</var> be the result of <span data-x="look up a custom element | ||
| registry">looking up a custom element registry</span> given <var>intendedParent</var>.</p></li> | ||
| <li><p>Let <var>registry</var> be null if | ||
| <code data-x="attr-customelementregistry">customelementregistry</code> attribute exists; | ||
| otherwise let <var>registry</var> be the result of | ||
| <span data-x="look up a custom element registry">looking up a custom element registry</span> | ||
| given <var>intendedParent</var>.</p></li> | ||
|
|
||
| <li><p>Let <var>keep registry null</var> be true if | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keepRegistryNull |
||
| <code data-x="attr-customelementregistry">customelementregistry</code> attribute exists; | ||
| otherwise false. | ||
|
|
||
| <li><p>Let <var>definition</var> be the result of <span data-x="look up a custom element | ||
| definition">looking up a custom element definition</span> given <var>registry</var>, | ||
|
|
@@ -139643,6 +139660,10 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> { | |
| with the <code>form</code> element pointed to by the <span><code data-x="">form</code> element | ||
| pointer</span> and set <var>element</var>'s <span>parser inserted flag</span>.</p></li> | ||
|
|
||
| <li><p>If <var>keep registry null</var> is true, set <var>element</var>'s | ||
| <span>keep element custom element registry null</span> | ||
| to true. | ||
|
|
||
| <li><p>Return <var>element</var>.</p></li> | ||
| </ol> | ||
| </div> | ||
|
|
@@ -153009,6 +153030,11 @@ interface <dfn interface>External</dfn> { | |
| <td> "<code data-x="attr-crossorigin-anonymous-keyword">anonymous</code>"; | ||
| "<code data-x="attr-crossorigin-use-credentials-keyword">use-credentials</code>"; | ||
| the empty string | ||
| <tr> | ||
| <th> <code data-x="">customelementregistry</code> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation here is wrong. |
||
| <td> <span data-x="attr-class">HTML elements</span> | ||
| <td> Whether the element should use scoped custom element registry | ||
| <td> <span>Boolean attribute</span> | ||
| <tr> | ||
| <th> <code data-x="">data</code> | ||
| <td> <code data-x="attr-object-data">object</code> | ||
|
|
||
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need the same kind of complexity we need as for shadow roots for the same kind of scenario we discussed for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I followed here. Could you elaborate on the complexity we need for this attribute that you mentioned above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a separate "keep custom element registry null" flag for whatwg/dom#1423 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added keep custom element registry null concept for the element attribute aligning with the shadowroot counterpart. Also updated whatwg/dom#1437 to include the concept.