Skip to content
Util for discovering events being emitted by browser apis and DOM nodes.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


What is this?

A tiny browser module for discovering what events are actually being fired by an object in the browser. Especially useful for discovering available 'hooks' for new-ish browser APIs like MediaStreams or PeerConnections.

It does this without overwriting an existing handlers you may have already registered.

Suitable for use with browserify/CommonJS on the client.

If you're not using browserify or you want AMD support use domeventlogger.bundle.js.


npm install domeventlogger

How to use it

See demo.html for working demo.

var domEventLogger = require('domeventlogger');

// grab some image or any browser API that lets you
// listen for 'on...' events:
img = document.getElementById('myImage');

// specify that you want to log events

// do something that will cause an event
// for example a "onload" event by specifying
// an image source attribute.
img.src = "";

// look in your console and you'll see the load event logged
// now you can mouse over the image and see mouseover, etc.
// this is great for discovering what hooks you have available to you.


screen shot


New browser APIs don't always have perfect up-to-date docs. And sometimes you're not exactly sure the order in which things are firing. This can make it easier to debug.


Don't leave this in your code in production, as it registers an event listen on every possible event hook for the element you pass it (which may not be particularly awesome for performance);



Created By

If you like this, follow @HenrikJoreteg on twitter.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.