I\'m trying to fake SMIL support in IE9 with FakeSmile
I\'m creating the SVG element dynamically, adding a rect element with animate element and calling beginElement
Fenring (leunen-d) anwered that fakesmil doesn't support dynamic animations and that it could be added with the following function: https://answers.launchpad.net/smil/+question/203333
function registerAnimation(anim) {
var targets = getTargets(anim);
var elAnimators = new Array();
for(var i=0; i<targets.length ;i++) {
var target = targets[i];
var animator = new Animator(anim, target, i);
animators.push(animator);
elAnimators[i] = animator;
}
anim.animators = elAnimators;
var id = anim.getAttribute("id");
if (id)
id2anim[id] = anim;
for(var i=0; i<elAnimators.length ;i++)
elAnimators[i].register();
}
It seems you're setting a property incorrectly:
animation.setAttributeNS(null, 'begin', 'indefinite');
Change the property name to match the value:
animation.setAttributeNS(null, 'repeatCount', 'indefinite');