dist/js/flarej.js
function pollDo(fn, timeOut, doName, obj) {
  var siv = null;

  if (!obj) {
    obj = window;
  }
  if (timeOut == null) {
    timeOut = 100;
  }

  //If the previous poll operation is exist,then make it cancel.
  if (doName && obj[doName]) {
    clearInterval(obj[doName]);
  }

  //Polling execution operations every interval a period of time.
  siv = setInterval(function () {
    if (fn.call(obj) === false) {
      clearInterval(siv);
    }
  }, timeOut);

  if (doName) {
    obj[doName] = siv;
  }

  return siv;
}
function pollDo(fn, timeOut, doName, obj) {
  var siv = null;

  if (!obj) {
    obj = window;
  }
  if (timeOut == null) {
    timeOut = 100;
  }

  //If the previous poll operation is exist,then make it cancel.
  if (doName && obj[doName]) {
    clearInterval(obj[doName]);
  }

  //Polling execution operations every interval a period of time.
  siv = setInterval(function () {
    if (fn.call(obj) === false) {
      clearInterval(siv);
    }
  }, timeOut);

  if (doName) {
    obj[doName] = siv;
  }

  return siv;
}
function pollDo ( fn , timeOut , doName , obj ) { var siv = null ; if ( ! obj ) { obj = window ; } if ( timeOut == null ) { timeOut = 100 ; } //If the previous poll operation is exist,then make it cancel. if ( doName && obj [ doName ] ) { clearInterval ( obj [ doName ] ) ; } //Polling execution operations every interval a period of time. siv = setInterval ( function ( ) { if ( fn . call ( obj ) === false ) { clearInterval ( siv ) ; } } , timeOut ) ; if ( doName ) { obj [ doName ] = siv ; } return siv ; }
Poll to do something
Poll to do something