blob: f46ee2916ae65f3a798f9d1747a663c0b3ff0512 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/screen-orientation/#screenorientation-interface
enum OrientationLockType {
"any",
"natural",
"landscape",
"portrait",
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};
enum OrientationType {
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};
interface ScreenOrientation : EventTarget {
[MeasureAs=ScreenOrientationAngle] readonly attribute unsigned short angle;
[MeasureAs=ScreenOrientationType] readonly attribute DOMString type;
[CallWith=ScriptState, MeasureAs=ScreenOrientationLock] Promise lock(OrientationLockType orientation);
[MeasureAs=ScreenOrientationUnlock] void unlock();
attribute EventHandler onchange;
};