Add WebIDL support for the object type

This maps to the `Object` type in the `js_sys` crate.
This commit is contained in:
Alex Crichton
2018-08-04 15:05:31 -07:00
parent 654bb9b683
commit 90579416cf
6 changed files with 59 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use web_sys::Performance;
#[wasm_bindgen]
extern {
#[wasm_bindgen(js_name = performance)]
static PERFORMANCE: Performance;
}
#[wasm_bindgen_test]
fn to_json() {
let perf = JsValue::from(PERFORMANCE.to_json());
assert!(perf.is_object());
}