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 551
update the usage of cryptographic nonce metadata #1177
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8752f9b
update nonce usage in fetching resources
siusin 88da74d
update changes
siusin 78f1620
editorial fixes
siusin bd2ece7
Update changes
chaals 2539f2e
fix line breaking
chaals 34ed92b
fix link to term
chaals 00c9a5d
Fix line breaks, editorial typos, ...
chaals 5db65d1
update changes better
chaals 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
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 |
---|---|---|
|
@@ -449,7 +449,9 @@ | |
The <dfn element-attr for="link"><code>media</code></dfn> attribute says which media the resource | ||
applies to. The value must be a <a>valid media query list</a>. | ||
|
||
<!-- def <{link/integrity}> --> | ||
The <dfn element-attr for="link"><code>integrity</code></dfn> attribute represents the <a>integrity metadata</a> | ||
for requests which this element is responsible for. The value is text. The attribute must not be specified on | ||
<{link}> elements that do not have a <{link/rel}> attribute that contains the <{link/stylesheet}> keyword. [[!SRI]] | ||
|
||
The <dfn element-attr for="link"><code>hreflang</code></dfn> attribute on the <{link}> element has | ||
the same semantics as the {{HTMLLinkElement/hreflang}} attribute on the <{a}> element. | ||
|
@@ -516,7 +518,7 @@ | |
The IDL attributes | ||
<dfn attribute for="HTMLLinkElement"><code>href</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>hreflang</code></dfn>, | ||
<!-- <dfn attribute for="HTMLLinkElement"><code>integrity</code></dfn>, --> | ||
<dfn attribute for="HTMLLinkElement"><code>integrity</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>media</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>rel</code></dfn>, | ||
<dfn attribute for="HTMLLinkElement"><code>rev</code></dfn>, | ||
|
@@ -631,26 +633,28 @@ | |
must run the following steps: | ||
|
||
|
||
1. If the <{link/href}> attribute's value is the empty string, then abort these steps. | ||
1. If the <{link/href}> attribute's value is the empty string, then return. | ||
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. note comment below on consistent terminology in algorithms. 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. No need to do anything here. |
||
2. <a>Parse</a> the [=url/URL=] given by the <{link/href}> attribute, relative to the | ||
element's <a>node document</a>. If that fails, then abort these steps. Otherwise, let | ||
element's <a>node document</a>. If that fails, then return. Otherwise, let | ||
<var>url</var> be the <a>resulting URL record</a>. | ||
3. Let <var>corsAttributeState</var> be the current state of the element's <{link/crossorigin}> | ||
content attribute. | ||
4. Let <var>request</var> be the result of <a>creating a potential-CORS request</a> given | ||
<var>url</var> and <var>corsAttributeState</var>. | ||
<var>url</var>, the empty string, 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. Set <var>request</var>'s <a>cryptographic nonce metadata</a> to the | ||
current value of the <{link}> element's | ||
<a href="#cryptographicnonce">[[<span>CryptographicNonce</span>]]</a> internal slot. | ||
7. Set <var>request</var>'s <a>referrer policy</a> to the current state of the | ||
<{link}> element's <{link/referrerpolicy}> content attribute. | ||
8. If the <{link/rel}> attribute contains the <{link/preload}> keyword, then: | ||
7. Set <var>request</var>'s <a>integrity metadata</a> to the current value of | ||
the <{link}> element's <{link/integrity}> content attribute. | ||
8. Set <var>request</var>'s <a>referrer policy</a> to the current state of the | ||
<{link}> element's <{link/referrerpolicy}> attribute. | ||
9. If the <{link/rel}> attribute contains the <{link/preload}> keyword, then: | ||
1. Let <var>as</var> be the current state of the <{link/as}> attribute. | ||
2. If <var>as</var> is no state, then return. | ||
3. Set <var>request</var>'s <a>destination</a> to the result of <a>translating</a> <var>as</var>. | ||
9. <a>Fetch</a> <var>request</var>. | ||
10. <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. | ||
|
@@ -660,17 +664,18 @@ | |
resource to not be applied.) | ||
|
||
Once the attempts to obtain the resource and its <a>critical subresources</a> are complete, the | ||
user agent must, if the loads were successful, <a>queue a task</a> to <a>fire a simple event</a> | ||
user agent must, if the loads were successful, <a>queue a task</a> to <a>fire an event</a> | ||
named <code>load</code> at the <{link}> element, or, if the resource or one of its | ||
<a>critical subresources</a> failed to completely load for any reason (e.g., DNS error, HTTP 404 | ||
response, a connection being prematurely closed, unsupported Content-Type), <a>queue a task</a> | ||
to <a>fire a simple event</a> named <code>error</code> at the <{link}> element. | ||
to <a>fire an event</a> named <code>error</code> at the <{link}> element. | ||
Non-network errors in processing the resource or its subresources (e.g., CSS parse errors, PNG | ||
decoding errors) are not failures for the purposes of this paragraph. | ||
|
||
The <a>task source</a> for these <a>tasks</a> is the <a>DOM manipulation task source</a>. | ||
|
||
The element must <a>delay the load event</a> of the element's <a>node document</a> until all the | ||
Unless otherwise specified for a given <{link/rel}> keyword, the element must | ||
<a>delay the load event</a> of the element's <a>node document</a> until all the | ||
attempts to obtain the resource and its <a>critical subresources</a> are complete. (Resources | ||
that the user agent has not yet attempted to obtain, e.g., because it is waiting for the resource | ||
to be needed, do not <a>delay the load event</a>.) | ||
|
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
Oops, something went wrong.
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.
you also added SRI, right?