{"json_modified": "2016-03-28T08:31:13.510831", "uuid": "1da4c0c9-9ab5-4f39-a333-d0115b293051", "title": "Modules", "url": "/en-US/docs/Mozilla/Add-ons/SDK/Guides/Contributor_s_Guide/Modules", "tags": ["Extensions", "Add-ons", "add-ons"], "translations": [], "modified": "2016-01-15T09:52:01", "label": "Modules", "localization_tags": [], "locale": "en-US", "id": 86027, "last_edit": "2016-01-15T09:51:59", "summary": "A module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface. The use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them. Unfortunately, JavaScript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names. We will show how to do each of these things using the built-in Components object provided by Xulrunner application such as Firefox and Thunderbird.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Loading_Subscripts", "title": "Loading Subscripts"}, {"id": "Exporting_Names", "title": "Exporting Names"}, {"id": "Importing_Names", "title": "Importing Names"}, {"id": "Sandboxes_and_Compartments", "title": "Sandboxes and Compartments"}, {"id": "Modules_in_the_Add-on_SDK", "title": "Modules in the Add-on SDK"}, {"id": "The_Cuddlefish_Loader", "title": "The Cuddlefish Loader"}], "slug": "Mozilla/Add-ons/SDK/Guides/Contributor_s_Guide/Modules", "review_tags": []}