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
|