Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/nodes/moveBefore/moveBefore-img-usemap-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Focusing an area whose image was moved into a shadow root with moveBefore() should not crash</title>
<img usemap="#m" width="100" height="100" style="display: block" src="/images/green.png">
<map name="m"><area shape="rect" coords="0,0,100,100" href="#a"></map>
<div id="host"></div>
<script>
host.attachShadow({ mode: "open" }).moveBefore(document.querySelector("img"), null);
document.querySelector("area").focus();
</script>