W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2016

[csswg-drafts] [cssom-view] window.innerScreenX windows.innderScreenY

From: Jan Nordén via GitHub <sysbot+gh@w3.org>
Date: Thu, 15 Dec 2016 13:38:28 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-195807514-1481809106-sysbot+gh@w3.org>
JanNorden has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [cssom-view] window.innerScreenX windows.innderScreenY ==
For the browser as such it is possible to obtain both the dimensions 
and the posititon on the (operating system) screen area:

https://drafts.csswg.org/cssom-view/#dom-window-outerwidth
https://drafts.csswg.org/cssom-view/#dom-window-outerheight
https://drafts.csswg.org/cssom-view/#dom-window-screenx
https://drafts.csswg.org/cssom-view/#dom-window-screenx

However, for the viewPort it is only possible to obtain the 
dimensions, not the position:

https://drafts.csswg.org/cssom-view/#dom-window-innerwidth
https://drafts.csswg.org/cssom-view/#dom-window-innerheight

The fact that the position is not available makes it impossible to 
translate coordinates on the screen to coordinates in the viewport.

I therefore propose the addition of corresponding innerScreenX and 
innerScreenY properties.

Since this translation is already performed by e.g. 
window.onMouseMove(), implementing the properties should not present 
any new technical or conceptual challenges.

The need arises when you get (OS) screen coordinates from some 
non-mouse source (in our particular case an gaze-tracking device), and
 want to relate them to the corresponding position in the displayed 
document.

There are non-standard implementations, e.g. mozInnerScreenX 
https://developer.mozilla.org/en-US/docs/Web/API/Window/mozInnerScreenX.

A previous requests for another vendor-specific implementation was 
declined awaiting standardization 
https://bugs.chromium.org/p/chromium/issues/detail?id=151983 .





Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/809 using your GitHub 
account
Received on Thursday, 15 December 2016 13:38:34 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:27 UTC