W3C home > Mailing lists > Public > public-webapi@w3.org > April 2007

Re: [XHR] send() "stringification mechanisms of the host language"

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Mon, 2 Apr 2007 10:44:16 +0100
To: public-webapi@w3.org
Message-ID: <d36806ece9bd7e65e90674019904e7bab99b30a4@localhost>

Maciej Stachowiak <mjs@apple.com> wrote:

> 
> 
> On Mar 30, 2007, at 2:31 PM, Simon Pieters wrote:
> 
> >
> > In the send(data) algorithm, step 3, says:
> >
> >    data is not a DOMString or Document
> >       The stringification mechanisms of the host language must be  
> > used on
> >       data and the result must be treated as if data is a DOMString.
> >
> > I'm not sure what that means. For instance, if data is an Element,  
> > would it be serialized with .outerHTML or similar? Could it be  
> > clarified, or could an example be added, or, if the spec is fine  
> > and it's just me being slow, be explained to me? :-)
> 
> JavaScript has a toString conversion operation defined on all types.  
> For an HTML div element it would say "[object HTMLDivElement]" or  
> something similar.

OT: When it comes to Node and its subclasses, the resulting string depends
on the browser/JS engine - you cannot rely on it taking any specific form.


-- 
Stewart Brodie
Software Engineer
ANT Software Limited
Received on Monday, 2 April 2007 09:43:15 GMT

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