简体   繁体   中英

How to trace all javascript events on page (mobile browser)?

Is there a way to get a log of all events that are generated on a given page? Printing events' names to console for example would be enough.

The reason is to know what happens on a particular user action (http://stackoverflow.com/questions/10071397/is-there-a-way-to-see-that-a-browser-window-is-minimized-while-the-user-is-switc).

If you're debugging Mobile Safari, run iOS >= 5.0 in the iOS Simulator and run iWebInspector . In the Timeline tab you should be able to see every event being fired by the browser after pressing the record button.

if you are using google chrome then you can connect your mobile device to your system using USB and in the google chrome try opening chrome://inspect/#devices url.

Under Remote Target, the sites you opened in your mobile browser will be listed. You can click inspect to debug the site.

In the console use Monitor Events to track all the events.

for more info, you can check the Remote debug Android devices

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM