Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/OpenLayers/Format/WPSExecute.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML,
*/
write: function(options) {
var doc;
if (window.ActiveXObject) {
try {
doc = new ActiveXObject("Microsoft.XMLDOM");
this.xmldom = doc;
} else {
} catch(e) {
doc = document.implementation.createDocument("", "", null);
}
var node = this.writeNode("wps:Execute", options, doc);
Expand Down
7 changes: 4 additions & 3 deletions lib/OpenLayers/Format/XML.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
* the object.
*/
initialize: function(options) {
if(window.ActiveXObject) {
try {
this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
} catch(e) {
}
OpenLayers.Format.prototype.initialize.apply(this, [options]);
// clone the namespace object and set all namespace aliases
Expand Down Expand Up @@ -138,7 +139,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
* 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) {
if (!this.xmldom) {
xmldom = new ActiveXObject("Microsoft.XMLDOM");
} else {
xmldom = this.xmldom;
Expand Down Expand Up @@ -871,7 +872,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
if (document.implementation && document.implementation.createDocument) {
OpenLayers.Format.XML.document =
document.implementation.createDocument("", "", null);
} else if (!this.xmldom && window.ActiveXObject) {
} else if (!this.xmldom) {
this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
}
}
Expand Down