-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update 'destination' for navigation requests. #4976
Conversation
source
Outdated
<li><p>If <var>browsingContext</var>'s <span>browsing context container</span> is an | ||
<code>iframe</code> element, set <var>request</var>'s <span | ||
data-x="concept-request-destination">destination</span> to "<code | ||
data-x="">iframe</code>".</p></li> |
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.
What would go wrong if we set it to browsing context container's local name?
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.
That might be an elegant way of replacing all this text with something simpler. Hrm. Assuming portal
does the same thing (which is a reasonable thing to expect), it seems pretty future-proof.
Let me think about it for a minute, but I don't see any obvious reason not to do it this way.
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.
Poked at this in fa00f9a. Thank you for the suggestion.
fa00f9a
to
6c188fb
Compare
Updated this to include minimal |
Pinging this as well, as it should hopefully land alongside whatwg/fetch#948. |
It does seem like this needs rebasing first though. |
Currently, top-level and nested navigations set a request destination of "document" when performing the "process a navigate fetch" algorithm. This patch follows whatwg/fetch#948, splitting "document" into "frame" and "iframe" for nested navigation requests.
6c188fb
to
50ce162
Compare
Rebased and force-pushed in 50ce162. WDYT? |
Although I suppose this will reuse the tests from whatwg/fetch#948, right? |
I think that's correct, yes. |
As discussed in w3c/webappsec-fetch-metadata#45, this splits the "document" destination into "document", "frame", and "iframe". These destinations distinguish top-level navigation from nested navigation, and exposing this data via `Sec-Fetch-Dest` will allow developers to better understand the nature of a request. This patch also redefines "navigation request" and "non-subresource request" to include "embed" and "object" destinations as discussed at #948 (comment). That discussion also resulted in other changes: * whatwg/html#4976 * w3c/ServiceWorker#1486 Tests: * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/embed.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/object.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/iframe.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/navigation.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html
As discussed in w3c/webappsec-fetch-metadata#45, this splits the "document" destination into "document", "frame", and "iframe". These destinations distinguish top-level navigation from nested navigation, and exposing this data via `Sec-Fetch-Dest` will allow developers to better understand the nature of a request. This patch also redefines "navigation request" and "non-subresource request" to include "embed" and "object" destinations as discussed at #948 (comment). That discussion also resulted in other changes: * whatwg/html#4976 * w3c/ServiceWorker#1486 Tests: * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/embed.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/object.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/iframe.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/fetch/metadata/navigation.tentative.https.sub.html * https://github.com/web-platform-tests/wpt/blob/master/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html
Currently, top-level and nested navigations set a request destination of
"document" when performing the "process a navigate fetch" algorithm.
This patch follows whatwg/fetch#948, splitting "document" into "frame"
and "iframe" for nested navigation requests.
This patch aims to support the Fetch Metadata discussion in w3c/webappsec-fetch-metadata#45, and the Fetch patch in whatwg/fetch#948.
Sec-Fetch-Dest
.document
value in https://github.com/web-platform-tests/wpt/tree/master/fetch/sec-metadata (note that this will be renamed to just "metadata" whenever Renaming fetch/metadata web platform tests web-platform-tests/wpt#19501 lands)./browsing-the-web.html ( diff )
/iframe-embed-object.html ( diff )