Implement requestAnimationFrame for active state.