So today I've ran into a weird issue, the example will explain everything:
function animate(arg) {
console.log(arg);
}
<button onclick="animate('foo')">
Run
</button>
So today I've ran into a weird issue, the example will explain everything:
function animate(arg) {
console.log(arg);
}
<button onclick="animate('foo')">
Run
</button>
According to MDN, the Element.animate()
is a built-in experimental function:
The
Element
interface'sanimate()
method is a shortcut method which creates a new Animation, applies it to the element, then plays the animation. It returns the created Animation object instance.
In your case, it becomes window.animate()
, which takes up a different function.