Class: Browser::History
- Includes:
- Native::Wrapper
- Defined in:
- lib/browser/history.rb,
lib/isomorfeus/preact/ssr/history.rb
Instance Method Summary collapse
- #back ⇒ Object
- #forward ⇒ Object
- #go(a) ⇒ Object
- #length ⇒ Object (also: #size)
- #push_state(state, title = '', url = nil) ⇒ Object
- #replace_state(state, title = '', url = nil) ⇒ Object
- #scroll_restoration ⇒ Object
- #scroll_restoration=(s) ⇒ Object
- #state ⇒ Object
Instance Method Details
#back ⇒ Object
3 |
# File 'lib/isomorfeus/preact/ssr/history.rb', line 3 def back; end |
#forward ⇒ Object
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 |
#length ⇒ Object 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_restoration ⇒ Object
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 |
#state ⇒ Object
28 29 30 |
# File 'lib/browser/history.rb', line 28 def state ::Hash.new(`#@native.state`) end |