Deprecating all prototype extensions. This puts all OpenLayers functionality in the OpenLayers namespace. If you are using any of the Function, String, or Number prototype extensions, start using the functional equivalents in the OpenLayers namespace - the prototype extensions will be gone in 3.0 (closes #712).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -60,21 +60,23 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
|
||||
text = text.substring(index);
|
||||
}
|
||||
var node = OpenLayers.Util.Try(
|
||||
(function() {
|
||||
var xmldom;
|
||||
/**
|
||||
* Since we want to be able to call this method on the prototype
|
||||
* itself, this.xmldom may not exist even if in IE.
|
||||
*/
|
||||
if(window.ActiveXObject && !this.xmldom) {
|
||||
xmldom = new ActiveXObject("Microsoft.XMLDOM");
|
||||
} else {
|
||||
xmldom = this.xmldom;
|
||||
|
||||
OpenLayers.Function.bind((
|
||||
function() {
|
||||
var xmldom;
|
||||
/**
|
||||
* Since we want to be able to call this method on the prototype
|
||||
* itself, this.xmldom may not exist even if in IE.
|
||||
*/
|
||||
if(window.ActiveXObject && !this.xmldom) {
|
||||
xmldom = new ActiveXObject("Microsoft.XMLDOM");
|
||||
} else {
|
||||
xmldom = this.xmldom;
|
||||
|
||||
}
|
||||
xmldom.loadXML(text);
|
||||
return xmldom;
|
||||
}
|
||||
xmldom.loadXML(text);
|
||||
return xmldom;
|
||||
}).bind(this),
|
||||
), this),
|
||||
function() {
|
||||
return new DOMParser().parseFromString(text, 'text/xml');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user