You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Werner Punz <we...@gmail.com> on 2009/04/24 12:46:27 UTC

MyFaces 2.0 ajax auto eval of embedded scripts

Hello, I am currently reworking the browser detection code because the 
auto eval mechanisms do not trigger properly for some browsers if we 
have embedded code.

Currently I am porting the dojo browser detection over, to get a better 
grip on browser inconsistencies.

However I am not very fond of parsing user agents, and currently auto 
eval is mostly where this stuff is needed!

Here is my proposal to deal with this issue.

a) for IE the case is clear above 5.5 embedded scripts must be parsed 
manually

b) All other browsers we could do a single auto eval by adding a small 
script node to our dom tree which sets a variable...

if the variable exists then we have auto eval, if not we have to deal 
with it manually, this looks like a saner way to me to deal with this, 
but it works only on non ie browsers.
The reason why I have to exclude the ie is following, there is a nasty 
bug in many  ie versions, which renders a blank page if you eval a 
javascript on an open page, so if you run into one ie version which does 
auto eval (which is below 6.0 afair) and you currently draw your page 
you have a huge issue on your hand.

I am not sure if other browsers react similarily critical here, does 
anyone have any idea? My personal knowledge regarding it is that all 
other browsers do not have any issues regarding this so it should work out!