(reason)
| 12877 | initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); |
| 12878 | return responseObject; |
| 12879 | } |
| 12880 | // Creates a redirect Response that redirects to url with status status. |
| 12881 | static redirect(url, status = 302) { |
| 12882 | webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); |
| 12883 | url = webidl.converters.USVString(url); |
| 12884 | status = webidl.converters["unsigned short"](status); |
| 12885 | let parsedURL; |
| 12886 | try { |
| 12887 | parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); |
| 12888 | } catch (err) { |
| 12889 | throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); |
| 12890 | } |
no test coverage detected