Re: Not able to get nsIDOMHTMLDocument from nsIDOMDocument
Sergey Yanovich <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
On 2008-12-22 23:12, Benjamin Smedberg 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. Yeah, the post became a bit ignorant. mads is enumerating XUL windows, so I inferred he is working with XUL from 'chrome://' and just wanted to confirm that. mads, this is probably not what you actually need: > result = iWindowMediator->GetXULWindowEnumerator(0, getter_AddRefs(enum)); Instead, you may try 'GetEnumerator()' and retrieve the results directly as nsIDOMWindow. -- Sergey Yanovich