Tomasz Pyra wrote:
But how to handle action when user click into link like: <a href="#tyt296">
Don't you get an OnLocationChange in this case?
Yes - I can parse URI at OnLocationChange and get the anchor name ('tyt296').
But now I need some information about browser behaviour.
When page is already loaded (anchor used only to jump to another part of page), I should search in DOM tree for place named 'tyt296', when founded I can do my actions there.
But when link URL is complete (www.something.com/something.htm#anchor0001), browser first must complete loading page, after that I can search DOM for place named 'tyt296'.
How to deterimne that what browser will do when OnLocationChange is called?
OnStateChange is only called when new page is loading.
I need to call my function after DOM is built, so when anchor is used only to scroll, that function will be called just after user click a anchored link.
When browser need to load new page, then jump to anchor, my function will be called after page loading and building DOM tree.
I could use global loaging_flag what will be set up when OnStateChange will receive STATE_START, and will be cleared when OnStateChange will receive STATE_STOP.
But is it safe?
I don't know is OnStateChange with START, is always executed before OnLocationChange. Can you confirm that?
That's harder (especially since the jump could have been to something other than a "named anchor").
Now I need only to handle named anchors. _______________________________________________ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding