<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 9/14/2010 5:00 AM, Ashley Sheridan wrote:
<blockquote cite="mid:1284465655.2230.35.camel@localhost"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="GENERATOR" content="GtkHTML/3.26.3">
<br>
I'm not entirely sure that this is possible. As far as I know (and
I could be very wrong) the events start with the OS and work their
way down the system to eventually reach the Javascript through a
user agent, so if the mouse has moved off of the user agent
(browser) then it may not be possible to access the current
coordinates. The browser would only be aware of the coordinates
that it was last passed by the OS, i.e. only those in it's own
window space. A browser could offer up the last known coordinates,
but if the cursor is beyond the region of a browser window for
example, then the browser would be passing across the wrong
values. This might not matter for most cases, but then again, I
can't foresee much use for having the coordinates of a cursor that
triggered no event. The only time a user agent might be aware of
the correct coordinates and no event would be triggered would be
where the cursor was over part of the user agent that wasn't the
web page, like the menubar, etc.<br>
</blockquote>
Even if the browser could tell you the mouse coordinates of a cursor
that wasn't over the content/frame in question, doing so would be a
serious security problem.<br>
<br>
The only way this would make sense is for the omitted arguments to
reflect the last mouse event you received... but that's more ugly
than simply remembering them from that last event yourself.<br>
<br>
Matthew Kaufman<br>
</body>
</html>