feat(webidl): expose arraybuffer overload in body idl

This commit is contained in:
OJ Kwon 2018-03-23 12:11:41 -07:00
parent 72f326b22b
commit c0b5eeef57
No known key found for this signature in database
GPG key ID: FFCFEF3460FD1901
4 changed files with 15 additions and 2 deletions

View file

@ -611,6 +611,12 @@ impl RequestMethods for Request {
fn Json(&self) -> Rc<Promise> {
consume_body(self, BodyType::Json)
}
#[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-arraybuffer
fn ArrayBuffer(&self) -> Rc<Promise> {
consume_body(self, BodyType::ArrayBuffer)
}
}
impl BodyOperations for Request {