handleIframe404() {
    setTimeout(() => {
      if (
        this.iframe?.contentWindow?.document?.body?.textContent.includes(
          'Cannot GET'
        ) ||
        this.iframe?.contentWindow?.document?.title.includes('Error')
      ) {
        /**
         * Replace the iFrame's inner contents vs literally use a srcdoc.
         * Workaround to avoiding an infinite loop (if using srcdoc) which breaks the ability to
         * hit the back button if you hit a 404
         */
        this.iframe.contentWindow.document.body.innerHTML =
          this.iframe404Fallback;
      }
    }, 100);
  }
// logic that trying to handle 404s in the PL iframe
logic that trying to handle 404s in the PL iframe
logic that trying to handle 404s in the PL iframe
handleIframe404() {
    setTimeout(() => {
      if (
        this.iframe?.contentWindow?.document?.body?.textContent.includes(
          'Cannot GET'
        ) ||
        this.iframe?.contentWindow?.document?.title.includes('Error')
      ) {
        this.iframe.contentWindow.document.body.innerHTML =
          this.iframe404Fallback;
      }
    }, 100);
  }
handleIframe404 ( ) { setTimeout ( ( ) => { if ( this . iframe ?. contentWindow ?. document ?. body ?. textContent . includes ( 'Cannot GET' ) || this . iframe ?. contentWindow ?. document ?. title . includes ( 'Error' ) ) { this . iframe . contentWindow . document . body . innerHTML = this . iframe404Fallback ; } } , 100 ) ; }
logic that trying to handle 404s in the PL iframe
logic that trying to handle 404s in the PL iframe
/**
         * Replace the iFrame's inner contents vs literally use a srcdoc.
         * Workaround to avoiding an infinite loop (if using srcdoc) which breaks the ability to
         * hit the back button if you hit a 404
         */