Issue #1587 - Part 6: Move FetchController/Signal to its own dir

Since it is specced separately from fetch.
This commit is contained in:
Moonchild 2020-06-11 12:43:17 +00:00 committed by Roy Tam
commit 0c2404efa7
13 changed files with 41 additions and 7 deletions

View file

@ -1,27 +0,0 @@
function testWorkerAbortedFetch() {
var fc = new FetchController();
fc.abort();
fetch('slow.sjs', { signal: fc.signal }).then(() => {
postMessage(false);
}, e => {
postMessage(e.name == "AbortError");
});
}
function testWorkerFetchAndAbort() {
var fc = new FetchController();
var p = fetch('slow.sjs', { signal: fc.signal });
fc.abort();
p.then(() => {
postMessage(false);
}, e => {
postMessage(e.name == "AbortError");
});
}
onmessage = function(e) {
self[e.data]();
}