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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 1950403002: Add the ability to return descedant event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
index 60d9584600b81cb9fe3c31b72f20c73ec040c92f..a8ed9992dbe8fa9f79a33ead478c972c808187f7 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -1252,11 +1252,23 @@ CommandLineAPIImpl.unmonitorEvents = function(object, opt_types)
/**
* @param {!Node} node
+ * @param {?Object} options
* @return {!Object|undefined}
*/
-CommandLineAPIImpl.getEventListeners = function(node)
+CommandLineAPIImpl.getEventListeners = function(node, options)
{
- var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node));
+ options = options || {};
+ var showPassive = true;
+ var showBlocking = true;
+ if (typeof options['passive'] != "undefined") {
caseq 2016/05/20 00:47:24 here and below, double quotes please! Also, use !=
dtapuska 2016/05/26 20:37:44 removed after rebase
+ showPassive = options['passive'];
+ showBlocking = !showPassive;
+ }
+
+ var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node,
+ options['descendants'],
caseq 2016/05/20 00:47:24 Put all params on either one or two lines, or use
dtapuska 2016/05/26 20:37:44 removed after rebase
+ showPassive,
+ showBlocking));
if (!result)
return;

Powered by Google App Engine
This is Rietveld 408576698