<!DOCTYPE html>
<html>
<style>
    body { margin: 0; }
</style>
<body>
<div role="button">This works like a button</div>
<div role="link">This works like a link</div>
<ul role="menu">
    <li role="menuitem">Menu option 1</li>
    <li role="menuitem">Menu option 2</li>
    <li role="option">Menu option 3</li>
</ul>
<pre id="results"></pre>
<script>
document.body.addEventListener("click", function(e) {
    console.log(e, "event delegation");
});

if (window.testRunner)
    testRunner.dumpAsText();

window.onload = function () {
    if (window.internals)
       results.textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION | internals.LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES);
};
</script>
</body>
</html>
