add globalThis.ContextType

This commit is contained in:
Gabe Yuan
2023-09-20 16:02:17 +08:00
parent f591d66365
commit 01ebc184ad
3 changed files with 6 additions and 1 deletions

View File

@@ -13,3 +13,5 @@ function _browser() {
}
export const browser = _browser();
export const isBg = () => globalThis?.ContextType === "BACKGROUND";