Chapter 36: gsap.version
Core Idea
gsap.version is a string reporting the exact GSAP version currently loaded, useful for debugging or conditionally handling behavior across versions.
Key Concepts
- Type: String (e.g.
"3.15").
Code Examples
console.log(gsap.version);
- What it demonstrates: reading the loaded GSAP version at runtime.
Key Takeaways
- Handy when debugging environments where multiple copies/versions of GSAP could accidentally be loaded (a common source of subtle bugs).
Connects To
- gsap.registerPlugin(): version mismatches between core and plugins are a common cause of registration issues this can help diagnose.