Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4534,6 +4534,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo">MathML <code>mo</code></dfn> element</li>
<li><dfn data-x-href="https://w3c.github.io/mathml-core/#string-literal-ms">MathML <code>ms</code></dfn> element</li>
<li><dfn data-x-href="https://w3c.github.io/mathml-core/#text-mtext">MathML <code>mtext</code></dfn> element</li>
<li><dfn data-x-href="https://w3c.github.io/mathml-core/#dfn-a">MathML <code>a</code></dfn> element</li>
</ul>
</dd>

Expand Down Expand Up @@ -7923,31 +7924,31 @@ 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
cryptographic nonce is only exposed to script (and not to side-channels like CSS attribute
selectors) by taking the value from the content attribute, moving it into an internal slot
named <dfn for="HTMLOrSVGElement" attribute>[[CryptographicNonce]]</dfn>, exposing it to script
via the <code>HTMLOrSVGElement</code> interface mixin, and setting the content attribute to the
empty string. Unless otherwise specified, the slot's value is the empty string.</p>
selectors) by taking the value from the content attribute, moving it into an internal slot named
<dfn for="HTMLOrSVGOrMathMLElement" attribute>[[CryptographicNonce]]</dfn>, exposing it to script
via the <code>HTMLOrSVGOrMathMLElement</code> interface mixin, and setting the content attribute
to the empty string. Unless otherwise specified, the slot's value is the empty string.</p>

<dl class="domintro">
<dt><code data-x=""><var>element</var>.<span subdfn data-x="dom-HTMLOrSVGElement-nonce">nonce</span></code></dt>
<dt><code data-x=""><var>element</var>.<span subdfn data-x="dom-HTMLOrSVGOrMathMLElement-nonce">nonce</span></code></dt>
<dd><p>Returns the value set for <var>element</var>'s cryptographic nonce. If the setter was not
used, this will be the value originally found in the <code data-x="attr-nonce">nonce</code>
content attribute.</p></dd>

<dt><code data-x=""><var>element</var>.<span data-x="dom-HTMLOrSVGElement-nonce">nonce</span> = <var>value</var></code></dt>
<dt><code data-x=""><var>element</var>.<span data-x="dom-HTMLOrSVGOrMathMLElement-nonce">nonce</span> = <var>value</var></code></dt>
<dd><p>Updates <var>element</var>'s cryptographic nonce value.</p></dd>
</dl>

<div algorithm>
<p>The <dfn id="dom-noncedelement-nonce" attribute for="HTMLOrSVGElement"><code
data-x="dom-HTMLOrSVGElement-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>The <dfn id="dom-noncedelement-nonce" attribute for="HTMLOrSVGOrMathMLElement"><code
data-x="dom-HTMLOrSVGOrMathMLElement-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>
</div>

<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
content attribute. This, as well as the below setting of the <code
data-x="dom-HTMLOrSVGOrMathMLElement-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
Expand All @@ -7959,8 +7960,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
steps</span> are used for the <code data-x="attr-nonce">nonce</code> content attribute:

<ol>
<li><p>If <var>element</var> does not <span>include</span> <code>HTMLOrSVGElement</code>, then
return.</p></li>
<li><p>If <var>element</var> does not <span>include</span> <code>HTMLOrSVGOrMathMLElement</code>,
then return.</p></li>

<li><p>If <var>localName</var> is not <code data-x="attr-nonce">nonce</code> or
<var>namespace</var> is not null, then return.</p></li>
Expand All @@ -7974,9 +7975,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
</div>

<div algorithm>
<p>Whenever an element <span data-x="include">including</span> <code>HTMLOrSVGElement</code>
<span>becomes browsing-context connected</span>, the user agent must execute the following steps
on the <var>element</var>:</p>
<p>Whenever an element <span data-x="include">including</span>
<code>HTMLOrSVGOrMathMLElement</code> <span>becomes browsing-context connected</span>, the user
agent must execute the following steps on the <var>element</var>:</p>

<ol>
<li><p>Let <var>CSP list</var> be <var>element</var>'s <span data-x="shadow-including
Expand Down Expand Up @@ -8008,8 +8009,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

<div algorithm>
<p>The <span data-x="concept-node-clone-ext">cloning steps</span> for elements that
<span>include</span> <code>HTMLOrSVGElement</code> given <var>node</var>, <var>copy</var>, and
<var>subtree</var> are to set <var>copy</var>'s <span>[[CryptographicNonce]]</span> to
<span>include</span> <code>HTMLOrSVGOrMathMLElement</code> given <var>node</var>, <var>copy</var>,
and <var>subtree</var> are to set <var>copy</var>'s <span>[[CryptographicNonce]]</span> to
<var>node</var>'s <span>[[CryptographicNonce]]</span>.</p>
</div>

Expand Down Expand Up @@ -12851,7 +12852,7 @@ dictionary <dfn dictionary>TogglePopoverOptions</dfn> : <span>ShowPopoverOptions

<span>HTMLElement</span> includes <span>GlobalEventHandlers</span>;
<span>HTMLElement</span> includes <span>ElementContentEditable</span>;
<span>HTMLElement</span> includes <span>HTMLOrSVGElement</span>;
<span>HTMLElement</span> includes <span>HTMLOrSVGOrMathMLElement</span>;

[Exposed=Window]
interface <dfn interface>HTMLUnknownElement</dfn> : <span>HTMLElement</span> {
Expand Down Expand Up @@ -12902,14 +12903,14 @@ interface <dfn interface>HTMLUnknownElement</dfn> : <span>HTMLElement</span> {
a linear transition of the element's prototype chain, from <code>HTMLElement</code> to a subclass,
instead of a lateral one, from <code>HTMLUnknownElement</code> to an unrelated subclass.</p>

<p>Features shared between HTML and SVG elements use the <code>HTMLOrSVGElement</code> interface
mixin: <ref>SVG</ref></p>
<p>Features shared between HTML, SVG and MathML elements use the
<code>HTMLOrSVGOrMathMLElement</code> interface mixin: <ref>SVG</ref> <ref>MATHML</ref></p>

<pre><code class="idl">interface mixin <dfn interface>HTMLOrSVGElement</dfn> {
<pre><code class="idl">interface mixin <dfn id="htmlorsvgelement" interface>HTMLOrSVGOrMathMLElement</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-HTMLOrSVGOrMathMLElement-nonce">nonce</span>; // <a href="#nonce-does-not-update-dom">intentionally no [CEReactions]</a>

[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLOrSVGElement" data-x="dom-fe-autofocus">autofocus</dfn>;
[<span>CEReactions</span>, <span data-x="xattr-Reflect">Reflect</span>] attribute boolean <dfn attribute for="HTMLOrSVGOrMathMLElement" data-x="dom-fe-autofocus">autofocus</dfn>;
[<span>CEReactions</span>, <span data-x="xattr-ReflectSetter">ReflectSetter</span>] attribute long <span data-x="dom-tabindex">tabIndex</span>;
undefined <span data-x="dom-focus">focus</span>(optional <span>FocusOptions</span> options = {});
undefined <span data-x="dom-blur">blur</span>();
Expand All @@ -12918,7 +12919,7 @@ interface <dfn interface>HTMLUnknownElement</dfn> : <span>HTMLElement</span> {
</div>

<div class="example">
<p>An example of an element that is neither an HTML nor SVG element is one created as
<p>An example of an element that is neither an HTML nor SVG nor MathML element is one created as
follows:</p>

<pre><code class="html">const el = document.createElementNS("some namespace", "example");
Expand Down Expand Up @@ -15352,7 +15353,7 @@ translate="no">HTML&lt;/span> markup.&lt;/p></code></pre>
<div w-nodev>

<div algorithm>
<p>The <dfn attribute for="HTMLOrSVGElement"><code data-x="dom-dataset">dataset</code></dfn> IDL
<p>The <dfn attribute for="HTMLOrSVGOrMathMLElement"><code data-x="dom-dataset">dataset</code></dfn> IDL
attribute provides convenient accessors for all the <code data-x="attr-data-*">data-*</code>
attributes on an element. On getting, the <code data-x="dom-dataset">dataset</code> IDL attribute
must return a <code>DOMStringMap</code> whose associated element is this element.</p>
Expand Down Expand Up @@ -85676,7 +85677,7 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
</dl>

<div algorithm>
<p>The <dfn attribute for="HTMLOrSVGElement"><code data-x="dom-tabIndex">tabIndex</code></dfn>
<p>The <dfn attribute for="HTMLOrSVGOrMathMLElement"><code data-x="dom-tabIndex">tabIndex</code></dfn>
getter steps are:</p>

<ol>
Expand All @@ -85699,8 +85700,9 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
<li><p>Return 0 if <span>this</span> 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
its parent details</span>; otherwise &#x2212;1.</p></li>
<code>a</code></span> element, or <span>MathML <code>a</code></span> element, or is a
<code>summary</code> element that is a <span>summary for its parent details</span>;
otherwise &#x2212;1.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -86554,7 +86556,7 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
<hr>

<div algorithm>
<p>The <code>HTMLOrSVGElement</code> <dfn method for="HTMLOrSVGElement"><code
<p>The <code>HTMLOrSVGOrMathMLElement</code> <dfn method for="HTMLOrSVGOrMathMLElement"><code
data-x="dom-focus">focus(<var>options</var>)</code></dfn> method steps are:</p>

<ol>
Expand All @@ -86576,7 +86578,7 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
</div>

<div algorithm>
<p>The <code>HTMLOrSVGElement</code> <dfn method for="HTMLOrSVGElement"><code
<p>The <code>HTMLOrSVGOrMathMLElement</code> <dfn method for="HTMLOrSVGOrMathMLElement"><code
data-x="dom-blur">blur()</code></dfn> method steps are:</p>

<ol>
Expand Down
Loading