diff --git a/index.html b/index.html index 0ef0762..954e217 100644 --- a/index.html +++ b/index.html @@ -312,6 +312,55 @@

+
+

+ Extensions to the `Window` interface +

+
+        partial interface Window {
+          readonly attribute short orientation;
+          attribute EventHandler onorientationchange;
+        };
+      
+
+

+ `orientation` attribute +

+

+ When getting the {{Window/orientation}} attribute, the [=user agent=] MUST run + the following steps: +

+
    +
  1. Let |orientationAngle| be the [=Screen/current orientation angle=]. +
  2. +
  3. If |orientationAngle| is less than 180, return |orientationAngle|. +
  4. +
  5. If |orientationAngle| is 180, and the [=user agent=] supports that value, + return |orientationAngle|, else return 0. +
  6. +
  7. If |orientationAngle| is greater than 180, return |orientationAngle| - 360. +
  8. +
+

+ User agents MUST support the `-90`, `0` and `90` values and MAY optionally support `180`. +

+

+ `0` represents the natural orientation, `-90` represents 90 degrees clockwise, + `90` represents 90 degrees counterclockwise, and `180` represents 180 degrees + from natural orientation. +

+
+
+

+ `onorientationchange` event handler attribute +

+

+ The {{Window/onorientationchange}} attribute is an [=event handler IDL attribute=] for + the {{Window/onorientationchange}} [=event handler=], whose [=event handler event type=] + is orientationchange. +

+
+

Extensions to the `Screen` interface @@ -813,6 +862,9 @@

  • [=Fire an event=] named "change" at |screenOrientation|.
  • +
  • [=Fire an event=] named "orientationchange" at |document|'s [=relevant global object=]. +
  • Let |descendantDocs| be an [=ordered set=] consisting of