chore: clarify current type handling in isHTMLElement

This commit is contained in:
Simon
2026-03-21 02:16:51 +08:00
parent e98d80b6a0
commit ad31e2b750

View File

@@ -2,6 +2,7 @@
// @note instanceof fails for elements inside iframes
export function isHTMLElement(el: unknown): el is HTMLElement {
// @todo either specify to HTMLElement or allow Element here.
return !!el && (el as Node).nodeType === 1
}