()
| 12747 | static redirect(url, status = 302) { |
| 12748 | webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); |
| 12749 | url = webidl.converters.USVString(url); |
| 12750 | status = webidl.converters["unsigned short"](status); |
| 12751 | let parsedURL; |
| 12752 | try { |
| 12753 | parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); |
| 12754 | } catch (err) { |
| 12755 | throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); |
| 12756 | } |
| 12757 | if (!redirectStatusSet.has(status)) { |
| 12758 | throw new RangeError(`Invalid status code ${status}`); |
| 12759 | } |
| 12760 | const responseObject = fromInnerResponse(makeResponse({}), "immutable"); |
| 12761 | responseObject[kState].status = status; |
nothing calls this directly
no test coverage detected