diff --git a/CHANGELOG.md b/CHANGELOG.md index dd413fe..a23775d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # drafter.js Changelog +## 2.6.4 + +### Bug Fixes + +- Drafter.js will no longer override `Module` allowing drafter.js users to + [override the emscripten execution + environment](https://kripken.github.io/emscripten-site/docs/api_reference/module.html#overriding-execution-environment). + + ## 2.6.3 This update now uses Drafter 3.2.3. Please see [Drafter diff --git a/ext/drafter b/ext/drafter index 3c38036..d81c529 160000 --- a/ext/drafter +++ b/ext/drafter @@ -1 +1 @@ -Subproject commit 3c38036caf09fe8d8cbad592f77040b592541abe +Subproject commit d81c5298ec70adf4bc1072dcdda0acb5227474bf diff --git a/package.json b/package.json index 8000a79..bbf189e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drafter.js", - "version": "2.6.3", + "version": "2.6.4", "description": "Pure JS Drafter built with Emscripten", "main": "lib/drafter.nomem.js", "scripts": { diff --git a/src/pre.js b/src/pre.js index 53980f1..89bc356 100644 --- a/src/pre.js +++ b/src/pre.js @@ -1,6 +1,10 @@ -var Module = { - 'ready': false, - 'log': function(text) { console.log('drafter.js: ' + text); }, - 'logErr': function(text) { console.error('drafter.js: ' + text); }, - 'onRuntimeInitialized': function() { this.ready = true; } -}; +var Module; + +if (!Module) { + Module = {}; +} + +Module['ready'] = false; +Module['log'] = function(text) { console.log('drafter.js: ' + text); }; +Module['logErr'] = function(text) { console.error('drafter.js: ' + text); }; +Module['onRuntimeInitialized'] = function() { this.ready = true; };