Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit d8223db

Browse files
committed
Use nodeValue instead of textContent to support old IE
1 parent 065680b commit d8223db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/htmlbars-compiler/tests/dirtying-test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -232,23 +232,23 @@ test("block helpers whose template has a morph at the edge", function() {
232232
equalTokens(result.fragment, 'hello world');
233233
var firstNode = result.root.firstNode;
234234
equal(firstNode.nodeType, 3, "first node of the parent template");
235-
equal(firstNode.textContent, "", "its content should be empty");
235+
equal(firstNode.nodeValue, "", "its content should be empty");
236236

237237
var secondNode = firstNode.nextSibling;
238238
equal(secondNode.nodeType, 3, "first node of the helper template should be a text node");
239-
equal(secondNode.textContent, "", "its content should be empty");
239+
equal(secondNode.nodeValue, "", "its content should be empty");
240240

241241
var textContent = secondNode.nextSibling;
242242
equal(textContent.nodeType, 3, "second node of the helper should be a text node");
243-
equal(textContent.textContent, "hello world", "its content should be hello world");
243+
equal(textContent.nodeValue, "hello world", "its content should be hello world");
244244

245245
var fourthNode = textContent.nextSibling;
246246
equal(fourthNode.nodeType, 3, "last node of the helper should be a text node");
247-
equal(fourthNode.textContent, "", "its content should be empty");
247+
equal(fourthNode.nodeValue, "", "its content should be empty");
248248

249249
var lastNode = fourthNode.nextSibling;
250250
equal(lastNode.nodeType, 3, "last node of the parent template should be a text node");
251-
equal(lastNode.textContent, "", "its content should be empty");
251+
equal(lastNode.nodeValue, "", "its content should be empty");
252252

253253
strictEqual(lastNode.nextSibling, null, "there should only be five nodes");
254254
});
@@ -259,7 +259,7 @@ test("clean content doesn't get blown away", function() {
259259
var result = template.render(object, env);
260260

261261
var textNode = result.fragment.firstChild.firstChild;
262-
equal(textNode.textContent, "hello");
262+
equal(textNode.nodeValue, "hello");
263263

264264
object.value = "goodbye";
265265
result.revalidate(); // without setting the node to dirty
@@ -286,7 +286,7 @@ test("helper calls follow the normal dirtying rules", function() {
286286
var result = template.render(object, env);
287287

288288
var textNode = result.fragment.firstChild.firstChild;
289-
equal(textNode.textContent, "HELLO");
289+
equal(textNode.nodeValue, "HELLO");
290290

291291
object.value = "goodbye";
292292
result.revalidate(); // without setting the node to dirty

0 commit comments

Comments
 (0)