Sha256: 9b50698a650acd0038e8c9bd4f41ae94a82502d5c73cd563dfacbe1593a3fab8

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

module Browser; module DOM; class Event

class DeviceProximity < Event
  def self.supported?
    not $$[:DeviceProximityEvent].nil?
  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

  def self.create(name, &block)
    new(`new DeviceProximityEvent(#{name}, #{Definition.new(&block)})`)
  end

  alias_native :value
  alias_native :min
  alias_native :max
end

end; end; end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opal-browser-0.1.0.beta1 opal/browser/dom/event/device_proximity.rb