2018-07-24 11:27:06 -07:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<pre id='output'>Loading scripts...</pre>
|
|
|
|
<script>
|
2019-01-15 14:05:22 -08:00
|
|
|
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);
|
|
|
|
};
|
|
|
|
};
|
2019-01-14 14:41:32 -08:00
|
|
|
|
2019-01-15 14:05:22 -08:00
|
|
|
wrap("debug");
|
|
|
|
wrap("log");
|
|
|
|
wrap("info");
|
|
|
|
wrap("warn");
|
|
|
|
wrap("error");
|
2019-01-14 14:41:32 -08:00
|
|
|
|
2019-01-15 14:05:22 -08:00
|
|
|
window.__wbg_test_invoke = f => f();
|
2018-07-24 11:27:06 -07:00
|
|
|
</script>
|
|
|
|
<script src='run.js' type=module></script>
|
|
|
|
</body>
|
|
|
|
</html>
|