face-api/build/env/isBrowser.js

10 lines
408 B
JavaScript
Raw Normal View History

2020-08-20 02:10:42 +02:00
export function isBrowser() {
2020-08-18 14:04:33 +02:00
return typeof window === 'object'
&& typeof document !== 'undefined'
&& typeof HTMLImageElement !== 'undefined'
&& typeof HTMLCanvasElement !== 'undefined'
&& typeof HTMLVideoElement !== 'undefined'
&& typeof ImageData !== 'undefined'
&& typeof CanvasRenderingContext2D !== 'undefined';
}
//# sourceMappingURL=isBrowser.js.map