use browser compatible nextTick