findIframeInOpener
findIframeInOpener(
pathname?):Window|null
Defined in: utils/iframe/iframeHelper.ts:152
Find an iframe within window.opener by pathname
When a popup is opened via window.open from an iframe, window.opener points to the parent window, not the iframe itself. This utility searches through all frames in window.opener to find an iframe matching the specified pathname.
Parameters
Section titled “Parameters”pathname?
Section titled “pathname?”string = "/listener"
The pathname to search for (default: “/listener”)
Returns
Section titled “Returns”Window | null
The matching iframe window, or null if not found
Example
Section titled “Example”// Find the default /listener iframeconst listenerIframe = findIframeInOpener();
// Find a custom iframeconst customIframe = findIframeInOpener("/my-custom-iframe");