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

Function isCapacitorNative

core/src/utils/platform.ts:100–104  ·  view source on GitHub ↗
(win: any)

Source from the content-addressed store, hash-verified

98const isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
99
100const isCapacitorNative = (win: any): boolean => {
101 const capacitor = win['Capacitor'];
102 // TODO(ROU-11693): Remove when we no longer support Capacitor 2, which does not have isNativePlatform
103 return !!(capacitor?.isNative || (capacitor?.isNativePlatform && !!capacitor.isNativePlatform()));
104};
105
106const isElectron = (win: Window): boolean => testUserAgent(win, /electron/i);
107

Callers 1

isHybridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected