We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7977c10 commit 2dfb435Copy full SHA for 2dfb435
code/solutions/14_1_build_a_table.html
@@ -23,7 +23,7 @@ <h1>Mountains</h1>
23
let headRow = document.createElement("tr");
24
fields.forEach(function(field) {
25
let headCell = document.createElement("th");
26
- headCell.textContent = field;
+ headCell.appendChild(document.createTextNode(field));
27
headRow.appendChild(headCell);
28
});
29
table.appendChild(headRow);
@@ -32,7 +32,7 @@ <h1>Mountains</h1>
32
let row = document.createElement("tr");
33
34
let cell = document.createElement("td");
35
- cell.textContent = object[field];
+ cell.appendChild(document.createTextNode(object[field]));
36
if (typeof object[field] == "number") {
37
cell.style.textAlign = "right";
38
}
0 commit comments