fe-notes
fe-notes copied to clipboard
实现 insertAfter
function insertAfter(newEl, targetEl) {
const parentEl = targetEl.parentNode;
if (parentEl.lastChild === targetEl) {
parentEl.appendChild(newEl);
} else {
parentEl.insertBefore(newEl, targetEl.nextSibling);
}
}