๐Ÿšงnode.appendTag()

โฌ†๏ธ ้œ€่ฆ๏ผš tag()

// โญ๏ธ node.appendTag()
Node.prototype.appendTag = function(name, {
    textContent,
    attributes = {}
}={}){
    let elem = tag(name, {textContent, attributes});
    this.appendChild(elem);
    return elem;
};

Last updated

Was this helpful?