dees-domtools/ts/csstools.elementbasicsetup.ts
2020-05-23 15:00:01 +00:00

15 lines
364 B
TypeScript

import { defer } from '@pushrocks/smartpromise';
/**
* a basic setup for elements
* makes sure everything is in check
*/
export const elementBasicSetup = async () => {
if (globalThis.deesCssToolsReady) {
await globalThis.deesCssToolsReady.promise;
} else {
globalThis.deesCssToolsReady = defer();
globalThis.deesCssToolsReady.resolve();
}
};