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

Method componentDidLoad

core/src/components/app/app.tsx:21–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 @Element() el!: HTMLElement;
20
21 componentDidLoad() {
22 if (Build.isBrowser) {
23 this.rIC(async () => {
24 const isHybrid = isPlatform(window, 'hybrid');
25 if (!config.getBoolean('_testing')) {
26 import('../../utils/tap-click').then((module) => module.startTapClick(config));
27 }
28 if (config.getBoolean('statusTap', isHybrid)) {
29 import('../../utils/status-tap').then((module) => module.startStatusTap());
30 }
31 if (config.getBoolean('inputShims', needInputShims())) {
32 /**
33 * needInputShims() ensures that only iOS and Android
34 * platforms proceed into this block.
35 */
36 const platform = isPlatform(window, 'ios') ? 'ios' : 'android';
37 import('../../utils/input-shims/input-shims').then((module) => module.startInputShims(config, platform));
38 }
39 const hardwareBackButtonModule = await import('../../utils/hardware-back-button');
40 const supportsHardwareBackButtonEvents = isHybrid || shouldUseCloseWatcher();
41 if (config.getBoolean('hardwareBackButton', supportsHardwareBackButtonEvents)) {
42 hardwareBackButtonModule.startHardwareBackButton();
43 } else {
44 /**
45 * If an app sets hardwareBackButton: false and experimentalCloseWatcher: true
46 * then the close watcher will not be used.
47 */
48 if (shouldUseCloseWatcher()) {
49 printIonWarning(
50 '[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.'
51 );
52 }
53
54 hardwareBackButtonModule.blockHardwareBackButton();
55 }
56 if (typeof (window as any) !== 'undefined') {
57 import('../../utils/keyboard/keyboard').then((module) => module.startKeyboardAssist(window));
58 }
59 import('../../utils/focus-visible').then((module) => (this.focusVisible = module.startFocusVisible()));
60 });
61 }
62 }
63
64 disconnectedCallback() {
65 if (this.loadTimeout) {

Callers

nothing calls this directly

Calls 6

rICMethod · 0.95
isPlatformFunction · 0.90
shouldUseCloseWatcherFunction · 0.90
printIonWarningFunction · 0.90
needInputShimsFunction · 0.85
getBooleanMethod · 0.45

Tested by

no test coverage detected