Repeat run function until return true.
import { poll } from '@mochen/yuumi';
poll with fixed time interval
poll.run(()=>{ return document.querySelector('#a') !== null; }).then(()=>{ // function return true }).catch(()=>{ // until timeout function return false })
Generated using TypeDoc
Poll
Repeat run function until return true.
import { poll } from '@mochen/yuumi';