| 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/#body | 5 // https://fetch.spec.whatwg.org/#body |
| 6 | 6 |
| 7 [ | 7 [ |
| 8 ActiveScriptWrappable, | 8 ActiveScriptWrappable, |
| 9 DependentLifetime, | 9 DependentLifetime, |
| 10 Exposed=ServiceWorker, | 10 Exposed=ServiceWorker, |
| 11 NoInterfaceObject, | 11 NoInterfaceObject, |
| 12 ] interface Body { | 12 ] interface Body { |
| 13 readonly attribute boolean bodyUsed; | 13 readonly attribute boolean bodyUsed; |
| 14 [CallWith=ScriptState] Promise<ArrayBuffer> arrayBuffer(); | 14 [CallWith=ScriptState] Promise<ArrayBuffer> arrayBuffer(); |
| 15 [CallWith=ScriptState] Promise<Blob> blob(); | 15 [CallWith=ScriptState] Promise<Blob> blob(); |
| 16 [CallWith=ScriptState] Promise<JSON> json(); | 16 [CallWith=ScriptState] Promise<JSON> json(); |
| 17 [CallWith=ScriptState] Promise<USVString> text(); | 17 [CallWith=ScriptState] Promise<USVString> text(); |
| 18 | 18 |
| 19 // body attribute is defined in sub-interfaces, because the IDL processor | 19 // body attribute is defined in sub-interfaces, because the IDL processor |
| 20 // cannot deal with attribute inheritance with runtime enabled flag. | 20 // cannot deal with attribute inheritance with runtime enabled flag. |
| 21 // [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream
body; | 21 // [RuntimeEnabled=ExperimentalStream] readonly attribute ReadableByteStream
body; |
| 22 | 22 |
| 23 // Still to be implemented. | 23 // Still to be implemented. |
| 24 // [CallWith=ScriptState] Promise<FormData> formData(); | 24 // [CallWith=ScriptState] Promise<FormData> formData(); |
| 25 }; | 25 }; |
| OLD | NEW |