Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it.
If no parent was given it falls back to using document.body.
Parameters
element: HTMLElement
The element to be added to the DOM. Usually a Canvas object.
Optionalparent: string|HTMLElement
The parent in which to add the element. Can be a string which is passed to getElementById or an actual DOM object.
Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it. If no parent was given it falls back to using
document.body.