@@ -2824,6 +2824,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2824
2824
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-legacy-platform-object">legacy platform object</dfn></li>
2825
2825
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-primary-interface">primary interface</dfn></li>
2826
2826
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-interface-object">interface object</dfn></li>
2827
+ <li><dfn data-x-href="https://heycam.github.io/webidl/#include">include</dfn></li>
2827
2828
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-interface-prototype-object">interface prototype object</dfn></li>
2828
2829
<li><dfn data-x-href="https://heycam.github.io/webidl/#es-platform-objects">[[Realm]] field of a platform object</dfn></li>
2829
2830
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-callback-context">callback context</dfn></li>
@@ -7118,11 +7119,11 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
7118
7119
7119
7120
<p>Elements that have a <code data-x="attr-nonce">nonce</code> content attribute ensure that the
7120
7121
crytographic nonce is only exposed to script (and not to side-channels like CSS attribute
7121
- selectors) by extracting the value from the content attribute, moving it into an internal slot
7122
+ selectors) by taking the value from the content attribute, moving it into an internal slot
7122
7123
named <dfn data-export="" data-dfn-for="HTMLOrSVGElement"
7123
- data-dfn-type="attribute">[[CryptographicNonce]]</dfn>, and exposing it to script via the
7124
- <code>HTMLOrSVGElement</code> interface mixin. Unless otherwise specified, the slot's value
7125
- is the empty string.</p>
7124
+ data-dfn-type="attribute">[[CryptographicNonce]]</dfn>, exposing it to script via the
7125
+ <code>HTMLOrSVGElement</code> interface mixin, and setting the content attribute to the empty
7126
+ string. Unless otherwise specified, the slot's value is the empty string.</p>
7126
7127
7127
7128
<dl class="domintro">
7128
7129
<dt><var>element</var> . <code data-x="">nonce</code></dt>
@@ -7147,12 +7148,26 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
7147
7148
<a href="https://github.com/whatwg/html/issues/2369">issue #2369</a>, where this behavior was
7148
7149
introduced.</p>
7149
7150
7150
- <p>Whenever an element including <code>HTMLOrSVGElement</code> has its <code
7151
- data-x="attr-nonce">nonce</code> attribute is set or changed, set this element's
7152
- <span>[[CryptographicNonce]]</span> to the given value.</p>
7151
+ <p>The following <span data-x="concept-element-attributes-change-ext">attribute change
7152
+ steps</span> are used for the <code data-x="attr-nonce">nonce</code> content attribute:
7153
+
7154
+ <ol>
7155
+ <li><p>If <var>element</var> does not <span>include</span> <code>HTMLOrSVGElement</code>, then
7156
+ return.</p></li>
7157
+
7158
+ <li><p>If <var>localName</var> is not <code data-x="attr-nonce">nonce</code> or
7159
+ <var>namespace</var> is not null, then return.</p></li>
7153
7160
7154
- <p>Whenever an element including <code>HTMLOrSVGElement</code> <span>becomes browsing-context
7155
- connected</span>, the user agent must execute the following steps on the <var>element</var>:</p>
7161
+ <li><p>If <var>value</var> is null, then set <var>element</var>'s
7162
+ <span>[[CryptographicNonce]]</span> to the empty string.</p></li>
7163
+
7164
+ <li><p>Otherwise, set <var>element</var>'s <span>[[CryptographicNonce]]</span> to
7165
+ <var>value</var>.</p></li>
7166
+ </ol>
7167
+
7168
+ <p>Whenever an element <span data-x="include">including</span> <code>HTMLOrSVGElement</code>
7169
+ <span>becomes browsing-context connected</span>, the user agent must execute the following steps
7170
+ on the <var>element</var>:</p>
7156
7171
7157
7172
<ol>
7158
7173
<li><p>Let <var>CSP list</var> be <var>element</var>'s <span data-x="shadow-including
@@ -7165,10 +7180,19 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
7165
7180
<var>attr</var> whose value is not the empty string, then:</p>
7166
7181
7167
7182
<ol>
7183
+ <li><p>Let <var>nonce</var> be <var>element</var>'s
7184
+ <span>[[CryptographicNonce]]</span>.</p></li>
7185
+
7168
7186
<li><p><span data-x="concept-element-attributes-set-value">Set an attribute value</span> for
7169
7187
<var>element</var> using "<code data-x="attr-nonce">nonce</code>" and the empty
7170
7188
string.</p></li>
7189
+
7190
+ <li><p>Set <var>element</var>'s <span>[[CryptographicNonce]]</span> to
7191
+ <var>nonce</var>.</p></li>
7171
7192
</ol>
7193
+
7194
+ <p class="note">If <var>element</var>'s <span>[[CryptographicNonce]]</span> were not restored it
7195
+ would be the empty string at this point.</p>
7172
7196
</li>
7173
7197
</ol>
7174
7198
@@ -7178,9 +7202,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
7178
7202
set during <span data-x="create-the-document-object"><code data-x="">Document</code>
7179
7203
creation and initialization</span>.</p>
7180
7204
7181
- <p>The <span data-x="concept-node-clone-ext">cloning steps</span> for elements that include
7182
- <code>HTMLOrSVGElement</code> must set the <span>[[CryptographicNonce]]</span> slot on the copy
7183
- to the value of the slot on the element being cloned.</p>
7205
+ <p>The <span data-x="concept-node-clone-ext">cloning steps</span> for elements that
7206
+ <span>include</span> <code>HTMLOrSVGElement</code> must set the
7207
+ <span>[[CryptographicNonce]]</span> slot on the copy to the value of the slot on the element being
7208
+ cloned.</p>
7184
7209
7185
7210
<h4>Lazy loading attributes</h4>
7186
7211
0 commit comments