Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the integration with HTML and Fetch. #75

Merged
merged 1 commit into from
Jul 20, 2021
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
30 changes: 4 additions & 26 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ Valid `Sec-Fetch-Dest` values include "`audio`", "`audioworklet`", "`document`",
"`report`", "`script`", "`serviceworker`", "`sharedworker`", "`style`", "`track`", "`video`",
"`worker`", "`xslt`".

ISSUE(whatwg/fetch#948): `frame` and `iframe` haven't landed in Fetch yet.

In order to support forward-compatibility with as-yet-unknown request types, servers SHOULD ignore
this header if it contains an invalid value.

Expand Down Expand Up @@ -284,27 +282,11 @@ To <dfn abstract-op lt="set-user">set the `Sec-Fetch-User` header</dfn> for a [=
Integration with Fetch and HTML {#fetch-integration}
===========================================

To support `Sec-Fetch-User`, [=request=] needs to be taught about requests which were
triggered by user activation:

> <strong>Monkeypatching [[FETCH]]:</strong>
>
> A [=request=] has a boolean <dfn for="request">user activation</dfn>. Unless stated
> otherwise, it is `false`.
>
> Note: This is only used for [=navigation requests=].

ISSUE(whatwg/fetch#993): This should be defined in Fetch.
To support `Sec-Fetch-User`, [=request=] has a [=request/user-activation=] which is false,
unless otherwise populated by HTML's [=process a navigate fetch=] algorithm.

This flag could be populated from HTML's [=process a navigate fetch=] algorithm, perhaps by
inserting the following step after the current algorithm's step 2:

> <strong>Monkeypatching [[HTML]]:</strong>
>
> 3. If <var ignore>sourceBrowsingContext</var>'s {{WindowProxy}}'s `[[Window]]` value has
> [=transient activation=], then set <var ignore>request</var>'s [=request/user activation=] to true.

ISSUE(whatwg/html#5203): This should be defined in HTML.
Fetch Metadata headers are appended to outgoing requests from within Fetch's "HTTP-network-or-cache"
algorithm, using the following steps. Consult that specification for integration details [[!FETCH]].

<div algorithm="append fetch metadata headers">
To <dfn abstract-op export>append the Fetch metadata headers for a request</dfn>, given [=request=] |r|:
Expand All @@ -322,10 +304,6 @@ To <dfn abstract-op export>append the Fetch metadata headers for a request</dfn>
</ol>
</div>

Fetch will call into the algorithm above from within its "HTTP-network-or-cache fetch" algorithm.
Please consult that specification for integration details [[!FETCH]].

ISSUE(whatwg/fetch#993): This should be called from in Fetch.

Security and Privacy Considerations {#sec-priv-considerations}
==============================================================
Expand Down