1 | export function checkReady() {
|
2 | if (typeof process === 'undefined') {
|
3 | var win_1 = typeof window !== 'undefined' ? window : {};
|
4 | var DEVICE_READY_TIMEOUT_1 = 5000;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | var before_1 = Date.now();
|
10 | var didFireReady_1 = false;
|
11 | win_1.document.addEventListener('deviceready', function () {
|
12 | console.log("Ionic Native: deviceready event fired after " + (Date.now() - before_1) + " ms");
|
13 | didFireReady_1 = true;
|
14 | });
|
15 | setTimeout(function () {
|
16 | if (!didFireReady_1 && win_1.cordova) {
|
17 | console.warn("Ionic Native: deviceready did not fire within " + DEVICE_READY_TIMEOUT_1 + "ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.");
|
18 | }
|
19 | }, DEVICE_READY_TIMEOUT_1);
|
20 | }
|
21 | }
|
22 |
|
\ | No newline at end of file |