Closed cecton closed 2 years ago
Note that this will probably increase the file size, because it has to generate an extra JS wrapper for AddEventListenerOptions
(which is completely avoided with the inline_js
functions). It will also slightly hurt performance, since Reflect::set
is pretty slow, and it's sending uninterned strings across the Rust<->JS boundary.
I'm not against this, though I think using gloo-events would be even nicer, since then the code can be shared with other libraries that also use gloo-events. But that has some costs of its own, since it means the events have to be wrapped in ManuallyDrop
...
Related to #68