Upgrade to ExtJS 3.1.1 - Released 02/08/2010
[extjs.git] / docs / source / History.html
index d1fcbd5..48d103e 100644 (file)
@@ -1,17 +1,12 @@
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.History"></div>/**\r
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js"><div id="cls-Ext.History"></div>/**\r
  * @class Ext.History\r
  * @extends Ext.util.Observable\r
  * History management component that allows you to register arbitrary tokens that signify application\r
@@ -40,7 +35,7 @@ Ext.History = (function () {
     }\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
@@ -124,14 +119,14 @@ Ext.History = (function () {
          * @property\r
          */\r
         iframeId: 'x-history-frame',\r
-        \r
+\r
         events:{},\r
 \r
         <div id="method-Ext.History-init"></div>/**\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
@@ -148,7 +143,20 @@ Ext.History = (function () {
             if (Ext.isIE) {\r
                 iframe = Ext.getDom(Ext.History.iframeId);\r
             }\r
-            this.addEvents('ready', 'change');\r
+            this.addEvents(\r
+                <div id="event-Ext.History-ready"></div>/**\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
+                <div id="event-Ext.History-change"></div>/**\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
@@ -207,6 +215,6 @@ tabPanel.on('tabchange', function(tabPanel, tab){
         }\r
     };\r
 })();\r
-Ext.apply(Ext.History, new Ext.util.Observable());</pre>
-</body>
+Ext.apply(Ext.History, new Ext.util.Observable());</pre>    \r
+</body>\r
 </html>
\ No newline at end of file