wasm-bindgen
wasm-bindgen copied to clipboard
Catch syntax errors in constructors of `js_sys::Function`
This is a potential solution to issue #2496.
The constructors new_with_args and new_no_args will catch exceptions that are caused by syntax errors or similar problem.
This change would require to add an explicit unwrap in all places where the constructors are already used.
Thanks! Since this is a breaking change it can't land yet, but I'll tag it.
@alexcrichton are there any plans to merge it one day? Or at least we can add another constructor next to existing one?
As mentioned this is a breaking change, and no there is no plans of when a breaking change will land. Adding new constructors is fine.