The History class provides the ability to use the back/forward navigation
buttons in a DHTML application. It also allows a DHTML application to
be bookmarked in a specific state.
INPUT field (with type="hidden" or type="text") or TEXTAREA.
This field keeps the value of the initial state, current state
the list of all states across pages within a single browser session.
location.hash is a bit buggy on Opera. I have seen instances where
navigating the history using the back/forward buttons, and hence
changing the URL, would not change location.hash. That's ok, the
implementation of an equivalent is trivial.
Sets the new currentState attribute of all modules depending on the new
fully qualified state. Also notifies the modules which current state has
changed.
Stores all the registered modules' initial state and current state.
On Safari, we also store all the fully qualified states visited by
the application within a single browser session. The storage takes
place in the form field specified during initialization.
Returns the state of a module according to the URL fragment
identifier. This method is useful to initialize your modules
if your application was bookmarked from a particular state.
Parameters:
module
<string>
Non-empty string representing your module.
Returns the value of the specified query string parameter.
This method is not used internally by the Browser History Manager.
However, it is provided here as a helper since many applications
using the Browser History Manager will want to read the value of
url parameters to initialize themselves.
Parameters:
paramName
<string>
Name of the parameter we want to look up.
queryString
<string>
Optional URL to look at. If not specified,
this method uses the URL in the address bar.
Executes the supplied callback when the Browser History Manager is
ready. This will execute immediately if called after the Browser
History Manager onLoad event has fired.
Parameters:
fn
<function>
what to execute when the Browser History Manager is ready.
obj
<object>
an optional object to be passed back as a parameter to fn.
override
<boolean|object>
If true, the obj passed in becomes fn's execution scope.
Fired when the Browser History Manager is ready. If you subscribe to
this event after the Browser History Manager has been initialized,
it will not fire. Therefore, it is recommended to use the onReady
method instead.