@mocanvas/editor · interface
interface TLEnvironmentFixed facts about the browser and platform, detected once at load.
Properties · 8
hasCanvasSupport: booleanWhether raster export can work at all: Promise and HTMLCanvasElement both exist.
isAndroid: booleanisChromeForIos: booleanisDarwin: booleanmacOS, iOS included — i.e. "the accelerator key is Cmd".
isFirefox: booleanisIos: booleaniPad or iPhone.
isSafari: booleanSafari proper. Chrome and Firefox on iOS are WebKit but are *not* Safari.
isTouchDevice: booleanWhether the *hardware* has a touch screen. Stays true on a touchscreen laptop while a mouse is in use — for the pointer actually in use read TLReactiveEnvironment.isCoarsePointer.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.