mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-20 00:27:26 +03:00
90579416cf
This maps to the `Object` type in the `js_sys` crate.
16 lines
313 B
Rust
16 lines
313 B
Rust
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());
|
|
}
|