This example uses the dynamic loading capability built into YUI to pull in additional components as needed. In addition, it demonstrates how to define external modules that can be loaded alongside YUI.
This example works as follows:
YUI
instance is created with a configuration object that defines parameters we need to dynamically load new modules.node
is used so that we can bind an event listener to a button. YUI will dynamically fetch node
and its
dependencies. By default, these dependencies will be fetched from the Yahoo! CDN and will be combined into a single file.