summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-23 11:58:17 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-23 11:58:17 -0500
commit5a5c18371ca6df5473f9d5ef9a391acde6c2e168 (patch)
tree5c73ece15c7f89cea2c0f55b1117bd148be7e654 /ext
parent53220af68eabdda27b35224056f3bd589e8c4785 (diff)
Use textContent instead of innerText
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/audio.js2
-rw-r--r--ext/bg/js/search-query-parser-generator.js6
-rw-r--r--ext/fg/js/document.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js
index 0ecfd5c4..d300570b 100644
--- a/ext/bg/js/audio.js
+++ b/ext/bg/js/audio.js
@@ -52,7 +52,7 @@ const audioUrlBuilders = new Map([
for (const row of dom.getElementsByClassName('dc-result-row')) {
try {
const url = row.querySelector('audio>source[src]').getAttribute('src');
- const reading = row.getElementsByClassName('dc-vocab_kana').item(0).innerText;
+ const reading = row.getElementsByClassName('dc-vocab_kana').item(0).textContent;
if (url && reading && (!definition.reading || definition.reading === reading)) {
return audioUrlNormalize(url, 'https://www.japanesepod101.com', '/learningcenter/reference/');
}
diff --git a/ext/bg/js/search-query-parser-generator.js b/ext/bg/js/search-query-parser-generator.js
index f842644e..1ab23a82 100644
--- a/ext/bg/js/search-query-parser-generator.js
+++ b/ext/bg/js/search-query-parser-generator.js
@@ -50,7 +50,7 @@ class QueryParserGenerator {
const segmentTextContainer = segmentContainer.querySelector('.query-parser-segment-text');
const segmentReadingContainer = segmentContainer.querySelector('.query-parser-segment-reading');
segmentTextContainer.appendChild(this.createSegmentText(segment.text));
- segmentReadingContainer.innerText = segment.reading;
+ segmentReadingContainer.textContent = segment.reading;
return segmentContainer;
}
@@ -58,7 +58,7 @@ class QueryParserGenerator {
const fragment = document.createDocumentFragment();
for (const chr of text) {
const charContainer = this._templateHandler.instantiate('char');
- charContainer.innerText = chr;
+ charContainer.textContent = chr;
fragment.appendChild(charContainer);
}
return fragment;
@@ -69,7 +69,7 @@ class QueryParserGenerator {
for (const parseResult of parseResults) {
const optionContainer = this._templateHandler.instantiate('select-option');
optionContainer.value = parseResult.id;
- optionContainer.innerText = parseResult.name;
+ optionContainer.textContent = parseResult.name;
optionContainer.defaultSelected = selectedParser === parseResult.id;
selectContainer.appendChild(optionContainer);
}
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index ea9ac965..1a3e8791 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -50,7 +50,7 @@ function docImposterCreate(element, isTextarea) {
const imposter = document.createElement('div');
const imposterStyle = imposter.style;
- imposter.innerText = element.value;
+ imposter.textContent = element.value;
for (let i = 0, ii = elementStyle.length; i < ii; ++i) {
const property = elementStyle[i];