Skip to content

Commit c76ef6d

Browse files
committed
Add window.screenLeft and window.screenTop as aliases
Given that usage of these attributes are high and that they are implemented in Chrome, WebKit, and Edge, standardization seems like the best option for screenLeft and screenTop. Add them into the spec as simple aliases of screenX and screenY. Fixes w3c#1091.
1 parent e6409b4 commit c76ef6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cssom-view-1/Overview.bs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ partial interface Window {
471471

472472
// client
473473
[Replaceable] readonly attribute long screenX;
474+
[Replaceable] readonly attribute long screenLeft;
474475
[Replaceable] readonly attribute long screenY;
476+
[Replaceable] readonly attribute long screenTop;
475477
[Replaceable] readonly attribute long outerWidth;
476478
[Replaceable] readonly attribute long outerHeight;
477479
[Replaceable] readonly attribute double devicePixelRatio;
@@ -626,12 +628,12 @@ user agent must run these steps:
626628
1. Add the value of {{scrollY}} to the {{ScrollToOptions/top}} dictionary member.
627629
1. Act as if the {{Window/scroll()}} method was invoked with <var>options</var> as the only argument.
628630

629-
The <dfn attribute for=Window>screenX</dfn> attribute must return the x-coordinate,
631+
The <dfn attribute for=Window>screenX</dfn> and <dfn attribute for=Window>screenLeft</dfn> attributes must return the x-coordinate,
630632
relative to the origin of the <a>Web-exposed screen area</a>, of the left of
631633
the client window as number of <a lt=px value>CSS pixels</a>, or zero if there is no such
632634
thing. <!--fingerprint-->
633635

634-
The <dfn attribute for=Window>screenY</dfn> attribute must return the y-coordinate,
636+
The <dfn attribute for=Window>screenY</dfn> and <dfn attribute for=Window>screenTop</dfn> attributes must return the y-coordinate,
635637
relative to the origin of the screen of the <a>Web-exposed screen area</a>, of the top of
636638
the client window as number of <a lt=px value>CSS pixels</a>, or zero if there is no such
637639
thing. <!--fingerprint-->

0 commit comments

Comments
 (0)