W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

Re: MouseEvent: pageX/Y, offsetX/Y

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 13 Jul 2010 11:32:05 +0200
To: www-dom@w3.org, "Hallvord R. M. Steen" <hallvord@opera.com>
Message-ID: <op.vfrzfra564w2qv@annevk-t60>
On Fri, 02 Jul 2010 12:20:04 +0200, Hallvord R. M. Steen  
<hallvord@opera.com> wrote:
> The MouseEvent spec covers neither event.pageX/pageY nor  
> event.offsetX/offsetY. The former specifies event coordinates relative  
> to top of document and the latter coordinates relative to the contents  
> of nearest scrollable ancestor container.
>
> Simulating either in JavaScript in a way that takes scrolling of any  
> scrollable element into account is a bit convoluted, all the 4 major  
> engines already support some of this (Gecko lacks support for  
> event.offset*, IE for event.page*, Opera and WebKit supports both though  
> Opera copies IE's offset* implementation more correctly for elements  
> with borders).
>
> I suggest we should include at least event.offsetX/Y in the spec.

http://dev.w3.org/csswg/cssom-view/


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 13 July 2010 09:32:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT