(element: Element)
| 105 | } |
| 106 | |
| 107 | function isSelected(element: Element): boolean { |
| 108 | if (isElement(element, 'OPTION')) { |
| 109 | return (element as HTMLOptionElement).selected; |
| 110 | } |
| 111 | const type = (element as HTMLInputElement).type?.toLowerCase(); |
| 112 | if (type === 'checkbox' || type === 'radio') { |
| 113 | return (element as HTMLInputElement).checked; |
| 114 | } |
| 115 | return false; |
| 116 | } |
| 117 | |
| 118 | function isObject(value: unknown): boolean { |
| 119 | return value !== null && (typeof value === 'object' || typeof value === 'function'); |
no test coverage detected