In addition to these potential problems, there are some browser-specific behaviors which can throw a TypeError. If response is a network error, then reject p with a TypeError and terminate these substeps. To process response for response, run these substeps:ģ. If parsedURL is failure, then throw a TypeError. The static redirect(url, status) method steps are:Ģ. If init is a null body status, then throw a TypeError. If init does not match the reason-phrase token production, then throw a TypeError.ġ. The new Response(body, init) constructor steps are:Ģ. If this is disturbed or locked, then throw a TypeError.If inputBody is body and input is disturbed or locked, then throw a TypeError. If this’s request’s mode is neither "same-origin" nor "cors", then throw a TypeError.ģ9. If body is non-null and body's source is null, then:ġ. If either init exists and is non-null or inputBody is non-null, and request’s method is GET or HEAD, then throw a TypeError.ģ8. If this’s request’s method is not a CORS-safelisted method, then throw a TypeError.ģ5. If this’s request’s mode is "no-cors", then:ġ. If method is not a method or method is a forbidden method, then throw a TypeError.ģ2. If request's cache mode is "only-if-cached" and request's mode is not "same-origin" then throw a TypeError.Ģ. If mode is "navigate", then throw a TypeError.Ģ3. If parsedReferrer is failure, then throw a TypeError.ġ8. Let parsedReferrer be the result of parsing referrer with baseURL.Ģ. If referrer is the empty string, then set request’s referrer to "no-referrer".ġ. If init exists and is non-null, then throw a TypeError.Ģ. IF parsedURL includes credentials, then throw a TypeError.ġ1. If parsedURL is a failure, then throw a TypeError.ģ. The new Request(input, init) constructor steps are:Ģ. In the section "Request Class" the new Request(input, init) constructor is a minefield of potential TypeErrors: I haven't listed them here because it would make this answer very long. In the section "Body mixin" if you are using FormData there are several ways to throw a TypeError. If object is disturbed or locked, then throw a TypeError. If keepalive is true, then throw a TypeError. To extract a body and a Content-Type value from object, with an optional boolean keepalive (default false), run these steps: Return the result of getting name from this’s header list.If this’s guard is "immutable", then throw a TypeError.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |