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