Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<html>
<title>HTML-in-Canvas: A canvas with content=drawable is a stacking context</title>
<link rel="help" href="https://github.com/WICG/html-in-canvas">
<link rel="match" href="canvas-content-drawable-stacking-context.tentative-ref.html">
<style>
div {
position: relative;
width: 100px;
height: 100px;
background: red;
}
canvas {
display: block;
margin-top: -100px;
background: green;
}
</style>
<p>Test passes if there is a green square and no red.</p>
<div></div>
<canvas width="100" height="100" content="drawable"></canvas>
</html>