This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Port nonce #604
Merged
Merged
Port nonce #604
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,7 @@ | |
<dd><{link/rel}> — Relationship of this document (or subsection/topic) to the destination resource</dd> | ||
<dd><{link/rev}> — <a>Reverse link</a> relationship of the destination resource to this document (or subsection/topic)</dd> | ||
<dd><code>media</code> — Applicable media</dd> | ||
<dd><code>nonce</code> — Cryptographic nonce used in Content Security Policy checks [[CSP3]]</dd> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: The leading whitespace here still seems incorrect. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'll render the same... noted, thanks |
||
<dd><code>hreflang</code> — Language of the linked resource</dd> | ||
<dd><code>type</code> — Hint for the type of the referenced resource</dd> | ||
<dd><code>sizes</code> — Sizes of the icons (for <{link/rel}>="<code>icon</code>")</dd> | ||
|
@@ -466,6 +467,11 @@ | |
which indicates that the current document is the table of contents document for every chapter. | ||
|
||
</div> | ||
|
||
<p>The <dfn element-attr for="link"><code>nonce</code></dfn> attribute represents a | ||
cryptographic nonce ("number used once") which can be used by <cite>Content Security Policy</cite> | ||
to determine whether or not an external resource specified by the link will be loaded and applied | ||
to the document. The value is text. [[CSP3]]</p> | ||
|
||
The <dfn element-attr for="link"><code>crossorigin</code></dfn> attribute is a | ||
<a>CORS settings attribute</a>. It is intended for use with external resource links. | ||
|
@@ -490,7 +496,9 @@ | |
<var>url</var> and <var>corsAttributeState</var>. | ||
5. Set <var>request</var>'s <a>client</a> to the <{link}> element's <a>node document</a>'s | ||
{{Window}} object's <a>environment settings object</a>. | ||
6. <a>Fetch</a> <var>request</var>. | ||
6. Set <var>request</var>'s <span>cryptographic | ||
nonce metadata</span> to the current state of the <{link}> element's <{link/nonce}> content attribute. | ||
7. <a>Fetch</a> <var>request</var>. | ||
|
||
User agents may opt to only try to obtain such resources when they are needed, instead of | ||
pro-actively fetching all the external resources that are not applied. | ||
|
@@ -667,6 +675,7 @@ | |
<dfn attribute for="HTMLLinkElement"><code>rel</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>rev</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>media</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>nonce</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>hreflang</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>type</code></dfn>, and | ||
<dfn attribute for="HTMLLinkElement"><code>sizes</code></dfn> each must <a>reflect</a> the | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two indices in the WHATWG spec: one for attribute -> element, and one for the inverse. I don't know if the W3C doc follows that model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, found it and added, thanks