Namespace: History

OC.Util.History

Utility class for the history API, includes fallback to using the URL hash when the browser doesn't support the history API.
Source:

Methods

(static) _parseHashQuery()

Parse a query string from the hash part of the URL. (workaround for IE8 / IE9)
Source:

(static) _pushState(params, urlopt, replaceopt)

Push the current URL parameters to the history stack and change the visible URL. Note: this includes a workaround for IE8/IE9 that uses the hash part instead of the search part.
Parameters:
Name Type Attributes Default Description
params Object | string to append to the URL, can be either a string or a map
url string <optional>
URL to be used, otherwise the current URL will be used, using the params as query string
replace boolean <optional>
false whether to replace instead of pushing
Source:

(static) addOnPopStateHandler(handler)

Add a popstate handler
Parameters:
Name Type Description
handler function
Source:

(static) parseUrlQuery()

Parse the query/search part of the URL. Also try and parse it from the URL hash (for IE8)
Source:
Returns:
map of parameters

(static) pushState(params, urlopt)

Push the current URL parameters to the history stack and change the visible URL. Note: this includes a workaround for IE8/IE9 that uses the hash part instead of the search part.
Parameters:
Name Type Attributes Description
params Object | string to append to the URL, can be either a string or a map
url string <optional>
URL to be used, otherwise the current URL will be used, using the params as query string
Source:

(static) replaceState(params, urlopt)

Push the current URL parameters to the history stack and change the visible URL. Note: this includes a workaround for IE8/IE9 that uses the hash part instead of the search part.
Parameters:
Name Type Attributes Description
params Object | string to append to the URL, can be either a string or a map
url string <optional>
URL to be used, otherwise the current URL will be used, using the params as query string
Source: