dist/strawberry.v1.0.8.js
// Renders and appends the template as content to a certain element
Renders and appends the template as content to a certain element
Renders and appends the template as content to a certain element
$append(scopeObj, scopeElement, template, $skip = null, $cleanUp = null) {
            let tempElement = document.createElement('div');
            if ($cleanUp) {
                scopeElement.innerHTML = '';
            }
            tempElement.innerHTML = template;
            this.$render(scopeObj, tempElement, $skip);
            while (tempElement.childNodes.length > 0) {
                scopeElement.appendChild(tempElement.childNodes[0]);
            }
        }
$append ( scopeObj , scopeElement , template , $skip = null , $cleanUp = null ) { let tempElement = document . createElement ( 'div' ) ; if ( $cleanUp ) { scopeElement . innerHTML = '' ; } tempElement . innerHTML = template ; this . $render ( scopeObj , tempElement , $skip ) ; while ( tempElement . childNodes . length > 0 ) { scopeElement . appendChild ( tempElement . childNodes [ 0 ] ) ; } }
Renders and appends the template as content to a certain element
Renders and appends the template as content to a certain element
// Creating a new element // If the scope element has to be cleaned up before template is appended // Adding the template as innerHTML to the element // Renders the contents of the element // Apends the elemens