Blame view

天文台pc/tianwentai-ui/node_modules/react-dnd-html5-backend/src/BrowserDetector.ts 326 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
  import { memoize } from './utils/js_utils.js'
  
  declare global {
  	interface Window extends HTMLElement {
  		safari: any
  	}
  }
  
  export type Predicate = () => boolean
  export const isFirefox: Predicate = memoize(() =>
  	/firefox/i.test(navigator.userAgent),
  )
  export const isSafari: Predicate = memoize(() => Boolean(window.safari))