IframeWindow Close function optimize
close() { var _a; if (this._frame) { if (this._frame.parentNode) { this._frame.addEventListener("load", (ev) => { var _a2; const frame = ev.target; // Give the browser a moment to complete the load before removing the frame setTimeout(() => { (_a2 = frame.parentNode) == null ? void 0 : _a2.removeChild(frame); void this._abort.raise(new Error("IFrame removed from DOM")); }) // (_a2 = frame.parentNode) == null ? void 0 : _a2.removeChild(frame); // void this._abort.raise(new Error("IFrame removed from DOM")); }, true); (_a = this._frame.contentWindow) == null ? void 0 : _a.location.replace("about:blank"); } this._frame = null; } this._window = null; }
In some webviews, not using setTimeout can lead to out-of-memory (OOM) issues. I hope you can optimize it. Thank you
This appears to be a modification of the close() function of IFrameWindow, not PopupWindow. https://github.com/authts/oidc-client-ts/blob/c7765577862f9f4ed337f29cd37b448214dc48ca/src/navigators/IFrameWindow.ts#L58-L71
Sorry, I made a mistake. It was indeed the close of IframeWindow
I checked the information and found that the white screen is caused by some lower versions of webviews not being able to enable OOPIF. All that needs to be compatible here, thank you