requestAnimationFrame with steroids. It is meant to help on progressive loading a web page, showing content to the user as soon as possible.
myFrame.onResponse(function, stage)
Request to call a function in the response frame.
function
The function to be called.
stage
The stage which the function will be called.
"read" | "write" defaults to "write".
Functions in the read stage are called first so recalculate Style is not forced.
myFrame.onNext(function, stage)
Request to call a function in the nextframe, which is the frame just after the response frame.
Works equals requestReponse().
myFrame.onLast(function, stage)
Request to call a function in the lastframe, which is the frame executed just after all the next frames are.
Works equals requestReponse().
*If you request a frame in a function already running inside a frame and the requested frame was previously executed or is executing, a new frame is created and added to the stack of frames left and the stack will be consumed normally according to the priority order.
-
Notifications
You must be signed in to change notification settings - Fork 0
nathanaelsousa/myFrame
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Group your AnimationFrames by priority and stage (read, write).
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published