Closure: The Definitive Guide [JAVASCRIPT][Closure. Guide]
%5BJAVASCRIPT%5D%5BClosure.%20The%20Definitive%20Guide%5D
%5BJAVASCRIPT%5D%5BClosure.%20The%20Definitive%20Guide%5D
%5BJAVASCRIPT%5D%5BClosure.%20The%20Definitive%20Guide%5D
Closure_The_Definitive_Guide
%5BClosure%20The%20Definitive%20Guide%20by%20Michael%20Bolin%20-%202010%5D
User Manual:
Open the PDF directly: View PDF
Page Count: 594 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- Copyright
- Table of Contents
- Foreword
- Preface
- Chapter 1. Introduction to Closure
- Tools Overview
- Closure Design Goals and Principles
- Reducing Compiled Code Size Is Paramount
- All Source Code Is Compiled Together
- Managing Memory Matters
- Make It Possible to Catch Errors at Compile Time
- Code Must Work Without Compilation
- Code Must Be Browser-Agnostic
- Built-in Types Should Not Be Modified
- Code Must Work Across Frames
- Tools Should Be Independent
- Downloading and Installing the Tools
- Example: Hello World
- Chapter 2. Annotations for Closure JavaScript
- Chapter 3. Closure Library Primitives
- Chapter 4. Common Utilities
- goog.string
- goog.array
- goog.object
- goog.json
- goog.dom
- goog.dom.getElement(idOrElement)
- goog.dom.getElementsByTagNameAndClass(nodeName, className, elementToLookIn)
- goog.dom.getAncestorByTagNameAndClass(element, tag, className)
- goog.dom.createDom(nodeName, attributes, var_args)
- goog.dom.htmlToDocumentFragment(htmlString)
- goog.dom.ASSUME_QUIRKS_MODE and goog.dom.ASSUME_STANDARDS_MODE
- goog.dom.classes
- goog.dom.classes.get(element)
- goog.dom.classes.has(element, className)
- goog.dom.classes.add(element, var_args) and goog.dom.classes.remove(element, var_args)
- goog.dom.classes.toggle(element, className)
- goog.dom.classes.swap(element, fromClass, toClass)
- goog.dom.classes.enable(element, className, enabled)
- goog.userAgent
- goog.userAgent.product
- goog.net.cookies
- goog.style
- goog.style.getPageOffset(element)
- goog.style.getSize(element)
- goog.style.getBounds(element)
- goog.style.setOpacity(element, opacity)
- goog.style.setPreWrap(element)
- goog.style.setInlineBlock(element)
- goog.style.setUnselectable(element, unselectable, opt_noRecurse)
- goog.style.installStyles(stylesString, opt_node)
- goog.style.scrollIntoContainerView(element, container, opt_center)
- goog.functions
- Chapter 5. Classes and Inheritance
- Chapter 6. Event Management
- Chapter 7. Client-Server Communication
- Chapter 8. User Interface Components
- Chapter 9. Rich Text Editor
- Design Behind the goog.editor Package
- Creating an Editable Region
- Extending the Editor: The Plugin System
- Registering Plugins
- Interacting with Plugins
- goog.editor.Plugin
- Built-in Plugins
- goog.editor.plugins.BasicTextFormatter
- goog.editor.plugins.HeaderFormatter
- goog.editor.plugins.RemoveFormatting
- goog.editor.plugins.AbstractTabHandler, goog.editor.plugins.ListTabHandler, and goog.editor.plugins.SpacesTabHandler
- goog.editor.plugins.EnterHandler, goog.editor.plugins.TagOnEnterHandler, and goog.editor.plugins.Blockquote
- goog.editor.plugins.LoremIpsum
- goog.editor.plugins.UndoRedo, goog.editor.plugins.UndoRedoManager, and goog.editor.plugins.UndoRedoState
- goog.editor.plugins.AbstractDialogPlugin
- goog.editor.plugins.LinkDialogPlugin
- Custom Plugins
- UI Components
- Selections
- Chapter 10. Debugging and Logging
- Chapter 11. Closure Templates
- Limitations of Existing Template Systems
- Introducing Closure Templates
- Creating a Template
- Declaring Templates with {namespace} and {template}
- Commenting Templates
- Overriding Line Joining with {sp} and {nil}
- Writing Raw Text with {literal}
- Building Soy Expressions
- Displaying Data with {print}
- Managing Control Flow with {if}, {elseif}, and {else}
- Advanced Conditional Handling with {switch}, {case}, and {default}
- Looping over Lists with {foreach}
- Leveraging Other Templates with {call} and {param}
- Identifying CSS Classes with {css}
- Internationalization (i18n)
- Compiling Templates
- Defining a Custom Function
- Chapter 12. Using the Compiler
- Chapter 13. Advanced Compilation
- Chapter 14. Inside the Compiler
- Chapter 15. Testing Framework
- Chapter 16. Debugging Compiled JavaScript
- Appendix A. Inheritance Patterns in JavaScript
- Example of the Functional Pattern
- Example of the Pseudoclassical Pattern
- Drawbacks to the Functional Pattern
- Instances of Types Take Up More Memory
- Methods Cannot Be Inlined
- Superclass Methods Cannot Be Renamed (Or Will Be Renamed Incorrectly)
- Types Cannot Be Tested Using instanceof
- Encourages Adding Properties to Function.prototype and Object.prototype
- Makes It Impossible to Update All Instances of a Type
- Naming Newly Created Objects Is Awkward
- Results in an Extra Level of Indentation
- Potential Objections to the Pseudoclassical Pattern
- Won’t Horrible Things Happen if I Forget the New Operator?
- Didn’t Crockford Also Say I Wouldn’t Have Access to Super Methods?
- Won’t All of the Object’s Properties Be Public?
- Won’t Declaring SomeClass.prototype for Each Method and Field of SomeClass Waste Bytes?
- I Don’t Need Static Checks—My Tests Will Catch All of My Errors!
- Appendix B. Frequently Misunderstood JavaScript
Concepts
- JavaScript Objects Are Associative Arrays Whose Keys Are Always Strings
- There Are Several Ways to Look Up a Value in an Object
- Single-Quoted Strings and Double-Quoted Strings Are Equivalent
- There Are Several Ways to Define an Object Literal
- The prototype Property Is Not the Prototype You Are Looking For
- The Syntax for Defining a Function Is Significant
- What this Refers to When a Function Is Called
- The var Keyword Is Significant
- Block Scope Is Meaningless
- Appendix C. plovr
- Index