views:

185

answers:

2

Of the following, which are not run in the same thread as the current page in IE8?

  • An iframe with the same domain as the current page.
  • An iframe with a sub-domain of the current page's domain.
  • An iframe with a super-domain of the current page's domain.
  • An iframe with a completely different domain from the current page.

I want to know this for implementing Web Workers in IE that are in separate threads.

Edit: Is there any way to have a window in another thread in IE to postMessage to?

A: 

The IE threading is not tied to the domain of the resource. An iframe DOM is build and is tied to the same thread as the main browser document.

Franci Penov
So it's impossible to postMessage a window in a separate thread in IE?
Eli Grey
It's possible. However, you have to start the thread somehow yourself, which can't be done from JS.
Franci Penov
A: 

As Franci mentioned, using an iframe will not get you a new thread. However, you can "simulate" multi-threading with setTimeout and callbacks:

brianpeiris