Add extends attributes for several types

Part of #670
This commit is contained in:
Andrew Chin
2018-08-08 22:49:06 -04:00
parent 505037ffae
commit cc8095d065
14 changed files with 118 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use wasm_bindgen::JsValue;
use wasm_bindgen_test::*;
use wasm_bindgen::JsCast;
use js_sys::*;
#[wasm_bindgen_test]
@ -34,3 +35,10 @@ fn slice_with_end() {
let slice = buf.slice_with_end(1, 2);
assert!(JsValue::from(slice).is_object());
}
#[wasm_bindgen_test]
fn arraybuffer_inheritance() {
let buf = ArrayBuffer::new(4);
assert!(buf.is_instance_of::<ArrayBuffer>());
assert!(buf.is_instance_of::<Object>());
}