Add a 'noWebWorker=true' option to <replay-web-page> embed to disable loading in separate web worker (#102)

* add a 'noWebWorker' option to <replay-web-page> embed to disable the default webworker-based loading, and load via the service worker directly. this feature was previously available, but turned-off, as its less efficient (uses sw for what can be done in a separate web worker thread). however, service-worker based loading may be needed for certain edge cases (see #97), and this option enables this loading method to be turned back on for embedding.
* docs: update guide to include 'noWebWorker', also use include attribute for boolean attributes
* update CHANGES.md
* bump to 1.5.12
This commit is contained in:
Ilya Kreymer
2022-06-15 11:38:04 -07:00
committed by GitHub
parent 789e5ba2b1
commit 36da7fa2c6
10 changed files with 234 additions and 198 deletions
+1 -12
View File
@@ -34,17 +34,6 @@ Please try a different browser.
return p;
}
// ===========================================================================
let dbworker = null;
function initDBWorker() {
if (dbworker === null) {
// eslint-disable-next-line no-undef
dbworker = new Worker(__SW_NAME__);
}
return dbworker;
}
// ===========================================================================
async function digestMessage(message, hashtype) {
@@ -148,4 +137,4 @@ function parseURLSchemeHostPath(url) {
export { digestMessage, tsToDate, getTS, getPageDateTS, getReplayLink, sourceToId, parseURLSchemeHostPath,
registerSW, initDBWorker };
registerSW };