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

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: 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 eb8115f9024830252f5a55e8b3822cce5c7d09d3..6b6f6d4618fddf173edf16393663342e9bc832ce 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -1222,11 +1222,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));
+ if (!options) options = {};
caseq 2016/05/09 21:08:39 style: move options to the next line, or just opti
dtapuska 2016/05/18 14:04:53 Done.
+ var showPassive = true;
+ var showBlocking = true;
+ if (typeof options['passive'] != "undefined") {
+ showPassive = options['passive'];
+ showBlocking = !showPassive;
+ }
+
+ var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node,
+ options['descendants'],
+ showPassive,
+ showBlocking));
if (!result)
return;

Powered by Google App Engine
This is Rietveld 408576698