Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Moduli di codice JavaScript

Questa pagina è in fase di traduzione: contribuisci anche tu completando le parti mancanti. Il testo da tradurre potrebbe essere nascosto nella pagina: vai in modifica per visualizzarlo

JavaScript code modules let multiple privileged JavaScript scopes share code. For example, a module could be used by Firefox itself as well as by extensions, in order to avoid code duplication.

General topics

Using JavaScript code modules
An introduction to how to use JavaScript code modules.
Component.utils.import
How to import a JavaScript code module.
Component.utils.unload
How to unload a JavaScript code module.
Code snippets: Modules
Examples of how to use code modules.
Mozilla Labs JS Modules
This page features a list of JS modules, along with download links and documentation, that extension developers can use in their code.

Standard code modules

ctypes.jsm
Provides an interface that allows JavaScript code to call native libraries without requiring the development of an XPCOM component.
FileUtils.jsm
Provides helpers for dealing with files.
Geometry.jsm
Provides routines for performing basic geometric operations on points and rectangles.
ISO8601DateUtils.jsm
Provides routines to convert between JavaScript Date objects and ISO 8601 date strings.
Dict.jsm
Provides an API for key/value pair dictionaries.
NetUtil.jsm
Provides helpful networking utility functions, including the ability to easily copy data from an input stream to an output stream asynchronously.
PopupNotifications.jsm
Provides an easy way to present non-modal notifications to users.
openLocationLastURL.jsm
Provides access to the last URL opened using the "Open Location" option in the File menu.
DownloadLastDir.jsm
Provides the path to the directory into which the last download occurred.
PluralForm.jsm
Provides an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule.
Services.jsm 
Provides getters for conveniently obtaining access to commonly-used services.
XPCOMUtils.jsm
Contains utilities for JavaScript components loaded by the JS component loader.
PerfMeasurement.jsm
Provides access to low-level hardware and OS performance measurement tools.
AddonManager.jsm
Interface to install, manage, and uninstall add-ons.
AddonRepository.jsm
Allows searching of the add-ons repository.

Tag del documento e collaboratori

 Hanno collaborato alla realizzazione di questa pagina: fusionchess
 Ultima modifica di: fusionchess,