OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // http://fetch.spec.whatwg.org/#request-class | 5 // http://fetch.spec.whatwg.org/#request-class |
6 | 6 |
7 typedef (Request or USVString) RequestInfo; | 7 typedef (Request or USVString) RequestInfo; |
8 | 8 |
9 enum RequestContext { | |
10 "", "audio", "beacon", "cspreport", "download", "embed", "eventsource", "favic on", | |
hiroshige
2015/04/09 17:43:21
nit: indent with 4 spaces?
shiva.jm
2015/04/10 09:27:10
Done.
| |
11 "fetch", "font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "import", | |
12 "internal", "location", "manifest", "metarefresh", "object", "ping", "plugin", | |
13 "prefetch", "script", "serviceworker", "sharedworker", | |
14 "subresource", "style", "track", "video", "worker", "xmlhttprequest", "xslt" | |
15 }; | |
9 enum RequestMode { "same-origin", "no-cors", "cors" }; | 16 enum RequestMode { "same-origin", "no-cors", "cors" }; |
10 enum RequestCredentials { "omit", "same-origin", "include" }; | 17 enum RequestCredentials { "omit", "same-origin", "include" }; |
11 | 18 |
12 [ | 19 [ |
13 Constructor(RequestInfo input, optional Dictionary requestInitDict), | 20 Constructor(RequestInfo input, optional Dictionary requestInitDict), |
14 ConstructorCallWith=ExecutionContext, | 21 ConstructorCallWith=ExecutionContext, |
15 Exposed(Window GlobalFetch, DedicatedWorker GlobalFetch, SharedWorker Global Fetch, ServiceWorker ServiceWorker), | 22 Exposed(Window GlobalFetch, DedicatedWorker GlobalFetch, SharedWorker Global Fetch, ServiceWorker ServiceWorker), |
16 RaisesException=Constructor, | 23 RaisesException=Constructor, |
17 ActiveDOMObject, | 24 ActiveDOMObject, |
18 GarbageCollected, | 25 GarbageCollected, |
19 TypeChecking=Interface, | 26 TypeChecking=Interface, |
20 ] interface Request { | 27 ] interface Request { |
21 readonly attribute ByteString method; | 28 readonly attribute ByteString method; |
22 readonly attribute USVString url; | 29 readonly attribute USVString url; |
23 readonly attribute Headers headers; | 30 readonly attribute Headers headers; |
24 | 31 readonly attribute RequestContext context; |
25 readonly attribute DOMString referrer; | 32 readonly attribute DOMString referrer; |
26 readonly attribute RequestMode mode; | 33 readonly attribute RequestMode mode; |
27 readonly attribute RequestCredentials credentials; | 34 readonly attribute RequestCredentials credentials; |
28 | 35 |
29 [RaisesException] Request clone(); | 36 [RaisesException] Request clone(); |
30 | 37 |
31 // FIXME: Move this attribute into Body when the extended-attribute | 38 // FIXME: Move this attribute into Body when the extended-attribute |
32 // is removed. | 39 // is removed. |
33 [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream bo dy; | 40 [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream bo dy; |
34 | |
35 // FIXME: Implement the following: | |
36 // readonly attribute RequestContext context; | |
37 }; | 41 }; |
38 | 42 |
39 Request implements Body; | 43 Request implements Body; |
OLD | NEW |