W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2002

UA implementation of initMouseEvent

From: Brad Pettit <bradp@microsoft.com>
Date: Mon, 8 Apr 2002 18:20:50 -0700
Message-ID: <3013537455C0D1459746B2AE2DF47AEA06972792@svc-msg-01.northamerica.corp.microsoft.com>
To: <www-dom@w3.org>
Both screen coordinates and client coordinates are passed to initMouseEvent.

Since specifying coordinates in one system defines the coordinates in the other, should the UA perform any validation of coordinates passed to initMouseEvent?

Is there any discussion of enhancing mouse events for DOM3? I'd like to propose the following:

Since client/view coordinates infer screen coordinates (and vice versa), and target coordinates infer client/view coordinates, initMouseEvent could take one set of coordinates and a boolean instead of two sets of coordinates. The boolean would specify whether the coordinates are TARGET-relative or VIEW-relative. This also simplifies the dynamic generation of mouse events within script, because the script only need specify target-relative coordinates.

Also, since it may be common for a listener to want the target-relative coordinates of a mouse event, add targetX and targetY as properties of a MouseEvent.

Brad Pettit
Microsoft Corp.
Received on Monday, 8 April 2002 21:21:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC