mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 23:53:20 +00:00
32 lines
837 B
Text
32 lines
837 B
Text
![]() |
#import <DOM/EventHandler.idl>
|
||
|
|
||
|
// https://w3c.github.io/screen-orientation/#orientationtype-enum
|
||
|
enum OrientationType {
|
||
|
"portrait-primary",
|
||
|
"portrait-secondary",
|
||
|
"landscape-primary",
|
||
|
"landscape-secondary"
|
||
|
};
|
||
|
|
||
|
// https://w3c.github.io/screen-orientation/#orientationlocktype-enum
|
||
|
enum OrientationLockType {
|
||
|
"any",
|
||
|
"natural",
|
||
|
"landscape",
|
||
|
"portrait",
|
||
|
"portrait-primary",
|
||
|
"portrait-secondary",
|
||
|
"landscape-primary",
|
||
|
"landscape-secondary"
|
||
|
};
|
||
|
|
||
|
// https://w3c.github.io/screen-orientation/#screenorientation-interface
|
||
|
[Exposed=Window]
|
||
|
interface ScreenOrientation : EventTarget {
|
||
|
Promise<undefined> lock(OrientationLockType orientation);
|
||
|
undefined unlock();
|
||
|
readonly attribute OrientationType type;
|
||
|
readonly attribute unsigned short angle;
|
||
|
attribute EventHandler onchange;
|
||
|
};
|