mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-18 15:31:25 +00:00
Implement support for WebIDL Callback
types
This commit adds support for the WebIDL `Callback` type by translating all callbacks to the `js_sys::Function` type. This will enable passing raw JS values into callbacks as well as Rust valus using the `Closure` type. This commit doesn't currently implement "callback interfaces" in WebIDL, that's left for a follow-up commit.
This commit is contained in:
@ -138,7 +138,7 @@ fn builtin_idents() -> BTreeSet<Ident> {
|
||||
vec![
|
||||
"str", "char", "bool", "JsValue", "u8", "i8", "u16", "i16", "u32", "i32", "u64", "i64",
|
||||
"usize", "isize", "f32", "f64", "Result", "String", "Vec", "Option",
|
||||
"ArrayBuffer", "Object", "Promise",
|
||||
"ArrayBuffer", "Object", "Promise", "Function",
|
||||
].into_iter()
|
||||
.map(|id| proc_macro2::Ident::new(id, proc_macro2::Span::call_site())),
|
||||
)
|
||||
|
Reference in New Issue
Block a user