summaryrefslogtreecommitdiffstats
path: root/dom/webidl/Request.webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webidl/Request.webidl')
-rw-r--r--dom/webidl/Request.webidl23
1 files changed, 19 insertions, 4 deletions
diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl
index 54e4e5ec95..2480d2b39a 100644
--- a/dom/webidl/Request.webidl
+++ b/dom/webidl/Request.webidl
@@ -7,20 +7,25 @@
* https://fetch.spec.whatwg.org/#request-class
*/
-typedef (Request or USVString) RequestInfo;
+typedef (Request or UTF8String) RequestInfo;
typedef unsigned long nsContentPolicyType;
[Exposed=(Window,Worker)]
interface Request {
+ /**
+ * Note that Requests created from system principal (ie "privileged"/chrome)
+ * code will default to omitting credentials. You can override this behaviour
+ * using the ``credentials`` member on the ``init`` dictionary.
+ */
[Throws]
constructor(RequestInfo input, optional RequestInit init = {});
readonly attribute ByteString method;
- readonly attribute USVString url;
+ readonly attribute UTF8String url;
[SameObject, BinaryName="headers_"] readonly attribute Headers headers;
readonly attribute RequestDestination destination;
- readonly attribute USVString referrer;
+ readonly attribute UTF8String referrer;
[BinaryName="referrerPolicy_"]
readonly attribute ReferrerPolicy referrerPolicy;
readonly attribute RequestMode mode;
@@ -29,6 +34,9 @@ interface Request {
readonly attribute RequestRedirect redirect;
readonly attribute DOMString integrity;
+ [Pref="dom.fetchKeepalive.enabled"]
+ readonly attribute boolean keepalive;
+
// If a main-thread fetch() promise rejects, the error passed will be a
// nsresult code.
[ChromeOnly]
@@ -51,14 +59,21 @@ dictionary RequestInit {
ByteString method;
HeadersInit headers;
BodyInit? body;
- USVString referrer;
+ UTF8String referrer;
ReferrerPolicy referrerPolicy;
RequestMode mode;
+ /**
+ * If not set, defaults to "same-origin", except for system principal (chrome)
+ * requests where the default is "omit".
+ */
RequestCredentials credentials;
RequestCache cache;
RequestRedirect redirect;
DOMString integrity;
+ [Pref="dom.fetchKeepalive.enabled"]
+ boolean keepalive;
+
[ChromeOnly]
boolean mozErrors;