It's my fault. My englinsh is not so good :(
I mean I want to tell if there are flash or video in a page by detecting the
mimeTypes of it's every document.
I get the Type by GetTypeAttrValue() in
nsHTMLSharedObjectElement::BindToTree() and set it in the related PresShell.
Thus, I can get the Type from the docshell in listener
WebBroswerListener::OnStateChange().
I'm not sure is it clear?
Since I can get the Type of all documents in BindToTree, the problem seems
to lie in the listener?
It seems I can't catch the aProgress of the "<div> " in the call back
OnStateChange().
-Havvy


Boris Zbarsky wrote:
> 
> Havvy wrote:
>> Hi, All,
>> In my custom application, I init a LoadURI by a WebBrowser.
>> How can I get the MimeTypes of the URI?
> 
> I'm not sure what exactly you're asking here...
> 
>> Currently, I  GetTypeAttrValue() in
>> nsHTMLSharedObjectElement::BindToTree().
> 
> What does that have to do with "the URI" that you originally loaded?
> 
>> It can detect the MimeTypes of most pages with flash plug-in. But there
>> are
>> always some exceptions, such as "www.rugby.com"
>> Note that, I get the mimetype of the aProgress in
>> WebBroswerListener::OnStateChange().
>> Does a .swf object not nofity the listener or not walk through the
>> BindToTree()?
> 
> All elements go through BindToTree if they're placed in the document.
> 
> -Boris
> _______________________________________________
> dev-embedding mailing list
> dev-embedding@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-embedding
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-Mimetype-from-firefox-tp24369333p24385439.html
Sent from the Mozilla - Embedding mailing list archive at Nabble.com.

_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to