Permalink
Browse files

web example turned into impromptu failing test in the IEs

  • Loading branch information...
1 parent 6c7e21b commit 04d2a0aec59689c508101d47fb5633ec591a9909 @substack committed Sep 27, 2011
Showing with 8 additions and 7 deletions.
  1. +2 −2 example/web/index.html
  2. +6 −5 example/web/main.js
View
@@ -2,13 +2,13 @@
<head>
<script type="text/javascript" src="/browserify.js"></script>
<style type="text/css">
- pre {
+ #output {
white-space: pre;
word-wrap: break-word;
}
</style>
</head>
<body>
-<pre id="output"></pre>
+<div id="output"></div>
</body>
</html>
View
@@ -1,17 +1,18 @@
var stackedy = require('stackedy');
+var json = typeof JSON === 'object' ? JSON : require('jsonify');
var src = [
'function f () { g() }',
- 'function g () { h() }',
+ 'function g () { setTimeout(h, 1000) }',
'function h () { throw "moo" }',
'f();'
].join('\n');
window.onload = function () {
- var stack = stackedy(src, { filename : 'stax.js' }).run();
+ var stack = stackedy(src, { filename : 'stax.js', stoppable : false }).run();
stack.once('error', function (err, c) {
- stack.stop();
- write('Error: ' + err);
+ //stack.stop();
+ write('Error: ' + json.stringify(err));
var cur = c.current;
@@ -28,5 +29,5 @@ window.onload = function () {
if (document.readyState === 'complete') window.onload();
function write (msg) {
- document.getElementById('output').innerHTML += msg + '\n';
+ document.getElementById('output').innerHTML += msg + '<br>\n';
}

0 comments on commit 04d2a0a

Please sign in to comment.