Skip to main content

request_animation_frame

Function request_animation_frame 

Source
pub(crate) fn request_animation_frame(
    it: &mut Interp,
    _t: Value,
    a: &[Value],
) -> Result<Value, Value>
Expand description

requestAnimationFrame(cb): 次のイベントループでコールバックを実行(timestamp を引数に渡す)。 setTimeout と同じマクロタスク機構に乗せるため cancelAnimationFrame は clearTimeout と共通。