You need to sign in to do that
Don't have an account?
Rafael Lessa Barreto
postmessage
I have a community using Build Your Own (LWR) and I have 2 Visualforce Pages loading in different IFrames on different Routes.
Everything works fine on the first opened route, but if I navigate for the other one I get this:
Anyone facing this problem?
Everything works fine on the first opened route, but if I navigate for the other one I get this:
Uncaught TypeError: Illegal invocation at Object.patchedWindowPostMessageValue (lwr_bootstrap_locker:982:12) at Object.postMessage (lwr_bootstrap_locker:1058:20) at lwr_bootstrap_locker:6998:19 at foreignErrorControlFn (eval at createConnector (lwr_bootstrap_locker:7236:12), <anonymous>:254:20) at BoundaryProxyHandler.applyTrap [as apply] (eval at createConnector (lwr_bootstrap_locker:7236:12), <anonymous>:790:34) at Proxy.loadTemplate (/programs/s/programs/modules/c/gfsPortalEmailTemplateIFrame.js:89:22)This happens the code runs
this.template.querySelector('iframe').contentWindow.postMessage('any message', '*')I can't find a way to workaround this as it doesn't look to have an issue on Javascript, because the page that is visited first works. And when the second page fails, if I reload the page(reload button on browser) it works.
Anyone facing this problem?
Your ask seems similar to https://salesforce.stackexchange.com/questions/269627/iframe-in-salesforce-lightning-web-components. Does the solution listed help?
Thanks