I often find my self needing the underlying *js.Object from an event (to add state information and retrieve the corresponding information if other handlers for the same event). As is the the event interface does not allow me to do this in a type safe way since I do not know the concrete type of the event (may be one f several) I in each function needs to have a large type switch which effectively tests all the event types (and what if more are added, that would lead to a panic/not working).
Hi,
First of all, thanks for a great library.
I often find my self needing the underlying *js.Object from an event (to add state information and retrieve the corresponding information if other handlers for the same event). As is the the event interface does not allow me to do this in a type safe way since I do not know the concrete type of the event (may be one f several) I in each function needs to have a large type switch which effectively tests all the event types (and what if more are added, that would lead to a panic/not working).
Thus, my uggestion would be to add a:
method to the Event interface.
Any thoughts?