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

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

Issue 1845493004: Modify devtools to show passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remove Created 4 years, 9 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 ee26d3735b37fbe723500f1b0bbccf12585fa259..d460b5a5c69e1332d4ff60fb41c04623e252079e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -1393,10 +1393,17 @@ CommandLineAPIImpl.prototype = {
var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node));
if (!result)
return;
- /** @this {{type: string, listener: function(), useCapture: boolean}} */
+ /** @this {{type: string, listener: function(), useCapture: boolean, passive: boolean}} */
var removeFunc = function()
{
- node.removeEventListener(this.type, this.listener, this.useCapture);
+ function eventListenerOptions(capture, passive) {
pfeldman 2016/03/30 17:43:05 ditto
dtapuska 2016/03/30 20:59:48 Likewise; if I JSDoc this it will fail.
+ if (passive) {
+ return {"capture": capture, "passive": passive};
+ } else {
+ return capture;
+ }
+ }
+ node.removeEventListener(this.type, this.listener, eventListenerOptions(this.useCapture, this.passive));
}
for (var type in result) {
var listeners = result[type];

Powered by Google App Engine
This is Rietveld 408576698