On Fri, 21 Mar 2008 11:04:24 +0100, Hallvord R. M. Steen
<[EMAIL PROTECTED]> wrote:
Personally I think throwing is quite a natural thing to do in this
condition (the document/URL of window has changed since the XHR object
was created) and when 3 out of 4 major implementations already do so we
probably don't introduce compat problems by specifying that.
This is actually already defined by the draft specification, the tests
still need to be updated however:
http://dev.w3.org/2006/webapi/XMLHttpRequest/
I still think we can't make implementations rewire their garbage
collection to pass an extreme corner case test. This sort of stuff
simply should not be specified here. :-p
It should be defined at some point, but I suppose we can remove that test
as it does not test something that is XMLHttpRequest specific, but rather
something that has to do with garbage collection.
Changing this would require some rewording of the definition of
document pointer in section 4 probably:
http://dev.w3.org/2006/webapi/XMLHttpRequest/#xmlhttprequest
If we want that suggestions are welcome.
What about just throwing if the associated window is closed or removed
from the DOM?
Actually, I think removing the test is better as this is not
XMLHttpRequest specific. If the Document object is indeed removed (as with
navigating) an exception would be thrown per the current specification,
but whether or not that happens depends on factors that are out of scope
for the XMLHttpRequest specification.
--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>