Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

web example turned into impromptu failing test in the IEs

  • Loading branch information...
commit 04d2a0aec59689c508101d47fb5633ec591a9909 1 parent 6c7e21b
James Halliday authored
4  example/web/index.html
@@ -2,13 +2,13 @@
2 2
 <head>
3 3
 <script type="text/javascript" src="/browserify.js"></script>
4 4
 <style type="text/css">
5  
-    pre {
  5
+    #output {
6 6
         white-space: pre;
7 7
         word-wrap: break-word;
8 8
     }
9 9
 </style>
10 10
 </head>
11 11
 <body>
12  
-<pre id="output"></pre>
  12
+<div id="output"></div>
13 13
 </body>
14 14
 </html>
11  example/web/main.js
... ...
@@ -1,17 +1,18 @@
1 1
 var stackedy = require('stackedy');
  2
+var json = typeof JSON === 'object' ? JSON : require('jsonify');
2 3
 
3 4
 var src = [
4 5
     'function f () { g() }',
5  
-    'function g () { h() }',
  6
+    'function g () { setTimeout(h, 1000) }',
6 7
     'function h () { throw "moo" }',
7 8
     'f();'
8 9
 ].join('\n');
9 10
 
10 11
 window.onload = function () {
11  
-    var stack = stackedy(src, { filename : 'stax.js' }).run();
  12
+    var stack = stackedy(src, { filename : 'stax.js', stoppable : false }).run();
12 13
     stack.once('error', function (err, c) {
13  
-        stack.stop();
14  
-        write('Error: ' + err);
  14
+        //stack.stop();
  15
+        write('Error: ' + json.stringify(err));
15 16
         
16 17
         var cur = c.current;
17 18
         
@@ -28,5 +29,5 @@ window.onload = function () {
28 29
 if (document.readyState === 'complete') window.onload();
29 30
 
30 31
 function write (msg) {
31  
-    document.getElementById('output').innerHTML += msg + '\n';
  32
+    document.getElementById('output').innerHTML += msg + '<br>\n';
32 33
 }

0 notes on commit 04d2a0a

Please sign in to comment.
Something went wrong with that request. Please try again.