Is an iframe equivalent to a window?

I am trying to understand the hierarchical picture of window , document and iframe .

So, window is just a browser window, and document is the place where the DOM exists. document loaded into window .

Is creating an iframe very similar to creating a dialog ( window.openDialog() ) (is this nothing but a window)?

Both have a content document and a parent window.

+7
javascript dom html domdocument
source share
1 answer

Here's a very good discussion from WHATWG, the founders of HTML5: 6 Downloading Webpages - HTML: Living Standard - Edition for Web Developers

Overall, but much more on the actual page:

A viewing context is an environment in which document objects are presented to a user.

A tab or window in a web browser typically contains a viewing context, like an iframe.

and

Some elements (for example, iframes) can create additional viewing contexts. These are called nested view contexts.


And if you want to know more about the WHATWG: FAQ - WHATWG Wiki

+2
source share

All Articles