watchDom(startStop) {
    const targetNode = document.documentElement;
    const that = this;
    if (!this._htmlObserver) {
      this._htmlObserver = new MutationObserver(function() {
        this.takeRecords();
        that.saveHtmlCache();
      });
    }
    if (startStop === true || startStop === void 0) {
      this._htmlObserver.observe(targetNode, { attributes: true, childList: true, subtree: true, characterData: true });
      log("trace", "uibuilder.module.js:watchDom", "Started Watching and saving DOM changes")();
    } else {
      this._htmlObserver.disconnect();
      log("trace", "uibuilder.module.js:watchDom", "Stopped Watching and saving DOM changes")();
    }
  }
Use the Mutation Observer browser API to watch for and save changes to the HTML
Once the observer is created, it will be reused.
Sending true or undefined will turn on the observer, false turns it off.
saveHtmlCache is called whenever anything changes in the dom. This allows
users to call restoreHtmlFromCache() on page load if desired to completely reload
to the last saved state.
@param {boolean} startStop true=start watching the DOM, false=stop