Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.47 KB

File metadata and controls

56 lines (35 loc) · 1.47 KB

Module DOM.RequestAnimationFrame

This module exposes a polyfilled requestAnimationFrame function.

Request

newtype Request

A request for a callback via requestAnimationFrame. You can supply this to cancelAnimationFrame in order to cancel the request.

requestAnimationFrame_

requestAnimationFrame_ :: forall a eff. Window -> Eff (dom :: DOM | eff) a -> Eff (dom :: DOM | eff) Request

Request that the specified action be called on the next animation frame, specifying the Window object.

requestAnimationFrame

requestAnimationFrame :: forall a eff. Eff (dom :: DOM | eff) a -> Eff (dom :: DOM | eff) Request

Request that the specified action be called on the next animation frame.

requestAnimationFrameWithTime

requestAnimationFrameWithTime :: forall a eff. (Milliseconds -> Eff (dom :: DOM | eff) a) -> Eff (dom :: DOM | eff) Request

When it is time for the next animation frame, callback with the then-current time, and immediately execute the resulting effect.

requestAnimationFrameWithTime_

requestAnimationFrameWithTime_ :: forall a eff. Window -> (Milliseconds -> Eff (dom :: DOM | eff) a) -> Eff (dom :: DOM | eff) Request

Like requestAnimationFrameWithTime, but you supply the Window object.

cancelAnimationFrame

cancelAnimationFrame :: forall eff. Request -> Eff (dom :: DOM | eff) Unit

Cancel a request.