Backed out changeset 2a94e8bad21e (bug 1874716) for causing CXX related build bustage...
[gecko.git] / dom / webidl / DeviceOrientationEvent.webidl
blob6d2e44f0be86126456cd2f375d6d5c9fd1cf5060
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  */
7 [Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit,
8  Exposed=Window]
9 interface DeviceOrientationEvent : Event
11   constructor(DOMString type,
12               optional DeviceOrientationEventInit eventInitDict = {});
14   readonly attribute double? alpha;
15   readonly attribute double? beta;
16   readonly attribute double? gamma;
17   readonly attribute boolean absolute;
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);
29 dictionary DeviceOrientationEventInit : EventInit
31   double? alpha = null;
32   double? beta = null;
33   double? gamma = null;
34   boolean absolute = false;