mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-22 10:52:11 +00:00
parent
ba39a4eef8
commit
59897643a4
@ -138,7 +138,7 @@ export default class DOMElement<T extends HTMLElement = HTMLElement> {
|
||||
public attr(key: string, value: string | null): this
|
||||
public attr(key: keyof T, value: boolean): this
|
||||
public attr(key: string | keyof T, value?: string | boolean | null): this | string | null {
|
||||
if (!value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.item.getAttribute(key as string)
|
||||
}
|
||||
if (value === null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user