stdweb icon indicating copy to clipboard operation
stdweb copied to clipboard

How to call element.dispatch_event() ?

Open BafDyce opened this issue 7 years ago • 1 comments

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?

BafDyce avatar Aug 25 '18 18:08 BafDyce

Yes, you're right. Probably the only thing you can do right now is to just create your event through the js! macro.

koute avatar Aug 25 '18 23:08 koute