mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 08:41:35 +00:00
[WIP] Add support for unstable WebIDL (#1997)
* Re-enable WebGPU WebIDL as experimental * Add `web_sys_unstable_apis` attribute * Add test for unstable WebIDL * Include unstable WebIDL in docs.rs builds * Add docs and doc comment for unstable APIs * Add unstable API checks to CI
This commit is contained in:
17
crates/webidl-tests/unstable.rs
Normal file
17
crates/webidl-tests/unstable.rs
Normal file
@ -0,0 +1,17 @@
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/unstable.rs"));
|
||||
|
||||
#[cfg(web_sys_unstable_apis)]
|
||||
#[wasm_bindgen_test]
|
||||
fn can_use_unstable_apis() {
|
||||
let unstable_interface = GetUnstableInterface::get();
|
||||
assert_eq!(0u32, unstable_interface.enum_value());
|
||||
|
||||
let mut dict = UnstableDictionary::new();
|
||||
dict.unstable_enum(UnstableEnum::B);
|
||||
assert_eq!(
|
||||
2u32,
|
||||
unstable_interface.enum_value_with_unstable_dictionary(&dict)
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user