Closed
Bug 612980
Opened 14 years ago
Closed 10 years ago
Make Node inherit from EventTarget
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: heycam, Unassigned)
References
(Depends on 1 open bug)
Details
We should experiment with making Node (and other interfaces that implement EventTarget) extend from EventTarget rather than mixing it in. As perhaps the most popular mixed in interface, it would be helpful for authors to be able to get at the single, canonical property that defines addEventListener, etc.
To make it clear: the goal here is to get specs updated to make EventTarget be the root of Node as well as other interfaces.
The following interfaces should also inherit EventTarget:
Window
XMLHttpRequest
Worker (also SharedWorker in spec, we don't implement this interface yet)
FileReader
IDBDatabase
IDBTransaction
IDBRequest
WebSocket
EventSource (in patch, not yet landed)
There's probably more that I'm forgetting.
Comment 2•14 years ago
|
||
Yes! This is exactly what I want.
WebIDL had(has?) something else for some time, and I was going to complain about
it.
EventTarget should be the one XHR and Node and Window etc inherit.
(Internally nsINode, nsGlobalWindow, XHR, etc inherit nsPIDOMEventTarget)
Comment 3•14 years ago
|
||
(In reply to comment #1)
> There's probably more that I'm forgetting.
In other words nsINode, Window, whatever inherits nsDOMEventTargetHelper
and Worker's global.
Reporter | ||
Comment 4•14 years ago
|
||
Olli, is it too late to change this in DOM 3 Events (realising of course that it is not written in Web IDL, though)?
Comment 5•14 years ago
|
||
I don't see how this has anything to do with DOM 3 Events.
Reporter | ||
Comment 6•14 years ago
|
||
Er yeah, my mistake, it's an issue for DOM Core etc.
![]() |
||
Updated•12 years ago
|
Depends on: ParisBindings
![]() |
||
Comment 7•12 years ago
|
||
I believe this is done now, yes? Anything left to do here?
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•