Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > document.all evaluates to false but document.all['chicken'] gets the item with ID - Mozilla madness!

Reply
Thread Tools

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

 
 
Jim Ley
Guest
Posts: n/a
 
      07-24-2004
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..
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      07-24-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (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 - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
 
Grant Wagner
Guest
Posts: n/a
 
      07-26-2004
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 <(E-Mail Removed)>
comp.lang.javascript FAQ - http://jibbering.com/faq


 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      08-02-2004
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 <(E-Mail Removed)>
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CustomValidator Returns False, but False is Ignored DJ ASP .Net 3 12-27-2007 10:29 AM
0 == False but [] != False? Rajarshi Python 20 05-29-2007 11:04 PM
XMLHttpRequest gets data to display in element but data gets appended not replaces previous! libsfan01 Javascript 5 12-20-2006 06:25 AM
Not only the selected HREF gets surrounded, but the whole row gets surrounded Stefan Mueller HTML 5 07-10-2006 11:53 AM
False positive, false intrusion, false alarm Nick Computer Security 3 04-26-2006 07:40 PM



Advertisments