refactor: add getKernelIframe method
This commit is contained in:
parent
15c59603f2
commit
17eb74483c
|
@ -70,6 +70,10 @@ let bgConn: any;
|
||||||
let serviceWorker: ServiceWorker;
|
let serviceWorker: ServiceWorker;
|
||||||
let kernelIframe: HTMLIFrameElement;
|
let kernelIframe: HTMLIFrameElement;
|
||||||
|
|
||||||
|
function getKernelIframe() {
|
||||||
|
return kernelIframe;
|
||||||
|
}
|
||||||
|
|
||||||
async function serviceWorkerReady() {
|
async function serviceWorkerReady() {
|
||||||
const sw = await navigator.serviceWorker.ready;
|
const sw = await navigator.serviceWorker.ready;
|
||||||
navigator.serviceWorker.onmessage = (...args) => handleMessage(...args);
|
navigator.serviceWorker.onmessage = (...args) => handleMessage(...args);
|
||||||
|
@ -683,4 +687,5 @@ export {
|
||||||
logoutDefer,
|
logoutDefer,
|
||||||
newKernelQuery,
|
newKernelQuery,
|
||||||
serviceWorkerReady,
|
serviceWorkerReady,
|
||||||
|
getKernelIframe,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue