W3C home > Mailing lists > Public > public-webapi@w3.org > August 2006

XMLHttpRequest conformance comments

From: Subbu Allamaraju <subbu.allamaraju@gmail.com>
Date: Mon, 31 Jul 2006 23:32:12 -0600
Message-ID: <e3f21b1a0607312232h522e816bn9906367a5695e2c5@mail.gmail.com>
To: public-webapi@w3.org
I would like to make the following comments on the current draft of
XMLHttpRequest based on some tests I wrote (at
http://www.subbu.org/demos/xhr/conf/xhr.php) to check current
implementations against the draft.

a. The spec requires that XMLHttpRequest objects must also support the
EventListener interface, but none of the browsers support it yet. Is the
first version of XMLHttpRequest also going to support additional
functionality not supported by current implementations? If an explicit
choice is made to support this additional functionality, it would be nice to
call out this in the introduction.

b. When the response status is not available, accessing status and
statusTest would cause an exception. Why is this not the case for others
like getResponseHeader, getAllResponseHeaders, and responseText? For
instance, per the current draft, calling getAllResponseHeaders when
readyState = 1 must return null, even though it is meaningless to expect any
valid return value before calling send(). It will be easy to code if
getResponseHeader() and getAllResponseHeaders() behave the same as status
and statusText. That is, all response artifacts must throw INVALID_STATE_ERR
if called when readyState is less than 3.**

c. Per the current draft, getResponseHeader() is required to return an empty
string if a given header is not present. From programming API point of view,
a value of null is more natural.

Subbu

-- 
------------------------------
http://www.subbu.org
Received on Tuesday, 1 August 2006 05:32:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:55 GMT