W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] DOM3 Load and Save for simple parsing/serialization?

From: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 20 May 2009 05:25:41 -0700
Message-ID: <51C13A4A-7BBA-4C3D-B48B-77714C3A99D7@apple.com>

On May 20, 2009, at 1:07 AM, Jonas Sicking wrote:

> On Wed, May 20, 2009 at 12:49 AM, Maciej Stachowiak <mjs at apple.com>  
> wrote:
>>
>> On May 19, 2009, at 11:49 PM, Jonas Sicking wrote:
>>
>>> On Mon, May 18, 2009 at 5:45 AM, Brett Zamir <brettz9 at yahoo.com>  
>>> wrote:
>>>>
>>>> Has any thought been given to standardizing on at least a part of  
>>>> DOM
>>>> Level
>>>> 3 Load and Save in HTML5?
>>>
>>> The Load and Save APIs in DOM 3 are much too complicated IMHO so I'd
>>> like to see something simpler standardized.
>>>
>>> We've had parsing and serializing APIs in Firefox for ages. Would be
>>> very exited to see someone put in effort to get their API cleaned up
>>> and standardized.
>>>
>>> https://developer.mozilla.org/En/DOMParser
>>> https://developer.mozilla.org/En/XMLSerializer
>>
>> WebKit actually implements most of these. I think it would make  
>> sense to
>> publish these as a WebApps spec. But these classes don't do any  
>> loading or
>> saving, just parsing and serializing.
>
> Doesn't XMLHttpRequest do all the load/save that is needed? I don't
> know how would could standardize save beyond that without relying on
> something like WebDAV.

I agree that XHR is sufficient for most load/save purposes and should  
be the API of choice.

>
>> Document.load would be the simplified
>> load/save method that it would make sense to standardize IMO, since  
>> Firefox
>> has it and it is needed for Web compatibility. I am concerned  
>> though that
>> Document.load() allows for synchronous network loads.
>
> I'm certainly no fan of Document.load() and wish it would go away. In
> fact we have decided not to add any additional features such as CORS
> or progress event support in order to discourage its use and move
> people to XHR instead.


For better or for worse, enough sites seem to rely on it that we'll  
likely have to implement it in WebKit:

https://bugs.webkit.org/show_bug.cgi?id=9063

That says to me that it should likely be standardized in some form,  
even if it is discouraged.

Regards,
Maciej
Received on Wednesday, 20 May 2009 05:25:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:49 UTC