Method: Browser::History#replace

Defined in:
opal/browser/history.rb

#replace(item, data = nil) ⇒ Object

Replace the current history item with another.

Parameters:

  • item (String)

    the item to replace with

  • data (Object) (defaults to: nil)

    additional state to replace



47
48
49
# File 'opal/browser/history.rb', line 47

def replace(item, data = nil)
  `#@native.replaceState(#{data.to_n}, null, item)`
end