We have an iframe that is showing one of our pages. The content of the iframe has an enableFullScreen method which as its name implies make the content go full screen.
We want to trigger this method when the user clicks on a button that is inside the page that hosts the iframe. We tried using post message but this doesn't work probably because post message is not a user initiated event. Making the iframe fullscreen ( without post message ) is not an option because the content inside the iframe needs to know if it is in fullscreen mode or not.
Thank you
(edit: The relevant question (Invoking JavaScript code in an iframe from the parent page) does not apply here because the iframe is hosting a page that is in a different domain, so we can only send messages to it rather than call methods directly. )