public/javascripts/yui/history/history-debug.js
function (stateField, histFrame) {

            if (_initialized) {
                // The browser history manager has already been initialized.
                return;
            }

            if (YAHOO.env.ua.opera && typeof history.navigationMode !== "undefined") {
                // Disable Opera's fast back/forward navigation mode and puts
                // it in compatible mode. This makes anchor-based history
                // navigation work after the page has been navigated away
                // from and re-activated, at the cost of slowing down
                // back/forward navigation to and from that page.
                history.navigationMode = "compatible";
            }

            if (typeof stateField === "string") {
                stateField = document.getElementById(stateField);
            }

            if (!stateField ||
                stateField.tagName.toUpperCase() !== "TEXTAREA" &&
                (stateField.tagName.toUpperCase() !== "INPUT" ||
                 stateField.type !== "hidden" &&
                 stateField.type !== "text")) {
                throw new Error("Missing or invalid argument");
            }

            _stateField = stateField;

            // IE < 8 or IE8 in quirks mode or IE7 standards mode
            if (YAHOO.env.ua.ie && (typeof document.documentMode === "undefined" || document.documentMode < 8)) {

                if (typeof histFrame === "string") {
                    histFrame = document.getElementById(histFrame);
                }

                if (!histFrame || histFrame.tagName.toUpperCase() !== "IFRAME") {
                    throw new Error("Missing or invalid argument");
                }

                _histFrame = histFrame;
            }

            // Note that the event utility MUST be included inline in the page.
            // If it gets loaded later (which you may want to do to improve the
            // loading speed of your site), the onDOMReady event never fires,
            // and the history library never gets fully initialized.
            YAHOO.util.Event.onDOMReady(_initialize);
        }
function (stateField, histFrame) {

            if (_initialized) {
                // The browser history manager has already been initialized.
                return;
            }

            if (YAHOO.env.ua.opera && typeof history.navigationMode !== "undefined") {
                // Disable Opera's fast back/forward navigation mode and puts
                // it in compatible mode. This makes anchor-based history
                // navigation work after the page has been navigated away
                // from and re-activated, at the cost of slowing down
                // back/forward navigation to and from that page.
                history.navigationMode = "compatible";
            }

            if (typeof stateField === "string") {
                stateField = document.getElementById(stateField);
            }

            if (!stateField ||
                stateField.tagName.toUpperCase() !== "TEXTAREA" &&
                (stateField.tagName.toUpperCase() !== "INPUT" ||
                 stateField.type !== "hidden" &&
                 stateField.type !== "text")) {
                throw new Error("Missing or invalid argument");
            }

            _stateField = stateField;

            // IE < 8 or IE8 in quirks mode or IE7 standards mode
            if (YAHOO.env.ua.ie && (typeof document.documentMode === "undefined" || document.documentMode < 8)) {

                if (typeof histFrame === "string") {
                    histFrame = document.getElementById(histFrame);
                }

                if (!histFrame || histFrame.tagName.toUpperCase() !== "IFRAME") {
                    throw new Error("Missing or invalid argument");
                }

                _histFrame = histFrame;
            }

            // Note that the event utility MUST be included inline in the page.
            // If it gets loaded later (which you may want to do to improve the
            // loading speed of your site), the onDOMReady event never fires,
            // and the history library never gets fully initialized.
            YAHOO.util.Event.onDOMReady(_initialize);
        }
function ( stateField , histFrame ) { if ( _initialized ) { // The browser history manager has already been initialized. return ; } if ( YAHOO . env . ua . opera && typeof history . navigationMode !== "undefined" ) { // Disable Opera's fast back/forward navigation mode and puts // it in compatible mode. This makes anchor-based history // navigation work after the page has been navigated away // from and re-activated, at the cost of slowing down // back/forward navigation to and from that page. history . navigationMode = "compatible" ; } if ( typeof stateField === "string" ) { stateField = document . getElementById ( stateField ) ; } if ( ! stateField || stateField . tagName . toUpperCase ( ) !== "TEXTAREA" && ( stateField . tagName . toUpperCase ( ) !== "INPUT" || stateField . type !== "hidden" && stateField . type !== "text" ) ) { throw new Error ( "Missing or invalid argument" ) ; } _stateField = stateField ; // IE < 8 or IE8 in quirks mode or IE7 standards mode if ( YAHOO . env . ua . ie && ( typeof document . documentMode === "undefined" || document . documentMode < 8 ) ) { if ( typeof histFrame === "string" ) { histFrame = document . getElementById ( histFrame ) ; } if ( ! histFrame || histFrame . tagName . toUpperCase ( ) !== "IFRAME" ) { throw new Error ( "Missing or invalid argument" ) ; } _histFrame = histFrame ; } // Note that the event utility MUST be included inline in the page. // If it gets loaded later (which you may want to do to improve the // loading speed of your site), the onDOMReady event never fires, // and the history library never gets fully initialized. YAHOO . util . Event . onDOMReady ( _initialize ) ; }
Initializes the Browser History Manager. Call this method
from a script block located right after the opening body tag.

@method initialize
@param {string|HTML Element} stateField <input type="hidden"> used
to store application states. Must be in the static markup.
@param {string|HTML Element} histFrame IFrame used to store
the history (only required on Internet Explorer)
@public
Initializes the Browser History Manager . Call this method from a script block located right after the opening body tag .