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

This commit is contained in:
Luca Casonato 2021-05-26 23:44:42 +02:00 committed by Bert Belder
parent 8a19f28a00
commit 379d40955a
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
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,