Once you have started an animation by clicking on a button, there is the temptation to do it again, even before the animation has concluded. The attribute restart gives the author some control over what the user can do.
<animate attributeName="x" from="20" to="200" restart="never" begin="st1.click" dur="3s"/> <animate attributeName="x" from="20" to="200" restart="whenNotActive" begin="st2.click" dur="3s"/> <animate attributeName="x" from="20" to="200" restart="always" begin="st3.click" dur="3s"/> <animate attributeName="x" from="20" to="200" begin="st3.click" dur="3s"/>
Clicking on the top button a second time has no effect.
Clicking on the middle button when the animation is in progress is ignored until the animation stops. Then it can be restarted.
Clicking on the lowest button any time causes the animation to restart.