[Webkit-unassigned] [Bug 29183] New: refactor event handling code in WI.Object to make it mixin-able
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 11 08:07:58 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29183
Summary: refactor event handling code in WI.Object to make it
mixin-able
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Inspector
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: pmuellr at yahoo.com
The current event handling logic in WebInspector.Object (Object.js) is quite
nice, but could be made more consumable.
Rather than require someone who wants to use it to subclass this class, seems
like it would be nice to able to "mixin" the functionality, at an event level.
For instance, conceptually I might have a class which has some events, and for
each event I might be able to do something like:
WebInspector.EventMixin.add(myClass, "fooBar")
which would add the methods to the class's prototype
addFooBarListener(...)
removeFooBarListener(...)
_dispatchFooBarEvent(...)
These messages would lazily create a _fooBarEventListeners property as needed.
Or something.
This would then be useful to use instead of the current single-listener event
handlers like onattach, onpopulate, etc, in TreeOutline, so that you could have
more than one listener without jumping through nasty hoops like daisy chaining
them (I assume you could daisy chain them in simple cases).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list