Thomas said:
Comparing apples and oranges does not help.
But my complaint is precisely that the two do have equivalent status in
practice. Both being properties of the window/global object that came
into existence prior to standardisation and have been repeatedly (and
reasonably consistently) implemented in web browser ever since, and are
likely to go in being implemented regardless of whether they are ever
explicitly defined in any standards.
Yes, there is no Web standard (yet) that says that the Global
Object or the host object referred to by `window' has to or
should implement the AbstractView interface.
What is to stop someone from categorising - onload - as not "yet"
standardised? Granted it is in the nature of the property that including
it in an IDF formulation of a standard would probably be somewhere
between difficult and impossible, which may leave the W3C unable to
standardise it, but that does not mean it could never happen.
But at some point even standards compliant DOM referencing
has to start. Why not at the point that was inherited from
DOM Level 0?
Yes, there has to be some entry point for the DOM, and so we continue to
use the proprietary "and therefore inherently unreliable" - document -
property of the global object. But the fact that we are willing to do
that as a matter of course puts 'proprietary "and therefore inherently
unreliable"' into perspective. We are not expecting any new browser to
stop implementing a - document - property of the global object because
doing so will make that browser seem utterly bracken. The same is true
of the - onload - property. Its omission may not make a browser look
quite as usless as one without a - document - property, but it would
still look so broken that it would be unlikely to get out of QA without
serious questions being raised as to its viability as a web browser.
The `onload' property of the Global Object or the object
referred to by `window', on the other hand, is proprietary
and it is only that.
It is only "proprietary" in the sense that all of DOM 0 is proprietary.
These things persist (and will continue to be implemented) because they
are used.
There is no Web standard that says this property even
should exist,
So much like - document -.
no standard interface that defines a corresponding attribute to
be implemented, and no specification that defines what values
should be handled by that property
So much like - document -.
and how the value should affects the event propagation process.
It is unwise to assume the well-defined propagation process as
defined in W3C DOM Level 2 and on the other hand rely on that
assigning to a proprietary property does the same as calling
addEventListener() would do.
The window/ECMAScript global object is not specified as being a Node
interface implementing object so would not be expected to have an -
addEventListener - method at all.
IOW, it should be the last resort to ensure backwards
compatibility, not the default procedure of event programming.
There is no standardised method for a script to dynamically assign a
function to be called when an associated document finishes loading.
Without that the longstanding and universally (in scriptable browsers)
implemented - window.onload - is the sensible choice.
Richard.