Sha256: 85c912645f766296b8a6d6aeda43edfda08dfc277deb080a3eb8d704fa9790e5

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

# backtick_javascript: true

module Browser; class Event

class HashChange < Event
  handles 'hashchange'

  def self.supported?
    Browser.supports? 'Event.HashChange'
  end

  class Definition < Definition
    alias_native :old=, :oldURL=
    alias_native :new=, :newURL=
  end

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

  alias_native :old, :oldURL
  alias_native :new, :newURL
end

end; end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-browser-0.3.5 opal/browser/event/hash_change.rb
opal-browser-0.3.4 opal/browser/event/hash_change.rb