Closed
Bug 1314303
Opened 9 years ago
Closed 8 years ago
Support extra event types from spec in document.createEvent()
Categories
(Core :: DOM: Events, defect, P3)
Core
DOM: Events
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: ayg, Unassigned)
References
Details
The legacy API document.createEvent() supports only a limited set of event types, while all new event types should have only constructors. Browsers differ in which types they support. The spec has a list at <https://dom.spec.whatwg.org/#dom-document-createevent> which boils down to "supported by at least two implementations" (IIRC). Bug 1251198 deals with removing event types that are supported by no other UA, which might have compat implications. This bug is to add all the types that the spec says to add, which should be simpler. We should also all all the corresponding init*Event() methods, although they need to be checked carefully against the spec and other UAs.
One of the tests we fail because of this: http://w3c-test.org/dom/events/EventTarget-dispatchEvent.html
| Reporter | ||
Comment 1•9 years ago
|
||
This lists which of the spec's types works and what init methods it has in the current browser: https://jsfiddle.net/s53w679y/1/
The ones we're missing are as follows. Unless otherwise noted, Chrome supports all of them in createEvent() but has no special initializer, which seemingly doesn't make much sense; Safari does not support; and Edge supports with an initializer.
* AnimationEvent: Removed in bug 868751.
* CloseEvent: Removed in bug 1161950.
* ErrorEvent
* FocusEvent
* IDBVersionChangeEvent: Edge also has no initializer.
* PageTransitionEvent: Edge also has no initializer.
* ProgressEvent: Removed in bug 843489.
* TrackEvent: Edge also has no initializer.
* TransitionEvent: Removed in bug 868751.
* WebGLContextEvent: Edge also has no initializer.
* WheelEvent: Safari does support, with an initWebKitWheelEvent initializer.
Does supporting these with no special initializer make any sense? If not, we should probably update the spec to remove the ones that are not supported with an initializer by at least one browser (perhaps at least two). In most cases, these events are supported properly only by Edge. I filed a spec bug: https://github.com/whatwg/dom/issues/362
Blocks: 1161950
| Reporter | ||
Comment 2•9 years ago
|
||
(So very possibly this bug will be WONTFIX, if they're removed from the spec. If I had realized, I'd've waited for the spec bug to be finished before filing this one.)
Updated•9 years ago
|
Priority: -- → P3
Updated•9 years ago
|
Keywords: dev-doc-needed
Comment 3•9 years ago
|
||
At least ProgressEvent got removed, the rest is still TBD.
| Reporter | ||
Comment 4•8 years ago
|
||
I think we want the spec to change here, not Firefox. We can reopen if a final decision is made to keep any of these in the spec.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•