Roo/Document.js
[roojs1] / Roo / Document.js
1 /*
2  * RooJS Library 
3  * Copyright(c) 2007-2017, Roo J Solutions Ltd
4  *
5  * Licence LGPL 
6  *
7  */
8  
9 /**
10  * @class Roo.Document
11  * @extends Roo.util.Observable
12  * This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......)
13  * 
14  * @param {Object} config the methods and properties of the 'base' class for the application.
15  * 
16  */
17 /**
18  * 
19  *  Generic Page handler - implement this to start your app..
20  * 
21  * 
22  * 
23  * eg.
24  *  MyProject = new Roo.Document({
25         events : {
26             'load' : true // your events..
27         },
28         listeners : {
29             'ready' : function() {
30                 // fired on Ext.onReady()
31             }
32         }
33  * 
34  */
35 Roo.Document = function(cfg) {
36      
37     this.addEvents({ 
38         'ready' : true
39     });
40     Roo.util.Observable.call(this,cfg);
41     var _this = this;
42     Roo.onReady(function() {
43         _this.fireEvent('ready');
44     },null,false);
45     
46 }
47 Roo.extend(Roo.Document, Roo.util.Observable, {});