Skip to content

Commit

Permalink
feat: Rename HTMLOrSVGElement to HTMLOrForeignElement
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Sep 8, 2019
1 parent 2d783db commit 9028064
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7184,9 +7184,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 @@ -7198,25 +7198,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 @@ -7244,7 +7244,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 @@ -10293,7 +10293,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>;

// Note: <a href="#customized-built-in-element-restrictions">intentionally</a> not [<span>HTMLConstructor</span>]
[Exposed=Window]
Expand Down Expand Up @@ -10343,12 +10343,12 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</code></

</div>

<p>Features shared between HTML and SVG elements use the <code>HTMLOrSVGElement</code> interface
mixin: <ref spec=SVG></p>
<p>Features shared between HTML, SVG and other foreign elements use the <code>HTMLOrForeignElement</code>
interface mixin: <ref spec=SVG><!-- <ref spec=MathML> --></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

0 comments on commit 9028064

Please sign in to comment.