blob: b213b2c3d92c1a6165e910f0c3bba643ce6363dd [file] [log] [blame]
Hector Dearman21fa9162018-06-22 14:50:29 +01001import * as init_trace_processor from './gen/trace_processor';
2
3function writeToUIConsole(line:string) {
4 const lineElement = document.createElement('div');
5 lineElement.innerText = line;
6 const container = document.getElementById('console');
7 if (!container)
8 throw new Error('OMG');
9 container.appendChild(lineElement);
10}
11
12init_trace_processor({
13 locateFile: (s: string) => s,
14 print: writeToUIConsole,
15 printErr: writeToUIConsole,
16});
17