X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FDocument.js;h=c1122ecf7c3852f940cff560fc5d4f125cdb83cc;hb=75cbc4ce04c9c01ac47671cb01320ce699128d00;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=303d27b1550e836fa5cc884a17259b84d071831d;p=roojs1 diff --git a/Roo/Document.js b/Roo/Document.js index e69de29bb2..c1122ecf7c 100644 --- a/Roo/Document.js +++ b/Roo/Document.js @@ -0,0 +1,46 @@ +/* + * RooJS Library + * Copyright(c) 2007-2017, Roo J Solutions Ltd + * + * Licence LGPL + * + */ + +/** + * @class Roo.Document + * @extends Roo.util.Observable + * This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......) + * + * @param {Object} config the methods and properties of the 'base' class for the application. + * + * Generic Page handler - implement this to start your app.. + * + * eg. + * MyProject = new Roo.Document({ + events : { + 'load' : true // your events.. + }, + listeners : { + 'ready' : function() { + // fired on Roo.onReady() + } + } + * + */ +Roo.Document = function(cfg) { + + this.addEvents({ + 'ready' : true + }); + Roo.util.Observable.call(this,cfg); + + var _this = this; + + Roo.onReady(function() { + _this.fireEvent('ready'); + },null,false); + + +} + +Roo.extend(Roo.Document, Roo.util.Observable, {}); \ No newline at end of file