MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / getIosIonHeader

Function getIosIonHeader

core/src/utils/transition/index.ts:352–369  ·  view source on GitHub ↗
(opts: TransitionOptions)

Source from the content-addressed store, hash-verified

350 * @returns The ion-header element or null if not found or not in 'ios' mode.
351 */
352const getIosIonHeader = (opts: TransitionOptions): HTMLElement | null => {
353 const enteringEl = opts.enteringEl;
354 const leavingEl = opts.leavingEl;
355 const direction = opts.direction;
356 const mode = opts.mode;
357
358 if (mode !== 'ios') {
359 return null;
360 }
361
362 const element = direction === 'back' ? leavingEl : enteringEl;
363
364 if (!element) {
365 return null;
366 }
367
368 return element.querySelector('ion-header');
369};
370
371export interface TransitionOptions extends NavOptions {
372 progressCallback?: (ani: Animation | undefined) => void;

Callers 1

transitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected