🚧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