Start monitoring events
Description:
A tool is designed to monitor user interface (UI) events. It begins by actively listening for any events that are registered on the UI. The tool remains in this monitoring state until it is manually stopped. Upon stopping, it provides a detailed report of all the events that are still attached to the UI. This functionality is particularly useful for identifying memory leaks, as it highlights events that were not properly cleaned up and are still lingering in the system.
{
"type": "debug",
"action": "start_monitor_events"
}
Stop monitoring events
Description:
When performing this action you will get the result back of any leaks identified. The suggested procedure for this would be:
- Start at a resource neutral page like about:blank
- Start monitoring events
- Navigate to the page and perform your actions
- Navigate back to the neutral page
- Stop monitoring events
{
"type": "debug",
"action": "stop_monitor_events",
"args": {
"target": "$data.result"
}
}
The result is an collection of objects with the following properties:
- target – the id or element tag to identify the element with
- type – the event type for example “click”
- path – the xpath of the element in the dom
- trace – the stack trace on where the event is attached to the element using addEventListener