js-wmf/test/fetch.html
2020-02-29 23:55:36 -05:00

18 lines
341 B
HTML

<html><body>
<style>
* {
padding: 0;
margin: 0;
}
</style>
<canvas id="canvas"></canvas>
<script src="wmf.js"></script>
<script>
(async() => {
const res = await fetch("static/image1.wmf");
const ab = await res.arrayBuffer();
WMF.draw_canvas(ab, document.getElementById("canvas"));
})();
</script>
</body></html>