JavaScript version
insertHtmlAfter.js
const insertHtmlAfter = (html, ele) => ele.insertAdjacentHTML('afterend', html);
TypeScript version
insertHtmlAfter.ts
const insertHtmlAfter = (html: string, ele: Element): void => ele.insertAdjacentHTML('afterend', html);