MCPcopy Create free account
hub / github.com/adobe/react-spectrum / isHTMLAnchorLink

Function isHTMLAnchorLink

packages/react-aria/src/interactions/usePress.ts:1014–1016  ·  view source on GitHub ↗
(target: Element)

Source from the content-addressed store, hash-verified

1012}
1013
1014function isHTMLAnchorLink(target: Element): target is HTMLAnchorElement {
1015 return target.tagName === 'A' && target.hasAttribute('href');
1016}
1017
1018function isValidKeyboardEvent(
1019 event: KeyboardEvent | globalThis.KeyboardEvent,

Callers 3

onKeyUpFunction · 0.85
isValidKeyboardEventFunction · 0.85
shouldPreventDefaultUpFunction · 0.85

Calls 1

hasAttributeMethod · 0.80

Tested by

no test coverage detected