Skip to content

Commit

Permalink
Merge remote branch 'vog/master'
Browse files Browse the repository at this point in the history
In some cases, importNode() does not exist on IE, so we fall back to
copyElement() in that case.
  • Loading branch information
metajack committed Dec 6, 2010
2 parents 161d2f1 + 2e836a4 commit 5e6ee02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/core.js
Expand Up @@ -1001,7 +1001,8 @@ Strophe.Builder.prototype = {
*/
cnode: function (elem)
{
var newElem = Strophe.xmlGenerator().importNode(elem, true);
var xmlGen = Strophe.xmlGenerator();
var newElem = xmlGen.importNode ? xmlGen.importNode(elem, true) : Strophe.copyElement(elem);
this.node.appendChild(newElem);
this.node = newElem;
return this;
Expand Down Expand Up @@ -3210,4 +3211,4 @@ if (callback) {
window.$msg = arguments[2];
window.$iq = arguments[3];
window.$pres = arguments[4];
});
});
1 change: 0 additions & 1 deletion src/md5.js
Expand Up @@ -274,4 +274,3 @@ var MD5 = (function () {

return obj;
})();

0 comments on commit 5e6ee02

Please sign in to comment.