X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/src/util/History.js?ds=inline diff --git a/src/util/History.js b/src/util/History.js index b50f8f56..435a3216 100644 --- a/src/util/History.js +++ b/src/util/History.js @@ -1,5 +1,5 @@ /*! - * 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 @@ -33,7 +33,7 @@ Ext.History = (function () { } function updateIFrame (token) { - var html = ['
',token,'
'].join(''); + var html = ['
',Ext.util.Format.htmlEncode(token),'
'].join(''); try { var doc = iframe.contentWindow.document; doc.open(); @@ -117,14 +117,14 @@ Ext.History = (function () { * @property */ iframeId: 'x-history-frame', - + events:{}, /** * Initialize the global History instance. * @param {Boolean} onReady (optional) A callback function that will be called once the history * component is fully initialized. - * @param {Object} scope (optional) The callback scope + * @param {Object} scope (optional) The scope (this reference) in which the callback is executed. Defaults to the browser window. */ init: function (onReady, scope) { if(ready) { @@ -141,7 +141,20 @@ Ext.History = (function () { if (Ext.isIE) { iframe = Ext.getDom(Ext.History.iframeId); } - this.addEvents('ready', 'change'); + this.addEvents( + /** + * @event ready + * Fires when the Ext.History singleton has been initialized and is ready for use. + * @param {Ext.History} The Ext.History singleton. + */ + 'ready', + /** + * @event change + * Fires when navigation back or forwards within the local page's history occurs. + * @param {String} token An identifier associated with the page state at that point in its history. + */ + 'change' + ); if(onReady){ this.on('ready', onReady, scope, {single:true}); }