Allow published DOM fragments to be just plain text.

This commit is contained in:
Tony Garnock-Jones 2016-03-22 12:11:47 -04:00
parent 64cbe51578
commit da978aad39
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ DOMFragment.prototype.buildNodes = function () {
var nodes = [];
$(self.selector).each(function (index, domNode) {
var n = self.interpretSpec(self.fragmentSpec.sealContents);
n.classList.add(self.fragmentClass);
if ('classList' in n) {
n.classList.add(self.fragmentClass);
}
domNode.appendChild(n);
nodes.push(n);
});