Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: Source/modules/serviceworkers/Request.idl

Issue 329853012: [ServiceWorker] Make Request class better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Copy headers in FetchRequestData::createRestrictedCopy(). Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/Request.idl
diff --git a/Source/modules/serviceworkers/Request.idl b/Source/modules/serviceworkers/Request.idl
index aea4e9110a2385b9cd6a6669ed3feb22413af24e..21d8d3516c8c7311878d45d46b6b195906407eb1 100644
--- a/Source/modules/serviceworkers/Request.idl
+++ b/Source/modules/serviceworkers/Request.idl
@@ -3,24 +3,27 @@
// found in the LICENSE file.
// http://fetch.spec.whatwg.org/#request-class
+
+enum RequestMode { "same-origin", "no-cors", "cors" };
+enum RequestCredentials { "omit", "same-origin", "include" };
+
[
- Constructor(optional Dictionary requestInitDict),
+ Constructor(ScalarValueString input, optional Dictionary requestInitDict),
+ Constructor(Request input, optional Dictionary requestInitDict),
+ ConstructorCallWith=ExecutionContext,
RuntimeEnabled=ServiceWorker,
- Exposed=ServiceWorker
+ Exposed=ServiceWorker,
+ RaisesException=Constructor
] interface Request {
- attribute ScalarValueString url;
- attribute ByteString method;
- readonly attribute DOMString origin;
- readonly attribute HeaderMap headers;
+ readonly attribute ByteString method;
+ readonly attribute ScalarValueString url;
+ readonly attribute Headers headers;
+
+ readonly attribute DOMString referrer;
+ readonly attribute RequestMode mode;
+ readonly attribute RequestCredentials credentials;
// FIXME: Implement the following:
- // attribute unsigned long timeout;
- // readonly attribute Mode mode;
- // attribute boolean synchronous;
- // readonly attribute unsigned long redirectCount;
- // attribute boolean forcePreflight;
- // attribute boolean forceSameOrigin;
- // attribute boolean omitCredentials;
- // readonly attribute DOMString referrer;
- // attribute any body;
+ // readonly attribute FetchBodyStream body;
+ // readonly attribute RequestContext context;
};

Powered by Google App Engine
This is Rietveld 408576698