Artifact Content
Artifact 325f630962dda2ed70aeea9e823aad11bffc8209fa2a749e324d2d64b9b82d71:
- File public/riot-3.13.2/lib/browser/common/util/dom/safe-insert.js — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 347)
/** * Insert safely a tag to fix #1962 #1649 * @param { HTMLElement } root - children container * @param { HTMLElement } curr - node to insert * @param { HTMLElement } next - node that should preceed the current node inserted */ export default function safeInsert(root, curr, next) { root.insertBefore(curr, next.parentNode && next) }