<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API: history History (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
<link rel="stylesheet" type="text/css" href="assets/api.css" />
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
<h3>history <span class="subtitle">3.0.0</span></h3>
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
> <a href="./module_history.html" title="history">history</a>
> History
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
Class <b property="yui:name">History</b>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
This class represents an instance of the browser history utility.
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<strong property="yui:name">History</strong>
<code>
(
)
</code>
<div class="description">
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="private" rel="yui:method" resource="#method__checkIframeLoaded">
<h4>
<a name="method__checkIframeLoaded">_checkIframeLoaded</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_checkIframeLoaded</strong>
(
)
</code>
<div class="description" property="yui:description">
Periodically checks whether our internal IFrame is ready to be used
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__getHash">
<h4>
<a name="method__getHash">_getHash</a></h4>
<div class="detail" >
<code>
private
string
<strong property="yui:name">_getHash</strong>
(
)
</code>
<div class="description" property="yui:description">
Returns the portion of the hash after the '#' symbol.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
string
</code></dt>
<dd property="yui:returnInfo">The hash portion of the document's location</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__handleFQStateChange">
<h4>
<a name="method__handleFQStateChange">_handleFQStateChange</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_handleFQStateChange</strong>
(
fqstate
)
</code>
<div class="description" property="yui:description">
Sets the new currentState attribute of all modules depending on the new fully
qualified state. Also notifies the modules which current state has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">fqstate</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> fully qualified state</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__initialize">
<h4>
<a name="method__initialize">_initialize</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_initialize</strong>
(
)
</code>
<div class="description" property="yui:description">
Finish up the initialization of the browser utility library.
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__storeStates">
<h4>
<a name="method__storeStates">_storeStates</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_storeStates</strong>
(
)
</code>
<div class="description" property="yui:description">
Stores the initial state and current state for all registered modules
in the (hidden) form field specified during initialization.
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__updateIFrame">
<h4>
<a name="method__updateIFrame">_updateIFrame</a></h4>
<div class="detail" >
<code>
private
boolean
<strong property="yui:name">_updateIFrame</strong>
(
)
</code>
<div class="description" property="yui:description">
Update the IFrame with our new state.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
boolean
</code></dt>
<dd property="yui:returnInfo">true if successful. false otherwise.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getBookmarkedState">
<h4>
<a name="method_getBookmarkedState">getBookmarkedState</a></h4>
<div class="detail" >
<code>
string
<strong property="yui:name">getBookmarkedState</strong>
(
moduleId
)
</code>
<div class="description" property="yui:description">
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.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">moduleId</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Non-empty string representing your module.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
string
</code></dt>
<dd property="yui:returnInfo">The bookmarked state of the specified module.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getCurrentState">
<h4>
<a name="method_getCurrentState">getCurrentState</a></h4>
<div class="detail" >
<code>
string
<strong property="yui:name">getCurrentState</strong>
(
moduleId
)
</code>
<div class="description" property="yui:description">
Returns the current state of the specified module.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">moduleId</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Non-empty string representing your module.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
string
</code></dt>
<dd property="yui:returnInfo">The current state of the specified module.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getQueryStringParameter">
<h4>
<a name="method_getQueryStringParameter">getQueryStringParameter</a></h4>
<div class="detail" >
<code>
string
<strong property="yui:name">getQueryStringParameter</strong>
(
paramName
,
queryString
)
</code>
<div class="description" property="yui:description">
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.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">paramName</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Name of the parameter we want to look up.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">queryString</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Optional URL to look at. If not specified,
this method uses the URL in the address bar.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
string
</code></dt>
<dd property="yui:returnInfo">The value of the specified parameter, or null.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_initialize">
<h4>
<a name="method_initialize">initialize</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">initialize</strong>
(
stateField
,
historyIFrame
)
</code>
<div class="description" property="yui:description">
Initializes the Browser History Manager. Call this method
from a script block located right after the opening body tag.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">stateField</span>
<<span property="yui:type">string|HTML Element</span>>
</code>
<span property="yui:description"> <input type="hidden"> used
to store application states. Must be in the static markup.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">historyIFrame</span>
<<span property="yui:type">string|HTML Element</span>>
</code>
<span property="yui:description"> IFrame used to store
the history (only required for IE6/7)</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_multiNavigate">
<h4>
<a name="method_multiNavigate">multiNavigate</a></h4>
<div class="detail" >
<code>
boolean
<strong property="yui:name">multiNavigate</strong>
(
states
)
</code>
<div class="description" property="yui:description">
Stores a new entry in the browser history by changing the state
of several registered modules in one atomic operation.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">states</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> Associative array of module-state pairs to set simultaneously.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
boolean
</code></dt>
<dd property="yui:returnInfo">Indicates whether the new state was successfully added to the history.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_navigate">
<h4>
<a name="method_navigate">navigate</a></h4>
<div class="detail" >
<code>
boolean
<strong property="yui:name">navigate</strong>
(
module
,
state
)
</code>
<div class="description" property="yui:description">
Stores a new entry in the browser history by changing the state of a registered module.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">module</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Non-empty string representing your module.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">state</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> String representing the new state of the specified module.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
boolean
</code></dt>
<dd property="yui:returnInfo">Indicates whether the new state was successfully added to the history.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_register">
<h4>
<a name="method_register">register</a></h4>
<div class="detail" >
<code>
History.Module
<strong property="yui:name">register</strong>
(
moduleId
,
initialState
)
</code>
<div class="description" property="yui:description">
Registers a new module.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">moduleId</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> Non-empty string uniquely identifying the
module you wish to register.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">initialState</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> The initial state of the specified
module corresponding to its earliest history entry.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
History.Module
</code></dt>
<dd property="yui:returnInfo">The newly registered module</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
<div class="section method details">
<h3 id="events">Events</h3>
<div class="content">
<div class="" rel="yui:event" resource="#event_history:globalStateChange">
<h4>
<a name="event_history:globalStateChange">history:globalStateChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">history:globalStateChange</strong>
(
)
</code>
<div class="description" property="yui:description">
Fires when the global state of the page has changed (that is,
when the state of at least one browser history module has changed)
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_history:moduleStateChange">
<h4>
<a name="event_history:moduleStateChange">history:moduleStateChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">history:moduleStateChange</strong>
(
)
</code>
<div class="description" property="yui:description">
Fires when the state of a history module object has changed
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_history:ready">
<h4>
<a name="event_history:ready">history:ready</a></h4>
<div class="detail">
<code>
<strong property="yui:name">history:ready</strong>
(
)
</code>
<div class="description" property="yui:description">
Fires when the browser history utility is ready
</div>
<div class="description">
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:attributes" resource="#configattributes">
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_anim.html" title="anim">anim</a></li>
<li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li>
<li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
<li class=""><a href="module_base.html" title="base">base</a></li>
<li class=""><a href="module_cache.html" title="cache">cache</a></li>
<li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
<li class=""><a href="module_collection.html" title="collection">collection</a></li>
<li class=""><a href="module_console.html" title="console">console</a></li>
<li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
<li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
<li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
<li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
<li class=""><a href="module_dd.html" title="dd">dd</a></li>
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
<li class=""><a href="module_dump.html" title="dump">dump</a></li>
<li class=""><a href="module_event.html" title="event">event</a></li>
<li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
<li class="selected"><a href="module_history.html" title="history">history</a></li>
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
<li class=""><a href="module_io.html" title="io">io</a></li>
<li class=""><a href="module_json.html" title="json">json</a></li>
<li class=""><a href="module_node.html" title="node">node</a></li>
<li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
<li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
<li class=""><a href="module_oop.html" title="oop">oop</a></li>
<li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
<li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
<li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li>
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
<li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
<li class=""><a href="module_test.html" title="test">test</a></li>
<li class=""><a href="module_widget.html" title="widget">widget</a></li>
<li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
<li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
<li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
<li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
<li class=""><a href="module_yui.html" title="yui">yui</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class="selected"><a href="History.html" title="History">History</a></li>
<li class=""><a href="History.Module.html" title="History.Module">History.Module</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="history.js.html" title="history.js">history.js</a></li>
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class="private"><a href="#method__checkIframeLoaded" title="_checkIframeLoaded">_checkIframeLoaded</a></li>
<li class="private"><a href="#method__getHash" title="_getHash">_getHash</a></li>
<li class="private"><a href="#method__handleFQStateChange" title="_handleFQStateChange">_handleFQStateChange</a></li>
<li class="private"><a href="#method__initialize" title="_initialize">_initialize</a></li>
<li class="private"><a href="#method__storeStates" title="_storeStates">_storeStates</a></li>
<li class="private"><a href="#method__updateIFrame" title="_updateIFrame">_updateIFrame</a></li>
<li class=""><a href="#method_getBookmarkedState" title="getBookmarkedState">getBookmarkedState</a></li>
<li class=""><a href="#method_getCurrentState" title="getCurrentState">getCurrentState</a></li>
<li class=""><a href="#method_getQueryStringParameter" title="getQueryStringParameter">getQueryStringParameter</a></li>
<li class=""><a href="#method_initialize" title="initialize">initialize</a></li>
<li class=""><a href="#method_multiNavigate" title="multiNavigate">multiNavigate</a></li>
<li class=""><a href="#method_navigate" title="navigate">navigate</a></li>
<li class=""><a href="#method_register" title="register">register</a></li>
</ul>
</div>
<div id="eventsList" class="module">
<h4>Events</h4>
<ul class="content">
<li class=""><a href="#event_history:globalStateChange" title="history:globalStateChange">history:globalStateChange</a></li>
<li class=""><a href="#event_history:moduleStateChange" title="history:moduleStateChange">history:moduleStateChange</a></li>
<li class=""><a href="#event_history:ready" title="history:ready">history:ready</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2009 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
ALL_YUI_PROPS = [{"access": "private", "host": "History", "name": "_checkIframeLoaded", "url": "History.html#method__checkIframeLoaded", "type": "method"}, {"access": "", "host": "History", "name": "getBookmarkedState", "url": "History.html#method_getBookmarkedState", "type": "method"}, {"access": "", "host": "History", "name": "getCurrentState", "url": "History.html#method_getCurrentState", "type": "method"}, {"access": "private", "host": "History", "name": "_getHash", "url": "History.html#method__getHash", "type": "method"}, {"access": "", "host": "History", "name": "getQueryStringParameter", "url": "History.html#method_getQueryStringParameter", "type": "method"}, {"access": "private", "host": "History", "name": "_handleFQStateChange", "url": "History.html#method__handleFQStateChange", "type": "method"}, {"access": "", "host": "History", "name": "history:globalStateChange", "url": "History.html#event_history:globalStateChange", "type": "event"}, {"access": "", "host": "History", "name": "history:moduleStateChange", "url": "History.html#event_history:moduleStateChange", "type": "event"}, {"access": "", "host": "History", "name": "history:ready", "url": "History.html#event_history:ready", "type": "event"}, {"access": "private", "host": "History", "name": "_initialize", "url": "History.html#method__initialize", "type": "method"}, {"access": "", "host": "History", "name": "initialize", "url": "History.html#method_initialize", "type": "method"}, {"access": "", "host": "History", "name": "multiNavigate", "url": "History.html#method_multiNavigate", "type": "method"}, {"access": "", "host": "History", "name": "navigate", "url": "History.html#method_navigate", "type": "method"}, {"access": "", "host": "History", "name": "register", "url": "History.html#method_register", "type": "method"}, {"access": "private", "host": "History", "name": "_storeStates", "url": "History.html#method__storeStates", "type": "method"}, {"access": "private", "host": "History", "name": "_updateIFrame", "url": "History.html#method__updateIFrame", "type": "method"}];
</script>
</body>
</html>