14.6. Scripting
Here we will look at how to control and enhance templates from a script and further explore some of the advanced tree concepts discussed in Chapter 13, Listboxes and Trees. Chapter 16, XPCOM Objects, contains extensive discussion of the RDF and data source objects that complement the template system.
14.6.1. Guidelines for Dynamic Templates
Templates expressed in XUL alone are relatively easy because they don't ever change, and they generate content once only. Templates expressed in a combination of XUL, JavaScript, and AOM and XPCOM objects can be very challenging because full functionality is the exception rather than the expected. Here is some collected wisdom:
The dont-build-content flag, and the other performance flags have ...
Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.