Closed
Bug 1019695
Opened 11 years ago
Closed 11 years ago
eventListenerService.getListenerInfoFor(node) listenerDebugObject missing script property or claiming "native code"
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
DUPLICATE
of bug 746622
People
(Reporter: miker, Unassigned)
References
Details
Attachments
(1 file)
43.33 KB,
patch
|
Details | Diff | Splinter Review |
I wouldn't normally add multiple issues to a single bug but I am fairly sure I am using the wrong method of gleaning script info here.
I am having issues trying to get useful listener info from eventListenerService.getListenerInfoFor in some cases.
Anyhow: STR1:
1. Apply the attached patch
2. Right-click the globe in about:home and inspect element
3. Start the browser toolbox
4. Inspect a CSS property enable / disable checkbox (they appear next to CSS attributes on hover)
5. Click on the ev icon in the markup view
You will get an empty bubble and the listenerDebugObject will be dumped... it has no script tag so I can't get any script info. The handler is added in rule-view.js, just search for _onEnableClicked, there is nothing special about it. The getEventListeners code is at toolkit/devtools/server/actors/inspector.js:325.
Another problem STR2:
1. Load file:///path/to/fx-team/browser/devtools/markupview/test/browser_markupview_events.html
2. Bring up the inspector
3. Click ev next to the html element
4. You will see that all the handlers inside highlighter.js are displayed as function() { [native code] }.
Not that I think these events should be displayed outside the browser toolbox but this happens all over the place and this is a simple test case.
Any ideas why:
1. There is no script info in STR1
2. Lots of handlers are displayed as native code when they should be visible.
In the past it was because I was using the wrong global for dbg.addDebugee(global) but using let global = Cu.getGlobalForObject(listener); seems to have fixed that only for some cases.
Comment 1•11 years ago
|
||
I'm pretty sure both of those cases are due to .bind(), see bug 746622.
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Simon Lindholm from comment #1)
> I'm pretty sure both of those cases are due to .bind(), see bug 746622.
Yes, I can confirm this so I will continue in bug 746622.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•