Extensions
In Chapter 6, Adding More Components we used the FileDownloader
extension to add downloading capabilities to a button:
// create an extension FileDownloader downloader = new FileDownloader(resource); // extend a component downloader.extend(button);
Extensions allow us to add functionality at runtime. We can add multiple extensions to the same component, that's something we cannot do by extending a class (in the object oriented sense, of course).