Pure JavaScript
js-dos v7/v8 is better than 6.22 in many cases. But it targets modern browsers. It supports only wasm execution, so it's not possible to run js-dos in pure js mode. In rare cases this can be important and js-dos 6.22 is only one option here.
However, js-dos bundle is plain zip archive, so you can use them also with js-dos 6.22.
    Dos(document.getElementById("jsdos"), {
        wdosboxUrl: "https://v8.js-dos.com/v6.22/dosbox.js",
    }).ready((fs, main) => {
        fs.extract("https://v8.js-dos.com/bundles/digger.jsdos").then(() => {
            main(["-conf", ".jsdos/dosbox.conf"]);
        });
    });
<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <style>
        html, body, #jsdos {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
    <script src="https://v8.js-dos.com/v6.22/js-dos.js"></script>
</head>
<body>
<canvas id="jsdos"></canvas>
<script>
    Dos(document.getElementById("jsdos"), {
        wdosboxUrl: "https://v8.js-dos.com/v6.22/dosbox.js",
    }).ready((fs, main) => {
        fs.extract("https://v8.js-dos.com/bundles/digger.jsdos").then(() => {
            main(["-conf", ".jsdos/dosbox.conf"]);
        });
    });
</script>
</body>
</html>
Documentation
Documentation of js-dos 6.22.
13 апреля 2025