setEnv
setEnv(
value
):void
Defined in: src/env/index.ts:29
Sets the environment variables used by fabric.
This is exposed for special cases, such as configuring a test environment, and should be used with care.
CAUTION: Must be called before using the package.
Parameters
Section titled “Parameters”TFabricEnv
Returns
Section titled “Returns”void
Example
Section titled “Example”import { getEnv, setEnv } from 'fabric';// we want fabric to use the `window` and `document` objects exposed by the environment we are running in.setEnv({ ...getEnv(), window, document });// done with setup, using fabric is now safe