git ssb

16+

Dominic / patchbay



Tree: a418cfe5b0a817369167fc9031967fe2fa0c76b8

Files: a418cfe5b0a817369167fc9031967fe2fa0c76b8 / assets / base.html

659 bytesRaw
1<!DOCTYPE html>
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