MCPcopy Create free account
hub / github.com/testing-library/user-event / isSupportedElement

Function isSupportedElement

src/paste.ts:17–27  ·  view source on GitHub ↗
(
  element: HTMLElement,
)

Source from the content-addressed store, hash-verified

15}
16
17function isSupportedElement(
18 element: HTMLElement,
19): element is
20 | HTMLTextAreaElement
21 | (HTMLInputElement & {type: editableInputTypes}) {
22 return (
23 (isElementType(element, 'input') &&
24 Boolean(editableInputTypes[element.type as editableInputTypes])) ||
25 isElementType(element, 'textarea')
26 )
27}
28
29function paste(
30 element: HTMLElement,

Callers 1

pasteFunction · 0.85

Calls 1

isElementTypeFunction · 0.90

Tested by

no test coverage detected