fix(core): update
This commit is contained in:
parent
ac999adfcb
commit
7fe861f577
@ -1,5 +1,19 @@
|
|||||||
import { WccDashboard } from './elements/wcc-dashboard';
|
import { WccDashboard } from './elements/wcc-dashboard';
|
||||||
|
import { LitElement, TemplateResult } from 'lit-element';
|
||||||
|
|
||||||
|
const setupWccTools = (elementsArg?: { [key: string]: LitElement }, pagesArg?: { [key: string]: TemplateResult }) => {
|
||||||
|
let hasRun = false;
|
||||||
|
const runWccToolsSetup = async () => {
|
||||||
|
if (document.readyState === 'complete' && !hasRun) {
|
||||||
|
hasRun = true;
|
||||||
|
const wccTools = new WccDashboard(elementsArg as any, pagesArg);
|
||||||
|
document.querySelector('body').append(wccTools);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.addEventListener('readystatechange', runWccToolsSetup);
|
||||||
|
runWccToolsSetup();
|
||||||
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
WccDashboard
|
setupWccTools
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user