MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / findIonContent

Function findIonContent

core/src/utils/content/index.ts:41–52  ·  view source on GitHub ↗
(el: Element)

Source from the content-addressed store, hash-verified

39 * See ION_CONTENT_SELECTOR for the selector used.
40 */
41export 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.

Callers 4

FooterClass · 0.90
initSwipeToCloseMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected