Sha256: bd7cbe87429e382bd8f7ba8add0ec9beb79fe48e6bef6fcb56879f19beade1f6

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

module Browser; class Event

class DeviceProximity < Event
  def self.supported?
    Browser.supports? 'Event.DeviceProximity'
  end

  class Definition < Definition
    def value=(value)
      `#@native.value = #{value}`
    end

    def min=(value)
      `#@native.min = #{value}`
    end

    def max=(value)
      `#@native.max = #{value}`
    end
  end

  if Browser.supports? 'Event.constructor'
    def self.construct(name, desc)
      `new DeviceProximityEvent(#{name}, #{desc})`
    end
  end if supported?

  alias_native :value
  alias_native :min
  alias_native :max
end

end; end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
diamonds-0.1.5 lib/diamonds/opal/browser/event/device_proximity.rb
opal-browser-0.2.0 opal/browser/event/device_proximity.rb