Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Hit testing an image whose map 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("map"), null);
document.elementFromPoint(50, 50);
</script>