3

If I have an iframe that loads a page from an external domain, and that external page has javascript code that accesses the Window Object, would that break the execution of that javascript? I mean would the script get executed as it would in a normal window, or would the iframe stop the execution.

Basically the external domain has a javascript code that sets a window property. So what would happen to it in an iframe?

Thanks in Advance

tsjamm
  • 125
  • 1
  • 12

1 Answers1

2

When the iframed js executes, it does so within the context of the iframe being it's window. To access the browser window, you do window.parent