FakeSmile con IE9
Estoy tratando de falsificar el soporte SMIL en IE9 conSonrisa falsa
Estoy creando dinámicamente el elemento SVG, agregando un elemento rect con elemento animado y llamando a beginElement (). IE9 me da un error: el objeto no admite la propiedad o el método 'beginElement'
Trabajos estáticos de SVG:http://jsfiddle.net/FG3PG/1/
¿Cómo uso FakeSmile para arreglarlo? A continuación se muestra lo que estoy tratando de hacer:http://jsfiddle.net/DgMDV/13/
Y aquí está el mismo código:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript" src="http://bazaar.launchpad.net/~smilteam/smil/MAIN/download/head:/smil.user.js-20080305202719-59ane0zgfr5f3vz8-1/smil.user.js"></script>
</head>
<body>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" height="200">
<rect class="drag resize" x="10" y="10" width="100" height="50" fill="#c66" />
</svg>
<script type="text/javascript">
var svg = document.getElementsByTagName('svg')[0];
var svgNS = svg.getAttribute('xmlns');
var rect = document.getElementsByTagName('rect')[0];
var animation = document.createElementNS(
"http://www.w3.org/2000/svg", "animate");
animation.setAttributeNS(null, 'attributeName', 'x');
animation.setAttributeNS(null, 'dur', 0.5);
animation.setAttributeNS(null, 'begin', 'indefinite');
animation.setAttributeNS(null, 'fill', 'freeze');
animation.setAttributeNS(null, 'to', 100);
rect.appendChild(animation);
animation.beginElement();
</script>
</body>
</html>