Function allocateCanvasOrError

  • On iOS devices they limit the number of canvases we create to a a very low number and so sometimes we'll exhaust that limit. When this happens, we this method will detect that and call our GobanCore.canvasAllocationErrorHandler hook. On OGS we'll reload the page in that hook after logging the error.

    If string dimensions are used we'll use setAttribute, if numbers are used we'll set the canvas .width and .height parameter. This is for device scaling considerations when the given dimensions are scaled on HDPI devices.

    Parameters

    • Optional width: string | number
    • Optional height: string | number

    Returns HTMLCanvasElement

Generated using TypeDoc