`addEventListener('fetch', event => {
event.respondWith(fetch(event.request));
});`
fetch.spec.whatwg.org/#fetch-method
(see step 2)
Priority isn't publicly available.
TL;DR: both the HTML and H/2 specs are bullheadedly promulgating their "one true way" to do priorities and they're both MORONIC.
Earlier drafts used integer priorities (in a small range, IIRC). The final version, in contrast, assumes the client knows a LOT about outbound requests.
LAWLZ.
H/2 priorities are a practical joke as far as I can tell.
I presume @mnot is getting the last laugh.
1.) HTML has serially failed to define a meaningful priority scheme (yes, I'm grumpy about it)
2.) H/2 priorities aren't passed because it's "magic" info as a result
3.) fetch() is in the XHR slow bucket 😥
But the problem isn't the implementation. It's harder and worse than that. It's a fundamental lack of respect for web developers.
cs.chromium.org/chromium/src/t…