Support animation events
See original GitHub issueThe event handlers look like as following
div(
onAnimationStart --> ...,
onAnimationonIteration --> ...,
onAnimationEnd --> ...,
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Using Animation Events - Unity - Manual
Use Animation Events to call functions at specific points in the timeline. These functions can be in any script attached to the GameObject....
Read more >AnimationEvent - Web APIs | MDN
Chrome Edge
AnimationEvent Full support. Chrome43. more. Toggle history Full support. Ed...
AnimationEvent() constructor Full support. Chrome43. Toggle history Full support. Ed...
animationName Full support. Chrome43....
Read more >Unity tip of the day: Animation events | by Mohamed Hijazi
Animation events are basically allows you to call a function or method directly from the animation clip at a specific frame/time that you...
Read more >CSS Animation Events | kirupa.com
The only event you can always rely on is the animationstart event. Your animationteration event will start firing at the beginning of your...
Read more >Top 10 Annual Animation Events That Animators Should Attend
Animation events are simply programs, conferences, or workshops that provide information related to the animation industry. The ideas shared in these events ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
btw, forgot to mention in case anyone does something like this.
In the example above, for
removeEventListener
to work, you need to define yourdef handleAnimationEnd
as aval handleAnimationEnd: js.Function1[dom.AnimationEvent, Unit]
instead.Otherwise, because
addEventListener
andremoveEventListener
acceptjs.Function1
, this conversion from a Scala method to tojs.Function1
will happen implicitly at the two usage sites of yourhandleAnimationEnd
, and each of those conversions will create a new instance ofjs.Function1
. So when you callremoveEventListener
, you will be passing a newly created instance ofjs.Function1
that has not been added as a listener, so the callback that was added previously will not be removed. This would become apparent if you tried to re-mount the component later, as you’d now have two callbacks registered that do the same thing twice.Hope that makes sense. Just a small scala-js interop hiccup. When using Laminar methods (–>) you don’t have to worry about this.
I am going to create the PR 👍