cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
23 lines (22 loc) • 608 B
JavaScript
function createTextNode(text) {
return document.createTextNode(text);
}
function insertBefore(parentNode2, newNode, referenceNode) {
parentNode2.insertBefore(newNode, referenceNode);
}
function removeChild(node, child) {
node.removeChild(child);
}
function appendChild(node, child) {
node.appendChild(child);
}
function parentNode(node) {
return node.parentNode;
}
function nextSibling(node) {
return node.nextSibling;
}
function setTextContent(node, text) {
node.textContent = text;
}
export { appendChild, createTextNode, insertBefore, nextSibling, parentNode, removeChild, setTextContent };