mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 10:22:50 -06:00
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">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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="./jspgf.js"></script>
|
||||||
<script type="text/javascript" src="./test-web.js"></script>
|
<script type="text/javascript" src="./test-web.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Module.onRuntimeInitialized = () => {
|
|||||||
.then((response) => response.arrayBuffer())
|
.then((response) => response.arrayBuffer())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const pgfPathFS = '/tmp/Foods.pgf';
|
const pgfPathFS = '/tmp/Foods.pgf';
|
||||||
Module.FS.writeFile(pgfPathFS, new DataView(data));
|
Module.FS.writeFile(pgfPathFS, new Uint8Array(data));
|
||||||
|
|
||||||
// Read PGF
|
// Read PGF
|
||||||
const pgf = JSPGF.readPGF(pgfPathFS);
|
const pgf = JSPGF.readPGF(pgfPathFS);
|
||||||
|
|||||||
Reference in New Issue
Block a user