Intent to Implement and Ship: Expose Request.destination

62 views
Skip to first unread message

Yoav Weiss

unread,
Dec 27, 2017, 12:38:29 PM12/27/17
to blink-dev

Contact emails

yo...@yoav.ws, ywe...@akamai.com


Explainer

No specific explainer as this is a small addition to an existing feature.


Spec

https://fetch.spec.whatwg.org/#concept-request-destination


No TAG review required as this is a small addition to an existing feature.


Summary

Expose `Request.destination` to enable Service-Worker code knowledge regarding which type of resource it is fetching.


Link to “Intent to Implement” blink-dev discussion

No previous Intent-to-Implement.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

No demo page as this is a small and simple addition.


Risks

Interoperability and Compatibility

As the feature is already shipped in 2 major browser engines, I don't expect problems with adoption. The implementation is simple enough so I don't expect compatibility issues either, but I'll be more certain on that front once I'll add web-platform-tests that check the actual returned values for various resource destinations.


Edge: Shipped (test results)

Firefox: Under consideration for 2018 planning

Safari: Shipped (test results)

Web developers: There seem to be moderate interest in this bug.


Ergonomics

As this API is simply a return value, I don't predict any particular ergonomics issues.


Activation

No polyfill needed or feasible AFAICT, other than relying on the URL's extension for type heuristics.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Exposure of the attribute is tested with:

https://wpt.fyi/fetch/api/request/request-structure.html

https://wpt.fyi/fetch/api/request/request-idl.html


I plan to add more tests to that test suite regarding the actual values for different resource destinations.


Entry on the feature dashboard

As this is a small change to an existing feature, I don't think an entry on the dashboard is required, but I'm happy to create one if people think it is useful.


Yoav Weiss

unread,
Jan 2, 2018, 4:19:01 AM1/2/18
to blink-dev
WPT test suite PR is at https://github.com/w3c/web-platform-tests/pull/8812
It also exposed an issue with the fact that we fold audio fetches into a video fetch context. I plan to fix that issue at a separate patch at https://chromium-review.googlesource.com/c/chromium/src/+/846983

PhistucK

unread,
Jan 2, 2018, 4:52:13 AM1/2/18
to Yoav Weiss, blink-dev
You should probably create an entry as entries feed beta blog posts and similar.

Thank you!


PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEg24kwcqNY56Lsc854gbCHTZLDoXXO7UE3y8c8JKJu1YQ%40mail.gmail.com.

Yoav Weiss

unread,
Jan 2, 2018, 6:12:46 AM1/2/18
to PhistucK, blink-dev
Very well. Created a feature entry at https://www.chromestatus.com/feature/5629697845100544


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Jochen Eisinger

unread,
Jan 2, 2018, 7:31:41 AM1/2/18
to blink-dev, phis...@gmail.com

lgtm1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Daniel Bratell

unread,
Jan 2, 2018, 8:46:23 AM1/2/18
to blink-dev, Jochen Eisinger, phis...@gmail.com
 I find the nomenclature a bit non-optimal with |initiator| and |destination| being very similar, but that ship sailed I suspect. 

LGTM2

/Daniel

lgtm1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/faf39c70-0cc0-4f0a-85d9-55b43773dac5%40chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Ben Kelly

unread,
Jan 2, 2018, 10:31:18 AM1/2/18
to Yoav Weiss, blink-dev
On Wed, Dec 27, 2017 at 12:38 PM, Yoav Weiss <yo...@yoav.ws> wrote:

Edge: Shipped (test results)

 

https://wpt.fyi/fetch/api/request/request-structure.html

https://wpt.fyi/fetch/api/request/request-idl.html


I plan to add more tests to that test suite regarding the actual values for different resource destinations.


Yea, we need tests that show the value is set correctly on `FetchEvent.request`.  AFAIK the current tests don't do this yet.  I'm curious if edge/webkit already handle that correctly in their pre-release service worker support.

Thanks.

Ben

Yoav Weiss

unread,
Jan 2, 2018, 2:21:03 PM1/2/18
to Ben Kelly, blink-dev
I don't have a copy of Edge, but just tried the tests in https://github.com/w3c/web-platform-tests/pull/8812 on Safari Tech Preview. All of them pass, other than fetch/api/request/destination/fetch-destination-preload-style.https.html which is probably on me to fix there...

Chris Harrelson

unread,
Jan 3, 2018, 7:32:36 PM1/3/18
to Yoav Weiss, Ben Kelly, blink-dev
LGTM3

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEhumXwerh0Ss%3D86ZADFmTQtsJ%2B2xmu6DSaXWEwqhheKiw%40mail.gmail.com.

Yoav Weiss

unread,
Jan 6, 2018, 2:10:54 PM1/6/18
to Chris Harrelson, Ben Kelly, blink-dev
Just landed this turned on by default. WPT test suite landed as well.

Thanks all! :)

On Thu, Jan 4, 2018 at 1:32 AM Chris Harrelson <chri...@chromium.org> wrote:
LGTM3

On Tue, Jan 2, 2018 at 11:20 AM, Yoav Weiss <yo...@yoav.ws> wrote:
I don't have a copy of Edge, but just tried the tests in https://github.com/w3c/web-platform-tests/pull/8812 on Safari Tech Preview. All of them pass, other than fetch/api/request/destination/fetch-destination-preload-style.https.html which is probably on me to fix there...

On Tue, Jan 2, 2018 at 4:31 PM Ben Kelly <bke...@mozilla.com> wrote:
On Wed, Dec 27, 2017 at 12:38 PM, Yoav Weiss <yo...@yoav.ws> wrote:

Edge: Shipped (test results)

 

https://wpt.fyi/fetch/api/request/request-structure.html

https://wpt.fyi/fetch/api/request/request-idl.html


I plan to add more tests to that test suite regarding the actual values for different resource destinations.


Yea, we need tests that show the value is set correctly on `FetchEvent.request`.  AFAIK the current tests don't do this yet.  I'm curious if edge/webkit already handle that correctly in their pre-release service worker support.

Thanks.

Ben

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages