|
Appendix C:
JavaScript Closures
Let's close our eyes together
Now can you see how good it's going to be?
—Devo,
"Pink Jazz Trancers"
Throughout this book, we have seen many jQuery methods that take functions as parameters. Our examples have thus created, called, and passed around functions time and again. While usually we can do this with only a cursory understanding of the inner JavaScript mechanics at work, at times side effects of our actions can seem strange if we do not have knowledge of the language features. In this appendix, we will study one of the more esoteric (yet prevalent) types of functions, called
closures.
|
Appendix C: JavaScript Closures
-
Inner Functions
-
The Great Escape
-
Variable Scoping
-
Interactions between Closures
-
Closures in jQuery
- Arguments to $(document).ready()
- Event Handlers
-
Memory Leak Hazards
- Accidental Reference Loops
- The Internet Explorer Memory Leak Problem
- The Good News
-
Conclusion
|
|
Paperback 380 pages
Released: July 2007
ISBN: 1847192505
ISBN 13:
978-1-847192-50-9 |
|
|
|
|