forked from GitHub/gf-core
DataView doesn't work use Uint8Array instead
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src=".libs/pgf.js"></script>
|
||||
<script type="text/javascript" src="pgf.js"></script>
|
||||
<script type="text/javascript" src="./jspgf.js"></script>
|
||||
<script type="text/javascript" src="./test-web.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -5,7 +5,7 @@ Module.onRuntimeInitialized = () => {
|
||||
.then((response) => response.arrayBuffer())
|
||||
.then((data) => {
|
||||
const pgfPathFS = '/tmp/Foods.pgf';
|
||||
Module.FS.writeFile(pgfPathFS, new DataView(data));
|
||||
Module.FS.writeFile(pgfPathFS, new Uint8Array(data));
|
||||
|
||||
// Read PGF
|
||||
const pgf = JSPGF.readPGF(pgfPathFS);
|
||||
|
||||
Reference in New Issue
Block a user