WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
67824
[meta] Events should have constructors
https://bugs.webkit.org/show_bug.cgi?id=67824
Summary
[meta] Events should have constructors
Kentaro Hara
Reported
2011-09-08 18:01:12 PDT
The following Events have the specs for their constructors: Event, CustomEvent, ProgressEvent The following Events do not yet have the specs for their constructors, and we are now proposing the specs: UIEvent, MouseEvent, KeyboardEvent, WheelEvent, TextEvent, CompositionEvent, HashChangeEvent, MessageEvent, ErrorEvent, PageTransitionEvent, PopStateEvent, CloseEvent The following Events do not yet have the specs for their constructors and will not have the specs, since these Events are WebKit-specific. We need to implement these constructors based on the current IDL of initXXXXXXEvent(): BeforeLoadEvent, WebKitAnimationEvent, WebKitTransitionEvent, OverflowEvent We will not implement constructors for the following Events, since these Events will be deprecated: MutationEvent
Attachments
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2011-09-11 22:49:11 PDT
The specs for constructors of the following events are now defined: HashChangeEvent
http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent
MessageEvent
http://www.whatwg.org/specs/web-apps/current-work/#messageevent
ErrorEvent
http://dev.w3.org/html5/workers/#errorevent
PageTransitionEvent
http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent
PopStateEvent
http://www.whatwg.org/specs/web-apps/current-work/#popstateevent
CloseEvent
http://dev.w3.org/html5/websockets/#closeevent
Kentaro Hara
Comment 2
2011-10-13 17:17:12 PDT
Current progress: Event, CustomEvent, ProgressEvent => Done. Specs are defined and constructors are implemented. UIEvent, MouseEvent, KeyboardEvent, WheelEvent, TextEvent, CompositionEvent => On-going. Specs are under discussion. After the specs are defined, I will implement constructors for these Events. HashChangeEvent, MessageEvent, ErrorEvent, PageTransitionEvent, PopStateEvent, CloseEvent => Done. Specs are defined and constructors are implemented. BeforeLoadEvent, WebKitAnimationEvent, WebKitTransitionEvent, OverflowEvent => Done. No specs because they are WebKit-specific. Constructors are implemented. MutationEvent => I will not implement this, since MutationEvent is going to be deprecated. And I will fix the follow-up bugs:
https://bugs.webkit.org/show_bug.cgi?id=67926
https://bugs.webkit.org/show_bug.cgi?id=67927
https://bugs.webkit.org/show_bug.cgi?id=67980
Simon Fraser (smfr)
Comment 3
2012-01-09 18:01:58 PST
What about keyboard events?
Kentaro Hara
Comment 4
2012-01-09 18:06:41 PST
http://html5labs.interoperabilitybridges.com/dom4events/(In
reply to
comment #3
)
> What about keyboard events?
I've been asking the spec author to define the spec (but it has been taking so loooooooong time...). After the spec is defined, I'd really want to implement them. I'll ping the spec author again. Spec draft:
http://html5labs.interoperabilitybridges.com/dom4events/
Kentaro Hara
Comment 5
2012-03-02 05:45:25 PST
(In reply to
comment #4
)
>
http://html5labs.interoperabilitybridges.com/dom4events/(In
reply to
comment #3
) > > What about keyboard events? > > I've been asking the spec author to define the spec (but it has been taking so loooooooong time...). After the spec is defined, I'd really want to implement them. I'll ping the spec author again. > > Spec draft: >
http://html5labs.interoperabilitybridges.com/dom4events/
I've triggered the www-dom@ discussion several times, but it seems to be stopped again...
http://lists.w3.org/Archives/Public/www-dom/2012JanMar/0132.html
As far as I understand, www-dom@ people have reached a consensus on Event constructors (i.e. new XXXEvent()). The spec writer is trying to move the spec draft to w3.org but nothing has happened for one month:)
Kentaro Hara
Comment 6
2012-03-21 16:41:29 PDT
Regarding the specs of Event constructors, the discussion was re-triggered in W3C bugzilla and another MSFT person took over the spec writing, but consequently the bug was marked as "LATER"...
https://www.w3.org/Bugs/Public/show_bug.cgi?id=14051
Daniel Freedman
Comment 7
2012-09-25 15:24:27 PDT
Has there been any additional movement on this? The PointerEvents submission (
http://www.w3.org/Submission/pointer-events/
) is written to use an Event Constructor, and I'd hate to see them have to make an initPointerEvent.
Adam Barth
Comment 8
2012-09-25 15:58:00 PDT
New events should use event constructors rather than initFooEvent. We even have support for it in the code generator.
Kentaro Hara
Comment 9
2012-09-25 17:01:15 PDT
(In reply to
comment #7
)
> Has there been any additional movement on this? The PointerEvents submission (
http://www.w3.org/Submission/pointer-events/
) is written to use an Event Constructor, and I'd hate to see them have to make an initPointerEvent.
Events should have constructors, as Adam pointed out. That being said, the tricky part is that PointerEvent inherit MouseEvent, which does not yet have a constructor. I've been asking MSFT guys to spec the MouseEvent constructor for a long time but the bug was marked as LATER (
https://www.w3.org/Bugs/Public/show_bug.cgi?id=14051
). Either way, it's the time to restart the discussion: - I'll ask Jacob Rossi and Travis Leithead about the timeline for DOM4 constructors. Given that the PointerEvent constructor is speced by Jacob, I hope they are now interested in working on the DOM4 constructors. - If it will take more time to spec the DOM4 constructors, I will start discussion in webkit-dev@ about whether it is OK to implement the DOM4 constructors without waiting for the spec. If we could reach the consensus, I can start the implementation. (Nit: Implementing constructors for MouseEvent and KeyboardEvent is a bit trickier than other constructors.)
Daniel Freedman
Comment 10
2013-02-22 14:21:08 PST
Awesome work on all these event constructors! Now that we have constructor syntax for MouseEvents, could we add the buttons property to MouseEvent that is specified in DOM Level 3 Events? Relevant WebKit bug:
https://bugs.webkit.org/show_bug.cgi?id=81855
.
Kentaro Hara
Comment 11
2013-02-22 14:25:47 PST
(In reply to
comment #10
)
> Now that we have constructor syntax for MouseEvents, could we add the buttons property to MouseEvent that is specified in DOM Level 3 Events? Relevant WebKit bug:
https://bugs.webkit.org/show_bug.cgi?id=81855
.
Sounds reasonable to me.
Anne van Kesteren
Comment 12
2023-05-09 05:56:24 PDT
This was completed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug