Skip to content

Commit 0dfdff3

Browse files
committed
Update requestAnimationFrame to include timestamp parameter
Change the type signature of requestAnimationFrame to pass the timestamp to the callback function, matching the Web API specification where requestAnimationFrame provides a DOMHighResTimeStamp parameter.
1 parent 40e9a0c commit 0dfdff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Web/HTML/Window.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ newtype RequestAnimationFrameId = RequestAnimationFrameId Int
131131
derive instance eqRequestAnimationFrameId :: Eq RequestAnimationFrameId
132132
derive instance ordRequestAnimationFrameId :: Ord RequestAnimationFrameId
133133

134-
foreign import requestAnimationFrame :: Effect Unit -> Window -> Effect RequestAnimationFrameId
134+
foreign import requestAnimationFrame :: (Int -> Effect Unit) -> Window -> Effect RequestAnimationFrameId
135135

136136
foreign import cancelAnimationFrame :: RequestAnimationFrameId -> Window -> Effect Unit
137137

0 commit comments

Comments
 (0)