Correctly use optimizer flag.

pull/1/head
Christian 10 years ago committed by chriseth
parent 4ca23c8530
commit 56fb312d6d
  1. 4
      index.html

@ -116,7 +116,7 @@ editor.getSession().setMode("ace/mode/javascript");
editor.getSession().setTabSize(4); editor.getSession().setTabSize(4);
editor.getSession().setUseSoftTabs(true); editor.getSession().setUseSoftTabs(true);
var compileString = Module.cwrap("compileString", "string", ["string"]); var compileString = Module.cwrap("compileString", "string", ["string", "number"]);
var previousInput = ''; var previousInput = '';
var outputArea = document.querySelector('#output'); var outputArea = document.querySelector('#output');
var onChange = function() { var onChange = function() {
@ -126,7 +126,7 @@ var onChange = function() {
return; return;
previousInput = input; previousInput = input;
try { try {
outputArea.innerHTML = compileString(input, optimize); outputArea.innerHTML = compileString(input, optimize ? 1 : 0);
} catch (exception) { } catch (exception) {
outputArea.innerHTML = "Uncaught JavaScript Exception:\n" + exception; outputArea.innerHTML = "Uncaught JavaScript Exception:\n" + exception;
} }

Loading…
Cancel
Save