(el: Element)
| 39 | * See ION_CONTENT_SELECTOR for the selector used. |
| 40 | */ |
| 41 | export const findIonContent = (el: Element) => { |
| 42 | /** |
| 43 | * First we try to query the custom scroll host selector in cases where |
| 44 | * the implementation is using an outer `ion-content` with an inner custom |
| 45 | * scroll container. |
| 46 | */ |
| 47 | const customContentHost = el.querySelector<HTMLElement>(ION_CONTENT_CLASS_SELECTOR); |
| 48 | if (customContentHost) { |
| 49 | return customContentHost; |
| 50 | } |
| 51 | return el.querySelector<HTMLElement>(ION_CONTENT_SELECTOR); |
| 52 | }; |
| 53 | |
| 54 | /** |
| 55 | * Queries the closest element matching the selector for IonContent. |
no outgoing calls
no test coverage detected