click-event-bubbles.tentative.html (729B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testdriver.js"></script> 8 <script src="/resources/testdriver-vendor.js"></script> 9 <script src="resources/soft-navigation-helper.js"></script> 10 </head> 11 <body> 12 <main id=main> 13 <a id=link>Click me!</a> 14 </main> 15 <script> 16 testSoftNavigation({ 17 testName: "Ensure event bubbling works well with soft navigations.", 18 registerRouteChange: (cb) => { 19 // Interact with the link, but observe the event on anscestor 20 document.getElementById("main").addEventListener('click', cb); 21 }, 22 }); 23 </script> 24 </body> 25 </html>