Solutionunvalidated
Use the correct iframe load lifecycle event (e.g., `loadedmetadata`/appropriate ready event) before calling `contentWindow.postMessage`. Fix the origin check by using the correct/static expected parent URL (or validate/log `event.origin` before returning) so messages aren’t discarded.
5d577741-360b-4721-add3-c3982707c6b9
Use the correct iframe load lifecycle event (e.g., loadedmetadata/appropriate ready event) before calling contentWindow.postMessage. Fix the origin check by using the correct/static expected parent URL (or validate/log event.origin before returning) so messages aren’t discarded.