replaceSlot(el, slot) {
    if (!el) return;
    if (!slot) slot = "";
    slot = this.sanitiseHTML(slot);
    const tempFrag = _a.doc.createRange().createContextualFragment(slot);
    const elRange = _a.doc.createRange();
    elRange.selectNodeContents(el);
    elRange.deleteContents();
    el.append(tempFrag);
  }
Replace or add an HTML element's slot from text or an HTML string
WARNING: Executes <script> tags! And will process <style> tags.
Will use DOMPurify if that library has been loaded to window.
param {*} ui Single entry from the msg._ui property
@param {Element} el Reference to the element that we want to update
@param {*} slot The slot content we are trying to add/replace (defaults to empty string)