#894 - bind this to xmldom closure
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3875 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -62,7 +62,7 @@ OpenLayers.Format.XML.prototype =
|
||||
text = text.substring(index);
|
||||
}
|
||||
var node = OpenLayers.Util.Try(
|
||||
function() {
|
||||
(function() {
|
||||
var xmldom;
|
||||
/**
|
||||
* Since we want to be able to call this method on the prototype
|
||||
@@ -72,10 +72,11 @@ OpenLayers.Format.XML.prototype =
|
||||
xmldom = new ActiveXObject("Microsoft.XMLDOM");
|
||||
} else {
|
||||
xmldom = this.xmldom;
|
||||
|
||||
}
|
||||
xmldom.loadXML(text);
|
||||
return xmldom;
|
||||
},
|
||||
}).bind(this),
|
||||
function() {
|
||||
return new DOMParser().parseFromString(text, 'text/xml');
|
||||
},
|
||||
@@ -180,6 +181,7 @@ OpenLayers.Format.XML.prototype =
|
||||
if(node.getElementsByTagNameNS) {
|
||||
elements = node.getElementsByTagNameNS(uri, name);
|
||||
} else {
|
||||
// brute force method
|
||||
var allNodes = node.getElementsByTagName("*");
|
||||
var potentialNode, fullName;
|
||||
for(var i=0; i<allNodes.length; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user