[thelist] What does event.srcElement.innerText refer to?

Jeff Howden jeff at jeffhowden.com
Tue Oct 28 22:28:05 CST 2003


simon,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Simon Willison
>
> > It references the innerText property of the element
> > that initiated a particular event. srcElement is, I
> > believe, IE-proprietary, but others correct me if I'm
> > wrong. You could, for instance, write a script like
> > this:
>
> It is indeed IE proprietary, as is innerText. [...]
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

that's not saying much seeing as how every browser *but* mozilla supports
both innerText *and* srcElement.  with that kind of support who cares if
microsoft can claim it originally as their idea.  it's certainly alot easier
to use the innerText property than recursing every single textNode
extracting and concatenating their contents.

just like the innerHTML property, it doesn't make sense for mozilla to
continue to not support either of these properties.  they will be doing a
disservice to their user-base if they want to argue against it in the name
of principle, especially considering their folding on the issue of the
innerHTML property many builds ago.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> The Javascript event model is the main place in which
> IE differs from the standards as implemented by
> browsers such as Mozilla.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

to give a little perspective to this claim, ie6 was released [1] almost a
full year before mozilla ever even made it to v1.0 [2] (august 2001 vs june
2002).  i can't find the exact date that the mozilla builds started
supporting the basics of dom level 2 events specification, but i'm confident
it wasn't until the 0.9 releases that it was anywhere near
usable/stable/dependable/pseudo-non-buggy.  the fact that ie6 deviates from
the "standards" is really no surprise as a) the push of those drafting the
standards wasn't very strong and b) the standards for event handling didn't
officially become a specification until november of 2000 when dom level 2
was made official [3] (when development of ie6 was already long underway if
the amount of time it took mozilla to get to 1.0 is any indication).  in
addition, there are numerous things about the way the "standards" implement
certain things that just plain stupid.  too often, ie's implementation of
the same functionality is far superior both in ease of use, flexibility,
scalability, etc.

even mozilla, which is touted as being superior doesn't even support the
full dom level 2 events specification, and i quote "W3C's DOM Level 2 Events
Specification (partly supported by Mozilla)". [4]

in conclusion, no browser is perfect.  however, when shaking fingers at
certain browsers, keep in mind the timelines of things before wagging your
tongue about a particular browser's level of support or choice of
implementation.  ie isn't the only browser guilty of development vs
specification release overlap.  we're still dealing with netscape's about
face regarding css and it's quick, mega-buggy implementation of css via it's
already-in-development jss (javascript style sheets) in version 4, for
example.

[1] - http://afongen.com/blog/archives/000095.php
[2] - http://www.mozilla.org/releases/mozilla1.0.html
[3] - http://www.w3schools.com/w3c/w3c_dom.asp
[4] - http://www.mozilla.org/docs/web-developer/


.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/



More information about the thelist mailing list