469,610 Members | 2,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

window._content.document diff?

What's the difference between window._content.document and
window.content.document ?
Are they interchangeable?

Any info would be helpful.

Alex
Sep 11 '05 #1
3 2039
Alex wrote:
What's the difference between window._content.document and
window.content.document ?
They make use of different properties of the window object. The first
accesses an object (or what it assumes to be an object) referred to by a
property called "_content" and the second accessed an object referred to
by a property called "content".

Neither of these properties of the window object are part of any
standard or part of the set of pre-formal standards features common to
web browsers (commonly referred to as DOM level 0). That is; in any
given browser environment they may be host created properties of the
window object, JS programmer created global variables or undefined.

In practice, recent Mozilla/Gecko browsers implement these two
properties. In a standard web page they both represent references back
to the window object (and so are redundant). In a frame document they
appear to both refer to the topmost frame's window object (and so are
redundant).

Older Mozilla/Gecko browsers have the "content" property but appear to
have lacked the "_content" property, suggesting a realisation that
"content" was not such a good name for a global property.
Are they interchangeable?
In a document on a Mozilla/Gecko browser they appear to be effectively
equivalent. On a browser that implements neither and has not executed
any script that would create either they are also equivalent (in that
they would both produce a runtime error).
Any info would be helpful.


Unless you are scripting an add-on specifically for Mozilla/Gecko
browsers you probably don't want to use either.

Richard.
Sep 11 '05 #2
Alex a écrit :
What's the difference between window._content.document and
window.content.document ?
Are they interchangeable?

Any info would be helpful.

Alex


If you want to create a webpage that will appear in the sidebar of a
Mozilla-based browser, then you will need to code the basehref of that
page to be:

window._content

meaning that all your links in that sidebar-ed page will have its target
in the content frame.

window.content could be the same thing (that is what is claimed in a
Gecko DOM reference webpage): I have not checked this.

Gérard
--
remove blah to email me
Sep 12 '05 #3
Gérard Talbot a écrit :
If you want to create a webpage that will appear in the sidebar of a
Mozilla-based browser, then you will need to code the basehref of that
page to be:

window._content

meaning that all your links in that sidebar-ed page will have its target
in the content frame.

window.content could be the same thing (that is what is claimed in a
Gecko DOM reference webpage): I have not checked this.


Example on how to build this:

Sidebar Developer's Guide
http://devedge-temp.mozilla.org/view.../2002/sidebar/

Gérard
--
remove blah to email me
Sep 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Peter Altenberg | last post: by
2 posts views Thread by Yves-Alain NICOLLET | last post: by
8 posts views Thread by TonyHa | last post: by
2 posts views Thread by # Cyrille37 # | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.