Set value to SVG obj w/o error
See the issue https://github.com/riot/riot/issues/853
HTML
<script src="https://cdn.jsdelivr.net/g/[email protected]%28riot.min.js+compiler.min.js%29"></script>
<my-tag></my-tag>
<script type="riot/tag">
<my-tag>
<svg width="100" height="100">
<rect name="rect1" riot-x="{ x }" riot-y="{ y }" riot-width="{ width }" height="50" />
</svg>
this.width = 100
this.x = 10
this.y = 20
setInterval(function(){
this.x = Math.random() * 20
this.y = Math.random() * 20
this.update()
}.bind(this), 300)
</my-tag>
</script>
JavaScript
/**
* Riot.js is loaded from External Resources
* https://cdn.jsdelivr.net/g/[email protected](riot.min.js+compiler.min.js)
*/
riot.mount('*')