DeviceOrientationEvent.webidl (1426B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 */ 6 7 [Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit, 8 Exposed=Window] 9 interface DeviceOrientationEvent : Event 10 { 11 constructor(DOMString type, 12 optional DeviceOrientationEventInit eventInitDict = {}); 13 14 readonly attribute double? alpha; 15 readonly attribute double? beta; 16 readonly attribute double? gamma; 17 readonly attribute boolean absolute; 18 19 // initDeviceOrientationEvent is a Gecko specific deprecated method. 20 undefined initDeviceOrientationEvent(DOMString type, 21 optional boolean canBubble = false, 22 optional boolean cancelable = false, 23 optional double? alpha = null, 24 optional double? beta = null, 25 optional double? gamma = null, 26 optional boolean absolute = false); 27 }; 28 29 dictionary DeviceOrientationEventInit : EventInit 30 { 31 double? alpha = null; 32 double? beta = null; 33 double? gamma = null; 34 boolean absolute = false; 35 };