Skip to content

Conversation

@bkiselka
Copy link
Contributor

fix for avoiding error if element has no property _eventCacheID

adapted WMS of gutter examples/gutter.html

Bernhard Kiselka added 12 commits March 25, 2014 19:42
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.
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;
…o xmldom_IE11_test

Conflicts:
	lib/OpenLayers/Format/WPSExecute.js
	lib/OpenLayers/Format/XML.js
(IE11 can't interpret window.ActiveXObject correctly anymore)
adapted WMS of gutter examples/gutter.html
plus adapted WMS of gutter examples/gutter.html
@ahocevar
Copy link
Member

This workaround only cloaks a problem that must be caused by something else. If there is no _eventCacheId, then someone tries to stop observing an element that was never observed. The question is: is it your application that does that, or is it done somewhere in the library?

@bkiselka
Copy link
Contributor Author

I will add a test to make it more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants