soft-navigation-detection-main-descendent.tentative.html (895B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Detect soft navigation adding content to a main descendent.</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testdriver.js"></script> 9 <script src="/resources/testdriver-vendor.js"></script> 10 <script src="resources/soft-navigation-helper.js"></script> 11 </head> 12 <body> 13 <main id=main> 14 <a id=link>Click me!</a> 15 <div id=descendent></div> 16 </main> 17 <script> 18 testSoftNavigation({ 19 testName: "Test that a soft navigation is detected even when DOM change is " 20 + "done on a main descendent", 21 addContent: () => { 22 const descendent= document.getElementById("descendent"); 23 const content = document.createTextNode("Lorem Ipsum"); 24 descendent.appendChild(content); 25 }, 26 }); 27 </script> 28 </body> 29 </html>