Author: sp...@google.com Date: Tue Apr 14 14:05:42 2009 New Revision: 5232
Modified: wiki/CodeSplitting.wiki Log: Changed the "async modules" pattern to be called "async provider" Modified: wiki/CodeSplitting.wiki ============================================================================== --- wiki/CodeSplitting.wiki (original) +++ wiki/CodeSplitting.wiki Tue Apr 14 14:05:42 2009 @@ -264,7 +264,7 @@ toolbox. -==Async modules== +==Async Provider == Frequently you will think of some part of your code as its own coherent module of functionality, and you'd like for that functionality to get @@ -316,10 +316,13 @@ } }}} Whenever you access the module from code that possibly loads before -the module, go through the static Module.createAsync method. For code -that definitely loads after the module, store the instance of the -module somewhere for convenient, direct access. For code that could go either -way, use Module.createAsync for safety. +the module, go through the static Module.createAsync method. This method +is then an "async provider": it provides an instance of Module, but it might +take its time doing so. + +Usage note: for any code that definitely loads after the module, store the instance +of the module somewhere for convenience. Then, access can go directly through +that instance without harming the code splitting. ==Prefetching== --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---