1
0

destroy.html 837 B

12345678910111213141516171819202122232425262728293031323334
  1. <!doctype html>
  2. <title>Destroyable Emulator</title>
  3. <script src="../build/libv86.js"></script>
  4. <script>
  5. "use strict";
  6. window.onload = function()
  7. {
  8. var emulator = new V86({
  9. wasm_path: "../build/v86.wasm",
  10. memory_size: 32 * 1024 * 1024,
  11. vga_memory_size: 2 * 1024 * 1024,
  12. screen_container: document.getElementById("screen_container"),
  13. bios: {
  14. url: "../bios/seabios.bin",
  15. },
  16. vga_bios: {
  17. url: "../bios/vgabios.bin",
  18. },
  19. cdrom: {
  20. url: "../images/linux.iso",
  21. },
  22. autostart: true,
  23. });
  24. setTimeout(() => { emulator.destroy(); }, 1000);
  25. }
  26. </script>
  27. <div id="screen_container">
  28. <div style="white-space: pre; font: 14px monospace; line-height: 14px"></div>
  29. <canvas style="display: none"></canvas>
  30. </div>