1 //---------------------------------------------------------------- 2 // global static "appjet" object 3 //---------------------------------------------------------------- 4 5 /** 6 * @fileOverview The global appjet object contains access to the AppJet runtime, 7 * app meta-data, and other information. 8 */ 9 10 /** 11 * @type object 12 */ 13 appjet = {}; 14 15 /** 16 * This is the interface to the native AppJet VM. You probably won't need 17 * to use this, but if you do, be careful! 18 * @type object 19 */ 20 appjet._native = _appjetnative_; 21 22 /** 23 * Holds whether the current request is a preview request. 24 * @type boolean 25 */ 26 appjet.isPreview = _appjetnative_.isPreview(); 27 28 /** 29 * Holds whether we are currently executing in a shell session. 30 * @type boolean 31 */ 32 appjet.isShell = _appjetnative_.isShell(); 33 34 /** 35 * Holds whether the app is "transient", that is, created by a user 36 * without an account. 37 * @type boolean 38 */ 39 appjet.isTransient = _appjetnative_.isTransient(); 40 41 /** 42 * The domain this app is running on. For app "foo" hosted at 43 * "foo.appjet.net", for example, this will be "appjet.net". 44 * When AppJet eventually supports hosting at other domains, this 45 * may be something other than "appjet.net". 46 * @type string 47 */ 48 appjet.mainDomain = _appjetnative_.mainDomain(); 49 50 /** 51 * The current app's encoded app key. This is useful for constructing 52 * links to AppJet pages, such as http://appjet.com/app/<appKey>/source. 53 * @type number 54 */ 55 appjet.encodedAppKey = _appjetnative_.encodedAppKey(); 56 57 /** 58 * Holds the name of the current app. 59 * @type String 60 */ 61 appjet.appName = _appjetnative_.appName(); 62 63 //---------------------------------------------------------------- 64 // internal appjet stuff 65 //---------------------------------------------------------------- 66 67 /** @ignore */ 68 appjet._internal = {}; 69 /** @ignore */ 70 appjet._internal.global = this; // store definitive reference to global scope 71 72