mirror of
https://github.com/denoland/deno.git
synced 2025-09-30 14:11:14 +00:00
chore: align fetch to spec (#10203)
This commit aligns the `fetch` API and the `Request` / `Response` classes belonging to it to the spec. This commit enables all the relevant `fetch` WPT tests. Spec compliance is now at around 90%. Performance is essentially identical now (within 1% of 1.9.0).
This commit is contained in:
parent
115197ffb0
commit
9e6cd91014
30 changed files with 2235 additions and 1384 deletions
|
@ -2,6 +2,7 @@
|
|||
"use strict";
|
||||
|
||||
((window) => {
|
||||
const webidl = window.__bootstrap.webidl;
|
||||
const { setIsTrusted } = window.__bootstrap.event;
|
||||
|
||||
const add = Symbol("add");
|
||||
|
@ -47,6 +48,7 @@
|
|||
throw new TypeError("Illegal constructor.");
|
||||
}
|
||||
super();
|
||||
this[webidl.brand] = webidl.brand;
|
||||
}
|
||||
|
||||
get aborted() {
|
||||
|
@ -111,6 +113,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
webidl.converters["AbortSignal"] = webidl.createInterfaceConverter(
|
||||
"AbortSignal",
|
||||
AbortSignal,
|
||||
);
|
||||
|
||||
window.AbortSignal = AbortSignal;
|
||||
window.AbortController = AbortController;
|
||||
window.__bootstrap = window.__bootstrap || {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue