src/page.js
function prepareDom(doc, cfg = {}) {
    if (!(doc instanceof Document)) {
        console.warn('Cannnot prepare, the provided element is not a document.');
        return;
    }
    // apply defaults
    _.defaults(cfg, defaults);
    // append any default styles
    appendStyle(cfg.style, doc);
    // attach event handlers
    Handler.addAll(doc, cfg);

    return doc;
}
function prepareDom(doc, cfg = {}) {
    if (!(doc instanceof Document)) {
        console.warn('Cannnot prepare, the provided element is not a document.');
        return;
    }
    // apply defaults
    _.defaults(cfg, defaults);
    // append any default styles
    appendStyle(cfg.style, doc);
    // attach event handlers
    Handler.addAll(doc, cfg);

    return doc;
}
function prepareDom ( doc , cfg = { } ) { if ( ! ( doc instanceof Document ) ) { console . warn ( 'Cannnot prepare, the provided element is not a document.' ) ; return ; } // apply defaults _ . defaults ( cfg , defaults ) ; // append any default styles appendStyle ( cfg . style , doc ) ; // attach event handlers Handler . addAll ( doc , cfg ) ; return doc ; }
Prepares a document by adding styles and event handlers.

@inner
@alias module:page.prepareDom

@param  {Document} doc       The document to prepare
@return {Document}           The document passed
Prepares a document by adding styles and event handlers .