Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://raw.githubusercontent.com/mozilla-firefox/firefox/main/layout/reftests/bugs/1330051.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
class="reftest-wait">
<script>
// Load-handler that will adopt elem from outer doc:
function go() {
let el = document.getElementById('myDiv');
var innerDoc = frames[0].document;
innerDoc.body.appendChild(el);
document.documentElement.removeAttribute("class");
}
</script>
<foreignObject width="500" height="500">
<iframe onload="go()" srcdoc="A test">
</iframe>
<div style="color: green" id="myDiv">This should remain green</div>
</div>
</foreignObject>
</svg>