| Index: Source/core/inspector/InjectedScriptSource.js
|
| diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
|
| index 5965f4bcf6791fd3dc3c4b0d76f84393a42ebfad..991c07d7038f2d53f4ac621982fe82b19315965e 100644
|
| --- a/Source/core/inspector/InjectedScriptSource.js
|
| +++ b/Source/core/inspector/InjectedScriptSource.js
|
| @@ -1377,10 +1377,26 @@ CommandLineAPIImpl.prototype = {
|
|
|
| /**
|
| * @param {Node} node
|
| + * @return {{type: string, listener: function(), useCapture: boolean, remove: function()}|undefined}
|
| */
|
| getEventListeners: function(node)
|
| {
|
| - return InjectedScriptHost.getEventListeners(node);
|
| + var result = InjectedScriptHost.getEventListeners(node);
|
| + if (!result)
|
| + return result;
|
| + /** @this {{type: string, listener: function(), useCapture: boolean}} */
|
| + var removeFunc = function()
|
| + {
|
| + node.removeEventListener(this.type, this.listener, this.useCapture);
|
| + }
|
| + for (var type in result) {
|
| + var listeners = result[type];
|
| + for (var i = 0, listener; listener = listeners[i]; ++i) {
|
| + listener["type"] = type;
|
| + listener["remove"] = removeFunc;
|
| + }
|
| + }
|
| + return result;
|
| },
|
|
|
| debug: function(fn)
|
|
|