UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

11 lines (10 loc) 445 B
import type { AnyCanvas } from '../../types'; /** * This function try to create a canvas element and return it. * it uses document.createElement('canvas') if document is available * or new OffscreenCanvas(width, height) if OffscreenCanvas is avalaible (for web worker) * or it returns null if neither is available. * @private */ declare const createCanvas: (width: number, height: number) => AnyCanvas | null; export default createCanvas;