function appendTo(element, canvas) {
        var el;

        // detect if provided argument was string or object
        if (typeof element === "string") {
            if ((el = window.document.getElementById(element)) === undefined) {
                window.console.error("Element \"" + element + "\" was not found!");
                return null;
            }
        } else if ((typeof element === "object") && (typeof element.appendChild === "function") && (element.nodeType)) {
            el = element;
        }

        el.appendChild(canvas);
    }
/**
     * Appends canvas to element
     * @param   {object} element - DOM element to append the canvas to
     * @param   {object} canvas  - The canvas object
     */
Appends canvas to element
@param   {object} element - DOM element to append the canvas to
@param   {object} canvas  - The canvas object
Appends canvas to element @param { object } element - DOM element to append the canvas to @param { object } canvas - The canvas object
function appendTo(element, canvas) {
        var el;
        if (typeof element === "string") {
            if ((el = window.document.getElementById(element)) === undefined) {
                window.console.error("Element \"" + element + "\" was not found!");
                return null;
            }
        } else if ((typeof element === "object") && (typeof element.appendChild === "function") && (element.nodeType)) {
            el = element;
        }
        el.appendChild(canvas);
    }
function appendTo ( element , canvas ) { var el ; if ( typeof element === "string" ) { if ( ( el = window . document . getElementById ( element ) ) === undefined ) { window . console . error ( "Element \"" + element + "\" was not found!" ) ; return null ; } } else if ( ( typeof element === "object" ) && ( typeof element . appendChild === "function" ) && ( element . nodeType ) ) { el = element ; } el . appendChild ( canvas ) ; }
Appends canvas to element
 @param   {object} element - DOM element to append the canvas to
 @param   {object} canvas  - The canvas object
Appends canvas to element @param { object } element - DOM element to append the canvas to @param { object } canvas - The canvas object
// detect if provided argument was string or object