fix(fetch): make prototype properties writable (#10769)

This commit is contained in:
Luca Casonato 2021-05-26 23:44:42 +02:00 committed by GitHub
parent e5beb800c9
commit d5d59bb794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 23 deletions

View file

@ -403,6 +403,28 @@
mixinBody(Request, _body, _mimeType);
Object.defineProperty(Request.prototype, "method", {
enumerable: true,
configurable: true,
});
Object.defineProperty(Request.prototype, "url", {
enumerable: true,
configurable: true,
});
Object.defineProperty(Request.prototype, "headers", {
enumerable: true,
configurable: true,
});
Object.defineProperty(Request.prototype, "redirect", {
enumerable: true,
configurable: true,
});
Object.defineProperty(Request.prototype, "clone", {
enumerable: true,
writable: true,
configurable: true,
});
webidl.converters["Request"] = webidl.createInterfaceConverter(
"Request",
Request,