1 <svg xmlns=
"http://www.w3.org/2000/svg">
2 <rect width=
"100" height=
"100" fill=
"red" onclick=
"window.alert('FAIL: click not sent to FO content.');"/>
3 <foreignObject width=
"100" height=
"100">
4 <body xmlns=
"http://www.w3.org/1999/xhtml" style=
"margin: 0; padding: 0;">
5 <!-- Clicking on the green div (background) should be dispatched to the div element and not to the red SVG rect underneath. -->
6 <div id=
"target" style=
"width: 100px; height: 100px; background-color:green;" onclick=
"window.alert('PASS: click sent to FO content.');"></div>
12 if (window.testRunner) {
13 testRunner.dumpAsText();
15 var hitElement = document.elementFromPoint(
50,
50);
16 var hitSuccess = hitElement && hitElement == document.getElementById(
"target");
17 document.getElementById('target').innerHTML = hitSuccess ? 'PASS' : 'FAIL';
19 document.getElementById('target').innerHTML = 'Click me.';