davidjbradshaw / iframe-resizer-react

The official React interface for Iframe-Resizer

Home Page:https://iframe-resizer.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postMessage issue

HoraceShmorace opened this issue · comments

I'm getting this error:

index.es.js?8e67:851 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://iframe-child-domain') does not match the recipient window's origin ('http://parent-window-domain').

Is this saying that the parent can't postMessage to the child, or vice-versa? Is there some way to set the targetOrigin?

Ah, there's something to be said for thoroughly reading documentation. I fixed it by adding the checkOrigin={false} prop.