Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

switch to using the new xmlGenerator() helper

  • Loading branch information...
commit 9fe51b4dfe10ce651191f0b5a4132f5e56099157 1 parent d0cf9d2
@Aeon Aeon authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/core.js
View
7 src/core.js
@@ -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))
@@ -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]));
}
Please sign in to comment.
Something went wrong with that request. Please try again.