boot.js 695 B

123456789101112131415
  1. // (c) 2009, Herbert Vojčík
  2. // Licensed by MIT license (http://www.opensource.org/licenses/mit-license.php)
  3. (function() {
  4. var _an = appjet._native;
  5. var tableid = _an.storage_get("obj-root", "bootTable").value;
  6. var appBoot = _an.storage_get(tableid, request.headers.Host).value;
  7. var name, queue = appjet._internal.queue = appBoot ? appBoot.split(",") : ["0", "", "lib-0"];
  8. appjet.appName = queue.shift();
  9. appjet.mainDomain = queue.shift() || _an.storage_get("obj-root", "defaultDomain").value;
  10. while((queue = appjet._internal.queue) && (name = queue.shift())) {
  11. var agent = import({}, name);
  12. if (typeof agent.runAgent === "function") { agent.runAgent(queue); }
  13. }
  14. })();