Skip to content

Commit d342ca9

Browse files
committed
Use addEventListener instead of finished in the element.animation
1 parent 570b0c3 commit d342ca9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsdom-testing-mocks",
3-
"version": "1.5.0-beta.6",
3+
"version": "1.5.0-beta.7",
44
"author": "Ivan Galiatin",
55
"license": "MIT",
66
"description": "A set of tools for emulating browser behavior in jsdom environment",

src/mocks/web-animations-api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function animate(
1717

1818
elementAnimations.set(this, animations);
1919

20-
animation.finished.then(() => {
20+
animation.addEventListener('finish', () => {
2121
const animations = elementAnimations.get(this);
2222

2323
if (animations) {

0 commit comments

Comments
 (0)