publish/marks/MarksRenderer.js
/**
     * Render a Marks document to teh target or to a new Dom node
     * @param template The template to parse
     * @param target The target Dom node
     */
Render a Marks document to teh target or to a new Dom node
@param template The template to parse
@param target The target Dom node
Render a Marks document to teh target or to a new Dom node @param template The template to parse @param target The target Dom node
render(template, target) {
        var _a;
        const res = this.internalRender(template, false);
        const scripts = res.getScripts().join("\n\n");
        let script;
        if (scripts.length) {
            script = document.createElement("script");
            script.type = "text/javascript";
            script.appendChild(document.createTextNode(scripts));
            (_a = res.toDom()) === null || _a === void 0 ? void 0 : _a.appendChild(script);
        }
        if (target) {
            (typeof target === "string" ? document.querySelector(target) : target).appendChild(res.toDom());
        }
        return res.toDom();
    }
render ( template , target ) { var _a ; const res = this . internalRender ( template , false ) ; const scripts = res . getScripts ( ) . join ( "\n\n" ) ; let script ; if ( scripts . length ) { script = document . createElement ( "script" ) ; script . type = "text/javascript" ; script . appendChild ( document . createTextNode ( scripts ) ) ; ( _a = res . toDom ( ) ) === null || _a === void 0 ? void 0 : _a . appendChild ( script ) ; } if ( target ) { ( typeof target === "string" ? document . querySelector ( target ) : target ) . appendChild ( res . toDom ( ) ) ; } return res . toDom ( ) ; }
Render a Marks document to teh target or to a new Dom node
 @param template The template to parse
 @param target The target Dom node
Render a Marks document to teh target or to a new Dom node @param template The template to parse @param target The target Dom node