Mixins / foldkit-mixins/testing

Frames

namespace · packages/mixins/src/testing.ts:376

const Frames = { track }

The page's animation frames, tracked from the moment track is called. Foldkit draws on requestAnimationFrame, so settle waits for what a transition asked to draw, instead of a sleep that guesses how long that takes, and hold keeps every frame back so events meet the view as it was last drawn, as keys and clicks faster than a frame do. Call it after any stub of requestAnimationFrame, since it wraps whichever is installed.

In the guides

Members

Frames.track

function · packages/mixins/src/testing.ts:289

track(): TrackedFrames