@@ -110,18 +110,13 @@ var Dispatcher = function() {
111 var initialize = function() {
111 var initialize = function() {
112 var prog = ElmCode.hasOwnProperty("main") ? ElmCode.main : main;
112 var prog = ElmCode.hasOwnProperty("main") ? ElmCode.main : main;
113− try { program = prog(); } catch (e) {
113+ try { program = prog(); } catch (e) { throw e; }
114− var msg = ("<br><h2>Your browser may not be supported. Are you using a modern browser?</h2>" +
115− "<br><span style=\"grey\">Runtime Error:<br>" + e + "</span>")
116− document.body.innerHTML = Text.monospace(msg);
119 if (!program.hasOwnProperty('recv')) {
114 if (!program.hasOwnProperty('recv')) {
120 program = Elm.Input(program);
115 program = Elm.Input(program);
122 var content = document.getElementById('content');
117 var content = document.getElementById('content');
123 content.appendChild(program.value);
118 content.appendChild(program.value);
124− correctSize(content);
119+ adjust();
125 var w = document.getElementById('widthChecker').offsetWidth;
120 var w = document.getElementById('widthChecker').offsetWidth;
126 if (w !== window.innerWidth) {
121 if (w !== window.innerWidth) {
127 Dispatcher.notify(Window.dimensions.id, Value.Tuple(w, window.innerHeight));
122 Dispatcher.notify(Window.dimensions.id, Value.Tuple(w, window.innerHeight));
@@ -129,13 +124,13 @@ var Dispatcher = function() {
129 program = Elm.Lift(function(value) {
124 program = Elm.Lift(function(value) {
130 var content = document.getElementById('content');
125 var content = document.getElementById('content');
131 content.replaceChild(value, content.children[0]);
126 content.replaceChild(value, content.children[0]);
132− correctSize(content);
127+ adjust();
133 return value;
128 return value;
134 }, [program]);
129 }, [program]);
136 var adjust = function() {
131 var adjust = function() {
137 var content = document.getElementById('content');
132 var content = document.getElementById('content');
138− correctSize(content);
133+ correctSize(content.children[0]);
140 var notify = function(id, v) {
135 var notify = function(id, v) {
141 timestep += 1;
136 timestep += 1;