Skip to content
Szikszai Gusztáv edited this page Apr 5, 2015 · 4 revisions

The wrapper for the native window is the DOM::Window (documentation) module.

It has the following APIs:

  • hash - Gets and sets the hash of the location native object
  • scroll_x and scroll_y - Returns the scroll position of the window
  • It has the events module included so events can be used on it
DOM::Window.on :hashchange do
  puts DOM::Window.hash
end

DOM::Window.hash = 'test'
Clone this wiki locally