<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
code
{font-family:"Courier New";}
span.Stylwiadomocie-mail18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=PL link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>The meaning of “</span></font><code><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt'>HTMLDocument.responseXML</span></font></code><font
size=2 color=navy face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial;color:navy'>” looks a bit strange and unexpected: a
property of an object bound to the object itself by definition. I would
suggest leaving that one out.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Chris<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
whatwg-bounces@lists.whatwg.org [mailto:whatwg-bounces@lists.whatwg.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Weston Ruter<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 29, 2008
8:19 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Kristof Zelechovski<br>
<b><span style='font-weight:bold'>Cc:</span></b> whatwg@whatwg.org; Ian
Hickson; Anne van Kesteren<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [whatwg] Implement
XMLHttpRequest interface subset onHTMLDocument</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>If the interface were
implemented as-is, document.responseXML would just be a reference back to the
document object.<br>
<br>
So if the document is XML, then document === document.responseXML<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Wed, Oct 29, 2008 at 12:14 PM, Kristof Zelechovski <<a
href="mailto:giecrilj@stegny.2a.pl">giecrilj@stegny.2a.pl</a>> wrote:<o:p></o:p></span></font></p>
<div link=blue vlink=blue>
<div>
<p><font size=2 color=navy face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial;color:navy'>What should the property
"HTMLDocument.responseXML" represent?</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial;color:navy'>Chris</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial;color:navy'> </span></font><o:p></o:p></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:whatwg-bounces@lists.whatwg.org" target="_blank">whatwg-bounces@lists.whatwg.org</a>
[mailto:<a href="mailto:whatwg-bounces@lists.whatwg.org" target="_blank">whatwg-bounces@lists.whatwg.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Weston Ruter<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 29, 2008
8:06 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:whatwg@whatwg.org" target="_blank">whatwg@whatwg.org</a><br>
<b><span style='font-weight:bold'>Cc:</span></b> Ian Hickson; Anne van Kesteren<br>
<b><span style='font-weight:bold'>Subject:</span></b> [whatwg] Implement
XMLHttpRequest interface subset on HTMLDocument</span></font><o:p></o:p></p>
</div>
<div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<div>
<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I realized that the HTTP response headers exposed in
the <a href="http://www.w3.org/html/wg/html5/#htmldocument" target="_blank">HTMLDocument
interface</a> are limited: referrer, cookie, lastModified, charset,
characterSet.<br>
<br>
It would be very useful if a script could get *all* of the response headers,
the raw entity body, and the HTTP status: basically it would be great if the
HTMLDocument interface implemented a subset of of the XMLHttpRequest spec,
namely the parts which have to do with the response (e.g.
getAllResponseHeaders(), getResponseHeader(), status, and others which appear
below). The HTMLDocument interface already has a readyState property which
XMLHttpRequest also has, but the HTMLDocument interface lacks XHR's
onreadystatechange attribute.<br>
<br>
If this subset were implemented on HTMLDocument, then scripts would be able to
determine if the page if a 404 or get any other arbitrary information that is
passed in the response header.<br>
<br>
Here's a proposed extension to the HTMLDocument interface with some comments to
explain the semantics:<br>
<br>
</span></font><font face="Courier New"><span style='font-family:"Courier New"'>interface
HTMLDocument {<br>
...<br>
//another way to get DOMContentLoaded event; the readyState would start
out as LOADING<br>
attribute EventListener onreadystatechange;<br>
<br>
// state<br>
const unsigned short UNSENT = 0;<br>
const unsigned short OPENED = 1;<br>
const unsigned short HEADERS_RECEIVED = 2;<br>
const unsigned short LOADING = 3;<br>
const unsigned short DONE = 4;<br>
readonly attribute unsigned short readyState; //already in HTML 5<br>
<br>
// request<br>
void abort(); //complements window.stop(): stops the contained document
instead of the associated resources<br>
<br>
// response<br>
DOMString getAllResponseHeaders();<br>
DOMString getResponseHeader(in DOMString header);<br>
readonly attribute DOMString responseText; //the non-parsed content of
the document<br>
readonly attribute Document responseXML;<br>
readonly attribute unsigned short status;<br>
readonly attribute DOMString statusText;<br>
}</span></font><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>