-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Rename HTMLOrSVGElement to reflect its wider use in MathML as well #5248
Open
bkardell
wants to merge
8
commits into
whatwg:main
Choose a base branch
from
bkardell:change-idl-references
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
8 commits
Select commit
Hold shift + click to select a range
768b326
Rename HTMLOrSVGElement to reflect its wider use in MathML as well
2726e9c
Remove trailing newline(s)
66411d9
undo accidental changes, just remove newline
543940f
...one new line
1cf5d8f
Revert "...one new line"
7e22e82
Rename HTMLOrSVGElement to reflect its wider use in MathML as well
f9fd35f
Rename HTMLOrSVGElement to reflect its wider use in MathML as well
cf5b53f
update to match historical default tabindexes to match and specify li…
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 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 |
---|---|---|
|
@@ -4068,6 +4068,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
<li><dfn data-x-href="https://www.w3.org/Math/draft-spec/chapter3.html#presm.mo">MathML <code>mo</code></dfn> element</li> | ||
<li><dfn data-x-href="https://www.w3.org/Math/draft-spec/chapter3.html#presm.ms">MathML <code>ms</code></dfn> element</li> | ||
<li><dfn data-x-href="https://www.w3.org/Math/draft-spec/chapter3.html#presm.mtext">MathML <code>mtext</code></dfn> element</li> | ||
<li><dfn data-x-href="https://www.w3.org/Math/draft-spec/chapter3.html#presm.mrow">MathML <code>mrow</code></dfn> element</li> | ||
</ul> | ||
</dd> | ||
|
||
|
@@ -7114,9 +7115,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
<p>Elements that have a <code data-x="attr-nonce">nonce</code> content attribute ensure that the | ||
crytographic nonce is only exposed to script (and not to side-channels like CSS attribute | ||
selectors) by extracting the value from the content attribute, moving it into an internal slot | ||
named <dfn data-export="" data-dfn-for="HTMLOrSVGElement" | ||
named <dfn data-export="" data-dfn-for="HTMLOrForeignElement" | ||
data-dfn-type="attribute">[[CryptographicNonce]]</dfn>, and exposing it to script via the | ||
<code>HTMLOrSVGElement</code> interface mixin. Unless otherwise specified, the slot's value | ||
<code>HTMLOrForeignElement</code> interface mixin. Unless otherwise specified, the slot's value | ||
is the empty string.</p> | ||
|
||
<dl class="domintro"> | ||
|
@@ -7128,25 +7129,25 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
</dl> | ||
|
||
<p>The <dfn id="dom-noncedelement-nonce" data-export="" data-dfn-type="attribute" | ||
data-dfn-for="HTMLOrSVGElement"><code data-x="dom-HTMLOrSVGElement-nonce">nonce</code></dfn> IDL | ||
data-dfn-for="HTMLOrForeignElement"><code data-x="dom-HTMLOrForeignElement-nonce">nonce</code></dfn> IDL | ||
attribute must, on getting, return the value of this element's | ||
<span>[[CryptographicNonce]]</span>; and on setting, set this element's | ||
<span>[[CryptographicNonce]]</span> to the given value.</p> | ||
|
||
<p class="note" id="nonce-does-not-update-dom">Note how the setter for the <code | ||
data-x="dom-HTMLOrSVGElement-nonce">nonce</code> IDL attribute does not update the corresponding | ||
data-x="dom-HTMLOrForeignElement-nonce">nonce</code> IDL attribute does not update the corresponding | ||
content attribute. This, as well as the below setting of the <code | ||
data-x="attr-nonce">nonce</code> content attribute to the empty string when an element | ||
<span>becomes browsing-context connected</span>, is meant to prevent exfiltration of the nonce | ||
value through mechanisms that can easily read content attributes, such as selectors. Learn more in | ||
<a href="https://github.com/whatwg/html/issues/2369">issue #2369</a>, where this behavior was | ||
introduced.</p> | ||
|
||
<p>Whenever an element including <code>HTMLOrSVGElement</code> has its <code | ||
<p>Whenever an element including <code>HTMLOrForeignElement</code> has its <code | ||
data-x="attr-nonce">nonce</code> attribute is set or changed, set this element's | ||
<span>[[CryptographicNonce]]</span> to the given value.</p> | ||
|
||
<p>Whenever an element including <code>HTMLOrSVGElement</code> <span>becomes browsing-context | ||
<p>Whenever an element including <code>HTMLOrForeignElement</code> <span>becomes browsing-context | ||
connected</span>, the user agent must execute the following steps on the <var>element</var>:</p> | ||
|
||
<ol> | ||
|
@@ -7174,7 +7175,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
creation and initialization</span>.</p> | ||
|
||
<p>The <span data-x="concept-node-clone-ext">cloning steps</span> for elements that include | ||
<code>HTMLOrSVGElement</code> must set the <span>[[CryptographicNonce]]</span> slot on the copy | ||
<code>HTMLOrForeignElement</code> must set the <span>[[CryptographicNonce]]</span> slot on the copy | ||
to the value of the slot on the element being cloned.</p> | ||
|
||
|
||
|
@@ -10216,7 +10217,7 @@ interface <dfn>HTMLElement</dfn> : <span>Element</span> { | |
<span>HTMLElement</span> includes <span>GlobalEventHandlers</span>; | ||
<span>HTMLElement</span> includes <span>DocumentAndElementEventHandlers</span>; | ||
<span>HTMLElement</span> includes <span>ElementContentEditable</span>; | ||
<span>HTMLElement</span> includes <span>HTMLOrSVGElement</span>; | ||
<span>HTMLElement</span> includes <span>HTMLOrForeignElement</span>; | ||
|
||
[Exposed=Window] | ||
interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { | ||
|
@@ -10267,12 +10268,12 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { | |
|
||
</div> | ||
|
||
<p>Features shared between HTML and SVG elements use the <code>HTMLOrSVGElement</code> interface | ||
<p>Features shared between HTML, SVG and MathML elements use the <code>HTMLOrForeignElement</code> interface | ||
mixin: <ref spec=SVG></p> | ||
|
||
<pre><code class="idl" data-x="">interface mixin <dfn>HTMLOrSVGElement</dfn> { | ||
<pre><code class="idl" data-x="">interface mixin <dfn>HTMLOrForeignElement</dfn> { | ||
[SameObject] readonly attribute <span>DOMStringMap</span> <span data-x="dom-dataset">dataset</span>; | ||
attribute DOMString <span data-x="dom-HTMLOrSVGElement-nonce">nonce</span>; // <a href="#nonce-does-not-update-dom">intentionally no [CEReactions]</a> | ||
attribute DOMString <span data-x="dom-HTMLOrForeignElement-nonce">nonce</span>; // <a href="#nonce-does-not-update-dom">intentionally no [CEReactions]</a> | ||
|
||
[<span>CEReactions</span>] attribute boolean <span data-x="dom-fe-autofocus">autofocus</span>; | ||
[<span>CEReactions</span>] attribute long <span data-x="dom-tabindex">tabIndex</span>; | ||
|
@@ -74617,7 +74618,7 @@ END:VCARD</pre> | |
attribute. The default value is 0 if the element is an <code>a</code>, <code>area</code>, | ||
<code>button</code>, <code>frame</code>, <code>iframe</code>, <code>input</code>, | ||
<code>object</code>, <code>select</code>, <code>textarea</code>, or <span>SVG | ||
<code>a</code></span> element, or is a <code>summary</code> element that is a <span>summary for | ||
<code>a</code></span> element, or is a MathML hyperlinking element (<code data-x="MathML mi">mi</code>, <code data-x="MathML mo">mo</code>, <code data-x="MathML mn">mn</code>, <code data-x="MathML ms">ms</code>, <code data-x="MathML mtext">mtext</code>, or <code data-x="MathML mrow">mrow</code>), or is a <code>summary</code> element that is a <span>summary for | ||
its parent details</span>. The default value is −1 otherwise.</p> | ||
|
||
<p class="note">The varying default value based on element type is a historical artifact.</p> | ||
|
@@ -126041,4 +126042,4 @@ INSERT INTERFACES HERE | |
<!-- Hopefully Kam and Tess won't notice they're covered by these acknowledgments three times! --> | ||
|
||
</body> | ||
</html> | ||
</html> | ||
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. Please remove this addition |
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.
Please don’t remove trailing new‑lines.