mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 09:41:33 +00:00
Implement WebIDL callback interfaces
This commit implements callback interfaces for WebIDL, the final WebIDL construct that we were unconditionally ignoring! Callback interfaces are implemented as dictionaries of callbacks. Single-operation callback interfaces are also expanded when flattening to accept a `Function` as well, in accordance with the WebIDL spec. New features have been added to `web-sys` for all the new callback interface types. Additionally the `EventTarget.webidl` was tweaked to not have `EventListener?` as this is required for all functional usage and there's no need to keep that sort of web browser compat here. Closes #258
This commit is contained in:
4
crates/webidl-tests/callbacks.js
Normal file
4
crates/webidl-tests/callbacks.js
Normal file
@ -0,0 +1,4 @@
|
||||
global.TakeCallbackInterface = class {
|
||||
a() {}
|
||||
b() {}
|
||||
};
|
Reference in New Issue
Block a user