Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1924)

Unified Diff: Source/devtools/front_end/elements/EventListenersSidebarPane.js

Issue 842323005: DevTools: Clean up the Event Listeners pane data representation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove listenerBody from the protocol Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/devtools/front_end/sdk/DOMModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/EventListenersSidebarPane.js
diff --git a/Source/devtools/front_end/elements/EventListenersSidebarPane.js b/Source/devtools/front_end/elements/EventListenersSidebarPane.js
index 06f56a0c85ad543761581d40fe000fe6883605ce..6feae12a31e3e2c2e45cc1c1697f5546bac68753 100644
--- a/Source/devtools/front_end/elements/EventListenersSidebarPane.js
+++ b/Source/devtools/front_end/elements/EventListenersSidebarPane.js
@@ -129,7 +129,7 @@ WebInspector.EventListenersSidebarPane.prototype = {
var eventListener = eventListeners[i];
if (selectedNodeOnly && (node.id !== eventListener.payload().nodeId))
continue;
- if (/^function _inspectorCommandLineAPI_logEvent\(/.test(eventListener.payload().handlerBody.toString()))
+ if (eventListener.location().script().isInternalScript())
continue; // ignore event listeners generated by monitorEvent
var type = eventListener.payload().type;
var treeItem = treeItemMap.get(type);
@@ -222,19 +222,14 @@ WebInspector.EventListenerBar.prototype = {
var properties = [];
var payload = this._eventListener.payload();
- properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("type", payload.type));
properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("useCapture", payload.useCapture));
- properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("isAttribute", payload.isAttribute));
+ properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("attachment", payload.isAttribute ? "attribute" : "script"));
if (nodeObject)
properties.push(new WebInspector.RemoteObjectProperty("node", nodeObject));
if (typeof payload.handler !== "undefined") {
var remoteObject = this._runtimeModel.createRemoteObject(payload.handler);
properties.push(new WebInspector.RemoteObjectProperty("handler", remoteObject));
}
- properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("listenerBody", payload.handlerBody));
- if (payload.sourceName)
- properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("sourceName", payload.sourceName));
- properties.push(this._runtimeModel.createRemotePropertyFromPrimitiveValue("lineNumber", payload.location.lineNumber + 1));
this.updateProperties(properties);
}
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/devtools/front_end/sdk/DOMModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698