blob: 057ad37c57456f156759e2b2ef6064941351d3be [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.
enum OrientationLockType {
"any",
"natural",
"landscape",
"portrait",
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};
enum OrientationType {
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};
[
GarbageCollected,
RuntimeEnabled=ScreenOrientation
] interface ScreenOrientation : EventTarget {
readonly attribute unsigned short angle;
readonly attribute DOMString type;
[CallWith=ScriptState] Promise lock(OrientationLockType orientation);
void unlock();
attribute EventHandler onchange;
};