diff --git a/fetch.bs b/fetch.bs index 552e548a6..2f5359381 100644 --- a/fetch.bs +++ b/fetch.bs @@ -4777,21 +4777,20 @@ objects.
If name is not a name or value is not a value, then throw a {{TypeError}}. -
If headers's guard is "immutable
", then
+ throw a {{TypeError}}.
-
Otherwise, if guard is
- "request
" and name is a forbidden header name,
- return.
+
Otherwise, if headers's guard is "request
" and
+ name is a forbidden header name, return.
-
Otherwise, if guard is "request-no-cors
" and
- name/value is not a no-CORS-safelisted request-header, then return.
+
Otherwise, if headers's guard is
+ "request-no-cors
" and name/value is not a
+ no-CORS-safelisted request-header, return.
-
Otherwise, if guard is
- "response
" and name is a
- forbidden response-header name, return.
+
Otherwise, if headers's guard is "response
" and
+ name is a forbidden response-header name, return.
-
Append - name/value to +
Append name/value to headers's header list.
If headers's guard is "request-no-cors
", then
@@ -4844,14 +4843,14 @@ constructor, when invoked, must run these steps:
Let headers be a new {{Headers}} object whose
guard is "none
".
-
If init is given, fill headers with +
If init is given, then fill headers with init.
Return headers.
The append(name, value)
-method, when invoked, must append name/value to
+method, when invoked, must append name/value to the
context object.
The delete(name)
@@ -4860,34 +4859,34 @@ method, when invoked, must run these steps:
If the context object's guard is "immutable
", then
+ throw a {{TypeError}}.
-
Otherwise, if guard is
- "request
" and name is a forbidden header name,
- return.
+
Otherwise, if the context object's guard is "request
"
+ and name is a forbidden header name, return.
Otherwise, if guard is "request-no-cors
",
- name/`invalid
` is not a no-CORS-safelisted request-header, and
- name is not a privileged no-cors request-header name, then return.
+
Otherwise, if the context object's guard is
+ "request-no-cors
", name/`invalid
` is not a
+ no-CORS-safelisted request-header, and name is not a
+ privileged no-cors request-header name, return.
`invalid
` is used because
delete()
is not passed a value as argument.
-
Otherwise, if guard is
- "response
" and name is a
- forbidden response-header name, return.
+
Otherwise, if the context object's guard is
+ "response
" and name is a forbidden response-header name, return.
-
If header list does not contain name, - then return. +
If the context object's header list does not + contain name, then return. -
Delete name from +
Delete name from the context object's header list. -
If guard is "request-no-cors
", then
- remove privileged no-cors request headers from the context object.
+
If the context object's guard is "request-no-cors
",
+ then remove privileged no-cors request headers from the context object.
The get(name)
method, when
@@ -4896,11 +4895,11 @@ invoked, must run these steps:
If header list does not contain name, - then return null. +
If the context object's header list + does not contain name, then return null. -
Return the combined value given - name and header list. +
Return the combined value given name and the + context object's header list.
The has(name)
method,
@@ -4909,8 +4908,8 @@ when invoked, must run these steps:
Return true if header list contains - name, and false otherwise. +
Return true if the context object's header list + contains name, and false otherwise.
The @@ -4923,29 +4922,29 @@ method, when invoked, must run these steps:
If name is not a name or value is not a value, then throw a {{TypeError}}. -
If the context object's guard is "immutable
", then
+ throw a {{TypeError}}.
-
Otherwise, if guard is
- "request
" and name is a forbidden header name,
- return.
+
Otherwise, if the context object's guard is "request
"
+ and name is a forbidden header name, return.
-
Otherwise, if guard is "request-no-cors
" and
- name/value is not a no-CORS-safelisted request-header, then return.
+
Otherwise, if the context object's guard is
+ "request-no-cors
" and name/value is not a
+ no-CORS-safelisted request-header, return.
-
Otherwise, if guard is
- "response
" and name is a
- forbidden response-header name, return.
+
Otherwise, if the context object's guard is
+ "response
" and name is a forbidden response-header name, return.
-
Set - name/value in +
Set name/value in the context object's header list. -
If guard is "request-no-cors
", then
- remove privileged no-cors request headers from the context object.
+
If the context object's guard is "request-no-cors
",
+ then remove privileged no-cors request headers from the context object.
The value pairs to iterate over are the return value of running -sort and combine with the header list. +sort and combine with the context object's +header list.
Return r. -
The method
attribute's getter must
-return request's
-method.
+
The method
attribute's getter, when invoked, must
+return the context object's request's method.
-
The url
attribute's getter must
-return request's URL, serialized.
+
The url
attribute's getter, when invoked, must
+return the context object's request's URL,
+serialized.
-
The headers
attribute's getter must return the
-associated headers.
+
The headers
attribute's getter, when invoked, must
+return the context object's headers.
-
The destination
attribute's
-getter must return request's
-destination.
+
The destination
attribute's getter, when invoked,
+must return the context object's request's destination.
-
The referrer
attribute's getter must
-return the empty string if request's
-referrer is "no-referrer
",
-"about:client
" if request's
-referrer is "client
", and
-request's
-referrer,
-serialized, otherwise.
+
The referrer
attribute's getter, when invoked, must
+return the empty string if the context object's request's
+referrer is "no-referrer
", "about:client
" if the
+context object's request's referrer is
+"client
", and the context object's request's
+referrer, serialized, otherwise.
-
The referrerPolicy
attribute's
-getter must return request's
+
The referrerPolicy
attribute's getter, when
+invoked, must return the context object's request's
referrer policy.
-
The mode
attribute's getter must return
-request's mode.
+
The mode
attribute's getter, when invoked, must
+return the context object's request's mode.
-
The credentials
attribute's
-getter must return request's
+
The credentials
attribute's getter, when invoked,
+must return the context object's request's
credentials mode.
-
The cache
attribute's getter must
-return request's
-cache mode.
+
The cache
attribute's getter, when invoked, must
+return the context object's request's cache mode.
-
The redirect
attribute's getter must
-return request's
-redirect mode.
+
The redirect
attribute's getter, when invoked, must
+return the context object's request's redirect mode.
-
The integrity
attribute's getter
-must return request's
+
The integrity
attribute's getter, when invoked,
+must return the context object's request's
integrity metadata.
-
The keepalive
attribute's getter
-must return true if request's keepalive flag
+
The keepalive
attribute's getter, when invoked,
+must return true if the context object's request's keepalive flag
is set, and false otherwise.
The isReloadNavigation
attribute's getter, when
@@ -5839,8 +5833,8 @@ invoked, must return true if the context object's request<
invoked, must return true if the context object's request's
history-navigation flag is set, and false otherwise.
-
The signal
attribute's getter must return the
-associated signal.
+
The signal
attribute's getter, when invoked, must
+return the context object's signal.
If the context object is disturbed or locked, then throw a {{TypeError}}.
Let clonedRequestObject be a new {{Request}} object. -
Let clonedRequest be the result of cloning +
Let clonedRequest be the result of cloning the context object's request.
Set clonedRequestObject's request to clonedRequest. @@ -5867,12 +5861,12 @@ run these steps:
Make clonedRequestObject's signal - follow context object's signal. + follow the context object's signal.
Return clonedRequestObject.
Return r. -
The type
attribute's getter must return
-response's
-type.
+
The type
attribute's getter, when invoked, must
+return the context object's response's type.
-
The url
attribute's getter must return
-the empty string if response's URL is null and
-response's URL, serialized with
-the exclude-fragment flag set, otherwise.
-[[!URL]]
+
The url
attribute's getter, when invoked, must
+return the empty string if the context object's response's
+URL is null and the context object's response's
+URL, serialized with the exclude-fragment flag
+set, otherwise. [[!URL]]
-
The redirected
attribute's getter must return true
-if response's URL list has more than one item, and false
-otherwise.
+
The redirected
attribute's getter, when invoked,
+must return true if the context object's response's
+URL list has more than one item, and false otherwise.
To filter out responses that are the result of a
redirect, do this directly through the API, e.g., fetch(url, { redirect:"error" })
.
This way a potentially unsafe response cannot accidentally leak.
-
The status
attribute's getter must
-return response's
-status.
+
The status
attribute's getter, when invoked, must
+return the context object's response's status.
-
The ok
attribute's getter must
-return true if response's
-status is an ok status, and false otherwise.
+
The ok
attribute's getter, when invoked, must
+return true if the context object's response's status
+is an ok status, and false otherwise.
-
The statusText
attribute's getter
-must return response's
+
The statusText
attribute's getter, when invoked,
+must return the context object's response's
status message.
-
The headers
attribute's getter must
-return the associated {{Headers}} object.
+
The headers
attribute's getter, when invoked, must
+return the context object's headers.
-
The trailer
attribute's getter must return the
-associated trailer promise.
+
The trailer
attribute's getter, when invoked, must
+return the context object's trailer promise.
If context object is disturbed or locked, then +
If the context object is disturbed or locked, then throw a {{TypeError}}.
Let clonedResponseObject be a new {{Response}} object. -
Let clonedResponse be the result of cloning +
Let clonedResponse be the result of cloning the context object's response.
Set clonedResponseObject's response to @@ -6091,7 +6083,7 @@ run these steps: header list, and guard is the context object's headers's guard. -
Upon fulfillment of context object's trailer promise, resolve +
Upon fulfillment of the context object's trailer promise, resolve
clonedResponseObject's trailer promise with a new {{Headers}} object
whose guard is "immutable
", and whose
header list is clonedResponse's trailer.
@@ -6118,7 +6110,7 @@ method, must run these steps:
Let requestObject be the result of invoking the initial value of {{Request}} as constructor with input and init as arguments. If this throws an exception, - reject p with it and return p + reject p with it and return p.
Let request be requestObject's request.