js-wmf/test/fetch.html

18 lines
341 B
HTML
Raw Permalink Normal View History

2020-03-01 04:55:36 +00:00
<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>