I have an amendment to my proposal. There was a <a href="http://ajaxian.com/archives/language-jsonp-service">post</a> on Ajaxian today about a "Language JSONP Service" which "calculates the users language based on browser headers". This seems like a terrible workaround since the Accept-Language header is sent from the same browser that the script is running in; a script shouldn't have to make an HTTP request just to find out what the browser's request headers are.<br>
<br>Therefore, I propose that in addition to implementing on HTMLDocument the XMLHttpRequest interface subset I initially suggested, I see that it would also be very useful for a script to obtain the request headers that were sent which resulted in the current document as the response. The current version of XMLHttpRequest hints to a future version including a getRequestHeader() method, a method which would complement getResponseHeader(); there could also be a getAllRequestHeaders() method that would correspond to the existing getAllResponseHeaders() method. (Obviously it would not make sense to implement the setRequestHeader() method.)<br>
<br>If these two methods ( getRequestHeader() and getAllRequestHeaders() ) were implemented, then there would be no need for a "Language JSONP Service" because there would be a better way to get the same result synchronously without any HTTP request, for example: document.getRequestHeader('Accept-Language')<br>
<br>Weston<br><br><br><div class="gmail_quote">On Wed, Oct 29, 2008 at 12:45 PM, Kristof Zelechovski <span dir="ltr"><<a href="mailto:giecrilj@stegny.2a.pl">giecrilj@stegny.2a.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">










<div link="blue" vlink="blue" lang="PL">

<div><div class="Ih2E3d">

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Providing the original document
tree before transformation in </span></font><code><font size="2" face="Courier New"><span style="font-size: 10pt;" lang="EN-US">HTMLDocument.responseXML</span></font></code><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> makes sense.  In that case, the </span></font><code><font size="2" face="Courier New"><span style="font-size: 10pt;" lang="EN-US">Document</span></font></code><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> returned should be immutable, just as a </span></font><code><font size="2" face="Courier New"><span style="font-size: 10pt;" lang="EN-US">DOMString</span></font></code><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> is; I am not sure how to declare it in IDL.</span></font></p>


<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Chris</span></font></p>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> </span></font></p>

</div><div>

<div style="text-align: center;" align="center"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:westonruter@gmail.com" target="_blank">westonruter@gmail.com</a> [mailto:<a href="mailto:westonruter@gmail.com" target="_blank">westonruter@gmail.com</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:35 PM<div class="Ih2E3d"><br>
<b><span style="font-weight: bold;">To:</span></b> Kristof Zelechovski<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:whatwg@whatwg.org" target="_blank">whatwg@whatwg.org</a>; Ian
Hickson; Anne van Kesteren<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [whatwg] Implement
XMLHttpRequest interface subset onHTMLDocument</div></span></font></p>

</div><div class="Ih2E3d">

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

<p style="margin-bottom: 12pt;"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">This is not completely
strange or unexpected construct, since </span></font><font face="Courier New"><span>window == window.self</span></font>.<br>
<br>
Furthermore, having a <font face="Courier New"><span>HTMLDocument.responseXML</span></font>
would be useful in the case that an XSLT stylesheet outputs HTML, plain text,
or something else; in such a case, it would be very useful to get the original
responseXML. Note that I don't envision this responseXML being any sort of
shadow DOM; I mean, if XSLT did transform the XML data, making a change to
responseXML would not cause the XSLT engine to re-parse the updated
responseXML. Maybe this would be useful, but it seems overly complicated.<br>
<br>
</p>

<div>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;">On Wed, Oct 29, 2008 at 12:26 PM, Kristof Zelechovski <<a href="mailto:giecrilj@stegny.2a.pl" target="_blank">giecrilj@stegny.2a.pl</a>> wrote:</span></font></p>


<div link="blue" vlink="blue">

<div>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">The meaning of "</span></font><code><font size="2" face="Courier New"><span style="font-size: 10pt;" lang="EN-US">HTMLDocument.responseXML</span></font></code><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">" 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.</span></font></p>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Chris</span></font></p>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> </span></font></p>

<div>

<div style="text-align: center;" align="center"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; 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:19 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Kristof Zelechovski<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:whatwg@whatwg.org" target="_blank">whatwg@whatwg.org</a>; Ian
Hickson; Anne van Kesteren<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [whatwg] Implement
XMLHttpRequest interface subset onHTMLDocument</span></font></p>

</div>

<div>

<div>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

<p style="margin-bottom: 12pt;"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">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</span></font></p>

<div>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;">On Wed,
Oct 29, 2008 at 12:14 PM, Kristof Zelechovski <<a href="mailto:giecrilj@stegny.2a.pl" target="_blank">giecrilj@stegny.2a.pl</a>>
wrote:</span></font></p>

<div link="blue" vlink="blue">

<div>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">What should the property
"HTMLDocument.responseXML" represent?</span></font></p>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Chris</span></font></p>

<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> </span></font></p>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

</div></div>

</div>


</blockquote></div><br>