summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/EventListenersSidebarPane.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/EventListenersSidebarPane.js')
-rw-r--r--WebCore/inspector/front-end/EventListenersSidebarPane.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js
index 55b8e55..2938196 100644
--- a/WebCore/inspector/front-end/EventListenersSidebarPane.js
+++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js
@@ -71,6 +71,8 @@ WebInspector.EventListenersSidebarPane.prototype = {
var eventListener = eventListeners[i];
eventListener.node = WebInspector.domAgent.nodeForId(eventListener.nodeId);
delete eventListener.nodeId; // no longer needed
+ if (/^function _inspectorCommandLineAPI_logEvent\(/.test(eventListener.listener.toString()))
+ continue; // ignore event listeners generated by monitorEvent
var type = eventListener.type;
var section = sectionMap[type];
if (!section) {
@@ -201,18 +203,13 @@ WebInspector.EventListenerBar.prototype = {
if (node.nodeType === Node.DOCUMENT_NODE)
return "document";
-
+
return appropriateSelectorForNode(node);
},
_getFunctionDisplayName: function()
{
- // TODO: v8 does not yet provide the raw function, this handles such a case with a placeholder
- // I didn't make this a UIString because it should be implemented eventually.
- if (!this.eventListener.listener)
- return "(listener)";
-
- // Requires that Function.toString() return at least the function's signature
+ // Requires that Function.toString() return at least the function's signature.
var match = this.eventListener.listener.toString().match(/function ([^\(]+?)\(/);
return (match ? match[1] : WebInspector.UIString("(anonymous function)"));
}