JSFiddle - React, Tailwind, and code Playground

by borsna

HTML

<script src="https://unpkg.com/[email protected]/dist/index.js"></script>
<html>
<body>
<input type="file" onchange="onChange(event)" />
</body>

</html>

TypeScript

const all;
function onChange(event){
    const file = event.target.files[0];
    const reader = new FileReader();
    const parser = new SavParser();
    reader.onload = function(data){
        data.arrayBuffer().then(
            buffer => parser.all(new Feeder(buffer))
        ).then(
            parsed => all = parsed
        );
    }
    reader.readAsArrayBuffer(file);
}