Function validateCanvas

  • Validates that a canvas was created successfully and a 2d context can be allocated for it. If not, we call the GobanCore.canvasAllocationErrorHandler hook.

    Parameters

    • canvas: null | HTMLCanvasElement
    • Optional err: Error
    • Optional width: string | number
    • Optional height: string | number

    Returns boolean