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

David Dorward david at dorward.me.uk
Sat Apr 19 07:29:04 CDT 2008


On 19 Apr 2008, at 10:38, Troy III Ajnej wrote:
> > > > Generating global variables, which might conflict with built  
> ins,
> > <div id="window">
> > <div id="document">
> > <div id="alert">
>
> A set of "reserved words" will never sieze to exist.

Yes, but having reserved words in JavaScript should not influence any  
decision made about the HTML.

> > http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-36113835
>
> I was being educated.
> Because I already did a re-check while writting!
> Please view the: http://www.w3.org/TR/DOM-Level-2-Core/core.html

Existing in DOM level 2 doesn't stop it existing in DOM level 1 as well.

> Correct all the way! It was a re-invetnion of the wheel. It was  
> "getElementsByTagName"
> that was proposed in Level 1 not the ID.

See the link I provided previously.

> http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-getElBId
>
> same page as the above. Where it explicitely states: "getElementById  
> introduced in DOM Level 2"
> This, -once again - proves that "document.getElementById" is Level  
> 2, and was ~introduced~ only a
> month before 2001 respectively.

It was made more flexible and introduced into DOM Core Level 2. It  
already existed in an HTML specific form in DOM HTML Level 1 (I assume  
that this is because they needed to have some way to define "id" in a  
generic way for XML: http://www.w3.org/TR/xml-id/ ). See the link I  
provided before: http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-36113835 
  . Note the date in it. The W3C do NOT edit old specifications,  
release them under exactly the same name (they add revision  
information to the title) and then publish at the same citable (as  
opposed to "quick link to the latest version") URI.

> > > Eventhough FX didn't hesitate to implement it, but did it  
> maliciously.
>
> > Firefox implemented the standard ... maliciously. That makes no  
> sense
> > whatsoever.
>
> The "it" language var cited above meant "reference by ID", I never  
> said "FX implemented the standard",
> why do you alter my words? -So it does make sense!

I must have misinterpreted you.

How did they implement support for Microsoft's proprietary system _  
maliciously_?
>
> > > 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.
>
> O really!
> Why did FX implement the NON-STANDARD innerHTML?

Because Microsoft had massive market share and influence, so many  
developers who didn't know better used the proprietary system ... and  
they didn't want to produce a browser that lots of sites simply didn't  
work with.

> Why did FX support the NON-STANDARD reference by ID? While providing  
> error mesage:
> "Element rreferenced by Name/ID use standard getElementById()  
> instead".

It's a warning. There is a standard, which Microsoft was partly  
responsible for, and a (poor) proprietary system. Warning for use of  
non-standard constructs is a perfectly standard part of compiler /  
interpreter design.

> I'ts obviously malicious!

Promoting a (better) standard over a proprietary system is not  
malicious.

> Today this message doesn't turn your Error Console button into red,  
> but it used to.
> And what about innerHTML, it doesn't even yeld a soft error nor a  
> warnig message!
> Does it mean that innerHTML has become a standard?!!

It is being worked on. http://www.w3.org/html/wg/html5/#innerhtml0

> FX never met a W3C standards and never will. It's a pure demagogy  
> and you know that.

Garbage.


> > > > 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
>
> Let's see...
>
> > > 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.
>
> Nonsense...
> Complete nonsense.
> First of, -where do you look before assigning your vars? Or do you  
> arbitrarily try to
> assing whatever comes to your mind, hopping that it will call the  
> object you are aiming to,
> by guess or something?

What does that have to do with reading other people's code?


> "MyElement" is not a variable, it's the actuall object you are  
> referrening to

No, it is an variable containing an object reference.

> , -and there
> will be no guess nor any place for confussion.That way you can never  
> go wrong about.
> On contrast, what makes the element referrencing a real pain is a  
> completely independent
> naming convention of vars that refer to them.

There is nothing stopping you assigning the return value of  
getElementById to a variable with the same or a similar name as the id  
of the element.

>
> MyElement.width="value" compared to:
> var anyName = document.getElementById("MyElement").width="value"
> is actually what makes it almost impossible to edit some one else's  
> document.

Well yes. If you will compare proprietary code to a syntax error, then  
obviously the former will win.


> You'll have to
> digg in three different places to find out what is the correct id/ 
> name of the element referred from
> this var; where was it declared; find the original name/id of it;  
> find it in HTML; check if
> there is everything right than go through CSS to find that there was  
> some banal typing error
> causing your function to fail or to act as not expected.

Generally speaking, people declare their variables at the top of the  
function that uses them, it isn't far to look. Then you give them a  
similar name, and what's the problem?

> > > 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.
>
> I allready pointed out that IE4 was allready out and running for  
> thee long coding years before
> they even came up with any proposal.

As pointed out above, you are wrong about that.

> Douring the time you are talking about, W3C was bussy cleaning the  
> mess they've created with the
> GIF format and pattents and were intensely preocupied with PNG  
> developement. They didn't even turn
> their eyes on the matters we are talking about.



>
> > > 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.
> >
> As we can clearly see, the facts are all in the right place.

No, you are still misinterpreting what you are reading.

>
> > > 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.
>
> So, as you see, they were not capable of even dealing with such a  
> fundamental need like tables
> at the time, but you expect them to address things like how to  
> manipulate the DOM?!

*headdesk*

The HTML 3 drafts had tables in them too: http://www.w3.org/MarkUp/html3/tables.html

Their problem was browser vendors implementing proprietary stuff and  
ignoring standards, you can't blame them for that. How is the W3C  
supposed to be "holding back the web" if browser vendors are ignoring  
them?

> > > W3C recommended "document.getElement" a month before 2001, while
> > > IE4-was allready three years old and running.
> >
> > Incorrect, see above.
>
> Correct all the way, as you can see from above too.

No, I've pointed you at a 1998 document that defined  
document.getElementById as it relates to HTML documents.

> For more than three years, coders around the world got used to  
> "MyElement" solution with no alternative
> recommendation. Accusing IE for being non-compliant is a pure  
> demagogy.

Incorrect, see 1998 document.

> One can not write you a ticket for exceeding speed-limit yesterday  
> while driving 70mph, simply because
> today the speed limit for that road is reduced to 60mph by God  
> himself, shortly known as W3C & his felow
> cancelor FX.

Firefox didn't even exist when that specification came out. I suspect  
Microsoft had more influence over it then any entity that had anything  
to do with what would become the Firefox codebase.

>
> > > So it was, still is, and allways will be, W3C.
>
> Mean time, while W3C was holding back the web, coders turned to  
> using Flash and other plugin alternatives
> filling the vacuume they (W3C) almost puposedly created.

I've lost track. Is this the period after Microsoft crushed Netscape,  
and then dominated the browser market with IE6 which went though half  
a decade without any development?

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





More information about the Javascript mailing list