IE9 Beta - Errors from Test case
Brought to you by:
mbatsis
http://dev.abiss.gr/sarissa/test/testsarissa.html gives 6 errors in IE9 Beta. Switching to Compatibility mode gives 1 error (same as IE8 and Firefox 4 Beta)
e.g. for XMLSerializer test, complains that "No such interface supported"
Appears to be the cause of problems with the RichFaces JSF framework that uses Sarissa.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
IE9 beta has implemented a native XMLSerializer and DOMParser. I realized it's still in beta, but Is the Sarissa project looking into how this will affect the sarissa libraries? It's breaking my site now.
IE9, however, has not implemented an XSLTProcessor, so it would still need to use Sarissa's.
Since IE9 does implement DOMParser and XMLSerializer, it's a mixed metaphor.
The way to work-around is to add IE9 detection to Sarissa (after the IE detection):
Sarissa._SARISSA_IS_IE9 = Sarissa._SARISSA_IS_IE && (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))) >= 9;
Then, around the checks for the existence of DOMParser and XMLSerializer make sure you "or" Sarissa._SARISSA_IS_IE9 so that it will use Sarissa's implementation (reverting to the ActiveX controls) instead of IE's.
Then, Sarissa will work because it will use the Msxml2.DOMDocument API instead of the (as of yet undocumented) DOM API that IE9's DOMParser.parseFromString() returns.
This is not necessarily super elegant, but is a quick fix and seems to work well.
Sarissa could possibly be modified to handle IE9 using native DOMParser and XMLSerializer objects, while still implementing it's own XSLTProcessor. However, Sarissa's current XSLTProcessor implementation relies on the MSXML interfaces... which are incompatible with whatever DOM representation IE's DOMParser generates... so it would have to be re-written (or kludged to convert the new DOM representation to the MSXML objects before operating on it).
I find it strange that Microsoft essentially invented AJAX with MSXML, and yet, they have not implemented an XSLTProcess.
Thankfully Sarissa exists - and the above fix should keep it happy with IE9.
Then, there's always:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
or
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
... but then you lose HTML5/CSS3 (what little of it IE9 implements).
Not sure how to attach a file to this bug (perhaps because I logged it without logging in), but here's a possible patch:
Index: sarissa.js
RCS file: /cvsroot/sarissa/sarissa/src/main/js/gr/abiss/js/sarissa/sarissa.js,v
retrieving revision 1.29
diff -r1.29 sarissa.js
65a66,67
> Sarissa._SARISSA_IS_IE9 = Sarissa._SARISSA_IS_IE && (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))) >= 9;
> /** @private */
474c476
< if(!window.DOMParser){
---
> if(!window.DOMParser || Sarissa._SARISSA_IS_IE9){
596c598
< if(!window.XMLSerializer && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml){
---
> if((!window.XMLSerializer || Sarissa._SARISSA_IS_IE9) && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml){
This fixes most of the errors in IE9, except for 3 XSLT tests (one of which fails in most browsers already), and is based upon the comments someone else provided.
I've supplied this as a fix for Sarissa in the RichFaces framework (https://issues.jboss.org/browse/RF-9485).
Maybe when defaulting the XMLSerializer object to Sarissa's, we should add a test for window.XSLTProcessor:
if((!window.XMLSerializer || !window.XSLTProcessor || Sarissa._SARISSA_IS_IE9) &&
Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Maybe when defaulting to Sarissa'a implementation of the serialization, we should add a check for the presence of window.XSLTProcessor:
if((!window.XMLSerializer || !window.XSLTProcessor || Sarissa._SARISSA_IS_IE9) &&
Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml)
Last edit: Anonymous 2017-07-13
Has there been any movement on this defect? Several community members have contributed workarounds, and even one potential solution (at least a walk through of how to modify the Sarissa code for the solution), but it's been over a year since the last Sarissa release. Has there been any progress on integrating this solution into a fix/patch release?
Hi folks,
Sarissa has been around for so long, it's code has by now been absorbed in higher level frameworks. Unfortunately I dont get much feedback from those and i consistently fail to monitor SF forums for the rest :-)
Testing on IE has been very difficult for me for a long time. Can someone provide a clean patch to address this for me to push a new release towards people needing a "release version"?
Also, if anyone is interested to contribute into maintaining the codebase, please let me know!
Cheers,
Manos
fix committed to cvs. Thanks for you help
closing