<static> addToDOM(canvas, parent, overflowHidden) → {HTMLCanvasElement}
Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent.
If no parent is given it will be added as a child of the document.body.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
canvas | HTMLCanvasElement | The canvas to be added to the DOM. | ||
parent | string | HTMLElement | The DOM element to add the canvas to. | ||
overflowHidden | boolean | <optional> | true | If set to true it will add the overflow='hidden' style to the parent DOM element. |
Returns
HTMLCanvasElement -
Returns the source canvas.
- Source code: utils/Canvas.js (Line 109)
Please login to continue.