Skip to content

Commit

Permalink
Sync'ed with February 16 2016 Device Orientation spec
Browse files Browse the repository at this point in the history
  • Loading branch information
plehegar authored and sideshowbarker committed Jan 31, 2017
1 parent 5c5fd36 commit f57fd75
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions orientation-event/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@
interface Event {
};

interface EventHandler {
};

dictionary EventInit {
};

interface Window {
};
</pre>

<pre id='idl'>
partial interface Window {
attribute EventHandler ondeviceorientation;
attribute EventHandler ondevicemotion;
};

[Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict)]
interface DeviceOrientationEvent : Event {
readonly attribute double? alpha;
Expand All @@ -32,20 +43,20 @@
};

dictionary DeviceOrientationEventInit : EventInit {
double? alpha;
double? beta;
double? gamma;
boolean absolute;
double? alpha = null;
double? beta = null;
double? gamma = null;
boolean absolute = false;
};

[Callback, NoInterfaceObject]
[NoInterfaceObject]
interface DeviceAcceleration {
readonly attribute double? x;
readonly attribute double? y;
readonly attribute double? z;
};

[Callback, NoInterfaceObject]
[NoInterfaceObject]
interface DeviceRotationRate {
readonly attribute double? alpha;
readonly attribute double? beta;
Expand All @@ -60,11 +71,23 @@
readonly attribute double? interval;
};

dictionary DeviceAccelerationInit {
double? x = null;
double? y = null;
double? z = null;
};

dictionary DeviceRotationRateInit {
double? alpha = null;
double? beta = null;
double? gamma = null;
};

dictionary DeviceMotionEventInit : EventInit {
DeviceAcceleration? acceleration;
DeviceAcceleration? accelerationIncludingGravity;
DeviceRotationRate? rotationRate;
double? interval;
double? interval = null;
};
</pre>

Expand Down

0 comments on commit f57fd75

Please sign in to comment.