"KC" <kc*****@gmail.comwrote in comp.lang.javascript
:
Hi,
Every JavaScript executive context has a top-level window and
we can use window.open() to open another window ...
Does this related to Windows created by click on "File"->"New Window"
or "File" -"New Tab" in browser's menu bar ?
Technically Javascript at its core knows nothing about windows (as a class
or object).
It knows about documents (with the help of the Document Object Model),
which is why as soon as the window object is instantiated, the document
that is contained by it is created.
I think window created by "File"->"New Window" and "File"->"New Tab"
are independent to each other from JavaScript's point of view. Is this
correct ?
A tab is just another window, although it is contained within the
application frame (as opposed to an HTML-defined frame). You use the name
of the window object (tab) to refer to changes to it, includes its
visibility (likely a z-order parameter in which you change the front-to-
back positions of tabbed windows relative to one another).
Means we can't write JavaScript code and make them talk to each other
via
window.frames[] ... correct ??
Frames are defined by the Frameset specification of HTML, and they
actually divide a window object into different containers, each holding
their own document. A frames property to a window object would be created
by use of the HTML elements that define frames upon document creation, or
dynamically otherwise.
Do not confuse the frames in a window object (an HTML-based construct)
with the tabbed windows that are contained in an application "frame" or
container or enclosure (the application "super" window).
No part of the Javascript core definition even discusses the nature of
frames or windows or tabbed windows. Look to those who created these
extensions to presenting and styling document content to describe them to
you, and with examples. Examples are important: what is the point in
constructing a specification to a language or guideline and not ensuring
that your audience understands it by the use of several examples?
I'm confuse by the term "window" or "frame" used in JavaScript books.