demo/bundle.js
/**
             * Push a watcher into the watcher queue.
             * Jobs with duplicate IDs will be skipped unless it's
             * pushed when the queue is being flushed.
             */
Push a watcher into the watcher queue.
Jobs with duplicate IDs will be skipped unless it's
pushed when the queue is being flushed.
Push a watcher into the watcher queue . Jobs with duplicate IDs will be skipped unless it ' s pushed when the queue is being flushed .
function queueWatcher (watcher) {
              var id = watcher.id;
              if (has[id] == null) {
                has[id] = true;
                if (!flushing) {
                  queue$1.push(watcher);
                } else {
                  var i = queue$1.length - 1;
                  while (i > index && queue$1[i].id > watcher.id) {
                    i--;
                  }
                  queue$1.splice(i + 1, 0, watcher);
                }
                if (!waiting) {
                  waiting = true;
                  nextTick$1(flushSchedulerQueue);
                }
              }
            }
function queueWatcher ( watcher ) { var id = watcher . id ; if ( has [ id ] == null ) { has [ id ] = true ; if ( ! flushing ) { queue$1 . push ( watcher ) ; } else { var i = queue$1 . length - 1 ; while ( i > index && queue$1 [ i ] . id > watcher . id ) { i -- ; } queue$1 . splice ( i + 1 , 0 , watcher ) ; } if ( ! waiting ) { waiting = true ; nextTick$1 ( flushSchedulerQueue ) ; } } }
Push a watcher into the watcher queue.
Push a watcher into the watcher queue .
// if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. // queue the flush