diff --git a/src/ol/xml.js b/src/ol/xml.js index 6621186839..a2ea64fe6b 100644 --- a/src/ol/xml.js +++ b/src/ol/xml.js @@ -77,6 +77,33 @@ ol.xml.isDocument = goog.userAgent.IE ? ol.xml.isDocumentIE_ : ol.xml.isDocument_; +/** + * @param {?} value Value. + * @private + * @return {boolean} Is node. + */ +ol.xml.isNode_ = function(value) { + return value instanceof Node; +}; + + +/** + * @param {?} value Value. + * @private + * @return {boolean} Is node. + */ +ol.xml.isNodeIE_ = function(value) { + return goog.isObject(value) && goog.isDef(value.nodeType); +}; + + +/** + * @param {?} value Value. + * @return {boolean} Is node. + */ +ol.xml.isNode = goog.userAgent.IE ? ol.xml.isNodeIE_ : ol.xml.isNode_; + + /** * @param {string} xml XML. * @return {Document} Document.