From d253aea3d5d2f76238005762e0c78a11f6ce369b Mon Sep 17 00:00:00 2001 From: yusukehirao Date: Sat, 10 Feb 2024 17:16:31 +0900 Subject: [PATCH] Add comment --- packages/@markuplint/selector/src/is.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/@markuplint/selector/src/is.ts b/packages/@markuplint/selector/src/is.ts index fb90ef6ee..9f4e1c4d2 100644 --- a/packages/@markuplint/selector/src/is.ts +++ b/packages/@markuplint/selector/src/is.ts @@ -12,6 +12,15 @@ export function isNonDocumentTypeChildNode( return 'previousElementSibling' in node && 'nextElementSibling' in node; } +/** + * Checks if the given element is a pure HTML element. + * + * If a pure HTML element, `localName` returns lowercase, + * `nodeName` returns uppercase. + * + * @param el The element to check. + * @returns Returns true if the element is a pure HTML element, otherwise returns false. + */ export function isPureHTMLElement( // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types el: Element,