| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function documentClickHandler(event) { console.log("click - document - attribute
"); } | 6 function documentClickHandler(event) { console.log("click - document - attribute
"); } |
| 7 | 7 |
| 8 function setupEventListeners() | 8 function setupEventListeners() |
| 9 { | 9 { |
| 10 function f() {} | 10 function f() {} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 document.body.addEventListener("custom event", f, true); | 23 document.body.addEventListener("custom event", f, true); |
| 24 | 24 |
| 25 function ObjectHandler() { document.addEventListener("click", this, true); } | 25 function ObjectHandler() { document.addEventListener("click", this, true); } |
| 26 ObjectHandler.prototype.toString = function() { return "ObjectHandler"; } | 26 ObjectHandler.prototype.toString = function() { return "ObjectHandler"; } |
| 27 new ObjectHandler(); | 27 new ObjectHandler(); |
| 28 | 28 |
| 29 function EventListenerImpl() { document.addEventListener("click", this, true
); } | 29 function EventListenerImpl() { document.addEventListener("click", this, true
); } |
| 30 EventListenerImpl.prototype.toString = function() { return "EventListenerImp
l"; } | 30 EventListenerImpl.prototype.toString = function() { return "EventListenerImp
l"; } |
| 31 EventListenerImpl.prototype.handleEvent = function() { console.log("click -
document - handleEvent"); } | 31 EventListenerImpl.prototype.handleEvent = function() { console.log("click -
document - handleEvent"); } |
| 32 new EventListenerImpl(); | 32 new EventListenerImpl(); |
| 33 |
| 34 function scrollHandler(event) { console.log("scroll - window"); } |
| 35 window.addEventListener("scroll", scrollHandler); |
| 33 } | 36 } |
| 34 | 37 |
| 35 function test() | 38 function test() |
| 36 { | 39 { |
| 37 var sidebarPane = WebInspector.panels.elements.sidebarPanes.eventListeners; | 40 var sidebarPane = WebInspector.panels.elements.sidebarPanes.eventListeners; |
| 38 | 41 |
| 39 WebInspector.settings.eventListenersFilter.set("all"); | 42 WebInspector.settings.eventListenersFilter.set("all"); |
| 40 InspectorTest.selectNodeWithId("node", step1); | 43 InspectorTest.selectNodeWithId("node", step1); |
| 41 | 44 |
| 42 function step1() | 45 function step1() |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 <p> | 79 <p> |
| 77 Tests event listeners output in the Elements sidebar panel. | 80 Tests event listeners output in the Elements sidebar panel. |
| 78 </p> | 81 </p> |
| 79 | 82 |
| 80 <button id="node">Inspect Me</button> | 83 <button id="node">Inspect Me</button> |
| 81 | 84 |
| 82 <div id="node-without-listeners"></div> | 85 <div id="node-without-listeners"></div> |
| 83 | 86 |
| 84 </body> | 87 </body> |
| 85 </html> | 88 </html> |
| OLD | NEW |