diff options
-rw-r--r-- | src/headless.js | 2 | ||||
-rw-r--r-- | src/jsifier.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/headless.js b/src/headless.js index 097a42f7..1c7b8945 100644 --- a/src/headless.js +++ b/src/headless.js @@ -23,6 +23,7 @@ var window = { return '%s'; }, search: '?%s', + pathname: '%s', }, fakeNow: 0, // we don't use Date.now() rafs: [], @@ -84,6 +85,7 @@ var window = { }, revokeObjectURL: function(x) {}, }, + encodeURIComponent: function(x) { return x }, }; var setTimeout = window.setTimeout; var document = { diff --git a/src/jsifier.js b/src/jsifier.js index 8884e24f..c7742288 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1806,7 +1806,7 @@ function JSify(data, functionsOnly, givenFunctions) { } if (HEADLESS) { print('if (!ENVIRONMENT_IS_WEB) {'); - print(read('headless.js').replace("'%s'", "'http://emscripten.org'").replace("'?%s'", "''").replace('%s,', 'null,').replace('%d', '0')); + print(read('headless.js').replace("'%s'", "'http://emscripten.org'").replace("'?%s'", "''").replace("'?%s'", "'/'").replace('%s,', 'null,').replace('%d', '0')); print('}'); } if (RUNTIME_TYPE_INFO) { |