performance.rs 317 B

123456789101112131415
  1. use wasm_bindgen::prelude::*;
  2. use wasm_bindgen_test::*;
  3. use web_sys::Performance;
  4. #[wasm_bindgen]
  5. extern "C" {
  6. #[wasm_bindgen(js_name = performance)]
  7. static PERFORMANCE: Performance;
  8. }
  9. #[wasm_bindgen_test]
  10. fn to_json() {
  11. let perf = JsValue::from(PERFORMANCE.to_json());
  12. assert!(perf.is_object());
  13. }