add demo for request animation frame