Re: If...else statement
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Feb 2006 19:31:41 -0000
Dave Anderson wrote:
Richard Cornford wrote:
They are fully W3C standard at current levels and have
the considerable advantage of being back-compatible with
everything that ever understood what a form was.
I searched, but could not find the window object in DOM
Level 3. Not exactly "everything that ever understood what
a form was", or was I just missing something?
I am not sure where the window object not being in DOM Level 3 comes
into anything I said. What I mend by "everything that understood what a
form was", was that in every browser that ever exposed form controls to
scripting accessing those controls through the - forms - collection of
the document and the - elements - collection of the form elements has
been possible, and where those property accessor did not work the form
controls where not exposed in the browser object model at all so no
alternative would have worked.
On the other hand I suspect you are making a valid point, but perhaps
one better expressed with an alternative example. Specifically; no W3C
DOM standard has ever specified that the ECMAScript global object (or
window object, as they are the same object in a browser object model)
should have a property named "document" that referred to the Document
object at the root of the DOM.
They had an opportunity to do so with the specification for the -
AbstractView - and - DocumentView - interfaces (W3C Document Object
Model Views; Level 2) if they had included a requirement in the
ECMAScript bindings that it should be the ECMAScript global object that
implements AbstractView, but the opportunity was missed.
So while:-
document.forms['formName'].elements['controlName']
- might be as W3C standard as:-
document.getElementById('contorlId')
- the use of the - document - identifier at the beginning or each is not
really W3C standard at all (at any level). Of course, if you don't
assume that the ECMAScript global object has a property called
'document' that refers to the root object of the DOM you are not going
to get very far at scripting web browsers at all. It makes a nonsense of
any appeal that web browsers should be exclusively scripted in
accordance with W3C standards as that is actually a practical
impossibility.
Richard.
.
- References:
- Re: If...else statement
- From: Randy Webb
- Re: If...else statement
- From: Daniel Kirsch
- Re: If...else statement
- From: Dave Anderson
- Re: If...else statement
- From: Daniel Kirsch
- Re: If...else statement
- From: Richard Cornford
- Re: If...else statement
- From: Dave Anderson
- Re: If...else statement
- Prev by Date: File Save As Dialogue
- Next by Date: RE: File Save As Dialogue
- Previous by thread: Re: If...else statement
- Next by thread: Re: If...else statement
- Index(es):
Relevant Pages
|