The spec of SVGSVGElement contains methods like pauseAnimations()
or unpauseAnimations()
. But how can I get access these methods in Angular 9? Or how can I pause/resume a SVG path animations?
<svg id="rootSVG" width="500" viewBox="50 0 700 400" xmlns="http://www.w3.org/2000/svg">
<svg:circle r="10" fill="white" id="white">
<svg:animateMotion
id="innerTrack"
[attr.dur]="durationInner"
begin="indefinite"
repeatCount="0"
calcMode="linear"
[attr.path]="innerPath"
(begin)="status()"
/>
</svg:circle>
</svg>
In pure JS I would do domething like:
var pause = document.getElementById('innerTrack');
pause.pauseAnimations();
But when I do it with Angular 9 I get a compilation error:
error TS2551: Property 'pauseAnimations' does not exist on type 'HTMLElement'. Did you mean 'getAnimations'?
So the question is: how to do?