This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25346 - Redefine initMouseEvent()
Summary: Redefine initMouseEvent()
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 09:45 UTC by Arkadiusz Michalski (Spirit)
Modified: 2014-04-15 20:46 UTC (History)
4 users (show)

See Also:


Attachments

Description Arkadiusz Michalski (Spirit) 2014-04-15 09:45:19 UTC
At this moment this method is not compatibile with old D2E. Define one additional parameter (buttons) may throwing error (like in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=995795).

Actual WebIDL def:
void initMouseEvent (DOMString type, boolean bubbles, boolean cancelable,
		     Window? view, long detail, long screenX,
		     long screenY, long clientX, long clientY,
		     boolean ctrlKey, boolean altKey, boolean shiftKey,
		     boolean metaKey, short button, unsigned short buttons
		     EventTarget? relatedTarget);

Maybe it will better if D3E spec add this new parameter at the end of method (
and even make it optional), sth like this:

void initMouseEvent (DOMString type, boolean bubbles, boolean cancelable,
		     Window? view, long detail, long screenX,
		     long screenY, long clientX, long clientY,
		     boolean ctrlKey, boolean altKey, boolean shiftKey,
		     boolean metaKey, short button, EventTarget? relatedTarget,
		     optional unsigned short buttons);

Btw, can you brake all init*Event method in D3E spec after some parameters (3 or 4)? Now we have all in one line and this causes an unnecessary scrollbar in bottom.
Comment 1 Anne 2014-04-15 10:03:51 UTC
Why is initMouseEvent() changed anyway? I thought it was pretty clear that init*Event() methods are obsolete and should not be altered...
Comment 2 Arkadiusz Michalski (Spirit) 2014-04-15 10:12:00 UTC
(In reply to Anne from comment #1)
> I thought it was pretty clear that init*Event() methods are obsolete and should not be altered...

With respect to this I wondering why initEvent() is not mark as obsolete (https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#widl-Event-initEvent) and maybe moving to "Legacy Event Initializer Interfaces".
Comment 3 Gary Kacmarcik 2014-04-15 20:46:32 UTC
|buttons| should not have been added to initMouseEvent.  Removed in latest ED.


>Btw, can you brake all init*Event method in D3E spec after some parameters (3 or 4)? Now we have all in one line and this causes an unnecessary scrollbar in bottom.

The ugly formatting is auto-formatted by respec. I don't know of a way to tell respec to wrap the parameters.