New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users

Issue metadata

Status: Fixed
Last visit > 30 days ago
Closed: Oct 2013
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment

Issue 309524: DevTools: improve event listener object

Reported by, Oct 21 2013 Project Member

Issue description

Let's delete an event listener:

var listener = getEventListeners(document).mousewheel[0];
document.removeEventListener("mousewheel", listener.listener, listener.useCapture);

It would be ideal if event type was exposed in the object so you could reference it.

    document.removeEventListener($_.type, $_.listener, $_.useCapture); 

Some added sugar would be a remove method that automates this second process:


Comment 1 by, Oct 21 2013


I'll  point out that Firebug offers a fn.%handler attach point to let event binding abstractions point to the authored handler.

This convention never seemed to get adoption however:
So I don't think this part would be wise for us to adopt at this time.

Comment 2 by, Oct 21 2013

Another opportunity is to provide a Context Menu item to remove the event listener,

Comment 3 by, Oct 22 2013

Status: Assigned

Comment 4 by, Oct 28 2013

Project Member
The following revision refers to this bug:

r160713 | | 2013-10-28T10:57:58.903071Z

Changed paths:

DevTools: Improve CommandLineAPI's getEventListeners result.

Expose "type" string and "remove()" function.

BUG= 309524 
R=caseq, pfeldman

Review URL:

Comment 5 by, Oct 28 2013

Status: Fixed

Sign in to add a comment