[DOM3 Events] initMouseEvent() and initWheelEvent() don't take same arguments

Hello, I realized a in D3E spec.

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents

>   void                              initMouseEvent(DOMString typeArg,
>                                                    boolean canBubbleArg,
>                                                    boolean cancelableArg,
>                                                    AbstractView viewArg,
>                                                    long detailArg,
>                                                    long screenXArg,
>                                                    long screenYArg,
>                                                    long clientXArg,
>                                                    long clientYArg,
>                                                    boolean ctrlKeyArg,
>                                                    boolean altKeyArg,
>                                                    boolean shiftKeyArg,
>                                                    boolean metaKeyArg,
>                                                    unsigned short buttonArg,										
>                                                    EventTarget relatedTargetArg);

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent

>   void                             initWheelEvent(DOMString typeArg,
>                                                   boolean canBubbleArg,
>                                                   boolean cancelableArg,
>                                                   AbstractView viewArg,
>                                                   long detailArg,
>                                                   long screenXArg,
>                                                   long screenYArg,
>                                                   long clientXArg,
>                                                   long clientYArg,
>                                                   unsigned short buttonArg,
>                                                   EventTarget relatedTargetArg,
>                                                   DOMString modifiersListArg,
>                                                   float deltaXArg,
>                                                   float deltaYArg,
>                                                   float deltaZArg,
>                                                   unsigned long deltaMode);

initMouseEvent() takes bool ctrlKeyArg, altKeyArg, shiftKeyArg and 
metaKeyArg.  However, initWheelEvent() takes DOMString modifiersListArg.

For consistency with KeyboardEvent and compatibility with IE, 
initMouseEvent() should take DOMString modifiersListArg. If not so, Web 
developers cannot initialize the other key states such as CapsLock, 
NumLock or Win key.

Additionally, document for initWheelEvent() refers initMouseEvent()'s 
modifiersListArg document.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-event-type-initWheelEvent

I think that initMouseEvent() should be:

>   void                              initMouseEvent(DOMString typeArg,
>                                                    boolean canBubbleArg,
>                                                    boolean cancelableArg,
>                                                    AbstractView viewArg,
>                                                    long detailArg,
>                                                    long screenXArg,
>                                                    long screenYArg,
>                                                    long clientXArg,
>                                                    long clientYArg,
>                                                    unsigned short buttonArg,
>                                                    EventTarget relatedTargetArg,
>                                                    DOMString modifiersListArg); ;

-- 
Masayuki Nakano <masayuki@d-toybox.com>
Manager, Internationalization, Mozilla Japan.

Received on Thursday, 1 March 2012 09:01:03 UTC