Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/canvas/element/manual/draw-element-image/onpaint-outside-invalidation-crash.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html class=reftest-wait>
<script src="/common/reftest-wait.js"></script>
<div id="outside">Pass if no crash.</div>
<canvas id=canvas width="1" height="1" layoutsubtree>
<div id="inside"></div>
</canvas>
<script>
canvas.onpaint = () => {
// Modify an element outside the canvas.
outside.style.opacity = '.1';
// Ensure there is no crash if we force an update for hit testing.
document.elementsFromPoint(50, 50);
takeScreenshot();
};
canvas.requestPaint();
</script>
</html>