Chapter 203: preloadGif()
Core Idea
_available from v3. 3.
Key Concepts
- Options
- requestInit?<AvailableFrom v="4.0.471" />
- See also
Code Examples
const { waitUntilDone, free } = preloadGif(
"https://media.giphy.com/media/xT0GqH01ZyKwd3aT3G/giphy.gif"
);
waitUntilDone().then(() => {
console.log("The GIF is now ready to play!");
// Later, free the memory of the GIF
free();
});
- What it demonstrates: Usage pattern for preloadGif() from the official docs.
Key Takeaways
- Understand options when working with preloadGif().
- Understand requestinit?<availablefrom v="4.0.471" /> when working with preloadGif().
- Understand see also when working with preloadGif().
Connects To
- Animatedimage: related page in the Assets & Media section.
- Delaying: related page in the Assets & Media section.
- Exporting: related page in the Assets & Media section.