Re: Not able to get nsIDOMHTMLDocument from nsIDOMDocument

mads <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
Thanks man. It worked for me. Thanks to both of you for your quick responses
and the help. 
I have one more question on this. Is there any way to get to know the
readyState of the browser from the nsIDOMWindow interface?


Sergey Yanovich wrote:
> 
> 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
> _______________________________________________
> dev-tech-dom mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-dom
> 
> 

-- 
View this message in context: http://www.nabble.com/Not-able-to-get-nsIDOMHTMLDocument-from-nsIDOMDocument-tp21079467p21174557.html
Sent from the Mozilla - DOM mailing list archive at Nabble.com.
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.