Re: Detecting the documentLoaded event only on top frame

2009-07-28 Thread martin
On 23 čnc, 05:58, Johnson  wrote:
> > Because it will detect subframe loads that start after the main page has
> > finished loading (e.g. a user clicking a link in the subframe).
>
> I don't quite understand the meaning of "documentLoaded event only on
> top frame", it may mean:
>
> 1. the "documentloaded" event occurred in the top frame
> 2. the whole document is loaded completely
>
> If the first one, you are right, other means are requeired. If second,
> I am right.
>
> XULRunner SDK does not provide the event DocumentLoaded, it only
> provide the event OnStateChange, and we should use the latter event
> and its parameters to determine whether the document is loaded. I did
> provide a means to solve a problem, which may be the asker's problem,
> and may be not.
>
> Thank you for leading me to deeper thought.

Actually I needed to detect that the whole document was loaded. Sorry
I didn't express it right. Johnson thank you very much, changing the
flag solved the problem. That's exactly what I needed and will never
find out alone :) Thank you both for your comments, it made me
understand things a bit deeper then before.
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-23 Thread Boris Zbarsky

Johnson wrote:

I don't quite understand the meaning of "documentLoaded event only on
top frame", it may mean:

1. the "documentloaded" event occurred in the top frame
2. the whole document is loaded completely

If the first one, you are right, other means are requeired. If second,
I am right.


Indeed.  I was taking it at face value, but it is indeed possible that 
the question wasn't asking what it meant to ask.  Probably 50-50 
chances, actually.



XULRunner SDK does not provide the event DocumentLoaded, it only
provide the event OnStateChange


The DocumentLoaded thing is provided by the "new embedding api" thing. 
that's what the question-asker was using, I think.



I did provide a means to solve a problem, which may be the asker's problem,
and may be not.


Indeed.  ;)

-Boris
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-22 Thread Johnson
> Because it will detect subframe loads that start after the main page has
> finished loading (e.g. a user clicking a link in the subframe).

I don't quite understand the meaning of "documentLoaded event only on
top frame", it may mean:

1. the "documentloaded" event occurred in the top frame
2. the whole document is loaded completely

If the first one, you are right, other means are requeired. If second,
I am right.

XULRunner SDK does not provide the event DocumentLoaded, it only
provide the event OnStateChange, and we should use the latter event
and its parameters to determine whether the document is loaded. I did
provide a means to solve a problem, which may be the asker's problem,
and may be not.

Thank you for leading me to deeper thought.
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-18 Thread Boris Zbarsky

Johnson wrote:

That's not the same thing as only detecting the event for the top frame...

-Boris


Why?


Because it will detect subframe loads that start after the main page has 
finished loading (e.g. a user clicking a link in the subframe).


-Boris
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-18 Thread Johnson
> That's not the same thing as only detecting the event for the top frame...
>
> -Boris

Why?

___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-15 Thread Boris Zbarsky

Johnson wrote:

You should locate to WebBrowserChrome::OnStateChange and find
pListener->DocumentLoaded();

the condition which fires DocumentLoaded is (aStateFlags & STATE_STOP)
&& (aStateFlags & STATE_IS_DOCUMENT), you should replace
STATE_IS_DOCUMENT with STATE_IS_NETWORK.

Wish you good luck


That's not the same thing as only detecting the event for the top frame...

-Boris
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-15 Thread Johnson
You should locate to WebBrowserChrome::OnStateChange and find
pListener->DocumentLoaded();

the condition which fires DocumentLoaded is (aStateFlags & STATE_STOP)
&& (aStateFlags & STATE_IS_DOCUMENT), you should replace
STATE_IS_DOCUMENT with STATE_IS_NETWORK.

Wish you good luck
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-14 Thread martin
On 14 čnc, 20:27, "tonikitoo (Antonio Gomes)" 
wrote:
> hi, please google for: " DocumentLoaded() called multiple times
> loading one page "
>
> br
>
>
>
> On Tue, Jul 14, 2009 at 11:31 AM, martin wrote:
> > Hi,
>
> > I use the Mozilla Embedding API. It's wrapper class MozViewListener
> > provides a method DocumentLoaded which fires always when certain
> > document finished loading. This event appears 1 or more times, which
> > is my problem. The page could be a frameset or could contain an iframe
> > in it or something else, then the event fires several times. This is
> > logical behaviour, but I need to detect that the top frame finished
> > loading. How is this possible? Thank you very much.
>
> > Best regards,
> > Martin
> > ___
> > dev-embedding mailing list
> > [email protected]
> >https://lists.mozilla.org/listinfo/dev-embedding
>
> --
> --Antonio Gomes

Thank you!
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Detecting the documentLoaded event only on top frame

2009-07-14 Thread tonikitoo (Antonio Gomes)
hi, please google for: " DocumentLoaded() called multiple times
loading one page "

br

On Tue, Jul 14, 2009 at 11:31 AM, martin wrote:
> Hi,
>
> I use the Mozilla Embedding API. It's wrapper class MozViewListener
> provides a method DocumentLoaded which fires always when certain
> document finished loading. This event appears 1 or more times, which
> is my problem. The page could be a frameset or could contain an iframe
> in it or something else, then the event fires several times. This is
> logical behaviour, but I need to detect that the top frame finished
> loading. How is this possible? Thank you very much.
>
> Best regards,
> Martin
> ___
> dev-embedding mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-embedding
>



-- 
--Antonio Gomes
___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding