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

Function isHTMLAnchorLink

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

Source from the content-addressed store, hash-verified

1033}
1034
1035function isHTMLAnchorLink(target: Element): target is HTMLAnchorElement {
1036 return target.tagName === 'A' && target.hasAttribute('href');
1037}
1038
1039function isValidKeyboardEvent(
1040 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