class Browser::Location

Allows manipulation of a location, usually from {Window} and {DOM::Document}.

@see developer.mozilla.org/en-US/docs/Web/API/Location

Public Instance Methods

assign(url) click to toggle source

Change the location.

@param url [String, to_s] the URL to go to

# File lib/wedge/plugins/location.rb, line 12
def assign(url)
  `#@native.assign(#{url.to_s})`
end
reload(force = false) click to toggle source

Reload the page.

@param force [Boolean] whether to force the reload

# File lib/wedge/plugins/location.rb, line 26
def reload(force = false)
  `#@native.reload(force)`
end
replace(url) click to toggle source

Replace the current URL.

@param url [String, to_s] the URL to go to

# File lib/wedge/plugins/location.rb, line 19
def replace(url)
  `#@native.replace(#{url.to_s})`
end
to_s() click to toggle source

Convert the location to a string.

# File lib/wedge/plugins/location.rb, line 31
def to_s
  `#@native.toString()`
end