ben fenster wrote:
> i was wondering that if by opening another module in an iframe tag the
> code of that module runs in another thread ??
Nope. There is no way of getting access to multiple Javascript threads
from a web browser, unless you use some sort of extension like Google
Gears or HTML5 web workers. Every part of the Javascript VM that your
code can see is part of the same event loop.
> more over is the limit of 2 open http request apply on 2 diffrent
> modules running in diffrent iframes ??
Don't know about this one.
- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx
7F+QaH0Fdc9baW9Wcgl3swM=
=ukVk
-----END PGP SIGNATURE-----
No, you misunderstand --- if your code can see an iframe, that iframe
must be part of the same Javascript VM as your code, and therefore must
be part of the same thread. The spec requires it.
Iframes aren't as independent as you think.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan
Javascript will let you do it, provided the security rules let you (the
page in the iframe must come from the same domain that your script
does). I don't know whether it's possible to make GWT give you seamless
access from Java, though --- you'd probably have to use Javascript
trampolines. (Where one module explicitly exports stuff to the parent
window, and then another module explicitly imports it again.)
Hi Ben,I see the time when you've posted the message and see the answers here, so I codn;t stop to write something here.I will answer YES to your question, but it depends.Generally, IFrame under the same domain is using the same thread. I don't know how it was at the time You've been asking, but now if you use IFrame with different origin (domain/host) it will use its own context, own event loop, so also ot will be separate thread.