[Javascript] Microsoft proprietary DOM vs Standards (Was: IE work-a-round question (re: checkbox

David Dorward david at dorward.me.uk
Thu Apr 17 01:20:55 CDT 2008


On 17 Apr 2008, at 03:07, Troy III Ajnej wrote:
> I still don't see "MyElement" shorthand anywhere
>  (1997-2008 == more than a decade).

There is a VERY significant difference between "A decade old" which  
the above statement uses and "A decade older then  
document.getElementById", which your email of 16 April 2008 06:02:07  
BST uses.

> > Generating global variables, which might conflict with built ins,
> > simply by associating an HTML document with a JavaScript program  
> is a
> > good way to generate confusing bugs during development and make
> > maintenance a pain.
>
> I don't see how could a refference to the doc element have to do  
> anything with
> associating HTML with Javascript or messing anything else up!

<div id="window">

<div id="document">

<div id="alert">

> > DOM 1 reached recommendation status in 1998
>
> Sorry but I don't recall if it's first recommendation included the  
> "document.getElemen..."
> statement in its apearence.

If you don't recall, then why not look?

http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-36113835

>  It was DOM Level 2 that invented e different statement for
> the same purpose and reached recommendation status only a month  
> before 2001.

Incorrect, see above.

> Eventhough FX didn't hesitate to implement it, but did it maliciously.

Firefox implemented the standard ... maliciously. That makes no sense  
whatsoever.

> Same goes with the famous .innerHTML.

Firefox implemented innerHTML because lots of websites used it  
(because Microsoft implemented instead of promoting the standard, and  
IE was commonly used). I don't see any maliciousness there either. I  
don't see Firefox's implementation breaking when you edit the inside  
of tables either.

> > It lent itself to write-only code, they didn't consult with anyone
> > before implementing it, the standards group (including Microsoft)  
> came
> > up with something better.
>
> :) Like What?

document.getElementById

> And what do you understand with "write-only"?

That when someone comes along to read the code, it is not obvious  
where the variable is being declared (since it is generated by being  
associated with an HTML document, not from within the script itself).  
This results in code which is hard to edit.

> What do you mean with "they didn't consult with anyone"?

That they implemented it rather then proposing it to the standards  
group that they are, and were, a member of.

> Do you understand that this acusation is a direct answer to the
> question: -Who was, and still is hollding up the web???

I don't really care what it is in answer to. It is packed full of  
factual errors.

> Don't forget that it was only in December 1997 that HTML 4.0 added  
> support for tables.
> Can you imagine? -Tables!

Right. Yes. HTML 4.0. Of course. http://www.w3.org/TR/REC-html32#table

The whole situation with HTML at the time was a mess. It didn't help  
that browser vendors ran around implementing <font>, <blink> and  
<marquee> instead of trying to develop something good. So HTML 3 was  
scrapped and HTML 3.2 came along to document what they had some up with.

> W3C recommended "document.getElement" a month before 2001, while
> IE4-was allready three years old and running.

Incorrect, see above.

> So it was, still is, and allways will be, W3C.

That statement is based on a number of false premises.

-- 
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/





More information about the Javascript mailing list