(pathPrefix, filename, callback)
| 332 | return contents; |
| 333 | } |
| 334 | function loadFile(pathPrefix, filename, callback) { |
| 335 | fetch(pathPrefix + filename, { method: 'GET' }).then(function(response) { |
| 336 | if (response.status === 200) { |
| 337 | response.arrayBuffer().then(function(buffer) { |
| 338 | let arr = new Uint8Array(buffer); |
| 339 | callback(arr); |
| 340 | }); |
| 341 | } else { |
| 342 | console.log('Unable to load:' + filename + ' error:' + response.status); |
| 343 | } |
| 344 | }); |
| 345 | } |
| 346 | function buildAppFileSystem(callback) { |
| 347 | if(Config.appPayload.length > 0){ |
| 348 | let uint8Array = getBase64Data(Config.appPayload); |
no test coverage detected