stdweb
stdweb copied to clipboard
How to call element.dispatch_event() ?
The functions' definition is the following:
fn dispatch_event<T: IEvent>(&self, event: &T) -> Result<bool, TODO>
So, it expects an event. However, I don't see any possibility with the current API to actually create an event which I can pass to dispatch_event().
A better way to ask this question is probably: How can I create Events at runtime in code?
Yes, you're right. Probably the only thing you can do right now is to just create your event through the js! macro.