|
| 1 | +partial interface Window { |
| 2 | + [SecureContext] attribute EventHandler ondeviceorientation; |
| 3 | +}; |
| 4 | + |
| 5 | +[Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict), Exposed=Window, SecureContext] |
| 6 | +interface DeviceOrientationEvent : Event { |
| 7 | + readonly attribute double? alpha; |
| 8 | + readonly attribute double? beta; |
| 9 | + readonly attribute double? gamma; |
| 10 | + readonly attribute boolean absolute; |
| 11 | + |
| 12 | + static Promise<PermissionState> requestPermission(); |
| 13 | +}; |
| 14 | + |
| 15 | +dictionary DeviceOrientationEventInit : EventInit { |
| 16 | + double? alpha = null; |
| 17 | + double? beta = null; |
| 18 | + double? gamma = null; |
| 19 | + boolean absolute = false; |
| 20 | +}; |
| 21 | + |
| 22 | +enum PermissionState { |
| 23 | + "granted", |
| 24 | + "denied", |
| 25 | +}; |
| 26 | + |
| 27 | +partial interface Window { |
| 28 | + [SecureContext] attribute EventHandler ondeviceorientationabsolute; |
| 29 | +}; |
| 30 | + |
| 31 | +partial interface Window { |
| 32 | + attribute EventHandler oncompassneedscalibration; |
| 33 | +}; |
| 34 | + |
| 35 | +partial interface Window { |
| 36 | + [SecureContext] attribute EventHandler ondevicemotion; |
| 37 | +}; |
| 38 | + |
| 39 | +[SecureContext] |
| 40 | +interface DeviceMotionEventAcceleration { |
| 41 | + readonly attribute double? x; |
| 42 | + readonly attribute double? y; |
| 43 | + readonly attribute double? z; |
| 44 | +}; |
| 45 | + |
| 46 | +[SecureContext] |
| 47 | +interface DeviceMotionEventRotationRate { |
| 48 | + readonly attribute double? alpha; |
| 49 | + readonly attribute double? beta; |
| 50 | + readonly attribute double? gamma; |
| 51 | +}; |
| 52 | + |
| 53 | +[Constructor(DOMString type, optional DeviceMotionEventInit eventInitDict), Exposed=Window, SecureContext] |
| 54 | +interface DeviceMotionEvent : Event { |
| 55 | + readonly attribute DeviceMotionEventAcceleration? acceleration; |
| 56 | + readonly attribute DeviceMotionEventAcceleration? accelerationIncludingGravity; |
| 57 | + readonly attribute DeviceMotionEventRotationRate? rotationRate; |
| 58 | + readonly attribute double interval; |
| 59 | + |
| 60 | + static Promise<PermissionState> requestPermission(); |
| 61 | +}; |
| 62 | + |
| 63 | +dictionary DeviceMotionEventAccelerationInit { |
| 64 | + double? x = null; |
| 65 | + double? y = null; |
| 66 | + double? z = null; |
| 67 | +}; |
| 68 | + |
| 69 | +dictionary DeviceMotionEventRotationRateInit { |
| 70 | + double? alpha = null; |
| 71 | + double? beta = null; |
| 72 | + double? gamma = null; |
| 73 | +}; |
| 74 | + |
| 75 | +dictionary DeviceMotionEventInit : EventInit { |
| 76 | + DeviceMotionEventAccelerationInit acceleration; |
| 77 | + DeviceMotionEventAccelerationInit accelerationIncludingGravity; |
| 78 | + DeviceMotionEventRotationRateInit rotationRate; |
| 79 | + double interval = 0; |
| 80 | +}; |
0 commit comments