By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,372 Members | 1,181 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,372 IT Pros & Developers. It's quick & easy.

document.all evaluates to false but document.all['chicken'] gets the item with ID - Mozilla madness!

P: n/a
Hi,

It seems the mozilla guys have chosen another (almost certainly poor
choice in my initial thoughts) of having document.all evaluate to
false, but document.all['chicken'] catch the chicken event - also
document.all.tags will work.

It seems that the document.all not evaluating to true is to stop the
really dumb object assumption scripts to fail and the document.all
scripts that don't bother with any object detection to all of a sudden
"work".

A shame, actual IE emulation would've made much more sense.

http://bugzilla.mozilla.org/show_bug.cgi?id=248549

Jim..
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
ji*@jibbering.com (Jim Ley) writes:
It seems the mozilla guys have chosen another (almost certainly poor
choice in my initial thoughts) of having document.all evaluate to
false, but document.all['chicken'] catch the chicken event - also
document.all.tags will work. .... http://bugzilla.mozilla.org/show_bug.cgi?id=248549


Yes, it seems to have status RESOLVED/FIXED, so I guess that means
that it is in (apparently in the birds version 1.0). Bummer. I had
hoped they would stand by this one
<URL:http://www.mozilla.org.uk/docs/proprietary-features-bad.html>

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2

P: n/a
Jim Ley wrote:
Hi,

It seems the mozilla guys have chosen another (almost certainly poor
choice in my initial thoughts) of having document.all evaluate to
false, but document.all['chicken'] catch the chicken event - also
document.all.tags will work.

It seems that the document.all not evaluating to true is to stop the
really dumb object assumption scripts to fail and the document.all
scripts that don't bother with any object detection to all of a sudden
"work".

A shame, actual IE emulation would've made much more sense.


The shame of it is that _any_ IE emulation will simply delay the authoring
of standards-compliant scripts.

innerHTML was an acceptable compromise because it is useful functionality
that could only be replaced by complex createElement() activities.
Including document.all.tags when there is an easy, standards-compliant
mechanism to do the same thing is totally unacceptable in my opinion.

I guess we can look forward to badly written scripts that use proprietary
features for many, many years to come.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #3

P: n/a
DU
Grant Wagner wrote:
Jim Ley wrote:

Hi,

It seems the mozilla guys have chosen another (almost certainly poor
choice in my initial thoughts) of having document.all evaluate to
false, but document.all['chicken'] catch the chicken event - also
document.all.tags will work.

It seems that the document.all not evaluating to true is to stop the
really dumb object assumption scripts to fail and the document.all
scripts that don't bother with any object detection to all of a sudden
"work".

A shame, actual IE emulation would've made much more sense.

The shame of it is that _any_ IE emulation will simply delay the authoring
of standards-compliant scripts.

innerHTML was an acceptable compromise because it is useful functionality
that could only be replaced by complex createElement() activities.
Including document.all.tags when there is an easy, standards-compliant
mechanism to do the same thing is totally unacceptable in my opinion.

I guess we can look forward to badly written scripts that use proprietary
features for many, many years to come.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

I entirely agree with your opinions and with Jim's and Lasse's opinions
on this. The thing is that Mozilla.org is opening the door to more
compromises of this sort and to more "smart compatibility" with
IE-specific ways to do DHTML scripts. The message that is sent with this
support of document.all[idElement] is that it is no longer beneficial to
resort to W3C web standards methods anymore. What's the use of notifying
users (or web authors, does not matter really) that
"Non-standard document.all property was used. Use W3C standard
document.getElementById() instead." if the mozilla browser is going to
support document.all anyway?? The message is recommending a
practice that no longer brings any kind of benefit; in fact, the
IE-specific way now brings the benefit of code size reduction. Where's
the incentive to make a page code more interoperable across browsers and
web-aware devices by making it compliant in the first place then?
I don't agree with this.

For over 2 years, many evangelization documents
{
Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-deve...upgrade_2.html
http://bugzilla.mozilla.org/show_bug.cgi?id=74952
and
Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsour...ages/#codefork
and
the whole Gecko DOM reference
}
failed to be accurate and reliable (not even without markup errors!) at
mozilla.org. It is obvious to first start with sanitizing these files
first before going into drastic directions/actions like that bugfile
http://bugzilla.mozilla.org/show_bug.cgi?id=248549
went.

Mozilla never was able to promote proactively and coherently W3C web
standards when, on 1 hand, mozilla.org webpages were promoting W3C web
standards that mozilla.org failed (or refused) to implement into its own
webpages.

One last thing. I think Lasse, Jim and yourself would be interested into
getting involved in bug 74952 and bug 93108
http://bugzilla.mozilla.org/show_bug.cgi?id=74952
http://bugzilla.mozilla.org/show_bug.cgi?id=93108
I sure would be interested into hearing suggestions (and/or feedback on
mine) regarding bug 74952.

DU
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.