Start updating the boot kernel for more node-webkit integration

The goal is to make it possible to use the Node.js boot code under
node-webkit, so that we can directly load wiki folders
This commit is contained in:
Jermolene
2014-01-14 14:09:04 +00:00
parent aefc7b7ce2
commit c7fb0bd349
2 changed files with 33 additions and 12 deletions
+6 -4
View File
@@ -16,7 +16,12 @@ var _bootprefix = (function($tw) {
"use strict";
$tw = $tw || {browser: typeof(window) !== "undefined" ? {} : null};
$tw = $tw || {};
// Detect platforms
$tw.browser = typeof(window) !== "undefined" ? {} : null;
$tw.node = typeof(process) === "object" ? {} : null;
$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null;
/*
Information about each module is kept in an object with these members:
@@ -92,6 +97,3 @@ if(typeof(exports) === "undefined") {
// Export functionality as a module
exports.bootprefix = _bootprefix;
}