-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE11 can't interpret window.ActiveXObject correctly anymore #1285
Conversation
As in IE11 it is not possible to use window.ActiveXObject for checking for IE anymore (see http://msdn.microsoft.com/en-us/library/ie/dn423948%28v=vs.85%29.aspx ), it is only possible to use a try-catch instead.
I think I experience the same problem of issue openlayers#1177 As an example I modified the GetFeatureInfo example injecting the corrupt data that cause the error in IE11. Just click in the map. Obviously the not valid HTML5 is can't be read with DomParser() in IE11. One solution is pull request openlayers#1285 Another solution may be to check the INFO_FORMAT and do not call var features = this.format.read(doc); if it is text/html or text/plain (i.e. not a GML) as in showInfo() just the text is used (no GML features): document.getElementById('responseText').innerHTML = evt.text;
An alternative solution would be to use this check instead of the exception approach: this.supportActiveX = then window.ActiveXObject can be replaced with this.supportActiveX in the expressions. |
I like that approach @szekerest. Would you be willing to create a pull request? |
@ahocevar pull request sent |
Fixed with #1439 |
I think I experience the same problem of issue openlayers#1177 As an example I modified the GetFeatureInfo example injecting the corrupt data that cause the error in IE11. Just click in the map. Obviously the not valid HTML5 is can't be read with DomParser() in IE11. One solution is pull request openlayers#1285 Another solution may be to check the INFO_FORMAT and do not call var features = this.format.read(doc); if it is text/html or text/plain (i.e. not a GML) as in showInfo() just the text is used (no GML features): document.getElementById('responseText').innerHTML = evt.text;
As in IE11 it is not possible to use window.ActiveXObject for checking for IE anymore (see http://msdn.microsoft.com/en-us/library/ie/dn423948%28v=vs.85%29.aspx ), it is only possible to use a try-catch instead.
May be the intention of pull request #1210