fe-notes icon indicating copy to clipboard operation
fe-notes copied to clipboard

实现 insertAfter

Open Inchill opened this issue 3 years ago • 0 comments

function insertAfter(newEl, targetEl) {
  const parentEl = targetEl.parentNode;

  if (parentEl.lastChild === targetEl) {
      parentEl.appendChild(newEl);
  } else {
      parentEl.insertBefore(newEl, targetEl.nextSibling);
  }
}

Inchill avatar Sep 27 '22 12:09 Inchill