| 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 | 5 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#re
sponse-objects |
| 6 // FIXME: Split this idl/impl into AbstractResponse and Response. | 6 // FIXME: Split this idl/impl into AbstractResponse and Response. |
| 7 [ | 7 [ |
| 8 // FIXME: Remove this legacy function after the required Chromium-side patch
lands. |
| 8 Constructor(optional Dictionary responseInitDict), | 9 Constructor(optional Dictionary responseInitDict), |
| 10 // FIXME: Add ctors for String, Stream, and ArrayBuffer/ArrayBufferView resp
onse bodies. |
| 11 Constructor(Blob body, optional Dictionary responseInitDict), |
| 9 RuntimeEnabled=ServiceWorker, | 12 RuntimeEnabled=ServiceWorker, |
| 10 Exposed=ServiceWorker | 13 Exposed=ServiceWorker |
| 11 ] interface Response { | 14 ] interface Response { |
| 12 readonly attribute unsigned short status; | 15 readonly attribute unsigned short status; |
| 13 | 16 |
| 14 // FIXME: Spec uses ByteString for this. We must perform the DOMString -> By
teString conversion manually (crbug.com/347426). | 17 // FIXME: Spec uses ByteString for this. We must perform the DOMString -> By
teString conversion manually (crbug.com/347426). |
| 15 readonly attribute DOMString statusText; | 18 readonly attribute DOMString statusText; |
| 16 | 19 |
| 17 readonly attribute HeaderMap headers; | 20 readonly attribute HeaderMap headers; |
| 18 | 21 |
| 19 // FIXME: Implement the following: | 22 // FIXME: Implement the following: |
| 20 // attribute DOMString url; | 23 // attribute DOMString url; |
| 21 // Promise<Blob> toBlob(); | 24 // Promise<Blob> toBlob(); |
| 22 }; | 25 }; |
| OLD | NEW |