summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/Object.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/Object.js')
-rw-r--r--WebCore/inspector/front-end/Object.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/WebCore/inspector/front-end/Object.js b/WebCore/inspector/front-end/Object.js
index 27e2144..5872b8b 100644
--- a/WebCore/inspector/front-end/Object.js
+++ b/WebCore/inspector/front-end/Object.js
@@ -27,7 +27,8 @@ WebInspector.Object = function() {
}
WebInspector.Object.prototype = {
- addEventListener: function(eventType, listener, thisObject) {
+ addEventListener: function(eventType, listener, thisObject)
+ {
if (!("_listeners" in this))
this._listeners = {};
if (!(eventType in this._listeners))
@@ -35,7 +36,8 @@ WebInspector.Object.prototype = {
this._listeners[eventType].push({ thisObject: thisObject, listener: listener });
},
- removeEventListener: function(eventType, listener, thisObject) {
+ removeEventListener: function(eventType, listener, thisObject)
+ {
if (!("_listeners" in this) || !(eventType in this._listeners))
return;
var listeners = this._listeners[eventType];
@@ -50,7 +52,13 @@ WebInspector.Object.prototype = {
delete this._listeners[eventType];
},
- dispatchEventToListeners: function(eventType, eventData) {
+ removeAllListeners: function()
+ {
+ delete this._listeners;
+ },
+
+ dispatchEventToListeners: function(eventType, eventData)
+ {
if (!("_listeners" in this) || !(eventType in this._listeners))
return;