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..88b82108f2d2c65e9f760baa3eca96ea232b8056 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js |
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js |
@@ -1393,10 +1393,34 @@ CommandLineAPIImpl.prototype = { |
var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node)); |
if (!result) |
return; |
- /** @this {{type: string, listener: function(), useCapture: boolean}} */ |
+ |
+ // TODO(dtapuska): Remove this one closure compiler is updated |
+ // to handle EventListenerOptions and passive event listeners |
+ // has shipped. Don't JSDoc these otherwise it will fail. |
+ // @param {boolean} capture |
+ // @param {boolean} passive |
+ // @return {boolean|undefined|{capture: (boolean|undefined), passive: boolean}} |
+ function eventListenerOptions(capture, passive) |
+ { |
+ return {"capture": capture, "passive": passive}; |
+ } |
+ |
+ /** |
+ * @param {!Node} node |
+ * @param {string} type |
+ * @param {function()} listener |
+ * @param {boolean} capture |
+ * @param {boolean} passive |
+ */ |
+ function removeEventListenerWrapper(node, type, listener, capture, passive) |
+ { |
+ node.removeEventListener(type, listener, eventListenerOptions(capture, passive)); |
+ } |
+ |
+ /** @this {{type: string, listener: function(), useCapture: boolean, passive: boolean}} */ |
var removeFunc = function() |
{ |
- node.removeEventListener(this.type, this.listener, this.useCapture); |
+ removeEventListenerWrapper(node, this.type, this.listener, this.useCapture, this.passive); |
} |
for (var type in result) { |
var listeners = result[type]; |