opal/browser/event/device_motion.rb in opal-browser-0.2.0 vs opal/browser/event/device_motion.rb in opal-browser-0.3.0
- old
+ new
@@ -1,7 +1,9 @@
module Browser; class Event
class DeviceMotion < Event
+ handles 'devicemotion'
+
def self.supported?
Browser.supports? 'Event.DeviceMotion'
end
Acceleration = Struct.new(:x, :y, :z)