W3C home > Mailing lists > Public > public-html@w3.org > March 2010

Re: document.load: History and a proposal

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sun, 28 Mar 2010 17:37:52 -0300
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: public-html@w3.org
Message-ID: <op.vaarpbzp1ejg13@sandra-svwliu01>
On Sun, 28 Mar 2010 15:09:08 -0300, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 3/27/10 3:47 PM, Michael A. Puls II wrote:
>> What do you want to happen with load("file not found")? Do you want
>> load() to throw an exception like Firefox
>
> I assume you were testing with file:// URIs?  See  
> <https://bugzilla.mozilla.org/show_bug.cgi?id=282432> if so.

Yes. With HTTP, load() returns true, 'load' is fired and  
event.target.documentElement is null. Seems like it should be that way for  
file:// too.

Although, it seems load() should return false when the file is not found  
etc.

>> What do you want to happen when load("file is found") is an xml file
>> with a parse error? In the 'load' callback, do you want just
>> event.target.documentElement to be null, or do you want documentElement
>> to be a 'parsererror' element in the
>> "http://www.mozilla.org/newlayout/xml/parsererror.xml" namespace like
>> Firefox does (basically a yellow screen of death document).
>
> See <https://bugzilla.mozilla.org/show_bug.cgi?id=289714>.

documentElement should just be null then. And, load() should return false.  
But, I wonder how many things count on the parsererror element being  
there. I use it in  
<http://shadow2531.com/opera/testcases/xhr/file_reader.js>. Although  
that's just example js, some sites probably do use parsererror detection.  
Will have to check the problem sites Adam listed better to see.

>> Please clarify 'Firefox behavior' in regards to the above. Do you want
>> to copy Firefox exactly 100%?
>
> As per above, on your first two points _Firefox_ doesn't want to copy  
> Firefox exactly 100%.  ;)

:) Thanks.

-- 
Michael
Received on Sunday, 28 March 2010 21:38:26 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:00 UTC