blob: 2e74c4acbb8f015bf782da994bc6f6c03aed0418 [file] [log] [blame]
<!DOCTYPE html>
<html>
<title>Canvas.drawElementImage: elements from the subtree are supported</title>
<link rel="help" href="https://github.com/WICG/html-in-canvas">
<style>
#child {
width: 100px;
height: 100px;
background: orange;
}
#grandchild {
width: 100px;
height: 100px;
background: green;
/* forces a stacking context and grouping */
isolation: isolate;
}
#canvas {
background: red;
}
</style>
<canvas id=canvas width="100" height="100" layoutsubtree>
<div id=child>
<div id=grandchild></div>
</div>
</canvas>
<script>
function runTest() {
var context = canvas.getContext('2d');
context.drawElementImage(grandchild, 0, 0);
}
onload = () => runTest();
</script>
</html>