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

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 UTC