INNER CODE UNIT · JavaScript

pollingTimerFunc

apache/cordova-android · cordova-js-src/exec.js:134

function pollingTimerFunc () {
    if (pollEnabled) {
        pollOnce();
        setTimeout(pollingTimerFunc, 50);
    }
}

function hookOnlineApis () {
    function proxyEvent (e) {
        cordova.fireWindowEvent(e.type);
    }
    // The network module takes care of firing online and offline events.
    // It currently fires them only on document though, so we bridge them
    // to window here (while first listening for exec()-releated online/offline
    // events).
    window.addEventListener('online', pollOnceFromOnlineEvent, false);
    window.addEventListener('offline', pollOnceFromOnlineEvent, false);
    cordova.addWindowEventHandler('online');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…