UNPKG

vanillajs-browser-helpers

Version:

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser

9 lines (8 loc) 325 B
/** * Inserts DOM element or plain HTML after a given DOM element * * @param elm - The DOM element to insert elements after * @param insertElm - DOM element or HTML (or selector) to insert * @return The inserted element */ export default function insertAfter(elm: Element, insertElm: string | Element): Element | null;