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

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

Issue 373613004: [ServiceWorker] Make Response class better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « Source/modules/serviceworkers/Response.cpp ('k') | Source/modules/serviceworkers/ResponseInit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Response.idl
diff --git a/Source/modules/serviceworkers/Response.idl b/Source/modules/serviceworkers/Response.idl
index fb8ecf3436918dddc2bce85145b54cf91052b59a..518c65ce2fe9b4ed993034556fe911c57d656eb1 100644
--- a/Source/modules/serviceworkers/Response.idl
+++ b/Source/modules/serviceworkers/Response.idl
@@ -3,18 +3,22 @@
// found in the LICENSE file.
// http://fetch.spec.whatwg.org/#response-class
-// FIXME: Split this idl/impl into AbstractResponse and Response.
+
+enum ResponseType { "basic", "cors", "default", "error", "opaque" };
+
[
- // FIXME: Add ctors for String, Stream, and ArrayBuffer/ArrayBufferView response bodies.
+ // FIXME: Add ctors for ArrayBuffer, ArrayBufferView, FormData,
+ // ScalarValueString and URLSearchParams response bodies.
Constructor(Blob body, optional Dictionary responseInitDict),
RuntimeEnabled=ServiceWorker,
- Exposed=ServiceWorker
+ Exposed=ServiceWorker,
+ RaisesException=Constructor
] interface Response {
- attribute unsigned short status;
- attribute ByteString statusText;
- readonly attribute HeaderMap headers;
-
- // FIXME: Implement the following:
- // attribute DOMString url;
- // Promise<Blob> toBlob();
+ // FIXME: Implement redirect().
+ readonly attribute ResponseType type;
+ readonly attribute ScalarValueString url;
+ readonly attribute unsigned short status;
+ readonly attribute ByteString statusText;
+ readonly attribute Headers headers;
+ // FIXME: Implement FetchBodyStream body;
};
« no previous file with comments | « Source/modules/serviceworkers/Response.cpp ('k') | Source/modules/serviceworkers/ResponseInit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698