Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99c1e64

Browse files
committed
replace innerText with textContent
1 parent 80c5369 commit 99c1e64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

homework/Util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Util {
88
Object.keys(options).forEach(key => {
99
const value = options[key];
1010
if (key === 'text') {
11-
elem.innerText = value;
11+
elem.textContent = value;
1212
} else {
1313
elem.setAttribute(key, value);
1414
}

homework/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Object.keys(options).forEach(key => {
2323
const value = options[key];
2424
if (key === 'text') {
25-
elem.innerText = value;
25+
elem.textContent = value;
2626
} else {
2727
elem.setAttribute(key, value);
2828
}

0 commit comments

Comments
 (0)