Even listener best practices

Hi Everyone,

I have a few use cases where I need to set up event listener on element.
For exemple I would like to setup an event listener that trigger when a video has been watched at 80%.
I’am able to do it using custom JS and selecting the element with it’s ID.
However, I’am not sure this is the more optimal way to do it regarding WeWeb and Vue capabilities.
For exemple, I’m not able to remove the event listener when the page is left.

I haven’t found anything on this topic here…

Thanks!

I think you should instead use the Video widgets duration or whatever is exposed there to base your logic off of.

Hi @Broberto, I use Vimeo and the current video time is indeed exposed.
But I don’t think it is possible to execute a workflow based on a variable value ?

Also I have other cases where I would like to use event listener, so I’m wondering if WeWeb offer a way to manage event listener efficiently.