You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
457 B

2 weeks ago
  1. export function getDevtoolsGlobalHook() {
  2. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3. }
  4. export function getTarget() {
  5. // @ts-expect-error navigator and windows are not available in all environments
  6. return (typeof navigator !== 'undefined' && typeof window !== 'undefined')
  7. ? window
  8. : typeof globalThis !== 'undefined'
  9. ? globalThis
  10. : {};
  11. }
  12. export const isProxyAvailable = typeof Proxy === 'function';