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:
+1
-12
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user