Re: get HTTP Document with XHR
faj <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Thanks for your reply.
The pages the program loads are all HTML.
Some servers require special strings in the request header for
authentication (in addition to cookies). Also for Apache directives:
http://httpd.apache.org/docs/1.3/mod/directives.html
So there is no way to map the ZUL_Document to HTML_Document?
What about other methods for inserting/reading the request/response header
other than the XMLHttpRequest?
Thanks,
-faj
Boris Zbarsky wrote:
>
> faj wrote:
>> The current code uses the loadURI() to load a page. However, to be able
>> to
>> insert custom http request to the header, the new code needs to use the
>> the XMLHttpRequest instead.
>
> Why, exactly?
>
>> After the page is loaded, the following information are needed:
>>
>> var doc = getWebNavigation().document;
>> ....
>> doc.childNodes.length
>> doc.childNodes[...].nodeType
>> doc.childNodes[...].textContent
>> doc.childNodes[...].tagName
>> doc.childNodes[...].attributes[...]....
>> etc.
>
> For an XML document, you can use the responseXML of the XHR. But if
> it's HTML, you lose.
>
> -Boris
>
> _______________________________________________
> dev-tech-dom mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-dom
>
>
--
View this message in context: http://www.nabble.com/get-HTTP-Document-with-XHR-tp22554215p22570510.html
Sent from the Mozilla - DOM mailing list archive at Nabble.com.