Question

I have a GWT web app. When I use

 element.setAttribute("style", myAttributeList);

it perfectly works for IE7 (*)

Now comes the tricky part. I embed my web app, served at http://www.myGWTApp.com, in a web page with a different domain using the typical iframe tag:

<iframe src="http://www.myGWTApp.com" height="194" width="600"></iframe>

As a result of this the app works perfectly well except for every element.setAttribute( , ) that I have in my code, which doesn't work at all.

So, GWT has lost its magic when running from inside an IFRAME...

Do you know any way to solve this? Perhaps using JSNI?

Thanks!

Edit The embedding page contains the following HTML tag:

<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">

so, the app is running in IE7.

(*) I'm aware that the JS setAttribute is broken for IE7 but apparently GWT does a good job and isolates Java programmers from that issue (when no iframes are involved)

Was it helpful?

Solution

Verify that the container page and your app in the iframes are both running in standars mode. Also check that the host page doesn't have any X-UA-Compatible meta-tag

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top