Makelore 2.0 initial clean snapshot
This commit is contained in:
11
src/lib/works-square-usage-events.ts
Normal file
11
src/lib/works-square-usage-events.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const WORKS_SQUARE_TOKEN_USAGE_STALE_EVENT = 'works-square-token-usage:stale';
|
||||
|
||||
export function dispatchWorksSquareTokenUsageStale(): void {
|
||||
if (typeof window === 'undefined' || typeof window.dispatchEvent !== 'function') {
|
||||
return;
|
||||
}
|
||||
if (typeof Event !== 'function') {
|
||||
return;
|
||||
}
|
||||
window.dispatchEvent(new Event(WORKS_SQUARE_TOKEN_USAGE_STALE_EVENT));
|
||||
}
|
||||
Reference in New Issue
Block a user