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 | 11 |
12 [ | 12 [ |
13 Constructor(RequestInfo input, optional Dictionary requestInitDict), | 13 Constructor(RequestInfo input, optional Dictionary requestInitDict), |
14 ConstructorCallWith=ExecutionContext, | 14 ConstructorCallWith=ExecutionContext, |
15 RuntimeEnabled=ServiceWorker, | 15 Exposed(Window GlobalFetch, DedicatedWorker GlobalFetch, SharedWorker Global
Fetch, ServiceWorker ServiceWorker), |
16 Exposed=ServiceWorker, | |
17 RaisesException=Constructor, | 16 RaisesException=Constructor, |
18 ActiveDOMObject, | 17 ActiveDOMObject, |
19 GarbageCollected, | 18 GarbageCollected, |
20 TypeChecking=Interface, | 19 TypeChecking=Interface, |
21 ] interface Request { | 20 ] interface Request { |
22 readonly attribute ByteString method; | 21 readonly attribute ByteString method; |
23 readonly attribute USVString url; | 22 readonly attribute USVString url; |
24 readonly attribute Headers headers; | 23 readonly attribute Headers headers; |
25 | 24 |
26 readonly attribute DOMString referrer; | 25 readonly attribute DOMString referrer; |
27 readonly attribute RequestMode mode; | 26 readonly attribute RequestMode mode; |
28 readonly attribute RequestCredentials credentials; | 27 readonly attribute RequestCredentials credentials; |
29 | 28 |
30 [RaisesException] Request clone(); | 29 [RaisesException] Request clone(); |
31 | 30 |
32 // FIXME: Implement the following: | 31 // FIXME: Implement the following: |
33 // readonly attribute RequestContext context; | 32 // readonly attribute RequestContext context; |
34 }; | 33 }; |
35 | 34 |
36 Request implements Body; | 35 Request implements Body; |
OLD | NEW |