Add a new WebInspector.Object base class that will be used for
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:27:44 +0000 (22:27 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:27:44 +0000 (22:27 +0000)
commita3be6dbb682c3f38203f56953bc04cba7677c776
tree3d61fda3aaa8767f989ebb4b9034fe5df54c1e4f
parente370408698d525e1b3a2f45fa7cab5db256f77df
Add a new WebInspector.Object base class that will be used for
a few objects in the Web Inspector to support listeners on any
object. This will help add more abstraction to the Inspector.

Reviewed by Adam Roben.

* page/inspector/Object.js: Added.
(WebInspector.Object): Does nothing.
(WebInspector.Object.prototype.addEventListener): Adds the listener to
the _listeners map by type. Supports a this object argument, for easy
addition of listeners without the need for bind.
(WebInspector.Object.prototype.removeEventListener): Remove the listener
from the _listeners map. If the listener is null and the thisObject was
passed, remove any listener for that thisObject.
(WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
for a type to all listeners for that type. Mimics some of the DOMEvent
methods and properties for the event object passed to the listeners.
* WebCore.vcproj/WebCore.vcproj: Add new files.
* page/inspector/WebKit.qrc: Ditto.
* page/inspector/inspector.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/page/inspector/Object.js [new file with mode: 0644]
WebCore/page/inspector/WebKit.qrc
WebCore/page/inspector/inspector.html