46 bytes, text/x-phabricator-request
|Details | Review|
Looks like other browsers support it as basically aliases of screenX / screenY, and that they're not willing to remove them, see: * https://github.com/w3c/csswg-drafts/issues/1091 * https://bugs.chromium.org/p/chromium/issues/detail?id=695572
Boris, would you have anything against doing this, provided relevant spec changes are made?
given that there are also other weird aliases for other coordinates, it is somewhat hard to argue why not do this.
Alright, I can implement this once the tests and the spec are sorted out.
Assignee: nobody → emilio
I'd also argue that screenLeft and screenTop are *better* names than screenX and screenY since they make the coordinate system clearer. (For RTL use cases you might even want screenRight...)
No objections to doing this.
Tests are at https://github.com/web-platform-tests/wpt/pull/13543. Spec is waiting on those, but this matches all other browsers.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/7b427b166742 Add window.screenLeft / window.screenTop as aliases of screenX / screenY. r=smaug
Note to docs team: I have added a note to the Fx 64 rel notes to cover this: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/64#APIs The ref pages will both need writing, and compat data updating, when this is documented.
Documented: I added new pages for the new properties, and also improved the pages for screenX/screenY: https://developer.mozilla.org/en-US/docs/Web/API/Window/screenLeft https://developer.mozilla.org/en-US/docs/Web/API/Window/screenTop https://developer.mozilla.org/en-US/docs/Web/API/Window/screenX https://developer.mozilla.org/en-US/docs/Web/API/Window/screenY The pages link to a fun little demo I wrote to demonstrate how the properties work: https://mdn.github.io/dom-examples/screenleft-screentop/ I also added the relevant compat data: https://github.com/mdn/browser-compat-data/pull/3106 Let me know if this looks OK. Thanks!
You need to log in before you can comment on or make changes to this bug.