2019-01-15 14:05:22 -08:00

30 lines
701 B
HTML

<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
</head>
<body>
<pre id='output'>Loading scripts...</pre>
<script>
const wrap = method => {
const og = console[method];
const on_method = `on_console_${method}`;
console[method] = function (...args) {
if (window[on_method]) {
window[on_method](args);
}
og.apply(this, args);
};
};
wrap("debug");
wrap("log");
wrap("info");
wrap("warn");
wrap("error");
window.__wbg_test_invoke = f => f();
</script>
<script src='run.js' type=module></script>
</body>
</html>