2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Use textContent instead of innerText. (#30462)

It's supported by all of our supported browsers.
This commit is contained in:
XhmikosR
2020-03-29 09:53:57 +03:00
committed by GitHub
parent dec3ea6a7f
commit ed94976ea8
3 changed files with 3 additions and 4 deletions
-1
View File
@@ -48,7 +48,6 @@
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-set-has": "off",
"unicorn/prefer-text-content": "off",
"unicorn/prevent-abbreviations": "off"
}
}
+2 -2
View File
@@ -421,7 +421,7 @@ class Tooltip {
element.appendChild(content)
}
} else {
element.innerText = content.textContent
element.textContent = content.textContent
}
return
@@ -434,7 +434,7 @@ class Tooltip {
element.innerHTML = content
} else {
element.innerText = content
element.textContent = content
}
}
+1 -1
View File
@@ -913,7 +913,7 @@ describe('Tooltip', () => {
tooltip.setElementContent(tooltip.getTipElement(), 'test')
expect(tooltip.getTipElement().innerText).toEqual('test')
expect(tooltip.getTipElement().textContent).toEqual('test')
})
})