orientation-event.idl (2418B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Device Orientation and Motion (https://w3c.github.io/deviceorientation/) 5 6 partial interface Window { 7 [SecureContext] attribute EventHandler ondeviceorientation; 8 }; 9 10 [Exposed=Window, SecureContext] 11 interface DeviceOrientationEvent : Event { 12 constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict = {}); 13 readonly attribute double? alpha; 14 readonly attribute double? beta; 15 readonly attribute double? gamma; 16 readonly attribute boolean absolute; 17 18 static Promise<PermissionState> requestPermission(optional boolean absolute = false); 19 }; 20 21 dictionary DeviceOrientationEventInit : EventInit { 22 double? alpha = null; 23 double? beta = null; 24 double? gamma = null; 25 boolean absolute = false; 26 }; 27 28 partial interface Window { 29 [SecureContext] attribute EventHandler ondeviceorientationabsolute; 30 }; 31 32 [Exposed=Window, SecureContext] 33 interface DeviceMotionEventAcceleration { 34 readonly attribute double? x; 35 readonly attribute double? y; 36 readonly attribute double? z; 37 }; 38 39 [Exposed=Window, SecureContext] 40 interface DeviceMotionEventRotationRate { 41 readonly attribute double? alpha; 42 readonly attribute double? beta; 43 readonly attribute double? gamma; 44 }; 45 46 partial interface Window { 47 [SecureContext] attribute EventHandler ondevicemotion; 48 }; 49 50 [Exposed=Window, SecureContext] 51 interface DeviceMotionEvent : Event { 52 constructor(DOMString type, optional DeviceMotionEventInit eventInitDict = {}); 53 readonly attribute DeviceMotionEventAcceleration? acceleration; 54 readonly attribute DeviceMotionEventAcceleration? accelerationIncludingGravity; 55 readonly attribute DeviceMotionEventRotationRate? rotationRate; 56 readonly attribute double interval; 57 58 static Promise<PermissionState> requestPermission(); 59 }; 60 61 dictionary DeviceMotionEventAccelerationInit { 62 double? x = null; 63 double? y = null; 64 double? z = null; 65 }; 66 67 dictionary DeviceMotionEventRotationRateInit { 68 double? alpha = null; 69 double? beta = null; 70 double? gamma = null; 71 }; 72 73 dictionary DeviceMotionEventInit : EventInit { 74 DeviceMotionEventAccelerationInit acceleration; 75 DeviceMotionEventAccelerationInit accelerationIncludingGravity; 76 DeviceMotionEventRotationRateInit rotationRate; 77 double interval = 0; 78 };