<!DOCTYPE html> | |
<script> | |
function foo() { | |
console.log('foo is called'); | |
} | |
</script> | |
<svg id="root"> | |
<image xlink:href="../../images/resources/green-10.png" onload="foo()"/> | |
<use xlink:href="#root" x="100" fill="red"/> | |
<rect width="100" height="100"/> | |
</svg> |