Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukehirao committed Feb 10, 2024
1 parent 8757d62 commit d253aea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/@markuplint/selector/src/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d253aea

Please sign in to comment.