>
> Date: Tue, 15 Dec 2009 09:51:20 -0800
> From: Boris Zbarsky <[email protected]>
> To: [email protected]
> Subject: Re: Problems detecting event
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 12/15/09 6:06 AM, Blaine Monkey wrote:
> > Gecko Version: Mozilla XULRunner 1.9.0.15 - 2009102704
>
> OK, should be good.
>
> > I thought that pCOM_det->AddEventListener
> > (NS_LITERAL_STRING("DOMSubtreeModified"), domEvList, false); function
> adds
> > the event to the domEvlist listener and after do this, domEvlist detects
> > DOMSubtreeModified event.
>
> Ah, yes.  I missed that line.  Yes, mutations after you make that call
> should call this listener.
>
> I assume your EmbedEventListener QI implementation is correct and such?
>
> -Boris
>

I don't use QI to obtain the EmbedEventListener object, I used a pointer.

I switched from:

nsIDOMEventListener *domEvList=static_cast<nsIDOMEventListener
*>(static_cast<nsIDOMKeyListener *>(pMyBrowser->mEventListener));

to:

nsCOMPtr<nsIDOMEventListener> domEvList;
domEvList = do_QueryInterface(static_cast<nsIDOMEventListener
*>(static_cast<nsIDOMKeyListener *>(pMyBrowser->mEventListener)));

but with the same result. mEventListener is the  EmbedEventListener object
created in MyBrowser. This is a valid way, isn't it?

I saw other thing, but I don't know if it can be the problem . The
application only executes OnstateChange once, when the html page is opened
(request start).

I saw in OnStateChange function of MyBrowserProgressListener an error, I
put if(SATE_STOP){  and this is wrong, STATE_STOP is a constant.

I changed the if with this other: if ((aStateFlags & STATE_STOP) &&
(aStateFlags & STATE_IS_DOCUMENT)) but I've the problem that the application
only insert into OnStateChange function when the application opens the
page.

I don't know why isn't it detecting when the document is loaded. The end of
a request is when the page is loaded, isn't it?

Any idea?
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to