https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 2ecb5abe933bc46e324ea1a1f8528a844b99e762 authored by kaixinjxq on 14 March 2018, 02:09:20 UTC
Add sensor tests that throw NotSupportedError when set an unsupported option
Tip revision: 2ecb5ab
screen-orientation.idl
partial interface Screen {
    [SameObject]
    readonly attribute ScreenOrientation orientation;
};
[Exposed=Window]
interface ScreenOrientation : EventTarget {
    Promise<void> lock(OrientationLockType orientation);
    void          unlock();
    readonly attribute OrientationType type;
    readonly attribute unsigned short  angle;
             attribute EventHandler    onchange;
};
enum OrientationType {
    "portrait-primary",
    "portrait-secondary",
    "landscape-primary",
    "landscape-secondary"
};
enum OrientationLockType {
    "any",
    "natural",
    "landscape",
    "portrait",
    "portrait-primary",
    "portrait-secondary",
    "landscape-primary",
    "landscape-secondary"
};
back to top