(target: HTMLElement)
| 4 | * @returns {Object} The normalized target |
| 5 | */ |
| 6 | const getNormalizedTarget = (target: HTMLElement) => { |
| 7 | let element = target; |
| 8 | |
| 9 | if (target.shadowRoot && target.shadowRoot.activeElement) { |
| 10 | element = target.shadowRoot.activeElement as HTMLElement; |
| 11 | } |
| 12 | |
| 13 | return element; |
| 14 | }; |
| 15 | |
| 16 | export default getNormalizedTarget; |
no outgoing calls
no test coverage detected