Logo
Explore Help
Sign In
fluencelabs/wasm-bindgen
1
0
Fork 0
You've already forked wasm-bindgen
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-06-17 06:51:24 +00:00
Code Issues Projects Releases Wiki Activity
Files
ae6f4a9c8726c0a3c69b8597a1c4f667fc9f4d25
wasm-bindgen/crates/webidl-tests/no_interface.rs

11 lines
213 B
Rust
Raw Normal View History

Support [NoInterfaceObject] in `web-sys` This commit enables `[NoInterfaceObject]` annotated interfaces in `web-sys`. The `NoInterfaceObject` attribute means that there's not actually a JS class for the object, but all of its properties and such can still be accessed structually and invoked. This should help provide more bindings for some more common types on the web! Note that this builds on recent features to ensure that `dyn_into` and friends always fail for `NoInterfaceObject` objects because they don't actually have a class. Closes #893 Closes #1257 Closes #1315
2019-04-12 11:08:05 -07:00
use wasm_bindgen_test::*;
include!(concat!(env!("OUT_DIR"), "/no_interface.rs"));
#[wasm_bindgen_test]
fn smoke() {
let obj = GetNoInterfaceObject::get();
assert_eq!(obj.number(), 3.0);
obj.foo();
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.0 Page: 424ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API