5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
6 <link rel=
"shortcut icon" href=
"data:image/x-icon;," type=
"image/x-icon">
7 <link rel=
"stylesheet" href=
"common/emscripten.css"/>
8 <link rel=
"stylesheet" href=
"common/testing.css"/>
9 <title>speedtest1-wasmfs.wasm
</title>
12 <header id='titlebar'
><span>speedtest1-wasmfs.wasm
</span></header>
13 <div>See also:
<a href='speedtest1-worker.html'
>speedtest1-worker
</a></div>
14 <div class='warning'
>Achtung: running it with the dev tools open may
15 <em>drastically
</em> slow it down. For faster results, keep the dev
16 tools closed when running it!
18 <div id='test-output'
></div>
21 const eOut
= document
.querySelector('#test-output');
22 const log2 = function(cssClass
,...args
){
23 const ln
= document
.createElement('div');
24 if(cssClass
) ln
.classList
.add(cssClass
);
25 ln
.append(document
.createTextNode(args
.join(' ')));
27 //this.e.output.lastElementChild.scrollIntoViewIfNeeded();
29 /* can't update DOM while speedtest is running unless we run
30 speedtest in a worker thread. */;
31 const log
= (...args
)=>{
35 const logErr = function(...args
){
36 console
.error(...args
);
37 log2('error',...args
);
40 'speedtest1-wasmfs.mjs'+globalThis
.location
.search
,{
43 log("Starting up...");
44 W
.onmessage = function({data
}){
46 case 'log': log(...data
.args
); break;
47 case 'logErr': logErr(...data
.args
); break;