No, you are missing the point of the problem.Consider this example:
-----------------------------------------------------------------------------------
window1.html:
-----------------------------------------------------------------------------------
<html>
<script>
function step1() {
window.open("window2.html", "_blank", "width=300,height=200");
}
var x = 1;
function step2() {
var y = (x + 1);
alert("reached step2 -- try to hit the button for \"Step 3\"");
if (y == (x + 1))
alert("SUCCESS");
else
alert("FAIL");
}
function incrementX() {
return x++;
}
</script>
<p>Step 1 -- open popup</p>
<input type=button onclick=step1() value=clickMe>
<p>Step 2 -- block on alert</p>
<input type=button onclick=step2() value=clickMe>
</html>
-----------------------------------------------------------------------------------
window2.html
------------------------------------------------------------------------------------
<html>
<script>
function step3() {
alert(window.opener.incrementX());
}
</script>
<p>Step 3 -- call parent</p>
<input type=button onclick=step3() value=clickMe>
</html>
------------------------------------------------------------------------------------
Click the buttons in order step1,step2,step3.
You can clearly see the problem in step3.
If you could click step3, you would be running two functions at the same
time, and when step2() returns it will fail.
If your browser lets you hit the step3 button (while alert is open), then it
will fail.
On Sun, Sep 7, 2008 at 5:07 PM, Bernd Kreuss <[EMAIL PROTECTED]>wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Bernd Kreuss wrote:
>
> > Is this really the case?
>
> I can answer this myself: No this is not the case!
>
> Javascript-Popups have their own independent Threads, no way to block
> the opening window with an alert in it's popup window:
>
> window 1:
> <script>
> window.open("test1.html");
> alert("foo");
> </script>
>
> window 2: (test1.html)
> <script>
> alert("bar");
> </script>
>
> Tested in Konqueror and in Firefox: I immediately see two alerts pop up
> without one blocking the other, so we have two independent Threads.
> Everything else would have made me wonder.
>
> - --
> private communication within hostile networks:
> http://torchat.googlecode.com/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIxGy1xT6R4jlFoh0RAlS4AJwNpjvgWQmN3ixN6aIs7td2WhQJNgCfQUDT
> mD0cojCGJqNH4HadNMMiI7I=
> =YSQv
> -----END PGP SIGNATURE-----
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/chromium-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---