Ticket #1084: tiddlywiki-core-test-and-revert-createtiddlytext.patch
| File tiddlywiki-core-test-and-revert-createtiddlytext.patch, 1.0 KB (added by proppy, 3 years ago) |
|---|
-
test/js/DOM.js
30 30 ok(jQuery('div.testClass'), 'Setting the element class parameter should set the class on the DOM element'); 31 31 32 32 }); 33 34 test("createTiddlyText", function() { 35 expect(1); 36 var parent = makeTestNode(); 37 createTiddlyText(parent, "<div>"); 38 createTiddlyText(parent, "a"); 39 createTiddlyText(parent, "</div>"); 40 equals(parent.innerHTML, "<div>a</div>", "createTiddlyText should append text node, not html element"); 41 }); 33 42 34 43 35 44 test("addClass", function() { -
js/Dom.js
310 310 311 311 function createTiddlyText(parent,text) 312 312 { 313 return jQuery(parent).append(text);313 return parent.appendChild(document.createTextNode(text)); 314 314 } 315 315 316 316 // Return the content of an element as plain text with no formatting
