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