chore: clarify current type handling in isHTMLElement
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// @note instanceof fails for elements inside iframes
|
// @note instanceof fails for elements inside iframes
|
||||||
|
|
||||||
export function isHTMLElement(el: unknown): el is HTMLElement {
|
export function isHTMLElement(el: unknown): el is HTMLElement {
|
||||||
|
// @todo either specify to HTMLElement or allow Element here.
|
||||||
return !!el && (el as Node).nodeType === 1
|
return !!el && (el as Node).nodeType === 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user