I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I can determine whether the page has been loaded inside the iframe or directly in the browser?
Share
Note: Browsers can block access to
window.topdue to same origin policy. IE bugs also take place.Here’s the working code:
topandselfare bothwindowobjects (along withparent), so you’re seeing if your window is the top window.