Re: Not able to get nsIDOMHTMLDocument from nsIDOMDocument

Benjamin Smedberg <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 12/22/08 10:30 AM, Sergey Yanovich wrote:

> What URL are you openning? If it is anything other than 'http://', you
> are not supposed to get a valid nsIDOMHTMLDocument instance here.

Sergey, please be careful. You are only supposed to get nsIDOMHTMLDocument
for HTML documents, but that doesn't have any relation to http. We load HTML
documents from http:, https:, file:, data:, chrome: and any number of other
URI schemes. What really matters is the MIME type, not the URI scheme.

mads, you haven't really answered the question about what kind of document
you're loading. Only HTML documents will QueryInterface to
nsIDOMHTMLDocument. Other types of documents such as XML and XUL do not
implement nsIDOMHTMLDocument.

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.