As the title says, how can I find what JavaScript events are being triggered as I interact with a webpage?
Open Google Chrome and press F12 to open Dev Tools. Go to Event Listener Breakpoints, on the right: Click on the events and interact with the target element.
Some common HTML events are as follows: onload: It is triggered when the browser completes loading a page. onchange: It is triggered when an HTML element changes. onclick: It is triggered when an HTML element is clicked. onmouseover: It is triggered when the mouse is moved over a HTML element.
Right-click on the search icon button and choose “inspect” to open the Chrome developer tools. Once the dev tools are open, switch to the “Event Listeners” tab and you will see all the event listeners bound to the element. You can expand any event listener by clicking the right-pointing arrowhead.
when you have firebug installed, the following functions will gather data of all the javascript functions being triggered, and how much time is spent executing them:
console.profile([title])
Turns on the JavaScript profiler. The optional argument title would contain the text to be printed in the header of the profile report.
console.profileEnd()
Turns off the JavaScript profiler and prints its report.
More info can be found at http://getfirebug.com/console.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With