Skip to content
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
wants to merge 8 commits into
base: main
Choose a base branch
from
24 changes: 12 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7114,9 +7114,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">
Expand All @@ -7128,25 +7128,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>
Expand Down Expand Up @@ -7174,7 +7174,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>


Expand Down Expand Up @@ -10216,7 +10216,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> {
Expand Down Expand Up @@ -10267,12 +10267,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>;
Expand Down Expand Up @@ -126041,4 +126041,4 @@ INSERT INTERFACES HERE
<!-- Hopefully Kam and Tess won't notice they're covered by these acknowledgments three times! -->

</body>
</html>
</html>
Copy link

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.

Suggested change
</html>
</html>