Adding an event listener with capture: true on the Window element makes every single event of that type trigger the handler.
Therefore, any blur on any element in a page containing one or several dotlottie-player or dotlottie-player-light will call the _handleWindowBlur method on every last one of them and pause them all.
You can see an example of this on your demo page. If you click a button and then click anywhere else in the page (thus triggering the blur event on the button), the demo player will pause.
Adding an event listener with
capture: true
on theWindow
element makes every single event of that type trigger the handler.Therefore, any
blur
on any element in a page containing one or severaldotlottie-player
ordotlottie-player-light
will call the_handleWindowBlur
method on every last one of them and pause them all.You can see an example of this on your demo page. If you click a button and then click anywhere else in the page (thus triggering the
blur
event on the button), the demo player will pause.