Class: Browser::History

Inherits:
Object show all
Includes:
Native::Wrapper
Defined in:
lib/browser/history.rb,
lib/isomorfeus/preact/ssr/history.rb

Instance Method Summary collapse

Instance Method Details

#backObject



3
# File 'lib/isomorfeus/preact/ssr/history.rb', line 3

def back; end

#forwardObject



4
# File 'lib/isomorfeus/preact/ssr/history.rb', line 4

def forward; end

#go(a) ⇒ Object



5
# File 'lib/isomorfeus/preact/ssr/history.rb', line 5

def go(a); end

#lengthObject Also known as: size



7
8
9
# File 'lib/isomorfeus/preact/ssr/history.rb', line 7

def length
  0
end

#push_state(state, title = '', url = nil) ⇒ Object



12
13
14
# File 'lib/browser/history.rb', line 12

def push_state(state, title = '', url = `null`)
  `#@native.pushState(#{state.to_n}, #{title}, #{url})`
end

#replace_state(state, title = '', url = nil) ⇒ Object



16
17
18
# File 'lib/browser/history.rb', line 16

def replace_state(state, title = '', url = `null`)
  `#@native.replaceState(#{state.to_n}, #{title}, #{url})`
end

#scroll_restorationObject



20
21
22
# File 'lib/browser/history.rb', line 20

def scroll_restoration
  `#@native.scrollRestoration`
end

#scroll_restoration=(s) ⇒ Object



24
25
26
# File 'lib/browser/history.rb', line 24

def scroll_restoration=(s)
  `#@native.scrollRestoration = #{s}`
end

#stateObject



28
29
30
# File 'lib/browser/history.rb', line 28

def state
  ::Hash.new(`#@native.state`)
end