widgetti / ipyvue

Jupyter widgets base for Vue libraries
MIT License
68 stars 18 forks source link

Fix: event serialization fails for non-DOM-events #79

Closed maartenbreddels closed 1 year ago

maartenbreddels commented 1 year ago

We did not test the serialization in #76 which introduced a bug (#78). This PR adds tests for both case and fixes #78. Although it does not test example in #78 we know this goes through the same codepath.

Ideally, we also test component event (https://vuejs.org/guide/components/events.html) but we do not support them in templates. Also, without ipyvuetify we do not have a widget that can emit a component event with a non-Event object as argument. We could decide to depend on ipvuetify for the test, or rely on the fact that the custom events in templates share a similar codepath.