<!DOCTYPE html> | |
<svg> | |
<rect width="100" height="100" fill="red"/> | |
<use href="#foo"/> | |
<defs> | |
<g id="foo"> | |
<rect width="50" height="100" fill="green"/> | |
<script> | |
// Force a layout so that the shadow tree is instantiated. | |
document.documentElement.offsetTop; | |
</script> | |
<rect x="50" width="50" height="100" fill="green"/> | |
</g> | |
</defs> | |
</svg> |