{"version":"1.0","type":"rich","title":"intercept *.addEventListener for debugging","description":"This example demonstrates how to intercept and log every `addEventListener` call on HTML element prototypes for debugging purposes. It enumerates all `HTML*` interfaces from `window`, then wraps each prototype’s `addEventListener` method to print the event type, listener, and `useCapture` flag, followed by a stack trace via `console.trace()`. The code uses native browser APIs like `Object.getOwnPropertyNames`, `window`, and prototype manipulation, with no external libraries, and is based on a Stack Overflow solution adapted for Firefox.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-fc536ef87713d0a9ed89?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}