Re: document.load: History and a proposal

On Sat, Mar 27, 2010 at 12:47 PM, Michael A. Puls II
<shadow2531@gmail.com> wrote:
> On Fri, 26 Mar 2010 21:47:35 -0300, Adam Barth <w3c@adambarth.com> wrote:
>> 2) Specify the Firefox behavior in HTML5 and implement it in WebKit.
>
> In the async case:
>
> What do you want to happen with load("file not found")? Do you want load()
> to throw an exception like Firefox, or do you want it to not throw an
> exception, still fire the 'load' event and just have
> event.target.documentElement be null like Opera?
>
> 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). How do other
> vendors feel about using that ns string?
>
> If load() does throw an exception, could it perhaps be standardized on the
> name of the exception? Firefox uses something like NS_ERROR_DOM_BAD_URI or
> something.
>
> It seems you can call load() multiple times on the same object and it'll
> work just fine too. Not sure if that's needed, but mentioning it.
>
> Also, with the sync version at least, does load() return true|false like
> Firefox, or is it a void function like in Opera and returns undefined?
>
> How do you trigger the sync version? Is it doc.async = false? Or, is it the
> lack of an onload property or registered 'load' listener that triggers the
> sync version?
>
> Please clarify 'Firefox behavior' in regards to the above. Do you want to
> copy Firefox exactly 100%?

All good question, which we can figure out once we decide on an
approach.  The synchronous behavior is triggered by setting
document.async to false.

Adam

Received on Saturday, 27 March 2010 22:10:18 UTC