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

Method getSafeAreaContext

core/src/components/modal/modal.tsx:1438–1446  ·  view source on GitHub ↗

* Creates the context object for safe-area utilities. * * `hasCustomDimensions` is only set by `setInitialSafeAreaOverrides()` * because it is only read by `getInitialSafeAreaConfig()`. Other callers * (resize handler, post-animation update, fullscreen-padding apply) would * pay a `ge

()

Source from the content-addressed store, hash-verified

1436 * pay a `getComputedStyle()` cost for a value they never consult.
1437 */
1438 private getSafeAreaContext(): ModalSafeAreaContext {
1439 return {
1440 isSheetModal: this.isSheetModal,
1441 isCardModal: this.presentingElement !== undefined && getIonMode(this) === 'ios',
1442 presentingElement: this.presentingElement,
1443 breakpoints: this.breakpoints,
1444 currentBreakpoint: this.currentBreakpoint,
1445 };
1446 }
1447
1448 /**
1449 * Sets initial safe-area overrides before modal animation.

Callers 4

onWindowResizeMethod · 0.95

Calls 1

getIonModeFunction · 0.90

Tested by

no test coverage detected