UNPKG

1.89 kBSource Map (JSON)View Raw
1{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../src/@ionic-native/core/bootstrap.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU;IACxB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAClC,IAAM,KAAG,GAAQ,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,IAAM,sBAAoB,GAAG,IAAI,CAAC;QAElC,6EAA6E;QAC7E,4EAA4E;QAC5E,2EAA2E;QAC3E,+CAA+C;QAC/C,IAAM,QAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE1B,IAAI,cAAY,GAAG,KAAK,CAAC;QACzB,KAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE;YAC3C,OAAO,CAAC,GAAG,CAAC,kDAA+C,IAAI,CAAC,GAAG,EAAE,GAAG,QAAM,SAAK,CAAC,CAAC;YACrF,cAAY,GAAG,IAAI,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC;YACT,IAAI,CAAC,cAAY,IAAI,KAAG,CAAC,OAAO,EAAE;gBAChC,OAAO,CAAC,IAAI,CACV,mDAAiD,sBAAoB,6HAA0H,CAChM,CAAC;aACH;QACH,CAAC,EAAE,sBAAoB,CAAC,CAAC;KAC1B;AACH,CAAC","sourcesContent":["export function checkReady() {\n if (typeof process === 'undefined') {\n const win: any = typeof window !== 'undefined' ? window : {};\n const DEVICE_READY_TIMEOUT = 5000;\n\n // To help developers using cordova, we listen for the device ready event and\n // log an error if it didn't fire in a reasonable amount of time. Generally,\n // when this happens, developers should remove and reinstall plugins, since\n // an inconsistent plugin is often the culprit.\n const before = Date.now();\n\n let didFireReady = false;\n win.document.addEventListener('deviceready', () => {\n console.log(`Ionic Native: deviceready event fired after ${Date.now() - before} ms`);\n didFireReady = true;\n });\n\n setTimeout(() => {\n if (!didFireReady && win.cordova) {\n console.warn(\n `Ionic Native: deviceready did not fire within ${DEVICE_READY_TIMEOUT}ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.`\n );\n }\n }, DEVICE_READY_TIMEOUT);\n }\n}\n"]}
\No newline at end of file