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 RequestMode { "same-origin", "no-cors", "cors" }; | 9 enum RequestMode { "same-origin", "no-cors", "cors" }; |
10 enum RequestCredentials { "omit", "same-origin", "include" }; | 10 enum RequestCredentials { "omit", "same-origin", "include" }; |
11 enum RequestContext { "", "audio", "beacon", "cspreport", "download", "embed", " eventsource", "favicon", | |
jsbell
2015/04/06 17:04:15
Put this above RequestMode to match the spec order
shiva.jm
2015/04/09 09:16:22
Done.
| |
12 "fetch", "font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "i mport", "internal", | |
jsbell
2015/04/06 17:04:15
Can you indent these continuation lines?
Maybe tr
shiva.jm
2015/04/09 09:16:22
Done.
| |
13 "location", "manifest", "metarefresh", "object", "ping", "plugin", "prefetch", " script", "serviceworker", | |
14 "sharedworker", "subresource", "style", "track", "video", "worker", "xmlhttprequ est", "xslt" }; | |
11 | 15 |
12 [ | 16 [ |
13 Constructor(RequestInfo input, optional Dictionary requestInitDict), | 17 Constructor(RequestInfo input, optional Dictionary requestInitDict), |
14 ConstructorCallWith=ExecutionContext, | 18 ConstructorCallWith=ExecutionContext, |
15 Exposed(Window GlobalFetch, DedicatedWorker GlobalFetch, SharedWorker Global Fetch, ServiceWorker ServiceWorker), | 19 Exposed(Window GlobalFetch, DedicatedWorker GlobalFetch, SharedWorker Global Fetch, ServiceWorker ServiceWorker), |
16 RaisesException=Constructor, | 20 RaisesException=Constructor, |
17 ActiveDOMObject, | 21 ActiveDOMObject, |
18 GarbageCollected, | 22 GarbageCollected, |
19 TypeChecking=Interface, | 23 TypeChecking=Interface, |
20 ] interface Request { | 24 ] interface Request { |
21 readonly attribute ByteString method; | 25 readonly attribute ByteString method; |
22 readonly attribute USVString url; | 26 readonly attribute USVString url; |
23 readonly attribute Headers headers; | 27 readonly attribute Headers headers; |
24 | 28 |
25 readonly attribute DOMString referrer; | 29 readonly attribute DOMString referrer; |
26 readonly attribute RequestMode mode; | 30 readonly attribute RequestMode mode; |
27 readonly attribute RequestCredentials credentials; | 31 readonly attribute RequestCredentials credentials; |
28 | 32 |
29 [RaisesException] Request clone(); | 33 [RaisesException] Request clone(); |
30 | 34 |
31 // FIXME: Move this attribute into Body when the extended-attribute | 35 // FIXME: Move this attribute into Body when the extended-attribute |
32 // is removed. | 36 // is removed. |
33 [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream bo dy; | 37 [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream bo dy; |
34 | 38 |
35 // FIXME: Implement the following: | 39 readonly attribute RequestContext context; |
jsbell
2015/04/06 17:04:15
Move above referrer to match the attribute order i
shiva.jm
2015/04/09 09:16:22
Done.
| |
36 // readonly attribute RequestContext context; | |
37 }; | 40 }; |
38 | 41 |
39 Request implements Body; | 42 Request implements Body; |
OLD | NEW |