Skip to content

Commit

Permalink
Support nonce and referrer policy in preload and Link headers
Browse files Browse the repository at this point in the history
Both are already supported by Gecko, and WebKit and Chromium already support nonce.
  • Loading branch information
noamr authored Jun 2, 2022
1 parent a4ccf54 commit 94a9b1d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -14406,12 +14406,18 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
data-x="">link</code>")</dt>
<dt><dfn data-x="link options integrity">integrity</dfn> (default the empty string)</dt>
<dt><dfn data-x="link options type">type</dfn> (default the empty string)</dt>
<dt><dfn data-x="link options nonce">cryptographic nonce metadata</dfn> (default the empty
string)</dt>
<dd>A string</dd>

<dt><dfn data-x="link options crossorigin">crossorigin</dfn> (default <span
data-x="attr-crossorigin-none">No CORS</span>)</dt>
<dd>A <span>CORS settings attribute</span> state</dd>

<dt><dfn data-x="link options referrer policy">referrer policy</dfn> (default the empty
string)</dt>
<dd>A <span>referrer policy</span></dd>

<dt><dfn data-x="link options source set">source set</dfn> (default null)</dt>
<dd>Null or a <span>source set</span></dd>

Expand Down Expand Up @@ -14457,6 +14463,10 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
<dd>the state of <var>el</var>'s <code data-x="attr-link-crossorigin">crossorigin</code>
content attribute</dd>

<dt><span data-x="link options referrer policy">referrer policy</span></dt>
<dd>the state of <var>el</var>'s <code data-x="attr-link-referrerpolicy">referrerpolicy</code>
content attribute</dd>

<dt><span data-x="link options source set">source set</span></dt>
<dd><var>el</var>'s <span>source set</span></dd>

Expand All @@ -14475,6 +14485,9 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {

<dt><span data-x="link options document">document</span></dt>
<dd><var>document</var></dd>

<dt><span data-x="link options nonce">cryptographic nonce metadata</span></dt>
<dd>The current value of <var>el</var>'s <span>[[CryptographicNonce]]</span> internal slot</dd>
</dl>
</li>

Expand Down Expand Up @@ -14629,6 +14642,16 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
integrity">integrity</span> to <var>attribs</var>["<code
data-x="attr-link-integrity">integrity</code>"].</p></li>

<li><p>If <var>attribs</var>["<code data-x="attr-link-referrerpolicy">referrerpolicy</code>"]
<span data-x="map exists">exists</span> and is an <span>ASCII case-insensitive</span> match for
some <span>referrer policy</span>, then set <var>options</var>'s <span data-x="link options
referrer policy">referrer policy</span> to that <span>referrer policy</span>.</p></li>

<li><p>If <var>attribs</var>["<code data-x="attr-nonce">nonce</code>"]
<span data-x="map exists">exists</span>, then set <var>options</var>'s <span data-x="link
options nonce">nonce</span> to <var>attribs</var>["<code
data-x="attr-nonce">nonce</code>"].</p></li>

<li><p>If <var>attribs</var>["<code data-x="attr-link-type">type</code>"] <span data-x="map
exists">exists</span>, then set <var>options</var>'s <span data-x="link options
type">type</span> to <var>attribs</var>["<code data-x="attr-link-type">type</code>"].</p></li>
Expand Down Expand Up @@ -26533,6 +26556,15 @@ document.body.appendChild(wbr);</code></pre>
data-x="concept-request-integrity-metadata">integrity metadata</span> to <var>options</var>'s
<span data-x="link options integrity">integrity</span>.</p></li>

<li><p>Set <var>request</var>'s <span
data-x="concept-request-nonce-metadata">cryptographic nonce metadata</span> to
<var>options</var>'s <span
data-x="link options nonce">cryptographic nonce metadata</span>.</p></li>

<li><p>Set <var>request</var>'s <span
data-x="concept-request-referrer-policy">referrer policy</span> to <var>options</var>'s
<span data-x="link options referrer policy">referrer policy</span>.</p></li>

<li><p>Let <var>entry</var> be a new <span>preload entry</span> whose
<span data-x="preload integrity metadata">integrity metadata</span> is <var>options</var>'s
<span data-x="link options integrity">integrity</span>.</p></li>
Expand Down

0 comments on commit 94a9b1d

Please sign in to comment.