Spaces:
Runtime error
Runtime error
Download examples/worker.html from peterpeter8585/v86: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/spaces/peterpeter8585/v86/resolve/main/examples/worker.html
- Command line
-
hf download hf://spaces/peterpeter8585/v86/examples/worker.html
-
curl -L -o worker.html https://huggingface.co/spaces/peterpeter8585/v86/resolve/main/examples/worker.html
645 Bytes
| <title>Worker</title> | |
| <script> | |
| ; | |
| window.onload = function() | |
| { | |
| var worker = new Worker("worker.js"); | |
| var terminal = document.getElementById("terminal"); | |
| worker.onmessage = function(e) | |
| { | |
| terminal.textContent += e.data; | |
| } | |
| terminal.onkeypress = function(e) | |
| { | |
| e.preventDefault(); | |
| worker.postMessage(String.fromCharCode(e.which)); | |
| }; | |
| } | |
| var start = Date.now(); | |
| setInterval(function() | |
| { | |
| document.getElementById("time").textContent = (Date.now() - start) / 1000 | 0; | |
| }); | |
| </script> | |
| <span id=time></span>s | |
| <hr> | |
| <textarea rows=25 cols=80 id=terminal></textarea> | |