can an cross-domain iframe detect a browser's actual viewport dimensions?
问题 I have an iframe loaded inside a parent page - the iframe and parent page are on different domains. Can my iframed site detect the actual browser dimensions? 回答1: You can use the web API window.postMessage method too. It safely enables cross origin communication. https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage 回答2: The simple answer, is no. It cannot. Unless by some means the parent window can dynamically send data to the object inside the iframe... However if the content