| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="resources/shadow-dom.js"></script> | 5 <script src="resources/shadow-dom.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <p id="description"></p> | 8 <p id="description"></p> |
| 9 <div id="sandbox"></div> | 9 <div id="sandbox"></div> |
| 10 <pre id="console"></pre> | 10 <pre id="console"></pre> |
| 11 <div id='a'> | 11 <div id='a'> |
| 12 <div id='b'> | 12 <div id='b'> |
| 13 <div id='c'> | 13 <div id='c'> |
| 14 </div> | 14 </div> |
| 15 </div> | 15 </div> |
| 16 </div> | 16 </div> |
| 17 <script> | 17 <script> |
| 18 var b = document.getElementById('b'); | 18 var b = document.getElementById('b'); |
| 19 b.addEventListener('click', function(event) { | 19 b.addEventListener('click', function(event) { |
| 20 var path = event.path; | 20 var path = event.path; |
| 21 debug(dumpNodeList(path)); | 21 debug(dumpNodeList(path)); |
| 22 debug('Makes sure that event.path returns static NodeList.'); | 22 debug('Makes sure that event.path returns static NodeList.'); |
| 23 path[1] = ''; | 23 path[1] = ''; |
| 24 debug(dumpNodeList(event.path)); | 24 debug(dumpNodeList(event.path)); |
| 25 }); | 25 }); |
| 26 var clickEvent = document.createEvent("MouseEvents"); | 26 var clickEvent = document.createEvent("MouseEvents"); |
| 27 debug("Makes sure that event.path is empty before dispatching the event."); |
| 28 debug(dumpNodeList(clickEvent.path)); |
| 27 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa
lse, false, false, 0, null); | 29 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa
lse, false, false, 0, null); |
| 28 b.dispatchEvent(clickEvent); | 30 b.dispatchEvent(clickEvent); |
| 31 debug("Makes sure that event.path isn't emptified after dispatching the event.")
; |
| 32 debug(dumpNodeList(clickEvent.path)); |
| 29 </script> | 33 </script> |
| 30 </body> | 34 </body> |
| 31 </html> | 35 </html> |
| OLD | NEW |