Loading...

dev-extensions@lists.mozilla.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: help! problems after window.open() bootstrap Wed Apr 04 12:02:07 2012

On Apr 2, 8:02 pm, Dave Townsend <[EMAIL PROTECTED]> wrote:
> On 04/02/12 16:08, bootstrap wrote:
>
> >   Also note this.  As we would expect, since javascript
> >   is essentially a single-thread model, my printouts
> >   confirm that BEFORE my window.open() call returns,
> >   my installed "window load" event handler function is
> >   called by javascript.  Therefore, the window is already
> >   fully loaded before my printouts mentioned in #2 above.
> >   And, in fact, the window should be fully loaded before
> >   my printouts mentioned in #1 above too.
>
> >   Therefore, you assumption is wrong.  The HTML file
> >   is fully loaded when the lines following window.open()
> >   are executed.  At least that is DEFINITELY how this
> >   works on my ubuntu64 system works (firefox v11), as
> >   demonstrated by the order of my printout statements.
>
> This is in general not correct, window.load returns as soon as it has
> started the load of the window you request but even files on the local
> system are still loaded asynchronously and so normally the window
> wouldn't be properly loaded until the load event fires, but you say
> you're seeing that which is extremely odd. Can you show us the code
> you're using? I'd expect something like this to work fine:
>
> var win = window.open(pathstring, "clarify", featurestring);
> win.addEventListener("load", function() {
>    // you can access win and win.document fully here.
>
>
>
> }, false);- Hide quoted text -
>
> - Show quoted text -

 Okay, I created a stripped-down version of the extension
 that only contains statements to print-to-error-console to
 show the values of relevant variables.  You can download
 the files here:  www.iceapps.com/meanings20120402.zip
_______________________________________________
dev-extensions mailing list
[EMAIL PROTECTED]
https://lists.mozilla.org/listinfo/dev-extensions