src/common/js/winjs/js/base.js
function drainQueue(jobInfo) {
        function drainNext() {
            return drainQueue;
        }

        var queue = jobInfo.job._queue;

        if (queue.length === 0 && eventQueue.length > 0) {
            queue = jobInfo.job._queue = copyAndClearQueue();
        }

        jobInfo.setPromise(drainOneEvent(queue).then(drainNext, drainNext));
    }
function drainQueue(jobInfo) {
        function drainNext() {
            return drainQueue;
        }

        var queue = jobInfo.job._queue;

        if (queue.length === 0 && eventQueue.length > 0) {
            queue = jobInfo.job._queue = copyAndClearQueue();
        }

        jobInfo.setPromise(drainOneEvent(queue).then(drainNext, drainNext));
    }
function drainQueue ( jobInfo ) { function drainNext ( ) { return drainQueue ; } var queue = jobInfo . job . _queue ; if ( queue . length === 0 && eventQueue . length > 0 ) { queue = jobInfo . job . _queue = copyAndClearQueue ( ) ; } jobInfo . setPromise ( drainOneEvent ( queue ) . then ( drainNext , drainNext ) ) ; }
Drains the event queue via the scheduler
Drains the event queue via the scheduler