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 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#re
sponse-objects |
| 6 // FIXME: Split this idl/impl into AbstractResponse and Response. |
5 [ | 7 [ |
6 Constructor(optional Dictionary responseInitDict), | 8 Constructor(optional Dictionary responseInitDict), |
7 RuntimeEnabled=ServiceWorker, | 9 RuntimeEnabled=ServiceWorker, |
8 Exposed=ServiceWorker | 10 Exposed=ServiceWorker |
9 ] interface Response { | 11 ] interface Response { |
10 attribute unsigned short statusCode; | 12 readonly attribute unsigned short status; |
11 | 13 |
12 // FIXME: Spec uses ByteString for these. We must perform the DOMString -> B
yteString conversion manually (crbug.com/347426). | 14 // FIXME: Spec uses ByteString for this. We must perform the DOMString -> By
teString conversion manually (crbug.com/347426). |
13 attribute DOMString statusText; | 15 readonly attribute DOMString statusText; |
14 attribute DOMString method; | |
15 | 16 |
16 // FIXME: Implement HeaderMap which uses the MapClass WebIDL attribute (crbu
g.com/347435). | 17 readonly attribute HeaderMap headers; |
17 // FIXME: Can't return Dictionaries yet (crbug.com/364025). | |
18 // getter Dictionary headers(); | |
19 setter void headers(Dictionary items); | |
20 | 18 |
21 // FIXME: Implement the following: | 19 // FIXME: Implement the following: |
22 // attribute DOMString url; | 20 // attribute DOMString url; |
23 // Promise<Blob> toBlob(); | 21 // Promise<Blob> toBlob(); |
24 }; | 22 }; |
OLD | NEW |