Files: 4caf614b4b87a9a9e716cd3ab3aa96dcd18bbe80 / assets / base.html
659 bytesRaw
1 | |
2 | <html> |
3 | <head></head> |
4 | <body> |
5 | <script> |
6 | // redirect console to main process |
7 | const { log: remoteLog, error: remoteErr } = require('console') |
8 | const { log: localLog, error: localErr } = console |
9 | |
10 | console.log = function (...args) { |
11 | localLog(...args) |
12 | remoteLog(...args) |
13 | } |
14 | |
15 | console.error = function (...args) { |
16 | localErr(...args) |
17 | remoteErr(...args) |
18 | } |
19 | |
20 | // redirect errors to stderr |
21 | window.addEventListener('error', function (e) { |
22 | e.preventDefault() |
23 | console.error(e.error.stack || 'Uncaught ' + e.error) |
24 | }) |
25 | </script> |
26 | </body> |
27 | </html> |
28 | |
29 |
Built with git-ssb-web