You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/browser/html/window.zig
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -138,6 +138,23 @@ pub const Window = struct {
138
138
return&self.performance;
139
139
}
140
140
141
+
// Tells the browser you wish to perform an animation. It requests the browser to call a user-supplied callback function before the next repaint.
142
+
// fn callback(timestamp: f64)
143
+
// Returns the request ID, that uniquely identifies the entry in the callback list.
144
+
pubfn_requestAnimationFrame(
145
+
self: *Window,
146
+
callback: Callback,
147
+
) !u32 {
148
+
// We immediately execute the callback, but this may not be correct TBD.
149
+
// Since: When multiple callbacks queued by requestAnimationFrame() begin to fire in a single frame, each receives the same timestamp even though time has passed during the computation of every previous callback's workload.
0 commit comments