function CreateHTMLElement(selector, options){
            let el = new HTMLElement(selector);
            
            let params = options ? options : {};
            if(params.id) { el.setID(params.id); }
            if(params.classList) { el.addClasses(params.classList); }
            if(params.children) { el.addChildren(params.children); }
            if(params.properties) { el.setElementProperties(params.properties); }
            if(params.src) { el.getElement().src = params.src; }
            if(params.href) { el.getElement().href = params.href; }
            if(params.title) { el.getElement().title = params.title; }
            if(params.content) { el.addTextNode(params.content); }
            if(params.attributes) { el.addAttributes(params.attributes); }
            
            return el;
        }
// Create an HTML element using a selector and a set of options.
Create an HTML element using a selector and a set of options.
Create an HTML element using a selector and a set of options .
function CreateHTMLElement(selector, options){
            let el = new HTMLElement(selector);
            let params = options ? options : {};
            if(params.id) { el.setID(params.id); }
            if(params.classList) { el.addClasses(params.classList); }
            if(params.children) { el.addChildren(params.children); }
            if(params.properties) { el.setElementProperties(params.properties); }
            if(params.src) { el.getElement().src = params.src; }
            if(params.href) { el.getElement().href = params.href; }
            if(params.title) { el.getElement().title = params.title; }
            if(params.content) { el.addTextNode(params.content); }
            if(params.attributes) { el.addAttributes(params.attributes); }
            return el;
        }
function CreateHTMLElement ( selector , options ) { let el = new HTMLElement ( selector ) ; let params = options ? options : { } ; if ( params . id ) { el . setID ( params . id ) ; } if ( params . classList ) { el . addClasses ( params . classList ) ; } if ( params . children ) { el . addChildren ( params . children ) ; } if ( params . properties ) { el . setElementProperties ( params . properties ) ; } if ( params . src ) { el . getElement ( ) . src = params . src ; } if ( params . href ) { el . getElement ( ) . href = params . href ; } if ( params . title ) { el . getElement ( ) . title = params . title ; } if ( params . content ) { el . addTextNode ( params . content ) ; } if ( params . attributes ) { el . addAttributes ( params . attributes ) ; } return el ; }
Create an HTML element using a selector and a set of options.
Create an HTML element using a selector and a set of options .