1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 19:02:14 +00:00
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-12-17 14:44:09 +01:00
parent 679291d7a8
commit ba39a4eef8

View File

@ -68,7 +68,7 @@ export default class DOMElement<T extends HTMLElement = HTMLElement> {
public text(): string
public text(val: string): this
public text(val?: string) {
if (val) {
if (typeof val !== 'undefined') {
this.item.innerText = val
return this
}
@ -78,11 +78,11 @@ export default class DOMElement<T extends HTMLElement = HTMLElement> {
public html(): string
public html(val: string): this
public html(val?: string) {
if (val) {
if (typeof val !== 'undefined') {
this.item.innerHTML = val
return this
}
return this.item.innerText
return this.item.innerHTML
}
public addClass(...classes: Array<string>) {