Skip to content

Commit

Permalink
Merge pull request #3371 from pingwang2011/timob-11294
Browse files Browse the repository at this point in the history
timob-11294: Android: console: log functions fail in commonjs require
  • Loading branch information
ayeung committed Nov 1, 2012
2 parents 5697046 + c3ee7ba commit 8aac847
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/modules/ui/src/js/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var EventEmitter = require("events").EventEmitter,
url = require("url"),
path = require('path'),
Script = kroll.binding('evals').Script,
NativeModule = require('native_module'),
bootstrap = require('bootstrap'),
PersistentHandle = require('ui').PersistentHandle;

Expand Down Expand Up @@ -346,6 +347,7 @@ exports.bootstrapWindow = function(Titanium) {
// Set up the global object which is needed when calling the Ti.include function from the new window context.
scopeVars.global = context;
context.Titanium = context.Ti = new Titanium.Wrapper(scopeVars);
context.console = NativeModule.require('console');
bootstrap.bootstrapGlobals(context, Titanium);

var scriptPath = this.resolveFilePathFromURL(resolvedUrl);
Expand Down

0 comments on commit 8aac847

Please sign in to comment.