Load layouts and optional features from staged asset caches
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
* The ".part" suffix keeps OPFS.listVideos() from ever listing a partial file.
|
||||
* ========================================================================== */
|
||||
'use strict';
|
||||
importScripts('/sha256.js');
|
||||
|
||||
let dir = null;
|
||||
let handle = null;
|
||||
@@ -36,6 +35,7 @@ self.onmessage = (e) => { chain = chain.then(() => onOp(e.data || {})); };
|
||||
|
||||
async function onOp(m) {
|
||||
try {
|
||||
if (!self.Sha256) { self.__ASSET_URLS__=m.assetUrls || {}; importScripts(self.__ASSET_URLS__.sha256 || '/sha256.js'); }
|
||||
if (m.op === 'open') {
|
||||
const root = await navigator.storage.getDirectory();
|
||||
dir = await root.getDirectoryHandle('videos', { create: true });
|
||||
|
||||
Reference in New Issue
Block a user