import { LightningElement } from "lwc"; export const setContainerInnerHtml = ( container: HTMLElement, markup: string ) => { if (container && markup && markup !== "") { // eslint-disable-next-line @lwc/lwc/no-inner-html container.innerHTML = markup; } }; export const reflectBooleanAttribute = ( element: T, attrName: string, value: string | boolean | undefined ) => { // Reflect to HTML, accommodating the disparate ways HTML and LWC handle boolean attributes if (value !== false) { element.setAttribute(attrName, ""); } else { element.removeAttribute(attrName); } };