Issue #1587 - Part 7: Rename FetchController to AbortController

Also renames FetchSignal to AbortSignal. Includes renaming the various
controlling prefs to enable.
This commit is contained in:
Moonchild 2020-06-11 23:20:52 +00:00 committed by Roy Tam
commit b988c351ff
21 changed files with 142 additions and 142 deletions

View file

@ -0,0 +1,27 @@
function testWorkerAbortedFetch() {
var fc = new AbortController();
fc.abort();
fetch('slow.sjs', { signal: fc.signal }).then(() => {
postMessage(false);
}, e => {
postMessage(e.name == "AbortError");
});
}
function testWorkerFetchAndAbort() {
var fc = new AbortController();
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]();
}