/*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
}\r
\r
function updateIFrame (token) {\r
- var html = ['<html><body><div id="state">',token,'</div></body></html>'].join('');\r
+ var html = ['<html><body><div id="state">',Ext.util.Format.htmlEncode(token),'</div></body></html>'].join('');\r
try {\r
var doc = iframe.contentWindow.document;\r
doc.open();\r
* @property\r
*/\r
iframeId: 'x-history-frame',\r
- \r
+\r
events:{},\r
\r
/**\r
* Initialize the global History instance.\r
* @param {Boolean} onReady (optional) A callback function that will be called once the history\r
* component is fully initialized.\r
- * @param {Object} scope (optional) The callback scope\r
+ * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser window.\r
*/\r
init: function (onReady, scope) {\r
if(ready) {\r
if (Ext.isIE) {\r
iframe = Ext.getDom(Ext.History.iframeId);\r
}\r
- this.addEvents('ready', 'change');\r
+ this.addEvents(\r
+ /**\r
+ * @event ready\r
+ * Fires when the Ext.History singleton has been initialized and is ready for use.\r
+ * @param {Ext.History} The Ext.History singleton.\r
+ */\r
+ 'ready',\r
+ /**\r
+ * @event change\r
+ * Fires when navigation back or forwards within the local page's history occurs.\r
+ * @param {String} token An identifier associated with the page state at that point in its history.\r
+ */\r
+ 'change'\r
+ );\r
if(onReady){\r
this.on('ready', onReady, scope, {single:true});\r
}\r