Skip to content

Commit

Permalink
switch to using the new xmlGenerator() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeon committed Sep 16, 2011
1 parent d0cf9d2 commit 9fe51b4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core.js
Expand Up @@ -663,9 +663,6 @@ Strophe = {
createHtml: function (elem)
{
var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue, children, child;
if (!Strophe._xmlGenerator) {
Strophe._xmlGenerator = Strophe._makeGenerator();
}
if (elem.nodeType == Strophe.ElementType.NORMAL) {
tag = elem.nodeName.toLowerCase();
if(Strophe.XHTML.validTag(tag))
Expand Down Expand Up @@ -728,13 +725,13 @@ Strophe = {
}
else
{
el = Strophe._xmlGenerator.createDocumentFragment();
el = Strophe.xmlGenerator().createDocumentFragment();
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.createHtml(elem.childNodes[i]));
}
}
} else if (elem.nodeType == Strophe.ElementType.FRAGMENT) {
el = Strophe._xmlGenerator.createDocumentFragment();
el = Strophe.xmlGenerator().createDocumentFragment();
for (i = 0; i < elem.childNodes.length; i++) {
el.appendChild(Strophe.createHtml(elem.childNodes[i]));
}
Expand Down

0 comments on commit 9fe51b4

Please sign in to comment.