Search completed in 1.26 seconds.
930 results for "install":
Your results are loading. Please wait...
Using XPInstall to Install Plugins - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. XPInstall is a JavaScript-based installer technology that works across all the platforms that Mozilla and Netscape browsers based on Mozilla (such as Netscape 7) are deployed. It can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on Windows) or obliging the user to restart their browse...
... and Netscape browsers based on Mozilla (such as Netscape 7) are deployed. It can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on Windows) or obliging the user to restart their browser. For plugin vendors who have already written a native code (e.g. EXE) installer, XPInstall can wrap this native installer and run it so that the user never has to leave the browsing environment and click on the EXE to run it. ...
...nch a binary installer (the classic setup.exe experience on Windows) or obliging the user to restart their browser. For plugin vendors who have already written a native code (e.g. EXE) installer, XPInstall can wrap this native installer and run it so that the user never has to leave the browsing environment and click on the EXE to run it. This article presents a guideline for improving the plugin installation experience for Netscape Gecko browsers using XPInstall. A Definition of Terms XPInstall is an installer technology, and the name itself stands for "Cross Platform Install" (hence "XP" -- an abbreviation for "Cross Platform"). An XPInstall package is usually called an XPI package for short (and often pronounced "zippy"). ...
...And 64 more matches
Install Wizards (aka: Stub Installers) - Archive of obsolete content
Warning: The content of this article may be out of date. See Bundles for the current documentation. What do we mean by installer package? ...
... Warning: The content of this article may be out of date. See Bundles for the current documentation. What do we mean by installer package? ...
... Warning: The content of this article may be out of date. See Bundles for the current documentation. What do we mean by installer package? ...
...And 16 more matches
Installing and uninstalling web apps - Progressive web apps (PWAs)
Web application installation is a feature available in modern browsers that allows users to choose to easily and conveniently "install" a web application on their device so they can access it in the same way they would any other installed app. Depending on the device and features of the operating system and browser, this can result in what is essentially a fully featured application (for example, using WebAPK on Android) or as a shortcut added to their device's screen. This guide explains how installation is performed, what it means, and what you need to do as a developer to let your users take advantage of it. ...
...Installed applications are more conveniently invoked as they have a presence in a device's home screen or app list or bar. ...
... on the device and features of the operating system and browser, this can result in what is essentially a fully featured application (for example, using WebAPK on Android) or as a shortcut added to their device's screen. This guide explains how installation is performed, what it means, and what you need to do as a developer to let your users take advantage of it. Why installation? The option to install a web application is part of the Progressive Web App philosophy--giving web apps the same user experience advantages as native apps so they can be competitive. Installed applications are more conveniently invoked as they have a presence in a device's home screen or app list or bar. This makes it simple for a user to use a gesture to access an app by tapping or clicking its icon. The application i...
...And 6 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
This appendix covers these cases with simple code that should work for most add-ons. ...
...This appendix covers these cases with simple code that should work for most add-ons. Install Scripts Just like with a regular initialization function, we want a load event handler: // rest of overlay code goes here. ...
...n add-on to require to run a script only when it is installed for the first time, or every time it is updated. It can be used to write or copy necessary files to the profile folder, like the initial DB the add-on will use for storage. A few others require cleanup code to be run after the add-on is uninstalled. This appendix covers these cases with simple code that should work for most add-ons. Install Scripts Just like with a regular initialization function, we want a load event handler: // rest of overlay code goes here. window.addEventListener( "load", function() { XulSchoolChrome.BrowserOverlay.init(); }, false); Then all we need is some persistent flag that ensures that the first run code is only run once. The best approach in this case is to use a preference, as explained in the Ha...
...And 5 more matches
InstallTrigger.installChrome - Archive of obsolete content
InstallTrigger.installChrome Trigger scripts are typically invoked by JavaScript event handlers on hyperlinks. When a user clicks the link "Install the New Blue theme" in the example below, XPInstall downloads, registers, and installs the theme contained in newblue.xpi to the user's profile directory. ...
... InstallTrigger.installChrome Trigger scripts are typically invoked by JavaScript event handlers on hyperlinks. When a user clicks the link "Install the New Blue theme" in the example below, XPInstall downloads, registers, and installs the theme contained in newblue.xpi to the user's profile directory. ...
... InstallTrigger.installChrome Trigger scripts are typically invoked by JavaScript event handlers on hyperlinks. When a user clicks the link "Install the New Blue theme" in the example below, XPInstall downloads, registers, and installs the theme contained in newblue.xpi to the user's profile directory. ...
...And 2 more matches
InstallEvent.InstallEvent() - Web APIs
init Optional An options object containing any custom settings that you want to apply to the event object. Available options are as follows: activeWorker: The ServiceWorker that is currently actively controlling the page. ...
Enhanced Extension Installation - Archive of obsolete content
First it must locate the Firefox executable, then run it with the -install-global-extension command line flag, which installs from a XPI into the Firefox application directory. Aside from the work of locating the Firefox executable in the first place (which varies from platform to platform), this is very limiting because: It forces the third party application to package its Firefox integration hooks as a XPI. ...
...and line flag, which installs from a XPI into the Firefox application directory. Aside from the work of locating the Firefox executable in the first place (which varies from platform to platform), this is very limiting because: It forces the third party application to package its Firefox integration hooks as a XPI. It forces it to have write access to the Firefox directory in order to be installed, which may not always be the case. It forces its items to be located in different places on the user's disk - some vendors wish to keep all of their installed content within C:\Program Files\Foo\ for example. ...
...he third party application to package its Firefox integration hooks as a XPI. It forces it to have write access to the Firefox directory in order to be installed, which may not always be the case. It forces its items to be located in different places on the user's disk - some vendors wish to keep all of their installed content within C:\Program Files\Foo\ for example. There is no clean uninstall procedure, as the -install-global-extension flag was designed only as a means to install items for all user profiles, not as a means for third party installers to register their components. ...
...And 62 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. This article uses the installer script from browser.xpi install package as the basis for discussing XPI installations in general. This installer script is relatively short, but it exercises most of the important features of the XPInstall API, and it can easily be used as a template for other more general software installations. In this article, we use the unix install file, but the installers for all the platforms are quite s...
...ng XPI installations in general. This installer script is relatively short, but it exercises most of the important features of the XPInstall API, and it can easily be used as a template for other more general software installations. In this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports. About browser.xpi browser.xpi is the XPI archive in which the main components of the Mozilla browser are archived for installation. Mozilla cross-platform installations use the XPI format as a way to organize, compress, and automate software installations and software updates. A XPI is a PKZIP-compressed archive (like ZIP and JAR files) with a specia...
...About browser.xpi browser.xpi is the XPI archive in which the main components of the Mozilla browser are archived for installation. Mozilla cross-platform installations use the XPI format as a way to organize, compress, and automate software installations and software updates. A XPI is a PKZIP-compressed archive (like ZIP and JAR files) with a special script at the highest level that manages the installation. That installer script , usually named install.js, is the subject of this article. ...
...And 47 more matches
Install.js - Archive of obsolete content
The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. To make your extension install in Mozilla Suite, SeaMonkey, Mozilla Firefox pre-0.9 and Mozilla Thunderbird pre-0.7, you need to have an install.js file in the root of your XPI file. If you want your extension to install in Firefox 0.9 and later and/or Thunderbird 0.7 and later only, you don't need install.js, you need an install.rdf instead. ...
...l.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. To make your extension install in Mozilla Suite, SeaMonkey, Mozilla Firefox pre-0.9 and Mozilla Thunderbird pre-0.7, you need to have an install.js file in the root of your XPI file. If you want your extension to install in Firefox 0.9 and later and/or Thunderbird 0.7 and later only, you don't need install.js, you need an install.rdf instead. See also this article from XulPlanet's Main Tutorial. There is a different sample install.js template located at http://downloads.mozdev.org/xsidebar/mods/. This version has been developed as part of the effort to port Firefox extensions to SeaMonkey from the xSidebar Project. Pros: This version consolidates all the changable information at the top of the fil...
...Cons: Code is bloated since it has to cater for several different ways an extension author can package the .JAR file contained in the .XPI file. XPI file structure You can use the code below (taken from Pike's extensions ). ...
...And 26 more matches
InstallListener
InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through addInstallListener or to a single AddonInstall through addListener. ...
... InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through addInstallListener or to a single AddonInstall through addListener. ...
... InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through addInstallListener or to a single AddonInstall through addListener. ...
...And 26 more matches
Creating XPI Installer Modules - Archive of obsolete content
ather old and only applies to Mozilla Suite and SeaMonkey (until it gets converted to Toolkit). Addons for various Toolkit applications, such as Firefox or Thunderbird, should be packaged in a different way. Mozilla has introduced major changes to the way that themes and all the other parts of the UI are packaged. This new packaging scheme is called XPI (pronounced "zippy"), and interacts with XPInstall. A XPI file typically contains the resources to be installed (in this case the barley.jar we want to have installed in the Mozilla/bin/chrome/ directory) and an install script that guides the installation process. Under the chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of JAR files, or Java archives (see figure below). JAR is a file ...
...tall script that guides the installation process. Under the chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of JAR files, or Java archives (see figure below). JAR is a file format based on the ZIP file format and is used for aggregating multiple files into a single file. These archives are redundant with the subdirectories: Mozilla now installs both the compressed and uncompressed versions of the UI, though you can change this when you build Mozilla yourself. chrome/ US/ US.jar chatzilla/ chatzilla.jar chrome.rdf chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en...
...though you can change this when you build Mozilla yourself. chrome/ US/ US.jar chatzilla/ chatzilla.jar chrome.rdf chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-chrome.txt messenger/ messenger.jar ... In addition to these JAR files, there are also several new RDF files. These new files represent a redesign of the way that the Mozilla UI is packaged and installed. Though the chrome directory still includes subdirectories of uncompressed files by default, a new way to aggregate and distribute the files has improved performance, made the UI compone...
...And 23 more matches
Install script template - Archive of obsolete content
/** Doron Rosenberg -- doronAtNoSpamAllowedHerenetscape.com Arun K. Ranganathan -- arunerAtNoSpamAllowedHerenetscape.com Petter Ericson -- petterAtNoSpamAllowedHerecycore.com This is an install.js file that does the following -- 1. Installs to the current browser that is invoking the installation 2. Additionally installs to a secondary location on the Windows desktop, in this case C:\WINNT\System32\MyPlugin\ 3. Writes registry keys exposing the above secondary install location for other browsers to find. ...
...following -- 1. Installs to the current browser that is invoking the installation 2. Additionally installs to a secondary location on the Windows desktop, in this case C:\WINNT\System32\MyPlugin\ 3. Writes registry keys exposing the above secondary install location for other browsers to find. ...
...SCRIPTION = "My Plugin Files"; var COMPANY_NAME = "MyPluginCo"; var PLUGIN_DESCRIPTION = "My Exemplary Plugin Mine All Mine"; // Registry constant paths // These will be used when the Win32 Registry Keys are written var HKEY_LOCAL_MACHINE = "HKEY_LOCAL_MACHINE"; var HKEY_CURRENT_USER = "HKEY_CURRENT_USER"; var REG_MOZ_PATH = "SOFTWARE\\MozillaPlugins"; // My Own Error Code in case secondary installation fails var noSecondaryInstall = 1; // error return codes need some memory var err; // error return codes when we try and install to the current browser var errBlock1; // error return codes when we try and do a secondary installation var errBlock2 = 0; // global variable containing our secondary install location var secondaryFolder; //Special error values used by the Cycore developers...
...And 19 more matches
Install Scripts - Archive of obsolete content
<< PreviousNext >> This section describes the install script. Creating an Install Script Note: For Firefox Extensions, install.js are no longer used. You should create a install.rdf instead. You will usually want some form of control over your install process. For example, you may wish to check versions of files and only install updated files, or perhaps you wish to apply patches to existing files. The install script is even flexible enough to allow you to uninstall files. For this reason, installers include an install script to handle the installation process. The installer script must be called install.js and must be placed at the top level of the installer archive. The script will contain JavaScript code which calls a number of install functions. In an HTML document, or a XUL...
...install.js and must be placed at the top level of the installer archive. The script will contain JavaScript code which calls a number of install functions. In an HTML document, or a XUL document, the window object is the root global object. That means that you can call the methods of the window object with the qualifier before it, which means that window.open() can simply be written open(). In an install script, there is no associated window, however the global object will be an Install object which contains a number of functions to customize the install process. Some of the Install object's functions will be described below. The install script should take the following steps: Initialize the installation by specifying what package and version is being installed. Use the Install functions to ...
... the global object will be an Install object which contains a number of functions to customize the install process. Some of the Install object's functions will be described below. The install script should take the following steps: Initialize the installation by specifying what package and version is being installed. Use the Install functions to indicate what files and directories need to be installed. You can also set files to be moved and deleted. Start the process of installing the necessary files. It is important to note that during step two, you only indicate which files should be installed and any other operations you wish to have happen. No files get copied until step three. ...
...And 17 more matches
Creating an Installer - Archive of obsolete content
You can place this installer file somewhere for users to download. ...
... Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. << PreviousNext >> This section will describe packaging a XUL application into an installer. XPInstall Packages Mozilla provides a mechanism which can be used to package XUL windows, scripts, skins and other files into single file installers. You can place this installer file somewhere for users to download. A simple script can be used to have the package downloaded and installed. This mechanism is called XPInstal...
...Inside the JAR file, you can add all the various files that you want to have installed. In addition, installers should contain an install script (a file named install.js) which can be used to script the installation process. ...
...And 16 more matches
Install Manifests - Archive of obsolete content
Introduction An Install Manifest is the file an Add-on Manager-enabled XUL application (e.g. Firefox or Thunderbird) uses to determine information about an add-on as it is being installed. It contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on. The format of the Install Manifest is RDF/XML. The file must be called install.rdf and live at the top level of an add-on's XPI file. ...
... It contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on. The format of the Install Manifest is RDF/XML. The file must be called install.rdf and live at the top level of an add-on's XPI file. Layout The basic layout of an Install Manifest is like so: <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Some properties are required, some are optional. Some have simple string values, some are complex resources. Required Prope...
...: <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Some properties are required, some are optional. Some have simple string values, some are complex resources. Required Property Reference Your Install Manifest must specify these properties correctly otherwise your add-on may not install. id The ID of the extension, which must be one of the following: GUID (Firefox 1.0) A string formatted like so: extensionname@example.org The latter format is significantly easier to generate and manipulate. Firefox 1.5 has checking to ensure that your id falls into one format or the other and will refu...
...And 14 more matches
initInstall - Archive of obsolete content
The name of the software is displayed to the user. ...
...The name of the software is displayed to the user. ...
...The name of the software is displayed to the user. ...
...And 13 more matches
Unix stub installer - Archive of obsolete content
Then untar and gunzip this to /tmp. ...
...Then untar and gunzip this to /tmp. ...
...Then untar and gunzip this to /tmp. ...
...And 12 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
There are a variety of ways you can install extensions and themes from web pages, including direct linking to the XPI files and using the InstallTrigger object. Extension and web authors are encouraged to use the method described below to install XPIs, as it provides the best experience to users. ...
... There are a variety of ways you can install extensions and themes from web pages, including direct linking to the XPI files and using the InstallTrigger object. Extension and web authors are encouraged to use the method described below to install XPIs, as it provides the best experience to users. ...
...The HTML <a> is the install link. The href attribute contains a direct link to the extension XPI file,...
...And 11 more matches
Windows stub installer - Archive of obsolete content
Where does the Windows stub installer code reside? The windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/setup/> How do we get setup to debug the Windows stub installer? ...
... Where does the Windows stub installer code reside? The windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/setup/> How do we get setup to debug the Windows stub installer? ...
... Where does the Windows stub installer code reside? The windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/setup/> How do we get setup to debug the Windows stub installer? ...
...And 11 more matches
AddonInstall
version string The version of the add-on being installed. iconURL string The icon of the add-on being installed. ...
... An AddonInstall instance tracks download and installation process of an add-on. Instances can be created using the getInstallForFile() or getInstallForURL() methods on the AddonManager. Once you have an instance the install() method is used to start automatic download and installation. This can be canceled at any time with the cancel() method. Method Overview void install() void cancel() void addListener(in InstallListener listener) void removeListener(in InstallListener listener) Properties Attribute Type Description name string The name of the add-on being installed. version string The version of the add-on being installed. iconURL string The icon of the add-on being installed. re...
... void removeListener(in InstallListener listener) Properties Attribute Type Description name string The name of the add-on being installed. version string The version of the add-on being installed. iconURL string The icon of the add-on being installed. releaseNotesURI nsIURI The URI of release notes for this install. type string The type of the add-on being installed. state integer The state of the installation. error integer If an error has been encountered during the download or install this will hold the error code. sourceURI nsIURI The URI that the add-on is being installed from. file nsIFile The file that the add-on is being inst...
...And 9 more matches
Additional Install Features - Archive of obsolete content
For example, you might want to make a backup of some files first. ...
...It provides some functions which can be used to examine and modify files on disk. You can use these to move, copy or delete files before or after the files are installed. For example, you might want to make a backup of some files first. ...
...For example, you might want to make a backup of some files first. ...
...And 8 more matches
amIWebInstaller
toolkit/mozapps/extensions/amIWebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. ...
... toolkit/mozapps/extensions/amIWebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. ...
...WebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. ...
...And 8 more matches
install - Web APIs
callBackFunc An optional callback function invoked when the installation is complete (see example below). Firefox 3 note In Firefox 3 the callback is no longer invoked unless the website performing the installation is whitelisted. Returns install returns True if the function succeeded and False if it did not, but these values are not always reliable as a determinant of the success of the operation. ...
...st [, function callBackFunc ] ) Parameters The install method has the following parameters: XPIlist An array of files to be installed (see example below). callBackFunc An optional callback function invoked when the installation is complete (see example below). Firefox 3 note In Firefox 3 the callback is no longer invoked unless the website performing the installation is whitelisted. Returns install returns True if the function succeeded and False if it did not, but these values are not always reliable as a determinant of the success of the operation. To surface detail about the status of the installation, use the optional callback function and its status parameter, as in the example below. Description In the example below, a special JavaScript obje...
... succeeded and False if it did not, but these values are not always reliable as a determinant of the success of the operation. To surface detail about the status of the installation, use the optional callback function and its status parameter, as in the example below. Description In the example below, a special JavaScript object constructor is used to create an object that can be passed to the install() method. The { } constructor takes a comma-delimited set of label/value pairs. For installations, these pairs are the XPInstall confirm dialog display name and the path of the XPI, respectively. In the example below, a single installation object is created, but you can use this approach to create multiple installations to pass to a single install. As with the older startSoftwareUpdate method,...
...And 8 more matches
nsIInstallLocation
toolkit/mozapps/extensions/public/nsIExtensionManager.idlScriptable Interface representing a location where extensions, themes and so on are installed. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: While this API still works, Firefox 4 no longer extracts XPIs by default, so this will now point to the XPI file instead of to the directory. Any nsIFile operations that assume a directory and plain files will fail in Firefox 4, unless you specify <em:unpack>. ...
...ko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: While this API still works, Firefox 4 no longer extracts XPIs by default, so this will now point to the XPI file instead of to the directory. Any nsIFile operations that assume a directory and plain files will fail in Firefox 4, unless you specify <em:unpack>. ...
...tead of to the directory. Any nsIFile operations that assume a directory and plain files will fail in Firefox 4, unless you specify <em:unpack>. ...
...And 7 more matches
BeforeInstallPromptEvent - Web APIs
This interface inherits from the Event interface. ...
... This interface inherits from the Event interface. ...
... This interface inherits from the Event interface. ...
...And 7 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
Since the prospect of embedded Gecko browsers raises the scenario of more than one Gecko-based browser that a Netscape-style plugin can work with, it becomes important to let plugin developers know how to discover these browsers on a Windows machine. This information applies to Mozilla based browsers that pull the Mozilla codebase after the Mozilla 0.9.1 milestone release. None of the Registry keys mentioned here are written by browsers before the Mozilla 0.9.1 timeframe. ...
...ter the Mozilla 0.9.1 milestone release. None of the Registry keys mentioned here are written by browsers before the Mozilla 0.9.1 timeframe. For example, Netscape 6.0 and 6.01 do not write any of these keys into the Registry, and thus these keys are not available for plugin vendors to parse for these two browsers. Netscape 6.1 and onwards, however, will write these keys, and so creating a plugin installer that puts the shared object (DLL) in the right place becomes much easier, since the relevant meta-information is present in the Win32 System Registry. These keys are written by the installer of Mozilla browsers -- the Netscape 6.2 installer, for example, writes these keys to the registry, and so does the Mozilla installer (for versions after Mozilla 0.9.1). Other major commercial browsers based...
...nformation via the registry, and where appropriate, these registry keys are also mentioned, with the necessary version caveats. Much of this registry data follows as a consequence of the discussions in bug 109402. To find the plugins directory Applicable to Netscape 6.1, 6.2.x, Netscape 7.0 (and up), Mozilla 1.0, and CompuServe 7.0 This section details the suggested mechanism to find out where to install the plugin DLL so that it is picked up by Mozilla based browsers on the desktop. Go to HKEY_LOCAL_MACHINE\Software\Mozilla Caveat Emptor: If the Mozilla subkey is not present under HKEY_LOCAL_MACHINE, look under HKEY_CURRENT_USER\Software\Mozilla\. On Windows XP and Windows 2000, in order to write to the registry, sometimes the software may need Administrator privileges. Thus, some Mozilla b...
...And 6 more matches
Mac stub installer - Archive of obsolete content
Where does the Mac stub installer code reside? The mac stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ll/wizard/mac/> The mac stub installer source code resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/> How do we get setup to debug the Mac installer? Build the mac installer (debug or non-debug target) using MIW.mcp Grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...taller.sea.bin> Drop in the installer binary next to the "Mozilla Installer" in the "Mozilla Installer" folder created by unstuffing the opt build. Run the installer from the opt "Mozilla Installer" folder. Alternative to steps 3 and 4 copy the "Installer Modules" folder from the "Mozilla Installer" folder into the "macbuild" folder that contains the ...
...rg/pub/mozilla/n...taller.sea.bin> Drop in the installer binary next to the "Mozilla Installer" in the "Mozilla Installer" folder created by unstuffing the opt build. Run the installer from the opt "Mozilla Installer" folder. Alternative to steps 3 and 4 copy the "Installer Modules" folder from the "Mozilla Installer" folder into the "macbuild" folder that contains the build debug or non-debug installer binary next to MIW.mcp. Copy the License and Readme from the "Mozilla Installer" folder" to the "macbuild" folder itself. Now run the built installer from the "macbuild" itself or by running it from the MIW.mcp CodeWarrior project. ...
...r Modules" folder from the "Mozilla Installer" folder into the "macbuild" folder that contains the build debug or non-debug installer binary next to MIW.mcp. Copy the License and Readme from the "Mozilla Installer" folder" to the "macbuild" folder itself. Now run the built installer from the "macbuild" itself or by running it from the MIW.mcp CodeWarrior project. How we get setup to debug the XPInstall engine from the mac installer? Once you have the mac installer built and ready to debug you may want to debug the XPInstall engine in the context of the installer rather than in the context of the browser. To do this, in addition to the above steps to set up the mac installer to debug you will need to do the following: Create a file named xpcom.xpi with the shared libraries in the structure de...
...And 6 more matches
amIWebInstallListener
toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable Starts all installs. The registered amIWebInstallListener is used to notify about new installs triggered by websites. The default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
...out new installs triggered by websites. The default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
...g when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
...And 6 more matches
InstallEvent - Web APIs
This interface inherits from the ExtendableEvent interface. ...
... This interface inherits from the ExtendableEvent interface. ...
... This interface inherits from the ExtendableEvent interface. ...
...And 5 more matches
Window: appinstalled event - Web APIs
The appinstalled event of the Web Manifest API is fired when the browser has successfully installed a page as an application. ...
... The appinstalled event of the Web Manifest API is fired when the browser has successfully installed a page as an application. ...
... The appinstalled event of the Web Manifest API is fired when the browser has successfully installed a page as an application. ...
...And 5 more matches
Window.onbeforeinstallprompt - Web APIs
The Window.onbeforeinstallprompt property is an event handler for processing a beforeinstallprompt, which is dispatched on devices when a user is about to be prompted to "install" a web application. Its associated event may be saved for later and used to prompt the user at a more suitable time. Syntax window.addEventListener("beforeinstallprompt", function(event) { ... }); window.onbeforeinstallprompt = function(event) { ...}; Example The following example uses the beforeinstallprompt event to make an install button operable, by using the event inside a click handler. ...
...d event may be saved for later and used to prompt the user at a more suitable time. Syntax window.addEventListener("beforeinstallprompt", function(event) { ... }); window.onbeforeinstallprompt = function(event) { ...}; Example The following example uses the beforeinstallprompt event to make an install button operable, by using the event inside a click handler. ...
...and used to prompt the user at a more suitable time. Syntax window.addEventListener("beforeinstallprompt", function(event) { ... }); window.onbeforeinstallprompt = function(event) { ...}; Example The following example uses the beforeinstallprompt event to make an install button operable, by using the event inside a click handler. ...
...And 5 more matches
How to make PWAs installable - Progressive web apps (PWAs)
This article explains how to achieve this using the web app's manifest. ...
...This article explains how to achieve this using the web app's manifest. ...
...kmark or typing the URL. Your web app can sit next to native applications as first class citizens. This makes the web app easier to access; additionally, you can specify that the app be launched in fullscreen or standalone mode, thus removing the default browser user interface that would otherwise be present, creating an even more seamless and native-like feel. ...
...And 5 more matches
XPInstall - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
...e, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Cross-Platform Install (XPInstall) is a technology used by Mozilla Application Suite, Mozilla Firefox, Mozilla Thunderbird and other XUL-based applications for installing extensions. ...
...df-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Cross-Platform Install (XPInstall) is a technology used by Mozilla Application Suite, Mozilla Firefox, Mozilla Thunderbird and other XUL-based applications for installing extensions. An XPI (pronounced "zippy" and derived from XPInstall) installer module is a ZIP file that contains an install script or manifest (entitled install.js or install.rdf) at the root of the file. ...
...And 4 more matches
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
If you want to edit scripts, you should get the QuickStart Pack (which includes ISTool, the script editor. However, if you don't get the QuickStart Pack, you can later get ISTool from Inno Setup Third-Party Files. Step 2: Creating the application To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. ...
...If you want to edit scripts, you should get the QuickStart Pack (which includes ISTool, the script editor. However, if you don't get the QuickStart Pack, you can later get ISTool from Inno Setup Third-Party Files. Step 2: Creating the application To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. ...
... Step 2: Creating the application To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. My App's example follows. myapp/ application.ini chrome/ default/ myapp.exe (copy xulrunner-stub.exe and rename) xulrunner/ Please test your application before deploying it. If your application does not run, neither will the installed version. Step 3: Creating the Inno Setup script Create an Inno Setup Script (.iss file). The Inno Setup Script Wizard can't set chrome directory's deployment point, so you have to edit the iss file yourself. Also you had better set the AppName and AppPublisher properties to the same values specified in your XULRunner application's application.ini file. My App's .iss file sample as follows: ...
...And 4 more matches
Installing basic software - Learn web development
What tools do the professionals use? A computer. Maybe that sounds obvious to some people, but some of you are reading this article on your phone or a library computer. For serious web development, it's better to invest in a desktop or laptop computer running Windows, macOS or Linux. A text editor, to write code in. This could be a text editor (e.g. Visual Studio Code, Notepad++, Sublime Text, Atom, GNU Emacs, or VIM), or a hybrid editor (e.g. Dreamweaver or WebStorm). ...
...er, offering a complete system with some custom syntaxes for you to write a web app on top of. More tools besides! What tools do I actually need, right now? That looks like a scary list, but fortunately, you can get started in web development without knowing anything about most of these. In this article, we'll just set you up with a bare minimum -- a text editor and some modern web browsers. Installing a text editor You probably already have a basic text editor on your computer. By default Windows includes Notepad and macOS comes with TextEdit. Linux distros vary; Ubuntu comes with gedit by default. For web development, you can probably do better than Notepad or TextEdit. We recommend starting with Visual Studio Code, which is a free editor, that offers live previews and code hints. Insta...
...ve a basic text editor on your computer. By default Windows includes Notepad and macOS comes with TextEdit. Linux distros vary; Ubuntu comes with gedit by default. For web development, you can probably do better than Notepad or TextEdit. We recommend starting with Visual Studio Code, which is a free editor, that offers live previews and code hints. ...
...And 4 more matches
Installing Pork
These instructions are to install Pork on a Linux system. Prerequisites Flex >2.5.4 (flex-old on ubuntu) Bison GCC Pork uses GCC to generate .i/.ii files (preprocessed C/C++) for Elsa to parse. The recommended version of GCC is GCC 4.2. Elsa (the C++ parser in Pork) has a hard time with some of the new features used in later GCC C++ headers. Our recent work has gotten Mozilla to compile with GCC 4.2. GCC 4.3 should also work fairly well, but there may be 5 or so files that Elsa can't parse. To make Pork easy to use, you will want to install MCPP that integrates into GCC. You will probably want a separate GCC for this so you don't have to modify your standard system GCC. You can install GCC in the normal way in a special directory. Build and Install MCPP MCPP generates macro e...
...ant to install MCPP that integrates into GCC. You will probably want a separate GCC for this so you don't have to modify your standard system GCC. You can install GCC in the normal way in a special directory. Build and Install MCPP MCPP generates macro expansion comments that allow Pork's Elsa to undo macros, which is necessary in order to get exact position information. To tell MCPP which gcc installation to integrate itself with, place the selected GCC bin dir as the first element of your path: PATH=/bindir/of/my/gcc:$PATH If you want to use a GCC that has binaries named something other than "gcc" and "g++", or you use "ccache" for you main gcc installation and want mcpp to override a separate installation, you need to pass the options "CC=gccXXX CXX=g++XXX" to "./configure". But don't giv...
...Make sure that (1) your "$PATH" is correct; (2) you passed the correct "CC=..." and "CXX=..." to "./configure". ...
...And 4 more matches
ServiceWorkerGlobalScope: install event - Web APIs
The install event of the ServiceWorkerGlobalScope interface is fired when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker. ...
... The install event of the ServiceWorkerGlobalScope interface is fired when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker. ...
... The install event of the ServiceWorkerGlobalScope interface is fired when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker. ...
...And 4 more matches
XPInstall API reference - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
... Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
... deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
...And 3 more matches
Installer Script - Archive of obsolete content
ble = parseInt(spaceAvailable / 1024); 9. // do the verification 10. if(spaceAvailable < spaceRequired) 11. { 12. logComment("Insufficient disk space: " + dirPath); 13. logComment(" required : " + spaceRequired + " K"); 14. logComment(" available: " + spaceAvailable + " K"); 15. return(false); 16. } 17. return(true); 18. } 19. var srDest = 17311; 20. var err = initInstall("Netscape Seamonkey", "Browser", "6.0.0.2000110807"); 21. logComment("initInstall: " + err); 22. var communicatorFolder = getFolder("Program"); 23. logComment("communicatorFolder: " + communicatorFolder); 24. if (verifyDiskSpace(communicatorFolder, srDest)) 25. { 26. err = addDirectory("Program", 27. "6.0.0.2000110807", 28. "bin", /...
..."classic.jar"),"skin/classic/global/"); 56. registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/messenger/"); 57. registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/navigator/"); 58. ...
... 56. registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/messenger/"); 57. registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/navigator/"); 58. ...
...And 3 more matches
The First Install Problem - Archive of obsolete content
If this happens, Gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated MIME type is encountered on the Web. ...
...If this happens, Gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated MIME type is encountered on the Web. ...
...ive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave DLLs (and XPT files, if applicable) in a location that Gecko can discover at runtime. This document presents a consistent way to do that. Proposed Solution On Mac OS X, the System's Plugins Folder will probably suffice as an install location in which browsers installed later can find their plugins. On Linux, a per-profile installation of plugins seems unavoidable. This document presents Windows solutions for plugin vendors. The solution suggests that plugin vendors ought to leave DLLs on a Windows desktop whether or not a Netscape Gecko browser is detected, and then write keys in the Windows registry giving future Netscape G...
...And 3 more matches
InstallTrigger - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The InstallTrigger interface is an interesting outlier in the Apps API; it's included in this API but are inherited from the old Mozilla XPInstall technology for installing add-ons. It is used for triggering the download and installation of an add-on (or anything packaged in an .xpi file) from a Web page, using JavaScript code to kick off the install process. Note: This article needs to be updated somewhat. Overview For very simple insta...
...s API but are inherited from the old Mozilla XPInstall technology for installing add-ons. It is used for triggering the download and installation of an add-on (or anything packaged in an .xpi file) from a Web page, using JavaScript code to kick off the install process. Note: This article needs to be updated somewhat. Overview For very simple installations, the install methods on the InstallTrigger object may be all that's needed in the installation script. For more complex installations, you may need to use the Install and/or File installation objects. ...
...ck off the install process. Note: This article needs to be updated somewhat. Overview For very simple installations, the install methods on the InstallTrigger object may be all that's needed in the installation script. For more complex installations, you may need to use the Install and/or File installation objects. In either case, you must trigger the installation process by creating a web page script in which InstallTrigger methods download the specified XPI file and "trigger" the execution of the install.js script at the top level of that XPI. The principal method on the InstallTrigger object is install, which downloads and installs one or more software packages archived in the XPI file format. ...
...And 3 more matches
Installing Dehydra - Archive of obsolete content
(Alternately, build from source) A modern Linux distribution. Dehydra is not supported on Mac OS X. Building SpiderMonkey It is recommended that you use SpiderMonkey revision AURORA_BASE_20110705 when building Dehydra. ...
... cd mozilla-central hg update AURORA_BASE_20110705 cd js/src autoconf-2.13 mkdir $HOME/obj-js cd $HOME/obj-js $HOME/mozilla-central/js/src/configure --enable-optimize --disable-debug make It has to be checked whether later/newer branches (like AURORA_BASE_20120131) are working, too. Please also note that autoconf v2.13 is really needed: it does not work with e.g. v2.68. There is no need for some installation after make. You can skip the next section "Building GCC 4.5" if you are using gcc 4.6 or above. Building GCC 4.5 For Treehydra's process_tree_decl to work, when compiling with g++, you must use a patched GCC 4.5 before building Dehydra. cd $HOME # obtain GCC 4.5.3 (see http://gcc.gnu.org/mirrors.html for alternate mirrors) wget http://www.netgull.com/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 ...
...om/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 tar -jxvf gcc-4.5.3.tar.bz2 # apply PLUGIN_FINISH_DECL patch wget https://bug559964.bugzilla.mozilla.o....cgi?id=457606 -O finish_decl.diff cd gcc-4.5.3 patch -p0 < ../finish_decl.diff # build GCC cd .. mkdir gcc-objdir mkdir gcc-dist cd gcc-objdir ../gcc-4.5.3/configure --disable-bootstrap --enable-languages=c,c++ --prefix=$PWD/../gcc-dist make make install Building Dehydra and Treehydra Building Dehydra requires SpiderMonkey development headers from the previous step. CXX should point to your copy of GCC 4.5. It is recommended to get the latest Dehydra sources by checking out from Mercurial. (Obsolete Dehydra releases can be found on the Mozilla ftp site.) hg clone http://hg.mozilla.org/rewriting-and-analysis/dehydra/ cd dehydra export CXX=/usr/bi...
...And 2 more matches
ServiceWorkerRegistration.installing - Web APIs
Working Draft Initial definition. ...
... Working Draft Initial definition. ...
... Working Draft Initial definition. ...
...And 2 more matches
Install.addDirectory - Archive of obsolete content
Install.addDirectory The Install object's addDirectory method queues an entire directory for installation once performInstall is called. ...
... Install.addDirectory The Install object's addDirectory method queues an entire directory for installation once performInstall is called. ...
... Install.addDirectory The Install object's addDirectory method queues an entire directory for installation once performInstall is called. ...
...l.addDirectory The Install object's addDirectory method queues an entire directory for installation once performInstall is called. ...
Install.addFile - Archive of obsolete content
Install.addFile The Install object's addFile method is the standard way to queue files for installation. ...
... Install.addFile The Install object's addFile method is the standard way to queue files for installation. ...
... Install.addFile The Install object's addFile method is the standard way to queue files for installation. ...
... Install.addFile The Install object's addFile method is the standard way to queue files for installation. ...
amIInstallTrigger
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean enabled(); boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback); boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0 boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0 boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 ...
...lean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0 boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 LOCALE 2 CONTENT 4 PACKAGE 7 Methods enabled() Tests if installation is enabled. boolean enabled(); Parameters None. Return value install() Starts a new installation of a set of add-ons. boolean install( in nsIVariant aArgs, in amIInstallCallback aCallback Optional ); Parameters aArgs The add-ons to install. This should be a JS object, each property is the name of an add-on to be installed. The value of the property should either be a stri...
...back Optional ); Parameters aArgs The add-ons to install. This should be a JS object, each property is the name of an add-on to be installed. The value of the property should either be a string URL, or an object with the following properties: URL for the add-on's URL IconURL for an icon for the add-on Hash for a hash of the add-on. aCallback Optional A callback to call as each installation succeeds or fails. Return value true if the installations were successfully started. installChrome Starts installing a new add-on. This method is deprecated, please use install() in the future. boolean installChrome( in PRUint32 aType, in AString aUrl, in AString aSkin ); Parameters aType Unused, retained for backwards compatibility. aUrl The URL of the add-on. aSkin Un...
...successfully started. installChrome Starts installing a new add-on. This method is deprecated, please use install() in the future. boolean installChrome( in PRUint32 aType, in AString aUrl, in AString aSkin ); Parameters aType Unused, retained for backwards compatibility. aUrl The URL of the add-on. aSkin Unused, retained for backwards compatibility. Return value true if the installation was successfully started. startSoftwareUpdate Starts installing a new add-on. boolean startSoftwareUpdate( in AString aUrl, in PRInt32 aFlags Optional ); Parameters aUrl The URL of the add-on. aFlags Optional Unused, retained for backwards compatibility. Return value true if the installation was successfully started. updateEnabled Tests if installation is enabled. boolea...
Building a Thunderbird extension 3: install manifest
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. The install.rdf file is an XML file that provides general information about the extension. ...
... Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. The install.rdf file is an XML file that provides general information about the extension. ...
...tall.rdf file is an XML file that provides general information about the extension. ...
...ndicates the most recent version of Thunderbird for which the extension is intended to work. This cannot be higher than the currently available version. "5.0.*" indicates that the extension works with Thunderbird 5.0 and any subsequent 5.0.x releases. See Valid Application Versions for a list of the supported version numbers and formats. There are more optional elements that can be specified in install.rdf. These are described on the Install Manifests page. Note that elements can be specified in any order, as long as they are children of the <Description> node. << Previous Next >> ...
Structure of an installable bundle - Archive of obsolete content
XULRunner applications, extensions, and themes all share a common directory structure, and in some cases the same bundle can be used as a standalone XULRunner application as well as an installable application extension. Basic structure of a bundle A bundle may include any of the following files: Path from the root of the bundle Description Version information /install.rdf Extension/Theme Install Manifest /application.ini Application Launch Manifest /bootstrap.js The bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf). Note that other files and directories (e.g. chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a su...
...chrome.manifest platform/WINNT/chrome/mytheme-win.jar The app/extension loader processes the base directory first, followed by the applicable platform directories (first /{OS_TARGET}/, then /{OS_TARGET}_{TARGET_XPCOM_ABI}/). When default preferences are defined in several directories, the ones loaded later overwrite the earlier ones. ...
... The app/extension loader processes the base directory first, followed by the applicable platform directories (first /{OS_TARGET}/, then /{OS_TARGET}_{TARGET_XPCOM_ABI}/). When default preferences are defined in several directories, the ones loaded later overwrite the earlier ones. ...
Making a Mozilla installation modifiable - Archive of obsolete content
e archive afterwards. Instead, you only have to extract them once and can then make as many modifications as you like. To make Mozilla modifiable, we will first extract the UI files from the archives using an unzip utility, then edit Mozilla's registry of UI files to use the extracted files instead of the original JAR archives. The archives are stored within the chrome subdirectory of the Mozilla installation directory. Use your unzip utility to extract all files in that directory with a .jar extension. Make sure you extract them into the same (chrome) directory in which they are located. On Unix-like operating systems with bash-like shells, you can run the following command within that directory to accomplish this task: for file in *.jar; do unzip $file; done On operating systems with DOS-like ...
...y. Extract only the one appropriate for your platform. After extracting the files we will modify the Mozilla chrome registry to use the extracted files instead of the original JAR archives. The chrome registry is a file that lists each major Mozilla component and where in the chrome directory its UI files are located. It is located in the chrome directory itself and is called either chrome.rdf or installed-chrome.txt (or both). The registry contains a bunch of complicated configuration statements in which you will find a number of URLs of the form jar:resource:/chrome/SOMETHING.jar!/SOMETHING-ELSE... which point to directories within the JAR archives. Change them so they point to the extracted files by removing the leading jar: and the part in the middle that says SOMETHING.jar!. If you have Perl...
...umber of URLs of the form jar:resource:/chrome/SOMETHING.jar!/SOMETHING-ELSE... which point to directories within the JAR archives. Change them so they point to the extracted files by removing the leading jar: and the part in the middle that says SOMETHING.jar!. If you have Perl on your system, you can do this with the following command: perl -pi.orig -e 's/(jar:)|(\/[^.\/]+\.jar!)//g' chrome.rdf installed-chrome.txt For example, to convert the URL jar:resource:/chrome/comm.jar!/content/necko/, change it to resource:/chrome/content/necko/. After you make these changes, try starting the copy of Mozilla you have modified. Make sure you start the modified copy and not the default installation on your machine, and shut down "quick launch" if you are on Windows and that feature is enabled. If Mozilla...
InstallTrigger.startSoftwareUpdate - Archive of obsolete content
Then do: ... ...
...Then do: ... ...
... InstallTrigger.startSoftwareUpdate This is a very simple example of the InstallTrigger object's principal method, startSoftwareUpdate, which takes a string representing the path to the XPI and installs that XPI on the local machine. function triggerURL(url) { InstallTrigger.startSoftwareUpdtate(url); } // get the url to the .xpi from either a form // or text field entry. Then do: ... onclick="triggerURL(this.form.url.value); ...
Windows Install - Archive of obsolete content
Windows Install Example This example shows the installation of a XPI in which user profile information is contained. Note the disk space verification, the editing of the Windows registry, the writing to the installation log, and the error checking before either performInstall or cancelInstall is called. // this function verifies disk space in kilobytes function verifyDiskSpace(dirPath, spaceRequired) { var spaceAvailable; // Get the available disk space on the given path spaceAvailable = fileGetDiskSpaceAvailable(dirPath); // Convert the available disk space into kilobytes spaceAvailable = parseInt(spaceAvailable / 1024); // do the verification if(spaceAvailable < spaceRequired) { logComment("Insufficient disk space: " + dirPath); logComment(" required : " + space...
...am, listLongFilePaths[i]); sShortFilePath = File.windowsGetShortName(fLongFilePath); if(sShortFilePath) { fRen8dot3Ini.writeString("rename", sShortFilePath, fLongFilePath); bIniCreated = true; } } if(bIniCreated) updateWinReg4Ren8dot3() ; } return(0); } // main var srDest; var err; var fProgram; srDest = 449; err = initInstall(prettyName, regName, "6.0.0.2000110801"); logComment("initInstall: " + err); fProgram = getFolder("Program"); logComment("fProgram: " + fProgram); if(verifyDiskSpace(fProgram, srDest)) { setPackageFolder(fProgram); err = addDirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fProgram, // Where to put this file // (Returned from GetFolder) "", ...
...{ setPackageFolder(fProgram); err = addDirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fProgram, // Where to put this file // (Returned from GetFolder) "", // subdir name to create relative to fProgram true); // Force Flag logComment("addDirectory() returned: " + err); // check return value if(err == SUCCESS) { err = performInstall(); logComment("performInstall() returned: " + err); } else cancelInstall(err); } else cancelInstall(INSUFFICIENT_DISK_SPACE); // end main ...
cancelInstall - Archive of obsolete content
Summary Aborts installation of the software; performs cleanup of temporary files. Method of Install object Syntax void cancelInstall() void cancelInstall( int errorCode ) Parameters None. Returns An integer error code. The optional argument is an error code that can be returned to the triggering page. For most purposes, it's recommended that one of the standard return codes be used. But a script can, in fact, return any valid integer. For a list of possible values, and any custom errorCode created by install writer, see Return Codes. Example Use the following code to abort or to finalize an installation, based on a variable you set earlier in your code: initInstall("Royal Airways TripPlanner","/RoyalAirways/ TripPlanner","1.0.0.0"); ... err = getLastError(); if (!err) perform...
...cript can, in fact, return any valid integer. For a list of possible values, and any custom errorCode created by install writer, see Return Codes. ...
...n any valid integer. For a list of possible values, and any custom errorCode created by install writer, see Return Codes. ...
Install Object - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Install Use the Install object to manage the downloading and installation of software with the XPI Installation Manager. Overview The Install object is used primarily in installation scripts. In all cases, the Install object is implicit--like the window object in regular web page scripts--and needn't be prefixed to the object methods. ...
...ll object to manage the downloading and installation of software with the XPI Installation Manager. Overview The Install object is used primarily in installation scripts. In all cases, the Install object is implicit--like the window object in regular web page scripts--and needn't be prefixed to the object methods. The following two lines, for example, are equivalent: f = getFolder("Program"); f = Install.getFolder("Program"); An installation script is composed of calls to the Install object, and generally takes the following form: Initialize the installation Call initInstall with the name of the installation and the necessary registry and version information. Add the files to the installation Add files to the installation by calling getFolder to get file objects an...
...object, and generally takes the following form: Initialize the installation Call initInstall with the name of the installation and the necessary registry and version information. Add the files to the installation Add files to the installation by calling getFolder to get file objects and passing those object refs to addFile as many times as necessary. Perform installation Check that the files have been added successfully (e.g., by checking the error Return Codes from many of the main installation methods, and go ahead with the install if everything is in order: performOrCancel(); function performOrCancel() { if (0 == getLastError()) performInstall(); else cancelInstall(); } For complete script examples, see Script Examples. ...
Building and installing NSS
This chapter describes how to build and install NSS. ...
... This chapter describes how to build and install NSS. ...
... This chapter describes how to build and install NSS. ...
amIWebInstallInfo
Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. ...
... toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable This interface is used by the default implementation of amIWebInstallListener to communicate with the running application and allow it to warn the user about blocked installs and start the installs running. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void install(); Attributes Attribute Type Description installs nsIVariant An array of AddonInstall objects. Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. originatingWindow nsIDOMWindow ...
...verview void install(); Attributes Attribute Type Description installs nsIVariant An array of AddonInstall objects. Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. originatingWindow nsIDOMWindow The window that started the installs. Read only. Note: Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), this was an nsIDOMWindowInternal. Methods install() Starts all installs. void install(); Parameters None. ...
ServiceWorkerGlobalScope.oninstall - Web APIs
The oninstall property of the ServiceWorkerGlobalScope interface is an event handler fired whenever an install event occurs (when the service worker installs). This happens before activation. Syntax ServiceWorkerGlobalScope.oninstall = function(event) { ... ...
... The oninstall property of the ServiceWorkerGlobalScope interface is an event handler fired whenever an install event occurs (when the service worker installs). This happens before activation. Syntax ServiceWorkerGlobalScope.oninstall = function(event) { ... ...
...ndler fired whenever an install event occurs (when the service worker installs). This happens before activation. Syntax ServiceWorkerGlobalScope.oninstall = function(event) { ... ...
Window.onappinstalled - Web APIs
The onappinstalled attribute of the Window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app. The event that is fired is a "simple event" that implements the Event interface. Syntax window.onappinstalled = function(event) { ... ...
... The onappinstalled attribute of the Window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app. The event that is fired is a "simple event" that implements the Event interface. Syntax window.onappinstalled = function(event) { ... ...
...e of the Window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app. The event that is fired is a "simple event" that implements the Event interface. Syntax window.onappinstalled = function(event) { ... ...
Trigger Scripts and Install Scripts - Archive of obsolete content
These install scripts are typically located at the top level of the XPI archives in which the installations are stored. A trigger script may trigger the downloading of a XPI, which in turn will use its own install.js script to manage the complete installation. ...
... Trigger Scripts and Install Scripts Trigger scripts are simple installations that can be initiated from event handlers and other JavaScript code on a web page. Triggers use the InstallTrigger object methods to compare software versions, install chrome, and perform simple software installations. Install scripts use the Install, File, InstallVersion and platform-specific installation object methods to initialize, queue, manage, and perform the installation of one or more software packages. These install scripts are typically located at the top level of the XPI archives in which the installations are stored. A trigger script may trigger the downloading of a XPI, which in turn will use its own install.js script to manage the complete installation. ...
InstallVersion Object - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. InstallVersion You use InstallVersion objects to contain version information for software. Overview This object and its methods are used both when triggering a download, to see whether a particular version needs to be installed, and when installing the software. ...
...rticular plugin developers should see how to package a plugin as an extension. InstallVersion You use InstallVersion objects to contain version information for software. Overview This object and its methods are used both when triggering a download, to see whether a particular version needs to be installed, and when installing the software. The init() method associates a particular version with an InstallVersion object, the toString() method converts versions in various formats to a string, and the compareTo() method compares these string and indicates the relationship between the two versions. Each of the version parameters is also available as a separate property of the InstallVersion object. ...
Installation guide
The build system of NSS originated from Netscape's build system, which predated the "configure; make; make test; make install" sequence that we're familiar with now. Our makefiles also have an "install" target, but it has a different meaning: our "install" means installing the headers, libraries, and programs in the appropriate directories under mozilla/dist. So right now you need to manually install the headers, libraries, and programs in the directories you want. If you install the libraries in a directory other than /usr/lib, you usually need to set the LD_LIBRARY_PATH environment variable. You can avoid that by installing the libraries in a directory that is $ORIGIN/../lib, where $ORIGIN is the directory where the programs are installed. This is done here: http://lxr.mozilla.org/secu...
...in a directory that is $ORIGIN/../lib, where $ORIGIN is the directory where the programs are installed. This is done here: http://lxr.mozilla.org/security/sour...platlibs.mk#53 53 ifeq ($(OS_ARCH), Linux) 54 ifeq ($(USE_64), 1) 55 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib' 56 else 57 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib' 58 endif 59 endif For example, if you install certutil in /foo/bar/nss/bin and the .so's in /foo/bar/nss/lib, then you only need to add /foo/bar/nss/bin to your PATH; you don't need to set LD_LIBRARY_PATH. The libraries you need to install are listed below. NSPR: libnspr4.so libplds4.so libplc4.so NSS: (Note the use of * for libfreebl -- some platforms have multiple ones) libfreebl*3.so libfreebl*3.chk libsoftokn3.so libsoftokn3.chk libns...
amIWebInstallPrompt
toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable Called when installation by websites is currently disabled. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Method overview void confirm(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindow. Methods confirm() Gets a confirmation that the user wants to start the installs. ...
...OMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindow. Methods confirm() Gets a confirmation that the user wants to start the installs. void confirm( in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, in PRUint32 aCount Optional ); Parameters aWindow The window that triggered the installs. aUri The URI of the site that triggered the installs. aInstalls The AddonInstalls that were requested. aCount Optional The number of AddonInstalls. ...
BeforeInstallPromptEvent.prompt() - Web APIs
Returns An empty Promise. ...
... The prompt() method of the BeforeInstallPromptEvent interface allows a developer to show the install prompt at a time of their own choosing. Syntax BeforeInstallPromptEvent.prompt() Parameters None. Returns An empty Promise. Example var isTooSoon = true; window.addEventListener("beforeinstallprompt", function(e) { if (isTooSoon) { e.preventDefault(); // Prevents prompt display // Prompt later instead: setTimeout(function() { isTooSoon = false; e.prompt(); // Throws if called more than once or default not prevented }, 10000); } // The event was re-dispatched in response to our request // ... }); ...
InstallEvent.activeWorker - Web APIs
This will return null if no active worker is already controlling the page. Syntax var myActiveWorker = event.activeWorker Value A ServiceWorker object. ...
... The activeWorker read-only property of the InstallEvent interface returns the ServiceWorker that is currently actively controlling the page. This will return null if no active worker is already controlling the page. Syntax var myActiveWorker = event.activeWorker Value A ServiceWorker object. Examples self.addEventListener('install', function(event) { var myActiveWorker = event.activeWorker; }); ...
installChrome - Web APIs
installChrome Installs new skin or locale packages in Netscape 6 and Mozilla. Method of InstallTrigger object Syntax int installChrome( TYPE, url, name ) Parameters The installChrome method has the following parameters: TYPE TYPE can be InstallTrigger.SKIN or InstallTrigger.LOCALE. url url is a string containing a full or relative URL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. ...
...ative URL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. Description installChrome is a special method for installing new chrome in Netscape 6 and Mozilla. The method performs a simplified installation of language packs or Netscape 6/Mozilla skins, and saves you the trouble of writing separate installation scripts in the XPI files or using the more sophisticated methods of the Install and File objects. ...
install.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "install.rdf": <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>author@oftheme.com</em:id> <em:version>2.0b1</em:version> <!-- SeaMonkey --> <em:targetApplication> <Description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minVersion>2.0b1pre</em:minVersion> <em:maxVersion>2.0b2pre</em:maxVersion> </Description> </em:targetApplication> <!-- Front End MetaData --> <em:name>My_Theme</em:name> <em:description>My first theme</em:description> <!-- Front End Integration Hooks (used by Them...
Installer - Archive of obsolete content
One interesting side effect is that after this change, you can select a link to a .webapp file in a Web Page and you get it run by Prism - in IE this runs anywhere, but this won't work in Firefox unless the webapp is being issued with an appropriate MIME type on the server: application/x-webapp works (see an example ). ...
performInstall - Archive of obsolete content
Summary Performs the actual installation of the software. Moves all components to their final locations, launches any pending executions, and registers the package and all of its subcomponents in the Client Version Registry. Method of Install Syntax int performInstall(); Parameters None. Returns An integer error code. For a list of possible values, see Return Codes. In some situations the method may return other errors. In a few cases you may get a registry error. Example Use the following code to abort or to finalize an installation, based on a variable you set earlier in your code: initInstall("Royal Airways TripPlanner", "/RoyalAirways/TripPlanner", "1.0.0.0"); ... err = getLastError(); if (!err) performInstall(); else cancelInstall(err); ...
install.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "install.rdf": <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>{Themes_UUID}</em:id> <em:version>Themes_Version</em:version> <!-- Target Application this extension can install into, with minimum and maximum supported versions. --> <em:targetApplication> <Description> <!-- Firefox's UUID --> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>Min_FF_Version</em:minVersion> <em:maxVersion>Max_FF_Version</em:maxVersion> </Description> </em:targetApplication> <!-- Front End MetaData --> <!-- My_Theme --> ...
PKCS11 module installation
PKCS #11 modules are external modules which add to Firefox support for smartcard readers, biometric security devices, and external certificate stores. This article covers the two methods for installing PKCS #11 modules into Firefox. Users can use the preferences dialog to install or remove PKCS #11 module. Extensions can programmatically manage PKCS #11 modules using the nsIPKCS11 programming interface. Note: The information in this article is specific to Firefox 3.5 and newer. Older versions of Firefox may support the window.pkcs11 property for installing PKCS #11 modules. Using the Firefox preferences to install PKCS #11 modules Save the PKCS #11 module to a permanent location on your local computer Open the Firefox preferences dialog. Choose "Advanced" > "Encryption" > "Security ...
Sample manual installation
After building NSS with "gmake nss_build_all", the resulting build can be found in the NSS source tree as follows: NSS header files: mozilla/dist/public/nss NSPR header files: mozilla/dist/<OBJ-DIR>/include NSPR/NSS shared libs: mozilla/dist/<OBJ-DIR>/lib NSS binary executables: mozilla/dist/<OBJ-DIR>/bin. where <OBJ-DIR> would vary according to the type of build and the platform. ...
amIInstallCallback
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable A callback function that web pages can implement to be notified when triggered installs complete. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void onInstallEnded(in AString aUrl, in PRInt32 aStatus); Methods onInstallEnded() Called when an install completes or fails. void onInstallEnded( in AString aUrl, in PRInt32 aStatus ); Parameters aUrl The url of the add-on being installed. aStatus 0 if the install was successful or negative if not. ...
Index - Archive of obsolete content
summary! 165 Open a Web Page Add-on SDK No summary! 166 Troubleshooting No summary! 167 Unit Testing Add-on SDK, JPM No summary! 168 Using XPCOM without chrome Bookmarks, Chrome, SDK, XPCOM No summary! 169 Using third-party modules (jpm) Addon-SDK, JPM First, while in the root of your add-on, install the package that contains the modules you want to use: 170 Bootstrapped extensions Add-ons, Extensions, Firefox 4, Gecko 2.0, Guide, Localization No summary! 171 Code snippets Add-ons, Code snippets, Extensions No summary! 172 Alerts and Notifications Code snippets non-modal notification and further interaction with users 173 ...
...th it. Mozilla provides a simple way of shipping default settings by allowing default preferences. 228 Deploying a Plugin as an Extension Add-ons, Plugins One of the new features available in Firefox 1.5 is the ability to place browser plugins in a Firefox extension. This feature is particularly useful for vendors who wish to deploy the plugin even if Firefox is not currently installed, or who want to use the automatic extension update mechanism to update their plugin to a newer version. 229 Developing add-ons Add-ons This page will help guide you to the information you need in order to create add-ons for Firefox, Thunderbird, or other software based on the Mozilla platform, as well as how to distribute your add-ons. 230 Displaying web content ...
...her mechanism) to download JavaScript or JSON (they are different) from a remote website. Once the content has been downloaded, the extension authors proceed to use eval() to decode the string content into JavaScript objects. This practice is dangerous and will not, in fact, pass an AMO review. So the extension will not be allowed to move out of the AMO sandbox. ...
...And 66 more matches
AddonManager
The majority of the methods are asynchronous meaning that results are delivered through callbacks passed to the method. The callbacks will be called just once but that may be before or after the method returns. One of the forces of the AddonManager is that it deals with any kind (type) of add-on in a generic manner. To do so many methods of the AddonManager take the add-on types as parameters. The existing add-on types are defined in XPIProvider.jsm and are, at this time, the following: extension, theme, locale, multipackage, dictionary and experiment. ...
... are, at this time, the following: extension, theme, locale, multipackage, dictionary and experiment. ...
...g: extension, theme, locale, multipackage, dictionary and experiment. ...
...And 38 more matches
Index
functions except, the *VerifyNow() functions, take a parameter called 'CERTVerifyLog'. If you supply the log parameter, NSS will continue chain validation after each error . The log tells you what the problem was with the chain and what certificate in the chain failed. 161 NSS Certificate Download Specification NSS This document describes the data formats used by NSS 3.x for installing certificates. This document is currently being revised and has not yet been reviewed for accuracy. 162 NSS Code Coverage NSS No summary! 163 NSS Config Options No summary! 164 NSS Developer Tutorial NSS, Tutorial No summary! 165 NSS FAQ NSS, NeedsUpdate NSS is set of libraries, APIs, utilities, and documentati...
... Add an extension to a CRL or a crl certificate entry: addext extension-name critical/non-critical [arg1[arg2 ...]] Where: extension-name: string value of a name of known extensions. critical/non-critical: is 1 when extension is critical and 0 otherwise. arg1, arg2: specific to extension type extension parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range. * Add certificate entries(s) to CRL: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter. date: revocation date of a cert. Date should be represented in GeneralizedTime f...
...it can be run from a script. Use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. -jar JAR-file Add a new PKCS #11 module to the database using the named JAR file. Use this command with the -installdir and -tempdir arguments. The JAR file uses the NSS PKCS #11 JAR format to identify all the files to be installed, the module's name, the mechanism flags, and the cipher flags, as well as any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation. This is cover...
...And 36 more matches
Index - Web APIs
Web › API › Index
ethod and requests typically do not require a response. Requests are guaranteed to be initiated before a page is unloaded and they are run to completion, without requiring a blocking request (for example XMLHttpRequest). 274 Using the Beacon API Guide, Web Performance The Beacon interface schedules an asynchronous and non-blocking request to a web server. ...
...t require a response. Requests are guaranteed to be initiated before a page is unloaded and they are run to completion, without requiring a blocking request (for example XMLHttpRequest). 274 Using the Beacon API Guide, Web Performance The Beacon interface schedules an asynchronous and non-blocking request to a web server. ...
... unloaded and they are run to completion, without requiring a blocking request (for example XMLHttpRequest). 274 Using the Beacon API Guide, Web Performance The Beacon interface schedules an asynchronous and non-blocking request to a web server. ...
...And 27 more matches
Introducing a complete toolchain - Learn web development
the software design phase. We will however be avoiding any superfluous tooling, with the aim of keeping complexity to a minimum. For example, we could have included a tool to minimize our SVG file sizes during build. However, this project has only 4 SVG images, which were manually minified using SVGO before adding them to the project. A couple of prerequisites Besides the tools we're going to install that contribute to our toolchain, we mentioned two web services in the above list of tools. Let's take this opportunity to make sure we are set up with them before we continue. You will need to create accounts with each of GitHub and Netlify if you wish to complete the tutorial. As mentioned previously, GitHub is a source code repository service that adds community features such as issue track...
..., if done well, needs doing only once and should be reusable in many future projects. You will probably want to review this part of the toolchain semi-regularly and consider if there's any upgrades or changes you should introduce, but this shouldn't be required too often. ...
...nd should be reusable in many future projects. You will probably want to review this part of the toolchain semi-regularly and consider if there's any upgrades or changes you should introduce, but this shouldn't be required too often. Your toolchain will depend on your own needs, but for this example of a (possible) complete toolchain, the tools that will be installed up front will be: Library installation tools -- for adding dependencies. Code revision control. Code tidying tools -- for tidying JavaScript, CSS, and HTML. Code linting tools -- for linting our code. Library installation tools We'll use npm to install our tools, which you first met in Chapter 2. You should have Node.js and npm installed already, but if not, refer back to that section. Note: Though it's not clear from the...
...And 23 more matches
Packaging WebLock
<< PreviousNext >> In this final part of the tutorial, we'll put all of the pieces of the web locking component - the library itself, the type library, the header file, and the user interface resources - into a package that can be installed on other systems. The first section, Component Installation Overview, describes the general installation process in Mozilla. The following sections describe the steps you can take to organize the WebLock component for distribution and installation. ...
... - into a package that can be installed on other systems. The first section, Component Installation Overview, describes the general installation process in Mozilla. The following sections describe the steps you can take to organize the WebLock component for distribution and installation. Note: the emphasis of this tutorial is on the component development itself, so this section on packaging and installing extensions to Gecko is necessarily brief. For more detailed information on packaging and installation of components into Gecko-based applications, see http://www.mozilla.org/projects/xpinstall. Component Installation Overview XPInstall is a set of JavaScript APIs for creating installation scripts. ...
...orial is on the component development itself, so this section on packaging and installing extensions to Gecko is necessarily brief. For more detailed information on packaging and installation of components into Gecko-based applications, see http://www.mozilla.org/projects/xpinstall. Component Installation Overview XPInstall is a set of JavaScript APIs for creating installation scripts. ...
...And 23 more matches
Package management basics - Learn web development
Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages. Objective: To understand what package managers and package repositories are, why they are needed, and the basics of how to use them. ...
...positories are, why they are needed, and the basics of how to use them. A dependency in your project A dependency is a third-party bit of software that was probably written by someone else and ideally solves a single problem for you. A web project can have any number of dependencies, ranging from none to many, and your dependencies might include sub-dependencies that you didn't explicitly install -- your dependencies may have their own dependencies. A simple example of a useful dependency that your project might need is some code to calculate relative dates as human-readable text. You could certainly code this yourself, but there's a strong chance that someone else has already solved this problem -- why waste time reinventing the wheel? Moreover, a reliable third-party dependency will li...
...ng to keep track of. It makes more sense to use a package manager such as npm, as this will guarantee that the code is added and removed cleanly, as well as a host of other advantages. What exactly is a package manager? We've met npm already, but stepping back from npm itself, a package manager is a system that will manage your project dependencies. The package manager will provide a method to install new dependencies (also referred to as "packages"), manage where packages are stored on your file system, and offer capabilities for you to publish your own packages. In theory you may not need a package manager and you could manually download and store your project dependencies, but a package manager will seamlessly handle installing and uninstalling packages. If you didn't use one, you'd have t...
...And 22 more matches
NSS Tools modutil
information about the contents of the secmod.db file. Use modulename to display detailed information about a particular module and its slots and tokens. -add modulename Add the named PKCS #11 module to the database. Use this option with the -libfile, -ciphers, and -mechanisms arguments. -jar JAR-file Add a new PKCS #11 module to the database using the named JAR file. Use this option with the -installdir and -tempdir arguments. The JAR file uses the Netscape Server PKCS #11 JAR format to identify all the files to be installed, the module's name, the mechanism flags, and the cipher flags. The JAR file should also contain any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation. See the section JAR Installation File for inf...
...rver PKCS #11 JAR format to identify all the files to be installed, the module's name, the mechanism flags, and the cipher flags. The JAR file should also contain any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation. See the section JAR Installation File for information on creating the special script needed to perform an installation through a server or with the Security Module Database Tool (that is, in environments without JavaScript support). For general installation instructions and to install a module in environments where JavaScript support is available (as in Netscape Communicator), see the document Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module. -delete modulename Delete the named...
...for the listed mechanisms when those mechanisms are enabled. If more than one module claims to be a particular mechanism's default provider, that mechanism's default provider is undefined. The following mechanisms are currently available: RSA, DSA, RC2, RC4, RC5, DES, DH, FORTEZZA, SHA1, MD5, MD2, RANDOM (for random number generation), and FRIENDLY (meaning certificates are publicly readable). -installdir root-installation-directory Specify the root installation directory relative to which files will be installed by the -jar JAR-file option. This directory should be one below which it is appropriate to store dynamic library files (for example, a server's root directory or the Netscape Communicator root directory). -tempdir temporary-directory The temporary directory is the location where temp...
...And 20 more matches
NSS tools : modutil
Mozilla › Projects › NSS › tools › modutil
it can be run from a script. Use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. -jar JAR-file Add a new PKCS #11 module to the database using the named JAR file. Use this command with the -installdir and -tempdir arguments. The JAR file uses the NSS PKCS #11 JAR format to identify all the files to be installed, the module's name, the mechanism flags, and the cipher flags, as well as any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation. This is cover...
... -list [modulename] Display basic information about the contents of the secmod.db file. ...
... -list [modulename] Display basic information about the contents of the secmod.db file. Specifying a modulename displays detailed information about a particular module and its slots and tokens. -rawadd Add the module spec string to the secmod.db database. ...
...And 19 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
o set for developing extensions To make these changes, start your development profile, type about:config into Firefox's location bar and open the preferences window; find the preferences listed in Table 1 and double-click on them to set them accordingly. Some of these preferences do not exist--to create them, right-click, select "New>Boolean", and type in the name and set the value accordingly. ...
...m accordingly. Some of these preferences do not exist--to create them, right-click, select "New>Boolean", and type in the name and set the value accordingly. Install the DOM Inspector The DOM Inspector is an extension that lets you examine HTML and XUL DOM tree structures, JavaScript objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. Optional - Install Firebug and Chromebug Chromebug is used by the Firebug development team to develop Firebug. You can use it to help debug Firefox extensions as well as to inspect and learn how the Firefox UI (Chrome) is constructed. You can learn more about Chromebug and download it at http://getfirebug.com/wiki/index.php/Chromebug_...
...kage overlay on top of browser.xul to add a button or menu item to the Firefox browser window. The chrome manifest plays two important roles: it registers the contents of the chrome packages, and invokes the cross-package overlay. Developing a Simple Extension: Hello World In this section, we will write an extremely simple "hello world" extension that only displays the time.3 Phase 1: test install Our first step will be to perform a test installation consisting of the minimum code needed to add a new menu item to the Tools menu (Figure 3). FIXME: Figure 3: Menu after Phase 1 complete Source file structure First set up the work folders you'll use to organize your extension's source files. The folder can be wherever you want, but for the purposes of this guide, we'll assume it's at C:\ex...
...And 18 more matches
Bootstrapped extensions - Archive of obsolete content
Traditional extensions include overlays, wherein the application can load up XUL from the extension's package and automatically apply it on top its own UI. While this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart. Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) introduces bootstrapped extensions. These are special extensions that, instead of using overlays to apply their user interface to the application, programmatically insert themselves into the application. This is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down. All t...
...n's startup() function is called, it must manually inject its user interface and other behavior into the application. Similarly, when its shutdown() function is called, it must remove anything that it has added to the application, as well as all references to any of its objects. There are several scenarios in which the startup() function may be called; for example: When the extension is first installed, assuming that it's both compatible with the application and is enabled. When the extension becomes enabled using the add-ons manager window. When the application is started up, if the extension is enabled and compatible with the application. Some examples of when the shutdown() function may be called: When the extension is uninstalled, if it's currently enabled. When the extension beco...
...ce existing chrome:// URIs with your content (using the override instruction). Not all chrome.manifest instructions are supported in bootstrapped add-ons, for example you still cannot register XUL Overlays from a bootstrapped add-on. See the chrome.manifest documentation for details. In Firefox 10 and later the chrome.manifest file located in the root of the add-on's XPI (i.e. a sibling of the install.rdf) is loaded automatically. In Firefox 8 and 9 you had to load/unload the manifest manually using nsIComponentManager.addBootstrappedManifestLocation() and nsIComponentManager.removeBootstrappedManifestLocation(). This feature was unavailable in Firefox versions before 8. Adding user interface manually If you decide to go ahead and try to develop a bootstrapped extension that modifies the app...
...And 17 more matches
Introduction to automated testing - Learn web development
talking about in this module: Use a task runner such as Grunt or Gulp, or npm scripts to run tests and clean up code during your build process. This is a great way to perform tasks like linting and minifying code, adding in CSS prefixes or transpiling nascent JavaScript features for maximum cross-browser reach, and so on. Use a browser automation system like Selenium to run specific tests on installed browsers and return results, alerting you to failures in browsers as they crop up. Commercial cross-browser testing apps like LambdaTest, Sauce Labs, BrowserStack, and TestingBot are based on Selenium, but allow you to access their set up remotely using a simple interface, saving you the hassle of setting up your own testing system. We will look at how to set up your own Selenium-based testin...
...ing code by using a task runner to run everything you need to run automatically at a certain point in your build process. For example, this could be every time you save a file, or at some other point. Inside this section we'll look at how to automate task running with Node and Gulp, a beginner-friendly option. ...
...thing you need to run automatically at a certain point in your build process. For example, this could be every time you save a file, or at some other point. Inside this section we'll look at how to automate task running with Node and Gulp, a beginner-friendly option. Setting up Node and npm Most tools these days are based on Node.js, so you'll need to install it from nodejs.org: Download the installer for your system from the above site. ...
...And 17 more matches
jpm - Archive of obsolete content
run, and package add-ons. This is the reference page for jpm. See also jpm tutorial for getting started. jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -V, --version - print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory Installation jpm is distributed with the node package manager npm. Installing npm There are two ways to get npm. Download and install Node.js from nodejs.org. Node.js includes npm. Or, if you have a package manager like APT, install npm via that. For example, in an Ubuntu or Debian terminal window, enter sudo apt-get install nodejs nodejs-legacy npm. To test your installation, run: /usr/bin/en...
...m. Download and install Node.js from nodejs.org. Node.js includes npm. Or, if you have a package manager like APT, install npm via that. For example, in an Ubuntu or Debian terminal window, enter sudo apt-get install nodejs nodejs-legacy npm. To test your installation, run: /usr/bin/env node -v If you get an error message saying /usr/bin/env: node: No such file or directory and you have installed nodejs through a package manager, nodejs may have been installed under a different executable name. To ensure compatibility with jpm, however, it must be present in your PATH under the name node. ...
...stallation, run: /usr/bin/env node -v If you get an error message saying /usr/bin/env: node: No such file or directory and you have installed nodejs through a package manager, nodejs may have been installed under a different executable name. To ensure compatibility with jpm, however, it must be present in your PATH under the name node. ...
...And 16 more matches
Command line crash course - Learn web development
provides an introduction to the terminal, the essential commands you'll need to enter into it, how to chain commands together, and how to add your own command line interface (CLI) tools. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages. Objective: To understand what the terminal/command line is, what basic commands you should learn, and how to install new command line tools. Welcome to the terminal The terminal is a text interface for executing text-based programs. If you're running any tooling for web development there's a near-guaranteed chance that you'll have to pop open the command line and run some commands to use your chosen tools (you'll often see such tools referred to as CLI tools -- command line interface tools). A large nu...
...terface for executing text-based programs. If you're running any tooling for web development there's a near-guaranteed chance that you'll have to pop open the command line and run some commands to use your chosen tools (you'll often see such tools referred to as CLI tools -- command line interface tools). A large number of tools can be used by typing commands into the command line; many come pre-installed on your system, and a huge number of others are installable from package registries. Package registries are like app stores, but (mostly) for command line based tools and software. We'll see how to install some tools later on in this chapter, and we'll learn more about package registries in the next chapter. One of the biggest criticisms of the command line is that it lacks hugely in user expe...
...y as on other operating systems. But things are getting better. Windows has traditionally had its own terminal-like program called cmd ("the command prompt") for a long time, but this definitely doesn't have parity with Unix commands, and is equivalent to the old-style Windows DOS prompt. ...
...And 16 more matches
NSS tools : modutil
t NSS module. -force Disable modutil's interactive prompts so it can be run from a script. Use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. -jar JAR-file Add a new PKCS #11 module to the database using the named JAR file. ...
...after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. -jar JAR-file Add a new PKCS #11 module to the database using the named JAR file. Use this command with the -installdir and -tempdir arguments. The JAR file uses the NSS PKCS #11 JAR format to identify all the files to be installed, the module's name, the mechanism flags, and the cipher flags, as well as any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation. This is covered in the JAR installation file section in the man page, which details the special script needed to perform an installation through a server or with modutil. -list [modulen...
...nd secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: is not used, then the tool assumes that the given databases are in the old format. --dbprefix prefix Specify the prefix used on the database files, such as my_ for my_cert8.db. This option is provided as a special case. Changing the names of the certificate and key databases is not recommended. -installdir root-installation-directory Specify the root installation directory relative to which files will be installed by the -jar option. This directory should be one below which it is appropriate to store dynamic library files, such as a server's root directory. -libfile library-file Specify a path to a library file containing the implementation of the PKCS #11 interface module that is being a...
...And 16 more matches
Using Service Workers - Web APIs
The premise of service workers One overriding problem that web users have suffered with for years is loss of connectivity. The best web app in the world will provide a terrible user experience if you can't download it. ...
...fore then getting more data from the network (commonly known as Offline First). This is already available with native apps, which is one of the main reasons native apps are often chosen over web apps. Setting up to play with service workers Many service workers features are now enabled by default in newer versions of supporting browsers. If however you find that demo code is not working in your installed versions, you might need to enable a pref: Firefox Nightly: Go to about:config and set dom.serviceWorkers.enabled to true; restart browser. Chrome Canary: Go to chrome://flags and turn on experimental-web-platform-features; restart browser (note that some features are now enabled by default in Chrome.) Opera: Go to opera://flags and enable Support for ServiceWorker; restart browser. Micro...
...he following steps are generally observed for basic set up: The service worker URL is fetched and registered via serviceWorkerContainer.register(). If successful, the service worker is executed in a ServiceWorkerGlobalScope; this is basically a special kind of worker context, running off the main script execution thread, with no DOM access. The service worker is now ready to process events. Installation of the worker is attempted when service worker-controlled pages are accessed subsequently. An Install event is always the first one sent to a service worker (this can be used to start the process of populating an IndexedDB, and caching site assets). This is really the same kind of procedure as installing a native or Firefox OS app -- making everything available for use offline. When the oni...
...And 16 more matches
Index
Mozilla › Tech › XPCOM › Index
ndings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. 2 Accessing the Windows Registry Using XPCOM Add-ons, Code snippets, Extensions, NeedsClassification, Windows Registry When implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products. 3 Aggregating the In-Memory Datasource RDF No summary! 4 Binary compatibility XPCOM If Mozilla decides to upgrade to a compiler that does not have the same ABI as the current ver...
...at this method does in JS_SetGCZeal. This method calls through to that thusly: 47 Components.utils.unload Modules Components.utils.unload was introduced in Firefox 7 and is used to unload JavaScript code modules. This can be particularly handy with restartless (boostrapped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed. 48 Components.utils.unwaiveXrays Undo a previous call to Components.utils.waiveXrays(), restoring Xray vision for the caller. 49 Components.utils.waiveXrays Waives Xray vision for an object, giving the caller a transparent wrapper to the underlying object. 50 JavaXPCOM Embedding, Java, JavaXPCOM, Mozilla, XPCOM, XPCOM:Language Bindings...
...ents for Gecko-based applications. 101 An Overview of XPCOM XPCOM This is a book about XPCOM. The book is presented as a tutorial about creating XPCOM components, but it covers all major aspects, concepts, and terminology of the XPCOM component model along the way. 102 Building the WebLock UI XPCOM Up until now, we've been building a component that can be installed in any Gecko application. The XPCOM interfaces and tools you've used have been general, cross-platform, and available in the Gecko Runtime Environment or in any Gecko-based application after Mozilla 1.2 (when the GRE began to be used). 103 Component Internals Obsolete, XPCOM Let's start by examining how XPCOM components are written in C++. The most common type of component ...
...And 15 more matches
Building a Theme - Archive of obsolete content
der tutorial, see Creating a Skin for Firefox. Note: Firefox for Mac OS X has changed some directories so the guide may be obsolete. Setting up the Development Environment Themes and extensions are packaged and distributed in ZIP files or Bundles, with the XPI (pronounced "zippy") file extension. ...
... communicator/ global/ mozapps/ We'll want to create a file structure similar to the one above for our tutorial, so let's begin by creating a folder for your theme somewhere on your hard disk (e.g. C:\themes\my_theme\ or ~/themes/my_theme/). Inside your new theme folder, create two new empty text files, one called chrome.manifest and the other called install.rdf. The file preview.png is shown as a preview of the theme in the themes panel of the add-ons window. The file icon.png is used as an icon in the same panel. We'll leave both of them out for now, unless you have something picked out that you want to use. The remaining directories will be extracted from the default theme. First, you'll want to create a directory somewhere. Copy your Firefox ins...
...tion mentioned above. The files we will be needing from the browser/omni.ja archive are located under chrome/browser/skin/classic. Copy the contents of the following directories to their respective folders. This gives us a base set of styles to work with. browser to chrome/browser/ communicator to chrome/communicator/ You should end up with this directory structure: <ext path>/ /install.rdf /chrome.manifest /chrome/ browser/ communicator/ global/ mozapps/ After this, it would be a good idea to read the article Setting up extension development environment and follow the directions there. It's especially important to install the DOM Inspector, which we'll be using in later steps. Create th...
...And 14 more matches
Signing an XPI - Archive of obsolete content
alphabetically, and Mozilla requires the first entry to be META-INF/zigbert.rsa. C:\Projects\CodeSigning\> md signed C:\Projects\CodeSigning\> copy C:\Projects\fsb\fsb.xpi signed 1 file(s) copied. C:\Projects\CodeSigning\> cd signed C:\Projects\CodeSigning\signed> unzip fsb.xpi Archive: fsb.xpi creating: chrome/ inflating: chrome.manifest inflating: chrome/fsb.jar inflating: install.rdf C:\Projects\CodeSigning\signed> del fsb.xpi C:\Projects\CodeSigning\signed> cd .. Sign XPI C:\Projects\CodeSigning\> signtool -d . -k myTestCert -p "password" signed/ using certificate directory: . Generating signed//META-INF/manifest.mf file.. --> chrome/fsb.jar --> chrome.manifest --> install.rdf Generating zigbert.sf file.. tree "signed/" signed successfully Re-package XPI Change t...
... Don't forge...
... Don't forget to delete the certificate from Mozilla Firefox once you've finished testing ...
...And 13 more matches
Index of archived content - Archive of obsolete content
n between HTML and your extension Creating custom Firefox extensions with the Mozilla build system Custom about: URLs Default Preferences Deploying a Plugin as an Extension Developing add-ons Displaying web content in an extension without security issues Downloading JSON and JavaScript in extensions Enhanced Extension Installation Extension Etiquette Extension Library Extension Packaging Extension Samples Extension Theming Guidelines Extension Versioning, Update and Compatibility Extensions support in SeaMonkey 2 Firefox addons developer guide Hiding browser chrome Hotfix Extension How to convert an overlay ex...
...brary Extension Packaging Extension Samples Extension Theming Guidelines Extension Versioning, Update and Compatibility Extensions support in SeaMonkey 2 Firefox addons developer guide Hiding browser chrome Hotfix Extension How to convert an overlay extension to restartless Inline options Install Manifests Installing Extensions and Themes From Web Pages Interaction between privileged and non-privileged pages Jetpack Processes Legacy Add-ons Legacy extensions for Firefox for Android API Accounts.jsm BrowserApp ...
...tions License and authors XUL School Tutorial Adding Events and Commands Adding Toolbars and Toolbar Buttons Adding menus and submenus Adding sidebars Adding windows and dialogs Appendix A: Add-on Performance Appendix B: Install and Uninstall Scripts Appendix C: Avoiding using eval in Add-ons Appendix D: Loading Scripts Appendix E: DOM Building and Insertion (HTML & XUL) Appendix F: Monitoring DOM changes Connecting to Remote Content Custom XUL Elements with XBL Getting Started with Firefox Extensions Handling ...
...And 13 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
ot chrome://, everyone who learned of this new feature learned that you had to load JSM from resource:// URIs and just stuck with that forever. It does still work if you don't have restartlessness to worry about, though the protocol (or scheme, or whatever term you prefer) really should be avoided at this point. The resource:// protocol actually bleeds into content which allows webpages to detect installed add-ons using the protocol, which is not particularly fantastic (just the static file contents, not any loaded script/data). Step 2a: Load your JSM from chrome:// Now with that preface out of the way, this part is easy: drop support for Firefox 3.x if you haven't already, move your JSM files to wherever you've got your chrome mapping to for your XUL overlay and/or windows, import your files f...
...ip the next step. If not, see if you still can't do things any other way. As with JSMs, a chrome:// URI may be more appropriate. If you want to also make your add-on extractionless then you may need "step 3" if you're loading files with nsIFileInputStream or something similar, or a jar: URI might work. If not, a file:// URI might be fine for you. Restartless add-ons can easily get a URI for their install location on startup, so you should look into what you can do with that. Step 3: No more nsIFile access for files internal to your bundle For an extractionless extension, access to files internal to your bundle will not be possible using the nsIFile interface. If you need to read data, or otherwise access files within your bundle, there are two options. The first is to use the nsIZipReader inte...
...r bundle For an extractionless extension, access to files internal to your bundle will not be possible using the nsIFile interface. If you need to read data, or otherwise access files within your bundle, there are two options. The first is to use the nsIZipReader interface which permits continuing to use nsIInputStreams, etc. The second is to re-code to use XMLHttpRequest. A file:// URI to the install location, or .xpi file, is available in installPath property of the bootstrap data structure passed to the startup(), shutdown(), install(), and uninstall() functions in what will be your bootstrap.js file (see below). How to get and load the data of of your add-on's files using the Add-on Manager API: // This is the OLD way of getting one of your files const myAddonID = ...; // Just store a c...
...And 12 more matches
Strategies for carrying out testing - Learn web development
a lot of people use Windows and Mac desktops/laptops, where the main browsers are Chrome, Firefox, Safari, IE, and Edge. You probably want to just test the latest versions of the first three, as these browsers receive regular updates. For Edge and IE, you probably want to test the last couple of versions; these should all go in the A grade tier. Note: You can only have one version of IE or Edge installed on a machine at once, so you will probably have to use virtual machine, or other strategy to do the testing you need. See Virtual machines later on. Lots of people use iOS and Android, so you probably also want to test the latest versions of iOS Safari, the last couple of versions of the old Android stock browser, and Chrome and Firefox for iOS and Android. You should ideally test these on bo...
...ysical devices, and emulated environments (using either an emulator or a virtual machine). Physical devices It is generally better to have a real device running the browser you want to test -- this provides the greatest accuracy in terms of behaviour and overall user experience. ...
...ally better to have a real device running the browser you want to test -- this provides the greatest accuracy in terms of behaviour and overall user experience. You'll probably want something like the following, for a reasonable low-level device lab: A Mac, with the browsers installed that you need to test -- this can include Firefox, Chrome, Opera, and Safari. A Windows PC, with the browsers installed that you need to test -- this can include Edge (or IE), Chrome, Firefox, and Opera. ...
...And 12 more matches
Add to Home screen - Progressive web apps (PWAs)
add a shortcut to their Home screen representing their favorite web app (or site) so they can subsequently access it with a single tap. This guide explains how A2HS is used, and what you need to do as a developer to allow your users to take advantage of it. Why A2HS? A2HS is thought to be part of the Progressive Web App philosophy -- giving web apps the same user experience advantages as native apps so they can compete in today's ecosystem wars. ...
...sary features in place. Tapping this will show a confirmation banner -- pressing the big + ADD TO HOME SCREEN button completes the action, adding the app to the Home screen. (Note: In Android 8 and higher, a system-level "Add to Home screen" permission dialog will be shown first.) If you have Mobile Chrome available, the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your Home screen. Note: You can find out a lot more about Chrome install banners from the article Web App Install Banners. If you choose not to add it to your Home screen at this point, you can do so later using the Add to Home screen icon in the main Chrome menu. Regardless of which browser you are using, when you choose to add the ...
...nsufficient space to display the full name. You are advised to provide both if your app's name is particularly long. start_url: Provides a path to the asset that should be loaded when the added-to-Home screen app is launched. Note that this has to be a relative URL pointing to the site index, relative to the url of the manifest. Also, be aware that Chrome requires this before it will display the install banner, whereas Firefox doesn't require it for showing the home-with-a-plus icon. The manifest for our sample app looks like this: { "background_color": "purple", "description": "Shows random fox pictures. Hey, at least it isn't cats.", "display": "fullscreen", "icons": [ { "src": "icon/fox-icon.png", "sizes": "192x192", "type": "image/png" } ], "name": "A...
...And 12 more matches
Setting Up a Development Environment - Archive of obsolete content
in an example you download, this is a Komodo project file. We recommend Git and GitHub for source control, but any decent software configuration management system will do. To package XPI files, we use make. We chose make because this is the same system used by Mozilla to build Firefox, and it is available for all operating systems. make is a default tool in most UNIX-based systems. ...
...ource control, but any decent software configuration management system will do. To package XPI files, we use make. We chose make because this is the same system used by Mozilla to build Firefox, and it is available for all operating systems. make is a default tool in most UNIX-based systems. It can be installed on Mac OS X as part of the XCode Tools package, and on Windows with cygwin. In cygwin installations you'll have to explicitly check the make and zip utilities from the long list of packages to download and install. Also make sure that make is in the executable system path. After setting up make, you should be able to open a command line window, run "make -ver", and get the installed version of make as output. We recommend you set up make in your system, since our examples come with all ...
...It will save you some packaging time. Or you can create an equivalent system using batch, Ant or whatever you prefer. Ultimately you can just compress the contents of the src directory using any zip or archive tool and get a similar result. ...
...And 11 more matches
Complete - Archive of obsolete content
ery simple introduction to extensions. However, because it is so simple it does not support some of the usual features of extensions. This page describes how to structure the extension in a more conventional way. This page is not a step-by-step tutorial. Instead it explains the missing features, and outlines how to add them. If you want to see these techniques in action, then you can download and install the complete AllCustom extension: allcustom.xpi (The link is external only because this wiki does not support XPI files.) The extension does not contain any useful functions. It is just an extended code sample. To see the code, use a jar tool or zip tool to unpack the XPI file that you downloaded. For more information about developing extensions, see the main Extensions page here. Features of th...
...and themes. Overall structure This extension's internal name is allcustom. It uses this name as the default file name throughout. Where you see a URL in the code with no file name, the application uses this default file name and an extension appropriate for the type of file expected. The extension is supplied as a XPI, which is compressed to reduce download times. ...
... see a URL in the code with no file name, the application uses this default file name and an extension appropriate for the type of file expected. The extension is supplied as a XPI, which is compressed to reduce download times. The XPI contains: install.rdf Information about the extension chrome.manifest Registration data for Firefox etc. ...
...And 11 more matches
XULRunner tips - Archive of obsolete content
XULRunner Frequently Asked Questions. Work in progress. Contains tons of non-working code (bit rot). Extension Manager To be able to install any extensions, you first need to enable the Extension Manager in application.ini. XULRunner 1.8.0 does not load extensions from the application directory; only the XULRunner directory and the user profile directory are checked. However, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...ou first need to enable the Extension Manager in application.ini. XULRunner 1.8.0 does not load extensions from the application directory; only the XULRunner directory and the user profile directory are checked. However, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...LRunner 1.8.0 does not load extensions from the application directory; only the XULRunner directory and the user profile directory are checked. However, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...And 11 more matches
Command line options
ollowing command: firefox -ProfileManager Mac OS X Go to applications > utilities. Open terminal and enter the following command: cd /Applications/Firefox.app/Contents/MacOS ./firefox -ProfileManager If you use Firefox Nightly, you can enter: cd /Applications/FirefoxNightly.app/Contents/MacOS ./firefox -ProfileManager Linux Open terminal and enter the following command: cd Thunderbird installation directory ./thunderbird -ProfileManager The example above invokes the "-ProfileManager" command line option with Mozilla's Thunderbird mail client. User profile -allow-downgrade Firefox 67's downgrade protection prevents accidentally starting Firefox in a profile running a later version of Firefox. Depending on changes between the two versions, some files in a profile may not be downwar...
...ey only. -setDefaultMail Set the application as the default email client. Thunderbird only. Calendar -calendar Start with the calendar client. Sunbird only. -showdate date Show your schedule of the given date. Sunbird only. sunbird -showdate 08/04/2008 -subscribe URL or -url URL Subscribe to the given URL. Sunbird only. Other components -chat Start with the IRC client, ChatZilla, if installed. -devtools Start with native developer tools opened. -editor URL or -edit URL Start with editor (composer) for the given URL (where URL is optional). SeaMonkey only. seamonkey -edit www.mozilla.org -inspector URL Start with the DOM Inspector, if installed, and inspect the given URL (where URL is optional). -jsdebugger Start application with browser toolbox (formerly browser debugger).
...s it. -start-debugger-server port Firefox only. Start the debugger server on port. This will enable another instance of Firefox to connect the Firefox developer tools to this Firefox instance. See the article on remotely debugging Firefox desktop. The port argument is optional, and if it is omitted, the server will listen on port 6000. ...
...And 11 more matches
Fonts for Mozilla's MathML engine
Note that most of these instructions may as well apply to other Web rendering engines. Installation Instructions Windows Install the Latin Modern Math and STIX fonts as follows: Download latinmodern-math-1959.zip. Open the ZIP archive, move inside the latinmodern-math-1959 directory and then inside the otf directory. You will find a latinmodern-math font file. Open the latinmodern-math font file and click the Install button. ...
...se instructions may as well apply to other Web rendering engines. Installation Instructions Windows Install the Latin Modern Math and STIX fonts as follows: Download latinmodern-math-1959.zip. Open the ZIP archive, move inside the latinmodern-math-1959 directory and then inside the otf directory. You will find a latinmodern-math font file. Open the latinmodern-math font file and click the Install button. Download STIXv2.0.2.zip. Open the ZIP archive, move inside the /STIXv2.0.0/Fonts/OTF/ directory. You will find the STIXMath-Regular, STIX-Regular, STIX-Bold, STIX-Italic, STIX-BoldItalic font files. Open the STIXMath-Regular font file and click the Install button. If desired, you may also do the same for the other font files. Note:Cambria Math is installed by default on Windows 7 an...
... OS X Install the Latin Modern Math and STIX fonts as follows: Download latinmodern-math-1959.zip. ...
...And 11 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
on format. As a rough overview this is a version string split by periods, some examples: 2.0 1.0b1 3.0pre1 5.0.1.2 Note: Before Firefox 1.5 the more basic Firefox Version Format was used: major.minor.release.build[+] where only digits were allowed. The toolkit version format supports the Firefox version format but allows greater flexibility. How Applications Determine Compatibility When installing add-ons applications look at the targetApplication entries in the add-on's install.rdf. An entry must exist with an ID matching the ID of the application. Additionally the minVersion and maxVersion of this entry must be a range that includes the version of the running application. If the application has a targetApplication entry but it is for an incompatible version then the application will ...
...nstall.rdf. An entry must exist with an ID matching the ID of the application. Additionally the minVersion and maxVersion of this entry must be a range that includes the version of the running application. If the application has a targetApplication entry but it is for an incompatible version then the application will retrieve updated compatibility information from the add-on's updateURL. If the install.rdf contains any targetPlatform entries then the platform of the currently running application must be listed or the installation will be rejected. Firefox 3 note In applications based on Gecko 1.9 you can also use a targetApplication entry with an id toolkit@mozilla.org and minVersion and maxVersion that match the toolkit version of the running application. This allows you to say that your ...
...Simply create the boolean preference extensions.checkCompatibility and set it to false. ...
...And 10 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
While this is generally considered acceptable behavior, considerable care must be taken to avoid violating the Mozilla add-on guidelines or creating an adverse user experience. Due to the large volume of user complaints regarding hidden settings being changed against their will, and not being restored after the add-ons responsible are disabled, Mozilla will take any steps necessary to mitigate the impact of offending add-ons. ...
...which is not automatically reset when the add-on is removed will result in a reset prompt for users. Other settings violations designed to restrict user choice will result in stronger action, such as blacklisting of the add-ons in question. The most technically sound method of achieving this, and the only acceptable way of changing preferences such that they are automatically restored on add-on uninstall, is to make such changes in the default preference branch, as explained below. While the technical details below are important to understand, a library which encapsulates the appropriate logic is provided along with the example add-on at the end, and should be used where possible. Changing Default Preference Values There are two common ways of changing default preference values. The simplest, whi...
...ing Default Preference Values There are two common ways of changing default preference values. The simplest, which works only for traditional, non-restartless add-ons, is to add the preference changes to a file in an extension's defaults/preferences/ directory. The following file, for instance, would change the default keyword search engine, assuming that an engine with the name Example Engine is installed, as described below: // This is a localizable preference, so it must contain a URL which // points at a properties file containing the preference name as a // property. We use a data: URL for simplicity. pref("browser.search.defaultenginename", "data:text/plain,browser.search.defaultenginename=Example Engine"); In the case or restartless extensions, the preferences need to be changed manually, ...
...And 10 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ased on environment variables (USER, HOME...) and/or LDAP queries (fetch email address, Common Name , language, homepage etc...) from the enterprise directory. Central Configuration File That feature is provided through a JavaScript file. File Location (not tested since 2012 ...) In Thunderbird , FireFox, the javascript preference file that calls the centralized preference file is located in $INSTALL_DIR_MOZ_APP/defaults/pref, for example in thunderbird this would be repectively for windows/linux: C:\Program Files\Mozilla Thunderbird\defaults\pref /usr/lib/thunderbird/default/pref ( it used to be in /usr/lib/thunderbird-version#/default/pref as in /usr/lib/thunderbird-5/default/pref ) For the record/history purpose ... the old Netscape 4.x the file is encoded (byte-shift/rotary is 7), and...
...it is named by a general.config preference that should be added at the end of file MOZILLA_HOME/default/pref/autoconf.js or MOZILLA_HOME/greprefs/autoconf.js: pref("general.config.filename", "mozilla.cfg");. File API That centralized preference file uses a JavaScript API that allows us to do what we need. That prefcalls.js is now archive in omni.jar file located at the root of the mozilla apps installation, example of TB5: # jar -tvf /usr/lib/thunderbird/omni.jar | grep prefcalls.js 7499 Sat Nov 05 09:21:34 CET 2011 defaults/autoconfig/prefcalls.js Traditionally (previous apps versions) is was in MOZILLA_HOME/default/autoconfig/prefcalls.js. The presence of pref("general.config.filename", "mozilla.cfg"); in any appropriate .js file (here we use autoconf.js dedicated file) enables the rea...
... name of the file to be read: /usr/lib/thunderbird/thunderbird.cfg. (or firefox.cfg if for firefox...) File Encoding If needed, the encoding can be done with the Perl script: moz-byteshift.pl available at http://www.alain.knaff.lu/howto/Mozi...z-byteshift.pl. For Netscape 4.x the convert function from the Client Customization Kit (CCK) could also do that (and other things like personalize auto-installation...): http://developer.netscape.com/docs/manuals/deploymt/config.htm. AutoConfig Directives Here we want to set users central mail preferences: Create one account from their login name, get their email address from an LDAP request and set the enterprise IMAP and SMTP servers. Hence, when working on multiuser workstations, each user gets automatically Thunderbird configured for his profile. ...
...And 10 more matches
Getting started with XULRunner - Archive of obsolete content
ed approach to building XULRunner applications at Creating XULRunner Apps with the Mozilla Build System. If you need to change XULRunner itself or integrate it with external binaries you may need to read that article. Step 1: Download XULRunner You can find a download link on the main XULRunner page here on MDN. Since we are not creating any binary XPCOM components, we only need to download and install the XULRunner runtime package, not the SDK. The XULRunner download for Windows is a zip file, not a true install. As a developer, I like the idea that XULRunner only needs to be unzipped onto my machine. I am assuming that it doesn't need to hook into my Windows system and that's a good thing. It also means that the XULRunner is portable so, if you develop your applications to be portable you co...
...system and that's a good thing. It also means that the XULRunner is portable so, if you develop your applications to be portable you could carry them around on a flash drive or sync them in the cloud. The Mac version of XULRunner is distributed as an tar.bz2 archive. ...
...is installed in /Library/Frameworks. In Ubuntu desktop and its variants (Xubuntu, Kubuntu, ...), from version 11.10 (Oneiric Ocelot), XULRunner is not longer maintained and doesn't exist in Ubuntu repository. Therefore, either you need to compile XULRunner manually or download a binary release from Mozilla's FTP server. ...
...And 10 more matches
NSS tools : signtool
Name signtool -- Digitally sign objects and files. Synopsis signtool [-k keyName] -h -H -l -L -M -v -w -G nickname -s size -b basename [[-c Compression Level] ] [[-d cert-dir] ] [[-i installer script] ] [[-m metafile] ] [[-x name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-X] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[--leavearc] ] [[-j directory] ] [[-Z jarfile] ] [[-O] ] [[-p password] ] [directory-tree] [archive] Description The Signing Tool, signtool, creates digital signatures and uses a Java Archive (JAR) file to associate the signatures with files in a directory. Electronic software distribution over any network involves potential security problems. To help address some of these problems,...
...d take great care to ensure that you can stand behind any file you sign and distribute. For example, if you are a software developer, you should test your code to make sure it is virus-free before signing it. Similarly, if you are a network administrator, you should make sure, before signing any code, that it comes from a reliable source and will run correctly with the software installed on the machines to which you are distributing it. Before you can use Netscape Signing Tool to sign files, you must have an object-signing certificate, which is a special certificate whose associated private key is used to create digital signatures. For testing purposes only, you can create an object-signing certificate with Netscape Signing Tool 1.3. When testing is finished and...
...orporate intranet or extranet. Netscape Certificate Management System provides a complete management solution for creating, deploying, and managing certificates, including CAs that issue object-signing certificates. You must also have a certificate for the CA that issues your signing certificate before you can sign files. If the certificate authority's certificate isn't already installed in your copy of Communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate. This is the case for some test certificates, as well as certificates issued by Netscape Certificate Management System: you must download the the CA certificate in ...
...And 10 more matches
Multiple item extension packaging - Archive of obsolete content
From the release of Firefox 53, multiple item extension packages are no longer supported and will not load. As a consequence, these packages are no longer accepted by AMO. A multiple Item package provides the ability to package multiple installable bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Every multiple item package must provide an install.rdf file (not old-style install.js!) and has the same requirements as an extension except as noted below. ...
...the ability to package multiple installable bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Every multiple item package must provide an install.rdf file (not old-style install.js!) and has the same requirements as an extension except as noted below. There is currently no feature to prevent or warn the user when installing an older version of an extension. Multiple Item Package File Layout The multiple item package file layout is a simplified form of an installable bundle and requires a file extension of xpi. A multiple item package may contain both extensions (e.g. xpi file extension) and themes (e.g. jar file extension). ...
...o feature to prevent or warn the user when installing an older version of an extension. Multiple Item Package File Layout The multiple item package file layout is a simplified form of an installable bundle and requires a file extension of xpi. A multiple item package may contain both extensions (e.g. xpi file extension) and themes (e.g. jar file extension). The basic structure is shown below: /install.rdf Install Manifest /extension1.xpi Extension /extension2.xpi Extension /theme1.jar Theme /theme2.jar Theme ... ...
...And 9 more matches
Manifest Files - Archive of obsolete content
<< PreviousNext >> In this section, we'll see how to put chrome and XUL files into a package and create the manifest files for them. Packages A package is a set of XUL files and scripts that define the functionality of a user interface. Packages may be installed into Mozilla and referenced with chrome URLs. A package can contain any kinds of files and may be split into subdirectories for different parts of the package. A package can be stored either as a directory or as a JAR archive. ...
... package can contain any kinds of files and may be split into subdirectories for different parts of the package. A package can be stored either as a directory or as a JAR archive. Manifest files A manifest file describes a package and maps its location on disk to a chrome URL. The manifest files in the chrome directory will be examined when a Mozilla application starts up to see what packages are installed. That means that all you need to do to install a new package is add a new manifest file either into the application chrome directory or the user specific chrome directory. This latter chrome directory is normally the one used since the application directory might not have sufficient permissions to write into it. Note: Starting in Gecko 2.0, only the file named chrome.manifest is read automati...
...re stored in a different path in the same archive. For the 'tests' package created above, the files are not packaged into an archive, so a direct file path is used instead. This is good for development since you don't have to package up all the files every time you change them. However, when distributing an application or extension, you will want to package them into an archive to avoid having to install lots of smaller files. The xpcnativewrappers=yes part at the end of the manifest line is a flag that may optionally be used. In JavaScript, it is possible for a web page to override built-in functions with their own code. If the xpcnativewrappers flag is specified, it indicates that scripts running in a privileged context don't call these overridden versions, but the original built-in versions in...
...And 9 more matches
XUL Structure - Archive of obsolete content
e same way, you can load both from either your local file system, from a web page, or from an extension or standalone XULRunner application. Content from remote sources (e.g. http://localhost/~username/ ), regardless of whether they are HTML or XUL or another document type, are limited in the type of operations they can perform, for security reasons. For this reason, Mozilla provides a method of installing content locally and registering the installed files as part of its chrome system. This allows a special URL form, called a chrome:// URL, to be used. By accessing a file using a chrome URL, the files receive elevated privileges to access local files, access preferences and bookmarks and perform other privileged operations. Obviously, web pages do not get these privileges, unless they are signe...
...ranted permission to perform these operations. This chrome package registration is the way Firefox extensions are able to add features to the browser. The extensions are small packages of XUL files, JavaScript, style sheets and images packed together into a single file. These packaged files can be created by using a ZIP utility. When the user downloads the zipped file, the packaged files will be installed onto the user's machine. The extension will hook into the browser using a XUL specific feature called an overlay which allows the XUL from the extension to mesh with the XUL in the browser. To the user, it may seem like the extension has modified the browser, but in reality, the code is all separate, and the extension may be easily uninstalled. Registered packages are not required to use overla...
...However, this XUL code will be registered in the chrome system such that the application can display the UI. It is worth noting that the Mozilla browser itself is actually just a set of packages containing XUL files, JavaScript and style sheets. ...
...And 9 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
framework. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 2.0.x is built from the same source code snapshot as Firefox 4.0.x. Current Version The current version of XULRunner 2.0 is 2.0, matching Firefox 4.0 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements (NB: that page will change for Firefox 4 shipping). The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English. The releases directory can be found here. Specific runtimes can be found at: Download XULRunner for W...
...npack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\2.0 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. XULRunner 2.0 is a universal binary containing i386 and x86_64 architectures. XULRunner 1.9.2 and earlier versions had PowerPC (ppc) and i386 architectures. Linux (32-bit) Unpack the tarball to a new directory using tar -xjf xulrunner-2.0.en-US.linux-i686.tar.bz2. The following directory is recommended: /opt/xulrunner/2.0 . Register XULRunner with the system by runn...
...ner 2.0 is a universal binary containing i386 and x86_64 architectures. XULRunner 1.9.2 and earlier versions had PowerPC (ppc) and i386 architectures. Linux (32-bit) Unpack the tarball to a new directory using tar -xjf xulrunner-2.0.en-US.linux-i686.tar.bz2. The following directory is recommended: /opt/xulrunner/2.0 . ...
...And 9 more matches
package.json - Archive of obsolete content
The package.json file contains manifest data for your add-on, providing not only descriptive information about the add-on for presentation in the Add-ons Manager, but other metadata required of add-ons. Some of its entries, such as icon, name, and description, have direct analogues in the install manifest format, and entries from package.json are written into the install manifest when the add-on is built using jpm xpi. Others, such as lib, permissions, and preferences, represent instructions to the jpm tool itself to generate and include particular code and data structures in your add-on. Creating a manifest The package.json file is initially generated in your add-on's root directory the first time you run jpm init. It looks like this (assuming the add-on's directory is "my-addon"): { "na...
...e = require("./package.json").title; Key reference package.json may contain the following keys: author The name of the package's original author; this could be the name of a person or a company. Defaults to an empty string. It may include a optional URL in parentheses and an email address in angle brackets. This value will be used as the add-on's em:creator element in the install.rdf file generated by cfx. Note: jpm supports NodeJS people fields. contributors An array of additional author strings, identifying other contributors to the add-on. These values will be used as the add-on's em:contributor elements in its install.rdf. Note: This is deprecated along with cfx; it's not available when using jpm. dependencies A...
... dependencies A string or an array of strings specifying the names of packages that this add-on requires in order to function properly. description The add-on's description; this is a human-readable message describing what the add-on does. This defaults to the text "a basic add-on". This value will be used as the add-on's em:description element in its install.rdf. engines Object with supported applications (key) and required version numbers (value). The version number can both specify a minimum and maximum version separated by a space. firefox: Firefox Desktop fennec: Firefox for Android thunderbird: Thunderbird seamonkey: SeaMonkey Any application UUID Example: "engines": { "firefox...
...And 8 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
and therefore all you have to do is run some commands in the terminal. You can find full instructions for almost any OS here. Structuring Your Project Mozilla includes a number of complex extensions that are integrated into its build process. It has thus been necessary to solve all of the issues involved in creating and registering XPCOM components, building JAR files and manifests, installing the lot into the Firefox extensions/ directory and so forth. So it behooves us to piggyback on this infrastructure to build our extension. First of all, think of a catchy name for your extension and create a directory with that name under the /mozilla/extensions/ directory. Use only lowercase letters. You should see a bunch of other directories (inspector/, reporter/ and so forth) at th...
...This makefile says two things. First of all, it lists the subdirectories that make up the extension, so the build system knows where to look for additional makefiles. Secondly, it instructs the build system to create a new extension, rather than copying the components directly into Firefox's binary directory. The main advantage of using an extension is that it is easy to package everything up and install it on another machine. So here's your basic, plain-vanilla top-level makefile (Makefile.in in the main extension directory): DEPTH = ../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = myextension DIRS = public src XPI_NAME = myextension INSTALL_EXTENSION_ID = myextension@mycompany.com XPI_PKGNAME ...
...e's your basic, plain-vanilla top-level makefile (Makefile.in in the main extension directory): DEPTH = ../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = myextension DIRS = public src XPI_NAME = myextension INSTALL_EXTENSION_ID = myextension@mycompany.com XPI_PKGNAME = myextension DIST_FILES = install.rdf include $(topsrcdir)/config/rules.mk A detailed description of the make process, describing the key features of this makefile, can be found here. MODULE and XPI_NAME are both set to the name of your extension; they should be repeated in all project makefiles so that all of the files land in the same place in the XPI staging area (see below). INSTALL_EXTENSION_ID is the unique ID of yo...
...And 8 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
ions using web services while maintaining the security of sites inside the user's firewall. ...
...taining the security of sites inside the user's firewall. ...
...loper Connection) XML Extras (the home page for the XML Extras code module, which contains Mozilla's web services support) SOAP Scripts in Mozilla (documentation on SOAP in Mozilla from the engineer who implemented it) XPInstall, Mozilla's Cross Platform Installation Technology One of the many things that makes the Mozilla platform easy for both users and developers is that applications can be installed, extended, or upgraded with simple web page links. The technology that makes this possible, XPInstall, allows application developers to write JavaScript installations that manage special cross-platform installation archives (called XPIs, or "zippies"), in which packages such as new skins for the browser, patches, browser extensions, new Gecko-based applications, and third party standalone appli...
...And 8 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
nkey's menu bar, choose View - Character Encoding - Unicode (UTF-8). Check that the text you typed looks OK with this setting. If your text editor does not support UTF-8, search the Internet for a better one that you can download. Optional tools You can optionally use any image editor to customize the images. You can optionally use a jar tool or zip tool to package your button as a cross-platform installable (XPI) for other people to install and use. Making a button There are nine easy steps. When you have completed all the steps, you will have a structure like this in the directory where you installed SeaMonkey: 1. Go to the directory where you installed SeaMonkey, then go to the chrome directory there. Note: For information about how to find the directory where you instal...
... people to install and use. Making a button There are nine easy steps. When you have completed all the steps, you will have a structure like this in the directory where you installed SeaMonkey: 1. Go to the directory where you installed SeaMonkey, then go to the chrome directory there. Note: For information about how to find the directory where you installed SeaMonkey, see: Installation directory If you cannot easily find the directory, you can use the following method to find it. From SeaMonkey's menu bar, choose Tools - Web Development - JavaScript Console. Copy the following code. It is one very long line ending in path--make sure that you get all of it: Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("...
...am files that are part of SeaMonkey itself, together with other files that are provided by extensions. Your toolbar button will be an extension. 2. Delete these two files: chrome.rdf overlays.rdf Explanation: SeaMonkey automatically rebuilds these files the next time it starts. When it rebuilds them, it will include your new extension. 3. Edit the file: installed-chrome.txt At the end of the file, add the following line. Copy and paste the line from here, to avoid typing errors: content,install,url,resource:/chrome/custombutton/ Explanation: This line registers your custom toolbar button extension, linking it into SeaMonkey. 4. Create a new directory named: custombutton Perform the following steps in thi...
...And 8 more matches
SpiderMonkey Build Documentation
a.org/js/build.html. Use these instructions to build the latest SpiderMonkey source code. Before you begin, make sure you have the right build tools for your computer: Linux, Windows, Mac, others. When building a version older than 28, you'll additionally need NSPR. And of course, you'll need to get the SpiderMonkey source code. Non-developer (optimized) build Use these steps if you want to install SpiderMonkey for production use or run performance benchmarks. (If you want to use SpiderMonkey as a library in your C++ application, or work on improving SpiderMonkey itself, do a developer/debug build instead, as described below.) cd js/src # This name should end with "_OPT.OBJ" to make the version control system ignore it. mkdir build_OPT.OBJ cd build_OPT.OBJ /bin/sh ../configure.in # Use "m...
... The most common build problems are dependency problems. See the build prerequisites page for your platform. SpiderMonkey does not support building in your source directory. You must configure and build in a separate build directory, as shown above. Note: If you are on Mac and getting an error similar to "checking whether the C compiler (gcc-4.2 ) works... ...
...Refer the release notes under Command Line Tools -> New Features The release notes also states that this compatibility package will no longer be provided in the near future, so the build system on macOS will have to be adapted to look for headers in the SDK Until then, the following should help, open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS...
...And 8 more matches
The Essentials of an Extension - Archive of obsolete content
You can open it with any text editor. The file is formatted in a special flavor of XML called RDF. RDF used to be the central storage mechanism for Firefox, but it is now being replaced for a simpler database system. We'll discuss both of these storage systems further ahead in the tutorial. Now let's look at the important parts of the file. <em:id>helloworld@xulschool.com</em:id> This is the unique identifier for the extension. Firefox needs this to distinguish your extension from other extensions, so it is required that you have an ID that is unique. ...
... practice. As long as your id has some uniqueness to it, it's OK to use either form. <em:name>XUL School Hello World</em:name> <em:description>Welcome to XUL School!</em:description> <em:version>0.1</em:version> <em:creator>Appcoast</em:creator> <em:homepageURL>https://developer.mozilla.org/docs/XUL_School</em:homepageURL> This is the data that is displayed before and after the extension is installed, that you can see in the Add-ons Manager. There are many other tags that can be added, for contributors and translators. The full specification of the install.rdf file has all the details. Since extensions can be translated to multiple languages, it is often necessary to translate the extension's description, or even its name. A localized description and name can be added with the following co...
... School!</em:description> </Description> </em:localized> The es-ES locale string indicates that this is the Spanish (es) localization for Spain (ES). You can add as many <em:localized> sections as you need. For Firefox 2, localizing this file is a little more complicated. We'll discuss localization further ahead in this section. <em:type>2</em:type> This specifies that the add-on being installed is an extension. You can read about different possible types in the install.rdf specification. <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>4.0</em:minVersion> <em:maxVersion>10.*</em:maxVersion> </Description> </em:targetApplication> This node specifies the target application and target versions for the extensi...
...And 7 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
Warning: The content of this article may be out of date. This method of packaging applies to older applications, like Mozilla Suite, Firefox 1.0. See Building an Extension for updated instructions. Now that we have a static overlay we're in good shape to create a XPI package that installs our extension as a dynamic overlay. XPIs have a complex structure designed to separate UI layers from each other. To make our XPI we'll start out by creating a directory to hold the files we're going to add to the XPI. Then we'll modify URLs in our files so they point to the right place. After that we'll create a contents.rdf file describing the tinderstatus component for the chrome registry and an install.js script to perform the installation. Finally we'll zip the files into an archive. Start out by creat...
...Create a tinderstatus subdirectory in it and a content sub-subdirectory in that subdirectory. ...
...y in that subdirectory. Copy the following files into the content sub-subdirectory: tinderstatusOverlay.xul tinderstatus.js tinderstatus.css tb-busted.png tb-nostatus.png tb-success.png tb-testfailed.png These are the files we're going to put into the XPI. ...
...And 7 more matches
Creating a Microsummary - Archive of obsolete content
Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) A microsummary generator is a set of instructions for creating a microsummary from the content of a page. Web pages can reference generators via <link rel="microsummary"> elements in their <head> elements. Generators can also be independently downloaded and installed by users if they include a list of pages to which they apply. In this tutorial we're going to create a microsummary generator for the Spread Firefox home page that displays the current Firefox download count along with the label Fx downloads; for example: 174475447 Fx downloads. We'll build the XSLT transform sheet that converts that page into its microsummary, learn how to specify that the generator applies to that page,...
... create a microsummary generator for the Spread Firefox home page that displays the current Firefox download count along with the label Fx downloads; for example: 174475447 Fx downloads. We'll build the XSLT transform sheet that converts that page into its microsummary, learn how to specify that the generator applies to that page, and find out how to make the generator available for download and installation. In each step of revising the transform sheet and other code in this tutorial, new material added will be shown in boldface so you can follow along more easily. Note: if you are a web site developer, and you want to create microsummaries for pages on your site, you can write generators to do so, but a simpler and more efficient approach is to create the microsummaries on the server-side us...
... <value-of> element to the template whose select attribute contains an XPath expression that points to the node containing the count. XPath is a language for identifying nodes in HTML/XML documents. It also contains basic functions for manipulating those nodes and their content. The easiest way to get an XPath expression that points to the node in question is to use the XPath Checker extension. Install the extension (restarting Firefox to complete installation) then go to the Spread Firefox home page, find the Firefox download count (a large number at the bottom of the right-hand column), context click on the number, and select View XPath from the context menu. XPath Checker will open a new window. The new window will include an XPath field that contains this XPath expression pointing to the d...
...And 7 more matches
Repackaging Firefox - Archive of obsolete content
Now, on to the technical details. The following diagram represents an overview of the process and the pieces involved: You will need the following to get started: A Macintosh computer (even for repackaging Windows or Linux only); it may be either PowerPC or Intel based. The repackager tool. Currently that page mentions only Firefox 1.5.x, but it supports Firefox 2. The pristine Firefox 2 installer files (Windows .exe, Mac .dmg, or Linux .tar.gz) for each of the locales you need. At the time of writing this document, the latest builds are here. A "distro" extension that makes the changes you desire. Once you have all the ingredients, the customization process is quite easy: Download the Firefox installer. Install the repackager tool like you would any Mac application. Make sure it ...
...w. Sample DEX The best way to get started is probably to look at a simple DEX and modify it for your own purposes. Download the sample. XPI files are specially crafted ZIP files in disguise. You can use any ZIP program (WinZIP on Windows, zip on Mac or Linux, etc) to extract it. ...
...e/zh-TW/partner.properties partner-bookmarks.xml One by one, the files listed above are: chrome.manifest Contains a specialized listing of the contents of the XPI. components/PartnerBookmarks.js From the CCK extension, and it allows us to drop in default bookmarks at profile creation. You should not need to edit this file. defaults/preferences/partner.js Default preferences for this DEX. install.rdf Meta-information about your extension, such as the creator (your organization), a unique ID, and which versions of Firefox are supported. locale/*/partner.properties For preferences which need to be localized, there needs to be an entry in each of the properties files with the desired value for that locale. If the value is the same for *all* locales, it can be set in the partner.js file i...
...And 7 more matches
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
XULRunner 1.8.0.1 is the first stable developer preview release of XULRunner. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.8.0.4 is now available as a security/stability update; all users should install this new version. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using a archive tool...
...he ZIP file to a new directory using a archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.8.0.1 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). ...
...s) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. Linux Unpack the tarball to a new directory using tar -xzf xulrunner-1.8.0.1.en-US.linux-i686.tar.gz. The following directory is recommended: /opt/xulrunner/1.8.0.1 . Register XULRunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). ...
...And 7 more matches
Interfacing with the Add-on Repository
The Add-on Repository JavaScript code module makes it easy for your extension to interface with the AMO repository. You an use the code module to get lists of add-ons and even install new add-ons. This article provides some sample code that queries the recommended add-ons list on AMO and lets the user click a button to install an add-on from the list. Importing the repository code module Before you can use the Add-on Repository API, you need to import the code module: Components.utils.import("resource://gre/modules/AddonRepository.jsm"); Having done this, you can then access the API through the resulting AddonRepository object. Enabling the recommendation feature In current builds of Firefox 4, the recommendation API doesn't work because the preference for the URL to query to get recommen...
... request To start a search of the repository, you can use either of the following methods: searchAddons() Queries the add-on repository for add-ons matching given search criteria. retrieveRecommendedAddons() Retrieves a list of recommended add-ons, as determined by the AMO site administrators. This example will use the latter, in order to randomly select a recommended add-on and offer to install it. However, the code to perform a search term based query would be very similar. When the user clicks a toolbar button to initiate the query, the following code gets run to start the request: AddonRepository.retrieveRecommendedAddons(10, this); This asks the repository to fetch up to 10 add-ons, using the object this as the target for callbacks. The callback object needs to implement the Sea...
...dons, the number of add-ons returned, and the total number of add-ons that matched the query (in case the returned number is smaller than the requested number, for example). ...
...And 7 more matches
Fonts for Mozilla 2.0's MathML engine
Note: These instructions are for Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) until Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27). For the latest version see, this page. Quick Instructions Try this test page to quickly determine whether you need to install additional fonts and to follow the instructions below. You may also want to check out the Mozilla MathML torture test to test your installation against concrete examples. On Windows: Use this MathML fonts installer. On Mac OS X Lion (10.7) and higher versions, STIX fonts are already installed and can be used for MathML. On most Linux distributions and similar open source platforms, you can install math fonts (STIX, Asana or MathJax fonts) from your package manager or get them from this zip archive. On A...
...MathML fonts installer. On Mac OS X Lion (10.7) and higher versions, STIX fonts are already installed and can be used for MathML. On most Linux distributions and similar open source platforms, you can install math fonts (STIX, Asana or MathJax fonts) from your package manager or get them from this zip archive. On Android, Firefox OS and other platforms where the instructions above do not work: install the MathML-fonts add-on. This requires Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) or higher. Overview Mathematical formulas make use of various symbols represented by specific Unicode characters. Mozilla can display any of these symbols provided suitable Unicode fonts are installed. Furthermore, in accordance with the W3C CSS2 recommendation on fonts, authors can specify an or...
...port for the common delimiters and arrows that have the necessary Unicode assignments. For other characters, Mozilla has font-specific support. In general, if the necessary glyphs are not available on the system then Mozilla tries to stretch symbols using scale transforms, but that may result in a less pleasant rendering. To see MathML as intended, you need sufficient font support, which may mean installing some fonts. Note that some Web sites may provide the required mathematical fonts as Web fonts. In that case, you will see the correct rendering on these pages if you use Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) or greater. Recommended Fonts The STIX Fonts Project has been developing a comprehensive set of fonts that cover all the symbols in MathML and also contains glyphs ...
...And 7 more matches
Building the WebLock UI
<< PreviousNext >> Up until now, we've been building a component that can be installed in any Gecko application. The XPCOM interfaces and tools you've used have been general, cross-platform, and available in the Gecko Runtime Environment or in any Gecko-based application after Mozilla 1.2 (when the GRE began to be used). In this chapter, however, we are going to be building a user interface for the WebLock component that's meant to be added to the existing Mozilla browser[other-mozlike-browsers]. It uses XUL, which is an XML language that Gecko knows how to render as user interface, but it also interacts with particular parts of the Mozilla user interface, where it must install itself as an extension to the UI. Specifically, the user interface we create in this chapter will be ov...
...he file that defines the little status icon in the browser. weblock.xul defines the web lock manager dialog. weblock.css provides style rules for both of the XUL files. weblock.js provides JavaScript functions for both of the XUL files. Each of these files is described briefly in the sections below. In the following chapter we'll describe how you can take these files and create a package, an installable archive that includes the WebLock component and the new UI. Because this step (particularly the overlay section) is so dependent on Mozilla, the chapter is divided up into a couple of different sections. The second section, XUL, describes the XML-based User Interface Language (XUL) and how you can use it to create a dialog that provides access to the WebLock component and its services. The t...
...omponent and its services. The third section, Overlaying New User Interface Into Mozilla, describes how to create an overlay into the browser that will make this dialog accessible from a Mozilla build. The overlay section, where we discuss how to import scripts, images, and other resources from Mozilla into your own UI, is by far the more complicated of the two. If the WebLock component is being installed in Mozilla or another Gecko-based browser, then this third section shows you how to create the entry point in the browser for controlling the web locking. If you are planning on deploying the WebLock component in some other application, you'll have to devise a different means of access (e.g., native widgetry that instantiates and controls the WebLock component). Client Code Overview Before we...
...And 7 more matches
Virtualenv
virtualenv is software for isolating python package environments (e.g. import paths). It is written by Mozilla's own Ian Bicking. Creating a virtualenv installs setuptools (or optionally distribute) into the virtual environment. It is recommended that you use virtualenv for installing anything other than system software that you are working on. You will obviate the need to have access to your system packages and you won't mess up your system packages with whatever code you install into the site-packages directory of the virtualenv. site-packages should mostly be for system-installed python and not python that you are installing as a user. This page is mostly a stub for how virtualenv is used at Mozilla. For more information on virtualenv in general, see the virtualenv web site. Python ...
...ackages should mostly be for system-installed python and not python that you are installing as a user. This page is mostly a stub for how virtualenv is used at Mozilla. For more information on virtualenv in general, see the virtualenv web site. Python packaging at Mozilla is covered in Python. Getting Virtualenv virtualenv is a python package. You can download it from its PyPI package page or install it with easy_install. The github virtualenv repository is maintained by the Python Packaging Authority (including Mozilla's Tarek Ziade and Ian Bicking). ...
...information on virtualenv in general, see the virtualenv web site. Python packaging at Mozilla is covered in Python. Getting Virtualenv virtualenv is a python package. You can download it from its PyPI package page or install it with easy_install. The github virtualenv repository is maintained by the Python Packaging Authority (including Mozilla's Tarek Ziade and Ian Bicking). If you have git installed, you can clone the latest version of virtualenv: git clone git://github.com/pypa/virtualenv.git If you have pip or easy_install, you can install virtualenv directly from the web: pip install virtualenv # -or- easy_install virtualenv This will fetch virtualenv from PyPI and install it in your site-packages. You may need to use sudo to obtain appropriate permissions for the system. If you do ...
...And 7 more matches
about:debugging - Firefox Developer Tools
bar. In the Tools > Web Developer menu, click Remote Debugging. When about:debugging opens, on the left-hand side, you'll see a sidebar with two options and information about your remote debugging setup: Setup Use the Setup tab to configure the connection to your remote device. This Firefox Provides information about temporary extensions you have loaded for debugging, extensions that are installed in Firefox, the tabs that you currently have open, and service workers running on Firefox. If your about:debugging page is different from the one displayed here, go to about:config, find and set the option devtools.aboutdebugging.new-enabled to true. Setup tab Connecting to a remote device Firefox supports debugging over USB with Android devices, using the about:debugging page. Before y...
...USB in the Advanced Settings in Firefox on the Android device. Connect the Android device to your computer using a USB cable. If your device doesn't appear in the lefthand side of the about:debugging page, try clicking the Refresh devices button. If it still doesn't appear, it may be because the link between your Android device and your computer is not authorized yet. First make sure you have installed Android Debug Bridge from Android Tools on your computer in order for it to be able to connect to your device. Next, disable every debugging setting already activated and repeat the steps described before. Your device should show a popup to authorize your computer to connect to it -- accept this and then click the Refresh devices button again. The device should appear. Note: You do not need t...
... Android Debug Bridge from Android Tools on your computer in order for it to be able to connect to your device. Next, disable every debugging setting already activated and repeat the steps described before. Your device should show a popup to authorize your computer to connect to it -- accept this and then click the Refresh devices button again. The device should appear. Note: You do not need to install the full Android Studio SDK. Only adb is needed. To start a debugging session, first open the page that you wish to debug and then click Connect next to the device name to open a connection to it. If the connection was successful, you can now click the name of the device to switch to a tab with information about the device. The information on this page is the same as the information on the T...
...And 7 more matches
Extension Packaging - Archive of obsolete content
Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an XUL program. Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. ...
... Extensions are packaged in a form of Installable Bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an XUL program. Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. ...
...ded pre-packaged with an application or by an external program. Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an XUL program. Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. After the extension files and install.rdf have been prepared, there are several ways to prepare an extension for installation: ZIP the extension directory into a user-installable XPI (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the Windows registry. Note: Starting in Gecko 2.0, XPI files are no longer unpacked when extensions are installed. Instead, t...
...And 6 more matches
Setting up an extension development environment - Archive of obsolete content
This article provides suggestions for how to set up your Mozilla application for extension development. These details apply to Firefox, Thunderbird, and SeaMonkey (version 2.0 and above). Overview You'll create a new user profile to run your development specific Firefox session. This will utilize distinctive development preferences in about:config. Install Firefox development extensions specifically for this new developer user profile. Edit files in the extensions folder of this profile, and restart the application as this new developer profile. Development profile The use of a separate user profile for development can be advantageous, averting performance degradation from development related settings, and further isolating personal data (such as bookmarks, extensions, and settings) fro...
... the -no-remote parameter), that second invocation would ignore its -P ProfileName parameter, instead opening a new window for the already running instance; sharing all its profile, sessions etc. Download Firefox Download your desired version of Firefox. Unpack them in your user home directory, and name folders for easy navigation to firenightly and firedevedition or similar. ...
... Now run your Firefox Profile Manager. (Linux, Mac OS X, Windows instructions.) You'll see the list of available user profiles one which is default (stable) and other (unstable) profile(s) created automatically when you run other versions of Firefox earlier. ...
...And 6 more matches
Getting Started - Archive of obsolete content
A .jar file is in reality a renamed zip archive. ...
...the help dialog window. skin\classic\messenger messenger contains styles of the mail client. skin\classic\messenger-newsblog messenger-newsblog contains the only CSS file. skin\classic\mozapps mozapps contains all the styles and icons for the browser peripherals, such as the extension manager or update wizard. skin\classic\navigator navigator contains some icons and styles for all SM components. Install Your New Theme Before you can see the changes you make to a SeaMonkey theme (since live edits are restrictively difficult to set up) you must first learn how to repackage the classic theme to make it installable. For the sake of this discussion we will call your theme "My_Theme", though you can replace that with any name. Copying The Necessary Files The first step is to move all the files into th...
...ory structure. So create a new directory called My_Theme. Create a directory called chrome inside it. Into this directory put a ZIP archive called My_Theme.jar containing navigator, global, communicator, editor, help, messenger, messenger-newsblog and mozapps directories from above. (Yes, this means that the structure of your new directory and classic.jar will be slightly different.) Creating the Install Files Icon.png and preview.png These are some PNG images containing the icon and the preview of the theme. Chrome.manifest Make a copy of chrome.manifest and place it in \My_Theme and open it up in your text editor. This file is a small manifest file which is used to describe the skin. In the code search for all instances of "My_Theme" and replace them with the name of your theme. The packages se...
...And 6 more matches
Getting Started - Archive of obsolete content
Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. ...
...Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. ...
...Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. ...
...And 6 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
A .jar file is in reality a renamed zip archive. Opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive. However, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction. ...
...A .jar file is in reality a renamed zip archive. Opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive. However, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction. ...
...tly. skin\classic\global global contains almost all of the important CSS files that define the appearance of the browser. This is the most critical directory in a theme. skin\classic\help help contains all the files for theming the help dialog window. skin\classic\mozapps mozapps contains all the styles and icons for the browser peripherals, such as the extension manager or update wizard. Install Your New Theme Before you can see the changes you make to a Firefox theme (since live edits are restrictively difficult to set up) you must first learn how to repackage the classic theme to make it installable. For the sake of this discussion we will call your theme "My_Theme", though you can replace that with any name. Copying The Necessary Files The first step is to move all the files into t...
...And 6 more matches
Examples - Archive of obsolete content
Examples Trigger Scripts and Install Scripts describes typical kinds of script that use the XPInstall API. ...
... Examples Trigger Scripts and Install Scripts describes typical kinds of script that use the XPInstall API. ...
... Examples Trigger Scripts and Install Scripts describes typical kinds of script that use the XPInstall API. ...
...And 6 more matches
addFile - Archive of obsolete content
addFile Unpacks a single subcomponent into a temporary location. Queues the subcomponent for addition to the Client Version Registry and installation to its final destination. Method of Install object Syntax public int addFile ( String registryName, InstallVersion version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate); public int addFile ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate); public int addFile ( String xpiSourcePath); public int addFile ( String registryName, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); public int addFile ( String registryName, String version, String ...
...t Version Registry about the file. This parameter can be an absolute pathname, such as /royalairways/RoyalSW/executable or a relative pathname, such as executable. ...
... xpiSourcePath A string specifying the location of the file within the XPI file. ...
...And 6 more matches
Return Codes - Archive of obsolete content
Return Codes The methods described in this chapter can return any of the following return codes. In Mozilla/SeaMonkey, these constants are defined as part of the xpinstall object (formerly the SoftwareUpdate object in Netscape Communicator 4.5). Name Code Explanation SUCCESS 0 Success. REBOOT_NEEDED 999 The files were installed, but one or more components were in use. Restart the computer and the application to complete the installation process. On Windows NT, you may only need to restart the application as long as you did not replace operating system files. BAD_PACKAGE_NAME -200 A problem occurred with the package name supplied to initInstall UNEXPECTED_ERROR ...
..._PACKAGE_NAME -200 A problem occurred with the package name supplied to initInstall UNEXPECTED_ERROR -201 An unrecognized error occurred. ACCESS_DENIED -202 The user (or the OS) did not grant the required security privilege. EXECUTION_ERROR -203 An error occurred executing the script NO_INSTALL_SCRIPT -204 Installation script was not signed NO_CERTIFICATE -205 Extracted file is not signed or the file (and, therefore, its certificate) could not be found. NO_MATCHING_CERTIFICATE -206 Extracted file was not signed by the certificate used to sign the installation script CANT_READ_ARCHIVE -207 XPI...
... NO_SUCH_COMPONENT -213 The specified component is not present in the Client Version Registry. DO...
...And 6 more matches
Building accessible custom components in XUL - Archive of obsolete content
TML. There is generally no need to build your own XUL tab bar or treeview. Firefox ships with a tabbox element and a tree element, and these elements are fully accessible out-of-the-box. However, if you are building custom controls in XUL, you may need to use DHTML Accessibility techniques to ensure that your custom controls are equally accessible. A Super-Simple Spreadsheet Download stage-1.zip install stage-1.xpi To build our XUL spreadsheet, we'll use three built-in XUL controls: A single grid element to contain the other elements and position them in rows and columns. description elements for each row and column header. label elements for each cell in the spreadsheet. The XUL markup is straightforward. We define the grid, then define the headers for each row (numbered 1 through 7), then d...
...The final product looks like this: <caption>XUL spreadsheet with 7 rows and 5 columns</caption> Although this has the visual layout of a spreadsheet, assistive technologies will only see it as a collection of individual, unrelated text labels. If we inspect this with the MSAA Inspect32 tool, we see that each ce...
...mn header, but it's not</caption> So, before we do anything else, we need to tell assistive technologies that all of these unrelated elements are actually related. This is where DHTML Accessibility comes in. Further reading grid element reference description element reference label element reference grid tutorial label tutorial Adding Roles With DHTML Accessibility Download stage-2.zip install stage-2.xpi Using the new DHTML Accessibility techniques in Firefox 1.5, we can declare the role of each element in our spreadsheet. The grid element is really a spreadsheet. Each label element is really a cell within the spreadsheet. Each description element is really a row or column header within the spreadsheet. You can find a list of all the supported roles in Firefox 1.5 on mozilla.org. R...
...And 6 more matches
Custom toolbar button - Archive of obsolete content
's menu bar, choose View - Character Encoding - Unicode (UTF-8). Check that the text you typed looks OK with this setting. If your text editor does not support UTF-8, search the Internet for a better one that you can download. Optional tools You can optionally use any image editor to customize the images. You can optionally use a jar tool or zip tool to package your button as a cross-platform installable (XPI) for other people to install and use. Making a button There are ten easy steps. When you have completed all the steps, you will have a structure like this in your profile directory: The profile directory and the extensions directory already exist. You will add the other directories and files that are shown in the diagram. (Other directories and files also exist, but the diagram ...
...s and files also exist, but the diagram does not show them.) 1. Go to the profile directory that you use for the application, then go to the extensions directory there. Note: For information about how to find the profile directory, see: Profile folder Explanation: The profile directory contains information specific to a user, keeping it separate from the application. If the application is reinstalled or upgraded, information in the profile is not affected. 2. In the extensions directory, create a new directory with the following name. Copy the name from here and paste it, to avoid typing errors: custom-toolbar-button@example.com Perform the following steps in this new directory, creating two files and a directory there. Explanation: The name is a unique identifier for the extension...
...th the following name. Copy the name from here and paste it, to avoid typing errors: custom-toolbar-button@example.com Perform the following steps in this new directory, creating two files and a directory there. Explanation: The name is a unique identifier for the extension. There is more information about identifiers in a later section of this tutorial. 3. ...
...And 6 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.9.2.x is built from the same source code snapshot as Firefox 3.6.x. Current Version The current version of XULRunner 1.9.2 is 3.6.26, matching Firefox 3.6.26 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using an arch...
...ack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9.2 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). ...
...all users) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. Linux Unpack the tarball to a new directory using tar -xjf xulrunner-3.6.26.en-US.linux-i686.tar.bz2. The following directory is recommended: /opt/xulrunner/1.9.2 . Register XULRunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). Uninstalling XULRunner Linux From a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister XULRunner just as you registered it during installation. Remove the XULRunner directory. Windows From a command prompt, run xulrunner.exe --unregister-global or xulrun...
...And 6 more matches
Archived Mozilla and build documentation - Archive of obsolete content
n on creating extension in earlier browsers. Creating a hybrid CD Creating a Microsummary A microsummary generator is a set of instructions for creating a microsummary from the content of a page. Web pages can reference generators via <link rel="microsummary"> elements in their <head> elements. Generators can also be independently downloaded and installed by users if they include a list of pages to which they apply. Creating a Mozilla Extension A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the...
...ng the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. Creating a Skin for Firefox/Getting Started Download the latest version of Firefox and install it. Be sure to install the DOM Inspector extension as well. Creating a Skin for Mozilla In order to create a skin for mozilla, you will need to know three things. How to edit images, extract zip files, and how to modify CSS. Mozilla uses standard gif, png, and jpeg images for the buttons and CSS to style everything else in the interface. Creatin...
...n instances. These components and services include: Force RTL (This is a temporary placeholder/stub for the Force RTL page) Gecko Coding Help Wanted Take a look through LXR, and you'll realize that Mozilla's source code is a big place. GRE Hacking wiki To be able to hack the MDC wiki software, you'll need a local webserver install, which can run MediaWiki. Help Viewer Help Viewer: Allows information to be shown to the user inside Mozilla. Helper Apps (and a bit of Save As) Hidden prefs This page has been flagged by editors or users as needing technical review. Until it is fully reviewed, it may contain inaccurate or incorrect informati...
...And 6 more matches
Getting started with Svelte - Learn web development
the project, and see how to run it locally and build it for production. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. Svelte is a compiler that generates minimal and highly optimized JavaScript code from our sources; you'll need a terminal with node + npm installed to compile and build your app. Objective: To setup a local Svelte development environment, create and build a starter app, and understand the basics of how it works. Svelte: A new approach to building rich user interfaces Svelte provides a different approach to building web apps than some of the other frameworks covered in this module. While frameworks like React and Vue...
...avaScript syntax nor alienate developers. In fact, you will be mostly working with vanilla JavaScript. First steps with Svelte Being a compiler, you can't just add a <script src="svelte.js"> tag to your page and import it into your app. You'll have to set up your development environment in order to let the compiler do its job. ...
...Gitbash (which comes as part of the git for Windows toolset) or Windows Subsystem for Linux (WSL) are both suitable. Cmder is another very good and complete alternative. See Command line crash course for more information on these, and on terminal commands in general. ...
...And 6 more matches
Handling common JavaScript problems - Learn web development
, including metrics, warnings, and errors. Code editor plugins It is not very convenient to have to copy and paste your code over to a web page to check its validity several times. What you really want is a linter that will fit into your standard workflow with the minimum of hassle. Many code editors have linter plugins, for example Github's Atom code editor has a JSHint plugin available. To install it: Install Atom (if you haven't got an up-to-date version already installed) -- download it from the Atom page linked above. Go to Atom's Preferences... dialog (e.g. by Choosing Atom > Preferences... on Mac, or File > Preferences... on Windows/Linux) and choose the Install option in the left-hand menu. In the Search packages text field, type "jslint" and press Enter/Return to search for lin...
...After that, install the linter-jshint plugin. ...
...After that, install the linter-jshint plugin. ...
...And 6 more matches
Chrome registration
ovider will provide CSS files and images. Note: Scripts (including those found in XBL) loaded from skin packages will not execute. The chrome registry The Gecko runtime maintains a service known as the chrome registry that provides mappings from chrome package names to the physical location of chrome packages on disk. This chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale. This is accomplished through xpinstall and the extension manager. In order to inform the chrome registry of the available chrome, a text manifest is used: this manifest is "chrome.manifest" in the root of an extension, or theme, or XULRunner application. The plaintext chrome manifests are in a simple line-based format. Each lin...
...untry identifier "en-US". If more than one locale is registered for a package, the chrome registry will select the best-fit locale using the user's preferences. skin A skin package is registered with the line: skin packagename skinname uri/to/files/ [flags] This will register a skin package when resolving the URI chrome://packagename/skin/... . The skinname is an opaque string identifying an installed skin. If more than one skin is registered for a package, the chrome registry will select the best-fit skin using the user's preferences. style Style overlays (custom CSS which will be applied to a chrome page) are registered with the following syntax: style chrome://URI-to-style chrome://stylesheet-URI [flags] Note: Only stylesheets at chrome URIs can be applied in this way. override In ...
... are no security restrictions preventing web content from including content at resource: URIs, so take care what you make visible there. Manifest flags Manifest lines can have multiple, space-delimited flags added at the end of the registration line. These flags mark special attributes of chrome in that package, or limit the conditions under which the line is used. application Extensions may install into multiple applications. There may be chrome registration lines which only apply to one particular application. The flag application=app-ID indicates that the instruction should only be applied if the extension is installed into the application identified by app-ID. Multiple application flags may be included on a single line, in which case the line is applied if any of the flags match. Thi...
...And 6 more matches
Simple SeaMonkey build
t are: Recommended: 8GB of RAM (having only 4GB RAM and 4GB swap may give memory errors during compile) 35 GB free disk space. This will accomodate Visual Studio 2013 Community Edition, the required SDKs, the MozillaBuild package, the Mercurial source repository and enough free disk space to compile. A fast SSD is recommended; the Firefox build process is I/O-intensive. High speed internet Installing build tools If your system is not listed below, see the build prerequisites page. Debian Linux: # this one-liner should install all necessary build deps sudo aptitude install zip mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.1...
...ev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev Ubuntu Linux # for Ubuntu 12.04 LTS (Precise Pangolin), replace the following line with: sudo apt-get build-dep thunderbird sudo apt-get build-dep seamonkey sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libnotify-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libiw-dev libxt-dev mesa-common-dev libpulse-dev Fedora Linux CentOS RHEL: sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software D...
...g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libnotify-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libiw-dev libxt-dev mesa-common-dev libpulse-dev Fedora Linux CentOS RHEL: sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel gstreamer-devel gstreamer-plugins-base-devel pulseaudio-libs-devel # 'Development tools' is defunct in Fedora 19 and above use the following sudo yum groupinstall 'C Development Tools and Libraries' sudo yum group mark install "X Software Development" Mac: ...
...And 6 more matches
Addon
Instances can be created using the many getAddon methods on the AddonManager object. The interface can represent many different kinds of add-ons and as such, some of the methods and properties are considered "required" and others "optional," which means that the optional methods or property may not exist on Addon instances for some types of add-ons. API consumers should take care to verify the existence of these methods or properties before relying on them. ...
...ns. API consumers should take care to verify the existence of these methods or properties before relying on them. ...
...re to verify the existence of these methods or properties before relying on them. Overview of required methods void isCompatibleWith(in string appVersion, in string platformVersion) void findUpdates(in UpdateListener listener, in integer reason, in string appVersion, in string platformVersion) Overview of optional methods void uninstall() void cancelUninstall() boolean hasResource(in string path) nsIURI getResourceURI(in string path) void getDataDirectory(in DataDirectoryCallback callback) Required properties Attribute Type Description appDisabled Read only boolean True if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting. ...
...And 6 more matches
Code Samples
Simply replace YOUREXTENSIONID with your add-on's ID. ...
...("resource://gre/modules/AddonManager.jsm"); AddonManager.getAddonByID("my-addon@foo.com", function(addon) { alert("My extension's version is " + addon.version); alert("Did I remember to include that file.txt file in my XPI? " + addon.hasResource("file.txt") ? ...
...ert("Did I remember to include that file.txt file in my XPI? " + addon.hasResource("file.txt") ? ...
...And 6 more matches
Localizing with Mercurial
is hosted on the Mozilla servers (hg.mozilla.org). Localizing current versions of Firefox, Thunderbird and SeaMonkey includes working with Mercurial. If the documentation is incomplete or you have questions, please drop by the #l10n or #hg channels on irc.mozilla.org. The Mercurial FAQ are also worth a read, should you run into trouble. ...
...ion is incomplete or you have questions, please drop by the #l10n or #hg channels on irc.mozilla.org. The Mercurial FAQ are also worth a read, should you run into trouble. For the eager and quick, below you'll find instructions on installing and configuring Mercurial, instructions on receiving an Hg account commit priviledges, as well as a few tasks you can complete without account priviledges. Installing Mercurial Follow the instructions below to install Mercurial on your system. Once you've installed Mercurial, we'll walk through the steps to configure it. Mercurial on Linux You can easily install Mercurial from the command line by issuing one of the following commands. Choose the appropriate command for your distribution and make sure to run as root. # Debian/ubuntu $ apt-get install mer...
...he instructions below to install Mercurial on your system. Once you've installed Mercurial, we'll walk through the steps to configure it. Mercurial on Linux You can easily install Mercurial from the command line by issuing one of the following commands. Choose the appropriate command for your distribution and make sure to run as root. # Debian/ubuntu $ apt-get install mercurial # Fedora $ yum install mercurial # Gentoo $ emerge mercurial # Arch Linux $ pacman -S mercurial # OpenSolaris $ pkg install SUNWmercurial If you prefer a graphical interface, you can download and install MercurialEclipse here. Did it work? Open a Terminal window and enter hg --version. If you see a message about the version of Mercurial (e.g. Mercurial Distributed SCM (version 1.3.1)), you have installed Mercuri...
...And 6 more matches
Theme Packaging
underbird. Pre-requisites Making a theme for Thunderbird requires knowledge of Cascading Stylesheets (CSS), probably XBL, and some graphic design and aesthetic skill (...or maybe not). This document describes only how Themes are packaged in order to be shown in Firefox's Themes window. Theme File Layout Thunderbird themes are packaged in an XPI file with the following structure: theme.xpi: install.rdf preview.png icon.png chrome/ browser/files communicator/files global/files mozapps/files ... You must have a top-level chrome.manifest file which registers the chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the Appearance section of the Add-ons Manager. preview.png is a preview image ...
...all.rdf manifest that specifies metadata that is displayed in the Appearance section of the Add-ons Manager. preview.png is a preview image which will show when double-clicked on a theme in the Appearance section of the Add-ons Manager. It can be any size. icon.png is a 32x32 (max. 48x48) PNG (may contain alpha transparency) which will show up in the Appearance section of the Add-ons Manager. ...
...hat specifies metadata that is displayed in the Appearance section of the Add-ons Manager. preview.png is a preview image which will show when double-clicked on a theme in the Appearance section of the Add-ons Manager. It can be any size. icon.png is a 32x32 (max. 48x48) PNG (may contain alpha transparency) which will show up in the Appearance section of the Add-ons Manager. install.rdf Your install.rdf manifest will look something like this: <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:type>4</em:type> more properties </Description> </RDF> Required install.rdf Properties Your install.rdf file must have the following properties. See t...
...And 6 more matches
Deploying a Plugin as an Extension - Archive of obsolete content
One of the new features available in Firefox 1.5 is the ability to place browser plugins in a Firefox extension. This feature is particularly useful for vendors who wish to deploy the plugin even if Firefox is not currently installed, or who want to use the automatic extension update mechanism to update their plugin to a newer version. Historically, most people have chosen to use an install.js script to install a plugin. When this method is used, you can choose to either place the plugin into the plugins directory, or, on Windows, place it into your own directory and modify the Windows registry to let Firefox know where to find the plugin. The downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin. With Fi...
...y to let Firefox know where to find the plugin. The downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin. With Firefox 1.5, you can use the built-in extension mechanism to make a plugin available to your users. This allows the plugin to be treated like other Firefox extensions; it can be upgraded, disabled, or uninstalled using the Firefox user interface. In this article, we will create an extension for the Rhapsody Player Engine. Normally, this plugin is installed in a local directory, and a registry item is used to let Firefox know about the plugin. ...
...it can be upgraded, disabled, or uninstalled using the Firefox user interface. In this article, we will create an extension for the Rhapsody Player Engine. Normally, this plugin is installed in a local directory, and a registry item is used to let Firefox know about the plugin. First, let's take a look at the structure of the XPI file used for a browser plugin. RhapsodyPlayerEngine_Inst_Win.xpi install.rdf plugins/ license.rtf nprhapengine.dll The important file here is the install.rdf file. This contains information about our extension; all extensions have one. ...
...And 5 more matches
compareTo - Archive of obsolete content
compareTo Compares the version information specified in this object to the version information specified in the version parameter. Method of InstallVersion object Syntax compareTo ( InstallVersion version); compareTo ( String version); compareTo ( int major, int minor, int release, int build); Parameters The compareTo method has the following parameters: maj The major version number. min Minor version number. rev Revision number. bld Build number. version An InstallVersion object or a String representing version information in the format "4.1.2.1234". Returns If the versions are the same, this method returns 0. If this version object represents a smaller (earlier) version than that represented by the version parame...
...er (newer) build number than version. 2 This version object has a larger (newer) release number than version. 3 This version object has a larger (newer) minor number than version. 4 This version object has a larger (newer) major number than version. ...
...ion. 2 This version object has a larger (newer) release number than version. 3 This version object has a larger (newer) minor number than version. 4 This version object has a larger (newer) major number than version. ...
...And 5 more matches
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
the Mozilla XULRunner application framework. It replaces version 1.8.0.1; all users should upgrade. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. As of December 2008,XULRunner 1.9.0.4 is available in the "Gecko 1.9.0" branch upon which Firefox 3 is based. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory usin...
...e ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.8.0.4 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). ...
...) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. Linux Unpack the tarball to a new directory using tar -xzf xulrunner-1.8.0.4.en-US.linux-i686.tar.gz. The following directory is recommended: /opt/xulrunner/1.8.0.4 . Register XULRunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). Uninstalling XULRunner Linux From a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister XULRunner just as you registered it during installation. Remove the XULRunner directory. Windows From a command prompt, run xulrunner.exe --unregister-global o...
...And 5 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
work. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.9.1.x is built from the same source code snapshot as Firefox 3.5.x. Current Version The current version of XULRunner is 1.9.1.19, matching Firefox 3.5.19 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using...
...the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9.1 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). ...
...s) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. Linux Unpack the tarball to a new directory using tar -xjf xulrunner-1.9.1.19.en-US.linux-i686.tar.bz2. The following directory is recommended: /opt/xulrunner/1.9.1 . Register XULRunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). Uninstalling XULRunner Linux From a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister XULRunner just as you registered it during installation. Remove the XULRunner directory. Windows From a command prompt, run xulrunner.exe --unregister-global or ...
...And 5 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
upgrade. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.9 is built from the same source code snapshot as Firefox 3. Current Version The current version of XULRunner is 1.9.0.17, matching Firefox 3.0.17 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory usin...
...k the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). ...
...rs) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. Linux Unpack the tarball to a new directory using tar -xjf xulrunner-1.9.0.17.en-US.linux-i686.tar.bz2. The following directory is recommended: /opt/xulrunner/1.9 . Register XULRunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). Uninstalling XULRunner Linux From a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister XULRunner just as you registered it during installation. Remove the XULRunner directory. Windows From a command prompt, run xulrunner.exe --unregister-global o...
...And 5 more matches
Solaris 10 Build Prerequisites - Archive of obsolete content
Optional Software JDS Common Build Environment (CBE). Provides build tools needed by some open-source projects (eg Gnome). The tools included with Solaris and Sun Studio should be sufficient for building Mozilla, so you can skip this. The installer must install additional Sun-provided packages from the OS install DVD, so that DVD has to be available. The installer will try to install the SUNWsmbaS package, which is not available in newer versions of SXDE. ...
... Run . /opt/jdsbld/bin/env.sh to import the JDS CBE settings into your environment. Build Environment 1. ...
... Run . /opt/jdsbld/bin/env.sh to import the JDS CBE settings into your environment. Build Environment 1. ...
...And 5 more matches
Sunbird Theme Tutorial - Archive of obsolete content
This tutorial is a step-by-step guide to making a theme for Sunbird 0.3a1 and later versions. It is designed for beginners. It does not cover advanced topics. You might be able to apply the same method to other Mozilla applications by changing some of the details. Introduction A theme is a package that users can install in an application to change the appearance of the application, without changing how the application works. For example, a theme can change the size and colour of the toolbar buttons, and provide different icons on the buttons. But a theme cannot provide an extra button. What do you need to make a theme? To make a theme, you usually need these tools: A jar tool or zip tool An editor for plain text files Software for creating and editing images Note: Some zip too...
...g else. If you want to make it clear that your made-up name is not a real domain, add <tt>.invalid</tt> to the end. Create a new directory in the <tt>extensions</tt> directory. Use the identifer as your new directory's name. This new directory is your theme directory. Go into your theme directory. ...
... Go into your theme directory. Creating information about your theme In your theme directory, create a plain text file named <tt>install.rdf</tt>. ...
...And 5 more matches
Plug-in Development Overview - Gecko Plugin API Reference
the appropriate Plug-in API methods for basic plug-in operation. You'll find an overview of the Plug-in API methods in this chapter, as well as separate chapters for all of the major functional areas of the Plug-in API. Also see Making Plug-ins Scriptable for more information about making plug-ins accessible from the browser. Build the plug-in for your operating system. See "Building Plug-ins". Install the plug-in in the plug-in directory for your operating system. See Installing Plug-ins. Test your plug-in and debug as necessary. Create an HTML page and embed the plug-in object. For information about the HTML elements to use, see Using HTML to Display Plug-ins. To see your plug-in in action, simply display the HTML page that calls it in the browser. Registering Plug-ins Gecko identifies a...
... or from the server. The server looks for the MIME type registered by a plug-in, based on the file extension, and starts sending the file to the browser. The browser looks up the media type, and if it finds a plug-in registered to that type, loads the plug-in software. When it starts up, the browser checks for plug-in modules for the platform and registers them. It determines which plug-ins are installed and which types they support through a combination of user preferences that are private to the browser, the contents of the plug-ins directory, or the registry on Windows. A MIME type is made up of a major type (such as application or image) and a minor type, for example, image/jpeg. If you define a new MIME type for a plug-in, you must register it with IETF (Internet Engineering Task Force). ...
...on different platforms. The following sections describe platform-specific discovery and registration: MS Windows Unix Mac OS X MS Windows On Windows, plug-ins are found according to the section How Gecko Finds Plug-ins. To determine the MIME types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the registry. But when the plug-in is loaded from a well-known directory, a different method must be used. In this case to ensure the plug-in file will be loaded, it should have a name in the form of "np*.dll". Also, the Windows version information for the plug-in DLL will be used to determines the MIME types, file extensions, file open template, plug-in name, and description. For th...
...And 5 more matches
What text editors are available? - Learn web development
Prerequisites: You should already know about various software you need to build a website. Objective: Learn how to choose a text editor that best suits your needs as a web developer. Summary A website consists mostly of text files, so for a fun, pleasant development experience you should choose your text editor wisely. The sheer number of choices is a bit overwhelming, since a text editor is so basic to computer science (yes, web development is computer science). Ideally, you'd try as many editors as you can and get a feel for what suits your workflow. ...
... Try digging through the settings of your editor and read the manual or documentation to see what its capabilities are. In particular (if pos...
...cense Free Windows, Mac, Linux Mailing list Online Manual Yes Visual Studio Code Open Source under MIT licence/ Specific licence for product Free Windows, Mac, Linux FAQ Documentation Yes Active Learning In this active learning section, we would like you to try using and/or installing a text editor of your choice. Your computer may already be installed with one of the editors suggested above (e.g. Gedit if you use GNOME desktop, Kate if you use KDE etc.), if not then you should try installing one or more text editors of your choosing. Try digging through the settings of your editor and read the manual or documentation to see what its capabilities are. In particular (if possible in your editor), try to: Change syntax highlighting settings ...
...And 5 more matches
Setting up your own test automation environment - Learn web development
We will also look at how to integrate your local testing environment with commercial tools like the ones discussed in the previous article. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages; an idea of the high-level principles of cross browser testing, and automated testing. ...
...opular browser automation tool. There are other ways, but the best way to use Selenium is via WebDriver, a powerful API that builds on top of Selenium and makes calls to a browser to automate it, carrying out actions such as "open this web page", "move over this element on the page", "click this link", "see whether the link opens this URL", etc. This is ideal for running automated tests. How you install and use WebDriver depends on what programming environment you want to use to write and run your tests. Most popular environments have available a package or framework that will install WebDriver and the bindings required to communicate with WebDriver using this language, for example, Java, C#, Ruby, Python, JavaScript (Node), etc. See Setting Up a Selenium-WebDriver Project for more details of Se...
...iliar environment for front end devs. Note: If you want to find out how to use WebDriver with other server-side environments, also check out Platforms Supported by Selenium for some useful links. Setting up Selenium in Node To start with, set up a new npm project, as discussed in Setting up Node and npm in the last chapter. Call it something different, like selenium-test. ...
...And 5 more matches
AddonListener
AddonListeners can be registered with addAddonListener() and will then receive notification of changes to the add-ons currently installed. These notifications come in the form of calls to methods on the listener object. A listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems. ...
...istener object. A listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems. Method Overview void onEnabling(in Addon addon, in boolean needsRestart) void onEnabled(in Addon addon) void onDisabling(in Addon addon, in boolean needsRestart) void onDisabled(in Addon addon) void onInstalling(in Addon addon, in boolean needsRestart) void onInstalled(in Addon addon) void onUninstalling(in Addon addon, in boolean needsRestart) void onUninstalled(in Addon addon) void onOperationCancelled(in Addon addon) void onPropertyChanged(in Addon addon, in string properties[]) Methods onEnabling() Called when an add-on is about to be enabled. ...
...n an add-on is about to be disabled. void onDisabling( in Addon addon, in boolean needsRestart ) Parameters addon The Addon that is being disabled needsRestart True if an application restart is necessary for the change to take effect onDisabled() Called when an add-on has been disabled. ...
...And 5 more matches
Encodings for localization files
When creating a localization for Mozilla products, it's important to be aware of the encoding of the files that you generate. In general, files in the Mozilla repositories are UTF-8 encoded. There are a few exceptions, though. Installer The Windows installer can't handle UTF-8, but only the codepages provided by Windows. This is tricky to hook up in the build process, so here it goes: File Encoding Notes toolkit/installer/windows/charset.mk ASCII The WIN_INSTALLER_CHARSET variable must be set to an encoding which matches toolkit/installer/windows/install.it CHARSET= parameter. See the table below for appropriate values. toolkit/installer/windows/install.it A Windows codepage. This must match the CHARSET= parameter in this file, and the WIN_INS...
... the WIN_INSTALLER_CHARSET parameter in charset.mk The FONTNAME/FONTSIZE/CHARSET parameters in this file must be set to good values. For most Western scripts, 'MS Sans Serif' and '8' are good defaults for the font settings. Eastern scripts will need to choose appropriate fonts that are shipped with Windows. See the table below for appropriate values for the CHARSET= parameter. ...
...NSTALLER_CHARSET parameter in charset.mk The FONTNAME/FONTSIZE/CHARSET parameters in this file must be set to good values. For most Western scripts, 'MS Sans Serif' and '8' are good defaults for the font settings. Eastern scripts will need to choose appropriate fonts that are shipped with Windows. See the table below for appropriate values for the CHARSET= parameter. ...
...And 5 more matches
nsIBrowserSearchService
by then, but this is an issue if your code is executed during startup. If you need to write code that is executed during startup and makes use of nsIBrowserSearchService, you should make sure that this code is executed from the callback to init(). ...
...t the supplied URI, optionally asking the user for confirmation first. If a confirmation dialog is shown, it will offer the option to begin using the newly added engine right away; if no confirmation dialog is shown, the new engine will be used right away automatically. void addEngine( in AString engineURL, in long dataType, in AString iconURL, in boolean confirm, [optional] in nsISearchInstallCallback callback ); Parameters engineURL The URL to the search engine's description file. dataType An integer representing the plugin file format. Must be one of the supported search engine data types defined above. iconURL A URL string to an icon file to be used as the search engine's icon. This value may be overridden by an icon specified in the engin...
...e's icon. This value may be overridden by an icon specified in the engine description file. confirm A boolean value indicating whether the user should be asked for confirmation before this engine is added to the list. If this value is false, the engine will be added to the list upon successful load, but it will not be selected as the current engine. callback A nsISearchInstallCallback that will be notified when the addition is complete, or if the addition fails. It will not be called if addEngine throws an exception. Exceptions thrown NS_ERROR_FAILURE If the type is invalid, or if the description file cannot be successfully loaded. addEngineWithDetails() Adds a new search engine, without asking the user for confirmation and without starting to use it r...
...And 5 more matches
nsIUpdateItem
adata describing the item. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface is obsolete; instead of using the Extension Manager, you should use the Addon Manager. Method overview void init(in AString id, in AString version, in AString installLocationKey, in AString minAppVersion, in AString maxAppVersion, in AString name, in AString downloadURL, in AString xpiHash, in AString iconURL, in AString updateURL, in AString updateKey, in long type, in AString targetAppID); Attributes Attribute Type Description iconURL AString The URL of the icon that can be shown for this item. Read only. id ...
...AppVersion, in AString name, in AString downloadURL, in AString xpiHash, in AString iconURL, in AString updateURL, in AString updateKey, in long type, in AString targetAppID); Attributes Attribute Type Description iconURL AString The URL of the icon that can be shown for this item. Read only. id AString The GUID of the item. Read only. installLocationKey AString The name of the Install Location where this item is installed. Read only. maxAppVersion AString The maximum version of the application that this item works with, in FVF format. Read only. minAppVersion AString The minimum version of the application that this item works with, in FVF format. Read only. name AString The name of th...
...ks with, in FVF format. Read only. name AString The name of this item. Read only. objectSource AString Returns a JS Object source representing an nsIUpdateItem. Read only. targetAppID AString The target application ID used for checking compatibility for this item. Note: Add-ons can specify a targetApplication id of toolkit@mozilla.org in their install manifest for compatibility with all apps using a specific release of the toolkit. Read only. type long The type of this item. Read only. updateKey AString The public key to verify updates for this item. This must be the public part of the key that was used to sign update manifests for this add-on. Read only. updateRDF AString The URL of the update RD...
...And 5 more matches
Plug-in Development Overview - Plugins
the appropriate Plug-in API methods for basic plug-in operation. You'll find an overview of the Plug-in API methods in this chapter, as well as separate chapters for all of the major functional areas of the Plug-in API. Also see Making Plug-ins Scriptable for more information about making plug-ins accessible from the browser. Build the plug-in for your operating system. See "Building Plug-ins". Install the plug-in in the plug-in directory for your operating system. See Installing Plug-ins. Test your plug-in and debug as necessary. Create an HTML page and embed the plug-in object. For information about the HTML elements to use, see Using HTML to Display Plug-ins. To see your plug-in in action, simply display the HTML page that calls it in the browser. Registering Plug-ins Gecko identifies a...
... or from the server. The server looks for the MIME type registered by a plug-in, based on the file extension, and starts sending the file to the browser. The browser looks up the media type, and if it finds a plug-in registered to that type, loads the plug-in software. When it starts up, the browser checks for plug-in modules for the platform and registers them. It determines which plug-ins are installed and which types they support through a combination of user preferences that are private to the browser, the contents of the plug-ins directory, or the registry on Windows. A MIME type is made up of a major type (such as application or image) and a minor type, for example, image/jpeg. If you define a new MIME type for a plug-in, you must register it with IETF (Internet Engineering Task Force). ...
...on different platforms. The following sections describe platform-specific discovery and registration: MS Windows Unix Mac OS X MS Windows On Windows, plug-ins are found according to the section How Gecko Finds Plug-ins. To determine the MIME types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the registry. But when the plug-in is loaded from a well-known directory, a different method must be used. In this case to ensure the plug-in file will be loaded, it should have a name in the form of "np*.dll". Also, the Windows version information for the plug-in DLL will be used to determines the MIME types, file extensions, file open template, plug-in name, and description. For th...
...And 5 more matches
ServiceWorkerRegistration - Web APIs
list of active ServiceWorkerRegistration objects. Note: This feature is available in Web Workers. Properties Also implements properties from its parent interface, EventTarget. ServiceWorkerRegistration.scope Read only Returns a unique identifier for a service worker registration. This must be on the same origin as the document that registers the ServiceWorker. ServiceWorkerRegistration.installing Read only Returns a service worker whose state is installing. This is initially set to null. ServiceWorkerRegistration.waiting Read only Returns a service worker whose state is installed. This is initially set to null. ServiceWorkerRegistration.active Read only Returns a service worker whose state is activated. This is initially set to null. An active worker will control a ServiceWorke...
...cSyncManager interface, which manages periodic background synchronization processes. This was mentioned as an idea in the SW explainer at some point, but as yet has not been implemented anywhere. Event handlers ServiceWorkerRegistration.onupdatefound Read only An EventListener property called whenever an event of type updatefound is fired; it is fired any time the ServiceWorkerRegistration.installing property acquires a new service worker. Methods Also implements methods from its parent interface, EventTarget. ServiceWorkerRegistration.getNotifications() Returns a Promise that resolves to an array of Notification objects. ServiceWorkerRegistration.showNotification() Displays the notification with the requested title. ServiceWorkerRegistration.update() Checks the server for an up...
...s state. If the service worker hasn't changed since the last time it was registered, then the updatefound event will not be fired. ...
...And 5 more matches
Getting Started (jpm) - Archive of obsolete content
cribes how to develop using jpm. This tutorial walks through creating a simple add-on using the SDK. Prerequisites To create add-ons for Firefox using the SDK, you'll need: Firefox version 38 or later. If you need to work with earlier versions of Firefox, you'll need to use the old cfx tool. See instructions for getting started with cfx. the command-line jpm tool. See the instructions for installing jpm. Once you've done that, you'll be looking at a command prompt. Install Firefox Developer Version for testing your add-on. Initializing an empty add-on In the command prompt, create a new directory. Navigate to it, type jpm init, and hit enter: mkdir my-addon cd my-addon jpm init You'll then be asked to supply some information about your add-on: this will be used to create your add-o...
...in the "lib" directory under the add-on's root. Save the file. Next, create a directory called "data" in your add-on's root, mkdir data and save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png Back at the command prompt, type: jpm run This is the jpm command to run a new instance of Firefox with your add-on installed. If Firefox can not be located, or you have installed Firefox Developer as an alternate browser, you may need to provide the path to it. For example, in Ubuntu: jpm run -b /usr/bin/firefox When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with http://www.mozilla.org/ loaded into it. That's all this...
....png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://developer.mozilla.org/"); } At the command prompt, execute jpm run again. This time clicking it takes you to https://developer.mozilla.org/. Packaging the add-on When you've finished the add-on and are ready to distribute it, you'll need to package it as an XPI file. This is the installable file format for Firefox add-ons. You can distribute XPI files yourself or publish them to https://addons.mozilla.org so other users can download and install them. To build an XPI, just execute the command jpm xpi from the add-on's directory: jpm xpi You should see a message like: JPM info Successfully created xpi at /path/to/my-addon/@my-addon-0.0.1.xpi To test that this worked, try in...
...And 4 more matches
Getting Started with Firefox Extensions - Archive of obsolete content
ove traditional ones in complexity, so you should go through this tutorial before giving them a try. We'll begin the tutorial by analyzing a very simple extension. The Hello World Extension Our sample extensions and this tutorial in general are meant for modern versions of Firefox, but most of it works on older versions too. We'll now begin with a basic "Hello World" extension. Let's start by installing it. Click on the link below. NOTE: This extension is unsigned. Starting with Firefox 43, extensions need to be signed by Mozilla before they can be installed in Firefox. Unsigned add-ons can still be installed in Developer Edition, Nightly, and ESR versions of Firefox, after toggling the xpinstall.signatures.required preference in about:config. Install Hello World Click the above link and t...
...xtensions need to be signed by Mozilla before they can be installed in Firefox. Unsigned add-ons can still be installed in Developer Edition, Nightly, and ESR versions of Firefox, after toggling the xpinstall.signatures.required preference in about:config. Install Hello World Click the above link and then click "allow" in the pop-up bubble. You should see another pop-up telling you that you are installing an unverified add-on. Click "install". After the extension is installed, you'll be asked to restart Firefox. Installing, uninstalling, enabling and disabling add-ons require a restart to complete, with the exception of NPAPI plugins, Add-ons SDK extensions and bootstrapped extensions. This is an important point to keep in mind if you're building an extension that manipulates other extensions o...
... Did you see it? There's a new menu on the main menu, labeled "Hello World!". If you open the menu and then the menu item below, you'll see a nice alert message (for some definitions of 'nice'). Click on the OK button to close it. That's all the extension does. Now let's take a closer look at it. ...
...And 4 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
efox. What we will do is create a sidebar and register it so it will be available in the menu. The goal is creating an empty sidebar that can be used as start for new sidebar applications. Creating a sidebar requires some GUI creation and registration in the destination application. First a simple XUL page is created. ...
...An extension package usually contains a "content" provider, which contains the XUL code and application logic. Optionally locales and skins can be included. Most additions are provided with a default tree structure, although not required it is recommended to use this structure. ...
...ed. See Code_snippets/Sidebar for more information. If the sidebar is not going to have a command-key, one can remove the openEmptySidebar.commandkey and openEmptySidebar.modifierskey keys from the dtd, remove the <keyset> from the firefoxOverlay.xul file. One must then set the key attribute of the menuitem to "". ...
...And 4 more matches
GRE Registration - Archive of obsolete content
Successfully embedding the GRE requires that information about installed GREs be stored on the system. This information is stored differently on each operating system. This document describes the registration mechanism. Windows On windows, GRE registration information is kept in the win32 registry under the HKEY_LOCAL_MACHINE/Software/mozilla.org/GRE and HKEY_CURRENT_USER/Software/mozilla.org/GRE keys. ...
...ly on each operating system. This document describes the registration mechanism. Windows On windows, GRE registration information is kept in the win32 registry under the HKEY_LOCAL_MACHINE/Software/mozilla.org/GRE and HKEY_CURRENT_USER/Software/mozilla.org/GRE keys. ...
...ation is kept in the win32 registry under the HKEY_LOCAL_MACHINE/Software/mozilla.org/GRE and HKEY_CURRENT_USER/Software/mozilla.org/GRE keys. ...
...And 4 more matches
Visual-js game engine - Game development
Now you can use On-Page-Editor (nice for visual set...
... Now you can use On-Page-Editor (nice for visual setup , checking positions and dimensions - not for logic ) . manual start from cmd : server_fold...
... Now you can use On-Page-Editor (nice for visual setup , checking positions and dimensions - not for logic ) . manual start from cmd : server_folder/node editor.js After starting On-Page-Editor open browser icon to open i...
...And 4 more matches
Client-side storage - Learn web development
ipt/apis/client-side-storage/cache-sw/video-store-offline/sw.js. The origin is https://mdn.github.io, and therefore the given path has to be /learning-area/javascript/apis/client-side-storage/cache-sw/video-store-offline/sw.js. If you wanted to host this example on your own server, you'd have to change this accordingly. This is rather confusing, but it has to work this way for security reasons. Installing the service worker The next time any page under the service worker's control is accessed (e.g. when the example is reloaded), the service worker is installed against that page, meaning that it will start controlling it. When this occurs, an install event is fired against the service worker; you can write code inside the service worker itself that will respond to the installation. Let's look ...
...ontrol is accessed (e.g. when the example is reloaded), the service worker is installed against that page, meaning that it will start controlling it. When this occurs, an install event is fired against the service worker; you can write code inside the service worker itself that will respond to the installation. Let's look at an example, in the sw.js file (the service worker). You'll see that the install listener is registered against self. This self keyword is a way to refer to the global scope of the service worker from inside the service worker file. ...
...nstall event is fired against the service worker; you can write code inside the service worker itself that will respond to the installation. Let's look at an example, in the sw.js file (the service worker). You'll see that the install listener is registered against self. This self keyword is a way to refer to the global scope of the service worker from inside the service worker file. Inside the install handler we use the ExtendableEvent.waitUntil() method, available on the event object, to signal that the browser shouldn't complete installation of the service worker until after the promise inside it has fulfilled successfully. Here is where we see the Cache API in action. We use the CacheStorage.open() method to open a new cache object in which responses can be stored (similar to an IndexedDB ...
...And 4 more matches
Getting started with React - Learn web development
e quickly and intuitively, and allow others to better understand your codebase at a glance. To read more about JSX, check out the React team's JSX In Depth article. Setting up your first React app There are many ways to use React, but we're going to use the command-line interface (CLI) tool create-react-app, as mentioned earlier, which expedites the process of developing a React application by installing some packages and creating some files for you, handling the tooling described above. It's possible to add React to a website without create-react-app by copying some <script> elements into an HTML file, but the create-react-app CLI is a common starting point for React applications. Using it will allow you spend more time building your app, and less time fussing with setup. Requirements In o...
...ling the tooling described above. It's possible to add React to a website without create-react-app by copying some <script> elements into an HTML file, but the create-react-app CLI is a common starting point for React applications. Using it will allow you spend more time building your app, and less time fussing with setup. ...
...Gitbash (which comes as part of the git for Windows toolset) or Windows Subsystem for Linux (WSL) are both suitable. See Command line crash course for more information on these, and on terminal commands in general. ...
...And 4 more matches
TypeScript support in Svelte - Learn web development
gure our project to work with TypeScript files. Finally we will go over our app and see what modifications we have to make to fully take advantage of TypeScript features. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn how to configure and use TypeScript when developing Svelte applications. Note that our application is fully functional and porting it to TypeScript is completely optional. There are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using TypeScript. Even if you are not planning ...
...tions, further resources, and more. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/07-typescript-support Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/07-typescript-support Remember to run npm install && npm run dev to start your app in development mode. REPL Unfortunately, TypeScript support is not yet available in the REPL. TypeScript: optional static typing for JavaScript TypeScript is a superset of JavaScript that provides features such as optional static typing, classes, interfaces, and generics. The goal of TypeScript is to help catch mistakes early through its type system and make J...
...ng your Svelte test projects -- it creates a new directory): npx degit sveltejs/template svelte-typescript-app cd svelte-typescript-app node scripts/setupTypeScript.js This creates a starter project that includes TypeScript support, which you can then modify as you wish. Then you'll have to tell npm to download dependencies and start the project in development mode, like we usually do: npm install npm run dev Adding TypeScript support to an existing Svelte Project To add TypeScript support to an existing Svelte project you can follow these instructions. Alternatively, you can download the setupTypeScript.js file to a scripts folder inside your project's root folder, and then run node scripts/setupTypeScript.js. You can even use degit to download the script. That's what we will do to st...
...And 4 more matches
Handling common HTML and CSS problems - Learn web development
o have to copy and paste your code over to a web page to check its validity several times. What you really want is a linter that will fit into your standard workflow with the minimum of hassle. Many code editors have linter plugins. Github's Atom code editor for example has a rich plugin ecosystem available, with many linting options. To show you an example of how such plugins generally work: Install Atom (if you haven't got an up-to-date version already installed) -- download it from the Atom page linked above. Go to Atom's Preferences... dialog (e.g. by Choosing Atom > Preferences... on Mac, or File > Preferences... on Windows/Linux) and choose the Install option in the left hand menu. In the Search packages text field, type "lint" and press Enter/Return to search for linting-related pack...
...After that, install the linter-csslint plugin for linting CSS, and the linter-tidy plugin for linting HTML. ...
...After that, install the linter-csslint plugin for linting CSS, and the linter-tidy plugin for linting HTML. ...
...And 4 more matches
Creating a spell check dictionary add-on
Parts needed To create a dictionary add-on, you first need two things: A spell check dictionary in Hunspell or Myspell format, with a license which allows you to use it. Such a dictionary consists of two files, one with a .dic and one with an .aff file extension. A locale code to describe the language of the dictionary. For example en-US, de-DE or da. ...
...ailable for your locale. If there already is one, try contacting the author to get it updated, or contact AMO editors if the author does not respond. Packaging A Firefox add-on is a ZIP file renamed to use an .xpi file extension instead of the normal .zip file extension. To create a dictionary add-on, simply create a ZIP file which contains the following files and folders: my-dictionary.xpi install.rdf dictionaries/ locale-code.dic locale-code.aff The .dic and .aff files must be placed in a subfolder named dictionaries within the ZIP file. Both files must have the locale code as their file name. You also have to add a file named install.rdf to the root of the ZIP file. This file contains information about your add-on such as name and version number (see below). In addition ...
... files must have the locale code as their file name. You also have to add a file named install.rdf to the root of the ZIP file. This file contains information about your add-on such as name and version number (see below). In addition to these required files, you may add optional files, for example to give your add-on an icon or to describe the license of the dictionary. Here is an example of the install.rdf file. You can create and edit it with a plain text editor such as Notepad. ...
...And 4 more matches
How Mozilla's build system works
n you are creating. Phase 3 effectively takes whatever was generated by Phase 2 and runs it. Since the dawn of Mozilla, this has been done with the make tool, consuming makefiles. However, with the transition to moz.build files, you may eventually see non-make build backends, such as Tup or Visual Studio. When building the tree, most of the time is spent in Phase 3. This is when header files are installed, C++ files are compiled, files are preprocessed, and so on. Recursive Make Backend The recursive make backend is the tried-and-true backend used to build the tree. It's what's been used since the dawn of Mozilla. Essentially, there are makefiles in each directory. make starts processing the makefile in the root directory and then recursively descends into child directories until it's done. Bu...
... Each tier consists of three sub-tiers: export, libs, and tools. These sub-tiers roughly correspond to the actions of pre-build, main-build, and post-build. This naming, however, can be misleading because all three sub-tiers are part of the build: export is used to do things like copy headers into place. libs is reserved for most of the work, like compiling C++ source files. tools is used to install tests and other support tools. When make is invoked, it starts at the export sub-tier of the first tier, and traverses all the directories in that tier. Then, it does the same thing for the libs sub-tier and, subsequently, the tools sub-tier. It then moves on to the next tier and continues until no tiers remain. To view information about the tiers, you can execute the following special make ta...
...her concept called continuation lines. A backslash as the last character on a line allows the variable definition to be continued on the next line. The extra whitespace is compressed. The terminating $(NULL) is a method for consistency; it allows you to add and remove lines without worrying about whether the last line has an ending backslash or not. ...
...And 4 more matches
Eclipse CDT
r, jump to definition, refactoring, autocomplete, syntax highlighting, and so on). System requirements Eclipse will use a lot of memory to fully index the Mozilla source tree to provide code assistance features (easily 4 GB of RAM, although this will drop to just over 1 GB if you restart after indexing is complete). Therefore, it is not recommended for use if your machine only has 4 GB of RAM. Installing Eclipse Regarding llvm4eclipsecdt, do not install or select this toolchain for Mozilla development. This plugin is intended mainly for managed projects but we use an unmanaged project for Mozilla (since it has its own build system). Using this plugin will result in parts of the UI described below being hidden or disabled. Download "Eclipse IDE for C/C++ Developers" (not Eclipse IDE for Ent...
...r select this toolchain for Mozilla development. This plugin is intended mainly for managed projects but we use an unmanaged project for Mozilla (since it has its own build system). Using this plugin will result in parts of the UI described below being hidden or disabled. ...
...d. Download "Eclipse IDE for C/C++ Developers" (not Eclipse IDE for Enterprise Java Developers) from the Eclipse download page, install it, and add the directory containing the eclipse binary to your PATH (/Applications/Eclipse.app/Contents/Eclipse/ on Mac). (While package managers like snap sometimes provide an eclipse package, they do not include the C++ Developer tools. Since it's a pain to install them and keep them up to date we do not recommend getting Eclipse this way.) Increase Eclipse's memory limits! Make sure you do this! Before you use Eclipse with the Mozilla source you must increase its memory limits. When Eclipse's indexer tries to process the Mozilla source, Eclipse will need considerably more memory than the limits imposed by its default configuration. You can increase E...
...And 4 more matches
Add-on Manager
The Add-on Manager is responsible for managing all of the add-ons installed in the application. Through its APIs information about all installed add-ons can be retrieved and new add-ons can be installed. The APIs are designed to be generic and support many different types of add-ons. Many functions in the Add-on Manager interface operate asynchronously returning results through callbacks passed to the functions. The callbacks may be called immediately while the initial function is still executing or shortly after, depending on when the requested data becomes available. Accessing installed add-ons Information about installed add-ons can be retrieved through the main AddonManager API. All of its functions are asynchronous, meaning that a callback function must be passed to receive the Addon ins...
...function must be passed to receive the Addon instances. The callback may well only be called after the API function returns. ...
...ample: Components.utils.import("resource://gre/modules/AddonManager.jsm"); AddonManager.getAllAddons(function(aAddons) { // Here aAddons is an array of Addon objects }); // This code will execute before the code inside the callback Notifications about changes to installed add-ons are dispatched to any registered AddonListeners. They must be registered through the addAddonListener() method. ...
...And 4 more matches
Setting up an update server
Obtaining an update MAR Updates are served as MAR files. There are two common ways to obtain a MAR to use: download a prebuilt one, or build one yourself. Downloading a MAR Prebuilt Nightly MARs can be found here on archive.mozilla.org. Be sure that you use the one that matches your machine's configuration. For example, if you want the Nightly MAR from 2019-09-17 for a 64 bit Windows machine, you probably want the MAR located at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-US.win64.complete.mar. Prebuilt MARs for release and beta can be found here. ...
...that must be uncommented. Open them and find this line: #DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True. Delete the # at the beginning of the line to uncomment it. These are the files that must be changed: toolkit/components/maintenanceservice/moz.build toolkit/mozapps/update/tests/moz.build Firefox should otherwise be built normally. After building, you may want to copy the installation of Firefox elsewhere. If you update the installation without moving it, attempts at further incremental builds will not work properly, and a clobber will be needed when building next. To move the installation, first call ./mach package, then you can either copy <obj dir>/dist/firefox to a new "install directory" elsewhere, or run the installer located in the <obj dir>/dist/install/sea. If y...
...hen building next. To move the installation, first call ./mach package, then you can either copy <obj dir>/dist/firefox to a new "install directory" elsewhere, or run the installer located in the <obj dir>/dist/install/sea. If you are running Windows and want the Mozilla Maintenance Service to be used, there are a few additional steps to be taken here. First, the maintenance service needs to be "installed". Most likely, a different maintenance service is already installed, probably at C:\Program Files (x86)\Mozilla Maintenance Service\maintenanceservice.exe. Backup that file to another location and replace it with <obj dir>/dist/bin/maintenanceservice.exe. Don't forget to restore the backup when you are done. ...
...And 4 more matches
Component Internals
implementations. The largest and possibly most complex part of a component is the code specific to the component itself. But Where Are the Components? Components reside in modules, and those modules are defined in shared library files that typically sit in the components directory of an XPCOM application. A set of default libraries stored in this components directory makes up a typical Gecko installation, providing functionality that consists of networking, layout, composition, a cross-platform user interface, and others. Another, even more basic view of this relationship of components to the files and interfaces that define them is shown in Onion Peel View of XPCOM Component Creation in the next chapter. The component is an abstraction sitting between the actual module in which it is imple...
...y files are at the core of XPCOM scriptablity and the binary component architecture of XPCOM. Type Library Manifests Type library manifests contain the following information: location of all type library files mapping of all known interfaces to type libraries where these structures are defined Using the data in these two manifests, XPCOM knows exactly which component libraries have been installed and what implementations go with which interfaces. Additionally, it relates the components to the type libraries in which the binary representations of the interfaces they support are defined. The next section describes how to hook into the XPCOM startup and registration process and make the data about your component available in these manifests, so that your component will be found and regist...
...up and registration process and make the data about your component available in these manifests, so that your component will be found and registered at startup. Registration Methods in XPCOM What Is XPCOM Registration? In a nutshell, registration is the process that makes XPCOM aware of your component(s). As this section and the next describe, you can register your component explicitly during installation, or with the regxpcom program, or you can use the autoregistration methods in the Service Manager to find and register components in a specified components directory: XPInstall APIs regxpcom command-line tool nsIComponentRegistrar APIs from Service Manager The registration process is fairly involved. This section introduces it in terms of XPCOM initialization, and the next chapter des...
...And 4 more matches
Mozilla
encourage their engagement. There are two ways to create a sidebar for Firefox users: the Social API and an extension. You can choose either depending on your needs and resources. Creating a Language Pack To create a language pack, or a localization repack, you first need to go through the initial setup process. Creating a localized Windows installer of SeaMonkey Preamble: not all of the programs listed below are necessary. Some of them are simply the ones I use because I like them, while others are scripts that I've created to speed up the work. You can in every case choose the program you prefer to do some operations, and you can also decide not to use any of my scripts and manually enter all of the com...
...your own password storage format or database. So for example, on KDE is is desirable to fully employ the KDE wallet manager, rather than any secondary replacements of KDEwallet. Creating a spell check dictionary add-on This page describes how to package a Hunspell spell check dictionary as a Firefox add-on, or how to update your existing add-on, so that it can be installed, uninstalled and updated without a restart. Creating JavaScript callbacks in components XPCOM components use IDL to create interfaces. These interfaces are used to manipulate the component in C++ and JavaScript. A common pattern used with interfaces to create a bi-directional communication between two groups of code is the observer (or listener) pa...
...add-ons, using the developer tools in Firefox, and other topics. Firefox Operational Information Database: SQLite A large amount of operational information about websites visited and browser configuration is stored in relational databases in SQLite used by Firefox. The SQLite Manager add-on allows convenient browsing of this information. (Install the SQLite Mangager add-on, click Tools -> SQLite Manager. In the manager, select the database you want to explore in the '(Select Profile Database)' pulldown, click 'Go', select one of the tables listed in the left column and see the current contents of the database in the 'Browse & Search' tab.) Gecko Gecko is the name of th...
...And 4 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
ection in about:debugging only supports restartless add-ons, including basic bootstrapped extensions, Add-on SDK add-ons, and WebExtensions. This page enables you to do two things: Load an add-on temporarily from disk Connect the Add-on Debugger to any restartless add-ons Connecting the Add-on Debugger The Add-ons page in about:debugging lists all restartless add-ons that are currently installed (note that this list may include add-ons that came preinstalled with your Firefox). Next to each entry is a button labeled "Debug". If the "Debug" button is disabled, check the "Enable add-on debugging" box. If you click "Debug", you'll see a dialog asking you to accept an incoming connection. Click "OK", and the Add-on Debugger will start in a separate window. Note that sometimes the debugge...
...ry add-on With the "Load Temporary Add-on" button you can load any sort of restartless add-on temporarily, from a directory on disk. Just click the button, navigate to the directory containing the add-on's file, and select any file in that directory. The temporary add-on will be displayed under the "Temporary Extensions" header. You don't have to package or sign the add-on. ...
...dd-on temporarily, from a directory on disk. Just click the button, navigate to the directory containing the add-on's file, and select any file in that directory. The temporary add-on will be displayed under the "Temporary Extensions" header. You don't have to package or sign the add-on. The add-on will stay installed until you restart Firefox. ...
...And 4 more matches
Service Worker API - Web APIs
e: Service workers make heavy use of promises, as generally they will wait for responses to come through, after which they will respond with a success or failure action. The promises architecture is ideal for this. Registration A service worker is first registered using the ServiceWorkerContainer.register() method. If successful, your service worker will be downloaded to the client and attempt installation/activation (see below) for URLs accessed by the user inside the whole origin, or inside a subset specified by you. Download, install and activate At this point, your service worker will observe the following lifecycle: Download Install Activate The service worker is immediately downloaded when a user first accesses a service worker-controlled site/page. After that, it is updated wh...
... activate At this point, your service worker will observe the following lifecycle: Download Install Activate The service worker is immediately downloaded when a user first accesses a service worker-controlled site/page. After that, it is updated when: A navigation to an in-scope page occurs. An event is fired on the service worker and it hasn't been downloaded in the last 24 hours. Installation is attempted when the downloaded file is found to be new -- either different to an existing service worker (byte-wise compared), or the first service worker encountered for this page/site. If this is the first time a service worker has been made available, installation is attempted, then after a successful installation, it is activated. If there is an existing service worker available, the...
...ed when the downloaded file is found to be new -- either different to an existing service worker (byte-wise compared), or the first service worker encountered for this page/site. If this is the first time a service worker has been made available, installation is attempted, then after a successful installation, it is activated. If there is an existing service worker available, the new version is installed in the background, but not yet activated -- at this point it is called the worker in waiting. It is only activated when there are no longer any pages loaded that are still using the old service worker. As soon as there are no more pages to be loaded, the new service worker activates (becoming the active worker). Activation can happen sooner using ServiceWorkerGlobalScope.skipWaiting() and exist...
...And 4 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
t a shorthand used initially by Google for the concept of creating a flexible, adaptable app using only web technologies. PWAs are web apps developed using a number of specific technologies and standard patterns to allow them to take advantage of both web and native app features. For example, web apps are more discoverable than native apps; it's a lot easier and faster to visit a website than to install an application, and you can also share web apps by simply sending a link. On the other hand, native apps are better integrated with the operating system and therefore offer a more seamless experience for the users. You can install a native app so that it works offline, and users love tapping their icons to easily access their favorite apps, rather than navigating to it using a browser. PWAs giv...
...kes an app a PWA? As we hinted at above, PWAs are not created with a single technology. They represent a new philosophy for building web apps, involving some specific patterns, APIs, and other features. It's not that obvious if a web app is a PWA or not from first glance. An app could be considered a PWA when it meets certain requirements, or implements a set of given features: works offline, is installable, is easy to synchronize, can send push notifications, etc. In addition, there are tools to measure how complete (as a percentage) a web app is, such as Lighthouse. By implementing various technological advantages, we can make an app more progressive, thus ending up with a higher Lighthouse score. But this is only a rough indicator. There are some key principles a web app should try to obser...
...te (as a percentage) a web app is, such as Lighthouse. By implementing various technological advantages, we can make an app more progressive, thus ending up with a higher Lighthouse score. But this is only a rough indicator. There are some key principles a web app should try to observe to be identified as a PWA. It should be: Discoverable, so the contents can be found through search engines. Installable, so it can be available on the device's home screen or app launcher. Linkable, so you can share it by simply sending a URL. Network independent, so it works offline or with a poor network connection. Progressive, so it's still usable on a basic level on older browsers, but fully-functional on the latest ones. Re-engageable, so it's able to send notifications whenever there's new content a...
...And 4 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
Container.register() method. Its contents reside in the sw.js file, and can be executed after the registration is successful. It's the only piece of Service Worker code that sits inside the app.js file; everything else that is Service Worker-specific is written in the sw.js file itself. Lifecycle of a Service Worker When registration is complete, the sw.js file is automatically downloaded, then installed, and finally activated. Installation The API allows us to add event listeners for key events we are interested in -- the first one is the install event: self.addEventListener('install', (e) => { console.log('[Service Worker] Install'); }); In the install listener, we can initialize the cache and add files to it for offline use. Our js13kPWA app does exactly that. First, a variable for ...
...Next, the links to images to be loaded along with the content from the data/games.js file are generated in the second array. After that, both arrays are merged using the Array.prototype.concat() function. ...
...ith the content from the data/games.js file are generated in the second array. After that, both arrays are merged using the Array.prototype.concat() function. var gamesImages = []; for(var i=0; i<games.length; i++) { gamesImages.push('data/img/'+games[i].slug+'.jpg'); } var contentToCache = appShellFiles.concat(gamesImages); Then we can manage the install event itself: self.addEventListener('install', (e) => { console.log('[Service Worker] Install'); e.waitUntil( caches.open(cacheName).then((cache) => { console.log('[Service Worker] Caching all: app shell and content'); return cache.addAll(contentToCache); }) ); }); There are two things that need an explanation here: what ExtendableEvent.waitUntil does, and what the caches object is. The service worker does no...
...And 4 more matches
Compiling from Rust to WebAssembly - WebAssembly
ing Rust in an existing JavaScript frontend. For now, the Rust team is focusing on the latter case, and so that's what we cover here. For the former case, check out projects like yew. In this tutorial, we build an npm package using wasm-pack, a tool for building npm packages in Rust. ...
...projects like yew. In this tutorial, we build an npm package using wasm-pack, a tool for building npm packages in Rust. This package will contain only WebAssembly and JavaScript code, and so the users of the package won't need Rust installed. They may not even notice that it's written in WebAssembly. Rust Environment Setup Let's go through all the required steps to get our environment set up. Install Rust Install Rust by going to the Install Rust page and following the instructions. This installs a tool called "rustup", which lets you manage multiple versions of Rust. By default, it installs the latest stable Rust release, which you can use for general Rust development. Rustup installs rustc, the Rust compiler, as well as cargo, Rust's package manager, rust-std, Rust's standard libraries, an...
...the instructions. This installs a tool called "rustup", which lets you manage multiple versions of Rust. By default, it installs the latest stable Rust release, which you can use for general Rust development. Rustup installs rustc, the Rust compiler, as well as cargo, Rust's package manager, rust-std, Rust's standard libraries, and some helpful docs -- rust-docs. Note: Pay attention to the post-install note about needing cargo's bin directory in your system PATH. This is added automatically, but you must restart your terminal for it to take effect. wasm-pack To build the package, we need an additional tool, wasm-pack. This helps compile the code to WebAssembly, as well as produce the right packaging for npm. ...
...And 4 more matches
cfx - Archive of obsolete content
x supports the following global options: -h, --help - show a help message and exit -v, --verbose - enable lots of output "Command-specific options" are documented alongside the commands. There are four supported cfx commands: cfx init Create a skeleton add-on as a starting point for your own add-on. cfx run Launch an instance of Firefox with your add-on installed. cfx test Runs your add-on's unit tests. cfx xpi Package your add-on as an XPI file, which is the install file format for Firefox add-ons. There are also a number of internal commands, which are more likely to be useful to SDK developers than to add-on developers. cfx init Create a new directory called "my-addon", change into it, and run cfx init. This command ...
...data docs main.md lib main.js package.json README.md tests test-main.js cfx run This command is used to run the add-on. Called with no options it looks for a file called package.json in the current directory, loads the corresponding add-on, and runs it under the version of Firefox it finds in the platform's default install path. Supported Options You can point cfx run at a different package.json file using the --pkgdir option, and pass arguments to your add-on using the --static-args option. You can specify a different version of the host application using the --binary option, passing in the path to the application binary to run. The path may be specified as a full path or may be relative to the current director...
...fox. --templatedir=TEMPLATEDIR The cfx run command constructs the add-on using a extension template which you can find under the SDK root, in app-extension. Use the --templatedir option to specify a different template. TEMPLATEDIR may be specified as a full path or as a path relative to the current directory. Internal Options --addons=ADDONS Paths of add-ons to install, comma-separated. ADDONS may be specified as a full path or as a path relative to the current directory. --e10s If this option is set then the add-on runs in a separate process. This option is currently not implemented. --keydir=KEYDIR Supply a different location for signing keys. KEYDIR may be specified as a full path or as a path relative to the current directory. ...
...And 3 more matches
Getting started (cfx) - Archive of obsolete content
This tutorial walks through creating a simple add-on using the cfx command-line tool. cfx has been deprecated and you should use jpm instead. Use cfx only if you need to work with Firefox 38 or earlier. See: Getting started with jpm cfx to jpm Prerequisites To create add-ons for Firefox using the SDK, you'll first need to follow the instructions to install and activate the SDK. Once you've done that, you'll be looking at a command prompt. Initializing an empty add-on In the command prompt, create a new directory. The directory doesn't have to be under the SDK root: you can create it anywhere you like. Navigate to it, type cfx init, and hit enter: mkdir my-addon cd my-addon cfx init You'll see some output like this: * lib directory created * data directory created * test directory...
..../icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://www.mozilla.org/"); } Save the file. Next, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png Back at the command prompt, type: cfx run This is the SDK command to run a new instance of Firefox with your add-on installed. When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with https://www.mozilla.org/ loaded into it. That's all this add-on does. It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs...
....png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://developer.mozilla.org/"); } At the command prompt, execute cfx run again. This time clicking it takes you to https://developer.mozilla.org/. Packaging the add-on When you've finished the add-on and are ready to distribute it, you'll need to package it as an XPI file. ...
...And 3 more matches
Adding preferences to an extension - Archive of obsolete content
so if you haven't already seen them: Creating a status bar extension Creating a dynamic status bar extension Also, for reference, you may want to take a look at Preferences System and the Preferences API. Download the sample You can download a copy of this sample to look over, or to use as the basis for your own extension. Get the code here: Download the sample Update the manifests The install manifest and chrome manifest need to be updated. By and large, the changes are simply changing the ID of the extension. However, we do need to add one new line to the install.rdf file: <em:optionsURL>chrome://stockwatcher2/content/options.xul</em:optionsURL> This line establishes the URL of the XUL file that describes the options dialog. Please note that if you are using code from this tuto...
... By and large, the changes are simply changing the ID of the extension. However, we do need to add one new line to the install.rdf file: <em:optionsURL>chrome://stockwatcher2/content/options.xul</em:optionsURL> This line establishes the URL of the XUL file that describes the options dialog. Please note that if you are using code from this tutorial to add to an existing extension, you must uninstall and reinstall your extension to enable the Preferences button for your extension in the Add-ons list. Establish the defaults In order to set a default preference for the stock to monitor, we need to add a new folder to our extension's package, called "defaults", which in turn contains another folder called "preferences". Inside that, we create a file, defaults.js, that describes the default va...
...describes the default value of our preferences: pref("extensions.stockwatcher2.symbol", "GOOG"); The standard for third-party preferences, such as those used in extensions, is to use the string "extensions", a period, the name of the extension, another period, then a preference name, as seen in the example above. The JavaScript code In order to monitor changes to our preferences, we need to install an observer using the nsIPrefBranch2 interface. To do that, we need to reimplement our code into an object. That involves turning each function into a member of the StockWatcher class. Let's take a look at each function in the class. startup() The StockWatcher.startup() function is called when our extension is first loaded. Its job is to start up the observer to watch for changes to our prefer...
...And 3 more matches
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
can also see the code online. Build it It is quite simple to build the control Locate the pluginhostctrl directory: Open pluginhostctrl.dsp Build "Win32 Debug" or another target Open some of the test files under pluginhostctrl\tests in Internet Explorer to verify the control has built and registered correctly. The control currently reads plug-ins from your most current Netscape 4.x and IE installations. There is no support for Mozilla or NS 6.x yet. A note to developers If you intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). This is necessary so that your control may coexist with the generic version and any other versions that other plu...
...port for Mozilla or NS 6.x yet. A note to developers If you intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). ...
... intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). This is necessary so that your control may coexist with the generic version and any other versions that other plug-ins vendors may have installed. ...
...And 3 more matches
Conclusion - Archive of obsolete content
If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...And 3 more matches
Frequently Asked Questions - Archive of obsolete content
ed SVG using the <object> or <embed> tags must have a 'type' attribute assigned with the correct SVG MIME type of "image/svg+xml". If the MIME type specified is wrong (for example image/svg-xml) Mozilla won't recognise it. If that isn't the problem, then it may be that the server hosting the website is misconfigured. For information on configuring servers for SVG see this link. Why am I asked to install a plug-in to view SVG files? This is probably because there is an <embed> or <object> tag in the HTML page and its 'type' attribute is set to the wrong MIME type. The SVG MIME type is image/svg+xml (not image/svg-xml or anything else for that matter). Correct this mistake or ask the document maintainer to correct it. How should I report bugs in Mozilla SVG? If you discover any problems with ou...
...ree to contact contact us. Can I use a plugin for SVG instead of Mozilla's native support? Individuals can choose to use a plugin to view SVG in Mozilla on their own computers, but there is no way for SVG content authors to make Mozilla use a plugin when people view the SVG files on their website. The native SVG support must be turned off before Mozilla will look to see if there's an SVG plugin installed. This is done by toggling a hidden user configuration preference (pref). To access the pref type about:config into the URL bar, then type svg.enabled into the Filter field. When you double click on the pref you will see its value change to and from true/false, turning the native support on/off. How does Mozilla's SVG implementation compare to Adobe's? Mozilla's native implementation is less c...
...Mozilla's native implementation is less complete than Adobe SVG Viewer's in general. There are major features such as filters and SMIL based animation that have still to be implemented in Mozilla. However, Mozilla's implementation already supports some things that Adobe's lacks, particularly parts of the XML and SVG DOMs. For example we support SVG exceptions and SVGTransform objects. How do you install Adobe's SVG Viewer in Mozilla? The SVG project is about Mozilla's native implementation of SVG, not Adobe/Corel/whoever's plug-in. However, we might as well answer this question to save you searching for this information elsewhere. See these install instructions on mozdev.org. It's also useful to know that you can check whether Mozilla has recognised your plug-ins by typing 'about:plugins' into ...
...And 3 more matches
addDirectory - Archive of obsolete content
addDirectory Unpacks an entire directory into a temporary location. ...
...ing relativeLocalPath); public int addDirectory ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); public int addDirectory ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate); public int addDirectory ( String registryName, InstallVersion version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate); Parameters The addDirectory method has the following parameters: registryName The pathname in the Client Version Registry for the root directory of the files that are to be installed.This parameter can be an absolute pathname (beginning with a /) or a relative pat...
...stryName The pathname in the Client Version Registry for the root directory of the files that are to be installed.This parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash). An absolute pathname is used as specified. ...
...And 3 more matches
execute - Archive of obsolete content
Default is false. See note below. ...
...(Note that this path points into the XPI itself.) args A parameter string that is passed to the executable. (Ignored on Mac OS). See note below. blocking A boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes. Default is false. See note below. ...
...( String xpiSourcePath, String args [, Boolean blocking]); Parameters The execute method has the following parameters: xpiSourcePath The pathname of the file to extract and execute. (Note that this path points into the XPI itself.) args A parameter string that is passed to the executable. (Ignored on Mac OS). See note below. blocking A boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes. Default is false. See note below. The blocking parameter is not available as part of this method in versions of Netscape before 6.1/Mozilla 0.9.3. Returns An integer error code. For a list of possible values, see Return Codes. Description The execute method extracts the named file from the XPI file to a temporary fil...
...And 3 more matches
registerChrome - Archive of obsolete content
SKIN is used to register skins, LOCALE is used to register language packs. PACKAGE, a third possibility is the equivalent of SKIN AND/OR LOCALE, and ensures that everything in the XPI is registered. One final option for the switch parameter is DELAYED_CHROME, which registers the switch only after a relaunch of the browser. Note that you can combine switches as in the example below. ...
...GE, a third possibility is the equivalent of SKIN AND/OR LOCALE, and ensures that everything in the XPI is registered. One final option for the switch parameter is DELAYED_CHROME, which registers the switch only after a relaunch of the browser. Note that you can combine switches as in the example below. srcDir srcDir is a FileSpecObject representing the source destination of the installation. FileSpecObjects like that required by this function are created using the getFolder method on the Install object. xpiPath xpiPath is the path within the XPI in where the contents.rdf file defining the chrome is located. For example, "locale/myLocale/aim," points to the locale/myLocale/aim subdirectory of the same XPI file in which the installation script is located. Returns ...
...urns An integer error code. For a list of possible values, see Return Codes. In some situations the method may return other errors. In a few cases you may get a registry error. Description When the third parameter is omitted (pointing to a specific location within the XPI file), this function is being used in a somewhat deprecated way. ...
...And 3 more matches
Application Update - Archive of obsolete content
ar / mar.exe to build a complete update patch. You will need to compile a unix/linux executable mar from mozilla/modules/libmar. As far as I can tell enabling the options --enable-updater and --enable-update-packaging on your configure will build you mar. Compiled versions of mar are available in the Gecko SDK under the folder /host/bin for your OS. In order to generate SHA1 hashes I installed shash. Application Settings You will need to configure the following settings in your application: Branding The update process uses branding information, setup branding for your application as described here: XulRunner Tips Icons The updater process for Linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 Pr...
...We use a separate boolean toggle for this to make // the UI easier to construct. pref("app.update.auto", true); // Defines how the Application Update Service notifies the user about updates: // // AUM Set to: Minor Releases: Major Releases: // 0 download no prompt download no prompt // 1 download no prompt download no prompt if no inc...
... // Update service URL: // You do not need to use all the %VAR% parameters. Use what you need, %PRODUCT%,%VERSION%,%BUILD_ID%,%CHANNEL% for example pref("app.update.url", "https://yourserver.net/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml"); // URL user can browse to manually if for some reason all update installation // attempts fail. pref("app.update.url.manual", "http://yourserver.net/yourpage"); // A default value for the "More information about this update" link // supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "http://yourserver.net/yourpage"); // User-settable override to app.update.url for testing purposes. //pref("app.update.url.override", "")...
...And 3 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
ome basic configuration options. You should be able to use the McCoy version, changing just your application name and version. makefiles.sh - you don't absolutely need this file since the build system will generate makefiles as need by walking the tree (based on the value of DIRS). You will need it if you want to generate a makefile but keep it out of the main build, which is what McCoy does with installer/Makefile. In addition, builds are faster when you include all makefiles in this file since they can be generated with a single shell invocation. And that's all there is to it. Now that wasn't so bad, was it? Well, actually there are still a bunch of subdirectories you're going to need. And did I mention you'll have to write your application as well? The app/ subdirectory The app/ subdirectory ...
...'t be defining things like XPI_NAME (this is used only for extensions). So use the makefiles in the components/ directory of McCoy as a guide instead. Don't forget to put components into the DIRS variable in the top-level makefile, or your components won't be built. ...
...PI_NAME (this is used only for extensions). So use the makefiles in the components/ directory of McCoy as a guide instead. Don't forget to put components into the DIRS variable in the top-level makefile, or your components won't be built. ...
...And 3 more matches
Deploying XULRunner - Archive of obsolete content
Current XULRunner is a stable developer preview release. This means that while the release is immature in some areas such as embedding, application deployment, and OS integration, it can be used by developers that are releasing standalone XUL applications. This document explains how deployment should be managed for self contained portable applications built on XULRunner. ...
... can be used by developers that are releasing standalone XUL applications. This document explains how deployment should be managed for self contained portable applications built on XULRunner. Note: To actually install a XULRunner application, a compatible version of XULRunner must be registered on the system and the app must be deployed per the instructions at XUL Application Packaging. If your installer is capable of determining whether or not XULRunner has been registered on the system you could perform the check and register the appropriate version if necessary. After that, the app could be installed to the registered XULRunner and appear in start menus, lists of installed programs, etc. (Bonus points for checking the operating system and downloading the right XULRunner on the fly, or bundli...
...etermining whether or not XULRunner has been registered on the system you could perform the check and register the appropriate version if necessary. After that, the app could be installed to the registered XULRunner and appear in start menus, lists of installed programs, etc. (Bonus points for checking the operating system and downloading the right XULRunner on the fly, or bundling them into your installer). Registration and app installation are performed with command line switches as outlined in the XULRunner section of article Command Line Options. It may turn out to be easier to create a self contained portable application, as described here, and deploy it with a generic installer that would create shortcuts to scripts that launch your application in the unregistered bundled XULRunner. The re...
...And 3 more matches
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
One of the new features that is available in Firefox 1.5 is the ability to place browser plugins in a Toolkit bundle. Historically, most people have chosen to use an install.js script to install a plugin. When this method is used, you can choose to either place the plugin into the plugins directory, or place it into your own directory and modify the Windows registry to let Firefox know where to find the plugin. The downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin. As of Firefox 3 (and any Gecko 1.9 based application) the use of install.js scripts is no longer supported and plugins must either be shipped as an executable installer or in a bundle as described here. Bundle structure Toolkit bundles can ...
...The library and scripting interfaces are held in the plugins directory. ...
...The library and scripting interfaces are held in the plugins directory. ...
...And 3 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
and developers are expected to know such Unique Identifiers in order to invoke the component of their choice. The codebase attribute used above points to a location that houses the CAB file containing the ActiveX control. In this context, the codebase attribute is used as an obtainment mechanism -- that is to say, a way to obtain a control if it isn't present. If the Flash ActiveX control is not installed, IE will then go to the URL referenced by the codebase attribute and retrieve the ActiveX control. Additional param elements (which are "children" of the above object element) specify configuration parameters for the Flash plugin. For instance, the param name="movie" tells the Flash plugin the location of the SWF file to start playing. With the release of Netscape 7.1, this kind of ActiveX use...
...st version from <a href="http://www.macromedia.com/downloads/"> here.</a></p> </object> </object> Web authors have to specify anobtainment mechanism in Mozilla-based browsers -- the browser won't automatically retrieve plugins that are missing if you don't specify where to get the plugin from using the codebase attribute. If you don't specify a codebase attribute, and the plugin is not installed,the browser will display only the alternate innermost text. It won't attempt to retrieve a missing plugin using the Netscape Plugin Finder service. This behavior is not incorrect according to the HTML 4.01 specification, but it obliges web authors to diligently specifyobtainment mechanisms. At a minimum, web authors will have to nest some alternate text inside their object elements telling user...
...write('<p>You need Flash for this.'); document.write(' Get the latest version from'); document.write(' <a href="http://www.macromedia.com/downloads">here<\/a>.'); document.write('<\/p>'); document.write('<\/object>'); } See also: Flash Satay The Object Element and Java Mozilla-based browsers such as Netscape 6.x, Netscape 7, and CompuServe 7 ship with the Java plugin that Sun provides. Users installing Netscape 6.x and Netscape 7 have a choice of whether or not to install Java. Unlike Netscape Communicator 4.x, Netscape 6.x and 7 do not have a default Java Virtual Machine -- they rely on Sun's plugin. During the Netscape Communicator 4.x days, Netscape Communications used to develop a Java Virtual Machine which supported Java 1.5.0 and below. Now, with Netscape 6 and 7, the Java Virtual Mach...
...And 3 more matches
Getting started with Ember - Learn web development
Previous Overview: Client-side JavaScript frameworks Next In our first Ember article we will look at how Ember works and what it's useful for, install the Ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. A deeper understanding of modern JavaScript features (such as classes, modules, etc), will be extremely beneficial, as Ember makes heavy use of them. Objective: To learn how to install Ember, and create a starter app. Introducing Ember Ember is a component-service framework that focuses on the overall web application...
...ire front end of your application. Increasing cohesion among many team's technology stacks Community-backed "best practices" allow for faster long-term development speed. Ember has clear conventions that are useful for enforcing consistency and helping team members get up to speed quickly. Ember with add-ons EmberJS has a plugin architecture, which means that add-ons can be installed and provide additional functionality without much, if any, configuration. Examples include: PREmber: Static website rendering for blogs or marketing content. FastBoot: Server-side rendering, including improving search-engine optimization (SEO), or improving initial render performance of complex, highly interactive web pages. empress-blog: Authoring blog posts in markdown while optimizing ...
... include: PREmber: Static website rendering for blogs or marketing content. FastBoot: Server-side rendering, including improving search-engine optimization (SEO), or improving initial render performance of complex, highly interactive web pages. empress-blog: Authoring blog posts in markdown while optimizing for SEO with PREmber. ember-service-worker: Configuring a PWA so that the app can be installed on mobile devices, just like apps from the device's respective app-store. Native mobile apps Ember can also be used with native mobile apps with a native-mobile bridge to JavaScript, such as that provided by Corber. Opinions EmberJS is one of the most opinionated front-end frameworks out there. But what does it mean to be opinionated? In Ember, opinions are a set of conventions that help i...
...And 3 more matches
Getting started with Vue - Learn web development
Previous Overview: Client-side JavaScript frameworks Next Now let's introduce Vue, the third of our frameworks. In this article we'll look at a little bit of Vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. ...
...e how to run the project locally, and get it prepared to start building our example. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To setup a local Vue development environment, create a starter app, and understand the basics of how it works. A clearer Vue Vue is a modern JavaScript framework that provides useful facilities for progre...
...n write JSX or plain JavaScript functions to define your components. As you work through this tutorial, you might want to keep the Vue guide and API documentation open in other tabs, so you can refer to them if you want more information on any sub topic. For a good (but potentially biased) comparison between Vue and many of the other frameworks, see Vue Docs: Comparison with Other Frameworks. Installation To use Vue in an existing site, you can drop one of the following <script> elements onto a page. This allows you to start using Vue on existing sites, which is why Vue prides itself on being a progressive framework. This is a great option when migrating an existing project using a library like JQuery to Vue. With this method, you can use a lot of the core features of Vue, such as the attrib...
...And 3 more matches
Makefile - variables
ADD_TO_DEF_FILE CPP_SOURCES CPP_UNIT_TESTS A list of source files to compile as unit tests. CSRCS A list of C source files to compile. DEFINES Additional preprocessor defines for C++ EXPAND_MOZLIBNAME EXPORTS A list of exported header files and sources to install for external use. EXPORTS_NAMESPACES Exported package include directory: dist/include/${namespace} EXPORTS_${namespace} A list of exports/headers that should be copied into the exported namespace directory. EXTRA_COMPONENTS nsDefaultCLH.manifest, JavaScript XPCOMM files EXTRA_DSO_LIBS EXTRA_D...
... EXPORTS_${namespace} A list of exports/headers that should be copied into the exported namespace directory. EXTRA_COMPONENTS nsDefaultCLH.manifest, JavaScript XPCOMM files EXTRA_DSO_LIBS EXTRA_DSO_LDOPTS EXTRA_JS_MODULES EXTRA_PP_COMPONENTS XPCOMM files to pre-process before installation. GARBAGE A "clean target" macro containing a list of files to remove. GARBAGE_DIRS A "clean target" macro containing a list of directories to remove. GLOBAL_DEPS A list of common dependencies (Makefile.in, autoconf.mk) that will force rebuilding. LIBOBJS HAVE_DTRACE Sun Microsystem...
...t of common dependencies (Makefile.in, autoconf.mk) that will force rebuilding. LIBOBJS HAVE_DTRACE Sun Microsystem's dynamic tracing environment is available. LOCAL_INCLUDES Allow use of MOZ_OBJDIR in .mozconfig with older GNU gcc on BeOS. MODULE MODULE_NAME NO_DIST_INSTALL Inhibit generating and copying exports/install targets into $(MOZ_OBJDIR)/dist/install. .NS_PRINTING OBJS OBJ_SUFFIX Filename suffix to use when writing object files. MODULE Instructs the build system where to install exported headers. SIMPLE_PROGRAMS SUPPRESS_...
...And 3 more matches
Obsolete Build Caveats and Tips
est version of Firefox. Therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. Each piece of information should mention the page and the section it originally came from. You can copy in the original text and bold out what has been removed. ...
... the folder 191src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-1.9.1/ 191src cd 191src Note: Starting with Gecko 5.0, you can actually build Firefox without a .mozconfig file. By default, a similar-to-release build is done. From Windows_SDK_versions Visual C++ 9 (VS2008) Professional/Express Download and install the Windows 7 SDK. Note that you need Service Pack 1--for the Express edition it is a separate download. Visual C++ 8 (VS2005) Professional Download and install the Windows 7 SDK. Install this Microsoft hotfix to allow linking to work correctly. Visual C++ 7.1 or Visual C++ 8 (VS2005) Express These versions are not supported and the Windows 7 SDK will not work with them. You need to upgra...
...eatures that depend on this SDK include: Windows Vista parental controls File associations and application registration on Vista and above Ability to display the UAC shield icon in the UI Thunderbird Windows Search integration Text Services Framework support There are two ways to obtain it: Download the Windows Vista SDK from the Microsoft Download Center. You may choose not to install the Sample Code and Documentation to save space and download time. If you are using Windows XP, you must have Windows XP Service Pack 2 and .NET Framework 2.0 installed before installing the Vista SDK. Use Visual Studio 2008 Professional. Gecko 1.9.2 through 11: If you would like to use this SDK, add ac_add_options --with-windows-version=600 to your .mozconfig. Windows Server 2003 R2 ...
...And 3 more matches
Initial setup
specific to your locale will help us to track your localization's progress from first steps to official release. It will also notify us when you're having problems unique to your localization team's work. Add a request about creating your locale's Bugzilla component to the new locales newsgroup. ...
... compare-locales compare-locales is a Python script that helps you check your work without needing to run Firefox or another application. Install intructions are located here. ...
... contributions, build Mozilla applications and language packs, and test your work. Hg (Mercurial) As noted above, we use Mercurial for maintaining Mozilla source code and localized code. Not only will you need a localization repository to store your localizations, but you need to have it installed and configured on your personal computer as well. You can find everything you need to know about installing and configuring Mercurial for your localization work here. compare-locales compare-locales is a Python script that helps you check your work without needing to run Firefox or another application. Install intructions are located here. L10n checks L10n checks is another Python script that helps you check your work without running an application. Install instructions are located here. aut...
...And 3 more matches
McCoy
McCoy uses XULrunner which is bound to break, for details see this post. Mozilla calls McCoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not. McCoy is an application that allows add-on authors to provide secure updates to their users. Applications periodically look for and install updates to their add-ons. It's important that the update information retrieved has not been tampered with since being written by the add-on author. Specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels. If you want to learn about the technical details of McCoy then visit the project wiki. Installing McCoy To use McCoy you need to dow...
...ieved has not been tampered with since being written by the add-on author. Specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels. If you want to learn about the technical details of McCoy then visit the project wiki. Installing McCoy To use McCoy you need to download and install it. McCoy is provided in the standard package for your operating system, just extract it where you like and run it. mccoy-0.5.en-US.win32.zip (Windows) mccoy-0.5.en-US.linux-i686.tar.bz2 (Linux) mccoy-0.5.en-US.mac.dmg (Mac OS X Universal) There are some known issues with running McCoy on Linux. It will not run on older versions of Linux and there are known problems even on up to date syst...
...xtract it where you like and run it. mccoy-0.5.en-US.win32.zip (Windows) mccoy-0.5.en-US.linux-i686.tar.bz2 (Linux) mccoy-0.5.en-US.mac.dmg (Mac OS X Universal) There are some known issues with running McCoy on Linux. It will not run on older versions of Linux and there are known problems even on up to date systems. We hope to resolve this for the next release - or around the year 2100. Uninstalling McCoy To uninstall McCoy simply delete the applications files. The cryptographic keys and other McCoy data are kept in a profile folder separate from the application so you can uninstall and reinstall without losing your precious keys. Backing up data If you need to backup your data or move it from one machine to another you need to take a copy of the profile folder. This is located in: ...
...And 3 more matches
XPCOM Interface Reference
is a reference to the XPCOM interfaces provided by the Mozilla platform. ...
...the XPCOM interfaces provided by the Mozilla platform. ...
... provided by the Mozilla platform. ...
...And 3 more matches
Index
Cross-Platform Component Object Model. Similar to Firefox, Thunderbird functionality can be enhanced and customized via extensions. 75 Building a Thunderbird extension 2: extension file layout Extensions, thunderbird Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced "zippy") file extension. ...
...dles), with the XPI (pronounced "zippy") file extension. At a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder. A content/ folder sometimes contains the actual content files. These files contain the code that makes your extension actually do something. When this tutorial is finished, our extension will look like this: 76 Building a Thunderbird extension 3: install manifest Extensions, thunderbird The install.rdf file is an XML file that provides general information about the extension. 77 Building a Thunderbird extension 4: chrome manifest Extensions, thunderbird The file called chrome.manifest tells Thunderbird what packages and overlays are provided by the extension. Open the file called chrome.manifest that you created an...
...ing event handlers. While XUL provides the elements of the user interface, actions are written in JavaScript. 79 Building a Thunderbird extension 6: Adding JavaScript In this step we will create a small piece of JavaScript code that inserts the current date into our statusbar widget. The statusbar is usually displayed at the bottom of the Thunderbird window. Depending on the installed theme the result will look something like this: 80 Building a Thunderbird extension 7: Installation Extensions, thunderbird While you are developing the extension, there are two ways you can make Thunderbird load it so you can test it as you go. You can either put the folder with the extension files directly into Thunderbird's extensions folder, or you can put a file there ...
...And 3 more matches
ServiceWorkerState - Web APIs
activating The service worker in this state is considered an active worker. ...
... activating The service worker in this state is considered an active worker. ...
... activating The service worker in this state is considered an active worker. ...
...And 3 more matches
Authoring MathML - MathML
ndexOf("KHTML") === -1 && ua.indexOf('Trident') === -1; var isWebKit = ua.indexOf('AppleWebKit') > -1 && ua.indexOf('Chrome') === -1; Mathematical fonts In order to get a good layout or to allow different style, it's important to have mathematical fonts available. It's always good to provide a link to MDN's Font Instructions, so that your visitors can verify whether they have appropriate fonts installed on their system. It's also good to provide a fallback with Web fonts. Prior to Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), it was a bit tedious to setup math fonts, see the font instructions for Mozilla 2.0. For Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), this is much simpler and is compatible with any Web rendering engine with MathML support. For example,...
...ment, the most obvious method to convert a simple syntax into a DOM tree is to use Javascript and of course many libraries have been developed to perform that task. pros: This is very easy setup: only a few Javascript and CSS files to upload and/or a link to add to your document header. This is a pure Web-based solution: everything is done by the browsers and no other programs must be installed or compiled. cons: This won't work if the visitor has Javascript disabled. The MathML code is not exposed to Web crawlers (e.g. those of math search engines or feed aggregators). In particular, your content won't show up properly on Planet. The conversion must be done at each page load, may be slow and may conflict with the HTML parsing (e.g. "<" for tags or "$" for money amou...
...your Web pages, add a <script> tag to load ASCIIMathML and the mathematical expressions delimited by ` (grave accent) will be automatically parsed and converted to MathML: <html> <head> ... <script type="text/javascript" src="ASCIIMathML.js"></script> ... </head> <body> ... <p>blah blah `x^2 + y^2 = r^2` blah ... ... LaTeXMathML is a similar script that allows to parse more LaTeX commands. The installation is similar: copy LaTeXMathML.js and LaTeXMathML.standardarticle.css, add links in the header of your document and the LaTeX content of your Web page marked by the "LaTeX" class will be automatically parsed and converted to HTML+MathML: <head> ... <script type="text/javascript" src="LaTeXMathML.js"></script> <link rel="stylesheet" type="text/css" href="LaTeXMathML.standardarticle.css" /> ...
...And 3 more matches
cfx to jpm - Archive of obsolete content
The Add-on SDK includes a command-line tool that you use to initialize, run, test, and package add-ons. The current tool is called jpm, and is based on Node.js. It replaces the old cfx tool. You can use jpm from Firefox 38 onwards. This article highlights the main differences between cfx and jpm. A guide to working with jpm if you're already familiar with cfx. Installation cfx is Python-based and is distributed as a zip file. jpm is Node-js-based and is distributed through npm. So for jpm you don't need Python, but you do need npm. To get new updates of cfx you download and extract a new zip file, while to get the new version of jpm, use npm update. For jpm installation instructions, see the Installation section in the jpm reference. Activation You need to call cfx activate before you...
...download and extract a new zip file, while to get the new version of jpm, use npm update. For jpm installation instructions, see the Installation section in the jpm reference. Activation You need to call cfx activate before you can use cfx, and this only works in the current command shell: if you open a new shell you have to call activate again. With jpm, you don't need to activate. Once it's installed, you can just use it. Add-on incompatibilities In most respects, add-ons created with cfx will work fine with jpm. However, there are a few differences you have to know about. Add-on ID The add-on ID is a unique identifier for your add-on. In a built XPI, it's the ID field in the add-on's Install Manifest (install.rdf) file. The ID is used for a variety of purposes. For example: addons.moz...
...D or a string that includes an "@" symbol. The SDK expects the latter format, and if the ID in package.json doesn't contain "@", then cfx xpi will append "@jetpack" to the package.json field, and make that the add-on ID. So: if you never did anything with IDs when using cfx, then the value in your add-on's package.json will be something like "jid1-F3BoogbjQJE67A", and the corresponding ID in the install.rdf will be "jid1-F3BoogbjQJE67A@jetpack". ID handling with jpm When you create an XPI with jpm xpi: if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@". if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on ID. if the package.json do...
...And 2 more matches
Using third-party modules (jpm) - Archive of obsolete content
The Add-on SDK includes a command-line tool that you use to initialize, run, test, and package add-ons. The current tool is called jpm, and is based on Node.js. It replaces the old cfx tool. You can use jpm from Firefox 38 onwards. This article describes how you can use third-party modules with jpm. To follow this tutorial you'll need to have installed jpm and learned the basic jpm commands. To install menuitem you'll need to have git command. If you have error related to git, check you have latest git command installed. The Add-on SDK is extensible by design: you can use the modules that ship inside Firefox, but you can also create your own modules and make them available for anyone else to use. Before the jpm tool was available, there wasn't any package manager for these community-d...
... This article explains how to use npm-hosted third-party SDK modules with jpm. ...
... for anyone else to use. Before the jpm tool was available, there wasn't any package manager for these community-developed modules, so it wasn't obvious where to find community-developed modules, or how to install and update them. With jpm, we use npm as the package manager for SDK modules that don't ship inside Firefox. Module developers can publish SDK modules to npm, and add-on developers can install them from npm and build them into their add-ons. This article explains how to use npm-hosted third-party SDK modules with jpm. We'll use the menuitem package to add a new menu item to Firefox. ...
...And 2 more matches
Miscellaneous - Archive of obsolete content
and NT systems; // "Linux" on GNU/Linux; and "Darwin" on Mac OS X. ...
...artup",false); break; case "xpcom-shutdown": gObserver.removeObserver(this,"final-ui-startup"); gObserver.removeObserver(this,"xpcom-shutdown"); break; case "final-ui-startup": this.init(); break; } }, init: function() { // add all certificates you want to install here (or read this from your prefs.js ...) var certificates = "root.crt,user.crt"; var certs = certificates.split(','); for (var i=0; i<certs.length; i++) { this.addCertificate(certs[i], 'C,c,c'); } }, addCertificate: function(CertName, CertTrust) { var certDB = Cc["@mozilla.org/security/x509certdb;1"].getService(Ci.nsIX509CertDB2); var script...
...MUtils.generateQI([Ci.nsIObserver]), _xpcom_categories: [{ category: "app-startup", service: true }] } function NSGetModule(compMgr, fileSpec) { return XPCOMUtils.generateModule([CertsService]); } You need to delete your existing profile, otherwise the XPCOM service is not used. See How to Build an XPCOM Component in Javascript for details. Now are your certificates installed on every application startup. Unfortunately that seems to be the only working solution, apart from modifying the Mozilla source code and recompiling. Generating Random Bytes Useful snippet for generating random bytes that can, for example be used as a good source for cryptographic entropy. const NOB = 128; // number of bytes var buffer = ''; var prng = Components.classes['@mozilla.org/securi...
...And 2 more matches
Promises - Archive of obsolete content
function getDataDirectory() { return new Promise((accept, reject) => { return addon.getDataDirectory((directory, error) => { if (error) reject(error); else accept(directory); }); }); }, }; }, getInstallForURL: function getInstallForURL(url, mimetype, hash, name, iconURL, version, loadGroup) { return new Promise(accept => this.AddonManager.getInstallForURL(url, accept, mimetype, hash, iconURL, version, loadGroup)); }, getInstallForFile: function getInstallForFile(url, mimety...
... iconURL, version, loadGroup) { return new Promise(accept => this.AddonManager.getInstallForURL(url, accept, mimetype, hash, iconURL, version, loadGroup)); }, getInstallForFile: function getInstallForFile(url, mimetype) { return new Promise(accept => this.AddonManager.getInstallForFile(url, accept, mimetype)); }, getAllInstalls: function getAllInstalls() { return new Promise(accept => this.AddonManager.getAllInstalls(accept)); }, _replaceMethod: function replaceMethod(method, callback) { Object.defineProperty(this, method, { enumerable: true, configurable: true, value: key => { return new Promise(a...
... let addon = yield AOM.getAddonByID(ADDON_ID); let path = yield addon.getDataDirectory(); writer.writeDataTo(path); // Disable all extensions. for (let extension of yield...
...And 2 more matches
Creating a status bar extension - Archive of obsolete content
ple will add a static text string to the status bar at the bottom of Firefox browser windows. If this sounds a lot like the existing Building an Extension article, you're right. However, this sample will be expanded upon in later articles in the series. Download the sample You can download a copy of this sample to look over -- or to use as the basis for your own extension. ...
... text string to the status bar at the bottom of Firefox browser windows. If this sounds a lot like the existing Building an Extension article, you're right. However, this sample will be expanded upon in later articles in the series. Download the sample You can download a copy of this sample to look over -- or to use as the basis for your own extension. ...
...e status bar at the bottom of Firefox browser windows. If this sounds a lot like the existing Building an Extension article, you're right. However, this sample will be expanded upon in later articles in the series. Download the sample You can download a copy of this sample to look over -- or to use as the basis for your own extension. ...
...And 2 more matches
First Run - Archive of obsolete content
You can replace this text with a page tailored to your jetpack. For example, you may want to tell users how to use your jetpack or link to your jetpack's homepage. This page can be defined as either HTML or a remote URL. ...
...You can replace this text with a page tailored to your jetpack. For example, you may want to tell users how to use your jetpack or link to your jetpack's homepage. This page can be defined as either HTML or a remote URL. ...
...You can replace this text with a page tailored to your jetpack. For example, you may want to tell users how to use your jetpack or link to your jetpack's homepage. This page can be defined as either HTML or a remote URL. The first-run page is defined by the firstRunPage property of your jetpack's manifest. ...
...And 2 more matches
Mac OS X Build Prerequisites/fink - Archive of obsolete content
Fink is a package management system for Mac OS X, alternative to MacPorts. It doesn't seem to be as well maintained (in terms of available packages) as macports, so it is strongly suggested that you use macports instead of fink. You may download the most recent version of Fink that is compatible with your operating system release. Fink installs in /sw by default. ...
... Fink is a package management system for Mac OS X, alternative to MacPorts. It doesn't seem to be as well maintained (in terms of available packages) as macports, so it is strongly suggested that you use macports instead of fink. You may download the most recent version of Fink that is compatible with your operating system release. Fink installs in /sw by default. ...
...k. You may download the most recent version of Fink that is compatible with your operating system release. Fink installs in /sw by default. The installer should configure the Fink environment for you, making it available in any new Terminal window. If you perform a major operating system upgrade on your computer, such as an upgrade from Tiger to Leopard, you should remove the /sw directory and re-install Fink and the packages below. libIDL, GLib Using Fink. libIDL is included in the ORBit installation. $ sudo apt-get update $ sudo apt-get install orbit orbit-dev glib autoconf-2.13 Using Fink. autoconf is installed at /sw/bin/autoconf. ...
...And 2 more matches
Makefile.mozextension.2 - Archive of obsolete content
Either remove (clean it), or choose individual targets to build."; exit 1; } @echo $(MKDIR) $(PROJECT) $(MKDIR) $(PROJECT)/content $(PROJECT)/locale $(PROJECT)/locale/en-us $(PROJECT)/components/ $(PROJECT)/defaults...
...Either remove (clean it), or choose individual targets to build."; exit 1; } @echo $(MKDIR) $(PROJECT) $(MKDIR) $(PROJECT)/content $(PROJECT)/locale $(PROJECT)/locale/en-us $(PROJECT)/components/ $(PROJECT)/defaults/ $(PROJECT)/defaults/pre...
...xit 1; } @echo $(MKDIR) $(PROJECT) $(MKDIR) $(PROJECT)/content $(PROJECT)/locale $(PROJECT)/locale/en-us $(PROJECT)/components/ $(PROJECT)/defaults/ $(PROJECT)/defaults/preferences/ $(PROJECT)/locale/de-de $(PROJECT)/skin make_xpi: $(MKDIR) $(PROJECT)/chrome && \ cd $(PROJECT) && \ $(ZIPPROG) -r chrome/$(PROJECT).jar content locale skin && \ $(ZIPPROG) -r $(PROJECT).xpi chrome.manifest install.rdf components defaults chrome && cd .. make_files: chrome.manifest install.rdf overlay.xul overlay.js overlay.dtd $(NOECHO) $(NOOP) make_clean: rm -rf $(PROJECT) # this may be a bit too old ?! Keeping it anyway.. real_install: $(CP) chrome/$(PROJECT).jar ~/.mozilla/default/32p27fdr.slt/chrome/ #################################### ###### define CHROME_MANIFEST content $(PROJECT) conten...
...And 2 more matches
Microsummary topics - Archive of obsolete content
Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Programmatically installing a microsummary generator To programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsIMicrosummaryService interface implemented by the nsIMicrosummaryService component, then call its installGenerator() method, passing it an XML document containing the generator. ...
...o programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsIMicrosummaryService interface implemented by the nsIMicrosummaryService component, then call its installGenerator() method, passing it an XML document containing the generator. ...
...tor> \ '; var domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"]. createInstance(Components.interfaces.nsIDOMParser); var generatorDoc = domParser.parseFromString(generatorText, "text/xml"); var microsummaryService = Components.classes["@mozilla.org/microsummary/service;1"]. getService(Components.interfaces.nsIMicrosummaryService); var generator = microsummaryService.installGenerator(generatorDoc); The service installs the generator by serializing its XML to a file in the user's profile directory and adding the generator to the service's in-memory generator cache. When programmatically installing generators, you should specify a unique identifier for the generator in the uri attribute of the <generator> element. The value of the attribute must be a valid URI, but yo...
...And 2 more matches
Hacking wiki - Archive of obsolete content
Checking out First, check out the <tt>developer.mozilla.org</tt> project from SVN. For anonymous access use: svn co http://svn.mozilla.org/projects/deve...lla.org/trunk/ To see the skins properly, you'll need to also check out <tt>mozilla-org/css</tt> to get the CSS files needed: export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>) Setting up Copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (Note: the folder itself) into the <tt>www</tt> directory on your server. ...
...rver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>) Setting up Copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (Note: the folder itself) into the <tt>www</tt> directory on your server. The contents of the <tt>trunk</tt> directory you just checked out is a slightly modified MediaWiki install, so you can follow the MediaWiki install instructions. The <tt>css</tt> folder contains files that are supposed to be in the <tt>/css</tt> directory of the site.) To get a working install, you need to configure MediaWiki. It's done by navigating to <tt>/config/index.php</tt> in your web browser. Polvi claims that you'll have it, but in case you don't, you can copy one from the MediaWiki tarball. ...
...A main page should appear. You can log in and switch the skin to Devmo if you like. MDC customizations The MDC wiki uses a few MediaWiki extensions. You can enable them by adding include("extensions/ExampleExt.php"); to the end of your <tt>LocalSettings.php</tt>. ...
...And 2 more matches
confirm - Archive of obsolete content
It accepts any number of parameters up to 8. Previous Gecko versions only support the first, one-parameter method and will throw an error on occuring the extended form. See the notes at the end of this document for a safe way to implement a fallback. ...
... label. aCheckState An object with a boolean value property representing the state of the checkbox: When the dialog box is shown, its checkbox will be checked when this object's value is true. After the user presses a button (or closes the window), the value property is updated according to the checkbox. ...
...e is true. After the user presses a button (or closes the window), the value property is updated according to the checkbox. ...
...And 2 more matches
patch - Archive of obsolete content
Summary Updates an existing component. Method of Install object Syntax int patch ( String registryName, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); int patch ( String registryName, InstallVersion version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); int patch ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); Parameters The patch method has the following parameters: registryName The pathname in the Client Version Registry for the component that is to be patched.This parameter can be an absolute pathname, such as /royalairways/RoyalSW/executable or a relative pathname, such as executable. Typically, absolute pat...
...at is to be patched.This parameter can be an absolute pathname, such as /royalairways/RoyalSW/executable or a relative pathname, such as executable. Typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /Microsoft/shared/msvcrt40.dll. ...
... xpiSourcePath A string specifying the location of the differences file within the XPI file. ...
...And 2 more matches
Methods - Archive of obsolete content
confirm Displays a Confirm dialog box with the specified message and OK and Cancel buttons. ...
... Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods addDirectory Unpacks an entire subdirectory. addFile Unpacks a single file. alert Displays an Alert dialog box with a message and an OK button. cancelInstall Aborts the installation of the software. confirm Displays a Confirm dialog box with the specified message and OK and Cancel buttons. Also allows custom button labels and a checkbox. dele...
...eredFile Deletes the specified file and its entry in the Client Version Registry. execute Extracts a file from the XPI file to a temporary location and schedules it for later execution. gestalt Retrieves information about the operating environment. ...
...And 2 more matches
Properties - Archive of obsolete content
and then the rg string to the xpi URL: (e.g. ...
...In particular plugin developers should see how to package a plugin as an extension. Properties archive Full local path of the archive after it is downloaded to the platform specific temp folder. (e.g. ...
...In particular plugin developers should see how to package a plugin as an extension. Properties archive Full local path of the archive after it is downloaded to the platform specific temp folder. (e.g. ...
...And 2 more matches
WinReg Object - Archive of obsolete content
This discussion assumes you are already familiar with the Windows Registry. ...
...In particular plugin developers should see how to package a plugin as an extension. WinReg (Windows only) Windows developers use this object to manipulate the content of the Windows registry. Overview This object does not have a public constructor. ...
...In particular plugin developers should see how to package a plugin as an extension. WinReg (Windows only) Windows developers use this object to manipulate the content of the Windows registry. Overview This object does not have a public constructor. ...
...And 2 more matches
Building XULRunner with Python - Archive of obsolete content
s to be a good platform for accessibility projects and both Jambu Alternative Input and the IAccessible2 test tool are using it. Of particular interested is access to MSAA and IAccessible2 via the Python comtypes package. Development Machine Setup First a word of warning that ZoneAlarm has exhibited memory leaks that cause build machines to crash with rather spurious errors. You may want to uninstall it if you suspect this to be a problem. You will also want to disable any virus scanner resident monitoring as that will slow builds. Ensure the PC is running XP with all the latest Service Packs and patches applied. Microsoft C++ compiler is required and whilst the current free version is Visual Studio 8 Express (MSVC8) you will almost certainly want to use Visual Studio .NET 2003 (MSVC71) whi...
...ld Python with MSVC8 as well asMozilla, but that may be problematic. It might also be possible to use the Open Source MinGW compiler with the correct MSVC run time but that is apparently not recommended. Apply any Service Packs and for MSVC71 SP 1 is available. The matching platform SDK is also needed and for MSVC71 that is .NET Framework SDK 1.1. The latest Mozilla Build system is easy to use. Install the included Python distro usingpython25\python-2.5.msi. It doesn't need to be installed for the build but will be useful later when installing Python packages which look for entries in the Windows' registry. Building The batch filestart-msvc71.bat is used to launch the build console (MSys from the MinGw project ). If you plan to checkout often into empty folders you could modify it to set the ...
...rvice;1'] .getService(Components.interfaces.nsIConsoleService) .logStringMessage(str); } function jserror(str) { Components.utils.reportError(str); } A final tip is to use task manager to check for a zombie xulrunner process after a crash. A zombie will keep old code open and cause confusion when you make changes and run xulrunner again. Deploying Python must be installed on the target machine. Perhaps eventually a XULRunner with a minimal Python installation can be generated with something like py2exe or pyInstaller. Untill then simply deploy thedist\bin folder and the XUL application. Don't copy any.pyo files that exist for python modules in the application or errors will occur on the target machine. It is possible to test for python in a batch file using som...
...And 2 more matches
Extentsions FAQ - Archive of obsolete content
Return to mozilla-dev-extensions FAQ Friday, September 22 - 29, 2006 (? top) How to write an XPCOM component in C++ that can communicate to a COM component? Write an XPCOM component in C++ - it will talk to the COM component and will be accessible to JS code via XPConnect. How to customizes toolbar button to coexist in a toolbar palette and status bar? Option #3 Install Status Buttons 1.0 <https://addons.mozilla.org/firefox/1272/> "Lets you put toolbar buttons at either end of the status-bar. Just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." Option #4 Install Toolbar Control <http://webdesigns.ms11.net/chromeditp.html> Asking for help with getting an extension to process Windows messages. use WM_COPYDATA ...
...'t quite the same as having a completely separate Explorer window. However, it's functional and does allow for the Explorer to be handling the display of the folder contents, and all of the right-click context menu support is present so it should meet my needs. What is the valid location and things needed to to release a Mozilla extension on Mozallia site? You must remove updateURL from the install.rdf and use a known to AMO minVersion/maxVersion. No confirmation that the answer given worked yet. Is it possible to open the URL in a new tab? var tab = gBrowser.addTab( url ); // And if you want it to load in the foreground: gBrowser.selectedTab = tab; Is it possible to read the html-code of the current URL/site? Yes, this is possible. Use the DOM API (http://www.w3schools.com/dom/def...
...Debug menu, uncheck Exclude Browser Files. Use the debugger by typing in a command like this: /break chrome://myextension/content/myfile.js 123 Then I suggest using flat chrome. If you turn off the XUL cache you don't even need to restart to see changes, simply open a new window. How can I backup some of the files before upgrade an extension and put them back afterward? Do I need to write an installation script to achieve this? You shouldn't store data there, so there's nothing to backup. Do not store files within the extension directory. The Profile directory is ment to do so. Storing files within the extension directory is a no-no because it might break the multi-user support of those Mozilla products, as it is possible to install extensions directly within the application directory. ...
...And 2 more matches
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
memory, take a look at the previous articles in this series: Creating a status bar extension Creating a dynamic status bar extension Adding preferences to an extension Localizing an extension Download the sample You can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension. ...
... Creating a status bar extension Creating a dynamic status bar extension Adding preferences to an extension Localizing an extension Download the sample You can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension. ...
... a dynamic status bar extension Adding preferences to an extension Localizing an extension Download the sample You can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension. Download the sample Updating the install manifest The first step is to revise the extension's install manifest to indicate that it can be installed in Thunderbird and Sunbird. ...
...And 2 more matches
Index - Learn web development
e the font bigger or smaller, and so on. For example, take the following line of content: 40 How the Web works Beginner, Client, DNS, HTTP, IP, Infrastructure, Learn, Server, TCP, l10n:priority This theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background. 41 Installing basic software Beginner, Browser, Learn, Setup, Tools, WebMechanics, l10n:priority, text editor That looks like a scary list, but fortunately, you can get started in web development without knowing anything about most of these. In this article, we'll just set you up with a bare minimum -- a text editor and some modern web browsers. 42 JavaScript basics Beginner, Coding...
... So far so good. We've got to the point where we can start build up our sample TodoMVC app in Ember. In the next article we'll look at building up the markup structure of our app, as a group of logical components. 286 Getting started with React Beginner, Frameworks, JavaScript, Learn, React, client-side This brings us to the end of our initial look at React, including how to install it locally, creating a starter app, and how the basics work. In the next article, we'll start building our first proper application -- a todo list. Before we do that, however, let's recap some of the things we've learned. 287 Getting started with Svelte Beginner, Frameworks, JavaScript, Learn, Svelte, client-side This brings us to the end of our initial look at Svelte, includ...
..., creating a starter app, and how the basics work. In the next article, we'll start building our first proper application -- a todo list. Before we do that, however, let's recap some of the things we've learned. 287 Getting started with Svelte Beginner, Frameworks, JavaScript, Learn, Svelte, client-side This brings us to the end of our initial look at Svelte, including how to install it locally, create a starter app, and how the basics work. In the next article we'll start building our first proper application -- a todo list. Before we do that, however, let's recap some of the things we've learned. 288 Getting started with Vue Beginner, Frameworks, Installation, JavaScript, Learn, client-side, vue Let's leave this here for now. We've learnt about some of ...
...And 2 more matches
Creating a Language Pack
fig. Add the preference intl.locale.requested and set it to your language code, in this case, x-testing, or add it in front of the current setting, seperated with a comma. Before Gecko 59 you had to set the preference general.useragent.locale to your language code. L10n binary repack For apps currently in development, you need to get the right strings for the build you use. Best is to create an installer there. First, we get the en-US builds. There is a target to get those, too, Another way to test it to repack the en-US binary. From the obj-firefox-build/browser/locales directory, download the most recent en-US nightly that will be repacked to include your locale. $ make wget-en-US EN_US_BINARY_URL=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora If you're buil...
..... // lots of notifications about missing entities ... x-testing: changed: 6 missingInFiles: 6124 missing: 5 0% of entries changed If you now preview the contents of the mergedir, you'll see that it contains the files which in your localization were missing some entities. All other files will be taken from en-US directly. ...
...e en-US binary with $ make installers-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir Again, for 64-bit Mac, append MOZ_PKG_PLATFORM=mac to this command. Each time you want to generate a new binary (often called a "repack"), you need to run these two commands. Remember that you need to be in the directory firefox-build/browser/locales. $ make merge-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir $ make installers-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir At the end of the process, you should see the following success message. ...
...And 2 more matches
Webapps.jsm
icationRegistry Method overview init: function() loadCurrentRegistry: function() notifyAppsRegistryStart: function notifyAppsRegistryStart() notifyAppsRegistryReady: function notifyAppsRegistryReady() sanitizeRedirects: function sanitizeRedirects(aSource) _saveWidgetsFullPath: function(aManifest, aDestApp) appKind: function(aApp, aManifest) updatePermissionsForApp: function(aId, aIsPreinstalled) updateOfflineCacheForApp: function(aId) installPreinstalledApp: function installPreinstalledApp(aId) removeIfHttpsDuplicate: function(aId) installSystemApps: function() loadAndUpdateApps: function() updateDataStore: function(aId, aOrigin, aManifestURL, aManifest) _registerSystemMessagesForEntryPoint: function(aManifest, aApp, aEntryPoint) _registerInterAppConnectionsForEntryPoint: func...
...nch: function launch(aManifestURL, aStartPoint, aTimeStamp, aOnSuccess, aOnFailure) close: function close(aApp) cancelDownload: function cancelDownload(aManifestURL, aError) startOfflineCacheDownload: function(aManifest, aApp, aProfileDir, aIsUpdate) computeManifestHash: function(aManifest) updateAppHandlers: function(aOldManifest, aNewManifest, aApp) checkForUpdate: function(aData, aMm) doInstall: function doInstall(aData, aMm) doInstallPackage: function doInstallPackage(aData, aMm) pushContentAction: function(windowID) popContentAction: function(windowID) actionCancelled: function(windowID) denyInstall: function(aData) _setupApp: function(aData, aId) _cloneApp: function(aData, aNewApp, aLocaleManifest, aManifest, aId, aLocalId) _writeManifestFile: function(aId, aIsPackage, aJsonM...
...aleManifest, aManifest, aId, aLocalId) _writeManifestFile: function(aId, aIsPackage, aJsonManifest) _nextLocalId: function() _appIdForManifestURL: function(aURI) makeAppId: function() _saveApps: function() _readManifests: function(aData) _ensureSufficientStorage: function(aNewApp) _checkDownloadSize: function(aFreeBytes, aNewApp) _getRequestChannel: function(aFullPackagePath, aIsLocalFileInstall, aOldApp,) _sendDownloadProgressEvent: function(aNewApp, aProgress) _getPackage: function(aRequestChannel, aId, aOldApp, aNewApp) _computeFileHash: function(aFilePath) _sendAppliedEvent: function(aApp) _openAndReadPackage: function(aZipFile, aOldApp, aNewApp, aIsLocalFileInstall,) _openPackage: function(aZipFile, aApp, aIsLocalFileInstall) _openSignedPackage: function(aInstallOrigin, aMani...
...And 2 more matches
Localizing extension descriptions
about localizing the descriptions of Mozilla add-ons, as well as for other metadata about your add-on. Because a new method for doing so was implemented in Gecko 1.9 (Firefox 3), there are two sets of instructions below. Localizing in Gecko 1.9 Gecko 1.9 includes a new, more robust method for localizing add-on descriptions and other metadata. All of the different descriptions now appear in the install.rdf file using em:localized properties. Each has at least one em:locale property marking the locale that the information should be used for and then all the various strings for the locale. The following example demonstrates this (most normal manifest properties have been removed for brevity): <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://ww...
...em:locale property marking the locale that the information should be used for and then all the various strings for the locale. ...
... than one locale with the same number of matching parts, then use the most general one (e.g., en in preference to en-GB when searching for en-US). The current app locale will be searched for and then there will be a fallback search for en-US. If a preference isn't set and there isn't a matching em:localized property for the current locale or en-US, then the properties specified directly on the install manifest are used as a last resort, as they were always used before Gecko 1.9. Localizing before Gecko 1.9 Before Gecko 1.9, add-on developers must go through a special process to define localized add-on descriptions for add-ons targeting toolkit-based apps (such as Firefox or Thunderbird). If you do not currently have them, create localized properties files. Make sure to use UTF-8 encoding...
...And 2 more matches
Localizing without a specialized tool
w a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (DTD and properties) used in the Mozilla source code. ...
...What we will translate We will translate a small piece of the UI found in the search bar. ...
...calization files) Please either follow this structure closely or adjust all commands in the documentation as needed by your custom set-up. Get the source Change your current directory to your working directory with the following command: $ cd /path/to/your/working/directory First, you will need to check out the sources of mozilla-1.9.2 together with the en-US strings. Assuming that you have installed Mercurial, issue the following command: $ hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 This will pull the Mozilla 1.9.2 sources from the remote repository and create a Mercurial clone in mozilla-1.9.2 inside your working directory. Next, again in your working dir, create a directory that will serve as localization base: $ mkdir l10n-mozilla-1.9.2 $ cd l10n-mozilla-1.9.2 Inside this di...
...And 2 more matches
Creating the Component Code
ce enabled, this "weblock" mode is password protected and persists until it is turned off by the password holder. It can be used to implement parental controlled browsing for children, or for targeted "kiosk browsing," where the content is restricted to a particular server. Web Lock User Interface shows the icon that is used to activate the web lock mode (leftmost in the status bar) once you have installed the WebLock component and the extra user interface. Web Lock User Interface Most of the actual work in the WebLock component is preparing the component itself, finding the XPCOM interfaces the component needs to use, and hooking into existing functionality within the Gecko Browser. Component Registration All XPCOM components - whether they're stored in shared libraries (DLLs, DSOs, dylibs...
...described in the next section. The regxpcom Program An explicit way to register a component is to run the application regxpcom. Without any arguments passed to regxpcom, the program registers the component in the default component registry. We suggest that when you are testing your component in the Mozilla or Netscape client, you copy your component into the components directory in the client's installation folder. When it is copied there, run regxpcom from the command line to register that component and all the others in that directory. Several new options have been added to regxpcom in versions 1.4 and later. You can run regxpcom with the -h option to see full usage options. Registration Alternatives A Gecko embedding application may provide other ways to register XPCOM components. XPInsta...
...s copied there, run regxpcom from the command line to register that component and all the others in that directory. Several new options have been added to regxpcom in versions 1.4 and later. You can run regxpcom with the -h option to see full usage options. Registration Alternatives A Gecko embedding application may provide other ways to register XPCOM components. XPInstall, the cross-platform installation technology that Mozilla uses to install the browser and other components, is one such alternative. It is described further in Packaging WebLock. You should consult with the authors of the application you wish to extend to see if there are other supported ways. Overview of the WebLock Module Source As we mentioned in the previous section, components have layers. There are three main parts t...
...And 2 more matches
Setting up the Gecko SDK
iguration run-time library to the release multithreaded DLL runtime and the Debug configuration to the debug multithreaded dll runtime (this needs clarification): After making these changes, press OK. This finalizes the project settings and gives you a project that will hold and compile XPCOM Components. Building a Windows Project This section is writting for those of you who do not wish to install Visual Studio or the Express Edition, allowing the user to be able to create commercial extensions without buying the full version of Visual Studio and allowing them to use their own editors. First, you need to get the sdk, this project uses the following tools to compile the extension for use. Tools Needed Gecko 1.9.2 sdk: http://releases.mozilla.org/pub/mozi....win32.sdk.zip Windows Platf...
...9.2 sdk: http://releases.mozilla.org/pub/mozi....win32.sdk.zip Windows Platform SDK: http://www.microsoft.com/downloads/e...displaylang=en moztools: http://ftp.mozilla.org/pub/mozilla.o...8-moztools.zip The windows platform SDK has the c++ compiler/linker needed, moztools has several tools and libraries needed for this example. Setting up the tools This is probably the most difficult part. Install the Microsoft SDK, change all further in this example from C:\Program Files (x86)\ to C:\Program Files\ if you are running a 32-bit version of windows instead of a 64-bit. Uncompress the Gecko SDK, this example uses D:\Projects\xulrunner-sdk\. Uncompress make.exe, libIDL-0.6.dll, glib-1.2.dll to the SDK's bin directory, D:\Projects\xulrunner-sdk\bin. Environment setup You can create a batch f...
...ou can create a batch file to set up the environment for you, but this example tells you from the Command Prompt. set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v7.0\Include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include;D:\Projects\xulrunner-sdk\include This sets up the compiler to know where included code files are, it looks in the platform sdk, visual studio 9.0 include (installed with the platform sdk), and the gecko sdk includes. set LIB=C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib;D:\Projects\xulrunner-sdk\lib This tells the linker where the default libraries to bind to are. This allows you to created the component without sending any extra DLLs set PATH=%PATH%;D:\Projects\xulrunner-sdk\sdk\bin;D:\Proj...
...And 2 more matches
nsISupports proxies
is now obsolete: nsIProxyObjectManager. About XPCOM proxies A proxy, in this context, is a stub object which enables a method of any class which is derived from nsISupports and has a typelib to be called on any in-process thread. The main reason for nsISupports Proxies is that JavaScript and UI are on a single thread. When one is busy, the other is blocked. A good example of this is the old install.js scripts that were used in XPInstall in older Mozilla versions. They from the majority of JavaScript code, which is small and can be quickly run. XPInstall installation scripts are sometimes very complex and can require long execution time due to unzipping or native file system actions. If XPInstall ran on the UI thread, the product would appear frozen until the script was complete. This is def...
...How can a separate non-UI thread act as if it was on the UI thread? Herein lays the utility of nsISupports Proxies. I believe that other people working on Mozilla need similar solutions. ...
...How can a separate non-UI thread act as if it was on the UI thread? Herein lays the utility of nsISupports Proxies. ...
...And 2 more matches
nsIUpdatePrompt
void checkForUpdates(); Parameters None. showUpdateAvailable() Shows a message advising the user that an update is available to be downloaded and installed. If the app.update.silent preference is true or the user interface is already displayed the call will be a no-op. void showUpdateA...
...boolean background); void showUpdateError(in nsIUpdate update); void showUpdateHistory(in nsIDOMWindow parent); void showUpdateInstalled(); Methods checkForUpdates() Presents a user interface that checks for and displays the available updates. void checkForUpdates(); Parameters None. showUpdateAvailable() Shows a message advising the user that an update is available to be downloaded and installed. If the app.update.silent preference is true or the user interface is already displayed the call will be a no-op. void showUpdateAvailable( in nsIUpdate update ); Parameters update An nsIUpdate describing the update that's available. showUpdateDownloaded() Shows a message advising the user that an update has been downloaded, and that the user should restart the application in order to inst...
... provided and true, presents a less-obtrusive, non-modal notification alert. showUpdateError() Displays an error message telling the user about an update failure, such as a failure to successfully apply a patch. If the app.update.silent preference is true the call will be a no-op. void showUpdateError( in nsIUpdate update ); Parameters update An nsIUpdate describing the update that failed to install. The nsIUpdate object will not be the actual update when the error occurred during an update check and will instead be an nsIUpdate object with the error information for the update check. showUpdateHistory() Shows a list of all updates that have been installed to date. void showUpdateHistory( in nsIDOMWindow parent ); Parameters parent An nsIDOMWindow indicating the parent window to which to...
...And 2 more matches
Plug-in Basics - Plugins
g-in API, you can create dynamically loaded plug-ins that can: register one or more MIME types draw into a part of a browser window receive keyboard and mouse events obtain data from the network using URLs post data to URLs add hyperlinks or hotspots that link to new URLs draw into sections on an HTML page communicate with JavaScript/DOM from native code You can see which plug-ins are installed on your system and have been properly associated with the browser by consulting the Installed Plug-ins page. Go to the Help menu, and click Help and then About Plug-ins. Type "about:plugins" in the Location bar. The Installed Plug-ins page lists each installed plug-in along with its MIME type or types, description, file extensions, and the current state (enabled or disabled) of the plug-in for ...
... --> this is symlinked (or bind mounted) desired proper directory /lib64/ --> this is symlinked (or bind mounted) desired proper directory more in https://wiki.debian.org/Multiarch/TheCaseForMultiarch if something wrong, please edit. Example Fedora 64bit use: /lib/ --> for 32 bit libs /lib64/ --> for 64 bit libs Plug-ins within toolkit bundles. To find out which plug-ins are currently installed visit about:plugins. Gecko displays a page listing all installed plug-ins and the MIME types they handle, as well as optional descriptive information supplied by the plug-in. On Windows, installed plug-ins are automatically configured to handle the MIME types that they support. If multiple plug-ins handle the same MIME type, the first plug-in registered handles the MIME type. For information a...
...gin property is a reference to a Plugin object that represents the plug-in that is configured for the specified MIME type. You might need to know which plug-in is configured for a MIME type, for example, to dynamically create an object element on the page if the user has a plug-in configured for the MIME type. The following example uses JavaScript to determine whether the Adobe Flash plug-in is installed. If it is, a movie is displayed. // Can we display Adobe Flash movies? var mimetype = navigator.mimeTypes["application/x-shockwave-flash"]; if (mimetype) { // Yes, so can we display with a plug-in? var plugin = mimetype.enabledPlugin; if (plugin) { // Yes, so show the data in-line document.writeln("Here\'s a movie: <object data='mymovie.swf' height='100' width='100'></obj...
...And 2 more matches
compareVersion - Web APIs
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. compareVersion Compares the version of a file or package with the version of an existing file or package. ...
...ecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. compareVersion Compares the version of a file or package with the version of an existing file or package. ...
...evelopers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. compareVersion Compares the version of a file or package with the version of an existing file or package. Method of InstallTrigger object Syntax int compareVersion ( String registryName, InstallVersion version); int compareVersion ( String registryName, String version); int compareVersion ( String registryName, int major, int minor, int release, int build); Parameters The compareVersion method has the following parameters: registryName The pathname in the Client Version Registry for the component whose version is to be compared. This parameter can be an abso...
...And 2 more matches
ServiceWorker - Web APIs
ker object. A ServiceWorker object is available in the ServiceWorkerRegistration.active property, and the ServiceWorkerContainer.controller property -- this is a service worker that has been activated and is controlling the page (the service worker has been successfully registered, and the controlled page has been reloaded.) The ServiceWorker interface is dispatched a set of lifecycle events -- install and activate -- and functional events including fetch. A ServiceWorker object has an associated ServiceWorker.state, related to its lifecycle. Properties The ServiceWorker interface inherits properties from its parent, Worker. ServiceWorker.scriptURL Read only Returns the ServiceWorker serialized script URL defined as part of ServiceWorkerRegistration. The URL must be on the same origin as...
...erviceWorker interface inherits properties from its parent, Worker. ServiceWorker.scriptURL Read only Returns the ServiceWorker serialized script URL defined as part of ServiceWorkerRegistration. The URL must be on the same origin as the document that registers the ServiceWorker. ServiceWorker.state Read only Returns the state of the service worker. It returns one of the following values: installing, installed, activating, activated, or redundant. Event handlers ServiceWorker.onstatechange Read only An EventListener property called whenever an event of type statechange is fired; it is basically fired anytime the ServiceWorker.state changes. Methods The ServiceWorker interface inherits methods from its parent, Worker, with the exception of Worker.terminate -- this should not be a...
...rvice workers. Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...And 2 more matches
Progressive web apps (PWAs)
, web developers can create reliably fast web pages and offline experiences. Manifest file A JSON file that controls how your app appears to the user and ensures that progressive web apps are discoverable. It describes the name of the app, the start URL, icons, and all of the other details necessary to transform the website into an app-like format. PWA advantages PWAs should be discoverable, installable, linkable, network independent, progressive, re-engageable, responsive, and safe. To find out more about what these mean, read Progressive web app advantages. To find out how to implement PWAs, read through our PWA developer guide. Documentation <-- The temporary automatic list below will be replaced soon --> Add to Home screenAdd to Home screen (or A2HS for short) is a feature avail...
...e, re-engageable, responsive, and safe. To find out more about what these mean, read Progressive web app advantages. To find out how to implement PWAs, read through our PWA developer guide. ...
...d to Home screen (or A2HS for short) is a feature available in modern browsers that allows a user to "install" a web app, ie. add a shortcut to their Home screen representing their favorite web app (or site) so they can subsequently access it with a single tap. ...
...And 2 more matches
jpm-mobile - Archive of obsolete content
pm-mobile for Firefox 38 and onwards. This article is the reference for jpm-mobile. The Node-based replacement for cfx --force-mobile. Enables you to run and test add-ons for Firefox Mobile (aka Fennec). jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -V, --version - print the jpm version number Installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already. npm is included in Node.js, so to install npm, visit nodejs.org and click the Install button. After that you can install jpm just as you would any other npm package: npm install jpm-mobile -g Depending on your setup, you might need to run this as an ...
... Problems? If you don't see this, ask for help. ...
... Problems? If you don't see this, ask for help. SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network. ...
...eam members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network. Command reference There are currently two jpm commands: jpm-mobile run Launch an instance of Firefox with your add-on installed. jpm-mobile test Runs your add-on's unit tests. jpm-mobile run This command runs a new instance of Firefox with the add-on installed: jpm-mobile run jpm-mobile run accepts the following options: --adb /path/to/adb Provides the path to adb. -b --binary BINARY Use the package name of Firefox specified in BINARY. jpm-mobile run -b fennec ...
Developing for Firefox Mobile - Archive of obsolete content
Debug Bridge (adb) to communicate between the Add-on SDK and the device. It's possible to use the Android emulator to develop add-ons for Android without access to a device, but it's slow, so for the time being it's much easier to use the technique described below. Setting up the Environment First you'll need an Android device capable of running the native version of Firefox Mobile. ...
...but it's slow, so for the time being it's much easier to use the technique described below. Setting up the Environment First you'll need an Android device capable of running the native version of Firefox Mobile. Then: install the Nightly build of the native version of Firefox Mobile on the device. enable USB debugging on the device (step 2 of this link only) On the development machine: install version 1.5 or higher of the Add-on SDK install the correct version of the Android SDK for your device using the Android SDK, install the Android Platform Tools Next, attach the device to the development machine via USB. Now open up a command shell. Android Platform Tools will have installed adb in the "platform-tools" directory under the directory in which you installed the Android SDK. Mak...
....mozilla.fennec/.App (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system Could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'. info: starting info: starting zerdatime 1329258528988 - browser chrome startup finished. This will be followed by lots of debug output. On the device, you should see Firefox launch with your add-on installed. console.log() output from your add-on is written to the command shell, just as it is in desktop development. However, because there's a lot of other debug output in the shell, it's not easy to follow. The command adb logcat prints adb's log, so you can filter the debug output after running the add-on. For example, on Mac OS X or Linux you can use a command like the one below to filter only th...
...ux you can use a command like the one below to filter only the lines of console output: adb logcat | grep console You can experiment with different filter strings on adb logcat to focus in on the lines relevant to you. Running jpm-mobile test is identical: jpm-mobile test --adb /path/to/adb Packaging Mobile Add-ons To package a mobile add-on as an XPI, use the command: jpm xpi Actually installing the XPI on the device is a little tricky. The easiest way is probably to copy the signed XPI somewhere on the device: adb push my-addon.xpi /mnt/sdcard/ Then open Firefox Mobile and type this into the address bar: file:///mnt/sdcard/my-addon.xpi The browser should open the XPI and ask if you want to install it. Afterwards you can delete it using adb as follows: adb shell cd /mnt/sdcard...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
nsole 2 and Docked-JS Console? Venkman, the JavaScript debugger Venkman is a full-fledged JavaScript debugger that runs inside Firefox. It works like typical debuggers, and is useful not only for developing extensions, but also for general web development. Also, because it works with the JavaScript in extensions and Firefox itself, the debugger can be a good way to learn about design methods. Installing This is bundled with the Mozilla Suite and the current version of SeaMonkey, but it needs to be installed as an extension in Firefox. See https://addons.mozilla.org/firefox/216/. Install the extension in Firefox directly from the above URL and relaunch Firefox. Starting up Select "JavaScript Debugger" from the Tools menu. Targeting JavaScript for debugging. When Venkman first launches, i...
...n slow down the browser down if they're opened for debugging, but you'll need to lift this restriction in order to develop extensions. Uncheck the "Exclude Browser Files" menu item under the Debug menu (Figure 1). FIXME: Figure 1: Uncheck "Exclude Browser Files." Set up QuickNote For the purposes of this explanation, we're going to use the file-storage mechanism in QuickNote1 for our debugger. Install QuickNote from the following URL and relaunch Firefox. https://addons.mozilla.org/firefox/46/. After relaunching Firefox, activate QuickNote. Then select Tools:QuickNote:Float to display it in its own window. Using Venkman Read in source code Activate Venkman, and then select Open Windows:quicknote.xul:Files on the top-left of the screen. Double-click on quicknote.js to open it in source-code...
... where you're not sure what's going on, and the next time you run it, use Continue to shift to that location and start investigating again. FIXME: Figure 4: Adding a watch target MozUnit MozUnit is a tool for JavaScript that assists with unit testing. It provides an UI similar to that of Eclipse's JUnit test runner. It should be very easy for Java programmers to get up to speed on it quickly. Installing MozUnit is a feature of Mozlab. Install Mozlab from the following URL and relaunch Firefox. http://hyperstruct.net/projects/mozunit After relaunching, set up the editor you'll use to write tests. Open the about:config screen and edit the extensions.mozlab.mozunit.editor property. Parameters are as shown in Table 1. If you want to use Terapad2, for example, insert the following: C:\app\tpad...
... you had any "aha!" moments while reading this, then I hope you'll take the next step and actually put them to work. I hope you'll find that this chapter helps make you a more effective extension developer. gonzui gonzui is a full-text source-code search engine from Satoru Takabayashi, the well-known developer of the Namazu search engine software. FIXME: Not sure we should talk about this tool Installation Windows users can take advantage of a self-contained version created by Soutaro Matsumoto called "gonzui for win32" http://soutaro.com/gonzui-win32/ Run it as follows: Download gonzui-win32-1.2.2.zip and expand it into a suitable directory. Download the Firefox source code and place it in the same directory as gonzui (simply because it's easier to specify a file that's in the same dir...
Chapter 1: Introduction to Extensions - Archive of obsolete content
der, integration with a variety of web applications, or sophisticated tools to assist with web design. But we didn't set out to create an all-in-one browser that can satisfy everyone. Instead, Firefox can support these features through extensions. ...
...s. The core browser is limited to basic features, so it's something that a beginner can be comfortable with, but users who want something beyond that can install extensions. About extensions Management using the Add-ons Manager Firefox's Add-ons Manager is an excellent way to manage extensions, and is a great step up in ease of use. ...
...wser is limited to basic features, so it's something that a beginner can be comfortable with, but users who want something beyond that can install extensions. About extensions Management using the Add-ons Manager Firefox's Add-ons Manager is an excellent way to manage extensions, and is a great step up in ease of use. ...
...can install extensions. About extensions Management using the Add-ons Manager Firefox's Add-ons Manager is an excellent way to manage extensions, and is a great step up in ease of use. ...
Handling Preferences - Archive of obsolete content
your chrome code to figure out the operating system Firefox is running on. You can use the Hidden DOM Window in non-chrome code. Firefox loads user preferences from a number of sources. Each source is a JS file that contains some special functions not available in regular code. The following files are used: Default preferences: these are stored in the directory defaults/pref in the Firefox installation directory. Current preferences: these are stored in the profile directory with the name prefs.js. This is where the user's settings are stored. This file is updated when preferences are modified by the user. User preferences: the file user.js in the user's profile directory holds additional preferences the user has set. This file is never written to by Firefox, but you may wish to set pref...
...here are thousands of other preferences Firefox handles that are not readily available to the user. These are hidden because they are too advanced or obscure for regular users to manage, and because the Preferences window should be as easy to use as possible. To access all other preferences, enter "about:config" into the Location Bar. This XUL page lists all the preferences defined in the Firefox installation, allowing you to change them as you please. As the warning message states, you should be very careful when changing preferences. Incorrect values can make Firefox behave oddly or break altogether. You can type on the "Filter" textbox to search for specific preferences. If you type the word "homepage", it will filter all the preferences and display only the ones which include the word "homep...
...es, to include the preference file xulschoolhello.js. The contents of the file are fairly simple: // Amount of messages shown to the user. pref("extensions.xulschoolhello.message.count", 0); This defines a preference we'll use to keep track of the amount of times we have displayed a greeting message to the user. Its default value is 0. You'll see this preference appear in about:config after installing the extension. Just type "xulschool" in the filter box to see your new preference. Note: Always begin your preference names with "extensions", followed by some namespacing and finally the actual name of the preference. Name parts are normally separated by dots. Now let's look at how we actually manage the preference values. Managing preferences with XPCOM We use the Preferences Service in ...
...s. Since there are some subtleties related to preference management, there are some facilities provided in XUL and Firefox that make this much easier to deal with. The standard way of opening a preferences window is to open the Add-ons Manager, select the add-on, and then click on the Preferences button. In order to have this button enabled in your extension you need to add the following line to install.rdf: <em:optionsURL>chrome://xulschoolhello/content/preferencesWindow.xul</em:optionsURL> If you want to open this window from a different place in the UI, such as a menu item or a button in a toolbar, you need to take into account that the opening behavior of a Preferences window is different depending on the operating system. This is how we do it: openPreferences : function() { if (n...
Local Storage - Archive of obsolete content
, so that you can request error data from your users when you encounter problems that are hard to debug. We'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local files. It is strongly recommended that you keep your local files inside the Firefox profile directory. Otherwise you may run into problems if the same extension is installed in multiple profiles. The common practice is to create a directory with the name of your project at the root of the profile folder, and keep your files inside. The structure could be something like this: s435L.default (your profile directory) XULSchool log.txt somedbfile.sqlite The Directory Service and the nsIFile interface are used to create the local d...
...ate() to actually write it out to disk. You can also check if an nsIFile exists using nsIFile.exists(). To read and write information in files, you need to use stream objects. You can read more about reading and writing files here. In general you won't need to do this directly, but it's always useful to know. Finally, there's the issue of deleting local files when the extension is going to be uninstalled. Whether this is necessary or not is a matter of preference. Some extension developers prefer to leave the data there, so that if the user chooses to install the extension again, all the previous data will be recovered. This is the default behavior when Firefox is uninstalled: the profile information remains intact and it will be there waiting for you if Firefox is installed again. Others feel ...
... Logging Good logging is essential in all kinds of software projects. Any extension that is more complex than a Hello World needs some way to log errors and trace execution without having to fire up a debugger. ...
...XTENSION_ID.xpi/defaults for packed extensions or ProfD/extensions/YOUR_EXTENSION_ID/defaults for unpacked extensions. Packed extensions have appear with Gecko 2.0 (Firefox 4.0). This approach has the downside of being less stable. RDF RDF used to be the preferred storage mechanism for Firefox. If was used for most of its datasources, and you can still see it in use here and there, like in the install.rdf file. It is being phased out, with SQLite taking its place in most cases. The RDF API may be removed at some point in the future because it requires a great deal of code even for the simplest tasks, and it currently sees little maintenance, so we don't recommend using it unless you really have to. You'll still need to understand at least a little about RDF when you read the documentation abo...
Using Dependent Libraries In Extension Components - Archive of obsolete content
inue registration. Sample code is below, and can be built by placing the two files in extensions/stub and configuring with --enable-extensions=stub Extension File Structure Using the stub slightly changes how components are packaged in the extension directory structure. Note that the "real" component is no longer in the components/ directory, it is in the libraries/ directory. extension-directory/install.rdf extension-directory/libraries/dependent1.dll extension-directory/libraries/dependent2.dll extension-directory/libraries/component.dll extension-directory/components/interface1.xpt extension-directory/components/interface2.xpt extension-directory/components/bsmedberg_stub.dll extensions/stub/Makefile.in # Copyright (c) 2005 Benjamin Smedberg <benjamin@smedbergs.us> DEPTH = ../.. srcdir = @sr...
...PR_FindFunctionSymbol(lib, NS_GET_MODULE_SYMBOL); if (!getmoduleproc) return NS_ERROR_FAILURE; return getmoduleproc(aCompMgr, aLocation, aResult); } extensions/stub/bdsStubLoader.cpp (for Mac OS X) The code as written above won't work for Mac OS X. Dependant libraries on the mac must be loaded with a special system function NSAddImage() with the flag NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME. The following are the necessary modifications you will need in order to write a stub loader for an OS X extension. You will also need to make sure you are properly linking the XPCOM glue libraries. See XPCOM Glue for the proper flags on how to link to the glue libraries. /* * OS X Stubloader * Original stubloader code by Benjamin Smedberg <benjamin@smedbergs.us> Copyright (c) 2005 * ...
...pendentCString(*dependent)); rv = library->GetNativePath(path); if (NS_FAILED(rv)) return rv; //At this point, we would have used PRLibrary *lib; library->Load(&lib); //But we can't use that in OS X. Instead, we use NSAddImage. NSAddImage(path.get(), NSADDIMAGE_OPTION_RETURN_ON_ERROR | NSADDIMAGE_OPTION_WITH_SEARCHING | NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME); // 1) We don't care if this failed! If you update your dependencies in your component, // but forget to remove a dependant library in the stubloader, then we don't want to // fail loading the component since the dependant library isn't required. // // 2) We are going to leak this library. We don't care about that either. // NSAddImage adds the image to the process. ...
...hen the process terminates, the library // will be properly unloaded. } library->SetNativeLeafName(NS_LITERAL_CSTRING(kRealComponent)); rv = library->GetNativePath(path); if (NS_FAILED(rv)) return rv; const mach_header * componentlib = NSAddImage(path.get(), NSADDIMAGE_OPTION_RETURN_ON_ERROR | NSADDIMAGE_OPTION_WITH_SEARCHING | NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME); if (componentlib == NULL) return NS_ERROR_UNEXPECTED; //Find the NSGetModule procedure of the real component and "pass the buck". nsGetModuleProc getmoduleproc = (nsGetModuleProc)LookupSymbol(componentlib, "_NSGetModule"); if (!getmoduleproc) return NS_ERROR_FAILURE; return getmoduleproc(aCompMgr, aLocation, aResult); } // Convienience method grabbed from // http://mxr.mozilla.org/...
Making it into a static overlay - Archive of obsolete content
Now that we have a working Mozilla extension that shows tinderbox status, we need to make it distributable to other users. The two ways of doing that are to integrate it into the Mozilla codebase (in which case it is no longer an extension but rather part of the default Mozilla distribution) and to package it into an installer that users can run from within Mozilla to add the extension to their Mozilla installation. Most extensions are distributed as installer packages, and that's how we'll distribute our extension. Integrating extensions into the Mozilla codebase is beyond the scope of this tutorial, but for more information see mozilla.org's hacking documentation. Mozilla installer packages are called XPIs (pronounced "zippies"), which stands for cross-platform installer. The packages a...
...Because our extension modifies an existing file in the Mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic XUL overlay. ...
...our extension. Integrating extensions into the Mozilla codebase is beyond the scope of this tutorial, but for more information see mozilla.org's hacking documentation. Mozilla installer packages are called XPIs (pronounced "zippies"), which stands for cross-platform installer. The packages are just standard ZIP archives of the files to be installed along with a JavaScript script that performs the installation and some RDF files that describe the components being installed for the chrome registry. Because our extension modifies an existing file in the Mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic XUL overlay. A XUL overlay is a XUL file containing elements to be inserted into another XUL file...
...ide a way to break up a large XUL file into several different files (one that describes the overall structure of an application window and the others to implement specific portions of the window) to improve code readability, maintainability, and extensability. Dynamic overlays also make it possible to modify a XUL file without actually changing the code of the file itself, which is necessary when installing an extension like ours. We'll first make the file into a static overlay, then we'll make it into a dynamic overlay. To make the file into a static overlay, we need to move all the code we added to navigator.xul into a new file tinderstatusOverlay.xul in the same directory: <?xml version="1.0"?> <?xml-stylesheet href="chrome://navigator/content/tinderstatus.css" type="text/css"?> ...
Creating a Mozilla Extension - Archive of obsolete content
Warning: The content of this article may be out of date. This tutorial describes how to create an extension for the old versions of Mozilla Suite (currently SeaMonkey). See Building an Extension for an up-to-date tutorial (it focuses on Firefox, but is also applicable to other new applications). A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The exten...
...her or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. ...
...get the status of the code. Completing this tutorial will give you a basic understanding of how Mozilla's user interface (UI) is constructed, how to find the source code for the UI you want to extend, how to make an installation of Mozilla modifiable, how to use Mozilla's network library to load and parse web pages in JavaScript, and how to use dynamic overlays to package a Mozilla extension for installation by others. ...
...rstanding of how Mozilla's user interface (UI) is constructed, how to find the source code for the UI you want to extend, how to make an installation of Mozilla modifiable, how to use Mozilla's network library to load and parse web pages in JavaScript, and how to use dynamic overlays to package a Mozilla extension for installation by others. ...
Bundles - Archive of obsolete content
The bundle can hold additional resources currently limited to: Application INI settings Application icon Script for the application chrome, not the web content Installing a bundle When Prism opens a webapp bundle it will unpack it into the WebApps/{webapp-id} folder. This folder is located in the Application Data folder of the user's home directory on Windows, in the ~/.webapps directory on Linux and under ~/Library on OS X. ...
...located in the Application Data folder of the user's home directory on Windows, in the ~/.webapps directory on Linux and under ~/Library on OS X. Since this folder maybe be located in a directory that requires elevated privileges, the web application should not write data to it. The application profile directory can be used instead for this purpose. ...
...order to be installed. When Prism is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched. This can slow the overall launch time and the unpacking is redundant if the bundle has been launched previously. This is why the preferred method of launching is to use the "-webapp [webapp-id]" command line, which looks for the previously installed (unpacked) web application in the Prism WebApps/{webapp-id} folder. The web application is then launched without the unpacking overhead. A bundle can also be installed from Firefox via the Prism extension for Firefox. The extension looks for <link> tags in the webpage that point to a webapp bundle: <link rel="webapp" href="prismdemo.webapp" title="Prism Demo"> When the extension finds such a <...
...older. The web application is then launched without the unpacking overhead. A bundle can also be installed from Firefox via the Prism extension for Firefox. The extension looks for <link> tags in the webpage that point to a webapp bundle: <link rel="webapp" href="prismdemo.webapp" title="Prism Demo"> When the extension finds such a <link> tag, it will notify the user. The user can then decide to install the webapp. How-to Here is a simple way to build a basic web application bundle: Create file called webapp.ini that contains something like: [Parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no Zip the file to [whatever].webapp Double-click the webapp bundle or use prism -webap...
Extensions - Archive of obsolete content
e when creating your extension. Most notably, the Prism application ID and the differences in the user interface (UI). Extensions typically overlay the host application's UI to add toolbar buttons, menus and other features. One of Prism's features is an extreme lack of UI elements, which means that trying to use the same overlays in Firefox and Prism is really not possible. The Basics In order to install an extension in Prism, you need to follow the guidelines for building a Mozilla-based extension. To support Prism specifically, you'll need to add Prism to the list of target applications in the extension's install.rdf file. The code snippet will look something like this: <em:targetApplication> <!- Prism -> <Description> <em:id>prism@developer.mozilla.org</em:id> <em:minVersion>0.8</e...
...Prism does have a few UI elements, such as a toolbox, toolbar, menubar, popup menus, statusbar and a container for the browser. You can use these UI elements to merge in your extension UI. ...
..., toolbar, menubar, popup menus, statusbar and a container for the browser. You can use these UI elements to merge in your extension UI. See the Prism main window XUL file for the actual structure: webrunner.xulPorting an Existing Extension Since there aren't many extensions designed explicitly for Prism, you may need to port your favorite extensions. This usually means extracting and editing the install.rdf file to add Prism as a target application. You may also need to modify the extension's overlay to be able to work with the Prism UI. Many archive tools, like 7zip, can edit and update a file in the archive without needing to manually extract it and add it back into the XPI. Installing Prism supports a basic Add-on user interface which allows a user to manage extensions. Using this dialog, a u...
...eed to modify the extension's overlay to be able to work with the Prism UI. Many archive tools, like 7zip, can edit and update a file in the archive without needing to manually extract it and add it back into the XPI. Installing Prism supports a basic Add-on user interface which allows a user to manage extensions. Using this dialog, a user just launches a webapp and opens the Add-ons dialog. Then install the extension by either dragging and dropping the extension onto the dialog, or by clicking the "Install..." button, navigating to the extension and selecting it for installation. Extensions can be removed using the same dialog. ...
Binding Attachment and Detachment - Archive of obsolete content
tioned DOM methods document.addBinding and document.removeBinding; these were subsequently discarded as redundant and not implemented. var checkbox = document.getElementById("mycheckbox"); checkbox.style.MozBinding = "url(http://www.mozilla.org/xbl/htmlBindings.xml#checkbox)"; This attachment is not necessarily synchronous. Scripts that invoke this method should not assume that the binding is installed immediately after this method returns. See Binding Documents for more information. When a binding is attached using the DOM, it inherits from the current most derived binding that may already be attached to the element. Any bindings attached to an element will remain on the element until the element is destroyed or the corresponding style rule is removed. If a binding is attached and it alrea...
...e attached to all elements in the page. For elements that are created during or after the load event is fired, no assumptions can be made regarding order of binding attachment. When a binding is attached, the following events occur: If required, anonymous content is cloned from the binding's content template and inserted around the bound element. The methods and properties of the binding are installed on the element and become available to scripts that reference the bound element. Any specified event handlers are installed on their requested targets. If the binding needs to execute any initialization code following its attachment to an element, it can do so using a <constructor> block inside <implementation> section. This block contains script that executes upon completion of the binding ...
...t is torn down. Bindings in an inheritance chain are always detached from the most derived binding to the base. Therefore the <destructor> block of the derived binding will execute, and then the base binding's block will execute. When bindings attached through style are detached because of a style change, they have no effect on any other bindings attached using the DOM. Those bindings will stay installed. If new bindings are attached through CSS, they are installed after the DOM bindings in the inheritance chain. For example, given a bound element with a binding chain of d1->d2 ->d3 ->s1 ->s2 ->s3 withs1 representing the binding attached via CSS. If a resolution of style on the bound element determines that a new bindingt should be attached, then the following binding chain is detached: s1-...
...following binding chain is detached: s1->s2 ->s3 and the new binding is attached. The final inheritance chain is: d1->d2 ->d3 ->t When bindings are detached using element.style.MozBinding, any base bindings that were attached through the extends attribute on the binding will also be removed. In other words, a removal of element.style.MozBinding will remove the same group of bindings that were installed via the original call to element.style.MozBinding = "url(...)". The rule for detachment can be summarized as follows. Whenever a binding is detached, all bindings that it explicitly inherits from are also detached. Binding Documents Whenever a binding is attached to an element in another document, the binding document is only fetched if no binding from the binding document has been used befo...
diskSpaceAvailable - Archive of obsolete content
aceAvailable method has the following parameters: NativeFolderPath A string representing the pathname of the partition, a file, or a directory on the partition whose space is being queried. Returns A double number representing the amount of space, in bytes, on the queried drive. Description Use this function to make sure there is adequate space on the local disk for extracting and installing your files (see example below). You can use a string representing any file on the disk you want to check, and XPInstall will resolve the reference to the partition itself. Example var diskAmtNeeded = 10000; f = getFolder("Program"); diskSpace = File.diskSpaceAvailable(f); g = getFolder(f, "myfile.txt"); if (diskSpace > diskAmtNeeded) { err = addFile(..., ... g, ...); if (err == 0) per...
...your files (see example below). You can use a string representing any file on the disk you want to check, and XPInstall will resolve the reference to the partition itself. Example var diskAmtNeeded = 10000; f = getFolder("Program"); diskSpace = File.diskSpaceAvailable(f); g = getFolder(f, "myfile.txt"); if (diskSpace > diskAmtNeeded) { err = addFile(..., ... ...
...w). You can use a string representing any file on the disk you want to check, and XPInstall will resolve the reference to the partition itself. Example var diskAmtNeeded = 10000; f = getFolder("Program"); diskSpace = File.diskSpaceAvailable(f); g = getFolder(f, "myfile.txt"); if (diskSpace > diskAmtNeeded) { err = addFile(..., ... ...
...isk you want to check, and XPInstall will resolve the reference to the partition itself. Example var diskAmtNeeded = 10000; f = getFolder("Program"); diskSpace = File.diskSpaceAvailable(f); g = getFolder(f, "myfile.txt"); if (diskSpace > diskAmtNeeded) { err = addFile(..., ... g, ...); if (err == 0) performInstall(); else cancelInstall(); } else { alert("not enough disk space. no install); cancelInstall(); } ...
refreshPlugins - Archive of obsolete content
refreshPlugins Refreshes the list of plug-ins registered for the browser. Method of Install object Syntax int refreshPlugins( [ aReloadPages ] ); Parameters The refreshPlugins method has the following parameter: aReloadPages aReloadPages is an optional boolean value indicating whether you want to reload the open web pages after you have refreshed the plug-in list. Returns Nothing. Description refreshPlugins lets you register new plug-ins without having to restart the browser. ...
...ReloadPages ] ); Parameters The refreshPlugins method has the following parameter: aReloadPages aReloadPages is an optional boolean value indicating whether you want to reload the open web pages after you have refreshed the plug-in list. Returns Nothing. Description refreshPlugins lets you register new plug-ins without having to restart the browser. When you use this method in an installation script, as the example below demonstrates, you can install new plug-ins and use them to display the requested media in a web page without interrupting the experience of the user. Note that refreshPlugins must be called after the performInstall method that initiates the actual installation. Example // Install DLL into Plugins // Install XPT into Components var xpiSrc = "NPMCult3DP.dll"; ...
...ou can install new plug-ins and use them to display the requested media in a web page without interrupting the experience of the user. Note that refreshPlugins must be called after the performInstall method that initiates the actual installation. ...
... into Plugins // Install XPT into Components var xpiSrc = "NPMCult3DP.dll"; var xpiSrc2 = "nsIC3DPScriptablePeer.xpt"; initInstall( "Cult3D Plugin File", "@cycore.com/Cult3D;version=1.0.0", "1.0.0"); setPackageFolder(getFolder("Plugins")); addFile(xpiSrc); addFile("",xpiSrc2,getFolder("Components"),""); var err = getLastError(); if (err == SUCCESS) { err = performInstall(); if (err == SUCCESS) refreshPlugins(); } else cancelInstall(err); ...
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
in this <iframe>, and, when document loading is complete, it instantiates an editor on the loaded document. The <iframe> contents are then editable. 970 Using the standard theme Add-ons, Extensions, Themes No summary! 971 Widget Cheatsheet See the Periodic Table of XUL for more examples. 972 Window icons Add-ons, Extensions, Toolkit API, XPInstall, XUL Starting with Firefox 1.5, Thunderbird 1.5, and XULRunner 1.8, you can specify an icon for a XUL window by putting files named mywindow.ico (for Windows) and mywindow.xpm or mywindow16.xpm (Linux), where mywindow is the id of the <window> you want to attach the icon to, in the chrome/icons/default subfolder of your bundle. 973 Writing Skinnable XUL and CSS CSS, XUL ...
... 1009 Adding Style Sheets Tutorials, XUL, XUL_Tutorial We have hardly modified the look of the elements we have created so far. XUL uses CSS (Cascading Style Sheets) to customize elements. 1010 Adding more elements Tutorials, XUL, XUL_Tutorial We will conclude the discussion of boxes by adding some boxes to the find files dialog. 1011 Additional Install Features Tutorials, XUL, XUL_Tutorial This section describes some more specifics of installers. 1012 Advanced Rules Tutorials, XUL, XUL_Tutorial This section describes the more advanced rule syntax. 1013 Anonymous Content Tutorials, XBL, XUL, XUL_Tutorial In this section we'll look at creating content with XBL. 1014 Box Model Details ...
... it to the find files dialog. 1021 Creating a Window Tutorials, XUL, XUL_Tutorial We're going to be creating a simple find files utility throughout this tutorial. 1022 Creating a Wizard Tutorials, XUL, XUL_Tutorial Many applications use wizards to help the user through complex tasks. XUL provides a way to create wizards easily. 1023 Creating an Installer Tutorials, XPInstall_API_reference, XUL, XUL_Tutorial This section will describe packaging a XUL application into an installer. 1024 Cross Package Overlays Tutorials, XUL, XUL_Tutorial This section describes how to apply overlays to files that don't import them. 1025 Custom Tree Views Tutorials, XUL, XUL_Tutorial The tree view holds the data t...
... elements. 1030 Grids Tutorials, XUL, XUL_Tutorial XUL has a set of elements for creating tabular grids. 1031 Groupboxes Tutorials, XUL, XUL_Tutorial This section describes a way to include elements into groups 1032 Input Controls Tutorials, XUL, XUL_Tutorial XUL has elements that are similar to the HTML form controls. 1033 Install Scripts Tutorials, XUL, XUL_Tutorial This section describes the install script. 1034 Introduction Tutorials, XUL, XUL Tutorial This tutorial is a guide to learning XUL (XML User Interface Language) which is a cross-platform language for describing applications' user interfaces. 1035 Introduction to RDF RDF, Tutorials, XUL, XUL_Tutorial No summar...
The Joy of XUL - Archive of obsolete content
onnect allows JavaScript objects to transparently access and manipulate XPCOM objects. It also enables JavaScript objects to present XPCOM compliant interfaces to be called by XPCOM objects. Together, XPCOM and XPConnect enable developers to create XUL applications that require the raw processing power of compiled languages (C/C++) or access to the underlying operating system. XPInstall XPInstall, Mozilla's Cross Platform Install facility, provides a standard way of packaging XUL application components with an install script that Mozilla can download and execute. XPInstall enables users to effortlessly install new XUL applications over the Internet or from corporate intranet servers. To install a new application the user need only click a hypertext link on a web page or i...
... todo: describe cool toolkit and xul runner features Case Study: A Mozilla Calendar Application This mini case study describes how OEone Corporation (now part of HipPlay; this Calendar application is no longer listed on their site) integrated its Calendar application with the core Mozilla product. ...
...ble for Macintosh so, with the cross platform nature of XPCOM, a Macintosh calendar implementation was working within a few days. However, there was no existing Win32 port available, so developers had to undertake a porting effort to migrate libical to Windows. Within a week this too was complete and Mozilla had a working calendar for all three primary platforms: Linux, Macintosh, and Windows. XPInstall is easy for developers and for users.The Calendar is not a planned deliverable for the Mozilla 1.0 release, and therefore is not included as a standard component in regular nightly and milestone release builds. Developers who are equipped with the software and knowledge required to compile Mozilla can set an optional environment variable and build the Calendar themselves. But many Mozilla users w...
...d deliverable for the Mozilla 1.0 release, and therefore is not included as a standard component in regular nightly and milestone release builds. Developers who are equipped with the software and knowledge required to compile Mozilla can set an optional environment variable and build the Calendar themselves. But many Mozilla users who want to try out the Calendar can't afford this luxury. Using XPInstall it was easy for the developers to package a version of Calendar that could be installed directly over the Internet by clicking a link. Conclusion Mozilla, featuring XUL, delivers a compelling technology for developing cross-platform applications with the same rich user interface and end user experience as native desktop applications. Designers who are experienced in building web applications us...
XUL Tutorial - Archive of obsolete content
He has graciously given us permission to use it as part of the MDN. Original Document Information Author: Neil Deakin Copyright Information: (C) 1999-2005 XULPlanet.com ...
...He has graciously given us permission to use it as part of the MDN. Original Document Information Author: Neil Deakin Copyright Information: (C) 1999-2005 XULPlanet.com ...
...He has graciously given us permission to use it as part of the MDN. Original Document Information Author: Neil Deakin Copyright Information: (C) 1999-2005 XULPlanet.com ...
...He has graciously given us permission to use it as part of the MDN. Original Document Information Author: Neil Deakin Copyright Information: (C) 1999-2005 XULPlanet.com ...
XUL Explorer - Archive of obsolete content
"best practice" checks such as: more A11y checks, strings in DTDs and so on - XUL Checker Allow users to add snippets on the fly Add sidebars for more functionality - Property Sidebar and Project Sidebar Support wizards to generate common projects - XUL files, JS XPCOM, and XULRunner applications For more detailed information, see the XUL_Explorer:Planning#Feature_Planning_for_XUL_Explorer. ...
...s: more A11y checks, strings in DTDs and so on - XUL Checker Allow users to add snippets on the fly Add sidebars for more functionality - Property Sidebar and Project Sidebar Support wizards to generate common projects - XUL files, JS XPCOM, and XULRunner applications For more detailed information, see the XUL_Explorer:Planning#Feature_Planning_for_XUL_Explorer. ...
...llow users to add snippets on the fly Add sidebars for more functionality - Property Sidebar and Project Sidebar Support wizards to generate common projects - XUL files, JS XPCOM, and XULRunner applications For more detailed information, see the XUL_Explorer:Planning#Feature_Planning_for_XUL_Explorer. ...
...ore functionality - Property Sidebar and Project Sidebar Support wizards to generate common projects - XUL files, JS XPCOM, and XULRunner applications For more detailed information, see the XUL_Explorer:Planning#Feature_Planning_for_XUL_Explorer. ...
Adobe Flash - Archive of obsolete content
rowsers based on Gecko. The example below shows a detection heuristic in action. Example 1: Verifying the Flash Plugin Version Below, JavaScript identifies the version of Flash, and whether it is scriptable in Netscape Gecko: can we have javascript in a wiki page? <script type="text/javascript">identifyFlash();</script> Typically, JavaScript code that determines what version of the plugin is installed looks at the mimeTypes array that is part of the navigator object. Every plugin exposes a description string that typically includes the plugin's name and version number. The Flash plugin's description string uses a standard versioning nomenclature that can then be parsed for meaningful information. For example, the current Flash plugin version is Flash 6 r79. The description string exposes thi...
...determine whether the version of the plugin // is greater than 12, a hypothetical version when Flash will fix the plugin to be // scriptable on Mach-O browsers also var flashVersionOSXScriptable = 12; if(navigator.userAgent.indexOf("Mach-O")!=-1) { if(flashversion < flashVersionOSXScriptable) // Flash version is less than version 12, thus not scriptable on OS X } // 6. Handle errors (no Flash installed, etc.) Example 1 uses the RegExp (regular expression) object exposed to JavaScript strings. The description string is broken into an array of constituent strings based on an invocation of the match method with a regular expression that assumes that the string format will be in the format Flash Major rMinor where Major can be a major revision such as "5" or "6" and Minor is the subsidiary vers...
...ent, as discussed further in the section on FSCommands. Accessing Flash from JavaScript The simple example below shows how input into an HTML text box in a form field can be transferred to a Flash animation (the grey text box below). Example 2: JavaScript to Flash Communication Note: Javascript to Flash Communication may not work with flash player versions older than version 8 if the user has installed multiple Mozilla based browsers onto the same machine (see bug 284057 and bug 233533). Enter some text in the HTML form field below and then click outside the field, or hit the Enter key, to send the text to the Flash movie below: The example is missing. Example 2 shows the use of Macromedia Flash's SetVariable method being invoked from JavaScript. In general, to invoke a Macromedia-defined...
...ject id="myFlash" ..... > <param name="movie" value="somefile.swf" /> .... var myFlash = document.getElementById("myFlash").SetVariable("myVar", sendText); A more expanded code example that shows how Example 2 was created is shown in this source listing. FSCommands: Accessing JavaScript from Flash Note: FSCommand may not work with Flash Player versions older than version 8 if the user has installed multiple Mozilla based browsers onto the same machine (see bug 32048 and bug 233533). In Example 2, a JavaScript function first obtained a handle to the HTML that spawned the plugin (the object element or the embed element) and then called a published method of the Flash plugin on the reference to the HTML element. With FSCommands, developers may choose to use Macromedia's ActionScript languag...
Windows Media in Netscape - Archive of obsolete content
veX control within Netscape 7.1. This section presents two mechanisms to detect the browsers that support Windows Media Player -- Detection using JavaScript Objects which is useful for client-side detection Detection using the user agent string which is useful for server side detection. An advantage of the client-side approach is that it is also possible to detect if Windows Media Player is installed. Client-side Detection Using JavaScript Objects Internet Explorer implements the ActiveXObject object to create new instances of ActiveX controls. Netscape 7.1 introduces GeckoActiveXObject which can be used in a similar way to create instances of the Windows Media Player. The following JavaScript illustrates one approach using object detection of ActiveXObject and GeckoActiveXObject to determi...
...roach using object detection of ActiveXObject and GeckoActiveXObject to determine if the Windows Media ActiveX control is supported and available for use. JavaScript will dynamically write out what browser you are running, and what kind of Windows Media Player technology you may have. Example 1: Client-side Detection Scripts Browser architecture supports: NetscapePlugin Windows Media Player Installed: true Windows Media Scriptable: false Windows Media Version: PluginVersion A complete source code listing showing how that detection was done can be found here (devedge-temp). Below, some of the salient points are illustrated in a code snippet: if (window.ActiveXObject && navigator.userAgent.indexOf('Windows') != -1) { // IE for Windows object instantiation -- use of ActiveXObject } el...
...n the same way it is used in IE. This differs from what previous Netscape Gecko browsers did -- those browsers only supported the Netscape-plugin architecture, and not the ActiveX architecture, and thus the markup used for browsers prior to Netscape version 7.1 (devedge-temp) was distinct. Example 2: Use of OBJECT Element to Create Control If you are running Netscape 7.1 and later or IE, and have installed Windows Media Player 7 or above, the snippet of code below should produce a Windows Media control and play a song. THIS IS THE EXAMPLE: NEEDS TO BE EMBEDDED IN WIKI PAGE (can it just be put here?) <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> <param name="uiMode" value="full"> <param name="autoStart" value="True"> <param name="URL"...
...ed. The code listing below provides a mechanism to to this. <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> <param name="uiMode" value="full" /> <param name="autoStart" value="true" /> <param name="URL" value="preludesteel.wma" /> </object> <script type="text/javascript"> if(!document.PlayerEx2.versionInfo) { // Control Not installed -- the versionInfo property returns null // Redirect users to http://www.microsoft.com/windows/windowsmedia/download/default.asp } else { //Control was correctly created //Proceed with scripting calls, etc. } </script> Note that if the control is correctly instantiated, you will know that it is a version of Windows Media Player 7 and up, since the clsid used with the object element refl...
bootstrap.js - Extensions
pt gets executed in a privileged sandbox, which is cached until the extension is shut down. For more information, see Bootstrapped extensions. The example below contains the required methods in vsdoc format. ...
...tensions. The example below contains the required methods in vsdoc format. ...
... /// nsIFile installPath /// nsIURI resourceURI /// /// Reason types: /// APP_STARTUP /// ADDON_ENABLE /// ADDON_INSTALL /// ADDON_UPGRADE /// ADDON_DOWNGRADE } function shutdown(data, reason) { /// Bootstrap data structure @see /docs/Extensions/Bootstrapped_extensions#Bootstrap_data /// string id /// string version /// nsIFile installPath /// nsIURI resourceURI /// /// Reason types: /// APP_SHUTDOWN /// ADDON_DISABLE /// ADDON_UNINSTALL /// ADDON_UPGRADE /// ADDON_DOWNGRADE } function install(data, reason) { /// Bootstrap data structure @see /docs/Extensions/Bootstrapped_extensions#Bootstrap_data /// string id /// string version /// nsIFile installPath /// ...
... /// APP_SHUTDOWN /// ADDON_DISABLE /// ADDON_UNINSTALL /// ADDON_UPGRADE /// ADDON_DOWNGRADE } function install(data, reason) { /// Bootstrap data structure @see /docs/Extensions/Bootstrapped_extensions#Bootstrap_data /// string id /// string version /// nsIFile installPath /// nsIURI resourceURI /// /// Reason types: /// ADDON_INSTALL /// ADDON_UPGRADE /// ADDON_DOWNGRADE } function uninstall(data, reason) { /// Bootstrap data structure @see /docs/Extensions/Bootstrapped_extensions#Bootstrap_data /// string id /// string version /// nsIFile installPath /// nsIURI resourceURI /// /// Reason types: /// ADDON_UNINSTALL /// ADDON_UPGRADE /// ADDON_DOWNGRADE } ...
Deployment and next steps - Learn web development
we will look at how to deploy your application and get it online, and also share some of the resources that you should go on to, to continue your Svelte learning journey. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn how to prepare our Svelte app for production, and what learning resources you should visit next. Note that our application is fully functional and porting it to TypeScript is completely optional. There are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using TypeScript. Even ...
...r Svelte applications, further resources, and more. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/08-next-steps Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/08-next-steps Remember to run npm install && npm run dev to start your app in development mode. Compiling our app So far we've been running our app in development mode with npm run dev. As we saw earlier, this instruction tells Svelte to compile our components and JavaScript files into a public/build/bundle.js file and all the CSS sections of our components into public/build/bundle.css. It also starts a development server and watches f...
...ercel.link/2F). To change the domain or build command, go to https://zeit.co/opensas/mdn-svelte-tutorial/settings Accept all the defaults, and you'll be fine. Once it has finished deploying, go to the "Production" URL in your browser, and you'll see the app deployed! You can also import a Svelte git project into Vercel from GitHub, GitLab, or BitBucket. Note: you can globally install Vercel with npm i -g vercel so you don't have to use npx to run it. Automatic deployment to GitLab pages For hosting static files there are several online services that allow you to automatically deploy your site whenever you push changes to a git repository. Most of them involve setting up a deployment pipeline that gets triggered on every git push, and takes care of building and deploying yo...
...ed from a file named .gitlab-ci.yml, which you can create and modify at will. A specific job called pages in the configuration file will make GitLab aware that you are deploying a GitLab Pages website. Let's have a go at doing this now. Create a .gitlab-ci.yml file inside your project's root and give it the following content: image: node:latest pages: stage: deploy script: - npm install - npm run build artifacts: paths: - public only: - master Here we are telling GitLab to use an image with the latest version of node to build our app. Next we are declaring a pages job, to enable GitLab Pages. Whenever there's a push to our repo, GitLab will run npm install and npm run build to build our application. We are also telling GitLab to deploy the contents of th...
Deploying our app - Learn web development
Now to manually run the test, from the command line we can run: npm...
... Now to manually run the test, from the command line we can run: npm run test The result, if successful, is ... nothing. Thi...
... your root directory called tests: mkdir tests Inside the new directory, create a test file: cd tests touch nasa-feed.test.js Open this file, and add the contents of nasa-feed.test.js to it: This test uses the axios package to fetch the data feed we want to test; to install this dependency, run the following command: npm install --save-dev axios We need to manually install axios because Parcel won't help us with this dependency. Our tests are outside of Parcel's view of our system -- since Parcel never sees nor runs any of the test code, we're left to install the dependency ourselves. Now to manually run the test, from the command line we can run: npm run test The result, if successful, is ... nothing. This is considered a success. In general we only wa...
...nsider yourself a client-side tooling wizard, we are hoping that this module has given you that first important step towards understanding client-side tooling, and the confidence to learn more and try out new things. Let's summarise all the parts of the toolchain: Code quality and maintenance are performed by eslint and prettier. These tools are added as devDependancies to the project via npm install --dev eslint prettier eslint-plugin-react (the eslint plugin is needed because this particular project uses React). There are two configuration files that the code quality tools read: .eslintrc and .prettierrc. During development, we use Parcel to handle our dependencies. parcel src/index.html is running in the background to watch for changes and to automatically build our source. Deployment i...
Simple Thunderbird build
em you will need to carry out a different process to prepare your machine. So firstly complete the instructions for your OS and then continue following these build instructions. Windows Build Prerequisites GNU/Linux Build Prerequisites macOS Build Prerequisites MAPI Headers On Windows: check that the MAPI header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the MAPI header files (except MAPI.h) are not bundled with Visual Studio 2017 (Windows SDK 10). You should copy 17 of the 18 header files to a Windows SDK include directory so that the build process will find the files, that is C:\Program Files (x86)\Windows Kits\10\Include\10.0.nnnnn.0\shared, where nnnnn is the highest number present on the system. Note that the downloaded Outlook 201...
...86)\Windows Kits\10\Include\10.0.nnnnn.0\shared, where nnnnn is the highest number present on the system. Note that the downloaded Outlook 2010 MAPI Header Files contain 18 fies, of which only 17 are needed. Do not copy MAPI.h, it is already in C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\MAPI.h. As of April 2019, 10.0.17134.0 is needed to compile Thunderbird. Assuming standard installation locations, copy these 17 files to C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared. 18/10/2010 16:11 7,334 MAPIAux.h 02/06/2009 17:02 7,938 MAPICode.h 02/06/2009 17:02 22,960 MAPIDbg.h 02/06/2009 17:02 84,644 MAPIDefS.h 02/06/2009 17:02 27,840 MAPIForm.h 02/06/2009 17:02 11,880 MAPIGuid.h 02/06/2009 ...
...tory C:/thunderbird-src (where "C:/", with a forward slash, is intentional to clarify you are in the MozillaBuild command prompt per Windows build prerequisite). Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving i...
...changes. It is also possible to rebuild specifically. If you changed C or C++ files, run: ./mach build binaries If you changed JavaScript or XUL files, on macOS or Linux you don't have to rebuild since the files in the object directory are linked to the ones in the source directory. On Windows run: ./mach build path/to/dir This is the tricky bit since you need to specify the directory that installs the files, which may be a parent directory of the changed file's directory. For example, to just rebuild the Lightning calendar extension: ./mach build comm/calendar/lightning For all other changes run the full rebuild: ./mach build Problems Building? Have you: Check comm-central on Treeherder for known failures at the time you pulled the code. The current status of the trunk can also ...
Multiple Firefox profiles
A profile in Firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of Firefox. You can find details about profiles on Mozilla's end-user support site. Reasons to have multiple profiles The casual user may want to have different profiles for work and personal use, or different family members. Having different profiles would help separate work and personal life, or allow each family member to have his or her own set of bookmarks, settings, and add-ons. Web developers might want a secondary profile for testing websites, apps, or other projects on different Firefox channels. For example, you might want to have some extensions installed for Web development, but not for general-purpose Web browsing. While using t...
... using the Nightly channel, you may encounter some add-ons that have become temporarily incompatible with new API changes, until the add-on developer has a chance to update them. You can remove such add-ons from your profile for Nightly use while keeping them for use with other profiles. For QA, testing, and bug triaging contributors, you may want to have multiple development versions of Firefox installed, each with its own profile. Creating new profiles for testing can keep you from losing your preferences, bookmarks, and history. It takes little time to set up a new profile, and once it is complete, all of your Firefox versions will update separately and can be run simultaneously. Available browser development channels There are four available browser channels, each at a different level of s...
...rt button. Click "Run". Type firefox --new-instance--ProfileManager. Windows Vista/7 Click the Start button. Click the search bar at the bottom. Type firefox --new-instance --ProfileManager. Windows 8/8.1/10 Press "Windows + R" on your keyboard. Type firefox --new-instance --ProfileManager. Linux If Firefox is already included in your Linux distribution, or if you have installed Firefox with the package manager of your Linux distribution: Open a Terminal emulator or your Shell's command prompt: Alt-F2 if you use GNOME Shell or KDE Plasma, consult your desktop environment documentation for other environments. Run firefox --new-instance --ProfileManager. macOS Run the Terminal application, which is found in Applications/Utilities. Type or paste in...
... or your Shell's command prompt: Alt-F2 if you use GNOME Shell or KDE Plasma, consult your desktop environment documentation for other environments. Run firefox --new-instance --ProfileManager. macOS Run the Terminal application, which is found in Applications/Utilities. Type or paste in the path to Firefox, followed by .app/Contents/MacOS/firefox. For example, if Firefox is installed in the recommended location, you would enter /Applications/Firefox.app/Contents/MacOS/firefox. If you have the path to your desired profile handy, enter a space character, followed by -profile followed by another space character, followed by the full path to the profile folder you wish to launch into. This will launch Firefox immediately. Otherwise, enter a space character followed by --prof...
Application Translation with Mercurial
gs for translation become available. If it is a red text consisting of a number and the word 'missing', then there are untranslated texts and you can move on with this guide. Required Tools Build pre-requisites First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from Build Instructions. This is only necessary once. MozillaBuild must be installed into an absolute file path without whitespaces, else it will break. File comparison program For the translation, it is recommend to use file comparison program to compare the English file (containing the new texts) with the file of your locale (which is still missing the new strings). This example uses WinMerge: Download and install it. A comparison of alternatives (e.g. for Linux and Mac OS...
...e product as being a good translation for the functionality behind the translated strings and that the translated texts fit into the available, the translation progress should be tracked. This can be done in a text editor or word processor or any other tool in which you can attach different kind of states to the individual texts to translate. The Firefox extension Scrapbook is used in this guide. Install it into your default Firefox profile (you will have more than one profile when following this guide). Getting the current Texts in English and your Locale Obtaining the English texts with the source code Get the source code by downloading the following file: Firefox Desktop or Firefox for Android: Download the mozilla-<branch>.hg file (e.g. mozilla-aurora.hg) from https://ftp.mozilla.org/pu...
...ng or SeaMonkey: Download the comm-<branch>.hg file (e.g. comm-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/thunderbird/bundles/ In the next step, we will unpack the source code: Open an input shell, e.g. by pressing the Windows key and R on the keyboard or by calling the "Run..." command from the Windows "Start" button, and then typing cmd and pressing the Enter key. Launch the installed MozillaBuild toolset by launching it with its path, e.g. C:\Mozilla\Coding\Buildtools\MozillaBuild\start-shell-msvc2010.bat You can autocomplete the file path after typing a few characters and then pressing the Tabulator key. If you launch the start-shell-l10n.bat, compiling features will be disabled. You can create translation patches, but creating language packs for the application, binary ...
... files if there aren't too many new strings. Tracking the translation progress If you translate more than a few strings, you usually want to keep track of what has already been translated (and later if the text has been tested in the product as fitting into the available area and suiting the functionality it describes). This guide achieves this with the Firefox extension Scrapbook. You installed Scrapbook earlier, now open it in Firefox either by calling it from the Firefox menu bar (press the Alt key to show it if necessary) using "View" > "Sidebar" > "Scrapbook" or by clicking its toolbar button which you likely have to add by toolbar customization if you didn't do this before. Drag the tab with the localization error showing missing and obsolete strings to the sidebar. After Scrap...
QA phase
websites, your work will display soon after you've committed it without needing a language pack. Since such is the case, this part of the guide may not be entirely applicable to you. Feel free to skip ahead to the next section by clicking on the Next link at the bottom of the page. In order to see your work on Firefox (or another Mozilla application), you'll need to have a built language pack to install on your local instance. Manual & automated builds With the click of a button, some L10n tools (like Narro and Koala) automatically create language pack builds for you. If you're using one of these tools, feel free to skip ahead to the Seeing your work section. If you're not using one of these tools, let's walk you through building your own language pack manually. Note: Remember all of those pr...
... automated builds With the click of a button, some L10n tools (like Narro and Koala) automatically create language pack builds for you. If you're using one of these tools, feel free to skip ahead to the Seeing your work section. If you're not using one of these tools, let's walk you through building your own language pack manually. Note: Remember all of those pre-requisite tools we asked you to install in the initial setup? Here's where you'll need almost all of them. If you haven't installed them yet, now is the time to do it. Preliminary instructions We will be using the following file directories for this example: your working directory (root)/ mozilla-aurora (en-US source, pulled from http://hg.mozilla.org/releases/mozilla-aurora )/ l10n-central (directory for L10n directories, ...
...wser, Thunderbird would be mail). Enter the following command to perform the configuration: $ ./mach configure Once your command-line finishes spitting out the config command's output, navigate to the newly created directory: $ cd ../firefox-build/browser/locales Now you're ready to build! At this point you can choose between two build options. You can either: Create a langpack, which is installed on top of your Mozilla application, or Repack the application's binary (aka, a L10n repack), which allows you to install next to your existing Mozilla application installation and use separately. Visit the links above to learn how to make these testing builds. Testing your L10n & seeing your work Now that you have your langpack or L10n repack, let's discuss seeing your work and testing it ...
...and use separately. Visit the links above to learn how to make these testing builds. Testing your L10n & seeing your work Now that you have your langpack or L10n repack, let's discuss seeing your work and testing it in the application. Testing the langpack will put you one step closer to having your localization added to the L10n releases. Follow the steps below to test your localization: Install Aurora in your preferred language. Install the .xpi langpack you just created (or exported). Set your language using the Quick Locale Switcher or Locale Switcher add-ons by navigating to Tools->Language->Your localization's language code. Restart your browser and start testing! Now you should be able to see all of your work up to this point. Click here for guidelines on how to test your loca...
Profile Manager
ese profiles, but it will eventually be going away (see bug 214675), so a new standalone Profile Manager application has been created, which works with any XULRunner application, and has many features not found in Firefox's built-in version. Downloading Binaries You can download Profile Manager builds from https://ftp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ Note: There is no installer; just extract the files from the archive. System requirements: Mac: an Intel processor, i386 or x86_64 Linux: any version capable of running Firefox 4.0 Windows: XP or later Source code You can download the source as well: hg clone http://hg.mozilla.org/automation/profilemanager/ Instructions for building can be found in BUILD.txt. Reporting Bugs Profile Manager bugs should be rep...
...h an application other than Firefox, you need to launch it using the application's name as an argument, for example: profilemanager-bin seamonkey Profiles and application versions Profile Manager manages two different lists: one of user profiles, and the other of application versions that can be used with the profiles. By default, this means it tracks a list of Firefox applications that are installed on your system, and a list of profiles for use by Firefox. An individual profile can be linked to a specific installation of Firefox, so that version of Firefox will be launched when that profile is selected. For example, ProfileA might be linked with a copy of Firefox 3.6.10, while ProfileB might be linked with a copy of Firefox 3.5.3. When launched, Profile Manager will look in some defa...
... Additionally, you can manually add Firefox versions by clicking the "Manage Firefox versions..." button: Each Firefox version in the list has the following properties: path, version, and default. ...
...opy of the profile using a name and location of your choice. Delete - deletes the profile, and all files associated with it. Properties - shows a dialog that displays the profile's path and last-modified date. Rename - allows you to specify a new name for the profile. Version - allows you change the default application version to be used with the profile. Future Enhancements Ability to install/uninstall/enable/disable extensions in profiles. Ability to copy certain assets (e.g., bookmarks) between profiles. Add 'Profile Size' to the Properties dialog. Ability to reset a profile (return it to a default state excluding bookmarks and passwords). Add option to specify the location of profiles.ini. ...
NSPR
R build instructions How to checkout and build from source. NSPR release process How to prepare an NSPR release. Legacy NSPR Content Older NSPR content is available in SVN for browsing and/or migration to this site Getting NSPR NSPR is available in various source and binary packages, depending on your platform: Windows: Build the source package, using the NSPR build instructions. ...
... process How to prepare an NSPR release. Legacy NSPR Content Older NSPR content is available in SVN for browsing and/or migration to this site Getting NSPR NSPR is available in various source and binary packages, depending on your platform: Windows: Build the source package, using the NSPR build instructions. Mac: Install the MacPorts nspr package, or the Homebrew nspr package. Ubuntu: Install the libnspr4-dev package via apt-get. ...
...Content Older NSPR content is available in SVN for browsing and/or migration to this site Getting NSPR NSPR is available in various source and binary packages, depending on your platform: Windows: Build the source package, using the NSPR build instructions. Mac: Install the MacPorts nspr package, or the Homebrew nspr package. Ubuntu: Install the libnspr4-dev package via apt-get. Debian: Install the libnspr4-dev package via apt-get. ...
...d/or migration to this site Getting NSPR NSPR is available in various source and binary packages, depending on your platform: Windows: Build the source package, using the NSPR build instructions. Mac: Install the MacPorts nspr package, or the Homebrew nspr package. Ubuntu: Install the libnspr4-dev package via apt-get. Debian: Install the libnspr4-dev package via apt-get. ...
Rebranding SpiderMonkey (1.8.5)
For example the default brand for SpiderMonkey 1.8.5 is 'mozjs185'. mkdir build-$BRAND-release cd build-$BRAND-release Configure this build of SpiderMonkey with the desired options. For example: ../configure --enable-ctypes --with-system-nspr Note: Your desired configuration may be different. The only required part in this step is the ../configure command. So far, so good. Now for the tricky parts. ...
...c/$BRAND_static/" {} \; Allright, almost there. Now comes the manual editing. Using your favorite editor open up the file named Makefile for editing. Search for this text: mozjs185.pc "Scroll down" a few lines until you see this line: > $@ && chmod 644 $@ That line should be modified to read back: > $BRAND.pc && chmod 644 $BRAND.pc "Scroll down" a few lines until you see these lines: install:: $(pkg_config_files) @echo pkg_config_file: $(pkg_config_files) Those two lines should be modified to read back: install:: $BRAND.pc @echo pkg_config_file: $BRAND.pc Note: While it is possible to automate the manual editing process, this has been discouraged due to the fact that these files are automatically generated and very little constant data can be depended upon. It also allows th...
...RAND.pc Note: While it is possible to automate the manual editing process, this has been discouraged due to the fact that these files are automatically generated and very little constant data can be depended upon. It also allows these instructions to apply to a wide range platforms without introducing more software dependencies. Save the file and exit the editor. ...
...ically generated and very little constant data can be depended upon. It also allows these instructions to apply to a wide range platforms without introducing more software dependencies. Save the file and exit the editor. You may now perform the build and installation of your custom branded SpiderMonkey library: make Note: Depending on your system you may need administrative rights to perform the installation: make install The following information isn't technically needed for using your library but it will help other applications use your library. Your rebranded library has been succesfully built and installed to libdir as specified in ./config/autoconf.mk. A pkgconfig file has also been installed for your library at libdir/pkgconfig/$BRAND.pc. You may wish to manually edit this file. It descri...
nsIApplicationUpdateService
d(); void removeDownloadListener(in nsIRequestObserver listener); nsIUpdate selectUpdate([array, size_is(updateCount)] in nsIUpdate updates, in unsigned long updateCount); Attributes Attribute Type Description backgroundChecker nsIUpdateChecker The update checker being used for background update checking. Read only. canApplyUpdates boolean true if the Update Service can download and install updates. Indicates if the current user has access privileges to the install directory. Read only. canCheckForUpdates boolean true if the Update Service can check for updates. Application updates might be disabled by the application and the platform the application is running on. Read only. canUpdate boolean true if the update service is able to download and install updates. This depends on ...
...Read only. ...
...ate object indicating the update to download. background true to download the update in the background or false to download it in the foreground. Return value A string indicating the status of the update upon return: "downloading" The update is being downloaded. "pending" The update is ready to be applied. "applying" The update is in the process of being applied. "succeeded" The update has been installed successfully. "download-failed" The update failed to be downloaded. "failed" Installing the update failed. pauseDownload() Pauses the currently active update download. void pauseDownload(); Parameters None. removeDownloadListener() Removes a listener that is receiving progress and state information about the update that is currently being downloaded. void removeDownloadListener( in nsIReque...
...nload() Pauses the currently active update download. void pauseDownload(); Parameters None. removeDownloadListener() Removes a listener that is receiving progress and state information about the update that is currently being downloaded. void removeDownloadListener( in nsIRequestObserver listener ); Parameters listener The listener object to remove. selectUpdate() Selects the best update to install from a provided list of available updates. nsIUpdate selectUpdate( [array, size_is(updateCount)] in nsIUpdate updates, in unsigned long updateCount ); Parameters updates An array of updates that are available to install. updateCount The number of updates in the updates array. Return value An nsIUpdate object indicating the most appropriate update to install. See also nsIUpdate nsIUpdateCh...
nsIMicrosummaryGenerator
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides access to a microsummary that has been installed in Firefox. ...
...hunderbird 6.0 / SeaMonkey 2.3) Method overview long calculateUpdateInterval(in nsIDOMNode aPageContent); boolean equals(in nsIMicrosummaryGenerator aOther); AString generateMicrosummary(in nsIDOMNode aPageContent); Attributes Attribute Type Description loaded boolean Has the generator itself (which may be a remote resource) been loaded. Read only. localURI nsIURI For generators installed by the user or bundled with the browser, the local URI points to the location of the local file containing the generator's XML. Read only. name AUTF8String An arbitrary descriptive name for this microsummary generator. Read only. needsPageContent boolean Whether or not this generator needs page content to generate a microsummary. Microsummaries generated by XSLT templates need page content...
...ummaries generated by XSLT templates need page content, while those which represent the actual microsummary do not. Read only. uri nsIURI The canonical location and unique identifier of the generator. It tells us where the generator comes from and where to go for updates. Read only. For generators referenced by web pages via <link> tags, this URI is the URL specified by the tag. ...
...ical location and unique identifier of the generator. It tells us where the generator comes from and where to go for updates. Read only. For generators referenced by web pages via <link> tags, this URI is the URL specified by the tag. For generators installed via nsISidebar.addMicrosummaryGenerator(), this URI is a URN of the form urn:source:<url>, where <url> is the remote location from which we installed the generator. For generators installed via some other mechanism (for example an extension that dynamically creates generators), this URI is a URN in a form of the extension's own choosing, with the only restriction being that the URI be globally unique. To ensure this, we recommend that such extensions incorporate UUIDs created by nsIUUIDGenerator into the URNs of the generators they create. ...
nsIUpdate
toolkit/mozapps/update/nsIUpdateService.idlScriptable An interface that describes an object representing an available update to the current application - this update may have several available patches from which one must be selected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch. This object also contains information about the update that the front end and other application services can use to learn more about what is going on. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsIUpdatePatch getPatchAt(in un...
...4) A checksum error occurred. PARSE_ERROR (5) An error occurred while parsing the patch. READ_ERROR (6) An error occurred while reading the patch. WRITE_ERROR (7) An error occurred while writing the patched application. UNEXPECTED_ERROR (8) An unanticipate type of error occurred. extensionVersion AString The add-on version of this update. Used by the extension system to track compatibility of installed add-ons with this update. Obsolete since Gecko 2.0 installDate long long The date and time at which the update was installed. isCompleteUpdate boolean true if the update is a complete replacement of the existing installation; false if the update is a patch representing the difference between the new version and the existing version. isSecurityUpdate boolean true if the update is a securit...
... new version and the existing version. isSecurityUpdate boolean true if the update is a security update. If the update is a security update, a more seriously-worded user interface message is used to present the update to the user. licenseURL AString The URL to an HTML fragment that contains a license for the update. If this is specified, the user is shown the license file after they choose to install the update, and they must agree to it before the download begins. name AString The name of the update, in the form "application_name update_version" patchCount unsigned long The number of patches supplied by this update. Read only. platformVersion AString The toolkit version of this update. previousAppVersion AString The Application version prior to the application being updated. sele...
...ate in the background. showSurvey boolean Whether to show the survey link in the update prompt. The url must also be present in the app.update.surveyURL preference. state AString The state of the selected patch: "downloading" The update is being downloaded. "pending" The update is ready to be applied. "applying" The update is in the process of being applied. "succeeded" The update has been installed successfully. "download-failed" The update failed to be downloaded. "failed" Installing the update failed. Read only. statusText AString An optional message associated with the update. type AString The type of patch represented by the object: "major" A major new version of the application. "minor" A minor update, such as a security update. version AString The application version of th...
Using nsIDirectoryService
customize. Customizing the locations is important if, for example, your application already has a profile directory or other resource directories. You may wish that you could have Mozilla use these locations rather than requiring the same disk layout as SeaMonkey. In order to change these locations using nsIFileLocator and still be able to use the same components directory as an existing Mozilla installation, you had to make a component with the same ID as nsIFileLocator and then, after auto-registering components, manually register your own and replace the existing one -- all in all, a big pain. The New Method The new method uses nsIDirectoryService to locate files and directories. Be sure to see the documentation on the service itself. This document will focus on how the service is used and ho...
...ou will need to set one of these paths to the /bin directory. Application Level nsAppDirectoryServiceDefs.h The first group listed is for locations that are relative to the application: for instance, the name and location of the chrome folder, or the default location of user profiles. The nsIDirectoryServiceProvider which normally provides these locations is at mozilla/xpcom/io/. This provider is installed by SeaMonkey after initializing XPCOM. It is also installed by default by NS_InitEmbedding. The second group listed is for locations which are relative to the current user profile. In SeaMonkey, the profile service is an nsIDirectoryServiceProvider and it provides these locations. There are some cases in embedding in which distinct user profiles are not needed; however, prefs and history and su...
...t needed; however, prefs and history and such are needed. In this case, the nsIDirectoryServiceProvider implementation at mozilla/profile/dirserviceprovider/ can be used. If it is used, it is used instead of the profile service, thus saving some footprint. Customizing Locations Although you can change locations one at a time by using the nsIProperties interface of nsDirectoryService, you can also install your own nsIDirectoryServiceProvider to control them en masse. To do this for application-level locations, create a provider based on appfilelocprovider. This object has to implement the nsISupports and nsIDirectoryServiceProvider interfaces. It does not need to be a component - it can be a static lib, a source file in your project - whatever. Just construct it, pass it to NS_InitEmbedding, and i...
...nsIDirectoryServiceProvider to control them en masse. To do this for application-level locations, create a provider based on appfilelocprovider. This object has to implement the nsISupports and nsIDirectoryServiceProvider interfaces. It does not need to be a component - it can be a static lib, a source file in your project - whatever. Just construct it, pass it to NS_InitEmbedding, and it will be installed. If you are not using NS_InitEmbedding, you will have to construct it and register it yourself using nsIDirectoryService.registerProvider(). If you are registering it yourself it is very important to register it immediately after calling NS_InitXPCOM. There are things in the startup process that need these locations at a very early point - even before registering components. If you want to use ...
Autoconfiguration in Thunderbird
Author: Ben Bucksch Please do not change this document without consulting the author Thunderbird 3.1 and later (and 3.0 to some degree) includes mail account autoconfiguration functionality. The goal of autoconfiguration is to make it very easy for users to configure the connection of Thunderbird to their email servers. In many cases, people should be able to download and install Thunderbird, enter their real name, email address and password in the Account Setup Wizard and have a fully functioning mail client and get and send their mail as securely as possible. See also: for instructions for users, see Automatic Account Configuration on the Thunderbird Knowledge Base. the configuration file description and definition the original project page on the Mozilla wiki for background, de...
...y returns a static XML file with the configuration, as described below. For more complicated setups, for example when the login name does not appear in the email address, the XML file can also be generated by the ISP. In such complicated cases, this is the only way to allow an automatic setup. Configuration file on harddisk Local administrators may place a configuration file in the Thunderbird installation folder. This is mainly intended for companies who install Thunderbird on their employees' computers and want to enable easy account setup without having to set up a configuration server. This method is not practical for other use cases, because it is difficult to update the configuration file. Guessing If all other mechanisms failed, Thunderbird tries to guess the configuration, by trying...
... the user must manually enter the configuration information. Users may also choose to manually modify the account settings, even if configuration information is successfully obtained by the methods described above. All the lookup mechanisms use the email address domain as base for the lookup. For example, for the email address fred@example.com , the lookup is performed as (in this order): tb-install-dir/isp/example.com.xml on the harddisk check for autoconfig.example.com look up of "example.com" in the ISPDB look up "MX example.com" in DNS, and for mx1.mail.hoster.com, look up "hoster.com" in the ISPDB try to guess (imap.example.com, smtp.example.com etc.) We may add DNS SRV records as supported mechanism in the future, but we currently do not. How to add support for your domain Clas...
... nor "hero@example.com", but "u67578"), you need to set up a configuration server, which does the email address -> login name lookup. If you host customer domains, i.e. you are "hoster.com", but your customers have "fred@flintstone.com" and "louis@kent.com" as domains, with only a few users per domain, you need to set up a configuration server (or rely on DNS MX). If you are a small company installing Thunderbird on your employees' desktops, you can place a configuration file in the Thunderbird installation folder. ISPDB Database URL is <https://autoconfig.thunderbird.net/v1.1/>, append domain name, e.g. <https://autoconfig.thunderbird.net/v1.1/freenet.de>. Current process: File a bug in Bugzilla, Product "Webtools", Component "ISPDB Database Entries", with a configuration file that ma...
customDBHeaders Preference
rrectly. The attaching of the column handler through the ObserverService object is some pretty new stuff, so I was using the addEventListener("select"...) stuff as a backup. Depending on the release you use one, both, or none of the methods may work. ...
... chrome.manifest install.rdf Makefile chrome/ content/ superfluous.js superfluous_overlay.xul Here's the Makefile: DEPS:= chrome/ \ chrome.manifest \ chrome/content/ \ chrome/content/superfluous.js \ chrome/content/superfluous_overlay.xul \ install.rdf superfluous.xpi: ${DEPS} zip $@ ${DEPS} chrome.manifest: content superfluous chrome/content/ overlay chrome://messenger/content/messenger.xul chrome://superfluous/content/superfluous_overlay.xul install.rdf: <?xml version='1.0' encoding='UTF-8'?> <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:em='http://www.mozilla.org/2004/em-rdf#'> <Description about='urn:mo...
...superfluous.xpi: ${DEPS} zip $@ ${DEPS} chrome.manifest: content superfluous chrome/content/ overlay chrome://messenger/content/messenger.xul chrome://superfluous/content/superfluous_overlay.xul install.rdf: <?xml version='1.0' encoding='UTF-8'?> <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:em='http://www.mozilla.org/2004/em-rdf#'> <Description about='urn:mozilla:install-manifest'> <em:id>superfluous@yoursite.com</em:id> <em:version>0.1.1</em:version> <em:type>2</em:type> <!-- 2 is type 'extension' --> <em:targetApplication> <Description> <!-- This next line identifies TBird as target --> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minVersion>2*</em:minVersion> <em:maxVersion>...
...ation> <em:name>superfluous</em:name> <em:description>Test Superfluous Extension</em:description> <em:creator>Garrett Comeaux</em:creator> </Description> </RDF> Build process: [gcomeaux@kyle tbird-ext]$ cd superfluous/ [gcomeaux@kyle superfluous]$ make zip superfluous.xpi chrome/ chrome.manifest chrome/content/ chrome/content/superfluous.js chrome/content/superfluous_overlay.xul install.rdf adding: chrome/ (stored 0%) adding: chrome.manifest (deflated 44%) adding: chrome/content/ (stored 0%) adding: chrome/content/superfluous.js (deflated 57%) adding: chrome/content/superfluous_overlay.xul (deflated 44%) adding: install.rdf (deflated 50%) End Result Ultimately, you want to be able to compose a message like this: and see the Superfluous column displayed in your ...
XPI
XPI archives only support files stored uncompressed or compressed using the "deflate" method. ...
... XPI archives only support files stored uncompressed or compressed using the "deflate" method. ...
... Cross-Platform Installer Module (XPI) is a ZIP file used to install packages, utilizing the XPInstall technology. XPI modules (so called "Bundles") are employed to install a wide variety of software, including Plugins, Extensions, Themes, and Thunderbird dictionaries. An XPI contains installation instructions (install.js or install.rdf) as well as the actual software to install, which is often itself packaged as a JAR file. When downloaded or dropped into an extension manager, XPInstall automatically interacts with the installation instructions contained in the XPI, and installs the contained software. XPI archives only support files stored uncompressed or compressed using the "deflate" method. ...
...s often itself packaged as a JAR file. When downloaded or dropped into an extension manager, XPInstall automatically interacts with the installation instructions contained in the XPI, and installs the contained software. XPI archives only support files stored uncompressed or compressed using the "deflate" method. Note: Starting in Gecko 2.0, XPI files are no longer unpacked when extensions are installed. Instead, the XPI itself is placed in the extensions directory, and files are loaded directly out of the package. See Updating extensions for Firefox 4 for details. When XPI files are served via HTTP, the application/x-xpinstall MIME type should be matched with the xpi file extension. See Also Bundles XPInstall Creating XPI Installer Modules ...
ExtendableEvent - Web APIs
This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. If waitUntil() is called outside of the ExtendableEvent handler, the browser should throw an InvalidStateError; note also that multiple calls will stack up, and the resulting promises will be added to the list of extend lifetime promises. Note: The behaviour described in the above paragraph was fixed in Firefox 43 (see bug 1180274.) This interface inherits from the Event interface. ...
...ble when it is a Window, or the scope of another kind of worker. Constructor ExtendableEvent() Creates a new ExtendableEvent object. Properties Doesn't implement any specific properties, but inherits properties from its parent, Event. Methods Inherits methods from its parent, Event. ExtendableEvent.waitUntil() Extends the lifetime of the event. ...
...he scope of another kind of worker. Constructor ExtendableEvent() Creates a new ExtendableEvent object. Properties Doesn't implement any specific properties, but inherits properties from its parent, Event. Methods Inherits methods from its parent, Event. ExtendableEvent.waitUntil() Extends the lifetime of the event. It is intended to be called in the install EventHandler for the installing worker and on the activate EventHandler for the active worker. Examples This code snippet is from the service worker prefetch sample (see prefetch example live.) The code calls ExtendableEvent.waitUntil() in ServiceWorkerGlobalScope.oninstall, delaying treating the ServiceWorkerRegistration.installing worker as installed until the passed promise resolves successfully. The promise resolves...
...pproach can be used for multiple caches. It maps a shorthand identifier for a cache to a specific, versioned cache name. Note: In Chrome, logging statements are visible via the "Inspect" interface for the relevant service worker accessed via chrome://serviceworker-internals. var CACHE_VERSION = 1; var CURRENT_CACHES = { prefetch: 'prefetch-cache-v' + CACHE_VERSION }; self.addEventListener('install', function(event) { var urlsToPrefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/config/customLogo.gif' ]; console.log('Handling install event. Resources to pre-fetch:', urlsToPrefetch); event.waitUntil( caches.open(CURRENT_CACHES['prefetch']).then(function(cache) { return cache.addAll(urlsToPrefetch...
enabled - Web APIs
Summary Indicates whether or not Software Installation is enabled for this client machine. Method of InstallTrigger object Syntax Boolean enabled (); Parameters None Returns True if Software Installation is enabled for this client machine; otherwise, false. The method reflects the value of the Software Installation preference in the user interface, and of the xpinstall.enabled preference in pref.js. ...
... Returns True if Software Installation is enabled for this client machine; otherwise, false. The method reflects the value of the Software Installation preference in the user interface, and of the xpinstall.enabled preference in pref.js. ...
...bled for this client machine; otherwise, false. The method reflects the value of the Software Installation preference in the user interface, and of the xpinstall.enabled preference in pref.js. ...
...erwise, false. The method reflects the value of the Software Installation preference in the user interface, and of the xpinstall.enabled preference in pref.js. ...
ServiceWorker.onstatechange - Web APIs
erviceWorker.state changes. Syntax ServiceWorker.onstatechange = function(statechangeevent) { ... } ServiceWorker.addEventListener('statechange', function(statechangeevent) { ... } ) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...orker.onstatechange = function(statechangeevent) { ... } ServiceWorker.addEventListener('statechange', function(statechangeevent) { ... } ) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...iceWorker.addEventListener('statechange', function(statechangeevent) { ... } ) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
... = registration.active; document.querySelector('#kind').textContent = 'active'; } if (serviceWorker) { logState(serviceWorker.state); serviceWorker.addEventListener('statechange', function(e) { logState(e.target.state); }); } Note that when statechange fires, the service worker's references may have changed. For example: navigator.serviceWorker.register(..).then(function(swr) { swr.installing.state == "installing" swr.installing.onstatechange = function() { swr.installing == null; // At this point, swr.waiting OR swr.active might be true. This is because the statechange // event gets queued, meanwhile the underlying worker may have gone into the waiting // state and will be immediately activated if possible. } }) Specifications Specification Status...
ServiceWorker.state - Web APIs
The state read-only property of the ServiceWorker interface returns a string representing the current state of the service worker. It can be one of the following values: installing, installed, activating, activated, or redundant. Syntax someURL = ServiceWorker.state Value A ServiceWorkerState definition (see the spec.) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...one of the following values: installing, installed, activating, activated, or redundant. Syntax someURL = ServiceWorker.state Value A ServiceWorkerState definition (see the spec.) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...alled, activating, activated, or redundant. Syntax someURL = ServiceWorker.state Value A ServiceWorkerState definition (see the spec.) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
...= ServiceWorker.state Value A ServiceWorkerState definition (see the spec.) Examples This code snippet is from the service worker registration-events sample (live demo). The code listens for any change in the ServiceWorker.state and returns its value. ...
Movement, orientation, and motion: A WebXR example - Web APIs
each vertex given the initial positions of each vertex and the transforms that need to be applied to convert them to simulate the viewer's current position and orientation. The fragment shader returns the color of each vertex, interpolating as needed from the values found in the texture and applying the lighting effects. Starting up and shutting down WebXR Upon initially loading the script, we install a handler for the load event, so that we can perform initialization. window.addEventListener("load", onLoad); function onLoad() { xrButton = document.querySelector("#enter-xr"); xrButton.addEventListener("click", onXRButtonClick); projectionMatrixOut = document.querySelector("#projection-matrix div"); modelMatrixOut = document.querySelector("#model-view-matrix div"); cameraMatrixOut ...
...that toggles WebXR on and off into xrButton, then adds a handler for click events. Then references are obtained to the four <div> blocks into which we'll output the current contents of each of the key matrices for informational purposes while our scene is running. Then we look to see if navigator.xr is defined. If it isn't--and/or the enableForcePolyfill configuration constant is set to true--we install the WebXR polyfill by instantiating the WebXRPolyfill class. Handling the startup and shutdown UI Then we call the setupXRButton() function, which handles configuring the "Enter/Exit WebXR" button to enable or disable it as necessary depending on the availability of WebXR support for the session type specified in the SESSION_TYPE constant. function setupXRButton() { if (navigator.xr.isSessio...
...his code should not be necessary, but there appears to be an issue in which at least some browsers are not correctly firing the end event. By running the event handler directly, we complete the close-out process manually in this situation. Starting up the WebXR session The sessionStarted() function handles actually setting up and starting the session, by setting up event handlers, compiling and installing the GLSL code for the vertex and fragment shaders, and attaching the WebGL layer to the WebXR session before kicking off the rendering loop. It gets called as the handler for the promise returned by isSessionSupported(). function sessionStarted(session) { let refSpaceType; xrSession = session; xrButton.innerText = "Exit WebXR"; xrSession.addEventListener("end", sessionEnded); let ...
... Then we get a reference to the <canvas> found in our HTML--as well as its WebGL rendering context--which will be used as the drawing surface for the scene. The xrCompatible property is requested when calling getContext() on the element to gain access to the WebGL rendering context for the canvas. This ensures that the context is co...
Background audio processing using AudioWorklet - Web APIs
what's involved. Create module that defines a audio worklet processor class, based on AudioWorkletProcessor which takes audio from one or more incoming sources, performs its operation on the data, and outputs the resulting audio data. Access the audio context's AudioWorklet through its audioWorklet property, and call the audio worklet's domxref("Worklet.addModule", "addModule()")}} method to install the audio worklet processor module. As needed, create audio processing nodes by passing the processor's name (which is defined by the module) to the AudioWorkletNode() constructor. Set up any audio parameters the AudioWorkletNode needs, or that you wish to configure. These are defined in the audio worklet processor module. Connect the created AudioWorkletNodes into your audio processing pipeli...
...the gain of both the oscillator and the audio worklet's output. Glitch Project Page See the Code Try it Live Creating an audio worklet processor Fundamentally, an audio worklet processor (which we'll refer to usually as either an "audio processor" or simply as a "processor" because otherwise this article will be about twice as long) is implemented using a JavaScript module that defines and installs the custom audio processor class. Structure of an audio worklet processor An audio worklet processor is a JavaScript module which consists of the following: A JavaScript class which defines the audio processor. This class extends the AudioWorkletProcessor class. The audio processor class must implement a process() method, which receives incoming audio data and writes back out the data as m...
...cture of an audio worklet processor An audio worklet processor is a JavaScript module which consists of the following: A JavaScript class which defines the audio processor. This class extends the AudioWorkletProcessor class. The audio processor class must implement a process() method, which receives incoming audio data and writes back out the data as manipulated by the processor. The module installs the new audio worklet processor class by calling registerProcessor(), specifying a name for the audio processor and the class that defines the processor. A single audio worklet processor module may define multiple processor classes, registering each of them with individual calls to registerProcessor(). As long as each has its own unique name, this will work just fine. It's also more efficient ...
...ns you must always return true from process(), at least on Chrome. However, once this Chrome issue is fixed, you will want to change this behavior if possible as it may have a slight negative impact on performance. Creating an audio processor worklet node To create an audio node that pumps blocks of audio data through an AudioWorkletProcessor, you need to follow these simple steps: Load and install the audio processor module Create an AudioWorkletNode, specifying the audio processor module to use by its name Connect inputs to the AudioWorkletNode and its outputs to appropriate destinations (either other nodes or to the AudioContext object's destination property. To use an audio worklet processor, you can use code similar to the following: let audioContext = null; async function create...
console - Archive of obsolete content
Enables your add-on to log error, warning or informational messages. If you have started Firefox for your add-on from the command line with jpm run or jpm test then these messages appear in the command shell you used. If the add-on has been installed in Firefox, then the messages appear in the Browser Console. If you're developing your add-on using the Extension Auto-installer, then the add-on is installed in Firefox, meaning that messages will appear in the Browser Console. But see the discussion of logging levels: by default, messages logged using log(), info(), trace(), or warn() won't be logged in these situations. Console Methods All console methods except exception() and trace() accept one or more JavaScript objects as arguments and log them to the console. Depending on the console's un...
..., info(), log(), time(), timeEnd(), trace(), warn() warn error(), exception(), warn() error error(), exception() off Nothing Setting the Logging Level The logging level defaults to "error". There are two system preferences that can be used to override this default: extensions.sdk.console.logLevel: if set, this determines the logging level for all installed SDK-based add-ons. extensions.extensionID.sdk.console.logLevel, where extensionID is an add-on's Program ID. If set, this determines the logging level for the specified add-on. This overrides the global preference if both preferences are set. Both these preferences can be set programmatically using the preferences/service API, or manually using about:config. The value for each prefere...
...ically using the preferences/service API, or manually using about:config. The value for each preference is the desired logging level, given as a string. When you run your add-on using jpm run (without --profile set) or jpm test, the global extensions.sdk.console.logLevel preference is automatically set to "info". This means that calls to console.log() will appear in the console output. When you install an add-on into Firefox, the logging level will be "error" by default (that is, unless you have set one of the two preferences). This means that messages written using debug(), log(), info(), trace(), and warn() will not appear in the console. This includes add-ons being developed using the Extension Auto-installer. ...
Storing annotations - Archive of obsolete content
If the annotation does not reappear when you restart Firefox, double check yo...
... Responding To OverQuota events Add-ons have a limited quota of storage space. ...
...t in Firefox. Activate the add-on, add an annotation, and then right-click the widget. You should see something like this: Restart Firefox, right-click the widget again, and check that the annotation is still there. Until now we've always run cfx run rather than building an XPI and installing the add-on in Firefox. If the annotation does not reappear when you restart Firefox, double check you installed the add-on and didn't just use cfx run again. Responding To OverQuota events Add-ons have a limited quota of storage space. If the add-on exits while it is over quota, any data stored since the last time it was in quota will not be persisted. So we want to listen to the OverQuota event emitted by simple-storage and respond to it. Add the following to your add-on's main function: simpleStora...
Listening for Load and Unload - Archive of obsolete content
ed. You don't have to use exports.main() or exports.onUnload(). You can just place your add-on's code at the top level instead of wrapping it in a function assigned to exports.main(). It will be loaded in the same circumstances, but you won't get access to the load/unload reason or arguments. exports.main() Your add-on's main.js code is executed as soon as it is loaded. It is loaded when it is installed, when it is enabled, or when Firefox starts. If your add-on exports a function called main(), that function will be called immediately after the overall main.js is evaluated, and after all top-level require() statements have run (so generally after all dependent modules have been loaded). exports.main = function (options, callbacks) {}; options is an object describing the parameters with...
...verall main.js is evaluated, and after all top-level require() statements have run (so generally after all dependent modules have been loaded). exports.main = function (options, callbacks) {}; options is an object describing the parameters with which your add-on was loaded. ...
...n is one of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade exports.onUnload() If your add-on exports a function called onUnload(), that function will be called when the add-on is unloaded. exports.onUnload = function (reason) {}; reason reason is one of the following strings describing the reason your add-on was unloaded: uninstall disable shutdown upgrade downgrade If your add-on is disabled, then uninstalled, your onUnload listener will only be called once, with the disable reason. This happens because disabling an add-on also disables its onUnload listeners, so there is no listener remaining when the add-on is uninstalled. For more, see bug 627432, in particular comment 12 on that bug. ...
Toolbar - Archive of obsolete content
nsion development: Creating toolbar buttons Adding button by default When you create and deploy your extension and include a toolbar button for it by overlaying the Customize toolbarpalette, it is not available by default. The user has to drag it onto the toolbar. The following code will place your button on the toolbar by default. This should only be done on the first run of your add-on after installation so that if the user decides to remove your button, it doesn't show up again every time they start the application. Notes Insert your button by default only once, at first run, or when an extension update adds a new button. Please only add your button by default if it adds real value to the user and will be a frequent entry point to your extension. You must not insert your toolbar butto...
...ton by default if it adds real value to the user and will be a frequent entry point to your extension. You must not insert your toolbar button between any of the following elements: the combined back/forward button, the location bar, the stop botton, or the reload button. These elements have special behaviors when placed next to eachother, and will break if separated by another element. /** * Installs the toolbar button with the given ID into the given * toolbar, if it is not already present in the document. * * @param {string} toolbarId The ID of the toolbar to install to. * @param {string} id The ID of the button to install. * @param {string} afterId The ID of the element to insert after. @optional */ function installButton(toolbarId, id, afterId) { if (!document.getElementById(id...
...etElementById(afterId); if (elem && elem.parentNode == toolbar) before = elem.nextElementSibling; } toolbar.insertItem(id, before); toolbar.setAttribute("currentset", toolbar.currentSet); document.persist(toolbar.id, "currentset"); if (toolbarId == "addon-bar") toolbar.collapsed = false; } } if (firstRun) { installButton("nav-bar", "my-extension-navbar-button"); // The "addon-bar" is available since Firefox 4 installButton("addon-bar", "my-extension-addon-bar-button"); } ...
Migrating raw components to add-ons - Archive of obsolete content
directory, but beginning with Firefox 3.6, this is no longer permitted. Components added in this way are invisible to users and cannot be managed through the Firefox add-ons manager. What's worse, though, is that these components don't have a mechanism for specifying the versions of Firefox with which they are compatible, leading to poor integration and instability as users upgrade their Firefox installations. The Firefox extension mechanism allows you to do everything that you could do through direct component drops, but also gives you and your users extra flexibility and more sophisticated versioning support. As we roll this new behavior out, this document will be updated with additional information addressing scenarios we see developers encountering. Simple migration If your goal is just to g...
...on addressing scenarios we see developers encountering. Simple migration If your goal is just to get your raw component working properly as an extension, you can do this in three steps: Create a new add-on using the instructions here. ...
...tructions here. As you'll see, add-ons give you much more flexibility than simply loading a component, but in order to get started, all you'll need is your directory structure and install manifest. Create a components/ directory in the root of your add-on's directory. Add your JS and binary components within that directory. They will be registered the first time Firefox is run once your add-on is installed. Automatic installation Once you have an add-on packaged, users can install it by visiting your site and giving the add-on permission to install. Many software authors install Firefox components as a by product of their own software installs, though. If you would like to install Firefox add-ons in an automated, programmatic way, we have documented a set of best practices. JavaScript C-Types So...
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
e. To get the region that corresponds to a specific state of an icon, the -moz-image-region CSS property is used. Here are some examples of how the CSS for a toolbarbutton would look like on the 3 major platforms. This assumes that you've set the class xs-hw-toolbarbutton to all of your buttons. Windows: /* The second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 16px, 16px, 0px); } Mac OS X: /* The second and thir...
...*/ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 16px, 16px, 0px); } Linux: /* The second and third se...
...*/ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar-large.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 24px, 24px, 0px); } toolbar[iconsize="small"] #xulschoolhello-hello-world-button { list-style-image: url("chrome://xu...
Signing an extension - Archive of obsolete content
our add-on. This article describes how to digitally sign your extension for Firefox and Thunderbird, with a code signing certificate for Object Signing. The following instructions also apply to a theme and other XPI files. These instructions assume you're working on Mac and you've already got a valid certificate from CA. Get the signing tool We use NSS to sign an extension. This can be easily installed with MacPorts. sudo port install nss Export your certificate If you have your certificate in Firefox, export it by following the steps below. The certificate which the author purchased from VeriSign was directly installed to Firefox. Click the Firefox button and select Options. In the Options window, open the Advanced panel, then select the Encryption tab. Click View Certificates. In t...
... Inc." -t "C,C,C" -d . It's all done. Sign The basic usage of the signing tool is as follows: nss-signtool \ -d (path to the directory that contains your certificate database files) \ -k (your certificate nickname) \ -p (your certificate password) \ -X -Z (output path/name of signed file) \ (path to your extension working directory that contains chrome directory, chrome.manifest file, install.rdf file, etc.) Writing your password directly in the script is dangerous. For production, use such a code: echo "Enter password for Object Signing:" read MYPASSWORD nss-signtool \ -d /Volumes/Codesign/keystore \ -k "My Company's VeriSign, Inc. ID" \ -p $MYPASSWORD \ -X -Z ~/Desktop/MyExtension/dest/MyExtension-1.0.xpi \ ~/Desktop/MyExtension/source unset MYPASSWORD Then a signed XPI fil...
...such a code: echo "Enter password for Object Signing:" read MYPASSWORD nss-signtool \ -d /Volumes/Codesign/keystore \ -k "My Company's VeriSign, Inc. ID" \ -p $MYPASSWORD \ -X -Z ~/Desktop/MyExtension/dest/MyExtension-1.0.xpi \ ~/Desktop/MyExtension/source unset MYPASSWORD Then a signed XPI file will be generated. Verify Drag and drop the XPI file into the content area of Firefox. On the installation dialog, you can see your organization name along with the file name. References Signing a XPI - more detailed instructions including test procedures. Key Manager - a Firefox extention that has the ability to sign XPI files. Signing a Firefox extension with a Windows Authenticode SSL certificate / key - Note that some CAs do not allow (or support) to divert an Authenticode certificate t...
Add-ons - Archive of obsolete content
nsion using XUL and JavaScript only. For complex extensions, it may be necessary to create components in C++ that provide additional functionality. Extension Etiquette This article describes best practices when making extensions, including how to be kind to your users. It assumes that you are already familiar with Building an Extension. Extension Packaging Extensions are packaged in a form of Installable Bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an XUL program. Extensions support in SeaMonkey 2 Starting with SeaMonkey 2 Alpha 1 SeaMonkey supports toolkit/-style extensions. These type of...
... with an application or by an external program. Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an XUL program. Extensions support in SeaMonkey 2 Starting with SeaMonkey 2 Alpha 1 SeaMonkey supports toolkit/-style extensions. These type of extensions have many advantages for both users and developers compared to the old xpinstall/-style extensions. Firefox addons developer guide The original document is in Japanese and distributed via the xuldev.org website. So there may be still some reference to the xuldev website (we want to host source code on MDC, not on xuldev), and to Japanese things (like some specific locales, which have been translated to French since non-latin characters are not well supported). Hotfix Exten...
...loaded differently. Inline options Firefox 7 supports a new syntax for defining extensions' preferences for both bootstrapped and traditional extensions. The user interface for the preferences defined with this new syntax appears in the extension's detail view in the Add-on Manager. This functionality originally appeared in Firefox mobile and is now available in Firefox on the desktop as well. Install Manifests An Install Manifest is the file an Add-on Manager-enabled XUL application (e.g. Firefox or Thunderbird) uses to determine information about an add-on as it is being installed. It contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be u...
Creating a dynamic status bar extension - Archive of obsolete content
d, refer to the downloadable sample code or to the previous sample for further details. Download the sample You can download a copy of this sample to look over, or to use as the basis for your own extension. Or, if you've already got the code from the Creating a status bar extension sample, you can follow this tutorial to update that existing code with new features. Download the sample Update the install manifest Replace all occurrences of the first sample's ID, "status-bar-sample-1", with the new sample's ID, "stockwatcher", and update the front end metadata to describe our new extension. See Install Manifests for details. Update the chrome manifest The chrome manifest needs only a minor update from the previous sample; simply replace the ID of the first sample, "status-bar-sample-1", with the n...
...he future articles startup: function() { this.refreshInformation(); window.setInterval(this.refreshInformation, 10*60*1000); }, This starts by calling our refreshInformation() function, which is responsible for fetching and displaying stock ticker information in the status bar panel. We do this so that upon loading, the stock information is displayed as soon as possible. After doing that, we install an interval routine on the browser window by calling window.setInterval(). This configures our refreshInformation() routine to be called every 10 minutes (the time interval is specified in milliseconds). refreshInformation() The refreshInformation() function is called whenever we want to update the stock information. It's called whenever the user clicks on the status bar panel, when our extension...
...r panel's label is set to indicate the current value of the stock, which is stored in fieldArray, by setting the samplePanel.label property. We then set the tooltip for the status bar panel by assigning an appropriate string to the samplePanel.tooltipText property. The string is built from a combination of static strings and various elements from the fieldArray array. See it in action Now you can install it and try it out. You should see something that looks like this: In this screenshot, we also have the previous sample running, displaying the text "Hello World." << PreviousNext >> ...
Autodial for Windows NT - Archive of obsolete content
led from the Control Panel, in the Internet Options applet, under the tab Connections. If you turn on the autodial feature, Windows will automatically dial whenever any application tries to access a network address that can't be reached. Technically, this control panel applet (Internet Options) is part of Internet Explorer. It is not present in early versions of Windows until Internet Explorer is installed. Despite this fact, the feature is triggered by any application that uses networking. Starting with Windows NT, and in all NT-based versions (Windows NT, Windows 2000, and Windows XP, including XP Home) Microsoft has changed the behavior of autodial. For these OSs, the autodial options found in the Internet Options control panel applet only apply to Microsoft applications, including Internet Ex...
...ote Access Auto Connection) to handle autodial for all other applications. If this service is running, and Control Panel | Network Connections | Advanced | Dialup Preferences is set to enable autodial, then any application trying to access the Internet will trigger the autodial feature whenever an Internet address cannot be reached. However, this service will won't function if you have a LAN card installed, unless that particular address has been accessed in the past via a dialup connection. Origin of the Bug Before the implementation of the Autodial Helper feature, Mozilla would trigger the autodial feature on NT-based operating systems, but only if certain conditions are met. These conditions are as follows: The autodial service is running Control Panel | Network Connections | Advanced | ...
...gered them before. Starting in Mozilla 1.1, autodial is triggered whenever an address can't be reached (Mozilla now mimics the Remote Access Autodial service.) See bug 160846, bug 167624, and bug 160846. If a user doesn't want the OS to use autodial, he must turn off the feature from the OS. There is also a problem with the AOL client when used as a dialer. bug 166134 describes how the AOL client installs itself as a dialer, but it doesn't behave like other dialers. The problem is with the AOL client, be the bug could probably be fixed by not changing Mozilla to avoid using the AOL client as a dialer even though it installs itself as one. A parallel feature has been requested in bug 130774: if we trigger the autodial connection, we should ask the user if he wants to hang up the connection when we...
Prerequisites - Archive of obsolete content
In order to complete this tutorial you need to have and know how to use the following programs on your computer: an installation of Mozilla; zip and unzip utilities; a text editor. You should also understand tag-based languages like HTML as well as basic JavaScript, CSS, and the DOM. You might install Mozilla multiple times in the course of this tutorial, so you will find it handy to keep around a Mozilla installer. If you currently use Mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo. ...
...l as basic JavaScript, CSS, and the DOM. You might install Mozilla multiple times in the course of this tutorial, so you will find it handy to keep around a Mozilla installer. If you currently use Mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo. ...
...ple times in the course of this tutorial, so you will find it handy to keep around a Mozilla installer. If you currently use Mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo. ...
JavaScript crypto - Archive of obsolete content
is not implemented. ...
... void logout(); Logs the user out of all the cryptographic tokens. The next private operation on any token will requir...
... // arguments JS_ERR_ADD_MODULE = -5 // Error adding a module JS_ERR_BAD_MODULE_NAME = -6 // The module name is invalid JS_ERR_ADD_MODULE_DUPLICATE = -10 // The module being installed has the // same name as one of the modules that // has already been installed Miscellaneous DOMString random(in long numBytes); UnimplementedYou can use window.crypto.getRandomValues instead. void logout(); Logs the user out of all the cryptographic tokens. The next private operation on any token will require the user password again. The SSL session cache is also cleared (from Firefox 1.5 upward). This means the master password will be requested the next time a ...
First run - Archive of obsolete content
Note: This page documents the Jetpack Prototype, which is no longer under active development. Read the experiment report for what we learned from it and the blog post announcing the first SDK release for what we're up to next! Jetpack lets you specify arbitrary content that will be shown to your users when they install your jetpack. You can also register a callback that will be called after installation. First-run page When users install your jetpack, they will be greeted with a new page notifying them that installation was successful. By default this page contains some simple text explaining that they may now use the jetpack and how to uninstall it. You can replace this text with a page tailored to your jetpack. For example, you may want to tell users how to use your jetpack or link...
... use when defining settings for your jetpack. The value of firstRunPage must be either a string or E4X XML. If the value is a both a string and a valid URL, the page at that URL becomes your first-run page. Otherwise, the value is assumed to be HTML, and it becomes the body of your first-run page. This example sets the first-run page to some HTML: var manifest = { firstRunPage: '<p>Thanks for installing! Visit my <a href="http://example.com/myJetpack">homepage</a>.</p>' }; This does the same but uses E4X XML: var manifest = { firstRunPage: <> <p> Thanks for installing! Visit my <a href="http://example.com/myJetpack">homepage</a>. </p> </> }; In this example, the page at http://example.com/myJetpack becomes the first-run page: var manifest = { firstRunPage: "http://exam...
... firstRunPage: <> <p> Thanks for installing! Visit my <a href="http://example.com/myJetpack">homepage</a>. </p> </> }; In this example, the page at http://example.com/myJetpack becomes the first-run page: var manifest = { firstRunPage: "http://example.com/myJetpack" }; First-run callback You can register a callback that will be called after your jetpack has been successfully installed. See jetpack.me.onFirstRun(). ...
Running Tamarin acceptance tests - Archive of obsolete content
To run acceptance tests on the android shell see the "Testing the Android Shell" heading below. Running the Tamarin test suite requires the following steps: Set the AVM environment variable to the path of the AVMPlus executable (avmshell). Note: the name of the avmshell executable varies among the build systems; use the name of the AVM shell produced from the build process you used, above. Set the BUILTINABC environment variable to the path of the generated/builtin.abc. You may build the .abc files build by downloading the latest asc.jar. ...
... the acceptance testsuite, the runtests script automatically detects the number of cores on the machine and sets an equivalent number of threads. This can be overrided with the threads flag: python ./runtests.py --threads=3 Threading on cygwin / windows Due to an issue with cygwin python, threading does not work, and threads will always be set to 1. In order to use threading on windows you must install windows python and invoke runtests using that python executable in cygwin. The locations of AVM, ASC, BUILTINABC and SHELLABC must also be defined using windows paths (replace backslashes [\] with forward slashes [/]): export AVM=c:/location/of/avmshell.exe export ASC=c:/location/of/asc.jar ... c:/Python26/python.exe ./runtests.py --threads=3 Other flags of interest (For a list of all flags, run...
...ts at /android-public/android-sdk-mac_86/platform-tools. adb supports ssh-like commands to an android device. adb automatically connects to a phone if connected by usb. adb shell "ls /" is a good test to see if connected. The command: $ adb devices lists the device id of each phone. If you have more than 1 phone connected to usb, use "adb -s " for each phone. If this fails, do you have a dev OS installed? Under Settings->Applications->Development, is USB Debugging enabled? Testsuite Setup Example commands: Copy avmshell to /data/local/tamarin. The shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb shell 'mkdir /data/local/tamarin' $ adb push avmshell /data/local/tamarin/avmshell $ adb shell 'chmod 777 /data/local/tamarin/avmshell' Copy android...
Tamarin build documentation - Archive of obsolete content
Building the x64 Release_Debugger configuration will create avm.exe under \tamarin-redux\platform\win32\x64\Release_Debugger. Note the "\obj9" directory under \platform\win32 for the win32 builds and "\x64" directory under \platform\win32 for 64-bit builds; this looks a little odd but preserves previous behavior as much as possible to avoid initial disruption from the shell rename fix. You must install VS2008 with x64 support to build the 64-bit configurations. If you installed the Windows Mobile 6 SDK, you can build for Windows Mobile (ARM) targets. Apple XCode The project files are designed for XCode 3.0. See "platform/mac/avmplus/avmplus.xcodeproj/". XCode 2.2, 2.3, and 2.4 will not work. There are two targets in the XCode IDE, 'avm' for 32-bit builds and 'avm64' for 64-bit builds. Ther...
... Release_Debugger. The resulting Debug executable for the command above would be built at /platform/mac/avmshell/build/Debug/avm. Intel Macs build correctly by setting ARCHS=i386. Eclipse (currently Mac only) Eclipse (Galileo) / CDT (6.0) project for Tamarin (also works with Helios). The configurations in this initial version cover 32- and 64-bit builds for Mac OS with the GCC 4.0 toolchain (installed with Xcode 3.x). Preparing your Eclipse workspace and perspective Open the C/C++ perspective Open the 'C/C++ Projects' view (Window >> Show View >> C/C++ Projects) Add view filter 'Non-C Elements' (In the top-right of the 'C/C++ Projects' view, click the down-arrow, click 'Filters...', check 'Non-C elements') Increase the threshold for 'editor scalability mode' to 20000 lines. As some Ta...
...nds to build: $ cd tamarin-central/platform/unix $ make The resulting executable "shell" is built in the current directory. Compiling and running applications Currently the only compiler for Tamarin is the Adobe ActionScript compiler. The source code for the ActionScript compiler, asc, has been open sourced as part of Adobe Flex(R). This compiler is written in Java and will require the installation of a Java(TM) 1.4 or later JDK. A prototype self-hosting ECMAScript Edition 4 compiler, esc, is provided with Tamarin but it is not yet capable of bootstrapping itself or building applications. esc is under active development and will be able to generate Tamarin applications later this year. Use the following steps to build and install the ActionScript compiler. Download and build the a...
Venkman Introduction - Archive of obsolete content
n's /break, /step, /next, /finish, /frame, and /where commands. On Windows, the JavaScript debugger compares favorably with Visual Interdev and other large web development tools. On other platforms, including Mac OS and Unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. ...
...rame, and /where commands. On Windows, the JavaScript debugger compares favorably with Visual Interdev and other large web development tools. On other platforms, including Mac OS and Unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. Starting the Debugger The JavaScript Debugger is automatically pre-installed in Mozilla 1.x but must be installed separately in Firefox and other Gecko-based products, such as Thunderbird and Netscape 7.x. Fortunately, the XPInstall technology makes it possible to install new application modules in Firefox by just clicking a hyperlink. If you don't already have Venkman or would like to upgrade, you can easily get the latest version from Firefox Add-ons. The installation process is two steps. First, from w...
...When the download is complete, restart your browser (some Windows users may also need to restart their computer as well). You can then access the debugger via a new, dynamically created menuitem in the Tools menu of that browser, or else restart the browser with a special debugger option. ...
toString - Archive of obsolete content
Summary converts an InstallVersion init object to a string. Method of InstallVersion object Syntax String version = InstallVersion.toString ( initObj ); Parameters The toString method has the following parameter: initObj initObj is an InstallVersion object whose init method has been called. Returns The major, minor, revision, and build numbers represented as a single string. The init() function can input the version number as a single string or as a series of parameters representing the version numbers of the installation. ...
... has the following parameter: initObj initObj is an InstallVersion object whose init method has been called. Returns The major, minor, revision, and build numbers represented as a single string. The init() function can input the version number as a single string or as a series of parameters representing the version numbers of the installation. ...
...presented as a single string. The init() function can input the version number as a single string or as a series of parameters representing the version numbers of the installation. ...
Cross Package Overlays - Archive of obsolete content
for your package. This is useful because the overlay can modify the user interface of another package without changing the other package. For example, you could add menu items or toolbars to the Mozilla browser window. We'll use this feature to add a toolbar to the Mozilla browser window. The Mozilla Mail application uses overlays to add content to the browser window. For example, if Mail is not installed, there will be no New Message command. However, if Mail is installed, an overlay will be applied to the menu to add the New Message command. Below, we'll add a find files toolbar to the browser. It probably wouldn't be useful to have this feature, but we'll do it anyway. Mozilla allows you to add a list of overlays to the contents.rdf file that you use to list chrome packages, skins and locales...
....xul"> <RDF:li>chrome://findfile/content/foverlay.xul</RDF:li> </RDF:Seq> Mozilla reads this information and builds a list of overlays that are applied to other windows. It stores this information in the chrome/overlayinfo directory. You do not need to manually modify the files in this directory. It is automatically generated and modified when Mozilla is first run or when new packages are installed. However, you can force the data to be rebuilt by deleting this directory and the chrome.rdf file. As a side note, you can use a similar technique to apply extra style sheets. The following example shows how: <RDF:Seq about="urn:mozilla:stylesheets"> <RDF:li resource="chrome://messenger/content/messenger.xul"/> </RDF:Seq> <RDF:Seq about="chrome://messenger/content/messenger.xul"> <RDF:li>c...
...le. As a side note, you can use a similar technique to apply extra style sheets. The following example shows how: <RDF:Seq about="urn:mozilla:stylesheets"> <RDF:li resource="chrome://messenger/content/messenger.xul"/> </RDF:Seq> <RDF:Seq about="chrome://messenger/content/messenger.xul"> <RDF:li>chrome://blueswayedshoes/skin/myskinfile.css</RDF:li> </RDF:Seq> Next, we'll see how to create an installer for a XUL application. << PreviousNext >> ...
Introduction - Archive of obsolete content
wser isn't required to run these applications, as they have their own executable file. XUL package In between the other two are applications which are created in the same way as an extension, but they act like a separate application in a separate window. This is used when you don't want to have the larger size of a complete XULRunner application, but don't mind requiring a Mozilla browser to be installed to be able to run the application. Remote XUL application You could also just place XUL code on a web server and open it in Firefox, as you would any other web page, however this is discouraged and was disabled in Firefox 8. It is still possible to enable this for selected sites to let legacy apps to continue working, but for new remote applications you should use HTML to create your user in...
...fox, as you would any other web page, however this is discouraged and was disabled in Firefox 8. It is still possible to enable this for selected sites to let legacy apps to continue working, but for new remote applications you should use HTML to create your user interface instead; most of the features you used to have to use XUL for are available in HTML5. The first three types all require an installation to be performed on the user's machine. However, these types of applications do not have security restrictions placed on them, so they may access local files and read and write preferences, for example. For extensions, the XUL files and associated scripts and images used by an application would be packaged into a single file and downloaded and installed by the user. Mozilla applications such ...
... applications do not have security restrictions placed on them, so they may access local files and read and write preferences, for example. For extensions, the XUL files and associated scripts and images used by an application would be packaged into a single file and downloaded and installed by the user. Mozilla applications such as Firefox provide an extension manager which allows packages to be installed without having to write a lot of complex code. What do I need to know to use this tutorial? You should have an understanding of HTML and at least a basic understanding of XML and CSS. Here are some guidelines to keep in mind: XUL elements and attributes should all be entered in lowercase as XML is case-sensitive (unlike HTML). Attribute values in XUL must be placed inside quotes, even if ...
The Chrome URL - Archive of obsolete content
<< PreviousNext >> The following section will describe how to refer to XUL documents and other chrome files. The Chrome URL XUL files can be referenced with a regular HTTP URL (or any type of URL) just like HTML files. However, packages that are installed into Mozilla's chrome system can be referenced with special chrome URLs. The packages included with Mozilla will already be installed but you can register your own. Installed packages have the advantage that they don't have security restrictions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. For example, a chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is u...
... and locales. For example, a chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is using. As long as the filenames are the same in each theme, you can refer to the file using a chrome URL. Mozilla will take care of determining where the file is located and return the right data. This also means that it doesn't matter where the package is installed to be able to access it. The chrome URLs are independent of where the files might physically be located. This makes it much easier to write applications that have lots of files since you don't have to worry about the details of locating files. The basic syntax of a chrome URL is as follows: chrome://<package name>/<part>/<file.xul> The text <package name> is the package name, such as messenger...
...ul> is simply the filename. Example: chrome://messenger/content/messenger.xul The example here refers to the messenger window. You could point to a file that is part of a skin by replacing 'content' with 'skin' and changing the filename. Similarly, you can point to a file that is part of a locale by using 'locale' instead of 'content'. When you open a chrome URL, Mozilla looks through its list of installed packages and tries to locate the JAR file or directory that matches the package name and part. The mapping between chrome URLs and JAR files are specified in the manifest files stored in the chrome directory. If you were to move the file messenger.jar somewhere else and update the manifest file accordingly, Thunderbird will still work since it doesn't rely on its specific installed location. By...
What XULRunner Provides - Archive of obsolete content
See the wikimo:XUL:Installation Story. Extension Manager File picker (uses native OS filepicker as appropriate) Find toolbar Helper app dialog/UI Security UI (maintenance of SSL keychains, etc) Embedding APIs The following embedding APIs are provided by XULRunner: Cross-platform embedding (XRE_InitEmbedding) JavaXPCOM embedding g...
...See the wikimo:XUL:Installation Story. Extension Manager File picker (uses native OS filepicker as appropriate) Find toolbar Helper app dialog/UI Security UI (maintenance of SSL keychains, etc) Embedding APIs The following embedding APIs are provided by XULRunner: Cross-platform embedding (XRE_InitEmbedding) JavaXPCOM embedding gtkmozembed (Li...
... in the 1.9 cycle) Accessibility support IPC services for communication between gecko-based apps (not yet complete) Storage/sqlite interfaces User Interface Features The following user interface is supplied by XULRunner, and may be overridden by embedders under certain circumstances: APIs and user interface for installing, uninstalling, and upgrading XUL applications. See the wikimo:XUL:Installation Story. Extension Manager File picker (uses native OS filepicker as appropriate) Find toolbar Helper app dialog/UI Security UI (maintenance of SSL keychains, etc) Embedding APIs The following embedding APIs are provided by XULRunner: Cross-platform embedding (XRE_InitEmbedding) JavaXPCOM embedding gtkmozembed (Linux only) ActiveX control (Windows only) (not yet complete) O...
2006-10-20 - Archive of obsolete content
t of help from this post. Christopher would not like to learn how to create a build of Firefox with custom extensions and not have those extensions appear in the Addons window. On October 20th Jeff Walden responded Christopher Finke's question. Jeff provided this link as an answer to Christopher Finkes' question. NSIS and my extension Jan Vavra is wondering how he could create a win32 installer of Thunderbird that when executed, it would also install his extensions of choice. He has already "studied" the makefiles but has had no success in achieving his goal. On October 20th Benjamin Smedberg responded Jan Vavra's question. Benjamin Smedberg mentioned in his post that Jan Vavra needs to add the extension files to the packaging manifest, which is used to create the installer. ...
...Paul Reed announced that: Sparky, the Linux performance test machine for the 1.8 branchs, is being decommissioned. He also added that the Linux performance test data is now being provided by bl-bldlnx01. ...
...has already "studied" the makefiles but has had no success in achieving his goal. On October 20th Benjamin Smedberg responded Jan Vavra's question. Benjamin Smedberg mentioned in his post that Jan Vavra needs to add the extension files to the packaging manifest, which is used to create the installer. In Jan Vavra's case he is modifying the Thunderbird installer so he needs to modify "mail/installer/windows/packages-static" Announcements Decommissioning sparky on Friday On October 17th J. Paul Reed announced that: Sparky, the Linux performance test machine for the 1.8 branchs, is being decommissioned. He also added that the Linux performance test data is now being provided by bl-bldlnx01. Paul would like to hear from anyone who is against this decision. He can be contacted via: Emai...
Plugins - Archive of obsolete content
se standard Web APIs instead. If there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that Mozilla can prioritize web platform work to make those use cases possible. For more information about plugin roadmap, see non-archived plugin information. Plugins are shared libraries that users can install to display content that the browser can't display natively. For example, the Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page. Plugins are written using NPAPI, the cross-browser API for plugins. The main source of documentation for NPAPI is the Gecko Plugin API Reference. To...
...authors use plugins when they are blocked by default with the Firefox click-to-activate feature. Scripting plugins (npruntime) This reference describes the new cross-browser NPAPI extensions that let plugins be scriptable and also let them access the script objects in the browser. Shipping a plugin as a Toolkit bundle Plugins can be shipped as a Toolkit bundle, allowing a user to easily install, uninstall and manage their personal plugins. Supporting private browsing in plugins Firefox 3.5 introduced support for private browsing; learn how to make your plugin respect the user's privacy wishes. Multi-Process Plugin Architecture How Firefox loads plugins into a separate process. Firefox 3.6.4 introduced out-of-process plugins which execute in a separate process so that a crashing p...
...t executing calls in plugins. This can be useful when trying to determine if a plug-in is consuming too many resources. Scripting Plugins: Macromedia Flash This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation. Plugins: The First Install Problem The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser. Plugins: Samples and Test Cases NPAPI plugin samples and test cases. External Resources for Plugin Creation External projects, frameworks, and blog posts that may be useful. XEmbed Extension for Mozi...
Theme changes in Firefox 4 - Archive of obsolete content
everywhere, including the menu bar, regardless of the user preference: #navigator-toolbox > toolbar, #addon-bar { counter-reset: largeicons; } Creating a theme that works for Firefox 4 on Mac OS X Create a new directory (for example, My_Theme). Inside that, create another new directory chrome. Now copy all of the directories from omni.jar mentioned above into it. Then copy all of icon.png, install.rdf and preview.png from <firefox-app-bundle>/Contents/MacOS/extensions/{...} into My_Theme. Finally, you need to create a chrome.manifest file with the contents: skin browser classic/1.0 chrome/browser/ skin communicator classic/1.0 chrome/communicator/ skin global classic/1.0 chrome/global/ skin mozapps classic/1.0 chrome/mozapps/ This results in the followin...
... Improving your appearance on Windows The new -moz-windows-theme media query lets you determine which Windows theme is currently ...
.../chrome/browser/* /My_Theme/chrome/communicator/* /My_Theme/chrome/global/* /My_Theme/chrome/mozapps/* /My_Theme/chrome.manifest /My_Theme/icon.png /My_Theme/install.rdf /My_Theme/preview.png Note: For more information (and how to package into a jar) consult Creating a Skin for Firefox which still mostly applies. Most likely you must replace all occurences of classic/1.0 in chrome.manifest and install.rdf with some other name. Improving your appearance on Windows The new -moz-windows-theme media query lets you determine which Windows theme is currently in use; this lets you make your theme adapt to work well with the Windows environment as it's configured. ...
RDF in Mozilla FAQ - Archive of obsolete content
his interface is derived from nsIRDFDataSource. An implementation of this interface will typically combine the statements from several datasources together as a collective. Because the nsIRDFCompositeDataSource interface is derived from nsIRDFDataSource, it can be queried and modified just like an individual data source. How do I access "built-in" datasources? A built-in datasource is a locally-installed component that implements nsIRDFDataSource. For example, the bookmarks service. First, check here to make sure you will be allowed to access a built-in datasource. There are several security restrictions on accessing built-in datasources from "untrusted" XUL and JS. Since a built-in datasource is just an XPCOM component, you can instantiate it directly using the XPConnect component manager. /...
... memory datasource, using RDF/XML to store your information, or writing your own implementation (possibly in JavaScript) of nsIRDFDataSource. What gets loaded when I specify "datasources=" The datasources attribute on the "root" of a template specifies a whitespace-separated list of datasource URIs to load. But what is a "datasource URI"? It is either: An abbreviated ContractID for a locally installed component. By specifying rdf:name, you instruct the template builder to load the XPCOM component with the ContractID @mozilla.org/rdf/datasource;1?name=name. The URL of an RDF/XML file. For example, file:///tmp/foo.rdf chrome://mycomponent/content/component-data.rdf http://www.mysite.com/generate-rdf.cgi ftp://ftp.somewhere.org/toc.rdf The load will be processed asynchronously, and as RD...
...hich the template is built. The builder property refers to an nsIXULTemplateBuilder object, which is a the "builder" that maintains the state of the template's contents. Note the rdf:null datasource: this is a special datasource that says, "hey, I don't have a datasource for you yet, but I'm going to add one later, so set yourself up for it!" It causes the database and builder properties to get installed, but leaves the database empty of datasources: you've got to add these in yourself! Can I manipulate a XUL template using the DOM APIs? Yes: you can add rules, remove rules, change a query, and change the content that is built by a rule. In fact, you can change anything about a template using the W3C DOM APIs. The only caveat is that you must call rebuild() before the changes you've made wil...
Visual JS GE - Game development
Visual-js GameEngine is a small but comprehensive canvas/websocket-based game engine with GUI source editor only for Windows. The server is based on Node.js vs MySql, the client made in four variant on a JavaScript frameworks for 2d canvas JS , three.js , webGL2 vs glmatrix and 2d canvas with matter.js in typescript to complete the stack. Installation and setup First of all download Visual-js from bitbucket. Extract the package into your root folder. ...
...ebsocket-based game engine with GUI source editor only for Windows. The server is based on Node.js vs MySql, the client made in four variant on a JavaScript frameworks for 2d canvas JS , three.js , webGL2 vs glmatrix and 2d canvas with matter.js in typescript to complete the stack. Installation and setup First of all download Visual-js from bitbucket. Extract the package into your root folder. ...
...ent made in four variant on a JavaScript frameworks for 2d canvas JS , three.js , webGL2 vs glmatrix and 2d canvas with matter.js in typescript to complete the stack. Installation and setup First of all download Visual-js from bitbucket. Extract the package into your root folder. Installing modules Navigate to server_instance/, then in the Node.js command prompt or console enter the following installation commands: npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 Setting up config.js You will find config.js in the server_instance folder: All Node.js applications use the same folder -- server_instance. Some apps might need to have local storage, for instance, editor.js. You need to edit the config file to includ...
How do you set up a local testing server? - Learn web development
guages (such as PHP or Python) require a special server to interpret the code and deliver the results. Running a simple local HTTP server To get around the problem of async requests, we need to test such examples by running them through a local web server. One of the easiest ways to do this for our purposes is to use Python's SimpleHTTPServer (or http.server, depending on the version of Python installed.) To do this: Install Python. If you are using Linux or macOS, it should be available on your system already. If you are a Windows user, you can get an installer from the Python homepage and follow the instructions to install it: Go to python.org Under the Download section, click the link for Python "3.xxx". At the bottom of the page, choose the Windows x86 executable instal...
... it should be available on your system already. If you are a Windows user, you can get an installer from the Python homepage and follow the instructions to install it: Go to python.org Under the Download section, click the link for Python "3.xxx". At the bottom of the page, choose the Windows x86 executable installer and download it. When it has downloaded, run it. On the first installer page, make sure you check the "Add Python 3.xxx to PATH" checkbox. Click Install, then click Close when the installation has finished. Open your command prompt (Windows)/ terminal (macOS/ Linux). To check Python is installed, enter the following command: python -V # Or you might have the py command available, # in which case try py -V This should return a version number. I...
... to run code written in languages such as Python, PHP or JavaScript. To handle that you'll need something more -- exactly what you'll need depends on the server-side language you are trying to run. Here are a few examples: To run Python server-side code, you'll need to use a Python web framework. Flask is also a good (slightly less heavyweight) alternative to Django. To run this you'll need to install Python/PIP, then install Flask using pip3 install flask. At this point you should be able to run the Python Flask examples using for example python3 python-example.py, then navigating to localhost:5000 in your browser. To run Node.js (JavaScript) server-side code, you'll need to use raw node or a framework built on top of it. Express is a good choice. To run PHP server-side code, launch PHP's b...
From object to iframe — other embedding technologies - Learn web development
ng at some elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object> elements. <iframe>s are for embedding other web pages, and the other two allow you to embed PDFs, SVG, and even Flash -- a technology that is on the way out, but which you'll still see semi-regularly. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, familiarity with HTML fundamentals (as covered in Getting started with HTML) and the previous articles in this module. Objective: To learn how to embed items into web pages using <object>, <embed>, and <iframe>, like Flash movies and other webpages. A short history of embedding A long time ago on the Web, it was popular to use frames t...
...and digital, but they pose many accessibility challenges and can be hard to read on small screens. They do still tend to be popular in some circles, but it is much better to link to them so they can be downloaded or read on a separate page, rather than embedding them in a webpage. The case against plugins Once upon a time, plugins were indispensable on the Web. Remember the days when you had to install Adobe Flash Player just to watch a movie online? And then you constantly got annoying alerts about updating Flash Player and your Java Runtime Environment. Web technologies have since grown much more robust, and those days are over. For virtually all applications, it's time to stop delivering content that depends on plugins and start taking advantage of Web technologies instead. Broaden your r...
...ys are over. For virtually all applications, it's time to stop delivering content that depends on plugins and start taking advantage of Web technologies instead. Broaden your reach to everyone. Everyone has a browser, but plugins are increasingly rare, especially among mobile users. Since the Web is easily used without any plugins, people would rather just go to your competitors' websites than install a plugin. Give yourself a break from the extra accessibility headaches that come with Flash and other plugins. Stay clear of additional security hazards. Adobe Flash is notoriously insecure, even after countless patches. In 2015, Alex Stamos, then-Chief Security Officer at Facebook, requested that Adobe discontinue Flash. Note: Due to its inherent issues and the lack of support for Flash, A...
Starting our Svelte Todo list app - Learn web development
them as complete. This will be the basic functionality that we'll be developing in this tutorial series, plus we'll look at some more advanced concepts along the way too. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: To learn how to create a Svelte component, render it inside another component, pass data into it using props, and save its state. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-sve...
...ps, and save its state. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/02-starting-our-todo-app Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/02-starting-our-todo-app Remember to run npm install && npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 Todo list app features This is how our Todo list app wil look like once it's ready: Using this UI our user will be able to: Browse their tasks. Mark tasks as completed/pending without deleting them. Remove ta...
... REPL To see the current state of the code in a REPL, visit: https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 Summary With our markup and styling in place our Todo list app is starting to take shape, and we have everything ready so that we can start to focus on the features we have to implement. Previous Overvi...
Componentizing our Svelte app - Learn web development
r app into manageable components and share information between them. We'll componentize our app, then add more functionality to allow users to update existing components. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: To learn how to break our app into components and share information among them. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/04-componentizing-our-app Or directl...
...formation among them. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/04-componentizing-our-app Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/04-componentizing-our-app Remember to run npm install && npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 Breaking the app into components In Svelte, an application is composed from one or more components. A component is a reusable, self-contained block of code that encapsulates HTML, CSS and JavaScript that belong toget...
...mponents that are not hierarchically related. We will look at Stores later on in the series. The code so far Git To see the state of the code as it should be at the end of this article, access your copy of our repo like this: cd mdn-svelte-tutorial/05-advanced-concepts Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts Remember to run npm install && npm run dev to start your app in development mode. REPL To see the current state of the code in a REPL, visit: https://svelte.dev/repl/76cc90c43a37452e8c7f70521f88b698?version=3.23.2 Summary Now we have all of our app's required functionality in place. We can display, add, edit and delete todos, mark them as completed, and filter by status. In this article, we covered the following topic...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
To avoid common pitfalls, we'll have to dig a little deeper into Svelte's reactivity system. We'll also look at solving some accessibility focus issues, and more besides. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn some advanced Svelte techniques involving solving reactivity issues, keyboard accessibility problems to do with component lifecycle, and more. We'll focus on some accessibility issues involving focus management. To do so, we'll utilize some techniques for accessing DOM nodes and executing methods like focus() and select(). W...
...f y items completed" status heading. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/05-advanced-concepts Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts Remember to run npm install && npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/76cc90c43a37452e8c7f70521f88b698?version=3.23.2 Working on the MoreActions component Now we'll tackle the Check All and Remove Completed buttons. Let's create a component that will be in charge of displaying the buttons and emitting the corresponding events. ...
...o reference each particular instance. That's why you have to specify a variable to bind each specific instance to. The code so far Git To see the state of the code as it should be at the end of this article, access your copy of our repo like this: cd mdn-svelte-tutorial/06-stores Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/06-stores Remember to run npm install && npm run dev to start your app in development mode. REPL To see the current state of the code in a REPL, visit: https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 Summary In this article we have finished adding all the required functionality to our app, plus we've taken care of a number of accessibility and usability issues. We also finished splitting our app into mana...
Working with Svelte stores - Learn web development
t in Svelte -- Stores. Stores are global global data repositories that hold values. Components can subscribe to stores and receive notifications when their values change. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn how to use Svelte stores Using stores we will create an Alert component that shows notifications on screen, which can receive messages from any component. In this case, the Alert component is independent from the rest -- it is not a parent or child of any other -- so the messages don't fit into the component hierarchy. We w...
...b storage, allowing our todos to persist over page reloads. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/06-stores Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/06-stores Remember to run npm install && npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 Dealing with our app state We have already seen how our components can communicate with each other using props, two-way data binding, and events. In all these cases we were dealing with communication between parent a...
...te of change over time. Have a look at the ease visualizer to explore the various ease functions available. The code so far Git To see the state of the code as it should be at the end of this article, access your copy of our repo like this: cd mdn-svelte-tutorial/07-next-steps Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/07-next-steps Remember to run npm install && npm run dev to start your app in development mode. REPL To see the current state of the code in a REPL, visit: https://svelte.dev/repl/378dd79e0dfe4486a8f10823f3813190?version=3.23.2 Summary In this article we added two new features: an Alert component and persisting todos to web storage. This allowed us to showcase some advanced Svelte techniques. We developed the Alert component to s...
Dynamic behavior in Svelte: working with variables and props - Learn web development
st app. In this article we'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status. Prerequisites: At minimum, it is recommended that you are familiar with the core HTML, CSS, and JavaScript languages, and have knowledge of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn and put into practice some basic Svelte concepts, like creating components, passing data using props, render JavaScript expressions into our markup, modify the components state and iterating over lists. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas...
...erating over lists. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current app state, run cd mdn-svelte-tutorial/03-adding-dynamic-behavior Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/03-adding-dynamic-behavior Remember to run npm install && npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 Working with todos Our Todos.svelte component is currently just displaying static markup; let's start making it a bit more dynamic. We'll take the tasks information from the markup and store it in a todos array. We'l...
...d practice to make our code clear and explicit about what information it is using. The code so far Git To see the state of the code as it should be at the end of this article, access your copy of our repo like this: cd mdn-svelte-tutorial/04-componentizing-our-app Or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/04-componentizing-our-app Remember to run npm install && npm run dev to start your app in development mode. REPL To see the current state of the code in a REPL, visit: https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 Summary That will do for now! In this article we already implemented most of our desired functionality. Our app can display, add, and delete todos, toggle their completed status, show how many of them are com...
Handling common accessibility problems - Learn web development
nderstandable it is without it. You could do this manually by just removing the CSS from your code, but the easiest way is to use browser features, for example: Firefox: Select View > Page Style > No Style from the main menu. Safari: Select Develop > Disable Styles from the main menu (to enable the Develop menu, choose Safari > Preferences > Advanced > Show Develop menu in menu bar). Chrome: Install the Web Developer Toolbar extension, then restart the browser. Click the gear icon that will appear, then select CSS > Disable All Styles. Edge: Select View > Style > No Style from the main menu. Using native keyboard accessibility Certain HTML features can be selected using only the keyboard -- this is default behavior, available since the early days of the web. The elements that have this c...
...ence, user testing, etc. to get a full picture. Automation tools Deque's aXe tool goes a bit further than the auditing tools we mentioned above. Like the others, it checks pages and returns accessibility errors. Its most immediately useful form is probably the browser extensions: aXe for Chrome aXe for Firefox These add an accessibility tab to the browser developer tools. For example, we installed the Firefox version, then used it to audit our bad-table.html example. We got the following results: aXe is also installable using npm, and can be integrated with task runners like Grunt and Gulp, automation frameworks like Selenium and Cucumber, unit testing frameworks like Jasmin, and more besides (again, see the main aXe page for details). Screenreaders It is definitely worth testing wi...
...D Go into the Mac's Dock, so you can select apps to run inside it. This seems like a lot of commands, but it isn't so bad when you get used to it, and VO regularly gives you reminders of what commands to use in certain places. Have a play with VO now; you can then go on to play with some of our examples in the Screenreader testing section. NVDA NVDA is Windows-only, and you'll need to install it. Download it from nvaccess.org. You can choose whether to make a donation or download it for free; you'll also need to give them your e-mail address before you can download it. Once downloaded, install it -- you double click the installer, accept the license and follow the prompts. To start NVDA, double click on the program file/shortcut, or use the keyboard shortcut Ctrl + Alt + N. You'l...
Client-side tooling overview - Learn web development
at are useful after you have written your code, such as testing and deployment tools. Let's look at each one of these in more detail. Safety net These are tools that make the code you write a little better. This part of the tooling should be specific to your own development environment, though it's not uncommon for companies to have some kind of policy or pre-baked configuration available to install so that all their developers are all using the same processes. This includes anything that makes your development process easier with respect to generating stable and reliable code. Safety net tooling should also help you either prevent mistakes or correct mistakes automatically without having to build your code from scratch each time. A few very common safety net tool types you will find being...
...allows developers to write their code using cutting-edge JavaScript, which Babel then takes and converts into old-fashioned JavaScript that more browsers can understand. Developers can also write and publish plugins for Babel. PostCSS: Does the same kind of thing as Babel, but for cutting-edge CSS features. If there isn't an equivalent way to do something using older CSS features, PostCSS will install a JavaScript polyfill to emulate the CSS effect you want. The option to write your code in an entirely different language and have it transformed into a web-compatible language. For example: Sass/SCSS: This CSS extension allows you to use variables, nested rules, mixins, functions, and many other features, some of which are available in native CSS (such as variables), and some of whic...
...em to do. This is fine -- it is all good for learning, and the road will get smoother as you get more experience. Summary That rounds off our gentle introduction to the topic of client-side web tooling, from a high level. Next up we provide you with a crash course on the command line, which is where a lot of tooling is invoked from. We'll take a look at what the command line can do and then try installing and using our first tool. Overview: Understanding client-side tools Next In this module Client-side tooling overview Command line crash course Package management basics Introducing a complete toolchain Deploying our app ...
Frequently Asked Questions for Lightweight themes
Introducing Lightweight themes What are Lightweight themes? Lightweight themes are easy-to-install, easy-to-use skins that change the look of your Firefox web browser. There are hundreds of thousands community-designed themes to choose from, with more added every day. Start looking here for designs that fit your style. What kind of computers and operating systems do Lightweight themes work with? Lightweight themes work with any type of computer that has Firefox installed. This includes Mac, Linux, Windows, and Android platforms. What can Lightweight themes do? Lightweight themes change the header area of your browser, including the tab text color and the background tab colors. You can easily preview a design and install it without needing to restart. Installing Lightweight themes How d...
... This includes Mac, Linux, Windows, and Android platforms. What can Lightweight themes do? Lightweight themes change the header area of your browser, including the tab text color and the background tab colors. You can easily preview a design and install it without needing to restart. Installing Lightweight themes How do I add Lightweight themes to my Firefox? In just a few seconds, you can install a theme and transform the look of your Firefox web browser. Preview any theme by clicking "Tap to Preview"; the design appears in your browser header so you can "try it on." When you're ready, just click the blue Install Theme button. Once a theme is installed, it is saved in the Add-ons Manager, where you can enable or disable them as you wish. Simply go to the Tools > Add-ons menu and click on ...
...dd-ons menu and click on the Appearance tab. Are Lightweight themes free? Yes. Themes are free to download and free to use. Using Lightweight themes How do I change my current Lightweight theme? There are two easy ways to change your theme. You can either: Visit the gallery, choose your favorite theme, and click on your choice to instantly change the look of your browser. Once a theme is installed, it is saved in the Add-ons Manager, where you can enable or disable them as you wish. Simply go to the Tools > Add-ons menu and click on the Appearance tab. How do I undo a Lightweight theme? To undo the design you most recently selected, go to Tools > Add-ons in the menu bar and select the Themes tab. Next to the theme you want to undo, click the Disable button. How do I provide feedback?
Debugging on Windows
This document explains how to debug Mozilla-derived applications such as Firefox, Thunderbird, and SeaMonkey on Windows using the Visual C++ IDE. If VC++ and your Mozilla application hang shortly after you launch the application under the debugger, see Problems Loading Debug Symbols. Ways to start the debugger First of all, it's necessary to install a Visual Studio extension to be able to follow child processes as they are created. Firefox, in general, and even in non-e10s mode, does not start the main process directly, it starts it via a Launcher Process. This means that Visual Studio will only attach to the first process it finds, and will not hit any break-point (and even notifies you that it cannot find their location). Microsoft Child Process Debugging Power Tool allows automatica...
...view You can customize how Visual C++ displays classes in the variable view. By default VC++ displays "{...}" and you need to click the small + icon to expand the members. You can change this behaviour, and make Visual C++ display whatever data member you want in whatever order, formatter however you like instead of just "{...}". You need to locate a file called "AUTOEXP.DAT" in your Visual C++ installation. By default it will be: VC++ 6.0: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\AUTOEXP.DAT VC++ 7.0: C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\Debugger\AUTOEXP.DAT The file has information about the format in the beginning, and after a little practice you should be well on your way. Here are some entries that will make your life easier: ;; Moz...
...em: Turn off automatic symbol downloading for system libraries: in Tools > Options > Debugging > Symbols, uncheck the Microsoft symbol server. Pre-load all the Windows debug symbols. These instructions apply to Visual Studio 10 on Windows 7; other software versions likely need to have file paths adjusted. Locate the Microsoft utility "SymChk.exe" on your system (it will likely be in the installation directory of your Windows Debugging Tools). Find the directory where Visual Studio caches downloaded symbols; in VC++ 10 open the menu to Tools > Options > Debugging > Symbols and copy the field "Cache symbols in this directory". In a command window, run symchk.exe /r C:\windows\SysWOW64\ /s "SRV*<your cache symbols directory>\MicrosoftPublicSymbols*http://msdl.microsoft.com/downl...
HTTP logging
Make the appropriate adjustments if those aren't the case.) Reproduce whatever problem it is that you're having. Once you've reproduced the problem, exit Firefox and look for the generated log files in your temporary directory. You can type "%TEMP%" directly into the Windows Explorer location bar to get there qui...
...es subfolder in your startup disk's Applications folder. Copy and paste the following commands into the Terminal window, hitting the return key after each line. export MOZ_LOG=timestamp,rotate:200,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5,cookie:5 export MOZ_LOG_FILE=~/Desktop/log.txt cd /Applications/Firefox.app/Contents/MacOS ./firefox-bin (The instructions assume that you've installed Firefox directly into your startup disk's Applications folder. If you've put it elsewhere, change the path used on the third line appropriately.) Reproduce whatever problem you're trying to debug. Quit Firefox and look for the generated log.txt log files on your desktop. Note: The generated log file uses Unix-style line endings. Older editors may have problems with this, but if you're usin...
...Make the appropriate adjustments if those aren't the case.) Reproduce whatever problem it is that you're having. Once you've reproduced the problem, exit Firefox and look for the generated log files in your temporary directory. You can type "%TEMP%" directly into the Windows Explorer location bar to get there qui...
Old Thunderbird build
tory C:/thunderbird-src (where "C:/", with a forward slash, is intentional to clarify you are in the MozillaBuild command prompt per Windows build prerequisite). Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving i...
...possible to rebuild specifically. If you changed C or C++ files, run: ./mozilla/mach build binaries If you changed JavaScript or XUL files, on Mac OS X or Linux you don't have to rebuild since the files in the object directory are linked to the ones in the source directory. On Windows run: ./mozilla/mach build path/to/dir This is the tricky bit, since you need to specify the directory that installs the files, which may be a parent directory of the changed file's directory. For all other changes run the full rebuild: ./mozilla/mach build Problems Building? Have you: Check comm-central on Treeherder for known failures at the time you pulled the code. The current status of the trunk can also be checked at https://treestatus.mozilla.org/ If the trunk is broken (i.e. closed), you...
... of the trunk can also be checked at https://treestatus.mozilla.org/ If the trunk is broken (i.e. closed), you may wish to consider building one of the branches (to pull the source code from a branch, just replace the url to the repository in the hg clone instruction). On Windows: check that the MAPI header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the MAPI header files are not bundled with Visual Studio 2013/2015 (Windows SDK 8.1/10). You should copy the header files to a Windows SDK include directory so that the build process will find the files, for example to C:\Program Files (x86)\Windows Kits\8.1\Include\shared and/or C:\Program Files (x86)\Windows Kits\10\Include\10.0.nnnnn.0\shared respectively, where nnnnn is the highest ...
Simple Sunbird build
Building Sunbird is no longer supported. You can give it a try, but its likely that the build system will present you an error. Instead it is suggested to build Thunderbird with Lightning. Please refer to the Simple Thunderbird build guide. You can build a bleeding-edge, development version of Sunbird using the commands below. For complete information, see the build documentation. Installing build tools If your system is not listed below, see the build prerequisites page. Ubuntu Linux: sudo apt-get build-dep sunbird sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libiw-dev autoconf2.13 cvs Fedora Linux: sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development' sudo yum install mercurial autoconf213 glib...
...age. Ubuntu Linux: sudo apt-get build-dep sunbird sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libiw-dev autoconf2.13 cvs Fedora Linux: sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel Mac: Install Xcode Tools. Insert "Mac OS X Install Disc 2", then open XcodeTools.mpkg. (For some Mac OS X versions, you will find it in a directory called "Optional Installs".) Install MacPorts. Run these commands to install the other build tools: sudo port sync sudo port install mercurial libidl autoconf213 Problems? See Mac OS X build prerequisites. Windows: If you're using Windows XP, you must hav...
... open XcodeTools.mpkg. (For some Mac OS X versions, you will find it in a directory called "Optional Installs".) Install MacPorts. Run these commands to install the other build tools: sudo port sync sudo port install mercurial libidl autoconf213 Problems? See Mac OS X build prerequisites. Windows: If you're using Windows XP, you must have Windows XP Service Pack 2 and .NET Framework 2.0. Install Visual C++ 2005 or 2008. Both the professional edition and the express edition will work. You may need to install one or more Windows SDKs. See Windows SDK versions for a quick guide. Install MozillaBuild, a package of additional build tools. (If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'co...
ESLint
re options when running eslint. VCS Hooks Hooks are available for Mercurial & Git, see using a vcs hook for more details. Editor Integration It is highly recommended that you integrate eslint into your editor. This lets you see errors in real time, and can help you fix issues before you compile or run tests, reducing the time to develop patches. See the ESLint user guide for which plugins to install in your editor. Prior to Firefox 55 the location for the eslint binary used to be tools/lint/eslint/node_modules/.bin, since Bug 1305023, node_modules is now located in the top-level directory, and should need no special set-up. Understanding Rules and Errors Not all files are linted Currently ESLint runs on: .js .jsx .jsm .xml .html .xhtml Additionally, some directories and files...
...s now located in the top-level directory, and should need no special set-up. Understanding Rules and Errors Not all files are linted Currently ESLint runs on: .js .jsx .jsm .xml .html .xhtml Additionally, some directories and files are ignored, see the .eslintignore file Handling Errors If your code fails an ESLint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined. no-undef (eslint) If you don't understand a rule, you can look it up on eslint.org for more information about it. Mozilla Specific Rules There are some rules that are specific for the Mozilla code-base. These have the prefix mozilla/. More information: Outline details of the rules Rule Source Code Common issues and how to...
...ode Common issues and how to solve them My editor says that "mozilla/whatever" is unknown Run ./mach eslint --setup Restart your editor If that doesn't work, check that you have your editor pointing to the correct node_modules folder. Node.js is not recognized Add it to your PATH environment variable by running PATH="$PATH:/path/to/node.js/". For Example: In Windows 10, if you have installed Node.js on "C:\nodejs", then the command should look like: export PATH=$PATH:/c/nodejs Enabling ESLint for a new directory Remove the directory from .eslintignore (in the base directory of the repository) Fix errors that occur when running ./mach eslint path/to/dir, see also the no-undef rules below. no-undef The no-undef rule is currently being enabled throughout the code base. Here ar...
Firefox and the "about" protocol
report and run the GC and CC about:mozilla Special page showing a message from "The Book of Mozilla" about:networking Displays networking information about:newtab Start page when opening a new tab about:performance Displays memory and performance information about Firefox subprocesses/add-ons/tabs about:plugins Displays information about installed plugins about:policies Lists out the Firefox for Enterprise policies about:preferences Firefox settings (also available through Firefox menu > Options) about:privatebrowsing Start page when opening a private window about:profiles Display and manage Firefox profiles about:protections Privacy Protections report consisting of Enhanced Tra...
... to an update about:reader Indicates a web page has Firefox Reader View turned on. ...
... The array maps most of the URLs, like config to URLs in the chrome: pseudo protocol, such as chrome://global/content/config.xul. The about location information is duplicated in docshell/build/nsDocShellModule.cpp. No...
Bootstrapping a new locale
localizations. When a localization team is registered and your Hg repository is set up for a locale, you can then clone the existing Mozilla release branch (i.e. where active development of the upcoming release of Firefox occurs) and then begin the necessary work for translation. Hg allows localizers to work locally on their machines and then "push" changes to their official Mozilla repository. Installing Mercurial Depending on your operating system, you will need to install the correct version of Hg on your machine. This document will give you the basic information on how to do that. Install the compare-locales utility The next step is to install compare-locales. $ sudo easy_install compare-locales This will download and install the utility. Clone the source code The next step is to d...
...1.9.2 branch. from now on may be needs some corrections, (see expected structure below $cd ab-CD/browser/chrome/browser) may be needs $cp -R mozilla-1.9.x/browser/locales/ ab-CD and then $mv ab-CD/en-US ab-CD/browser and the same for the others the commands seems symbolic and not real ... see also structure expected more below. ...
...le-compile-environment --enable-application=browser Whenever you need a build directory, these are the steps that you need to do to initialize it. If you're downloading a new release of Firefox from CVS, you might want to run configure again, too. Now we can actually create the language pack, make -C browser/locales langpack-en-X-dude You should find your newly created language pack in dist/install. ls dist/install You can open that file in Firefox and check it out. You have to set your selected language still. You can either use the Locale Switcher extension, or set it in about:config. Set the general.useragent.locale to your language code, in this case, en-X-dude, and restart Firefox once more. ...
L10n Checks
L10n Checks is a Python script and library similar to compare-locales. It allows Mozilla localizers to easily check their work. Installation (releases) L10n Checks needs to be installed. To do that, you must have Python 2.5, 2.6, or 2.7 installed on your machine. Once Python is installed, the easiest way to install L10n Checks (on Mac or Linux) is to just run: $ sudo easy_install -U l10n-checks or, if you're on Windows: $ easy_install -U l10n-checks Installation (development versions) L10n Checks needs to be installed, and it requires that you have Python and Mercurial installed on your machine. The easiest way is to just run: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ sudo python setup.py install or, if you're on Windows: $ hg clone h...
...You pass both the path to the ini file and the parent directory of the localizations as first arguments, followed by the locale codes of the locales you want to compare. ...
...JSON output In all modes you can tell L10n Checks to present the output as JSON by setting the -j parameter to full_json, e.g.: check-l10n-completeness -j full_json suite/locales/l10n.ini ../l10n/ de JSON output requires simplejson to be present on the system if using Python 2.5. Verbose level In all modes you can set the verbose level, e.g.: check-l10n-completeness --verbose 5 ...
SVN for Localizers
source repository tool we use to manage the localized Mozilla web pages. It's a handy tool that allows us to grab, change, and store versions of source files in one location. You should know that when we say SVN we are referring to either the SVN server and the SVN client. This may seem confusing, but don't fret because we'll make sure to differentiate between the two here: SVN server: This is installed on one of Mozilla's servers that we use to manage our localizable web system. SVN client: This is what a localizer installs on their own computer. The SVN client is the localizer's communication portal for accessing the Mozilla SVN server. You use it to copy files from the server to your computer and to push changed or localized files back onto the server. Installing SVN client: Linux use...
...SVN client: This is what a localizer installs on their own computer. The SVN client is the localizer's communication portal for accessing the Mozilla SVN server. You use it to copy files from the server to your computer and to push changed or localized files back onto the server. Installing SVN client: Linux users can download the SVN client from http://subversion.apache.org/packages.html or install packages provided within their distribution (for example, in Debian, sudo apt-get install subversion). Mac OS X users can find SVN inside the Command Line Tools (available on the Apple Developer website), or use tools like Homebrew or Fink. Windows users can install the SVN client directly from the Cygwin setup file. ...
...ient from http://subversion.apache.org/packages.html or install packages provided within their distribution (for example, in Debian, sudo apt-get install subversion). Mac OS X users can find SVN inside the Command Line Tools (available on the Apple Developer website), or use tools like Homebrew or Fink. Windows users can install the SVN client directly from the Cygwin setup file. If you already installed Cygwin but it didn't include the SVN package, run the Cygwin installer again and be sure to check the box beside Subversion package. This option is found in the Devel category. A possible alternative is to install TortoiseSVN (graphical interface and command line client). Note: If you do not already have access to SVN, visit this wiki page on how to get set up with an SVN account before proce...
Memory Profiler
Using the Add-on Open the devtools panel or WebIDE. ...
... Using the Add-on Open the devtools panel or WebIDE. ...
... Using the Add-on Open the devtools panel or WebIDE. Select the MemoryProfiler tab. ...
Profiling with Xperf
pplies to xperf version 4.8.7701 or newer. To see your xperf version, either run 'xperf' on a command line with no arguments, or start 'xperfview' and look at Help -> About Performance Analyzer. (Note that it's not the first version number in the About window; that's the Windows version.) If you have an older version, you will experience bugs, especially around symbol loading for local builds. Installation For all versions, the tools are part of the latest Windows 7 SDK (SDK Version 7.1). Use the web installer to install at least the "Win32 Development Tools". Once the SDK installs, execute either wpt_x86.msi or wpt_x64.msi in the Redist/Windows Performance Toolkit folder of the SDK's install location (typically Program Files/Microsoft SDKs/Windows/v7.1/Redist/Windows Performance Toolkit) to a...
...Check if C:\Program Files\Microsoft Windows Performance Toolkit already exists. ...
...Check if C:\Program Files\Microsoft Windows Performance Toolkit already exists. ...
A brief guide to Mozilla preferences
efault preferences for Firefox sync, also oddly misplaced browser/app/profile/channel-prefs.js - a file indicating the user's update channel. This is kept separate from other preferences because it can affect how updates are applied. browser/app/profile/firefox.js - defaults specific to Firefox browser/app/profile/firefox-branding.js - defaults specific to the specific kind of Firefox being installed (Nightly, Aurora, Beta, Release) browser/defaults/preferences/firefox-l10n.js - defaults specific to the installed language of Firefox. None of the other preference files contain locale-specific preferences. Config. file A configuration file, usually with .cfg extension, may be called from a default pref file via the general.config.filename preference. This file allows preference lock...
...n user.js . Preference conflicts are resolved in favor of the last entry; for example, user.js takes precedence over prefs.js . If the application encounters any error during loading of a default pref file, the application will issue a warning that a configuration file has failed to load and then quit. This allows system administrators to know quickly if there is a configuration error in the installation. If the application encounters an error when loading user pref files, the application will issue a warning but will continue running. Preferences Saving Usually when the user specifically commits a preference change via user interface such as the Preferences dialog, the application saves the change by overwriting prefs.js . On application exit, all user-set preferences are saved to prefs...
...ing about:config in the Location Bar. This UI is not recommended for most users. Programmatic changes to preferences can be made using the Preferences.jsm module from JS code, or the mozilla::Preferences static class methods from C++ code. Changing defaults A systems administrator can modify the default preferences in two ways: The administrator may add an all-companyname.js preference file (install_directory/browser/defaults/preferences/all-companyname.js). This will be parsed last during the preference loading process. The administrator may alternatively put a user.js file in app_dir/defaults/profile/ ; this will put a copy of the user.js in all new profiles. This method has the advantage of resetting preferences back to administrator defaults at every start-up. Note that, because a u...
Creating a Cookie Log
Creating a cookie log is often necessary to troubleshoot problems with Firefox's cookie handling. If you are reading this, you have probably been directed here from a bug report. Please follow the instructions below to run Firefox with cookie logging enabled. Enabling Cookie Logging Windows Open a command prompt (this is under Programs or Programs/Accessories in normal installations of Windows). Change to your Firefox directory (usually C:\Program Files\Mozilla Firefox) Type "set NSPR_LOG_FILE=C:\temp\cookie-log.txt", enter Type "set NSPR_LOG_MODULES=cookie:4" and press Enter Run Firefox by typing "firefox.exe" and pressing Enter. Linux Start a command shell (these instructions are for bash, if you use something else, you probably know how to modify these instructions already)...
...r Firefox directory (usually C:\Program Files\Mozilla Firefox) Type "set NSPR_LOG_FILE=C:\temp\cookie-log.txt", enter Type "set NSPR_LOG_MODULES=cookie:4" and press Enter Run Firefox by typing "firefox.exe" and pressing Enter. Linux Start a command shell (these instructions are for bash, if you use something else, you probably know how to modify these instructions already). Change to the installation directory for Firefox. Type "export NSPR_LOG_FILE=~/cookie-log.txt" and press Enter. Type "export NSPR_LOG_MODULES=cookie:4" and press Enter. Run Firefox by typing "./firefox" and pressing Enter Mac OS X Open Terminal.app, which is located in the /Applications/Utilities folder (these instructions are for bash, the default shell in Mac OS X 10.3 and higher; if you use something else, yo...
...nd press Enter. Type "export NSPR_LOG_MODULES=cookie:4" and press Enter. Run Firefox by typing "./firefox" and pressing Enter Mac OS X Open Terminal.app, which is located in the /Applications/Utilities folder (these instructions are for bash, the default shell in Mac OS X 10.3 and higher; if you use something else, you probably know how to modify these instructions already). Change to the installation directory for Firefox, e.g. type "cd /Applications/Firefox.app/Contents/MacOS" and press Return. Type "export NSPR_LOG_FILE=~/Desktop/cookie-log.txt" and press Return. Type "export NSPR_LOG_MODULES=cookie:4" and press Return. Run Firefox by typing "./firefox-bin" and pressing Return (note that Firefox will launch behind windows for other applications). Creating the Log Now that you hav...
Build instructions for JSS 4.3.x
Build Instructions for JSS 4.3.x Newsgroup: mozilla.dev.tech.crypto Before building JSS, you need to set up your system as follows: Build NSPR/NSS by following the NSPR/NSS build instructions, To check that NSS built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html. Install a Java compiler and runtime. JSS supports Java version 1.5 or later. We suggest you use the latest. You must have Perl version 5.005 or later. Now you are ready to build JSS. Follow these steps: Switch to the appropriate directory and check out JSS from the root of your source tree. cvs co -r JSS_4_3_1_RTM mozilla/security/jss or cvs co -r JSS_4_3_RTM mozilla/security/jss Setup environment variables needed for...
...on 5.005 or later. Now you are ready to build JSS. Follow these steps: Switch to the appropriate directory and check out JSS from the root of your source tree. cvs co -r JSS_4_3_1_RTM mozilla/security/jss or cvs co -r JSS_4_3_RTM mozilla/security/jss Setup environment variables needed for compiling Java source. ...
...la/security/jss or cvs co -r JSS_4_3_RTM mozilla/security/jss Setup environment variables needed for compiling Java source. The JAVA_HOME variable indicates the directory containing your Java SDK installation. Note, on Windows platforms it is best to have JAVA_HOME set to a directory path that doest not have spaces. Unix setenv JAVA_HOME /usr/local/jdk1.5.0 (or wherever your JDK is installed) Windows set JAVA_HOME=c:\programs\jdk1.5.0 (or wherever your JDK is installed) Windows (Cygnus) JAVA_HOME=/cygdrive/c/programs/jdk1.5.0 (or wherever your JDK is installed) export JAVA_HOME Windows build Configurations WINNT vs WIN95 As of NSS 3.15.4, NSPR/NSS/JSS build generates a "WIN95" configuration by default on Windows. We recommend most applications use ...
NSS 3.35 release notes
o change to code is necessary. (Only APIs exported in *.def files are stable APIs.) New experimental functionality provided Below are descriptions of experimental functionality, which might not be available in future releases of NSS. Users of TLS are now able to provide implementations of TLS extensions, through an experimental custom extension API. See the documentation in sslexp.h for SSL_InstallExtensionHooks for more information on this feature. Several experimental APIs were added in support of TLS 1.3 features: TLS servers are able to send session tickets to clients on demand, using the experimental SSL_SendSessionTicket function. This ticket can include arbitrary application-chosen content. An anti-replay mechanism was added for 0-RTT, through the experimental SSL_SetupAnt...
...T, through the experimental SSL_SetupAntiReplay function. This mechanism must be enabled for 0-RTT to be accepted when NSS is being used as a server. KeyUpdate can be triggered by the experimental SSL_KeyUpdate() function. TLS servers can screen new TLS 1.3 connections, as they are made using the experimental SSL_HelloRetryRequestCallback function. This function allows for callbacks to be installed, which are called when a server receives a new TLS ClientHello. The application is then able to examine application-chosen content from the session tickets, or HelloRetryRequest cookie, and decide whether to proceed with the connection. For an initial ClientHello, an application can control whether NSS sends a HelloRetryRequest, and include application-chosen content in the cookie. New...
...tryRequest, and include application-chosen content in the cookie. New experimental APIs Below is a list of experimental functions, which might not be available in future releases of NSS. in sslexp.h experimental: SSL_KeyUpdate - prompt NSS to update traffic keys (TLS 1.3 only). experimental: SSL_GetExtensionSupport - query NSS support for a TLS extension. experimental: SSL_InstallExtensionHooks - install custom handlers for a TLS extension. experimental: SSL_SetupAntiReplay - configure a TLS server for 0-RTT anti-replay (TLS 1.3 server only). experimental: SSL_SendSessionTicket - send a session ticket (TLS 1.3 server only). Removed experimental APIs Note that experimental APIs might get removed from NSS without announcing removals in the release notes. This s...
Build instructions
.pdb file. Required to build with MSVC 8 (2005 Express). Default is not to put debug symbols into optimized builds, and for MSVC, is to put symbols into the .exe or .dll file. NSDISTMODE: If set to 'copy', mozilla/dist/<OBJ_STUFF>/bin/* real files instead of symbolic links. These variables should be either undefined, or set to "1". Results are undefined for variables set to "0". ...
...This can be done in sh or bash as follows: export PATH=/usr/libexec/binutils220:$PATH The following build instructions should work for all platforms (with some platform-specific changes as noted). ...
...soft Visual Studio 2010. (The free edition works, and other versions like Visual Studio 2008 and Visual Studio 2012 may also work.) Use start-shell-msvc2010.bat from MozillaBuild to get a bash shell with the PATH already configured, and execute these instructions from within that bash shell. For RHEL-5, you need to use the new assembler. You can install the new assembler as root as follows: yum install binutils220 You can then use the new assembler by adding /usr/libexec/binutils220 to the beginning of your build path. This can be done in sh or bash as follows: export PATH=/usr/libexec/binutils220:$PATH The following build instructions should work for all platforms (with some platform-specific changes as noted). Build Instructions for Recent Versions (Mercurial) Clone the NSPR and NSS re...
troubleshoot.html
multaneous connections by default; if the stress tests fail, try increasing the number of simultaneous sockets supported. Building JSS Windows Only: The shell invoked by gmake, shmsdos.exe, is likely to crash when invoking some Java tools on Windows. ...
...sdos.exe, is likely to crash when invoking some Java tools on Windows. The current workaround is to use some other shell in place of shmsdos, such as sh.exe, which should be distributed with the Cygnus toolkit you installed to build NSS. The change is unfortunately rather drastic: to trick gmake, you rename the shell program. cd c:/Programs/cygnus/bin (or wherever your GNU tools are installed) cp shmsdos.exe shmsdos.bak (backup shmsdos) cp sh.exe shmsdos.exe (substitute alternative shell) Making this change will probably break other builds you are making on the same machine. You may need to switch the shell back and forthdepending on which product you are building. We will try to provide a moreconvenient solution in the future. If you have the MKS...
... ...
Shumway
h SWF-based games and animations. Shumway has certain limitations compared to Adobe Flash Player especially when unavoidable patents (such as those surrounding Flash DRM) get in the way. Some of its current limitations are just temporary, however. There are a few situations where a user may use Shumway to view your content: Their platform does not support Adobe Flash Player. The user did not install Adobe Flash Player. The user has Adobe Flash Player disabled (or set to "click-to-enable") for performance or security reasons. There might be a time where users want to experience your content but Flash is no longer supported by Adobe. To emphasize a point: the current behavior is that Shumway works on any SWF file unless (or until) the Adobe Flash Player plugin is activated. Shumway is made...
...e Flash Player plugin is activated. Shumway is made with the same constraints as any website. Users who disable Flash because of security or performance concerns can still see content through Shumway because it cannot be forced to behave worse than JavaScript (and WebGL, etc.) allows. ...
...rmance concerns can still see content through Shumway because it cannot be forced to behave worse than JavaScript (and WebGL, etc.) allows. Users with Shumway enabled will still see your Flash content, if compatible with Shumway, even if Flash Player is installed but blocked. Testing and what to do in case of trouble The first step is to directly test your Flash content. The simple method is to install the Shumway extension (or run a browser version with Shumway included and enabled) and browse to your Flash content with Adobe Flash Player set "Ask to Activate" or "Never Activate" in Firefox's Add-ons menu (this will be listed as "Shockwave Flash" under the Plugins tab). This will be the experience met by your users who are running that version of Shumway. Hopefully, this displays your content ...
Hacking Tips
vaScript stack with the C++ stack, which is useful to analyze library function issues. One tip is to start looking at a script with an inverted JS stack to locate the most expensive JS function, then to focus on the frame of this JS function, and to remove the inverted stack and look at C++ part of this function to determine from where the cost is coming from. Using the JIT Inspector (browser) Install the JIT Inspector addon in your browser. This addon provides estimated cost of IonMonkey , the Baseline compiler, and the interpreter. In addition it provides a clean way to analyze if instructions are inferred as being monomorphic or polymorphic in addition to the number of time each category of type has been observed. Using the TraceLogger (JS shell / browser) Create graphs showing time spent...
...iltered with IONFILTER. IONFLAGS contains the names of each channel separated by commas. The logs channel produces 2 files in /tmp/, one (/tmp/ion.json) made to be used with iongraph (made by Sean Stangl) and another one (/tmp/ion.cfg) made to be used with c1visualizer. These tools will show the MIR & LIR steps done by IonMonkey during the compilation. If you would like to use iongraph, you must install Graphviz. Compilation logs and spew can be filtered with the IONFILTER environment variable which contains locations as output in other spew channels. Multiple locations can be separated with comma as a separator of locations. $ IONFILTER=pdfjs.js:16934 IONFLAGS=logs,scripts,osi,bailouts ./js --ion-offthread-compile=off ./run.js 2>&1 | less The bailouts channel is likely to be the first thing ...
...ll graph->dump() (gdb) call block->dump() (gdb) call def->dump() Benchmarking without a Phone If you do not have a mobile device or prefer to test on your desktop first, you will need to downgrade your computer such as it is able to run programs as fast as-if they were running on a phone. On Linux, you can manage the resources available to one program by using cgroup, and to do you can install libcgroup which provides some convenient tools such as cgexec to wrap the program that you want to benchmark. The following list of commands is used to create 3 control groups. The top-level control group is just to group the mask and the negate-mask. The mask control group is used to run the program that we want to benchmark. The negate-mask control group is used to reserve resources which migh...
JS_SetOperationCallback
perationCallback(JSContext *cx, JSOperationCallback callback); JSOperationCallback JS_GetOperationCallback(JSContext *cx); void JS_TriggerOperationCallback(JSRuntime *rt); Name Type Description cx JSContext * A context. rt JSRuntime * The runtime. callback JSOperationCallback (only in JS_SetOperationCallback) The callback function to install. Callback syntax JSBool (*JSOperationCallback)(JSContext *cx); Name Type Description cx JSContext * Pointer to a JSContext in which this callback was installed. The callback may use this context to call JSAPI functions, but it should first use JS_SetOperationCallback to set the context's operation callback to NULL. Otherwise the engine may call the op...
...allback are: To run garbage collection periodically, by calling JS_MaybeGC; To periodically take a break from script execution to update the UI (though note that Mozilla does not do this, by design); To enforce application limits on the amount of time a script may run. (In this case, the callback may terminate the script by returning JS_FALSE.) JS_GetOperationCallback returns the currently installed operation callback, or NULL if none is currently installed. JS_TriggerOperationCallback triggers a callback set using JS_SetOperationCallback. JS_ClearOperationCallback clears the current operation callback. Obsolete since JavaScript 1.9.1 JS_SetOperationCallbackFunction sets the operation callback without changing the operation limit. Obsolete since JavaScript 1.9.1 JS_GetOperationLimit re...
...s a callback set using JS_SetOperationCallback. JS_ClearOperationCallback clears the current operation callback. Obsolete since JavaScript 1.9.1 JS_SetOperationCallbackFunction sets the operation callback without changing the operation limit. Obsolete since JavaScript 1.9.1 JS_GetOperationLimit returns the current operation limit, or JS_MAX_OPERATION_LIMIT if no operation callback is currently installed. Obsolete since JavaScript 1.9.1 JS_SetOperationLimit sets the operation limit without changing the operation callback. It must be called only when an operation callback is installed. Obsolete since JavaScript 1.9.1 See Also MXR ID Search for JS_SetOperationCallback MXR ID Search for JS_GetOperationCallback MXR ID Search for JS_TriggerOperationCallback JS_SetInterruptCallback JS_GetInt...
nsIMemoryReporterManager
nown. Read only. resident PRInt64 Gets the resident size (that is RSS, physical memory used). This reporter is special-cased because it is interesting, is available on all platforms, and returns a meaningful result on all common platforms. -1 means unknown. Read only. ...
...init() Initializes the memory reporter manager. void init(); Parameters None. ...
...init() Initializes the memory reporter manager. void init(); Parameters None. registerMultiReporter() Requests that memory multi-reporter notifications be sent to the specified objects. ...
nsIMicrosummaryService
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Implemented by: @mozilla.org/microsummary/service;1 as a service: var microsummaryService = Components.classes["@mozilla.org/microsummary/service;1"] .getService(Components.interfaces.nsIMicrosummaryService); Method overview void addGenerator(in nsIURI generatorURI); nsIMicrosummary createMicrosummary(in nsIURI pageUR...
...URI, in nsIURI generatorURI); nsISimpleEnumerator getBookmarks(); nsIMicrosummaryGenerator getGenerator(in nsIURI generatorURI); nsIMicrosummarySet getMicrosummaries(in nsIURI pageURI, in long long bookmarkID); nsIMicrosummary getMicrosummary(in long long bookmarkID); boolean hasMicrosummary(in long long bookmarkID); nsIMicrosummaryGenerator installGenerator(in nsIDOMDocument xmlDefinition); boolean isMicrosummary(in long long bookmarkID, in nsIMicrosummary microsummary); nsIMicrosummary refreshMicrosummary(in long long bookmarkID); void removeMicrosummary(in long long bookmarkID); void setMicrosummary(in long long bookmarkID, in nsIMicrosummary microsummary); Methods addGenerator() Install the micro...
...ookmark, or null if the bookmark does not have a current microsummary. hasMicrosummary() Whether or not the given bookmark has a current microsummary. boolean hasMicrosummary( in long long bookmarkID ); Parameters bookmarkID The bookmark for which to set the current microsummary. Return value Returns a boolean representing whether or not the given bookmark has a current microsummary. installGenerator() Install the microsummary generator in the given XML definition. nsIMicrosummaryGenerator installGenerator( in nsIDOMDocument xmlDefinition ); Parameters xmlDefinition An nsIDOMDocument XML document defining the generator. Return value Returns the nsIMicrosummaryGenerator that was installed. isMicrosummary() Reports whether or not the given microsummary is the current micro...
Troubleshooting XPCOM components registration
e errors in my code" in the Extension FAQs. Registration Failure If the module is loading correctly but doesn't register its components, try adding calls to Components.utils.reportError("Debug me!"); in NSGetModule() and other functions to try and find any errors. General hints You may need to delete compreg.dat in your profile folder to force re-registration. This should not occur if you uninstalled/installed your extension via the Extension Manager. When adding a component to a XULRunner application, change the BuildID in application.ini. If your component requires any external libraries, you may need to read Using Dependent Libraries In Extension Components Make sure you are compiling against the right version. If you are testing with a release from mozilla.org, use the Gecko SD...
... your own Firefox (or XULRunner, etc.), use the artifacts from that compilation to build your component. If you are testing a build from your Linux distribution (or other vendor-supplied build), look for -dev packages from them. Remember to check that the directory the component is in is named correctly i.e. $profile/extensions/$plugindirectory/components! Double check your GUIDs in your install.rdf with your sourcecode, and then check them again. Windows-specific hints Use Dependency Walker to check that your dependent libraries are loaded correctly. In Dependency Walker, open the Options menu and select Configure Module Search Order.... In the bottom right corner of the new dialog, click Browse... and select the directory firefox.exe (or equivalent) is in. In the...
... thread on the matter is located here. The dllmain code that MSVC 8 (and probably earlier versions too) generates for you doesn't need to be there, you can remove it. You may be able build your component using USE_STATIC_LIBS=1 in order to remove C runtime library dependencies. Linux-specific hints Check if you have missing dependent libraries: From your Firefox (/XULRunner) install directory, run "./run-mozilla.sh `which ldd` -r path/to/your/component.so". There should be no "not found" entries and no undefined symbols. (The -r switch from GNU ldd lists function relocations; adjust as suitable for your version) Trace shared library loading by setting the environment variable LD_DEBUG=all while launching Firefox (see `man ld.so` for details). Use strace to see if Fire...
XPCOM ABI
t have a name for it. Note: Platforms This is not an exhaustive list of possible CPU architectures and compiler ABIs. Newest information can always be found by exploring the build system. Note: TARGET_XPCOM_ABI In the Mozilla build system, the variable storing the XPCOM ABI is named TARGET_XPCOM_ABI. (This is an internals detail and should be of no concern to an extension developer.) Extension Installation When the application (e.g. Firefox) is built, the name of the ABI it supports is embedded into it. Later on, it could use this value to check compatibility with third-party binary XPCOM components. A common point of compatibility check is during the installation of extensions. If an extension provides binary XPCOM components, it should declare their XPCOM ABI in the Install Manifest. An ex...
...A common point of compatibility check is during the installation of extensions. If an extension provides binary XPCOM components, it should declare their XPCOM ABI in the Install Manifest. An extension author may build (compile) the XPCOM component for each and every supported machine and pack all the builds into a single XPI, each into its distinctive platform-specific subdirectory. At extension installation time, the application will choose the most fitting component build for its own ABI. If no such build is found, the extension will be deemed incompatible and the application will refuse to install it. If the application doesn't have an XPCOM ABI string (due to the fact that either its CPU architecture or C++ Compiler are unknown, as described in the ABI Naming section), you should use the op...
... ABI. If no such build is found, the extension will be deemed incompatible and the application will refuse to install it. If the application doesn't have an XPCOM ABI string (due to the fact that either its CPU architecture or C++ Compiler are unknown, as described in the ABI Naming section), you should use the operating system's name (without appending the XPCOM ABI) as the platform name in the Install Manifest etc. ...
Building a Thunderbird extension 1: introduction
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. This tutorial will introduce you to the components of a Thunderbird extension and will show you how to build your own. ...
...ent is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. This tutorial will introduce you to the components of a Thunderbird extension and will show you how to build your own. ...
...n (this page) The extension filesystem (setting up your local system) Install manifest (the install.rdf file that contains meta-information about the extension) Chrome manifest (list of packages and overlays) XUL (the XML user interface language that is used to modify the Thunderbird user interface) Adding JavaScript (explains how to add some simple JavaScript to your Thunderbird extension) Installing locally (enabling the extension on your local Thunderbird instance) Packaging (making a distribution package that contains the extension) Distributing (from your own site or from http://addons.mozilla.org/) This tutorial is compatible with Thunderbird versions 2,3 and 5. All Thunderbird builds are available from the ftp site. References and resources Tools and helper extensions There ar...
libmime content type handlers
The primary use of libmime is to parse and render RFC822 messages for use by the Messenger component of Seamonkey. ...
...the components directory for the bin directory). Sample Content Type Handler Plugin To see an example of a Content Type Handler Plugin, the source for the handler of the content type "text/calendar" can be viewed at the following link: Calendar plugin Note: This plugin simply creates a blue...
...the components directory for the bin directory). Sample Content Type Handler Plugin To see an example of a Content Type Handler Plugin, the source for the handler of the content type "text/calendar" can be viewed at the following link: Calendar plugin Note: This plugin simply creates a blue table in the output stream...
ctypes.open
h_myLib = localFilemyLib.path; // "file:///C:/Users/Vayeate/AppData/Roaming/Mozilla/Firefox/Profiles/aecgxse.Unnamed%20Profile%201/extensions/youraddon@jetpack.xpi!/mySubFolder/myCFunctionsForUnix.so" If your add-on is a bootstrap add-on, then you don't need to use this method to convert a chrome:// path; instead, on startup procedure of the bootstrap add-on obtain the File and/or JAR path from installPath from the aData parameter. function startup(aData, aReason) { var nsIFile_folder = aData.installPath; // if addon is unpacked, this will be the addon folder. if addon is packed, this will be addon xpi } This can then be joined with your file name to obtain it's path like this: function startup(aData, aReason) { var jarPath_folder = 'jar:' + OS.Path.toFileURI(aData.installPath.path)...
...tion startup(aData, aReason) { var nsIFile_folder = aData.installPath; // if addon is unpacked, this will be the addon folder. ...
...d with your file name to obtain it's path like this: function startup(aData, aReason) { var jarPath_folder = 'jar:' + OS.Path.toFileURI(aData.installPath.path) + '!/'; // if unpacked is false in install.rdf this will look like: "jar:file:///C:/Users/Vayeate/AppData/Roaming/Mozilla/Firefox/Profiles/aksozfjt.Unnamed%20Profile%2010/extensions/AsyncZip@jetpack!/" var filePath_folder = aData.installPath.path; // if unpacked is set to false in install.rdf this will look like: "C:\Users\Vayeate\AppData\Roaming\Mozilla\Firefox\Profiles\aksozfjt.Unnamed Profile 10\extensions\AsyncZip@jetpack" var filePath_myLib = OS.Path.join(filePath_folder, 'mySubFolder', 'myCFunctionsForUnix.so'); var jarPath_myLib = jarPath_folder + 'mySubFolder/myCFunctionsForUnix.so'; } This can then be opened a...
Debugging service workers - Firefox Developer Tools
registered, you'll see information about it displayed in the Application > Service Workers view (along with any other service workers registered on the same domain): This gives you a variety of information about your service worker: The URL that the service worker is registered on. That last time the service worker was updated (if the service has not been updated, this is when it was first installed). The path to the service worker source file. The server worker's status, which can be one of the following: Stopped: The service worker is installed, but not currently running. When the service worker is stopped, a Start button is provided to start it running, allowing you to trigger the service worker lifecycle. Running: The service worker is running. There are a couple of o...
...this view, too. Unregister On the right-hand side of the Service Workers view there is an Unregister button, which when pressed unregisters the service worker. This is very useful because, once registered, the service worker will not necessarily update to the new version immediately, which can make debugging a pain. From Updating your service worker: If your service worker has previously been installed, but then a new version of the worker is available on refresh or page load, the new version is installed in the background, but not yet activated. It is only activated when there are no longer any pages loaded that are still using the old service worker. As soon as there are no more such pages still loaded, the new service worker activates. Debug Important: The Debug button is currently ena...
...ss to the application (bug 1432311). Finding registered service workers on other domains As mentioned above, the Service Worker view of the Application panel shows all the service workers registered on the current domain. If you want to see a list of information concerning all the service workers registered on your browser, you can visit about:debugging#/runtime/this-firefox. Below the list of installed extensions you'll find a list of all the service workers you have registered. ...
NavigatorPlugins.plugins - Web APIs
In Firefox 29 and later, enumeration of the navigator.plugins array may be restricted as a privacy measure. Applications that must check for the presence of a browser plugin should query navigator.plugins or navigator.mimeTypes by exact name instead of enumerating the navigator.plugins array and comparing every plugin's name. This privacy change does not disable any plugins; it just hides some plugin names from enumeration. Syntax var plugins = navigator.plugins; plugins is PluginArray object used to access Plugin objects either by name or as a list of items. ...
...nction getFlashVersion() { var flash = navigator.plugins.namedItem('Shockwave Flash'); if (typeof flash != 'object') { // flash is not present return undefined; } if(flash.version){ return flash.version; } else { //No version property (e.g. in Chrome) return flash.description.replace(/Shockwave Flash /,""); } } The following example displays information about the installed plugin(s). var pluginsLength = navigator.plugins.length; document.body.innerHTML = pluginsLength + " Plugin(s)<br>" + '<table id="pluginTable"><thead>' +'<tr><th>Name</th><th>Filename</th><th>description</th><th>version</th></tr>' +'</thead><tbody></tbody></table>'; var table = document.getElementById('pluginTable'); for(var i = 0; i < pluginsLength; i++) { let newRow = table.insert...
...A list of plugins is also available by entering about:plugins in the browser's Location bar. Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorPlugins.plugins' in that specification. Living Standard Initial definition. ...
Window - Web APIs
Web › API › Window
on.startTime instead. Window.mozPaintCount Returns the number of times the current document has been rendered to the screen in this window. This can be used to compute rendering performance. Window.orientation Read only Returns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation. Window.pkcs11 Formerly provided access to install and remove PKCS11 modules. Window.returnValue The return value to be returned to the function that called window.showModalDialog() to display the window as a modal dialog. Methods This interface inherits methods from the EventTarget interface and implements methods from WindowOrWorkerGlobalScope and EventTarget. Window.alert() Displays an alert dialog. Window.blur() Sets focus away f...
... a specific type. Window.showModalDialog() Displays a modal dialog. Event handlers These are properties of the window object that can be set to establish event handlers for the various things that can happen in the window that might be of interest. This interface inherits event handlers from the EventTarget interface and implements event handlers from WindowEventHandlers. Window.onappinstalled Called when the page is installed as a webapp. See appinstalled event. Window.onbeforeinstallprompt An event handler property dispatched before a user is prompted to save a web site to a home screen on mobile. Window.ondevicelight An event handler property for any ambient light levels changes Window.ondevicemotion Called if accelerometer detects a change (For mobile devices) Window.onde...
...has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading. load Fired when the whole page has loaded, including all dependent resources such as stylesheets images. Also available via the onload property. unload Fired when the document or a child resource is being unloaded. Also available via the onunload property. Manifest events appinstalled Fired when the browser has successfully installed a page as an application. Also available via the onappinstalled property. beforeinstallprompt Fired when a user is about to be prompted to install a web application. Also available via the onbeforeinstallprompt property. Messaging events message Fired when the window receives a message, for example from a call to Window.postMessage() ...
@font-face - CSS: Cascading Style Sheets
Syntax @font-face { font-family: "Open Sans"; src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); } Descriptors font-display Determines how a font face is displayed based on whether and when it is downloaded and ready to use. font-family Specifies a name that will be used as the font face value for font properties. font-stretch A font-stretch value. ...
... local font is used. Otherwise, the font resource specified using the url() function is downloaded and used. By allowing authors to provide their own fonts, @font-face makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts which are so common that they're considered to be universally available). The ability to specify the name of a locally-installed font to look for and use makes it possible to customize the font beyond the basics while making it possible to do so without relying on an Internet connection. It's common to use both url() and local() together, so that the user's installed copy of the font is used if available, falling back to downloading a copy of the font if it's not found on the user's device. The @font-face at-rule may b...
...nt"> @font-face { font-family: "Bitstream Vera Serif Bold"; src: url("https://mdn.mozillademos.org/files/2468/VeraSeBd.ttf"); } body { font-family: "Bitstream Vera Serif Bold", serif } </style> </head> <body> This is Bitstream Vera Serif Bold. ...
Mobile first - Progressive web apps (PWAs)
hey don't need. See below for more details. A simple example To demonstrate the concepts, I wanted to cover in this article, I created a very simple app containing a nav menu, heading and single column of text. You can see my mobile first example running live, or grab the code to play with it on Github. To make my simple example I created a sample app structure from a Mozilla Mortar template. I installed the Volo automation tool by running the following on the command line sudo npm install -g volo (You'll also need to get Node.js too if you don't already have it) I then created my sample project using volo create myapp mozilla/mortar-app-stub This creates a sample project inside a directory called myapp. The app's code files are inside the www folder. Volo has a number of useful commands a...
...lo build: builds a minified code version of your app, ready for production deployment, in a www-built folder. volo build base=www-built: runs the built version through the server instead of the development version. Built-in features of the Mortar template Mortar templates contain a number of built-in features. In this sample app, I have used a couple of the built-in features to: Include an install button that works for Firefox OS, Firefox Aurora, Chrome and iOS app installs (as explained on the Install GitHub page). To make the install button work, all you have to do is put a <button> on the page with an ID of install-btn. Magic! Selectively include JavaScript libraries according to media query and feature tests (require.js is built in, which is helpful and very easy to use.) HTML struc...
...li> <li><a href="#">Videos</a></li> <li><a href="#">Work</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </nav> <header> <a id="top" href="#bottom">Jump to menu</a> <h1>My article</h1> </header> <div class="main"> <p>Lorem ipsum ... </p> <a id="bottom" href="#top">Back to top</a> </div> </article> <button id="install-btn">Install</button> Default mobile CSS For the CSS, I first added some styles into our app.css stylesheet to provide a reasonable narrow-screen layout. There is very little going on here, and anyone with a basic understanding of CSS should be able to understand most of it by just looking at the source code in app.css. Particular bits of interest to point out are as follows. article { displ...
Program ID - Archive of obsolete content
The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on. When you create an XPI with jpm xpi: if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@". ...
...in the add-on's Install Manifest. The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on. When you create an XPI with jpm xpi: if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@". if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on ID. if the package.json does include an id field, and it does not contain "@", then jpm xpi raises an error and the XPI will not be built. ...
Testing the Add-on SDK - Archive of obsolete content
k repo as an add-on, like cfx xpi would, then runs the add-on like cfx test would. The majority of the tests run here are module unit tests, but there are various other tests included here as well. Note: You must remember to run source bin/activate in order to enable cfx first. With JPM JPM tests all use the new toolkit/loader. ...
...s, but there are various other tests included here as well. Note: You must remember to run source bin/activate in order to enable cfx first. With JPM JPM tests all use the new toolkit/loader. With jpm (which is not part of the add-on sdk repo, and must be installed separately) things more difficult without the Gulp commands provided by the gulpscript.js file in the addon-sdk repo. With gulp installed, and after installing the addon-sdk's npm dependencies, we can run the latter three test suites mentioned for cfx with jpm using the following commands: gulp test:examples --filter <addon_example_folder_name> gulp test:addons --filter <addon_folder_name> gulp test:modules --filter <file_name>:<test_name> or run all of the tests with gulp test. With Travis If you merely make a pull requ...
jpmignore - Archive of obsolete content
in your add-on directory will be included in the xpi file you make with jpm xpi. If your project folder contains a lot of files that aren't necessary for the xpi to run, like documentation, jshint, etc., you can use .jpmignore as a whitelist instead of a blacklist. ...
...odules/** !/package.json !/icon.png !/icon64.png !/COPYING !/bootstrap.js !/install.rdf This would include all editor backup files and similar in the whitelisted subdirectories, to avoid that you can append another blacklist after the whitelist. ...
Troubleshooting - Archive of obsolete content
In those cases you need to use jpm's --binary option. See the jpm guide for more information. ...
...In those cases you need to use jpm's --binary option. See the jpm guide for more information. ...
Tutorials - Archive of obsolete content
Troubleshooting Some pointers for fixing common problems and getting more help. Getting started Walkthrough of creating a simple add-on with the SDK, using jpm. Create user interfaces Add a toolbar button Attach a button to the Firefox Add-on toolbar. Add a menu item to Firefox Add items to Firefox's main menus. Display a popup Display a popup dialog implemented with HTML and JavaScript. ...
...amework. Chrome authority Get access to the Components object, enabling your add-on to load and use any XPCOM object. Creating event targets Enable the objects you define to emit their own events. Listen for load and unload Get notifications when your add-on is loaded or unloaded by Firefox, and pass arguments into your add-on from the command line. Using third-party modules (jpm) Install and use additional modules which don't ship with the SDK itself. Localization Writing localizable code. Mobile development Develop add-ons for Firefox Mobile on Android. Add-on Debugger Debug your add-on's JavaScript. Putting it together Annotator add-on A walkthrough of a relatively complex add-on. ...
File I/O - Archive of obsolete content
DefProfLRt d Location of user profile temporary directories live. DefProfRt d The root of the default profile directory (for example /root/.mozilla). DefRt d %CurProcD%/defaults - The root directory of all defaults directories. The user's desktop directory (for example ~/Desktop on Linux or Mac OS X, C:\Documents and Settings\...
...r's desktop directory (for example ~/Desktop on Linux or Mac OS X, C:\Documents and Settings\username\Desktop on Windows). Desk f DfltDwnld f The default Downloads directory (for example, ~/Downloads on Mac OS X). Home f The user's home directory (for example, /home/username). PrefD f Directory containing user prefs PrfDef d %installation%/defaults/pref ProfD f The profile directory. profDef d The profile defaults of the "current" locale. Should be the first choice. ProfDefNoLoc d %installation%/defaults/profile - The profile defaults of the "default" installed locale. Second choice when profDef is not available. ProfLD f Local Settings on Windows; where the network ...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
ware Distribution: passing a piece of software to another person Modification: modifying the software A typical software license will grant these permissions in return for a fee, and will still restrict some normally unrestricted uses. The software that Microsoft sells, such as Windows, comes with a license that permits only limited duplication in exchange for a fee, so, although customers can install it on their computers, they cannot modify it. And essential freedoms, such as reverse-engineering, are also restricted. This use permit is displayed when you install the software. When the user clicks "I agree," the installation process finishes. Software range of uses Restricted to author Unrestricted Software license >> Usable within permitted scope ...
... licensing." In this situation, the software is released with multiple licenses, and the user decides which one to apply. In most cases, this means GPL and another license with looser restrictions. For example, MySQL is published under a dual license: GPL and a commercial license. OSS license Can duplicate Can distribute Can modify Commercial license Install on one machine only Unauthorized copies prohibited No modifications Payment required Certain uses are permitted depending on which license you choose English version is the official text Nearly all OSS licenses take English as their official texts. Japanese versions, for example, are mentioned only as reference translations. Thanks to the Internet, published so...
Appendix A: Add-on Performance - Archive of obsolete content
Note: See the newer article Performance best practices in extensions for more up-to-date information about how to optimize the performance of your add-on. Add-ons can have a noticeable performance impact on Firefox. This is evident when opening a Firefox profile that has many add-ons installed; some profiles can take minutes to load, which is a serious inconvenience for users that gives them a negative view of Firefox. Add-on developers need to make sure that they minimize their add-ons' performance impact, and here are a few simple guidelines that should be followed to achieve that. Startup This is the area where add-ons have the most noticeable impact. Most add-ons use the load event handler in the main overlay to initialize their objects and sometimes read files or even fetch remote data. ...
...oad event handler. init : function() { let that = this; // run this later and let the window load. window.setTimeout(function() { that.postInit(); }, 500); }, postInit: function() { // actual init code goes here. }, How can you tell it works? The Measuring Startup wiki page includes a relatively simple test you can use to compare a clean Firefox profile vs that profile with your add-on installed. Page Loads This is another critical route that many add-ons tap into. The Intercepting Page Loads section details several techniques to do this, and you should read all of them carefully to figure out which one you need. Some of these events are fired multiple times during a single page load, and having inefficient code in the event handlers can cause a noticeable delay that users may have h...
XPCOM Objects - Archive of obsolete content
XPCOM. The string between the brackets is just an identifier, in this case corresponding to the Observer service. You'll usually know what string to use by reading examples and documentation. There is no comprehensive list of these (that we know of), and that's understandable since it would be a very long list, and it can be extended by add-ons. If you want to see the list in your current Firefox installation, just run the following code in the Error Console: var str = ""; for (var i in Components.classes) { str += i + "\n" }; str A run on Firefox 3.6.2 with a few extensions installed yields 876 strings. That's quite a lot. Luckily, you'll only need to know a handful of those for extension development. The @mozilla.org/ prefix is just a way to keep things namespaced. We would use something ...
... too and it must be different from the IDL UUID), a descriptive name (this isn't used anywhere that we know of), and the contract ID, which is the string you use to get a reference to the component. The ";1" at the end of the string is supposed to indicate the version of the component, although it shouldn't change much. It can be useful if there are multiple incompatible versions of the component installed at the same time. The implementation object itself should be easy to understand. The only aspects to take into account are that methods and attributes must have the same names as their IDL counterparts, and that the QueryInterface method is implemented: QueryInterface : function(aIID) { if (!aIID.equals(Ci.xsIHelloCounter) && !aIID.equals(Ci.nsISupports)) { throw Cr.NS_ERROR_NO_...
XUL School Tutorial - Archive of obsolete content
The project is now published here following its sharing licenses. Its contents have been modified from the original source as necessary. ...
...The project is now published here following its sharing licenses. Its contents have been modified from the original source as necessary. ...
Overlay extensions - Archive of obsolete content
prehensive add-on development tutorial, focusing on Firefox extension development but mostly applicable to other Gecko-based applications. More resources Setting up your environment Setting up the application for extension development. XUL Tutorials and reference for the user interface language used by XUL extensions. Code snippets Sample code for many of the things you'll want to do. Installing extensions How to install an extension by copying the extension files into the application's install directory. Firefox add-ons developer guide A guide to developing overlay extensions. JavaScript code modules JavaScript modules available to extension developers. Extension preferences How to specify the preferences for your extension that will appear in the Add-ons Manager. Extens...
...copying the extension files into the application's install directory. Firefox add-ons developer guide A guide to developing overlay extensions. JavaScript code modules JavaScript modules available to extension developers. Extension preferences How to specify the preferences for your extension that will appear in the Add-ons Manager. Extension packaging How extensions are packaged and installed. Binary Firefox extensions Creating binary extensions for Firefox. ...
List of Mozilla-Based Applications - Archive of obsolete content
onal of Washington, Inc. Dogtag certificate system Uses NSS Dojo JavaScript toolkit Uses Mozilla Rhino in ShrinkSafe Eclipse platform open development platform The AJAX Toolkit Framework, Standard Widget Toolkit and EclipseMozilla projects make use of Mozilla Elixon WCMS/XUL Web Content Management System Fully remote XUL WCMS (no need to install extensions). Entelechy chat bot Uses XULRunner Epic Browser web browser based on Chromium Uses Mozilla NSS and NPAPI libraries eMusic Download Manager music downloader for emusic eMusic Remote music manager Enlis Genome Personal genome browser ESXX JavaScript application server Uses Mozilla Rhino ...
...Nightingale music player Community run effort to continue Songbird support for Linux OLPC Web Browser browser OneTeam Jabber client OpenDocument Viewer viewer OpenGate's tools CD burner, file browser, and hardware diagnostic softwares OpenGate is the OpenSource side of the EasyNeuf project, "A Free Software Computer, Easy and Preinstalled" Open Mashups development tool OpenOffice.org office suite Uses NSS Openswan implementation of IPsec for Linux Uses NSS Orca Browser web browser Gecko-based version of Avant browser Pale Moon web browser Optimized browser developed by Moonchild Productions for GNU/Linux & Windows platforms, originally forked from Firefo...
Source code directories overview - Archive of obsolete content
ough XPCOM is cross-platform). xpfe contains the C interfaces, C code and XUL for implementing the "Cross Platform Front End." Essentially, this is where the Mozilla program starts and manages other components to accomplish tasks. This code contains very little platform dependent code; it relies on other components to provide platform independent interfaces to platform specific functionality. xpinstall contains the C interfaces and code for implementing the SmartUpdate feature from Mozilla Classic. XPInstall provides code for downloading files, uncompressing them and installing them in a platform independent way. xulrunner contains code for XUL Runner. Firefox Firefox is contained in the browser directory app contains contains code to build the firefox executable. base contains the XUL ...
...ns code for XUL Runner. Firefox Firefox is contained in the browser directory app contains contains code to build the firefox executable. base contains the XUL and branding code. components contains Firefox specific components like history, bookmarks, preferences, migration, sidebar.. configcontains build scripts for Firefox. extensions contains code for making certain extensions work. installer contains the Firefox installer code. locales contains the files that are translated for Firefox. themes contains Firefox themes. Toolkit Toolkit is used by the standalone products. components contains the alerts, autocomplete, command line interface, console, cookies, download manager, filepicker, history, password manager, typeaheadfind, view source, etc. content contains XUL specific...
Creating a Skin for Mozilla - Archive of obsolete content
appens when the user right clicks on an image, but you can change the look of the right click menu (Make it blue with pink polka dots, for example). If you want to change the functionality of Mozilla, you'll have to look into modifying the chrome. That is beyond the scope of this document. ...
...of Mozilla, you'll have to look into modifying the chrome. That is beyond the scope of this document. ...
Building Firefox with Rust code - Archive of obsolete content
his page is a rough guide for people using Rust in Firefox. See also the documentation on this topic on the Oxidation wiki page. Adding Rust code We generally target stable Rust, but sometimes issues temporarily require a beta or custom toolchain build. Our goal is to always ship a Firefox release build with a stable Rust toolchain release. If you don't have rust already, use the rustup tool to install it and update as new releases become available, or use the ./mach bootstrap command. The build system will generate a special 'rust unified library' crate, compiled to a static library (libgkrust.a) which is in turn linked into XUL, so all public symbols will be available to C++ code. If you have new Rust libraries that code in libxul calls directly, then you should add the appropriate extern c...
...ed/Cargo.toml: [dependencies] e10s = { path = "../../../../path/from/srcdir/e10s" } The e10s crate must also be checked into the tree at the appropriate path. If the e10s crate depends on any other crates, their sources must also be checked into the tree, and e10s's Cargo.toml must have path attributes for each of its dependencies, and so on. This is automated by the mach vendor command, which installs the dependencies in third_party/rust. Be sure the licenses of all dependent crates are compatible. Cargo.lock files have also been checked in, so you will need to update those as well when appropriate. Crates for unit tests can be added in a similar fashion to the files in toolkit/library/gtest/rust/. If your crate has optional features that aren't normally turned on, you are strongly e...
JavaScript Client API - Archive of obsolete content
om add-ons; tread carefully. The best, and most up-to-date, reference to Sync's internal APIs is the source code. Please note that usage of the Sync APIs is governed by a terms of service: By accessing or using the Firefox Sync APIs in connection with the development of your own client software to access the Firefox Sync services (a "Third Party Client"), you acknowledge that you will need to install and use a local version of the Firefox Sync server for multiple account testing and that any use of Mozilla's hosted Firefox Sync services is subject to Mozilla's Firefox Sync Terms of Service at https://services.mozilla.com/tos/. Further, you agree (a) to maintain and link to (including on websites from which your Third Party Client may be downloaded) a separate, conspicuous, and reasonably de...
...t all; the prototype simply defines some metadata such as the Store and Tracker classes to use, and the human-readable name that will be used in the log files to identify errors and status messages coming from this engine. (Don't forget that you'll need to import Weave. So the top of your file should include:) const Cu = Components.utils; // etc... Cu.import("resource://services-sync/main.js"); Installing your classes into Sync You can register your engine in an "weave:service:ready" observer using the Weave.Engines.register(FooEngine) function. However, "weave:service:ready" is issued after the "weave:engine:start-tracking" observer notification. If your tracker observes "weave:engine:start-tracking", it's best to have the Sync service register your engine. Stick your engine class on to the W...
GRE - Archive of obsolete content
The framework for embedding Mozilla technologies was at one point called the GRE (Gecko Runtime Environment). This embedding framework allows applications to locate a compatible Gecko runtime and embed it without knowing in advance where that runtime will be installed. This document describes how embedders should dynamically link to a GRE. To understand how GREs are registered, see GRE Registration. The XRE project, which means "XUL Runtime Environment", has been replaced by XULRunner. Mozilla Suite: the old GRE There are two different forms for the GRE: the "old" GRE was part of the Mozilla application suite. It was installed with the Windows installer of Mozilla 1.4 through 1.7.x. There was never an official GRE shipped for Linux, but various distributors such as Red Hat have registe...
...The Mozilla suite never supported a GRE on Mac. ...
Isp Data - Archive of obsolete content
This page applies to Thunderbird (Mail/News). Introduction These files allow for adding to the New Account wizard a new option, and help with, among other things, deployment of custom Thunderbird. Tools needed The files are simple text files, in UTF-8 encoding, so use your favorite modern text editor. A working install of Thunderbird is also handy for testing. ...
...le that you can place in the $INSTALLFOLDER/default/isp to do a variety of things. This page applies to Thunderbird (Mail/News). Introduction These files allow for adding to the New Account wizard a new option, and help with, among other things, deployment of custom Thunderbird. Tools needed The files are simple text files, in UTF-8 encoding, so use your favorite modern text editor. A working install of Thunderbird is also handy for testing. Getting Started First take a look at the number of examples available: http://infosec.ufl.edu/tbird/Gatorlink.xml mailnews/base/ispdata/aol.rdf See the Thunderbird ISP hooks for more details. ...
Java in Firefox Extensions - Archive of obsolete content
(this works in firefox 3.x, for firefox 4.x use AddonManager.getAddonByID) var extensionPath = Components.classes["@mozilla.org/extensions/manager;1"]. getService(Components.interfaces.nsIExtensionManager). getInstallLocation("test@yoursite"). // guid of extension getItemLocation("test@yoursite"); //The path logic would work if we include em:unp...
... j++) { policy.addURL(urls[j]); } }catch(e) { alert(e+'::'+e.lineNumber); } } //Get extension folder installation path... (this works in firefox 3.x, for firefox 4.x use AddonManager.getAddonByID) var extensionPath = Components.classes["@mozilla.org/extensions/manager;1"]. getService(Components.interfaces.nsIExtensionManager). getInstallLocation("test@yoursite"). // guid of extension getItemLocation("test@yoursite"); //The path logic would work if we include em:unpack for ff 4.x, for ff 3.x since things are unpacked by default things work // Get path to the JAR files (the following assumes your JARs are within a // directory called "java" at the root of your extension's folder hierarchy) // You must add this utilit...
Me - Archive of obsolete content
Archive › Mozilla › Jetpack › Meta › Me
the blog post announcing the first SDK release for what we're up to next! The jetpack.me namespace provides mechanisms for introspecting the dynamic state of your jetpack. The namespace currently lives in the future and must be imported before it is used: jetpack.future.import("me"); Methods onFirstRun(funcfunction)jetpack.me.onFirstRun() allows jetpacks to be notified after they are successfully installed. onFirstRun() accepts a callback which is called after installation. Note that this mechanism is independent of the first-run page; in particular, the callback is not a load event listener or jQuery ready callback. onFirstRun() may be called anywhere in your jetpack, but if it is called as the result of some asynchronous operation such as a timeout or XMLHttpRequest, it is ignored. If you call ...
... anywhere in your jetpack, but if it is called as the result of some asynchronous operation such as a timeout or XMLHttpRequest, it is ignored. If you call it multiple times, all but the final call are ignored. funcA function. it takes no paramenters. Inside the function, this is the jetpack's content.function Example jetpack.me.onFirstRun(function(){ jetpack.notifications.show("Oh boy, I'm installed!");}); ...
Measuring add-on startup performance - Archive of obsolete content
This article describes an add-on that is no longer supported. Using about:startup The About Startup add-on provides a much simpler way to measure startup performance. Once installed, it will gather startup data and display it in the about:startup page. The add-on is very lightweight, so it shouldn't have a noticeable negative effect on your baseline and add-on tests. To test with about:startup, you should set up a new Firefox profile, install this add-on, and then open and quit Firefox repeatedly. If you want to match Talos, you should do this 20 times. Then look at the results in the about:startup page. This should provide your baseline numbers. Then repeat the process with both About Startup and your add-on installed. The overhead can be calculated using the same formula. The abou...
...The firstPaint time should be roughly similar to what Talos tests. ...
Configuration - Archive of obsolete content
the Prism host window. Here is the list of parameters: id the unique name of this web application. Remember that other people can create different webapps using the same uri and this webapp is only your particular instance or mashup. So make sure the identifier is not only unique to the web application, but also to you. This identifier becomes the name of the profile folder where your webapp is installed: google.mail@your.name uri the uri/url of the web app: http://mail.google.com name the display name of the application: Gmail icon the icon you want to use for the Prism window when running this web app. The actual icon file should be stored in the webapp bundle. status turns the status messages on or off for this web app: yes or no location turns the readonly location bar on or off for this ...
...icates that a system tray (notification area) icon should be displayed for the application on Windows: yes or no. iconic Specifies that the application should be opened in iconic state. Currently support only on Windows in conjunction with the trayicon, causes the application to open minimized to the system tray: yes or no. Launch Prism with -webapp [bundle] to load the specified web profile and install the webapp to your Prism profile folder. Once the webapp is installed, it can be launched using -webapp [webapp-id] and Prism will skip the installation and run the webapp directly. Any of the profile parameters can also be passed directly on the command line as well. Example Here is an example of a webapp.ini profile: [Parameters] name=Gmail id=google.mail@developer.mozilla.org uri=https://mail.
Prism - Archive of obsolete content
(like higher resolution icons). Refractor automatically takes this information into account. Documentation Frequently Asked Questions Bundles A web application bundle is a zip archive that holds a configuration file, icons and an optional webapp JS script. Bundles can be installed locally, or directly from a website using the Prism for Firefox extension. Configuration A webapp bundle should contain a webapp.ini configuration file. The configuration file is a simple, INI-style text file that specifies some parameters about a web application. Styling One of Prism's goals is to make ...
...ng Prism allows for some client-side web application customization. Some simple objects and utilities are exposed to webapp scripts. Host Window Prism provides a simple, scaled down browser window for running web applications. Using configuration files and webapp scripting, the host window can be modified. Installer Installing Prism. View All... Community Blog Posts Prism forum #prism on irc.mozilla.org Goodies Bundle Library Contributing Source code in SVN Bugzilla (for bugs and suggestions) open bugs, enter new bug ...
Static Analysis for Windows Code under Linux - Archive of obsolete content
_options --enable-default-toolkit=cairo-windows mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mozilla-mingw # Mozilla trunk uses many Vista only features on Windows, so we should disable some components to make it buildable with mingw32. ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --disable-tests ac_add_options --disable-embedding-tests ac_add_options --disable-installer ac_add_options --disable-accessibility ac_add_options --disable-vista-sdk-requirements ac_add_options --disable-updater #change this to where your libIDL-config file locate. HOST_LIBIDL_CONFIG=/usr/bin/libIDL-config #Config your moztools position GLIB_PREFIX=$HOME/moztools LIBIDL_PREFIX=$HOME/moztools #disable xpcom stdcall calling convention because of gcc 4.3.0 bug CPPFLAGS="-DMOZ_DISABLE...
...#change this to where your libIDL-config file locate. HOST_LIBIDL_CONFIG=/usr/bin/libIDL-config #Config your moztools position GLIB_PREFIX=$HOME/moztools LIBIDL_PREFIX=$HOME/moztools #disable xpcom stdcall calling convention because of gcc 4.3.0 bug CPPFLAGS="-DMOZ_DISABLE_XPCOM_STDCALL" #Specify the CXX and static analysis #Point CXX to the cross compile g++ with plugin support CXX=$HOME/mingw-install/bin/i686-mingw32-g++ ac_add_options --with-static-checking=$HOME/dehydra/dehydra-gcc/gcc_dehydra.so Then, you can start building your Mozilla. The static check will be done when compiling is going on. Troubles You can post any question about static check to the mozilla.dev.static-analysis newsgroup and any question about cross compiling to the mozilla.dev.builds newsgroup. ...
Table Layout Regression Tests - Archive of obsolete content
++WEBSHELL == 1 ++DOMWINDOW == 1 ++WEBSHELL == 2 ++DOMWINDOW == 2 Note: styleverifytree is disabled Note: frameverifytree is disabled Note: verifyreflow is disabled ++WEBSHELL == 3 ++DOMWINDOW == 3 Running baseline test for E:\moz_src\mozilla\layout\html\tests\block\rtest.lst. Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\width-fixed_html.rgd Writing regre...
...ine\pre1_html.rgd The second verify run creates first the frame dumps in the verify subdirectories (verify) and compares each frame dump with the corresponding reference frame dump. If they differ in critical points the test fails. A typical part of the verify log would look like: Type Manifest File: e:\moz_src\mozilla\obj-i586-pc-msvc\dist\bin\components\xpti.dat +++ JavaScript debugging hooks installed. ++WEBSHELL == 1 ++DOMWINDOW == 1 ++WEBSHELL == 2 ++DOMWINDOW == 2 Note: styleverifytree is disabled Note: frameverifytree is disabled Note: verifyreflow is disabled ++WEBSHELL == 3 ++DOMWINDOW == 3 Running verify test for E:\moz_src\mozilla\layout\html\tests\block\rtest.lst. Writing regression data to E:\moz_src\mozilla\layout\html\tests\table\core\verify\standards1.rgd Comparing to regression...
Venkman - Archive of obsolete content
Venkman is the code name for Mozilla's JavaScript Debugger. It aims to provide a powerful JavaScript debugging environment for Mozilla based browsers namely Firefox, Netscape 7.x/9.x and SeaMonkey. Note that it is not included in the Gecko-based browsers such as K-Meleon, Galeon and Netscape 8.x. Venkman has been provided as part of the Mozilla install distribution since October 2001, as well as an extension package in XPI format. Documentation Venkman Introduction An overview and some practical examples of using the JavaScript Debugger in Web development. Using Breakpoints in Venkman This article describes breakpoints in JavaScript and how to use Venkman to set and examine breakpoints. Learning the JavaScript ...
... fully cross-platform. Venkman is named after the character Dr. Peter Venkman, played by Bill Murray in the movies Ghostbusters and Ghostbusters II. Getting Venkman Firefox and Thunderbird The latest version of JavaScript Debugger is available from Firefox Add-ons. Mozilla Suite and SeaMonkey These releases come with Venkman pre-installed. On Windows, it is an install option; choose Advanced install. Also available from Firefox Add-ons as an extension. Nvu and KompoZer JavaScript Debugger extension version 0.9.84 is available from Nvu's downloads page. We encourage you to use the latest available version 0.9.87.1 (or higher) with Firefox instead. Source Code The source code for Ven...
File.windowsShortcut - Archive of obsolete content
File.windowsShortcut In this example, the windowsShortcut method is used to add a shortcut in the Program directory ("Program" is a keyword for the directory in which the program itself is installed, for example, C:\Program Files\Netscape\Netscape 6\" on Windows) to Windows software (misc.exe) that is installed in the "Windows" directory. var xpiSrc = "misc.exe"; var vi = "1.1.1.1"; initInstall( "Windows Shortcut", "test", vi, 0); f = getFolder("Windows"); g = getFolder("Temporary"); addFile( "miscshortcut", "2.2.2.2", xpiSrc, f, xpiSrc, true); target = getFolder(f, xpiSrc); shortcutpath = getFolder("Program"); err = File.windowsShortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logComment("file.windowsShortcut returns: " + err); if (0 =...
...est", vi, 0); f = getFolder("Windows"); g = getFolder("Temporary"); addFile( "miscshortcut", "2.2.2.2", xpiSrc, f, xpiSrc, true); target = getFolder(f, xpiSrc); shortcutpath = getFolder("Program"); err = File.windowsShortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logComment("file.windowsShortcut returns: " + err); if (0 == getLastError()) performInstall(); else cancelInstall(); ...
Methods - Archive of obsolete content
The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods dirCreate Creates a new directory. dirGetParent Returns an object representing the parent directory. dirRemove Removes a directory. dirRename Renames the specified directory. copy Makes a copy of the specified file. diskSpaceAvailable Returns the amount of disk space available in bytes. ...
...irGetParent Returns an object representing the parent directory. dirRemove Removes a directory. dirRename Renames the specified directory. copy Makes a copy of the specified file. diskSpaceAvailable Returns the amount of disk space available in bytes. exists Returns a boolean value indicating whether the specified file exists or not. execute Queues a file for executing as part of the installation process. isDirectory Returns a boolean value indicating whether an object is a directory. isFile Returns a boolean value indicating whether an object is a file. modDate Returns a number representing the last modified date of the given file. modDateChanged Specifies whether the last modification on a file is older than a specified date move Moves a file from one location to another.
Methods - Archive of obsolete content
...
... ...
deleteRegisteredFile - Archive of obsolete content
Returns An integer error code. For a list of possible values, see Return Codes. ...
...n Codes. Description The deleteRegisteredFile method deletes the specified file and removes the file's entry from the Client Version Registry. If the file is currently being used, the name of the file that is to be deleted is saved and Netscape 6 attempts to delete it each time it starts up until the file is successfully deleted. This method is used to delete files that cannot be removed by the uninstall method or to remove files that are no longer necessary or whose names have changed. ...
getComponentFolder - Archive of obsolete content
getComponentFolder Returns an object representing the directory in which a component is installed. Method of Install object Syntax Object getComponentFolder (String registryName); Object getComponentFolder ( String registryName, String subDirectory); Parameters The getComponentFolder method has these parameters: registryName The pathname in the Client Version Registry for the component whose installation directory is to be obtained. subDirectory A string that specifies the name of a subdirectory. If the specified subdirectory doesn't exist, it is created. ...
...Version Registry for the component whose installation directory is to be obtained. subDirectory A string that specifies the name of a subdirectory. If the specified subdirectory doesn't exist, it is created. This parameter is available in Netscape 6 and may be case sensitive (depending on the operating system). Returns An object representing the directory in which the component is installed, or NULL if the component could not be found or if subDirectory refers to a file that already exists. Description The getComponentFolder method to find the location of a previously installed software package. Typically, you use this method with the addFile method or the addDirectory method. ...
getFolder - Archive of obsolete content
There are two sets of possible values for this parameter. The first set contains platform-independent locations; the second set contains platform-specific locations. You are encouraged to use the platform-independent locations. ...
...en the subDirectory parameter is used. It must be in file: URL format minus the "file:///" part. For example, mydir = getFolder("file:///", "c|/mysoftco/somedir"); Note that forward slashes are used, regardless of the platform. The folders whose names start with "Win", "Mac", or "Unix" are specific to those platforms. You should be careful about using one of those directories, as it makes your installation platform-specific. Example To get an object representing the standard plug-ins directory, you would use this call: plugindir = getFolder("Plugins"); ...
getLastError - Archive of obsolete content
This method allows you to defer checking for error codes each time you call addFile or addDirectory until the last addFile or addDirectory call. The getLastError method does not return errors from methods that return objects, such as getFolder. ...
...This method allows you to defer checking for error codes each time you call addFile or addDirectory until the last addFile or addDirectory call. The getLastError method does not return errors from methods that return objects, such as getFolder. ...
loadResources - Archive of obsolete content
Returns A JavaScript object whose property names are the keys from that file and whose values are the strings. Description The format of the properties file expected by loadResources is the same as that of the chrome locale .properties files. This method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file. ...
...ources is a string representing the path to the properties file in the XPI in which the key/value pairs are defined. Returns A JavaScript object whose property names are the keys from that file and whose values are the strings. Description The format of the properties file expected by loadResources is the same as that of the chrome locale .properties files. This method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file. Be aware that the parameter specifies the file within the XPI and not on the file system, as the following example demonstrates. Example Given a XPI with this internal structure: install.js bin/res_eg_2.properties bin/somefile.exe bin/... The following lines retrieve the properties as a JavaScript ob...
setPackageFolder - Archive of obsolete content
setPackageFolder Sets the default package folder. Method of Install object Syntax void setPackageFolder ( Object folder); Parameters The setPackageFolder method has the following parameter: folder An object representing a directory. You create this object by passing a string representing the directory to the getFolder or getComponentFolder method. Returns None. Description The setPackageFolder method to set the default package folder that is saved with the root node. When the package folder is set, it is used as the default for forms of addFile and other methods that have an optional localDirSpec parameter. You should only call this method once, and you should always call it immediately after you call initInstall. If you call setPackageFolder multiple times, the last f...
... ...
Accessing Files - Archive of obsolete content
rting Directories The examples above use the profile directory 'Profile' as the starting directory for locating a file. There are several other values which may be used as the first argument to nsIScriptableIO.getFile(), listed in the following table. Application The directory of the executing application. For Firefox, for instance, this will be the directory where Firefox is installed. For a XULRunner application, this will be the directory where the application is installed. Working The current working directory. If the application was launched from a command line, for instance, this will be the directory where the application was launched from, which may be different from the 'Application' value. Profile The profile directory whe...
... the directory where the application was launched from, which may be different from the 'Application' value. Profile The profile directory where preferences are stored. Desktop The desktop directory. Usually, you would use this as the default directory for saving files. Components The components directory where XPCOM components are installed. Temp The temporary directory. You would store any temporary or cache files here. There are a number of other values that may be used, most of which are platform specific. For instance, on Windows, the value 'Strt' returns the Start directory, where applications which run when the system starts up are placed. On other platforms, using this value will just result i...
Printing from a XUL App - Archive of obsolete content
This document will talk about PrintUtils, and the ways that XUL applications can trigger print-related behaviors. ...
... This document will talk about PrintUtils, and the ways that XUL applications can trigger print-related behaviors. ...
Adding Style Sheets - Archive of obsolete content
many cases, it will suffice to leave the defaults as is. Other times, however, you will want to provide a custom style sheet. In general, you will associate a single style sheet with each XUL file. You can place a style sheet anywhere you wish. If your XUL file is stored remotely and accessed via an HTTP URL, you can store the style sheet remotely as well. If you are creating a XUL package to be installed as part of the chrome system, you have two choices. First, you could store the style sheet in the same directory as the XUL file. This method has the disadvantage because it means your application will not be themeable. The second method involves placing your files as part of a theme. Let's assume that we are building the find files dialog for themeability, because the find files dialog can ...
...ally the best thing to do. It is much better to create a separate style sheet. The reason is so that different looks, or skins, can be applied easily. There may be certain cases where the style attribute is acceptable. An example would be when a script changes the style, or where a difference in layout might change the meaning of the element. However you should avoid this as much as possible. For installed files, you'll have to create or modify a manifest file and install the skin. Our Find Files Dialog Example Let's modify the find files dialog so that its style comes from a separate style file. First, the modifed lines of findfile.xul: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="findfile.css" type="text/css"?> ... <spacer class="titlespace"/> ...
Using the Editor from XUL - Archive of obsolete content
ternational text input) events. In order to receive these events, the editor registers several event listeners on the document being edited. In addition, editor actions in the user interface are propagated via the XUL and JavaScript, and call methods on the nsEditorShell. This editor command dispatching is described separately. The following event listeners are registered: In nsHTMLEditor::InstallEventListeners(), we install the following. These get installed for all types of editor (i.e. for text widgets and composer): nsTextEditorKeyListener (as a nsIDOMKeyListener) nsTextEditorMouseListener (as a nsIDOMMouseListener) nsTextEditorFocusListener (as a nsIDOMFocusListener) nsTextEditorTextListener (as a nsIDOMTextListener) nsTextEditorCompositionListener (as a nsIDOMCompo...
...This only happens for situations where the nsEditorShell is used (i.e. not for text widgets): nsEditorShellMouseListener (as a nsIDOMMouseListener) Note: Starting in Gecko 12, the editor refuses any events sent by unprivileged content. nsTextEditorKeyListener This event listener handles key presses for typing, and other editing operations (backspace, d...
Writing Skinnable XUL and CSS - Archive of obsolete content
Each package has its own skin, CSS files and images that determine the appearance of that package. In our particular Mozilla skin, there is a special package calledglobal. This package contains a special skin called theglobal skin. If you wish for your package to blend in with the other packages, then the skin for your package should inherit information from the global skin in order to reduce the amount of duplication across packages and in order to make the UI as a whole easier to skin. ...
...e fountain) to load a skin file from XUL that is not found in your package. For example, a Navigator XUL file should never load the global skin or a Sidebar skin. XUL files never explicitly load files from other packages unless the presence of the other packages can be guaranteed. For example, a Navigator XUL file can only load a Sidebar overlay explicitly if the Sidebar UI is always going to be installed with navigator. If it is possible that the sidebar is a separate component that could be installed or uninstalled, then the overlaying should not occur in the XUL file. It should instead take place through the chrome registry. Examples of overlays that should take place using the chrome registry include the security padlock icon and any Messenger UI in the Navigator window. style="..." is proh...
XUL Application Packaging - Archive of obsolete content
See Command Line Options for more details. Note: For instructions on deploying your applications see Deploying XULRunner. ...
...See Command Line Options for more details. Note: For instructions on deploying your applications see Deploying XULRunner. ...
XULRunner - Archive of obsolete content
XULRunner also provides libxul, a solution which allows the embedding of Mozilla technologies in other projects and products. Releases Until version 41, XULRunner could be downloaded from ftp.mozilla.org. ...
...XULRunner also provides libxul, a solution which allows the embedding of Mozilla technologies in other projects and products. Releases Until version 41, XULRunner could be downloaded from ftp.mozilla.org. ...
ant script to assemble an extension - Archive of obsolete content
r "chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="Assemble the final build blogmark.xpi"> <zip destfile="blogmark-${VERSION}.xpi"> <zipfileset dir="." includes="chrome/blogmark.jar" /> <zipfileset dir="." includes="install.rdf" /> </zip> </target> Everything inside the chrome directory is zipped into chrome/blogmark.jar <target name="createjar" depends="templates" description="Assemble the jar"> <jar destfile="chrome/blogmark.jar"> <fileset dir="chrome/"> <include name="**/*"/> ...
... tofile="chrome/content/blogmark/about.xul" overwrite="true"> <filterchain> <replacetokens> <token key="VERSION" value="${VERSION}"/> </replacetokens> </filterchain> </copy> <copy file="install.rdf.tpl.xml" tofile="install.rdf" overwrite="true"> <filterchain> <replacetokens> <token key="VERSION" value="${VERSION}"/> <token key="DESCRIPTION" value="${DESCRIPTION}"/> </replacetokens>...
mozilla.dev.platform FAQ - Archive of obsolete content
FAQ for questions asked on mozilla.dev.platform XULRunner Q: XULRunner on Mac OS X A: Instead of using /path/to/xulrunner-bin.ini, applications on a Mac must be in an application bundle (Foo.app). Then unpack the XUL app into the Mac structure with xulrunner -install-app Q: Can you build XULRunner with newer (>1.5) features, such as storage? A: XULRunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> Q: Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. 0x00016b50 in XRE_CreateAppData () A: When you <tt>--disable-libxul</tt>, the XPCOM glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>. In order to use XR suc...
...the dependent libraries like <tt>libgfx.dylib</tt>. In order to use XR successfully in <tt>--disable-libxul</tt> mode, you have to setup DYLD_LIBRARY_PATH to include <tt>/Library/Frameworks/XUL.framework/Versions/1.9a1</tt> - Benjamin Smedberg, Fri, Oct 20 2006 9:12 am Q: When I try to build a completely standalone XUL app on OS X (10.4.8). took an Foo.app directory created with xulrunner-bin --install-app and tried to copy (using rsync -rl) the XUL.framework directory into a Frameworks directory in the .app bundle and then deleting the XUL.framework directory from /Library/Frameworks, my running my app fails silently. It works fine when the XUL.framework is installed in /Library/Frameworks. Any suggestions? " A: Make sure the app can find the Framework or you can use the packages of the Firefo...
Mozprofile - Archive of obsolete content
This documentation is no longer maintained. Please see the maintained documentation of mozprofile at http://mozbase.readthedocs.org/en/latest/mozprofile.html. Mozprofile is a python tool for creating and managing profiles for Mozilla's applications (Firefox, Thunderbird, etc.). In addition to creating profiles, mozprofile can install addons and set preferences. Mozprofile can be utilized from the command line or as an API. Command Line Usage mozprofile may be used to create profiles, set preferences in profiles, or install addons into profiles. The profile to be operated on may be specified with the --profile switch. If a profile is not specified, one will be created in a temporary directory which will be echoed to the terminal: (mozmill)> mozprofile /tmp/tmp4q1iEU.mozrunner (mozmill...
...> ls /tmp/tmp4q1iEU.mozrunner user.js To run mozprofile from the command line enter: mozprofile --help for a list of options. API Usage To use mozprofile as an API you can import mozprofile.profile and/or the AddonManager. mozprofile.profile features a generic Profile class. In addition, subclasses FirefoxProfile and ThundebirdProfile are available with preset preferences for those applications. Installing Addons Addons may be installed individually or from a manifest. Example: from mozprofile import FirefoxProfile # create new profile to pass to mozmill/mozrunner profile = FirefoxProfile(addons=["adblock.xpi"]) Setting Preferences Preferences can be set in several ways: using the API: You can pass preferences in to the Profile class's constructor: obj = FirefoxProfile(preferences=[("accessi...
NPAPI plugin developer guide - Archive of obsolete content
For example, the Adobe Flash plug-in is used to access Flash content (including videos and certain interactive applications), and the QuickTime and RealPlayer plugins are used to play special format videos in a web page. Important: Plugins are now a legacy technology. They are not available on most mobile devices. Mozilla encourages website developers to avoid using plugins wherever possible. ...
...lug-ins Registering Plug-ins MS Windows Unix Mac OS X Drawing a Plug-in Instance Handling Memory Sending and Receiving Streams Working with URLs Getting Version and UI Information Displaying Messages on the Status Line Making Plug-ins Scriptable Building Plug-ins Building, Platforms, and Compilers Building Carbonized Plug-ins for Mac OS X Type Libraries Installing Plug-ins Native Installers XPI Plug-ins Installations Plug-in Installation and the Windows Registry Initialization and Destruction Initialization Instance Creation Instance Destruction Shutdown Initialize and Shutdown Example Drawing and Event Handling The NPWindow Structure Drawing Plug-ins Printing the Plug-in Setting the Window Getting Information ...
NPN_ReloadPlugins - Archive of obsolete content
<< Gecko Plugin API Reference << Browser Side Plug-in API Summary Reloads all of the installed plugins. Syntax #include <npapi.h> void NPN_ReloadPlugins(NPBool reloadPages);code Parameters The function has the following parameter: reloadPages Whether to reload pages. If true, all pages are reloaded once the plugins are reloaded; otherwise, they aren't. Description NPN_ReloadPlugins() reads the Plugins directory for the current platform and reinstalls all of the plug-ins it finds there. Normally, if you add or remove any plug-ins, the browser does not see them until you restart Gecko. ...
... reloadPages Whether to reload pages. If true, all pages are reloaded once the plugins are reloaded; otherwise, they aren't. Description NPN_ReloadPlugins() reads the Plugins directory for the current platform and reinstalls all of the plug-ins it finds there. Normally, if you add or remove any plug-ins, the browser does not see them until you restart Gecko. NPN_ReloadPlugins() lets you install a new plug-in and load it, or to remove a plug-in, without having to restart the browser. You could use this function as part of the plug-in's installation process. See also NPN_Version() ...
Introduction to Public-Key Cryptography - Archive of obsolete content
nded by the International Telecommunications Union (ITU), an international standards body, since 1988. Users don't usually need to be concerned about the exact contents of a certificate. However, system administrators working with certificates may need some familiarity with the information provided here. Certificate Data Formats Certificate requests and certificates can be created, stored, and installed in multiple formats: binary and text. All of these formats conform to X.509 standards. Three examples of binary formats are DER-encoded certificates, PKCS #7 certificate chains, and Netscape Certificate Sequence. Any of the binary formats can be imported in text form, which begins with the line: -----BEGIN CERTIFICATE----- Following this line is the certificate data, which can be in any of th...
... RAs can be helpful in scaling an PKI across different departments, geographical areas, or other operational units with varying policies and authentication requirements. Original Document Information Author(s): Ella Deon Lackey Last Updated Date: 2012 Copyright Information: (C) 2012 Red Hat, Inc. Link: Red Hat Certificate System Common Criteria Certification 8.1: Deployment, Planning, and Installation ...
Using SSH to connect to CVS - Archive of obsolete content
s a guide to setting up access to cvs.mozilla.org using SSH. This document assumes that you already have a write-access CVS account to cvs.mozilla.org. Anonymous/read-only access via SSH is not available at this time. Please see our source code page for directions accessing read-only CVS, and our getting write access page for directions on obtaining write access. Generating an SSH key First, install ssh. Most Linux, BSD, and OSX distributions come with it installed already. Cygwin makes ssh available on Windows if you install the openssh package from the Net category. If all else fails, OpenSSH is a widely used and highly portable implementation. The following command should generate a suitable key pair: ssh-keygen -t dsa This will take a moment, followed by a prompt for a passphrase. Onc...
... can access cvs.mozilla.org from the open Internet. If you are behind a firewall with an http tunneling proxy, you can use a program called corkscrew, in combination with the ProxyCommand ssh config directive to continue to access the mozilla CVS server. This technique was taken from Eric Engstrom's site, but the instructions have been re-written specifically for Mozilla. Download, build, and install corkscrew by following the instructions in the INSTALL file in the corkscrew source distribution. Corkscrew uses the standard "./configure; make install" technique common to many open source projects. Make sure you have a ~/.ssh/config file that has at least the following directives PreferredAuthentications hostbased,publickey,password Host cvs.mozilla.org ProxyCommand corkscrew <i>proxyserv...
Visual typescript game engine - Game development
Visual Studio Code. Luanch debugger configuration comes with this project. Physics engine based on Matter.js. Multiplatform video chat (for all browsers) implemented. SocketIO used for session staff. MultiRTC2 used for data transfer also for video chat. MultiRTC3 alias 'broadcaster' used for video chat. Client part To make all dependency works in build process we need some plugins. npm install npm run build Navigate in browser /build/app.html to see client app in action -The client part is a browser web application. No reloading or redirecting. This is a single page application. I use HTML request only for loading local/staged HTML (like register, login etc.). Networking is based on WebSocket full-duplex communication only.You must be conform with classic socket connection methodo...
...Node.js is the best options. For email staff, I choose: npm I Gmail-send. -Run services database server (Locally and leave it alive to develop process): npm run dataserver Looks like this : mongod --dbpath ./server/database/data Fix: "failed: address already in use" : netstat -ano | findstr :27017 taskki...
Organizing your CSS - Learn web development
start to work on larger stylesheets and big projects you will discover that maintaining a huge CSS file can be challenging. In this article we will take a brief look at some best practices for writing your CSS to make it easily maintainable, and some of the solutions you will find in use by others to help improve maintainability. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn some tips and best practices for organizing stylesheets, and find out about some of the naming conventions and tools in common usage to help with CSS organization and team working. Tips to keep your CSS tidy Here are some...
...s. A pre-processor runs over your raw files and turns them into a stylesheet, whereas a post-processor takes your finished stylesheet and does something to it -- perhaps to optimize it in order that it will load faster. Using any of these tools will require that your development environment can run the scripts that do the pre and post-processing. Many code editors can do this for you, or you can install command line tools to help. The most popular pre-processor is Sass. This is not a Sass tutorial, so I will briefly explain a couple of the things that Sass can do, which are really helpful in terms of organisation, even if you don't use any of the other Sass features. If you want to learn a lot more about Sass, start with the Sass basics article, then move on to their other documentation. Defin...
How can we design for all types of users? - Learn web development
color that contrasts well with the background color. Make it extra easy to read the text, to help visually-impaired people and people using their phones on the street. The W3C defines a good color mix with an algorithm that calculates luminosity ratio between foreground and background. The calculation may seem pretty complicated, but we can rely on tools to do the job for us. Let's download and install the Paciello Group's Colour Contrast Analyser. Note: Alternatively you can find a number of contrast checkers online, such as WebAIM's Color Contrast Checker. We suggest a local checker because it comes packaged with an on-screen color picker to find out a color value. For instance, let's test the colors on this page and see how we fare in the Colour Contrast Analyser: The luminosity contr...
...ext to index your contents. For all these reasons, please provide a text transcript of the video/audio file. Image compression Some users may choose to display images, but still have limited bandwidth available, especially in developing countries and on mobile devices. If you want a successful website, please compress your images. There are various tools to help you, either online or local: Installed software. ImageOptim (Mac), OptiPNG (all platforms), PNGcrush (DOS, Unix/Linux) Online tools. Yahoo's smushit!, Dynamic drive's Online Image Optimizer (which can convert automatically from one format to another if it's more bandwidth-efficient) ...
How much does it cost to do something on the Web? - Learn web development
blishing tool such as an (S)FTP client, RSync, or Git/GitHub. Each operating system includes an (S)FTP client, as part of its file manager. Windows Explorer, Nautilus (a common Linux file manager), and the Mac Finder all include this functionality. However, people often choose dedicated (S)FTP clients to display local or remote directories side-by-side and store server passwords. If you want to install an (S)FTP client, there are several reliable and free options: for example, FileZilla for all platforms, WinSCP for Windows, Cyberduck for Mac or Windows, and more. Because FTP is inherently insecure, you should make sure to use SFTP -- the secure, encrypted version of FTP that most hosting sites you'll deal with these days will offer by default -- or another secure solution like Rsync over SSH.
... If you're more focused on design, take a look at the anatomy of a web page. ...
Sending form data - Learn web development
it into a browser locally -- browsers cannnot interpret PHP code, so when the form is submitted the browser will just offer to download the PHP file for you. To get it to work, you need to run the example through a PHP server of some kind. Good options for local PHP testing are MAMP (Mac and Windows) and AMPPS (Mac, Windows, Linux). Note also that if you are using MAMP but don't have MAMP Pro installed (or if the MAMP Pro demo time trial has expired), you might have trouble getting it working. To get it working again, we have found that you can load up the MAMP app, then choose the menu options MAMP > Preferences > PHP, and set "Standard Version:" to "7.2.x" (x will differ depending on what version you have installed). Example: Python This example shows how you would use Python to do the s...
... submitted". greeting.html: This template just contains a line that renders the two bits of data passed to it when it is rendered. This is done via the hello() function seen above, which runs when the /hello URL is navigated to. Note: Again, this code won't work if you just try to load it into a browser directly. Python works a bit differently to PHP -- to run this code locally you'll need to install Python/PIP, then install Flask using pip3 install flask. At this point you should be able to run the example using python3 python-example.py, then navigating to localhost:5000 in your browser. Other languages and frameworks There are many other server-side technologies you can use for form handling, including Perl, Java, .Net, Ruby, etc. Just pick the one you like best. That said, it's worth n...
Creating hyperlinks - Learn web development
hat will be downloaded (like a PDF or Word document), streamed (like video or audio), or has another potentially unexpected effect (opens a popup window, or loads a Flash movie), you should add clear wording to reduce any confusion. For example: If you're on a low bandwidth connection, click a link, and then a multiple megabyte download starts unexpectedly. If you don't have the Flash player installed, click a link, and then suddenly get taken to a page that requires Flash. Let's look at some examples, to see what kind of text can be used here: <p><a href="http://www.example.com/large-report.pdf"> Download the sales report (PDF, 10MB) </a></p> <p><a href="http://www.example.com/video-stream/" target="_blank"> Watch the video (stream opens in separate tab, HD quality) </a></p> <p><a ...
...ute when linking to a download When you are linking to a resource that's to be downloaded rather than opened in the browser, you can use the download attribute to provide a default save filename. Here's an example with a download link to the latest Windows version of Firefox: <a href="https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US" download="firefox-latest-64bit-installer.exe"> Download Latest Firefox for Windows (64-bit) (English, US) </a> Active learning: creating a navigation menu For this exercise, we'd like you to link some pages together with a navigation menu to create a multi-page website. This is one common way in which a website is created -- the same page structure is used on every page, including the same navigation menu, so when links are clicke...
Video and audio content - Learn web development
edding Next Now that we are comfortable with adding simple images to a webpage, the next step is to start adding video and audio players to your HTML documents! In this article we'll look at doing just that with the <video> and <audio> elements; we'll then finish off by looking at how to add captions/subtitles to your videos. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, familiarity with HTML fundamentals (as covered in Getting started with HTML) and Images in HTML. Objective: To learn how to embed video and audio content into a webpage, and add captions/subtitles to video. Video and audio on the web Web developers have wanted to use video and audio on the Web for a long time, ever since the early 2000...
...rt additional formats not supported by their desktop equivalents, just like they may not support all the same formats the desktop version does. On top of that, both desktop and mobile browsers may be designed to offload handling of media playback (either for all media or only for specific types it can't handle internally). This means media support is partly dependent on what software the user has installed. So how do we do this? Take a look at the following updated example (try it live here, also): <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> Here we've taken the src attribute out of the actual <video>...
Ember interactivity: Events, classes and state - Learn web development
from that application-level state. Ember calls these constructs Services, and they live for the entire lifetime of the page (a page refresh will clear them; persisting the data for longer is beyond the scope of this tutorial). ...
...constructs Services, and they live for the entire lifetime of the page (a page refresh will clear them; persisting the data for longer is beyond the scope of this tutorial). Run this terminal command to generate a service for us to store our todo-list data in: ember generate service todo-data This should give you a terminal output like so: installing service create app/services/todo-data.js installing service-test create tests/unit/services/todo-data-test.js This creates a todo-data.js file inside the todomvc/app/services directory to contain our service, which initially contains an import statement and an empty class: import Service from '@ember/service'; export default class TodoDataService extends Service { } First of all, we want to define what a todo is. We know that we want to ...
Creating our first Vue component - Learn web development
e repository. For a running live version, see https://mdn.github.io/todo-vue/dist/. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn how to create a Vue component, render it inside another component, pass data into it using props, and save its state. Creating a ToDoItem component Let's create our first component, which will di...
...e id in the component data. We can use the lodash package's uniqueid() method to help keep the index unique. This package exports a function that takes in a string and appends a unique integer to the end of the prefix. This will be sufficient for keeping component ids unique. Let's add the package to our project with npm; stop your server and enter the following command into your terminal: npm install --save lodash.uniqueid Note: If you prefer yarn, you could instead use yarn add lodash.uniqueid. We can now import this package into our ToDoItem component. Add the following line at the top of ToDoItem.vue's <script> element: import uniqueId from 'lodash.uniqueid'; Next, add add an id field to our data property, so the component object ends up looking like so (uniqueId() returns the specif...
Understanding client-side JavaScript frameworks - Learn web development
our version, you can find a finished version of the sample Ember app code in the ember-todomvc-tutorial repository. For a running live version, see https://nullvoxpopuli.github.io/ember-todomvc-tutorial/ (this also includes a few additional features not covered in the tutorial). 1. Getting started with Ember In our first Ember article we will look at how Ember works and what it's useful for, install the Ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development. 2. Ember app structure and componentization In this article we'll get right on with planning out the structure of our TodoMVC Ember app, adding in the HTML for it, and then breaking that HTML structure into components. 3. Ember interactivity: Events, classes and state At this poin...
...May 2020, with Vue 2.6.11. If you need to check your code against our version, you can find a finished version of the sample Vue app code in our todo-vue repository. For a running live version, see https://mdn.github.io/todo-vue/dist/. 1. Getting started with Vue Now let's introduce Vue, the third of our frameworks. In this article, we'll look at a little bit of Vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example. 2. Creating our first Vue component Now it's time to dive deeper into Vue, and create our own custom component -- we'll start by creating a component to represent each item in the todo list. Along the...
Understanding client-side web development tools - Learn web development
We finish up by providing a complete toolchain example showing you how to get productive. Get started now, with our "Client-side tooling overview" Prerequisites You should really learn the basics of the core HTML, CSS, and JavaScript languages first before attempting to use the tools detailed here. ...
...ine" -- these are effectively the same thing). This article provides an introduction to the terminal, the essential commands you'll need to enter into it, how to chain commands together, and how to add your own command line interface (CLI) tools. 3. Package management basics In this article we'll look at package managers in some detail to understand how we can use them in our own projects -- to install project tool dependencies, keep them up-to-date, and more. 4. Introducing a complete toolchain In the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of building up a sample case study toolchain. We'll go all the way from setting up a sensible development environment and putting transformation tools in place to actually deploying...
Chrome Worker Modules
Stack traces ...
... by require() module.exports = { key: publicKey }; Once this is done, we may load the module and use the values that have been exported // Assuming that myModule.js is installed to resource://gre/modules/myModule.js let Module = require("resource://gre/modules/myModule.js") foo(Module.key); // Module.key == "this is public"; // However, secretKey is not exported and cannot be used For the installation of resources, please see the documentation on moz.build (if your code is part of the platform) or on chrome manifests (if your code is part of an add-on). Stack traces Unfortunately, the module loader doesn't play nicely with error stack traces. That is, the following will not show human-readable stacks: try { MyModule.foo(); } catch (ex) { log("Exception raised at " + ex.fileName) ...
Accessibility Features in Firefox
d web search via Ctrl+K is much faster to use than first going to the search tool's web site. Custom searches can be added to this quick search bar and the user can switch between them by choosing from a drop down available via the standard Alt+down arrow key combination. The built-in text zoom feature can be accessed with the Ctrl+plus and Ctrl+minus hotkeys. The Accessibility Extension may be installed on top of Firefox, allowing keyboard access to document structure. The Find Bar allows for quick navigation to links and text searching without opening a separate dialog -- this allows more convenient use by screen magnification users because there is a single point of regard for the search. It also assists users of input aids because there are far fewer keys to type to get the desired locatio...
...n "view selection source". This will show the HTML source for only the selected text, which is useful for understanding accessibility problems in some web sites. Customize Your Experience! Many users are finding the true greatness of Firefox lies in support for third party extensions. Extensions are small add-ons which can change your browser experience as you see fit. Extensions can easily be installed or removed with the extension manager in the Tools menu. Here are some examples of accessible extensions, although there are hundreds more to try (thank you to the GW Micro knowledge base for some of this information): Adblock Plus removes ads (and other objects, like banners) from web pages Greasemonkey lets you add bits of Javascript ("user scripts") to any web page to change its behavio...
CSUN Firefox Materials
web search via Ctrl+K is much faster to use than first going to the search tool's web site. Custom searches can be added to this quick search bar and the user can switch between them by choosing from a drop down available via the standard Alt+down arrow key combination. The built-in text zoom feature can be accessed with the Ctrl+plus and Ctrl+minus hotkeys. The Accessibility Extension may be installed on top of Firefox, allowing keyboard access to document structure. Caret browsing allows you to move through web content one letter a time. You can even select web content and copy it to the clipboard. -- all with the keyboard Moving back and forward by web page (Alt+Left and Alt+Right) occurs near-instantaneously The download manager provides keyboard access to all of your recent downloa...
...g back and forward by web page (Alt+Left and Alt+Right) occurs near-instantaneously The download manager provides keyboard access to all of your recent downloads Customize Your Experience! Many users are finding the true greatness of Firefox lies in support for third party extensions. Extensions are small add-ons which can change your browser experience as you see fit. Extensions can easily be installed or removed with the extension manager in the Tools menu. Here are some examples of accessible extensions, although there are hundreds more to try (thank you to the GW Micro knowledge base for some of this information): Adblock Plus removes ads (and other objects, like banners) from web pages Greasemonkey lets you add bits of Javascript ("user scripts") to any web page to change its behavio...
Index
s, through having an icon that attracts a user's attention from a category list, to screenshots that show how useful your add-on is. 676 Index Add-ons, Glossary, Guide, Index Found 689 pages: 677 Signing and distributing your add-on Add-ons, Extensions, WebExtensions, distribution, publication, reviews, signing Add-ons need to be signed before they can be installed into release and beta versions of Firefox. This signing process takes place through addons.mozilla.org (AMO), whether you choose to distribute your add-on through AMO or to do it yourself. 678 Make money from browser extensions Guide, Monetization, WebExtensions, distribution While users can download browser extensions for Firefox free of cost from addons.mozilla.org (AMO)...
...le users can download browser extensions for Firefox free of cost from addons.mozilla.org (AMO), this doesn't mean you can't make money from browser extensions, and to a more limited extent themes. 679 Promoting your extension or theme Add-ons, Extensions, Promotion, Themes, WebExtensions, distribution So you've written a great extension, but only a few people have found and installed it from addons.mozilla.org--despite your efforts to create an appealing listing. So, how do you encourage more people to install your extension? This page looks at how. 680 Resources for publishers Add-ons, Extensions, distribution, publication Now your add-on is published on AMO, check out the following resources: 681 Retiring your extension Extensions, WebE...
Adding phishing protection data providers
Each data provider has a unique ID number. The data provider with the ID number 0 is the default data provider shipped with Firefox. When installing a new provider, you should use the next unused number. ...
... Phishing protection technology lets Firefox help protect users by comparing the URLs the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list. Installing a new data provider To install a data provider for phishing protection, it's necessary to set a series of preferences to provide details about the provider. Each data provider has a unique ID number. The data provider with the ID number 0 is the default data provider shipped with Firefox. When installing a new provider, you should use the next unused number. To find an ID number to use, you can build a loop that requests the value of browser.safebrowsing.provider.0.name, then browser.safebrowsing.provider.1.name, and so forth until no value is returned. Then you can use th...
Testopia
ease report it to us so that we can fix most critical ones on time for Testopia 3.0. Do not ask when we plan to release 3.0, because we really don't know. "As soon as possible" is our best answer. Testopia 2.5 This versions supports Bugzilla 4.2 and 4.4, and the best news is that it no longer requires a patch for Bugzilla. If you are upgrading, please reverse the existing version's patch before installing. A fresh install only requires that you untar the tarball in your Bugzilla root directory and run checksetup. Thanks go to LpSolit from the Bugzilla team for his work in making this possible. Testopia 2.4 This version supports Bugzilla 3.6. IMPORTANT NOTICE: If you are upgrading on a case sensitive filesystem you must remove the existing testopia folder in the extensions directory. If you h...
...rs are now deprecated. All params should now be sent in a hash (struct, dict, hashmap or whatever your language of choice calls key, value pairs). Though all attempts have been made to provide continuing support for positional parameters, please be aware that some API calls may fail until you make this change. Also, future versions may remove this support completely. As always please backup your installation before attempting to install or upgrade. Testopia 2.3 This version supports Bugzilla 3.4. The main new features are: Support XML export and import of test plans and children Support CSV export of test cases and results. New reports: worst offender and case roll-up Set priorities on indidual case-runs New clone options Uses the latest Extjs 3.0 library Converts Testopia into a true...
Debugging a hang on OS X (Archived)
ery useful for the developer to know where in the code this hang happens, especially if he or she can't reproduce it. Below are steps you can use to attach so-called "Samples" to bug reports. Creating the sample on Mac OS X 10.5 (XCode < 4.2) When the application is still hung, open up Spin Control.app (it's in your <tt>/Developer/Applications/Performance Tools/</tt> folder; if it is missing, install the latest Computer Hardware Understanding Development (CHUD) Tools from Apple). By default, sampling of any hanging application will begin automatically. After about 3-4 seconds, select the hanging application in the "Detected Hangs" window and click the "Interrupt Sampling" button. Note that sampling will quickly hog up a lot of memory if you leave it on for too long! When it's do...
...te text editor, and save as a plain-text file. For a more detailed view of the sample data, make sure the sample you just recorded is selected in the "Detected Hangs" window and click on the "Open..." button. Creating the sample on Mac OS X 10.4 When the application is still hung, open up Sampler.app (it's in your <tt>/Developer/Applications/Performance Tools/</tt> folder; if it is missing, install the latest Computer Hardware Understanding Development (CHUD) Tools from Apple.). Choose File > Attach... Select "firefox-bin" or the hung application you want a sample from. Now, click "Start recording". Note that only 3-4 seconds usually suffice, note that this will quickly hog up a lot of memory if you leave it on for too long! When it's done parsing the data, you should now have a couple ...
Windows SDK versions
s 2013 for Windows Desktop This comes with the Windows 8.1 SDK included. Visual Studio Professional 2012 This comes with the Windows 8.0 SDK included. Visual Studio 2012 Express for Windows Desktop This comes with the Windows 8.0 SDK included. Visual C++ 10 (VS2010) Professional This comes with the Windows 7 SDK, so you should be all set out of the box. Visual C++ 10 (VS2010) Express Download and install the Windows 7 SDK. Older versions Some of the older version are no longer supported, further information is available at Obsolete Build Caveats and Tips [en-US] under the Windows SDK article. Windows 8 SDK (Official) Features that depend on this SDK include: Metro Firefox front end Gamepad API support You can download the SDK from the Microsoft Download Center [web setup]. Windows 7 SDK Featu...
... Windows 7 download taskbar progress Windows 7 jump lists You can download the SDK (v7.0 [web setup or ISO image] or unsupported v7.1 [web setup or ISO image]) from the Microsoft Download Center. Note that if you're running a 64 bit version of Windows you may require the "AMD" version of the SDK even if you have an Intel processor, and you may need to deselect the documentation component in the installer in order to avoid an installation error. (This was certainly the case for 64 bit Windows 7 on a late 2008 MacBook Pro.) Warning: Due to a bug in Windows 7 SDK, if you get "SDKSETUP encountered an error: Expecting path %SystemRoot% to represent a valid system volume" error you may require to set environmental variable %windir% to something like "C:\Windows" instead of "%SystemRoot%". Older SDK...
Callgraph
t foo() { return good(); } int good() { return evil() ? 0 : 1; } The callgraph would be foo() -> good() -> evil(). ...
...good() { return evil() ? 0 : 1; } The callgraph would be foo() -> good() -> evil(). ...
Eclipse CDT Manual Setup
, and that you choose a directory outside the Mozilla source. Something like $HOME/eclipse-workspaces/mozilla-tree-1, for example. After selecting an appropriate directory, click OK, then close the "Welcome" tab when the main Eclipse window opens. Before you proceed any further, check that your changes to Eclipse's memory limits have taken effect and are present in Eclipse/Help > About Eclipse > Installation Details > Configuration. To avoid confusion in this and the following sections, note that "workspace preferences" and "project properties" are different things (we'll get to the details below). Whenever you create a new workspace for a Mozilla source tree, you should be sure to turn off the following two settings in the workspace preferences (Window > Preferences, or Eclipse > Preferences)...
...ercurial or other external activity. Select "C/C++ > Build > Console" and set "Limit console output (number of lines)" to something large, like "1000000". Eclipse CDT will try to format C/C++ code that you add as you type. However, its default formats are not a good match to Mozilla's style rules. Download this first pass at an Eclipse formatter configuration for Mozilla C/C++ coding style, and install it by opening the workspace preferences, selecting "C/C++ > Code Style > Formatter", and then using the "Import" button to import that file. The "Active profile" field should then automatically change to "Mozilla". Depending on the area of the code that you work on, you may need to tweak this configuration using the "Edit" button. (Note that the format settings under "General > Editors > Text Edi...
Listening to events on all tabs
Firefox 3.5 adds support for listening to progress events on all tabs. Adding a listener To listen to progress events on all tabs, call the browser's addTabsProgressListener() method: gBrowser.addTabsProgressListener(myProgressListener); myProgressListener is an object that implements the callbacks used to provide notifications of progress events. Removing a listener To remove a previously installed progress listener, call removeTabsProgressListener(): gBrowser.removeTabsProgressListener(myProgressListener); Implementing a listener The listener object itself has five methods it can implement to handle various events: onLocationChange Called when the URI of the document displayed in the tab changes. void onLocationChange( nsIDOMXULElement aBrowser, nsIWebProgress aWebProgress, nsIRequest ...
... The total progress for all requests associated with webProgress. onSecurityChange Notification called for security progress. This method will be called on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. It might also be called if an error occurs during network loading. Note: These notifications will only occur if a security package is installed. void onSecurityChange( nsIDOMXULElement aBrowser, nsIWebProgress aWebProgress, nsIRequest aRequest, unsigned long aState ); Parameters aBrowser The browser that fired the notification. aWebProgress The nsIWebProgress instance that fired the notification. aRequest The nsIRequest that has new security state. aState A value composed of the Security State ...
mach
Requirements Mach requires a current version of /mozilla-central/ (or a tree derived from there). Mach was committed on 2012-SEP-26. Mach also requires Python 2.7. Mach itself is Python 3 compliant, but modules used by mach likely are not Python 3 compliant - so stick to Python 2.7. Running From the root of the source tree checkout, you should just be able to type: $ ./mach If all is well, you should see a help message. Of course, in a random dir you just get a cryptic error message to improve the experience. ...
...e built-in bashcompinit function before sourcing: autoload bashcompinit bashcompinit source /path/to/mozilla-central/python/mach/bash-completion.sh Frequently Asked Questions Why should I NOT use mach? A real FAQ for a change! Mach is not the best software ever. Say, if you run a rolling release Arch Linux Distro or derivate thereof ("Manjaro"), you have something less tedious: Octopi! Just install Thunderbird from sources out of the AUR repo! Many PKGBUILD options to choose from and most work like a charm - while "mach" may not necessarily work like a charm for everyone. Why even bother with a competing build system in Arch when Octopi does what you want and even has a GUI? Those makepkg scripts named PKGBUILD are (typically) simple bash scripts that are easy to maintain and modify. Python...
Frame script loading and lifetime
ding event will do nothing. var gContentFrameMessageManager = this; addEventListener('unload', function(aEvent) { if (aEvent.target == gContentFrameMessageManager) { sendAsyncMessage('my-addon-id', 'framescript-died'); // if you did not set third argument of `Services.mm.addMessageListener` to `true`, then this will fail to send a message } }, false); Note about unload during uninstallation/upgrade When your add-on is uninstalled, or disabled, you should: Cancel it, If you have used allowDelayedLoad, by calling removeDelayedFrameScript; ensuring the frame script is not loaded into any new tabs. Disable any frame scripts already loaded. There is no mechanism to unload frame scripts which are already loaded. You need to send a message to your frame scripts, telling them to d...
...The workaround is to randomize the frame script's URL; for example, by appending "?" + Math.random(). ...
Geckoview-Junit Tests
nux) using mozdevice (adb). In automation, tests normally run in an Android emulator. Running tests locally If desired, connect an Android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. ...
...g tests locally If desired, connect an Android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. Before running tests, install the androidTest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it. mozilla-central$ mach install --app org.mozilla.geckoview.test To run all tests: mozilla-central$ mach geckoview-junit To run just one class of tests: mozilla-central$ mach geckoview-junit <class> Please note that unlike Robocop tests, <class> needs to be specified using the fully qualified class name including the package, e.g. org.mozilla.geckoview.test.ContentDelegateTest. To run j...
How to get a stacktrace with WinDbg
you need to get a stacktrace (call stack) for a crash or hang but Breakpad fails because it's a special crasher or a hang. This article describes how to get a stacktrace in those cases with WinDbg on Windows. (To get a stacktrace for Thunderbird or some other product, substitute the product name where ever you see Firefox in this instructions.) Requirements To get such a stacktrace you need to install the following software: Debugging Tools for Windows Microsoft distributes the Debugging Tools for Windows for free, those include WinDbg which you will need here. Download it from Install Debugging Tools for Windows. (You'll want the 32-bit version, even if you are using a 64-bit version of Windows) Then install it, the standard settings in the installation process are fine. A Firefox nightly ...
...Save information for workspace?" A: Click yes and WinDbg will save you from having to enter in the symbol location for Firefox.exe in the future. Click no if you'd rather not having WinDbg save this information. Q: I'm seeing "wow64" on top of each thread, is that ok ? A: No, you are running a 64 bit version of Windbg and trying to debug a 32 bit version of the mozilla software. Redownload and install the 32 bit version of windbg. Troubleshooting: Symbols will not download If symbols will not download no matter what you do, the problem may be that Internet Explorer has been set to the Work Offline mode. You will not receive any warnings of this in Windbg, Visual C++ or Visual Studio. Even using the command line with symchk.exe to download symbols will fail. This is because Microsoft uses Int...
UpdateListener
version was seen. Either onUpdateAvailable() or onNoUpdateAvailable(), depending on whether a newer version of the Addon was found. onUpdateFinished() to signal that the update check has completed. Method Overview void onCompatibilityUpdateAvailable(in Addon addon) void onNoCompatibilityUpdateAvailable(in Addon addon) void onUpdateAvailable(in Addon addon, in AddonInstall install) void onNoUpdateAvailable(in Addon addon) void onUpdateFinished(in Addon addon, in integer error) Methods onCompatibilityUpdateAvailable() Called when the update check found compatibility information for the application and platform version that the update check was being performed for. void onCompatibilityUpdateAvailable( in Addon addon ) Parameters add...
... onNoCompatibilityUpdateAvailable() Called when the update check found no new compatibility information for the application and platform version that the update check was being performed for. void onNoCompatibilityUpdateAvailable( in Addon addon ) Parameters addon The Addon that was being checked for updates onUpdateAvailable() Called when a new version of an add-on has been found for install. void onUpdateAvailable( in Addon addon, in AddonInstall install ) Parameters addon The Addon that was being checked for updates install An AddonInstall for the updated version onNoUpdateAvailable() Called when no new version of an add-on has been found for install. void onNoUpdateAvailable( in Addon addon ) Parameters addon The Addon that was being checked for updates on...
Using JavaScript code modules
aliases. ...
...nt source. A possible solution is moving the call to Components.utils.import() into the XPCOM component constructor (discussion). Packaging notes It's important to note that you should not typically put your JavaScript code modules in a JAR file in your add-on. Firefox 3.6 doesn't support them at all, and there's only one case in which it's remotely useful: a Firefox 4-only add-on which must be installed unpacked. Otherwise placing code modules in a JAR file breaks compatibility unnecessarily. Importing CommonJS modules The JavaScript code modules described here are not the same thing as CommonJS modules, but you can import CommonJS modules into any scope where you can use Components.utils.import. Just call the following: const { require } = Cu.import("resource://gre/modules/commonjs/toolkit...
Localization and Plurals
lural, genitive plural. These match up with plural rule #10. pluralRule=10 seconds=sekunda;sekundze;sekundy;sekundow minutes=mjensina;mjensinje;mjensiny;mjensin hours=hodzina;hodzinje;hodziny;hodzin days=dzen;dnjej;dny;dnjow Testing Extension To help make sure you pick the right plural rule and provide enough plural forms for strings, you should use the pluralForm Checker extension. After installing the extension, it should be available from the Tools menu. To use it, list off the property files and properties that you want to check and click the button. The extension will load each property and display the plural forms in a table. Selecting a table entry will populate the bottom box with sample uses of the word for some numbers. Install pluralForm Checker v0.3 extension Extension in...
... Get the correct plural form of seconds let timeLeft = 55; let seconds = PluralForm.get(timeLeft, getStr("seconds")); // Print the localized string for "55 seconds" print(getStr("timePair").replace("#1", timeLeft).replace("#2", seconds)); Method: makeGetter If you're writing an extension, you'll want to use makeGetter instead of PluralForm.get() or PluralForm.numForms(). This is because someone installing the extension on a different locale will be using the strings provided by your default extension locale. For example, your extension localized for English with plural rule #1, which expects 2 plural forms, is installed on a localized version of Firefox with plural rule #4, which expects 3 forms: /** * Create a pair of plural form functions for the given plural rule number. * * @param aRule...
Localizing with Koala
o the Google search. If you click on the highlighted arrow pointing down while reading this tutorial on MDC, you will see two string that need to be translated: Add "MDC Search" Manage Search Engines... There is also a tooltip that appears when you hover over the magnifying glass icon on the right side of the bar. Requirements Mercurial, Linux, Windows or Mac OS X. Instructions Preparation Install Komodo Edit. Install Koala extension. Go to Tools > Add-ons. Search for "Koala". Click Add to Komodo Edit... Restart Komodo when the installation is complete. You should see a new button in Komodo's toolbar, with two options: Startpage and Management. Before you can use them, you need to create a new Koala project. Creating a new project Create a new Koala project by going to File > New > ...
...directory in which the project will live in (e.g. C:\mozilla\l10n on Windows, /home/user/mozilla/l10n on Linux or /Users/user/mozilla/l10n on Mac OS X). Due to a bug in Koala (bug 21930), it is recommended that you don't choose a path that contains spaces (like C:\Documents and Settings\user\...). Click "Open" to create the project. Koala will check for Mercurial. Make sure that your Mercurial installation is in your system's $PATH. Setup wizard will open. Configure the Application Choose "Firefox" as the application. Version: 3.6. Appname: browser. Included locale: en-US (this is the original locale you're translating from). Leave Location empty for now. Check the "Mercurial" checkbox. Note that you don't have to edit the Location field, it automatically fills in when you check the "Mer...
Mozilla MathML Project
. Updates Status of each tag Result of the MathML 3 Testsuite Unofficial nightly builds with MathML patches applied (maintained by Bill Gianopoulos) More updates and archived content Community View Mozilla forums... Mailing list Newsgroup RSS feed IRC channel Wiki used by contributors - check out the latest developments and help us improving MathML in Mozilla. Links Installing fonts for Mozilla's MathML engine MathML Version 3.0 - W3C Recommendation, 21 October 2010 W3C MathML Test Suite - Designed to check the implementation of each element one attribute (or built-in rendering behavior) at a time in a fairly thorough manner. MathML in Mozilla Developer Network MathML Accessibility in Mozilla Sample MathML Documents Screenshots MathML Start Page - with tra...
... each element one attribute (or built-in rendering behavior) at a time in a fairly thorough manner. MathML in Mozilla Developer Network MathML Accessibility in Mozilla Sample MathML Documents Screenshots MathML Start Page - with translations in different languages ( Arabic, Chinese, Hebrew, Thai) MathML Basics - Document tailored to display correctly with just the Symbol font that is pre-installed by default on most OS configurations. MathML Torture Test - Comparative testing of MathML rendering against TeX. Demo of some MathML tags: mfrac, mo, mtable, mspace, mmultiscripts, msqrt-mroot. MathML Extras - Technology demonstration of some interesting upshots from building natively upon the browser environment. Various MathML Tests - These pages were imported from layout/mathml/tests/. ...
NSPR build instructions
Introduction The top level of the NSPR source tree is the mozilla/nsprpub directory. Although nsprpub is a subdirectory under mozilla, NSPR is independent of the Mozilla client source tree. Building NSPR consists of three steps: run the configure script. You may override the compilers (the CC environment variable) or specify options. ...
... To generate a "WIN95" configuration, specify the --enable-win32-target=WIN95 configure option. --enable-debug-rtl This option is only used on Windows. NSPR debug build uses the release C run-time library by default. To generate a debug build that uses the debug C run-time library, specify the --enable-debug-rtl configure option. Makefile targets all (default) clean realclean distclean install release Running the test programs The tests were built above, in the pr/tests directory. On Mac OS X, they can be executed with the following: /bin/sh: $ cd pr/tests $ DYLD_LIBRARY_PATH=../../dist/lib ./accept PASS $ $ # to run all the NSPR tests... $ $ DYLD_LIBRARY_PATH=../../dist/lib ../../../nspr/pr/tests/runtests.sh ../.. ...
JSS Provider Notes
This page has been moved to http://www.dogtagpki.org/wiki/JSS_Provider. The Mozilla-JSS JCA Provider Newsgroup: mozilla.dev.tech.crypto Overview This document describes the JCA Provider shipped with JSS. The provider's name is "Mozilla-JSS". It implements cryptographic operations in native code using the NSS libraries. Contents Signed JAR file Installing the Provider Specifying the CryptoToken Supported Classes What's Not Supported Signed JAR file JSS 3.2 implements several JCE (Java Cryptography Extension) algorithms. These algorithms have at various times been export-controlled by the US government. Sun therefore requires that JAR files implementing JCE algorithms be digitally signed by an approved organization. Netscape has this approval and signs the official...
...your JAR file will not have a valid signature. This means you will not be able to use the JSS provider for JCE algorithms. You have two choices. Use the binary release of JSS from mozilla.org. Apply for your own JCE code-signing certificate following the procedure at How to Implement a Provider for the JavaTM Cryptography Extension. Then you can sign your own JSS JAR file. Installing the Provider In order to use any part of JSS, including the JCA provider, you must first call CryptoManager.initialize(). By default, the JCA provider will be installed in the list of providers maintained by the java.security.Security class. If you do not wish the provider to be installed, create a CryptoManager.InitializationValues object, set its installJSSProvider field to false, and p...
Mozilla-JSS JCA Provider notes
The Mozilla-JSS JCA Provider Newsgroup: mozilla.dev.tech.crypto Overview This document describes the JCA Provider shipped with JSS. The provider's name is "Mozilla-JSS". It implements cryptographic operations in native code using the NSS libraries. Contents Signed JAR file Installing the Provider Specifying the CryptoToken Supported Classes What's Not Supported Signed JAR file JSS implements several JCE (Java Cryptography Extension) algorithms. These algorithms have at various times been export-controlled by the US government. JRE therefore requires that JAR files implementing JCE algorithms be digitally signed by an approved organization. The maintainers of JSS, Sun, Red Hat, and Mozilla, have this approval and signs the official builds of jss4.jar. At runtime, the JRE automatic...
...d from mozilla.org, your JAR file will not have a valid signature. This means you will not be able to use the JSS provider for JCE algorithms. You have two choices. Use the binary release of JSS from mozilla.org. Apply for your own JCE code-signing certificate following the procedure at How to Implement a Provider for the JavaTM Cryptography Extension. Then you can sign your own JSS JAR file. Installing the Provider In order to use any part of JSS, including the JCA provider, you must first call CryptoManager.initialize(). By default, the JCA provider will be installed in the list of providers maintained by the java.security.Security class. If you do not wish the provider to be installed, create a CryptoManager.InitializationValues object, set its installJSSProvider field to false, and pass...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
PKCS11 FAQ QUESTIONS AND ANSWERS GENERAL QUESTIONS After plugging in an external PKCS #11 module, how do you use the certificate available on the token? Does the certificate need to be imported into NSS's internal certificate database? If so, is there a way to get the certificate from an external token into NSS's internal certificate database? NSS searches all the installed PKCS #11 modules when looking for certificates. Once you've installed the module, the module's certificates simply appear in the list of certificates displayed in the Certificate window. What version of PKCS #11 does NSS support? NSS requires at least PKCS #11 version 2.0, but can support some features of later versions of NSS, including NSS 2.20. NSS does not use all the features of later versions of PKCS #11. What ar...
...icate label should be unique to the token. NSS gets the value of the CKA_LABEL attribute from the token. Labels should not have any trailing blank characters. Will NSS use the random number generation features of PKCS #11? Only if you identify your token as the default random number generator. If you do, your token must be able to generate random numbers even when it is not logged in. NSS uses installed random number generators if PKCS11_MECH_RANDOM_FLAG is set in the installer script. For information on how to do this, see Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module. Can Mozilla provide a list of all PKCS #11 functions that NSS will use? Your token should expect to implement all the PKCS #11 functions that make sense for your token. NSS continues to evolve,...
PKCS11 Implement
c Token Interface Standard, version 2.0 with guidelines for implementors of cryptographic modules who want their products to work with Mozilla client software: How NSS Calls PKCS #11 Functions. Function-specific information organized in the same categories as the PKCS #11 specification. Functions for Different Kinds of Tokens. Summarizes the support NSS expects from different kinds of tokens. Installation. Installing modules and informing the user of changes in the Cryptographic Modules settings. Semantics Unique to NSS. Miscellaneous NSS semantics that affect module implementation. Future versions of Netscape server products will also support of PKCS #11 version 2.0. How NSS Calls PKCS #11 Functions This section is organized according to the categories used in PKCS #11: Cryptographic Token...
...ddition to C_Sign and C_GenerateKeyPair, signing and decryption tokens should also support C_Decrypt and, optionally, C_UnwrapKey. Multipurpose tokens should support all the functions listed in Table 1.2, except that C_WrapKey and C_UnwrapKey are optional. The NSS always attempts to use these two functions but uses C_Encrypt and C_Decrypt instead if C_WrapKey and C_UnwrapKey aren't implemented. Installation You can install your module in any convenient location on the user's hard disk, but you must tell the user to type the module name and location in the Cryptographic Modules portion of the Communicator Security Info window. To do so, the user should follow these steps: Click the Security icon near the top of any Communicator window. In the Security Info window, click Cryptographic Modules...
Renaming With Pork
This describes how to use pork to rewrite source code. Most refactoring toolchains are UI-based. Typically they require loading the entire project into an IDE. Usually, IDEs require one to use their build system. Pork does not yet have a UI, but it is also build-system agnostic and scales to large codebases. These notes are based on Tools Pork refactoring toolchain [required]. See Installing Pork. filterdiff from patchutils Renaming a class 1. Make two copies of the source(analysis and test). This isn't strictly required, but will save time. 2. The first copy will be an analysis copy. Convince GCC to create annotated .ii files while compiling the analysis copy. Typically, make CXXFLAGS="-Wp,-K,-W0 -save-temps" will work. Note the -K,-W0 options are passed down to the MCPP prep...
...y will be an analysis copy. Convince GCC to create annotated .ii files while compiling the analysis copy. Typically, make CXXFLAGS="-Wp,-K,-W0 -save-temps" will work. Note the -K,-W0 options are passed down to the MCPP preprocessor such that it can annotate files with more precise position information. In order for this to work MCPP has to be integrated into your compiler as described in the pork installation instructions 3. In the analysis copy make a list of files to process. Use absolute paths. find `pwd` -name \*.ii > /tmp/ls.txt 4. Run renamer through pork-barrel. this makes it easier to refer to any diagnostics touch /tmp/err.txt tail -F /tmp/err.txt & ~/work/pork-barrel/pork-barrel 4 /tmp/ls.txt ./renamer -rename-class string sm::string > /tmp/string.diff 2>/tmp/err.txt Pork-barrel ...
Index
PI Reference, Reference, Reference(2), SpiderMonkey JSConvertOp callback specifies conversion behavior for objects having this class, implementing the ECMAScript [[DefaultValue]] behavior for them. On success it must return a primitive value in *vp. 95 JSDeletePropertyOp JSAPI Reference, Reference, SpiderMonkey JSDeletePropertyOp callback is a hook that applications may install to be called at some point during property access. A JSDeletePropertyOp may be installed on a JSClass to hook property deletes. 96 JSEnumerateOp JSAPI Reference, SpiderMonkey JSEnumerateOp is called just before an object is enumerated (via a for...in statement, an array comprehension, or a call to JS_Enumerate). It should define any remaining lazy properties that should be en...
...These are the global objects that are set up automatically by the SpiderMonkey js command-line interpreter when you start the program. 525 SpiderMonkey Build Documentation Build documentation, Guide, SpiderMonkey Use these instructions to build the latest SpiderMonkey source code. ...
Self-hosted builtins in SpiderMonkey
prototype property can be added from the self-hosted code itself. All self-hosted functions have direct access to each other and can rely on references being stable, i.e. not changeable by client JS code. OTOH, self-hosted code doesn't have access to most of the C++-implemented builtins. You can not, for example, use Function.prototype.apply directly. A select set of C++-implemented builtins is installed via the intrinsic_functions array in SelfHosting.cpp, as described below. Using the same mechanism, C++-implemented helper functions are made available to self-hosted code. Some general-purpose functions provided in this way are: The abstract operations ToObject, ToInteger, and IsCallable specified in the ECMAScript Language Specification. ThrowTypeError, ThrowRangeError, ThrowSyntaxError, ...
...it doesn't fit into any of those, create a new .js file in that directory and add it to the selfhosted.inputs list in moz.build. To add a self-hosted function as a method to a host object, add it to that host object's JSFunctionSpec array using the JS_SELF_HOSTED_FN macro. Example: JS_SELF_HOSTED_FN("forEach", "ArrayForEach", 1,0) This causes the self-hosted function ArrayForEach to be installed as the host object's method forEach. Making JSNatives available to self-hosted code For a JSNative to be available to self-hosted code, add it to the intrinsic_functions JSFunctionSpec array in SelfHosting.cpp. Debugging self-hosted code Self-hosted code by default is hidden from client JavaScript code; in particular, self-hosted frames will be filtered out of the stack traces of exceptions...
JS_SetInterruptCallback
iodically while JavaScript code runs. Syntax JSInterruptCallback JS_SetInterruptCallback(JSRuntime *rt, JSInterruptCallback callback); JSInterruptCallback JS_GetInterruptCallback(JSRuntime *rt); void JS_RequestInterruptCallback(JSRuntime *rt); Name Type Description rt JSRuntime * The runtime. callback JSInterruptCallback The callback function to install. Callback syntax bool (* JSInterruptCallback)(JSContext *cx); Name Type Description cx JSContext * Pointer to a JSContext in which this callback was installed. The callback may use this context to call JSAPI functions, but it should first use JS_SetInterruptCallback to set the context's interrupt callback to NULL. Otherwise the engine may call the inte...
...t callback are: To run garbage collection periodically, by calling JS_MaybeGC; To periodically take a break from script execution to update the UI (though note that Mozilla does not do this, by design); To enforce application limits on the amount of time a script may run. (In this case, the callback may terminate the script by returning false.) JS_GetInterruptCallback returns the currently installed interrupt callback, or NULL if none is currently installed. JS_RequestInterruptCallback requests a callback set using JS_SetInterruptCallback. See Also MXR ID Search for JS_SetInterruptCallback MXR ID Search for JS_GetInterruptCallback MXR ID Search for JS_RequestInterruptCallback bug 977287 ...
extIApplication
e application. name readonly attribute AString The name of the application. version readonly attribute AString The version number of the application. console readonly attribute extIConsole The console object for the application. extensions readonly attribute extIExtensions The extensions object for the application. Contains a list of all installed extensions. Not available anymore on Gecko 2.0 (see [1]), use getExtensions() instead Obsolete since Gecko 2.0 prefs readonly attribute extIPreferenceBranch The preferences object for the application. Defaults to an empty root branch. storage readonly attribute extISessionStorage The storage object for the application. events readonly attribute extIEven...
...tion. It is possible for the shutdown to be canceled. boolean quit() Return value boolean value indicating whether the shutdown was successful. restart() Attempts to restart the application. It is possible for the restart to be canceled. boolean restart() Return value boolean value indicating whether the restart was successful. getExtensions(aCallback) Calls aCallback with the list of installed extensions. void getExtensions(extIExtensionsCallback aCallback) Return value none. XPCOM Although the Application object is preloaded into XUL scripts, it is not preloaded into JavaScript XPCOM code. The object needs to be accessed like any other XPCOM service: var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication); Se...
extIExtension
name readonly attribute AString The name of the extension. enabled readonly attribute boolean True if the extension is currently enabled. version readonly attribute AString The version number of the extension. firstRun readonly attribute boolean Indicates whether this is the extension's first run after install prefs readonly attribute extIPreferenceBranch The preferences object for the extension. Defaults to the "extensions.<extensionid>." branch. storage readonly attribute extISessionStorage The storage object for the extension. events readonly attribute extIEvents The events object for the extension. supports: "uninst...
...lts to the "extensions.<extensionid>." branch. storage readonly attribute extISessionStorage The storage object for the extension. events readonly attribute extIEvents The events object for the extension. supports: "uninstall" Methods FIXME: See also See extApplication.js line:395 for the implementation of firstRun. A preference "install-event-fired" under your extensions preferences branch (e.g. extensions.YOUR_EXTENSION_ID.install-event-fired) will be set to false after your extension has been installed. You may need to reset this preference in about:config during testing. Also, see the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. ...
Toolkit API
The Mozilla Toolkit is a set of programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. ...
...he Mozilla Toolkit is a set of programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. ...
How to build an XPCOM component in JavaScript
b. A sample Makefile.in # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
...etFactory = XPCOMUtils.generateNSGetFactory(components); // Firefox 4.0 and higher else var NSGetModule = XPCOMUtils.generateNSGetModule(components); // Firefox 3.x Note: Starting with Firefox 4.0 you will need to declare your component in chrome.manifest; classDescription and contractID properties on the other hand are no longer required. See XPCOM changes in Gecko 2.0 for more details. Installation For extensions: Copy HelloWorld.js, and HelloWorld.xpt (only if you defined and compiled the IDL) to {extensiondir}/components/. Delete compreg.dat and xpti.dat from your profile directory. Restart application. For Firefox: Copy HelloWorld.js, and HelloWorld.xpt (only if you defined and compiled the IDL) to the {objdir}/dist/bin/components directory, if running from the source. D...
XPCOM changes in Gecko 2.0
la 2.0 by using the extra macro NS_IMPL_MOZILLA192_NSGETMODULE. See nsSampleModule.cpp for more details. Note: Binary XPCOM components must be recompiled for every new major release of Firefox starting with Firefox 4. Your life would be much easier over the long term if you switch to using js-ctypes instead. Also note that extensions using binary components must now use the unpack property in the install manifest. Platform-specific directories The component/chrome system used to look in platform-specific subdirectories of an extension, such as platform/WINNT_x86-msvc/chrome.manifest on Windows. This is no longer supported. You can use the OS and ABI chrome registration directives to achieve the same effect: binary-component components/windows/mycomponent.dll ABI=WINNT_x86-msvc binary-component co...
...ges to the component registration model let this so-called Extension Manager restart become a thing of the past. Instead of relying on a potentially stale component cache on startup, we read the application's component registrations out of its manifest file and load those components. This gets enough of XPCOM loaded and running that we can then load the Extension Manager and perform the necessary installing, uninstalling, and updating of any installed extensions. Once that's done, the extensions can then be loaded by simply reading their manifests, loading their components, and continuing the startup process, all without having to restart the browser. Electrolysis content processes can simply read the component registrations during startup. XPCNativeWrapper changes You can't disable XPCNativeWrap...
Finishing the Component
r component runs in a version of Gecko in which this interface is updated, your method calls will be routed through a different v-table than the one the component expected, most likely resulting in a crash. Below, the component is compiled against a version of the nsIFoo interface that has three methods. The component calls the method TestA and passes an integer, 10. This works fine in any Gecko installation where a contract guarantees that the interface that was compiled against has the same signature. However, when this same component is used in a Gecko installation where this interface has changed, the method TestA does not exist in the nsIFoo interface; the first entry in the v-table is in fact IsPrime(). When this method call is made, the code execution treats the IsPrime method as TestA. N...
... &previous); if (previous) nsMemory::Free(previous); return rv; } This code adds a new category entry under the topic "content-policy," and it calls AddCategoryEntry in the same way we did in Registering for Notifications. A similar step is required for unregistration. Implementing the nsIContentPolicy At this point, you can take the WebLock component and install it into a Gecko installation. When the component is loaded, Gecko calls the nsIContentPolicy implementation in WebLock on every page load, and this prevents pages from displaying by returning the proper value when the load method is called. The web locking policy that we are going to put into place is quite simple: for every load request that comes through, we will ensure that the URI is in the ...
Resources
<< Previous This last section of the book provides a list of resources referred to in the tutorial and other links that may be useful to the Gecko developer. ...
...This material may be distri...
mozIRegistry
entations: one based solely on libreg (for "compatibility") and a fancier RDF-based one. Open Issues We have identified two open issues, neither of which appear to be so hard that it we won't be able to solve them in a timely fashion: If and when we remove what is currently a static binding of CLSIDs, there will be the risk that required CLSIDs won't be present. A corollary is that the build/install process will require updates to user "registry" to enable new class implementations to be accessible. Our current build/install process doesn't quite step up to these problems as of yet. There are some bootstrapping issues related to using the Service Manager to access the mozIRegistry interface. Currently, nsIServiceManager requires a CLSID to access a service which hardcodes the implementation...
...ementation that is entirely compatible with current libreg usage. mozRDFRegistry This is an RDF-based mozIRegistry implementation that will provide additional capabilities. Note that these additional capabilities will not be utilized by nsRepository. It is envisioned that there will be multiple flavors of underlying RDF data sources corresponding to the libreg .reg file(s), the shared libraries installed, additional components accessible via the 'net, etc. The contents of this RDF data base will be stored in a plain-text rdf/xml file so that it can easily be viewed edited. It will also facilitate building a browser-based application that will allow people to display and edit its contents. Original Document Information Author: Bill Law Last Updated Date: January 21, 1999 Copyright Infor...
nsIBidiKeyboard
Read only. Note: This throws NS_ERROR_NOT_IMPLEMENTED if the widget layer doesn't provide this information. Currently, this is only implemented on Windows. Methods isLangRTL() Determines if the current keyboard language is right-to-left. (supported on: win32, mac, gtk2) Note: Prior to Gecko 1.9 this method used a parameter 'out PRBool aIsRTL' to return the value. boolean ...
... isLangRTL() Determines if the current keyboard language is right-to-left. (supported on: win32, mac, gtk2) Note: Prior to Gecko 1.9 this method used a parameter 'out PRBool aIsRTL' to return the value. boolean isLangRTL(); Parameters None. Return value true if the current keyboard is right-to-left, false if it is not. Exceptions thrown NS_ERROR_FAILURE If no right-to-left keyboards are installed. setLangFromBidiLevel() Sets the keyboard language to left-to-right or right-to-left. (supported on: win32) void setLangFromBidiLevel( in PRUint8 aLevel ); Parameters aLevel If odd set the keyboard to right-to-left, if even set left-to-right. Exceptions thrown NS_ERROR_FAILURE If no right-to-left keyboards are installed. Remarks Implementation Windows This implementation...
nsIComponentManager
in interface nsILocalFile aLocation ); Parameters Examples Using addBootstrappedManifestLocation in a bootstrapped extension for Firefox 8 and 9: aLocation The directory or XPI to stop reading the chrome.manifest from. ...
... reading the chrome.manifest from. ...
nsIPluginHost
Parameters aPluginCount Optional aResults Native code only!handleBadPlugin void handleBadPlugin( in PRLibraryPtr aLibrary, in nsIPluginInstance instance ); Parameters aLibrary instance Native code only!init void init(); Parameters None. Native code only!instantiateDummyJavaPlugin Instantiate a "dummy" java plugin if a java plugin that supports NPRuntime is installed. This plugin is used for exposing window.java and window.Packages. If the java plugin supports NPRuntime and instantiation was successful, aOwners instance will be non-null, if not, it will be null. void instantiateDummyJavaPlugin( in nsIPluginInstanceOwner aOwner ); Parameters aOwner Native code only!instantiateEmbeddedPlugin void instantiateEmbeddedPlugin( in string aMimeTyp...
...Then using nsIHandlerService it gets the handler info. A handler is, default application that should open or deal with this file. let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); let handlerService = Cc['@mozilla.org/uriloader/handler-service;1'].getService(Ci.nsIHandlerService); let mimeService = Cc['@mozilla.org/mime;1'].
nsIWebappsSupport
toolkit/components/webapps/nsIWebappsSupport.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void installApplication(in wstring title, in wstring uri, in wstring iconUri, in wstring iconData); boolean isApplicationInstalled(in wstring uri); Methods installApplication() This method installs a web application. void installApplication( in wstring title, in wstring uri, in wstring iconUri, in wstring iconData ); Parameters title The user-friendly name of the application. uri The uri of the web application. iconUri The uri of icon of the web application. iconData A base64 encoded representation of the appl...
... installApplication() This method installs a web application. void installApplication( in wstring title, in wstring uri, in wstring iconUri, in wstring iconData ); Parameters title The user-friendly name of the application. uri The uri of the web application. iconUri The uri of icon of the web application. iconData A base64 encoded representation of the application's icon. isApplicationInstalled() Checks is a web application is already installed. boolean isApplicationInstalled( in wstring uri ); Parameters uri The uri of the web application. Return value true if the web application is installed, false if it's not installed. ...
XUL Overlays
Mozilla › Tech › XUL › Overlays
e is no formal restriction on what kind of XUL content is located in "base" XUL files and what kind should be put in overlays, XUL overlays generally define items that are not present in the basic versions of the UI, such as additional components. When plug-ins, browser extensions, or other applications provide new UI elements to the browser, these elements should be defined in overlay files. ...
...d scripts loaded by the overlay simply apply to the entire master document. Loading overlays dynamically The chrome registry makes it possible to load XUL overlays dynamically -- or only when necessary. The chrome registry, which is a special RDF datasource into which user-specific information is persisted, or stored, contains information about the components or additional packages that have been installed with the browser. When a component such as the "Super Stream Player" from the examples above is registered there, overlays associated with that component are loaded automatically. When the component is not present, only the base files are loaded. Loading overlays at runtime Firefox 1.5 and other Gecko 1.8-based applications also support loading overlays on-the-fly via the document.loadOverlay()...
Building a Thunderbird extension 2: extension file layout
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced "zippy") file extension. At a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder. A content/ folder sometimes contains the actual content files. ...
...zippy") file extension. At a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder. A content/ folder sometimes contains the actual content files. These files contain the code that makes your extension actually do something. ...
Using the Mozilla source server
Once the symbol path is set you must now enable Source Server. Using the source server in WinDbg In...
... WinDbg will prompt you about running cvs to download the associated source code. If you click "Yes", WinDbg will display *BUSY* in the status bar while it downloads the source, and then it will automatically open the file and highlight the current line. Using the source server in Visual Studio Note: Source server support does not work correctly out of the box in Visual Studio 2005. If you install WinDBG, and copy srcsrv.dll from the WinDBG install dir to the Visual Studio install dir (replacing the existing copy) it will work. Enable source server support under Tools -> Options. Also, disable (uncheck) the box that says "Require source files to exactly match the original version". Start debugging your program. Symbols will load and then, if you're using a CVS build, when you try to st...
Zombie compartments
nstructions. In particular, if you have multiple tabs open it's easy to mis-identify whether a compartment should still be alive. If you only have about:memory open, things are much simpler. Proactive checking of add-ons It's not uncommon for add-ons to cause zombie compartments, see bug 700547 for examples. Follow these steps to do some basic checking of an add-on. Create a new profile. Install and enable the add-on. Restart the browser. Browse one or more pages and do something that exercises the add-on. For example, for an add-on that remembers passwords, visit a site that requires a password; for an add-on that performs an operation involving a specific page element such as an image or a chunk of text, perform that operation. The more you exercise the add-on, the more thorough t...
...ost windows, congratulations! That's a good sign that the add-on doesn't cause zombie compartments. Otherwise, please file a bug (using the "Tech Evangelism" product and the "Add-ons" component), add "[MemShrink]" to its whiteboard, and mark it as blocking bug 668871 and bug 700547. Restartless add-ons should also take special care that all their compartments get destroyed after disabling or uninstalling the add-on. (Please note that you may need to close the about:addons UI before changes are made). Avoiding zombie compartments in add-ons Once you know that an add-on causes a zombie compartment, the only way to identify the cause is to read the add-on's code. See Common causes of memory leaks in extensions for things to avoid. ...
Standard OS Libraries
indows Windows has many Standard OS Libraries. The most common, found on all Windows OS version, is "WinAPI". Windows also has the "WinAPILists" and ".NET Framework" (I'm not sure if it can be accessed JSCtypes but probably). A complete list of Windows APIs can be found at the MSDN API Index. WinAPI This is the one that is most commonly used by js-ctypes. This comes shipped by default with all installations of Windows operating systems since Win98. It's also known as WinAPI32 or just WinAPI. A list of all the functions available through this API can be found at the MSDN WinAPI Index. For finding out the values and types of arguments and returns of the functions you want to use from this API, you must visit the functions page on this linked MSDN site; it will give you all that information. Exa...
...?). So DEs are a stack over WMs. There is also a layer known as shell, GnomeShell is the shell used in Gnome 3, it is the outter shell. GTK+ is the framework used under Firefox (and other Mozilla applications like Thunderbird). The other framework used in Unix systems is Qt. Firefox is officially supported only for GTK+ at the moment, therefore GTK+ is required for Firefox to run. Attempting to install Firefox on a a non-GTK+ based Linux build such as KaOSx, which is Qt based (details on KaOSx at the time of this writing: KDELibs version 4.1.4.3, Qt version 4.8.6, 64bit) would install GTK+ libraries along with it in order to enable Firefox to work on the Qt system. There are rumors of a Firefox Qt that is in the works. On Linux, libraries will be typically found as .so files. One library that ...
Drawing and Event Handling - Plugins
highlight on a mouse-down event or draw animation at idle time, it must save the current setting of the port, set up its drawing environment as appropriate, draw, and then restore the port to the previous settings. In this case, the plug-in makes it unnecessary for the browser to save and restore its port settings before and after every call into the plug-in. The browser and the plug-in can both install Drag Manager handlers for the shared port. Because the Drag Manager calls both handlers no matter where the cursor is, the browser does not show the drag highlight when the cursor is over an instance rectangle. Also, the browser does nothing when a drop occurs within an instance rectangle. The plug-in can then show the drag highlight and handle drops when they occur within the instance rectangle.
...Motif Drawing Area widget for the instance and passes the window ID of the widget in the window field of NPWindow. Additionally, the browser creates an NPSetWindowCallbackStruct object and passes it in the ws_info field of NPWindow. As on Windows, the plug-in can receive all events for the instance, in this case through the widget. If the plug-in needs to receive periodic time messages, it should install a timer or fork a thread. Event Handling for Windowed Plug-ins All imaging and user interface events for a windowed plug-in instance are handled according to the windowing system of its native platform. The Plug-in API provides a native window handle within which an instance does its drawing through the API call NPP_SetWindow. NPP_SetWindow passes the instance an NPWindow object containing the ...
The Web Developer Menu - Firefox Developer Tools
s that are built into Firefox. ...
...nu: On Windows 7, it's under the "Firefox" menu: You'll see that the menu is split into three sections: the first section lists tools that are hosted in the Toolbox, which is a dedicated window for developer tools the second section lists integrated tools that are not hosted in the Toolbox, as well as any tools installed as add-ons (you'll see in the Windows screenshot above that I've installed the Firefox OS Simulator) the third section, "Get More Tools", is a link to more web development add-ons for Firefox ...
DOM Inspector - Firefox Developer Tools
oduction to DOM Inspector A guided tutorial that will help you get started with DOM Inspector. DOM Inspector FAQ Answers to common questions on DOM Inspector. DOM Inspector page at MozillaZine More information on the DOM Inspector. How to build the DOM Inspector Blog post on building the DOM Inspector from source. Getting DOM Inspector Firefox & Thunderbird You may download and install the DOM Inspector from the AMO web site. (Thunderbird users browsing AMO in Firefox should save the installation link, or visit the DOM Inspector for Thunderbird page.) Thunderbird 2 DOM Inspector for Thunderbird 2 is available from Thunderbird Add-ons. Or, build Thunderbird yourself with the following options: ac_add_options --enable-extensions="default inspector" ac_add_options --enable-...
...tallation link, or visit the DOM Inspector for Thunderbird page.) Thunderbird 2 DOM Inspector for Thunderbird 2 is available from Thunderbird Add-ons. Or, build Thunderbird yourself with the following options: ac_add_options --enable-extensions="default inspector" ac_add_options --enable-inspector-apis Mozilla Suite and SeaMonkey Select Tools > Web Development > DOM Inspector. You can install the Sidebar panel via Edit > Preferences > Advanced > DOM Inspector, then simply open up the inspector panel and visit a website. Report a bug in DOM Inspector Use the conveniently named "DOM Inspector" component in Bugzilla. To find out who knows DOM Inspector code and where it lives, see the DOM Inspector module listing. ...
CacheStorage - Web APIs
ject is found, it resolves to false. CacheStorage.keys() Returns a Promise that will resolve with an array containing strings corresponding to all of the named Cache objects tracked by the CacheStorage. Use this method to iterate over a list of all the Cache objects. Examples This code snippet is from the MDN sw-test example (see sw-test running live.) This service worker script waits for an InstallEvent to fire, then runs waitUntil to handle the install process for the app. This consists of calling CacheStorage.open to create a new cache, then using Cache.addAll to add a series of assets to it. In the second code block, we wait for a FetchEvent to fire. We construct a custom response like so: Check whether a match for the request is found in the CacheStorage. If so, serve that. If not,...
...If not, fetch the request from the network, then also open the cache created in the first block and add a clone of the request to it using Cache.put (cache.put(event.request, response.clone()).) If this fails (e.g. because the network is down), return a fallback response. Finally, return whatever the custom response ended up being equal to, using FetchEvent.respondWith. ...
ExtendableEvent.waitUntil() - Web APIs
The ExtendableEvent.waitUntil() method tells the event dispatcher that work is ongoing. It can also be used to detect whether that work was successful. In service workers, waitUntil() tells the browser that work is ongoing until the promise settles, and it shouldn't terminate the service worker if it wants that work to complete. The install events in service workers use waitUntil() to hold the service worker in the installing phase until tasks complete. If the promise passed to waitUntil() rejects, the install is considered a failure, and the installing service worker is discarded. This is primarily used to ensure that a service worker is not considered installed until all of the core caches it depends on are successfully populated. The activate events in service workers use waitUntil() to buf...
... method must be initially called within the event callback, but after that it can be called multiple times, until all the promises passed to it settle. Note: The behaviour described in the above paragraph was fixed in Firefox 43 (see bug 1180274). Syntax extendableEvent.waitUntil(promise); Parameters A Promise. Return value undefined. Example Using waitUntil() within a service worker's install event: addEventListener('install', event => { const preCache = async () => { const cache = await caches.open('static-v1'); return cache.addAll([ '/', '/about/', '/static/styles.css' ]); }; event.waitUntil(preCache()); }); Specifications Specification Status Comment Service WorkersThe definition of 'waitUntil()' in that specification. ...
getVersion - Web APIs
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. getVersion Returns an object representing the version number from the Client Version Registry for the specified component. It is used in both trigger scripts and installation scripts. Method of InstallTrigger object Syntax InstallVersion getVersion ( String component ); Parameters The getVersion method has one parameter: component The name of a component in the Client Version Registry. Returns If Software Inst...
... specified component. It is used in both trigger scripts and installation scripts. Method of InstallTrigger object Syntax InstallVersion getVersion ( String component ); Parameters The getVersion method has one parameter: component The name of a component in the Client Version Registry. Returns If Software Installation is disabled, this method returns NULL. Otherwise, it returns an InstallVersion object representing the version of the component. If the component has not been registered in the Client Version Registry or if the specified component was installed with a null version, this method returns null. Installing a component with a NULL version indicates that the component should always be updated when the opportunity arises. ...
Intersection Observer API - Web APIs
; padding: 20px; } .vertical { color: white; font: 32px "Arial"; } .extra { width: 350px; height: 350px; margin-top: 10px; border: 4px solid rgb(20, 20, 120); text-align: center; padding: 20px; } JavaScript Finally, let's take a look at the JavaScript code that uses the Intersection Observer API to make things happen. Setting up First, we need to prepare some variables and install the observer. const numSteps = 20.0; let boxElement; let prevRatio = 0.0; let increasingColor = "rgba(40, 40, 190, ratio)"; let decreasingColor = "rgba(190, 40, 40, ratio)"; // Set things up window.addEventListener("load", (event) => { boxElement = document.querySelector("#box"); createObserver(); }, false); The constants and variables we set up here are: numSteps A constant which in...
...s obscured. decreasingColor Similarly, this is a string defining a color we'll apply when the visibility ratio is decreasing. We call Window.addEventListener() to start listening for the load event; once the page has finished loading, we get a reference to the element with the ID "box" using querySelector(), then call the createObserver() method we'll create in a moment to handle building and installing the intersection observer. Creating the intersection observer The createObserver() method is called once page load is complete to handle actually creating the new IntersectionObserver and starting the process of observing the target element. function createObserver() { let observer; let options = { root: null, rootMargin: "0px", threshold: buildThresholdList() }; obser...
Transcoding assets for Media Source Extensions - Web APIs
/ https://peach.blender.org/about/ Tools required When working with MSE, the following tools are a must have: ffmpeg -- A command-line utility for transcoding your media into the required formats. You can download a version for your system at the Download FFmpeg page. Extract the executable from the archive file and add it's location to your PATH statement. OSX users can also use homebrew to install ffmpeg. Bento4 -- A set of command-line utilities for getting asset metadata and creating content for DASH. To install, you'll need to build/compile the application yourself from the provided project files/source files, depending on your OS and preferences. See the Building instructions for more details. The prebuilt file is here. Put the contents of the bin directory in the same place as ffmpeg...
... Sample media should be placed in the Bento4 utils directory and worked here. Note: The prebuilt ffmpeg does not include libfdk_aac due to licensing reasons. Bento4 uses this by default, so you need to compile ffmpeg if necessary. ...
NavigatorPlugins - Web APIs
Methods The NavigatorPlugins interface doesn't inherit any methods. NavigatorPlugins.javaEnabled() Read only Returns a Boolean flag indicating whether the host browser is Java-enabled or not. ...
... Methods The NavigatorPlugins interface doesn't inherit any methods. NavigatorPlugins.javaEnabled() Read only Returns a Boolean flag indicating whether the host browser is Java-enabled or not. ...
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
lying service worker take effect immediately for both the current client and all other active clients. Syntax ServiceWorkerGlobalScope.skipWaiting().then(function() { //Do something }); Returns A Promise that immediately resolves with undefined. ...
...iting().then(function() { //Do something }); Returns A Promise that immediately resolves with undefined. Example While self.skipWaiting() can be called at any point during the service worker's execution, it will only have an effect if there's a newly installed service worker that might otherwise remain in the waiting state. Therefore, it's common to call self.skipWaiting() from inside of an InstallEvent handler. The following example causes a newly installed service worker to progress into the activating state, regardless of whether there is already an active service worker. self.addEventListener('install', function(event) { // The promise that skipWaiting() returns can be safely ignored. self.skipWaiting(); // Perform any other actions required for your // service worker to inst...
SpeechSynthesis.onvoiceschanged - Web APIs
Syntax speechSynthesisInstance.onvoiceschanged = function() { ... }; Examples This could be used to populate a list of voices that the user can choose between when the event fires (see our Speak easy synthesis demo.) Note that Firefox doesn't support it at present, and will just return a list of voices when SpeechSynthesis.getVoi...
... Syntax speechSynthesisInstance.onvoiceschanged = function() { ... }; Examples This could be used to populate a list of voices that the user can choose between when the event fires (see our Speak easy synthesis demo.) Note that Firefox doesn't support it at present, and will just return a list of voices when SpeechSynthesis.getVoices() is fir...
Web APIs
Web › API
deOptions AudioParam AudioParamDescriptor AudioParamMap AudioProcessingEvent AudioScheduledSourceNode AudioTrack AudioTrackList AudioWorklet AudioWorkletGlobalScope AudioWorkletNode AudioWorkletNodeOptions AudioWorkletProcessor AuthenticatorAssertionResponse AuthenticatorAttestationResponse AuthenticatorResponse B BaseAudioContext BasicCardRequest BasicCardResponse BatteryManager BeforeInstallPromptEvent BeforeUnloadEvent BiquadFilterNode Blob BlobBuilder BlobEvent Bluetooth BluetoothAdvertisingData BluetoothCharacteristicProperties BluetoothDevice BluetoothRemoteGATTCharacteristic BluetoothRemoteGATTDescriptor BluetoothRemoteGATTServer BluetoothRemoteGATTService Body BroadcastChannel BudgetService BudgetState BufferSource ByteLengthQueuingStrategy ByteStrin...
... IDBFactory IDBFactorySync IDBIndex IDBIndexSync IDBKeyRange IDBLocaleAwareKeyRange IDBMutableFile IDBObjectStore IDBObjectStoreSync IDBOpenDBRequest IDBRequest IDBTransaction IDBTransactionSync IDBVersionChangeEvent IDBVersionChangeRequest IIRFilterNode IdleDeadline ImageBitmap ImageBitmapRenderingContext ImageCapture ImageData Index InputDeviceCapabilities InputEvent InstallEvent InstallTrigger IntersectionObserver IntersectionObserverEntry InterventionReportBody K Keyboard KeyboardEvent KeyboardLayoutMap KeyframeEffect KeyframeEffectOptions L LargestContentfulPaint LayoutShift LayoutShiftAttribution LinearAccelerationSensor LinkStyle LocalFileSystem LocalFileSystemSync LocalMediaStream Location Lock LockManager LockedFile M MIDIAccess MIDIConn...
Event reference
losed. animationcancel AnimationEvent CSS Animations A CSS animation has aborted. animationend AnimationEvent CSS Animations A CSS animation has completed. animationiteration AnimationEvent CSS Animations A CSS animation is repeated. animationstart AnimationEvent CSS Animations A CSS animation has started. appinstalled Event Web App Manifest A web application is successfully installed as a progressive web app. audioprocess AudioProcessingEvent Web Audio APIThe definition of 'audioprocess' in that specification. The input buffer of a ScriptProcessorNode is ready to be processed. audioend Event Web Speech API The user agent has finished capturing audio for speech...
... wheel WheelEvent DOM L3 A wheel button of a pointing device is rotated in any direction. Non-standard events Event Name Event Type Specification Fired when... afterscriptexecute Event Mozilla Specific A script has been executed. beforescriptexecute Event Mozilla Specific A script is about to be executed. beforeinstallprompt Event Chrome specific A user is prompted to save a website to a home screen on mobile. DOMMouseScroll Mozilla specific The wheel button of a pointing device is rotated (detail attribute is a number of lines). (use wheel instead) dragdrop DragEvent Mozilla specific An element is dropped (use drop instead). dragexit DragEvent ...
Media container formats (file types) - Web media technologies
73 (desktop only), Firefox 4, Opera 10.6, Safari (WebRTC only) [1] Unless otherwise specified, both mobile and desktop browser compatibility is implied if a browser is listed here. Support is also implied only for the container itself, not for any specific codecs. [2] Available only if available on the underlying operating system's media framework. [3] Requires Web Media Extensions to be installed. 3GP The 3GP or 3GPP media container is used to encapsulate audio and/or video that is specifically intended for transmission over cellular networks for consumption on mobile devices. The format was designed for use on 3G mobile phones, but can still be used on more modern phones and networks. However, the improved bandwidth availability and increased data caps on most networks has reduced th...
...ncompressed, so be aware of that before using it for large audio samples. FLAC is a very good choice, due to its lossless compression, if the target browsers all support it. Unfortunately, neither of the relatively major lossless compression formats (FLAC and ALAC) are universally supported. FLAC is the more broadly supported of the two, but is not supported by macOS without additional software installed, and is not supported at all on iOS. If you need to offer lossless audio, you may need to provide both FLAC and ALAC to get close to universal compatibility. Container selection advice The tables below offer suggested containers to use in various scenarios. These are just suggestions. Be sure to consider the needs of your application and your organization before selecting a container format. ...
OpenSearch description format
links to other browsers' documentation.) Firefox also supports additional features not in the OpenSearch standard, such as search suggestions and the <SearchForm> element. This article focuses on creating OpenSearch-compatible search plugins that support these additional Firefox features. OpenSearch description files can be advertised as described in Autodiscovery of search plugins, and can be installed programmatically as described in Adding search engines from web pages. OpenSearch description file The XML file that describes a search engine follows the basic template below. Sections in [square brackets] should be customized for the specific plugin you're writing. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2...
...ts Firefox users visit the web site directly. Note: Since this element is Firefox-specific, and not part of the OpenSearch specification, we use the moz: XML namespace prefix in the example above to ensure that other user agents that don't support this element can safely ignore it. Autodiscovery of search plugins Web sites with search plugins can advertise them so Firefox users can easily install the plugins. To support autodiscovery, add a <link> element for each plugin to the <head> of your web page: <link rel="search" type="application/opensearchdescription+xml" title="searchTitle" href="pluginURL"> Replace the bolded items as explained below: searchTitle The name of the search to perform, such as "Search MDC" or "Yahoo! Search". This must match your plugin fi...
Structural overview of progressive web apps - Progressive web apps (PWAs)
In this structural overview, we'll look at the features that make up a standard web application, as well as some design patterns you can follow when building your PWA. Architecture of an app There are two main, different approaches to rendering a website -- on the server or on the client. ...
...pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesImages = []; for(var i=0; i<games.length; i++) { gamesImages.push('data/img/'+games[i].slug+'.jpg'); } var contentToCache = appShellFiles.concat(gamesImages); With the file list prepared, it's time to install the service worker itself. The service worker will actually handle caching all the listed files. self.addEventListener('install', function(e) { console.log('[Service Worker] Install'); e.waitUntil( caches.open(cacheName).then(function(cache) { console.log('[Service Worker] Caching all: app shell and content'); return cache.addAll(contentToCache); }) ); }); With that d...
Modules - Archive of obsolete content
structors of the loading script, which are defined on its global object. The problem with breaking encapsulation like this is that malicious scripts can use it to get the loading script to execute arbitrary code, by overriding one of the methods on the built-in constructors. If the loading script has chrome privileges, then so will any methods called by the loading script, even if that method was installed by a malicious script. To avoid problems like this, the object passed to loadSubScript should be a true global object, having its own instances of the built-in constructors. This is exactly what sandboxes are for. A sandbox is a global object that lives in a separate compartment. Compartments are a fairly recent addition to SpiderMonkey, and can be seen as a separate memory space. Objects livi...
SDK and XUL Comparison - Archive of obsolete content
on and have it work on both products. Security If they're not carefully designed, Firefox add-ons can open the browser to attack by malicious web pages. Although it's possible to write insecure add-ons using the SDK, it's not as easy, and the damage that a compromised add-on can do is usually more limited. Restartlessness Add-ons built with the SDK can be installed without having to restart Firefox. Although you can write traditional add-ons that are restartless, you can't use XUL overlays in them, so most traditional add-ons would have to be substantially rewritten anyway. User Experience Best Practices The UI components available in the SDK are designed to align with the usability guidelines for Firefox, giving your users a be...
XUL Migration Guide - Archive of obsolete content
e drastic changes to the browser chrome will very probably need more than the SDK's supported APIs can offer. Similarly, the supported APIs expose only a small fraction of the full range of XPCOM functionality. Using Third Party Packages The SDK is extensible by design: developers can create new modules filling gaps in the SDK, and package them for distribution and reuse. Add-on developers can install these packages and use the new modules. If you can find a third party package that does what you want, this is a great way to use features not supported in the SDK without having to use the low-level APIs. See the guide to adding Firefox menu items. Some useful third party packages are collected in the Jetpack Wiki. Note, though, that by using third party packages you're likely to lose the sec...
self - Archive of obsolete content
rticular add-on. name This property contains the add-on's short name. It comes from the name property in the main package's package.json file. version This property contains the add-on's version string. It comes from the version property set in the package.json file in the main package. loadReason This property contains of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade isPrivateBrowsingSupported This property indicates whether or not the add-on supports private browsing. It comes from the private-browsing key in the add-on's package.json file. data The data object is used to access data that was bundled with the add-on. This data lives in the add-on's data/ directory, immediately below the package.json file. All files in th...
/loader - Archive of obsolete content
addObserver(observer, 'sdk:loader:destroy', false); Unload The loader module exposes an unload() function that can be used to unload specific loader instance and undo changes made by modules loaded into it. unload takes loader as a first argument and optionally a reason string identifying the reason why this loader was unloaded. For example in the SDK reason may be one of: shutdown, disable, uninstall. unload(loader, 'disable'); Calls to this function will dispatch the unload observer notification that modules can listen to as described above. Other Utilities The loader module exposes several other utility functions that are used internally and can also be handy while bootstrapping the loader itself. They are low level helpers and should be used only during loader bootstrap. Module() The...
system/unload - Archive of obsolete content
ct An object that defines a destructor method. name : string Optional name of the destructor method. Default is unload. when(callback) Registers a function to be called when the module is unloaded. Parameters callback : function A function that will be called when the module is unloaded. It is called with a single argument, one of the following strings describing the reason for unload: "uninstall", "disable", "shutdown", "upgrade", or "downgrade". If a reason could not be determined, undefined will be passed instead. Note that if an add-on is unloaded with reason "disable", it will not be notified about "uninstall" while it is disabled. See bug 571049. ...
Creating Reusable Modules - Archive of obsolete content
To learn how to use third-party modules in your own code, see the tutorial on adding menu items. ...
Logging - Archive of obsolete content
ery tab the user loads, by calling console.log() inside a content script: require("sdk/tabs").on("ready", function(tab) { tab.attach({ contentScript: "console.log(document.body.innerHTML);" }); }); console Output If you are running your add-on from the command line (for example, executing jpm run or jpm test) then the console's messages appear in the command shell you used. If you've installed the add-on in Firefox then the messages appear in Firefox's Browser Console. But note that by default, calls to console.log() will not result in any output in the Error Console for any installed add-ons: this includes add-ons installed using the Add-on Builder or using tools like the Extension Auto-installer. See "Logging Levels" in the console reference documentation for more information on ...
Localization - Archive of obsolete content
an add-on which has many localizations, because you're using the default language strings both as user interface strings and as keys to look up your translations. This means that if you want to change the wording of a string in the default language, or fix a typo, then you break all your locale files. Locale updater The locale updater add-on makes it easier to update locale files. Once you've installed it, open the Add-on Manager, and you'll see a new button labeled "Update l10n" next to each add-on you've installed: Click the button and you'll be prompted for a new .properties file for that add-on. If you provide a new file, the add-on's locale data will be updated with the new file. Limitations The current localization support is a first step towards full support, and contains a number...
Add-on SDK - Archive of obsolete content
Using the Add-on SDK, you can create Firefox add-ons. You can use various standard Web technologies: JavaScript, HTML, and CSS, to create the add-ons. The SDK includes JavaScript APIs, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons. Tutorials Getting started How to install the SDK and use the jpm tool to develop, test, and package add-ons. Interact with the browser Open web pages, listen for pages loading and list open pages. Development techniques Learn about common development techniques, such as unit testing, logging, creating reusable modules, localization, and mobile development. Create user interface components Create user interface components such as toolbar buttons, context menus, menu items, and dialogs. Modify web...
Alerts and Notifications - Archive of obsolete content
Basic modal alert alert('hello'); Pop-ups The following code presents a non-modal pop-up, which automatically disappears after an appropriate delay. It uses nsIAlertsService. ...
Preferences - Archive of obsolete content
tions (Firefox 1.0, Thunderbird 1.0, and the like but not the Mozilla Suite) read extension defaults -- usually located in (profile folder)/extensions/(ID)/defaults/preferences/ These files use simple JavaScript-like syntax. To add a default value for a preference, you should add a line like this to your default preferences file: pref("extensions.extensionname.preferencename", false); How to install an extension's defaults files For Mozilla Suite (not Firefox and Thunderbird), copy them to (appdir)/defaults/pref in your install script. For Firefox/Thunderbird, just put them in myext.xpi/defaults/preferences/. They will be copied and registered with the preferences system automatically. More about preferences "branches" Preference names consist of a few strings separated with dots, and re...
Extension Etiquette - Archive of obsolete content
e, use context menu items sparingly -- only for tasks that are done frequently or on specific elements of a web page. Focus Don't steal focus. It's not your extension's job to take focus from the web content. If the user loads a website and they ask for focus, they should get it. Overriding their request isn't very nice. About dialogs There is a default popup About dialog that is created from install.rdf data; creating a new XUL About box is usually unnecessary. You can decrease download size by omitting a customized About box. Make one only if you have a special feature that needs to be included -- for example, a custom updater. Theming If you have XUL buttons in your extension that do functions similar to ones that already exist in a browser -- for example, a feed reader that reloads and ...
Inline options - Archive of obsolete content
tification, which has the same subject and data as above, to find out when the UI is about to be removed. Use this notification to remove event listeners, or any other references that might otherwise be leaked. Locating the options file There are two ways to let the Add-on Manager find your options file: Method 1 Name the file options.xul and put it in the extension's root folder (alongside install.rdf). This method does not require you to create a chrome.manifest and set it's path. This method does not require you to specify optionsType in install.rdf. Method 2 Use install.rdf to identify the XUL file used for displaying the options. This requires that you register a content path in the chrome.manifest. You must also specify the optionsType as 2: <em:optionsURL>chrome://myaddon/content/...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
Please be aware that if you attempt to open this sample directly in Firefox, it will not run correctly. Menus Hierarchically structured dropdown menus are the part of the user interface used for frequently accessed functions in an application or web service. In the past, a combination of HTML and JavaScript was used to produce this sort of complex UI structure, but in XUL, it ...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
pplication Data\Mozilla\Firefox\Profiles\random number.default\ ; On Linux, it will be ~/.mozilla/firefox/random number.default/ ; On Mac OS X, it will be ~/Library/Application Support/Firefox/Profiles/random number.default/ In the interests of security, delete these lines from prefs.js after finishing these tests. Note that Firefox itself and its extensions have privileges set by default after installation and registration. Extensions don't need special code like that in Listing 2 in order to get privileges. FIXME: We should advise against using such method FIXME: Figure 1: Dialog requesting privileges Listing 3: Grant privileges without manual confirmation for a specific file user_pref("capability.principal.codebase.test.granted", "UniversalXPConnect"); user_pref("capability.principal.cod...
Connecting to Remote Content - Archive of obsolete content
You can still use RDF as an intermediate format, though, and then use templates to generate XUL and display the data. HTTP debugging When you start debugging HTTP requests, you may find it hard to know exactly what data was sent, especially with POST data. We recommend you to use extensions like Tamper Data. They help you to track HTTP/HTTPS requests and responses occurring in Firefox. After installation, you can find a Tamper Data menu item in the menu bar: Tools > Tamper Data or View > Sidebar > Tamper Data Once you open the Tamper Data view, all requests and responses will begin to appear in it. You can discover some interesting things about Firefox like this, such as the automatic update URLs for extensions, and the behavior of web applications such as Gmail. If you click on the "...
Mozilla Documentation Roadmap - Archive of obsolete content
ization, job postings and a long list of add-on ideas waiting to be developed. The Mozilla Source Sometimes you need more than just a tutorial. There are various tricks that you can't learn anywhere, but you know that Firefox implements them in some way. In these cases you should dive into Mozilla's source code and try to locate the code you need. One way to do this is to look into your Firefox installation directory, maybe unpack a few JARs and see what's inside. But this is very awkward and limited. It would be much better to be able to search and navigate through the huge code base with some ease. Luckily, Mozilla provides exactly that in the Mozilla Cross-Reference. The main index in this page gives you options to look into the different product branches in development at Mozilla. Make sur...
The Box Model - Archive of obsolete content
sp this simple idea, you'll be able to use the DOM Inspector and CSS to mold XUL elements and layouts with great precision and flexibility. Most of the examples shown in the rest of this section were generated using the XUL Box Alignment Example. We recommend you play around with it for a while to get an idea of how the basic parts of the box model work. In order to use this page, you'll need to install the Remote XUL Manager extension and add developer.mozilla.org to the whitelist. Boxes A XUL box is very similar to an HTML div. It's an invisible rectangular container with no styling at all (divs may have some default styling, though). Their behavior is similar. However, one of the fundamental differences between XUL and HTML has been the fact that XUL boxes can be oriented vertically or hori...
Useful Mozilla Community Sites - Archive of obsolete content
few minutes to fill a couple of forms. But this won't make your extension public right away. AMO has a Review Process that prevents malicious, insecure or low quality extensions to make it to the public site. Your extension begins in a sandbox with limited access, and once you nominate it an editor will review it and see if it is appropriate for the public AMO site, where everyone can see it and install it. The review process often takes a few weeks. Just be patient and make sure your extension follows AMO's policies when you nominate it. You can still get a good number of downloads while being in the sandbox. One of the main advantages of using AMO is that it handles updates automatically for published add-ons. You just need to upload a new version of your extension, and once it's approved it ...
User Notifications and Alerts - Archive of obsolete content
ended way of displaying alerts and notifications. There's a catch, though: these notifications are inside the current tab, so switching tabs will make a notification disappear. The notification shows up again when you come back to the tab that displayed it. This means that these notifications make the most sense when they are related to the page currently being displayed, such as a page trying to install an add-on, or a site you just entered a password on. Notification boxes are very easy to create, and are very customizable: let nb = gBrowser.getNotificationBox(); let acceptButton = new Object(); let declineButton = new Object(); let message = this._bundle.getString("xulschoolhello.friendMessage.label"); let that = this; acceptButton.label = this._bundle.getString("xulschoolhello.accept...
Extensions support in SeaMonkey 2 - Archive of obsolete content
Starting with SeaMonkey 2 Alpha 1 SeaMonkey supports toolkit/-style extensions. These type of extensions have many advantages for both users and developers compared to the old xpinstall/-style extensions. The Basics To support SeaMonkey 2 as a target application, you need to add it to the list of target applications in the extension's install.rdf file. The code for that will look something like this: <em:targetApplication> <!-- SeaMonkey --> <Description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minVersion>2.0</em:minVersion> <em:maxVersion>2.*</em:maxVersion> </Description> </em:targetApplication> The install.js is not supported any more and should be removed. Differences as compared to other toolkit/-based applications You need to overlay/open diff...
Session store API - Archive of obsolete content
t will need in order to restore its state, and then call getTabValue() to retrieve the previous setting when the tab is restored. The Session Store API is implemented using the nsISessionStore interface. Knowing when to restore Each time Firefox is about to restore a tab, an event of type SSTabRestoring is sent. ...
Firefox addons developer guide - Archive of obsolete content
hapter. See the XUL Reference, for example. Each chapter should be tagged appropriately, based on content, and every chapter should include the tag "Firefox addons developer guide". Instead of using footnotes, we should inline these notes into the body of the article. Apostrophes are being done using curly apostrophes instead of straight ones as is done everywhere else in MDC. The stuff about installing the DOM inspector (https://developer.mozilla.org/En/Firefox_addons_developer_guide/Let%27s_build_a_Firefox_extension#Install_the_DOM_Inspector) is not accurate for Firefox 3 or later, since it's no longer included in the Firefox installer and must be downloaded from AMO. Filenames should use <code> styling. This is available from the Style drop-down menu in the editor. Variable and function...
List of Former Mozilla-Based Applications - Archive of obsolete content
er) Video Switched from XULRunner to WebKit in version 3.0.2 Moblin Browser Browser When Moblin became Meego it switched from a custom Gecko-based browser to Chrome Nautilus File manager Hasn't used Mozilla code since version 2.0 Raptr client Gaming client Was a XULRunner app initially but now uses Adobe AIR Rift Technologies Software installation over Internet No longer using Mozilla technology -- need confirmation and details Second Life Virtual world desktop client Switched from embedded Mozilla browser to a plugin architecture with a qtwebkit plugin Applications that are no longer being developed Name Description Additional Information Aphrodite Browser Inactive AOL ...
Localizing an extension - Archive of obsolete content
program works, and isn't something that you have to do. Then we replace any occurrences of the literal strings with the appropriate variables: samplePanel.tooltipText = changeString + fieldArray[4] + " | " + openString + fieldArray[5] + " | " + lowString + fieldArray[6] + " | " + highString + fieldArray[7] + " | " + volumeString + fieldArray[8]; Localizing the description in install.rdf See Localizing extension descriptions. Adding more localizations To add another localization for a new language, all you need to do is add another line to the chrome manifest referencing the new locale. For example, to add a Spanish localization, you would add: locale stockwatcher2 es-ES chrome/locale/es-ES/ Then just create a subdirectory chrome/locale/es-ES and add the needed DTD files; i...
Bypassing Security Restrictions and Signing Code - Archive of obsolete content
(aside from abuse), and its complexity made performance improvements difficult. Signed script segregation was removed in bug 726125, the enablePrivilege prompt was removed in bug 750859, and enablePrivilege itself was nerfed in bug 757046. The Privilege Manager has been deprecated in Firefox 12 and disabled in Firefox 17. Sites that require additional permissions should now ask Firefox users to install an extension, which can interact with non-privileged pages if needed. ...
Source Navigator - Archive of obsolete content
t as compared to mxr. (I think.) You can specify whether it's the declaration/definition of a method/function to look up... but on the other hand mxr can only allow you to type in the name for it to generate a long list of occurances. (as I understand. Let me know if this is wrong..) It can generate a class hierarchy quite easily (unfortunately, not for classnames which are defined by macro.) Installing Source Navigator In Ubuntu Execute the following line in a terminal window: sudo apt-get install sourcenav This should install source-navigator. One can check whether the installation is complete by executing: $ which snavigator /usr/bin/snavigator Importing the source Execute the following: snavigator. This triggers a splash screen, followed by a "Source-Navigator Projects" dialog as t...
Automated testing tips and tricks - Archive of obsolete content
TODO: check example code in to the tree somewhere How to quit the browser on all platforms window.close() of the last open window does not quit the application on Mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///Users/davel/Work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul How to create a new profile from the command line First, use the -CreateProfile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -CreateProfile "testprofile ${PROFILE_...
Protecting Mozilla's registry.dat file - Archive of obsolete content
r The easyest way to put into place the registry.dat file for a user would theoretically be to put it into the user's profile directory on the server. However, this issue is problematic, because: When the users logs in for the first time, Windows 2000 apparently doesn't load the profile from the server... In other Windows versions, Internet Explorer (which is hard to kick off completely) likes to install "Personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wiping any non-microsoft subfolders from %USERPROFILE%\Application Data, including Mozilla's . In order to prevent this, it's preferable to have mozilla's registry.dat file copied over from the server using the logon script. Moreover, it's advisable to "protect" the mozilla r...
Finding the file to modify - Archive of obsolete content
menu, select the Inspect a Window submenu, then select the Mozilla browser window item (named after the page currently loaded in the browser). The DOM Inspector will display the URL of the XUL file that defines the Mozilla browser window, which is chrome://navigator/content/navigator.xul. A chrome URL is a URL used internally by Mozilla to refer to files in the chrome subdirectory of the Mozilla installation directory. Chrome URLs have paths that do not necessarily refer to a precise directory hierarchy. In this case the chrome URL refers to the file located at mozilla-installation-directory/chrome/content/navigator/navigator.xul. [explain further, http://www.mozilla.org/xpfe/ConfigChromeSpec.html] << PreviousNext >> ...
Specifying the appearance - Archive of obsolete content
tus="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-busted.png"); } Mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have to add these rules to each set (and have our extension break when a new set gets installed), so we'll put this stylesheet in a file called tinderstatus.css in the same directory as navigator.xul and reference it at the top of that file right under the global stylesheet reference: <?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?> <?xml-stylesheet href="chrome://navigator/content/tinderstatus.css" type="text/css"?> Our CSS rules use the list-style-image pr...
Creating a hybrid CD - Archive of obsolete content
Ascii 'CWIE' 'TEXT' "Symbol export file" .mcp Raw 'CWIE' 'MMPr' "CodeWarrior project file" .r Ascii 'MPS ' 'TEXT' "Rez file" .html Ascii 'MOSS' 'TEXT' "HTML file" .htm Ascii 'MOSS' 'TEXT' "HTML file" .txt Ascii 'MOSS' 'TEXT' "text file" README Ascii 'MOSS' 'TEXT' "text file" CHANGES Ascii 'MOSS' 'TEXT' "text file" INSTALL Ascii 'MOSS' 'TEXT' "text file" LICENSE Ascii 'MOSS' 'TEXT' "text file" .gif Raw 'ogle' 'GIFf' "GIF file" .png Raw 'ogle' 'PNG ' "PNG file" .jpg Raw 'ogle' 'JPEG' "JPEG file" .jpeg Raw 'ogle' 'JPEG' "JPEG file" .pl Ascii 'McPL' 'TEXT' "Perl file" .pm Ascii 'McPL' 'TEXT' "Perl module file" .xml Ascii '...
In-Depth - Archive of obsolete content
ge-region: rect(168px 69px 189px 46px); -moz-opacity Makes boxes semi-transparent. It takes a decimal value, 0.00 is invisible and 1.00 is totally visible. How do I know what to Modify? Now that you've got everything extracted and you know how to modify items, you might be wondering, how do I know where everything is? Well there is an easy way to find out - Using the DOM Inspector. If you didn't install it when you first installed Mozilla you may have to run the installer again. Load mozilla and one browser window. Then open the DOM Inspector (Tools->Web Development->DOM Inspector). Click File->Inspect and select the browser window. What appears in a tree view below is the actual code for the interface. Using this, we can figure out what objects are where, what classes/id's they have applied to ...
Creating regular expressions for a microsummary generator - Archive of obsolete content
ial, the only XML special character we have to escape is the ampersand. Here is what the <pages> section might look like in a microsummary generator for eBay auction item pages: <pages> <include>^http://cgi\.ebay\.com/.*QQitemZ.*QQcmdZViewItem</include> <include>^http://cgi\.ebay\.com/ws/eBayISAPI\.dll\?ViewItem&amp;.*item=</include> </pages> To see these regular expressions in action, install the eBay auction item microsummary generator available from this page of example generators. ...
Dehydra - Archive of obsolete content
ts. It was also useful to find bugs in source code as it allows for much more error checking than C++ is capable of by itself. Dehydra was built as a GCC plugin, thus it is easy to use for projects that already support GCC. Dehydra is also useful for generating language bindings and is used to bootstrap Treehydra, a heavy-duty static analysis GCC plugin. Documentation Installing Dehydra Download, installation and dependency info for Dehydra Using Dehydra Examples for getting started writing analysis scripts. Dehydra Function Reference Callback and utility functions for Dehydra scripts. Dehydra Object Reference Javascript objects and properties provided by Dehydra. Dehydra FAQ Answers to common questions Static Analyses...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
ng In order to embed Mozilla in your Java application, you will need to add the library MozillaInterfaces.jar (located in xulrunner/sdk/lib folder) to your classpath. This library provides the interfaces necessary to bootstrap Mozilla and call XPCOM methods. To start embedding, we use the methods provided by the Mozilla singleton class. ...
Downloading Nightly or Trunk Builds - Archive of obsolete content
", meaning the version before trunk (though it can be any version before trunk); and "next", meaning a possible version in the future. So, if you are looking for the cutting edge Firefox, you probably want a mozilla branch nightly build, that is, look for a mozilla thing (not a Firefox thing), not the breaky one on trunk, but the most recent branch, and built very fresh (last night!), so you can install it. For Firefox 3.5 that would be latest-mozilla-1.9.1 in https://archive.mozilla.org/pub/firefox/nightly/. trunk build. A trunk build is a build made off the trunk, i.e., the latest, newest, but also least stable and most buggy state of the source. Trunk builds are provided so that one can execute tests without going to the trouble of building the source. The current trunk is mozilla 1.9.2. t...
JSS build instructions for OSX 10.6 - Archive of obsolete content
The following build instructions were provided by PAVRW. The generic instructions didn't work to build on OSX 10.6.7. ...
Settings - Archive of obsolete content
variable must be an object that contains a property named settings. The value of the settings property is an array of objects representing the settings to expose to users. Jetpack will automatically generate a user interface from this specification that users of your jetpack may use to customize the settings. The user can open this interface from the "settings" button next to your jetpack on the "Installed Features" tab of the about:jetpack page. Here is an example manifest definition: var manifest = { settings: [ { name: "twitter", type: "group", label: "Twitter", settings: [ { name: "username", type: "text", label: "Username" }, { name: "password", type: "password", label: "Password" } ] }, { name: "facebook", type: "group"...
Settings - Archive of obsolete content
ariable must be an object that contains a property named settings. The value of the settings property is an array of objects representing the settings to expose to users. Jetpack will automatically generate a user interface from this specification that users of your jetpack may use to customize the settings. The user can open this interface from the "settings" button next to your jetpack on the "Installed Features" tab of the about:jetpack page. Here is an example manifest definition: var manifest = { settings: [ { name: "twitter", type: "group", label: "Twitter", settings: [ { name: "username", type: "text", label: "Username" }, { name: "password", type: "password", label: "Password" } ] }, { name: "facebook", type: "group"...
Simple Storage - Archive of obsolete content
variable to emphasize the fact that jetpack.storage.simple is just a normal JavaScript object. They could have simply used jetpack.storage.simple directly. Here's a complete real-world example. It's a simple note-taking jetpack. Select some text on the page, right-click, and select Note. The text will be remembered across browser restarts as a note. All notes are shown in the Tools menu. You can install this example from the Jetpack Gallery. jetpack.future.import("menu");jetpack.future.import("selection");jetpack.future.import("storage.simple");// Create the persistent notes array if it doesn't already exist.jetpack.storage.simple.notes = jetpack.storage.simple.notes || [];var notes = jetpack.storage.simple.notes;// Updates the Jetpack menu with the current notes. We'll add a Notes menu with// ...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
es the button's context menu. Left-click the button to show popupMenu: var button = $("<div />", document); button.text("Click Me"); var contextMenu = new jetpack.Menu(["Do This", "Do That", "And the Other"]); contextMenu.contextOn(button); var popupMenu = new jetpack.Menu(["Frumpy", "Frimpy", "Frompy"]); popupMenu.popupOn(button); Complete jetpacks See a complete, real-word example that you can install in the simple storage documentation. Check also jetpacks tagged with "tutorial" at the Jetpack Gallery. ...
Simple Storage - Archive of obsolete content
variable to emphasize the fact that jetpack.storage.simple is just a normal JavaScript object. They could have simply used jetpack.storage.simple directly. Here's a complete real-world example. It's a simple note-taking jetpack. Select some text on the page, right-click, and select Note. The text will be remembered across browser restarts as a note. All notes are shown in the Tools menu. You can install this example from the Jetpack Gallery. jetpack.future.import("menu"); jetpack.future.import("selection"); jetpack.future.import("storage.simple"); // Create the persistent notes array if it doesn't already exist. jetpack.storage.simple.notes = jetpack.storage.simple.notes || []; var notes = jetpack.storage.simple.notes; // Updates the Jetpack menu with the current notes. We'll add a Notes menu...
Microsummary XML grammar reference - Archive of obsolete content
r all microsummary generators, and should contain the remainder of the XML code describing the generator. Attributes: name (required) A descriptive, human-readable name for the microsummary created by the generator. uri (optional) A valid URI uniquely identifying the generator. Only relevant for generators dynamically created by Firefox code and extensions. Generators installed from the web via nsSidebar::addMicrosummaryGenerator are identified by the remote URL from which they were downloaded, and Firefox ignores the value of this attribute for them. Child Elements: <template> (required) Defines how to transform pages into their microsummaries. <pages> (required) Identifies the set of pages that the generator is able to summarize. ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
t engine has built-in support for debugging, and thus can provide powerful tools for JavaScript developers. Venkman, shown in Figure 3, is a powerful, cross-platform JavaScript debugger that integrates with Mozilla. It is usually bundled with Mozilla releases; you can find it at Tools -> Web Development -> JavaScript Debugger. For Firefox, the debugger isn't bundled; instead, you can download and install it from the Venkman Project Page. You can also find tutorials at the development page, located at the Venkman Development Page. Figure 3. Mozilla's JavaScript debugger The JavaScript debugger can debug JavaScript running in the Mozilla browser window. It supports such standard debugging features as breakpoint management, call stack inspection, and variable/object inspection. All features are ...
Modularization techniques - Archive of obsolete content
. Can I use C? You can use C everywhere except your interface. There are mechanisms for declaring interfaces in C, but they're pretty gruesome and compiler dependent, and we're trying to make this as light weight as possible. Why not COM? The only platform for which COM support is currently widely available is Windows. Microsoft ships a COM extension for the Macintosh, but it's generally only installed with Internet Explorer or Microsoft Office. UNIX support for COM is scarce. Why not COM on Windows? Because it's not a cross platform solution, and that's what we need. We're going to make every effort to make our interfaces compatible with COM on platforms that support it, so it may not matter. But no promises, yet. What are the major differences? Instead of Microsoft's MIDL compiler, we a...
Monitoring downloads - Archive of obsolete content
I that allows any number of listeners to observe downloads. This article demonstrates how to monitor downloads in Firefox 3, using the Download Manager. As a nice bonus, it also demonstrates how to use the Storage API to issue sqlite commands on a database. The result is a window you can open by choosing "Download log" in the Tools menu, which lists all downloads that have been started since you installed the extension. In the list is the name of the file, the start and end times of the download, the download speed, and the status of the download. A tooltip is included that displays the full source URL of the file. Download the full sample. Setting up When the extension loads, it will do some housekeeping chores. In particular, it needs to get an instance of the Download Manager's nsIDownload...
Mozilla Application Framework - Archive of obsolete content
ou need. XPCOM A simple, cross-platform component model with multiple language bindings and IDL descriptions so you can plug your custom functionality into the framework and connect it with other components. Web Services Built-in support for XMLHttpRequest, XML-RPC, SOAP, and WSDL to enable Mozilla-based application authors to take advantage of the exploding world of web services. XPInstall Our cross-platform installer for trivial packaging and installation of your Mozilla framework applications. and much much more... Tools Venkman A JavaScript debugger with support for breakpoints, conditional breakpoints, local variable inspection, watch variables, single step, stop on error, profile data collection, report generation, code reformatting (pretty printing), and more. DOM...
Mozilla Crypto FAQ - Archive of obsolete content
ire further development, and may not be available until after the Mozilla 1.0 release. Finally, note that NSS (and thus PSM) can also be built using a licensed copy of the RSA BSAFE Crypto-C library (versions 4.1 or 5.0). iPlanet E-Commerce Solutions has released Netscape-branded binary versions of Personal Security Manager that incorporate the RSA BSAFE Library; the Netscape PSM software can be installed and used with binary Mozilla versions. For the very latest information about PSM, NSS, and other crypto-related Mozilla developments, see the mozilla.dev.tech.crypto newsgroup or the corresponding dev-tech-crypto mailing list. For more information on NSS 3.1 see the NSS 3.1 plan and the NSS 3.1 build instructions; for more information on PSM 1.3 see the PSM 1.3 task list posted by David Drinan...
Plug-n-Hack Phase1 - Archive of obsolete content
ConfigureSecToolFailed - this notifies the document that configuration has failed for some reason. The user should be notified that configuration has failed. ConfigureSecToolSucceeded - this notifies the document that configuration has succeeded. The user can be given a message to this effect. ConfigureSecToolActivated - this notifies the document that PnH support (p...
BlogPosts - Archive of obsolete content
Just Browsing: Mozilla Prism Update ThansCorner: Mozilla Prism - Webrunner with Pazzaz Mozilla Prism - A Revolution in Web Apps ThansCorner: Mozilla WebRunner 0.7 Site Specific Browsers WebRunner Using WebRunner WebRunner + Gears = Offline Desktop Reader WebRunner 0.5 WebRunner 0.5 - Mac Support WebRunner 0.5 - Linux Install WebRunner, Google Reader, and Google Notebook Distraction Free GTD - 32+ web app files for online todo lists Mozilla WebRunner: a one-window, tabless browser with no URL bar WebRunner becomes Prism - A Mozilla Labs Project Mozilla Labs: Prism Alex Faaborg: Prism Mozilla Prism: Bringing Web Apps to the Desktop Everyone should use Site Specific Browsers Mozilla Prism Portable (Spanish) Prism, l'avenir des applications Web selon Mozilla (French) Mozilla Prism : bundle cu...
BundleLibrary - Archive of obsolete content
dle-google-reader-with-gtalk.webapp Google Webmaster Tools: google_webmastertools.webapp GrandCentral Inbox: grandc.webapp (NOTE: GrandCentral requires the Flash plugin. Only way I found to add the flash plugin to WebRunner was to copy my plugins folder from firefox to the webrunner folder. Not the cleanest, but it got all my plugins at once) iStylr: iStylr.webapp online web design tool (Full win installer bundled with Prism is available here - thanks to Lars Eric for his NSIS script) Meebo: meebo.webapp Miro Guide: miroguide.webapp Motor0: motor0.webapp useful webapp on maintenance and fuel consumptions managment Pandora: pandora@prism.app.webapp Internet radio that only plays music you like. reddit: reddit.webapp Remember The Milk: rtm.webapp (NOTE: Should work with Google Gears with some help)...
PyDOM - Archive of obsolete content
han a chrome:// URL can not host Python. ...
Running Windows Debug Builds Downloaded From Tinderbox - Archive of obsolete content
If you run the windows debug builds you will often get "This application has failed to start because the application configuration is incorrect..." This is because the debug builds need the msvc80 crt debug dlls. You can see this by looking in at firefox.exe with http://www.dependencywalker.com/. Unfortunately these DLLs are not redistributable. To get these DLLs you only have to install the Visual C++ compilers from the Windows Vista SDK. No other packages are necessary. If you are a Mozilla employee or contractor, click for more instructions. To run tests of the tests package you can, for example, run the reftests as follows: python reftest/runreftest.py --appname=firefox/firefox.exe --utility-path=bin --extra-profile-file=bin/plugins reftest/tests/layout/reftests/reftest.list ...
Standalone XPCOM - Archive of obsolete content
cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all BUILD_MODULES=xpcom Step 2 : Build XPCOM Standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake Testing Standalone XPCOM xpcom/sample contains a sample application and a component. This should get built by default. nsTestSample is the sample application. This should have been installed in your bin/ directory. libsample.so (unix) is the sample component implementation that the sample application will try to instantiate. This should have been installed in your bin/components directory To run the test, cd to your bin/ directory setenv LD_LIBRARY_PATH . ./nsTestSample Warning: MOZILLA_FIVE_HOME not set. nsNativeComponentLoader: autoregistering begins. nsNativeCompon...
Stress testing - Archive of obsolete content
Tools for Microsoft Windows Consume.exe from the Windows Server 2003 Resource Kit Tools can consume various resources: physical memory, CPU time, page file, disk space and even the kernel pool. Although for Win2003, it should install into WinXP fine (Win2000 compatibility is unknown). The only downside is you can't specify how much of the resource to use, only which one to consume. Also be warned: always remember the -time option, or you may be hitting that physical reset button sooner than you would have liked! ...
Supporting private browsing mode - Archive of obsolete content
er The helper described above is very easy to use. Simply instantiate the helper, then you can use its inPrivateBrowsing flag to detect whether or not private browsing is currently enabled, as shown here: var listener = new PrivateBrowsingListener(); if (listener.inPrivateBrowsing) { // we are in private browsing mode! } else { // we are not in private browsing mode! } In addition, you can install watcher functions to be called when private browsing turns on and off, as shown in the following example. This lets you passively monitor for changes in private browsing status. var listener = new PrivateBrowsingListener(); listener.watcher = { onEnterPrivateBrowsing : function() { // we have just entered private browsing mode! }, onExitPrivateBrowsing : function() { // we have ju...
Running Tamarin performance tests - Archive of obsolete content
lready be pathed to the adb executable in the public sdk/ndk, but if not it exists at /android-public/android-sdk-mac_86/platform-tools. adb supports ssh-like commands to an android device. adb automatically connects to a phone if connected by usb. adb shell "ls /" is a good test to see if connected. The command: $ adb devices lists the device id of each phone. If this fails, do you have a dev OS installed? Under Settings->Applications->Development, is USB Debugging enabled? Testsuite Setup Example commands: Root the phone $ adb root Copy avmshell to /data/app. The shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb push avmshell /data/app/avmshell $ adb shell chmod 777 /data/app/avmshell Copy android_runner.sh, if it doesn't already exist on the ph...
Tamarin mercurial commit hook - Archive of obsolete content
ository in the file utils/hooks/tamarin-commit-hook.py This is a simple mercurial hook that checks the following filetypes ('.cpp', '.h', '.as', '.abs', '.py') for the following: Tabs anywhere in the line Trailing whitespace Windows line endings (\r\n) "MARK_SECURITY_CHANGE" - Looks for this text and warns user as security changes should NOT be checked into the public tamarin-redux repository. Installing the commit hook The easiest way to implement the hook is to sync to the tip of tamarin-redux then add the following to your tamarin-redux/.hg/hgrc file (or to ~/.hgrc to implement for all local repos): [hooks] pretxncommit.commit = python:/path/to/tamarin-redux/utils/hooks/tamarin-commit-hook.py:master_hook Once added, all commits will run the commit hook. Hook Use On every commit to your loc...
Tamarin - Archive of obsolete content
Machine 2 (AVM2) Overview (PDF, 400K) The instructions, architecture, and file format supported by the AVM2. See also the possible errata. Tamarin Build Documentation How to get, build, and use Tamarin. Tamarin Build System Documentation Documentation on how the Tamarin build system works and how to modify. Tamarin commit hook Instructions for installing and using the mercurial hook for Tamarin. Tamarin Acceptance Testing Instructions on how to validate changes to the Tamarin source code. Tamarin pages at wiki.mozilla.org More documentation. MMgc overview An overview of the Tamarin garbage collector. Nanojit LIR In Nanojit, LIR is the source language for compilation to m...
The new nsString class implementation (1999) - Archive of obsolete content
ledge the idiom, I have made nsCString available but note that it should be used sparingly. Memory Management A principal enhancement of the new architecture is pluggable memory allocators. All nsString subclasses provide their own default allocator implementations, but programmers are free to use their own. In the new prototype nsStrImpl and nsString classes, the allocator is an intrinsic member installed during construction of the string (by default they share a global allocator). Note: The COM rules imply that everyone needs to use the same allocators, that they acquire via a global COM service called CoGetMalloc(). Our nsStrImpl uses an allocator pattern so that programmers can install their own policy, but this may also make allocation simpler in a multiprocess environment. I'm wondering if ...
Using gdb on wimpy computers - Archive of obsolete content
e "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) b main Breakpoint 1 at 0x804ec45: file nsAppRunner.cpp, line 811. (gdb) r Starting program: /home/blizzard/src/mozilla/mozilla/dist/bin/./mozilla-bin Breakpoint 1, main (argc=1, argv=0xbffff894) at nsAppRunner.cpp:811 811 InstallUnixSignalHandlers(argv[0]); (gdb) set auto-solib-add 0 (gdb) c Continuing. nsNativeComponentLoader: autoregistering begins. [...] It's easy to define a function for gdb to do this for you automatically. You can add this function to the .gdbinit file in your home directory: def prun tbreak main run set auto-solib-add 0 end How do I load shared libraries? If you have turne...
Using Breakpoints in Venkman - Archive of obsolete content
EFORE the line executes. When a breakpoint is set, the margin will change to the letter "B", as in Figure 2. If you execute this code again after having set this breakpoint, Venkman will stop at line 81. (Note: By default, Venkman hides files file that appear to be part of the browser core; this includes extensions. To debug an extension, uncheck "Exclude Browser Files" on the Debug menu and your installed extension files should appear in the Loaded Scripts list.) Venkman also indicates that one or more breakpoints have been set in the Loaded Scripts View, where red dots appear next to the files in which breakpoints have been set, along with the line number where the function begins whose code is being stopped. Using Breakpoints to Debug When you set a breakpoint, you give Venkman (or whatever ...
Elements - Archive of obsolete content
g set. The setter tag must be inside the property tag. id - The id attribute is a document-unique identifier. handlers <!ENTITY % handlers-content "handler*"> <!ELEMENT handlers %handlers-content;> <!ATTLIST handlers id ID #IMPLIED > The handlers element contains event handlers that can be attached to elements within the bound document. These handlers are installed when the binding is attached and removed when the binding is detached. The handlers tag must be inside the binding tag. id - The id attribute is a document-unique identifier. handler <!ENTITY % handler-content "PCDATA"> <!ELEMENT handler %handler-content;> <!ATTLIST handler id ID #IMPLIED event NMREF ...
File.macAlias - Archive of obsolete content
File.macAlias In this example, a mac alias is created for software (AppleCD Audio Player) that is installed locally. xpiSrc = "Miscellaneous Program"; var vi = "1.1.1.1"; initInstall( "Macintosh Alias", "misc", vi, 0); f = getFolder("Program"); g = getFolder("Mac Desktop"); addFile( "filemacalias", "2.2.2.2", xpiSrc, f, xpiSrc, true); err = File.macAlias(f, xpiSrc, g, xpiSrc + " alias"); logComment("File.macAlias returns: " + err); if (0 == getLastError()) performInstall(); else cancelInstall(); ...
dirCreate - Archive of obsolete content
object Syntax int dirCreate( FileSpecObject dirToCreate ); Parameters The dirCreate method has the following parameters: dirToCreate A FileSpecObject representing the pathname of the directory to create. Returns An integer error code. For a list of possible values, see Return Codes. Description The input parameter is a FileSpecObject that you have already created with the Install object's getFolder method. The following simple example demonstrates the use of the dirCreate method. Note that the getFolder method does not require that the folder or directory you specify exist in order for the object reference to be a valid one. Example f = getFolder("Program", "myNewDirectory"); err = File.dirCreate(f); ...
execute - Archive of obsolete content
utableFile A FileSpecObject representing the local file already on disk to be executed. Note that file names are case sensitive. aParameters An optional parameter string that is passed to the executable. (Ignored on Mac OS) Returns An integer error code. For a list of possible values, see Return Codes. Description The specified file is not actually executed until the performInstall method is called. See performInstall for more information about queued commands during the installation process. Example f = getFolder("Program", "myTextEditor.exe"); err = File.execute(f, "myfile.txt"); // indicates that 'myfile.txt' will be // opened in the editor ...
macAlias - Archive of obsolete content
Method of File object Syntax int macAlias( FileSpecObject destDir, String fileName, FileSpecObject aliasDir, String aliasName ); Parameters The macAlias method has the following parameters: destDir A FileSpecObject that represents the directory into which the program file will be installed. fileName A string representing the name of the file to be installed. aliasDir A FileSpecObject that represents the directory into which the alias file will be installed (e.g.,"Mac Desktop"). aliasName A string representing the name of the alias itself. Returns An integer error code. For a list of possible values, see Return Codes. Example See File.macAlias in the script examples chapter. ...
windowsRegisterServer - Archive of obsolete content
Method of File object Syntax int windowsRegisterServer( Object localDirSpec ) Parameters The windowsRegisterServer method has the following parameters: localDirSpec A FileSpecObject representing a directory obtained by getComponentFolder or getFolder. Returns An integer error code. For a list of possible values, see Return Codes. ...
windowsShortcut - Archive of obsolete content
Method of File object Syntax int WindowsShortcut( FolderObject aTarget, FolderObject aShortcutPath, String aDescription, FolderObject aWorkingPath, String aParams, FolderObject aIcon, Number aIconId); Parameters The windowsShortcut method has the following parameters: aTarget A FileSpecObject representing the absolute path (including filename) to file that the shortcut will be created for. aShortcutPath A FileSpecObject representing the absolute path (not including filename) to where the shortcut is to be created. ...
File Object - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. File Use the File object to manipulate local files and directories during the installation process. Overview The File object has methods for analyzing the file system and preparing it (as when new directories, program shortcuts, version comparisons, or deletions are required) for newly installed software packages. The File object works in conjunction with the Install object. ...
init - Archive of obsolete content
min Minor version number. rev Revision number. bld Build number. version A string representing version information in the format "4.1.2.1234". ...
Properties - Archive of obsolete content
Properties major Most siginificant element of the InstallVersion object. e.g. major version of Netscape 6 is "6" minor Second most siginificant element of the InstallVersion object.e.g. minor version of Netscape Communicator 4.7 is "7" release Second least siginificant element of the InstallVersion object. build Least siginificant element of the InstallVersion object.e.g. buildID of Netscape 6 is represented by a time stamp of teh format:YYYYMMDDHH: 2001031808 means in the year 2001, in the month of March, on the 18th day of the month, at 8:00am. the product was built. ...
alert - Archive of obsolete content
Summary The alert function displays a modal dialog box with a message representing the input. Method of Install object Syntax void alert ( String message ); Parameters The message parameter is displayed as a string in the dialog box. If message is not a string, then it is converted into one and displayed. Returns Nothing. ...
gestalt - Archive of obsolete content
Returns Returns the requested information. The format depends on the select code specified in the selector parameter. Description The gestalt method is a wrapper for the gestalt function of the Macintosh Toolbox. ...
getWinProfile - Archive of obsolete content
You create this object by passing a string representing the directory to the getFolder method. file A relative pathname to an initialization file in the directory specified by the folder parameter, such as "royal/royal.ini". Returns A WinProfile object. Description The getWinProfile method creates an object for manipulating the contents of a Windows .ini file. ...
getWinRegistry - Archive of obsolete content
Returns A WinReg object. Description Use the getWinRegistry method to create an object for manipulating the contents of the Windows Registry. Once you have this object, you can call its methods to retrieve or change the registry's content. ...
logComment - Archive of obsolete content
logComment Adds a comment line to the installation log. Method of Install object Syntax int logComment( String aComment ); Parameters The sole input parameter is a string whose value will be written to the log during the installation process. Returns An integer error code. For a list of possible values, see Return Codes. Description The install log is created in the product directory by default (where the browser executable is) if it can be, and if the installation doesn't have proper permission, the install log is written to the user's profile directory. Respectively, these directories correspond to the "Program" and "Current User" keywords for the getFolder method. ...
resetError - Archive of obsolete content
Returns Nothing. Description The resetError method resets any saved error code to zero. See getLastError for additional information. ...
writeString - Archive of obsolete content
alue. Returns True if successfully scheduled, otherwise, false. Description The writeString method is similar to the Windows API function WritePrivateProfileString. To delete an existing value, supply null as the value parameter. Unlike the WritePrivateProfileString function, this method does not support using a null key to delete an entire section. Values are not actually written until performInstall is called. Example To set the name of the wallpaper file from the desktop section of the win.ini file, use this call: ini = getWinProfile (getFolder("Windows"), "win.ini"); ini.writeString ("Desktop", "Wallpaper", "newpathname"); ...
Methods - Archive of obsolete content
The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods getString Retrieves a value from a .ini file. ...
WinProfile Object - Archive of obsolete content
Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. WinProfile (Windows only) Windows developers use this object to manipulate the content of a Windows .ini file. Overview This object does not have a public constructor. Instead, you construct an instance of this object by calling the getWinProfile method of the Install object. The two methods of the WinProfile object, getString and writeString, allow you to read and write the data in the key/value pairs of a Windows .ini file...
enumKeys - Archive of obsolete content
gator\\Mail". subkeyIndex An integer representing the 0-based index of the subkey being sought. Returns The name if it succeeded; NULL if the referenced value does not exist. Description enumKeys can be used to iterate through the subkeys at a given key location. The following example shows how to use enumKeys to find the plugins subdirectory below the various Mozilla-based browser installations. var winreg = getWinRegistry(); winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE); var index = 0; var baseKey = "Software\\Mozilla"; while ( (MozillaVersion = winreg.enumKeys(baseKey,index)) != null ) { logComment("MozillaVersion = " + MozillaVersion); subkey = baseKey + "\\" + MozillaVersion + "\\Extensions"; pluginsDir = winreg.getValueString ( subkey, "Plugins" ); if ( pluginsDir ) ...
Methods - Archive of obsolete content
The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods createKey Adds a key. deleteKey Removes a key. deleteValue Removes the value of an arbitrary key. enumKeys Retrieves the registry subkeys for the given key. enumValueNames Retrieves the value of a given subkey. getValue Retrieves the value of an arbitrary key. ...
XPJS Components Proposal - Archive of obsolete content
and JS xpcom components, so this is not as isolated an environment as it might at first sound. A 'load' or 'import' function will also be provided to let the JS code import other .js files where libraries of code might be stored. This is akin to 'static' libraries. Accessing other components/services via xpcom/xpconnect is more akin to 'dynamic' libraries. When a XPJS Component module is first installed - or at autoregistration time - the XPJSManager will load the .js file into a fresh JS environment, let its top level script run to do whatever initialization it wants to do, and then it will call the module's NSRegisterSelf function (passing the filespec of the .js file). At this point the module will use the (new) methods on the Components object to register itself with the component manager ...
searchSessions - Archive of obsolete content
<< XUL Reference home searchSessions Obsolete since Gecko 26 Type: space-separated list of session names Set to a keyword indicating what type of data to look up for autocomplete. You may set multiple types by separating their names by spaces. The following values are possible, although custom components may be installed which add others. history: The user's URL history is searched. Obsolete since Gecko 3 addrbook: The user's address book is searched. Obsolete since Gecko 3 ldap: The user's LDAP directories are searched. Obsolete since Gecko 25 ...
Template Logging - Archive of obsolete content
ging flag is set or not. The following lists the errors that can occur and an explanation of what the problem is. querytype attribute doesn't specify a valid query processor This error indicates that the querytype attribute is set to an unrecognized value. Only the 'rdf', 'xml' and 'storage' values are provided by default. If you are using a custom query processor, it may indicate that it is not installed or set up properly. unexpected <queryset> element A <queryset> element was placed in an invalid location; they should be placed directly inside the <template> element with no other kinds of elements as siblings. no member variable found. Action body should have an element with uri attribute The member variable could not be determined. You should specify an element inside the first <action> body...
Textbox (XPFE autocomplete) - Archive of obsolete content
user cannot change the value of the element. However, the value may still be modified by a script. searchSessions Obsolete since Gecko 26 Type: space-separated list of session names Set to a keyword indicating what type of data to look up for autocomplete. You may set multiple types by separating their names by spaces. The following values are possible, although custom components may be installed which add others. history: The user's URL history is searched. Obsolete since Gecko 3 addrbook: The user's address book is searched. Obsolete since Gecko 3 ldap: The user's LDAP directories are searched. Obsolete since Gecko 25 showCommentColumn Obsolete since Gecko 1.9.1 Type: boolean If true, a comment column appears in the popup. For the URL history, the comme...
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
ul Kompozer - Main window NvuToolbarPalette chrome://calendar/content/calendar.xul Sunbird - Main window calendarToolbarPalette More information XulPlanet.com references: <toolbarbutton>, <toolbaritem>. How to adjust toolbar button's label position A forum thread about adding an item to the toolbar (instead of just adding it to palette) right after an extension is installed. Note that this is not recommended. There is another page on mdc with information about adding buttons to various windows in SeaMonkey. Includes useful information about overlays for ChatZilla. ...
Creating a Skin - Archive of obsolete content
1.5 or later, see Manifest Files instead of below) Create a directory somewhere where you want to place the skin files. Copy a manifest file (contents.rdf) from the Classic or Modern skin into this new directory. Modify the references in the manifest file to a custom name for your skin. For example, change references of 'classic/1.0' to 'blueswayedshoes/1.0'. Add a line to the file 'chrome/installed-chrome.txt of the following form: skin,install,url,file:///stuff/blueswayedshoes/ where the last part points to the directory you created. Make sure to add a slash at the end. Copy the original findfile.css into the new directory. We'll use this as a basis for the new skin. We can then refer to it using the URL 'chrome://findfile/skin/findfile.css'. Adding Style Rules First, let's decide wh...
Localization - Archive of obsolete content
alized text for each window. The structure of the archives is very similar to the directory structure used for skins. Inside the archives, you would place the DTD files in which you declare entities. Typically, you will have one DTD file for each XUL file, usually with the same filename except with a .dtd extension. So, for the find files dialog, we will need a file called findfile.dtd. For non-installed chrome files, you can just put the DTD file in the same directory as the XUL file. Note: You should encode DTD files as UTF-8 for non-ASCII characters. That is, you should save them in UTF-8 format (without BOM). For more information, see Mozilla Language Packs. Once you have created a DTD file for your XUL, you will need to add a line to the XUL file which indicates that you want to use the ...
XPCOM Interfaces - Archive of obsolete content
n of it that implements the nsILocalFile interface. Finally, we call functions provided by the interface. This interface is used to represent a single file. We've seen that interfaces are often named starting with 'nsI' or 'mozI'. Components, however, are referred to using a URI like string. Mozilla stores a list of all the components that are available in its own registry. A particular user can install new components as needed. It works much like plug-ins. Mozilla provides a file component, that is, a component that implements nsILocalFile. This component can be referred to using the string '@mozilla.org/file/local;1'. This string is called a contract ID. The syntax of a contract ID is: @<internetdomain>/module[/submodule[...]];<version>[?<name>=<value>[&<name>=<value>[...]]] Other componen...
Using Visual Studio as your XUL IDE - Archive of obsolete content
r". As you are already there, you can do the same for "xbl". 2. Using XML schemas For validation and intellisense Visual Studio needs the XML schema for XUL files. There is a very nice schema created by Mihailo Lalevic. You can download it at xulschema.codeplex.com under the Downloads tab. You should be able to use the schema in other IDE's too. There is also project that provides XML schema for install manifest files (install.rdf) - installrdfschema.codeplex.com - from the same author as a XUL schema. The codeplex-page provides some instructions for installing the schema, but there is an easier way. If you already have a XML or XUL file opened, Visual Studio will add the menu item XML to the main menu. Just use XML > Schemas... to add the xul.xsd from the package that you have downloaded. The ...
XUL Questions and Answers - Archive of obsolete content
a way to check what directory "application.ini" is in? Use directory service The key to the folder where application.ini resides is "resource:app". I get the error: Gecko MinVersion requirement not met. Visit http://developer.mozilla.org/en/docs...pplication.ini to find out how to properly set up the application.ini file. How can i use other fonts on XULRunner applications which are not installed on the current machine? In order to do this, you must first attach the font file as a bundle with the XULRunner application as a bundle. You also have to write CSS code to refer to which element(s) you wish to apply this font to. someelement { font-family: "My Font", "Trebuchet MS"; } For more information about platform specific questions, please visit mozilla.dev.platform ...
XUL accessibility tool - Archive of obsolete content
m [http://www.xulplanet.com/aaron/files...bilitytool.xpi]. Future versions of the extension will be available from addons.mozilla.org. The version currently on XulPlanet is compatible with the following XUL applications: Firefox 1.5+ Thunderbird 3.0a+ Recent Sunbird builds Recent Songbird builds. It probably also works on Seamonkey, but I haven't verified this. Use To launch the tool after installation, look for an entry in the Tools menu of the host application, or hit Ctrl+Alt+Shift+F12. Once the tool window has loaded, select either a local file, web url, or currently open window from the File menu to generate a XUL report for that document. Be aware that the report might take a little while to be ready depending on the complexity of the application being analyzed and the speed of your ...
prefwindow - Archive of obsolete content
Return type: no return value Switch to a particular pane. Notes Usage patterns Opening/initializing a prefwindow Note that you can define an initWithParams() function in your sub window - to handle parameters passed using openWindow() in case the window was already open. For example the Permissions Manager UI in Firefox uses the same window for three dialogs: Images, Software installation and Popups. It uses initWithParams() to change the dialog type without closing and re-opening it. The suggested usage pattern is as follows: // subwindow.js function onLoad(ev) { // do some initialization... initWithParams(window.arguments[0]); // we expect a single parameter to be passed to the window } function initWithParams(aParams) { // this will also get called when an alread...
window - Archive of obsolete content
ties | Methods | Related ] Describes the structure of a top-level window. It is the root node of a XUL document. It is by default a horizontally oriented box. As it is a box, all box attributes can be used. By default, the window will have a platform-specific frame around it. To set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window. Without including the css file at "chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when ...
Debugging a XULRunner Application - Archive of obsolete content
let dbgListener=DebuggerServer.createListener(); dbgListener.portOrPath=6000; dbgListener.open(); Add the following to your prefs.js: (in recent ffox, edit about:config instead) pref("devtools.debugger.remote-enabled", true); In Firefox, go to Tools > Web Developer > Connect... and you should be able to point the debugger to your app. Happy debugging :) Venkman Follow these instructions to install Venkman into your XULRunner application (XULRunner 1.9 and later): Get Venkman from addons.mozilla.org (v0.9.87 at the time of writing). To download the package, right-click the install link and save the package locally. Create a directory <application>/distribution/bundles/venkman. Unzip the package into that directory. Add <script src="chrome://venkman/content/venkman-overlay.js" /> to one...
XULRunner FAQ - Archive of obsolete content
inal language of choice for UI in mozilla applications and the main library is called libXUL, mostly the name is a hangover from that that has now stuck. When will Firefox be based on XULRunner? There is no intention to do this for official release versions of Firefox. It is already possible to run Firefox on XULRunner now though and certain Linux distributions already do this. Why is installing XULRunner so painful? Why isn't there a nice installer? Because nobody has written that code yet! This is a developer preview release: additional features for installing and deploying XULRunner and applications based on XULRunner will be available in future releases. I'm writing a XUL application, how can I deploy that application to my users? Right now Mozilla recommends that XULR...
MacFAQ - Archive of obsolete content
In your .mozconfig for custom builds of XULRunner, add --enable-libxul. If you've completed a XULRunner build, you should copy or symlink the dist/XUL.framework directory to /Library/Frameworks. Note that in order to copy the framework while keeping the relative soft-links in the framework, do something like: % ( cd dist ; gnutar cf - XUL.framework | ( cd /Library/Frameworks ; gnutar xf - )) Installing Your Application Your application must be installed as a XULRunner app before you can open it. To do this, type: xulrunner-bin --install-app /path/to/appdir Note the path to your application must end with the directory containing application.ini; you should NOT reference application.ini in this command. This command will place a copy of your application in /Applications/(Vendor)/(Name) , where...
Windows and menus in XULRunner - Archive of obsolete content
This time I want to add some of the things common to a desktop application user interface: Windows and dialogs Menus and toolbars OS Common dialogs Controls or widgets Windows Each window or dialog should be created in its own XUL file. The XUL file may also contain other top-level declarations for CSS and DTD, which I will discuss in a moment. <window> is the basic windowing element in XUL. It has attributes to set the title/caption as well as to control its width and height. ...
nsIContentPolicy - Archive of obsolete content
o do any of the things above, do them off timeout or event. Note: When multiple content policies are used (for example through several extensions), if one of them rejects a request, the rest of the policies are not called. Reference: //github.com/RealityRipple/UXP/blob/master/dom/base/nsContentPolicy.cpp#L129. Note: The order of content policies in the above case depends on the precedence of installation. short shouldLoad( in unsigned long aContentType, in nsIURI aContentLocation, in nsIURI aRequestOrigin, in nsISupports aContext, in ACString aMimeTypeGuess, in nsISupports aExtra, in nsIPrincipal aRequestPrincipal ); Parameters aContentType The type of content being tested. This will be one one of the Content types listed above. aContentLocation The URI of the content...
Gecko Compatibility Handbook - Archive of obsolete content
be most beneficial to sites using simple code or that have updated to support standards. Set Up Browsers For Testing The various Gecko-based browsers do not always contain Netscape in the user-agent string. Thus it's critical to verify that you are properly detecting browsers such as AOL for macOS. You can either download the various browsers. Or, if you are using user-agent detection, you can install an extension in Firefox or Mozilla which allows you to "spoof" the user-agent strings of the various Gecko browsers. Here's how: Launch Mozilla or Firefox. The benefit of using these browsers is that if you're only detecting Netscape or Netscape6 you'll see the issues right away. Install the User Agent Switcher extension. After restarting your browser, add the the user-agent strings that you...
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
Cache Distribution project - looking for help for how to tap the http requests. There have been no responses so far. Can't view Keith Olbermann Videos A user inability to launch videos, worked fine for others, ended up being a Flash version problem. Firefox 2 on Windows Vista Discussion about the "state of affairs" of Firefox 2 on Windows Vista RC1 - update for RC1 listed in Update History as 'Install Pending' right-click "Copy email address" - bug 353102 A proposed Bug Fix to the 'Copy email address' bug how to use the RSS feeds discovery & parsing tool in another open source project? A user looking to be pointed in the right direction of how to use the RSS feeds discovery & parsing tool. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Sum...
2006-09-29 - Archive of obsolete content
Cache Distribution project - looking for help for how to tap the http requests. There have been no responses so far. Can't view Keith Olbermann Videos A user inability to launch videos, worked fine for others, ended up being a Flash version problem. Firefox 2 on Windows Vista Discussion about the "state of affairs" of Firefox 2 on Windows Vista RC1 - update for RC1 listed in Update History as 'Install Pending' right-click "Copy email address" - bug 353102 A proposed Bug Fix to the 'Copy email address' bug how to use the RSS feeds discovery & parsing tool in another open source project? A user looking to be pointed in the right direction of how to use the RSS feeds discovery & parsing tool. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Sum...
2006-10-13 - Archive of obsolete content
.0.*. Discussions Everyone and his goldfish thinks bug 300198 should be fixed Large response to the discussion about the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=300198, regarding middle clicking on a tab. Annoying Firefox 2 Save dialog instead of Open/Save ones. User questions about a Open/SaveAs bug that already exisits: https://bugzilla.mozilla.org/show_bug.cgi?id=347230 Installer for 2.0RC2 ehume gives the developers a thumbs up for the new installer for 2.0RC2 having a textfield where you can type in the installation directory. A way to recover the toolbars from popup windows that hide it A suggestion for a way to recover toolbars from a popup window that disables it. User suggests 3 ways, and suggests a default. (No responses as of yet) Selected Tab looks too ...
2006-11-03 - Archive of obsolete content
Summary: mozilla.dev.apps.firefox - October 27, 2006 - November 3, 2006 Announcements None this week. Discussions Google Adsense plugin for firefox A user post a link to a plugin for displaying "Adsense Earning" within the status bar of the browser without logging into Google. Request to add option for removal of Firefox profiles during setup or uninstall A user suggests an option to remove profiles during setup or uninstall. Does Firefox provide any classes/objects or events to Windows WMI ? A user asks if firefox provides any classes/objects or events to Windows WMI. No replies yet. source code for the nsinstall contained in moztools A user asks for advice about building nsinstall on Windows. No replies yet. picking an alternate search engine for a particular s...
2006-11-04 - Archive of obsolete content
Summary: mozilla.dev.apps.firefox - October 27, 2006 - November 3, 2006 Announcements None this week. Discussions Adsense plugin for firefox A user post a link to a plugin for displaying "Adsense Earning" within the status bar of the browser without logging into Google. to add option for removal of Firefox profiles during setup or uninstall A user suggests an option to remove profiles during setup or uninstall. Firefox provide any classes/objects or events to Windows WMI ? A user asks if firefox provides any classes/objects or events to Windows WMI. No replies yet. code for the nsinstall contained in moztools A user asks for advice about building nsinstall on Windows. No replies yet. an alternate search engine for a particular search Large discussion about how the...
2006-10-13 - Archive of obsolete content
06 cannot build FF 1.5.0.7 on linux x86_64 Werner Flamme cannot build FireFox 1.5.0.7 on his SUSE Linux 10.0 x86_64 box. He gets an error in the middle of his build. He has disabled Xft and has tried looking at related postings by Benjamin Smedberg gcc-40-workarounds and gcc-and-visibility-one-step-forward-hit-a-brick-wall Announcements Please help us test the new Tinderbox and Bonsai server installations Paul Reed announced that they are setting up a new installation of the Tinderbox and Bonsai servers onto new, supported hardware. Some testing and validation has been done, but they would like other people to look at the installations and complete the setup before they switch over. New Tinderbox Installation New Bonsai Installation If any inconsistencies are found please use Bugzilla t...
2006-10-27 - Archive of obsolete content
ols that he used to build Firefox 2 are listed in his posting along with the error that he receives when he tries to build it. Alex is not sure if he is missing a library or if he needs to pass extra options to configure the build. Peter Weilbacher responded to Alex's posting on the same day, stating that he is not sure what packaging system Solaris 10 x86 uses but thinks that he might need to install the developer packages of X and/or Xrender and Freetype which should contain the libXrender.* and libfreetype.* files that are need for the linking. October 27: Alex responded to Peter Weilbacher posting stating that he is going to look for a Solaris newsgroup because he is not sure how to check if the library is installed or where to get the packages. October 26: Masaki responded to Alex's...
2006-11-17 - Archive of obsolete content
x 4.1? November 11th: Bryan Wellander is trying to build Mozilla 1.7.13 using Yellowdog Linux 4.1. However he has been unsuccessful and gets the following errors: checking for GTK - version >= 1.2.0... no Could not run GTK test program, checking why... The test program failed to compile or link. See the file config.log for the exact error that occured. This usually means GTK was incorrectly installed or that you have moved GTK since it was installed. In the latter case, you may want to edit the gtk-config script: /usr/bin/gtk-config configure: error: Test for GTK failed Bryan is asking for help as he is confused and has no idea what is causing the build process to fail. Announcements mozilla/configure regeneration down On November 13th J. Paul Reed announced that: There was a power o...
2006-09-22 - Archive of obsolete content
Authors Dean Woodside Sherman Fernandes ...
2006-11-3 - Archive of obsolete content
here. Discussions Last check-ins on sun-calendar-event-dialog.* files Last check-ins on sun-calendar-event-dialog.* files From 50 to 100 locales How to get from the 50 locales and releasing 40 to a hundred. Revisiting MozillaTranslator bugs in Bugzilla Revisiting MozillaTranslator bugs in Bugzilla dictionary packages There are some dictionaries at http://dictionaries.mozdev.org/installation.html which are not at https://addons.mozilla.org/en/dictionaries. Localization of AMO and some other pages of Mozilla.com Suggestion on localizing popular add-ons as well as web pages at Mozilla.com. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-11-03 - Archive of obsolete content
pening l10n repository on MOZILLA_1_8_BRANCH for approved check-ins Opening l10n repository on MOZILLA_1_8_BRANCH for approved check-ins Discussion From 50 to 100 locales a discussion on how to make l10n easier and increase the number of locals with which mozilla products ship. More Tbox changes on the way, most hitting on Friday Preed discusses killing more tboxes. Cross-Product extension install improvements Simon Paquet points out how much easier it is to install an extension in firefox than it in any other product. A discussion of how to get firefox to be able to install extensions for other products (e.g. Thunderbird, sunbird). button in the upper right hand corner the removal of the firefox home page button was purposeful, you can add that function by installing this. Meetings ...
2006-09-29 - Archive of obsolete content
ion to OSX. When he runs xulrunner from the command line, it fails silently without any errors. This happens with all his xulrunner ports, with xulrunner 1.8.0.1, 1.8.0.4 and nightly 1.8. Benjamin Smedberg was able to point out one possible flaw. Instead of using /path/to/xulrunner-bin.ini (which Will was doing) applications on a mac must be in an application bundle (Foo.app). Then use xulrunner -install-app to "unpack" the XUL app into the Mac structure. Meetings No meetings this week ...
2006-10-20 - Archive of obsolete content
This is a Xulrunner 1.8.0.4 application. Benjamin Smedberg would like to know what paths were used. Started Wed, Oct 18 2006 9:38 am - A XulRunner developer, Frank, discusses his desire to make xul/browser based applications. He wants to be able to build applications that will run inside the browser. ...
2006-11-17 - Archive of obsolete content
Summary: mozilla.dev.security - November 11, 2006 to November 17, 2006 Return to mozilla-dev-security Announcements None during this week. Discussions How to Detect Firefox Updates Externally? micahc asked if there is an easier way to detect if Firefox is installed and fully patched on any given machine, externally. Extended Validation Certificates A note as to how Opera is handling Extended Validation Certificates http://labs.opera.com/news/2006/10/09/ Fwd: RE: Mozilla questions regarding the EV standard Gervase Markham posted a summary of questions emailed to Kelvin Yiu about the Extended Validation Certificates. Meetings None during this week. ...
2006-12-01 - Archive of obsolete content
Summary: mozilla.dev.tech.xpcom - Nov 25- Dec 01, 2006 Announcements None during this week. Discussions nsIContentPolicy and user interaction The proper way to get user confirmation before trying to load certain file types. debugging firefox extesnion? A tip on how to debug Firefox extensions using a debugger. segmentation fault while running the browser Browser crashes after installation of subjects extension. Meetings None during this week. ...
NPAPI plugin reference - Archive of obsolete content
ves notification of the result. NPN_ReleaseObject Decrements the reference count of the given NPObject. If the reference count reaches 0, the NPObject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used. NPN_ReleaseVariantValue NPN_ReleaseVariantValue() releases the value in the given variant. NPN_ReloadPlugins Reloads all of the installed plugins. NPN_RemoveProperty Removes a property from the specified NPObject. NPN_RequestRead Requests a range of bytes from a seekable stream. This initiates a read operation; the actual data is received through subsequent calls to NPP_WriteReady() and NPP_Write(). NPN_RetainObject Increments the reference count of the given NPObject. NPN_SetException A plugin can call this function to i...
Writing a plugin for Mac OS X - Archive of obsolete content
anything, even if you don't plan to release your source code. Getting started If you check out the Mozilla source code in Mac OS X, you can simply open BasicPlugin.xcodeproj in Xcode, click Build, and you're done. Xcode will create a "build" directory next to the project file, and if you built it in release mode, that folder in turn contains a "Release" directory with the plugin inside it. To install the plugin, just copy it into one of these two locations: /Library/Internet Plugins/ ~/Library/Internet Plugins/ From this point, you can simply modify the sample plugin to do whatever you want. Notes and tips This section provides some additional information that may be helpful if you're trying to get a plugin building on your own. Info.plist The plugin communicates its MIME and filena...
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
you an Xt widget as a parent. However, before you do so you should make sure that the browser also supports XEmbed when the plugin is first initialized. If you've built your plugin so that it will support either Xt or XEmbed you can include a fallback for older style hosting. If you haven't you can return an error and the plugin will be ignored. It's good practice to do this in case people try to install your plugin for older versions of the browser that don't support XEmbed functionality. This is an incomplete example of what a piece of code might look like that tries to check for the proper Mozilla version. This would be included in your NP_Initialize function. NPError NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) { NPError err = NPERR_NO_ERROR; PRBool supportsXEmb...
Proposal - Archive of obsolete content
nd IPradio/podcasting. Spec Exists Newsgator Feed Extension Created to make RSS feeds work better with Newsgator software. Lets you specify an image, up to 277x78 pixels. And lets you specifies a specific rendering transform (XSLT) to be used when rendering the feed in NewsGator for Outlook. The transform must already exist on the machine running NewsGator; stylesheets will not be downloaded or installed automatically. Spec Exists RSS Disposition Hinting A proposal to make it so IPTV and IPradio/podcasting works better with RSS. Uses an HTTP "Content-Type" parameter to hint at an RSS feeds disposition type -- to hint at what is being syndicated. In Development rssHints A module that adds elements to a feed that help an aggregator process them. Draft Exists Source GUID When an RSS item is ...
Digital Signatures - Archive of obsolete content
signatures make it difficult for the signer to deny having signed the data. In some situations, a digital signature may be as legally binding as a handwritten signature. Original Document Information Author(s): Ella Deon Lackey Last Updated Date: 2012 Copyright Information: (C) 2012 Red Hat, Inc. Link: Red Hat Certificate System Common Criteria Certification 8.1: Deployment, Planning, and Installation ...
Encryption and Decryption - Archive of obsolete content
sidered cryptographically strong. ...
SSL and TLS - Archive of obsolete content
IST). ...
TCP/IP Security - Archive of obsolete content
HTTP-based applications, although they are also used to provide protection for communication sessions of other types of applications such as SMTP, Point of Presence (POP), Internet Message Access Protocol (IMAP), and File Transfer Protocol (FTP). Because all major Web browsers include support for TLS, users who wish to use Web-based applications that are protected by TLS normally do not need to install any client software or reconfigure their systems. Newer applications of transport layer security protocols protect both HTTP and non-HTTP application communications, including client/server applications and other network traffic. Controls at each layer offer advantages and features that controls at other layers do not. SSL is the most commonly used transport layer security control. Depending ...
Threats - Archive of obsolete content
lume and strength of DDoS attacks are growing as hackers try to bring organizations offline or steal their data by flooding websites and networks with spurious traffic. Original Document Information Author(s): Ella Deon Lackey Last Updated Date: 2012 Copyright Information: (C) 2012 Red Hat, Inc. Link: Red Hat Certificate System Common Criteria Certification 8.1: Deployment, Planning, and Installation Original Document Information Author(s): Joint Task Force Transformation Initiative Title: National Institute of Standards and Technology (NIST) Special Publication 800-30 Revision 1, Guide for Conducting Risk Assessments Last Updated Date: September 2012 Copyright Information: This document is not subject to copyright. Original Document Information Author(s): Karen Scarfone...
Create Your Own Firefox Background Theme - Archive of obsolete content
ser reveals more of the left-hand side of the image. Online Image Editor Resources Pixlr -- Pixlr offers professional and easy-to-use tools for creating and editing images within a browser. Photoshop -- Tweak, rotate and touch up photos with Photoshop(R) Express, a free online photo editor. Creating a Theme Footer Image In older versions of Firefox, or newer versions with certain add-ons installed, the footer image is displayed as the background of the bottom of the browser window, behind the add-on and find bars. It will be anchored to the bottom-left corner of the browser window. Footer images are optional. View a sample Theme Footer here. Image Requirements Dimensions should be 3000px wide x 100px high PNG or JPG file format Image must be no larger than 300 KB in file size...
Making sure your theme works with RTL locales - Archive of obsolete content
nd about these locales, is that the entire interface is mirrored right-to-left. That means that text that had a left margin will have a right margin instead (or -moz-margin-start), arrows that pointed right will have to point left and vice versa, and so on. A screenshot of Firefox 2 in Hebrew What you need to do At this stage you might ask yourself, "How would I know what language is my theme installed on? Should I make a special theme for these locales?" Don't despair: making a theme RTL-compatible is fairly easy! Gecko 1.9.2 and later Gecko 1.9.2 introduced the :-moz-locale-dir CSS pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right. :-moz-lo...
Theme changes in Firefox 2 - Archive of obsolete content
tons.png New file; contains icons for each of the views that may be available in the add-ons manager. In the default theme, these look something like this: The top row contains dimmed versions of the icons below them. The first icon is for the extensions view. The second is for themes. The third is for locales, the fourth is for plugins, the fifth is for updates, and the sixth is for installs. mozapps/pref This entire directory is no longer used in Firefox 2 and should be removed. Changes in browser bookmarks/addBookmark.css The addBookmarks.css file should have the following lines added to the top: @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); Some microsummary-related...
Themes - Archive of obsolete content
Archived theme documentation. ...
ActiveXObject - Archive of obsolete content
eated. Remarks Automation servers provide at least one type of object. For example, a word-processing application may provide an application object, a document object, and a toolbar object. You may be able to identify servername.typename values on a host PC in the HKEY_CLASSES_ROOT registry key. For example, here are a few examples of values you may find there, depending on which programs are installed: Excel.Application Excel.Chart Scripting.FileSystemObject WScript.Shell Word.Document Important: ActiveX objects may present security issues. To use the ActiveXObject, you may need to adjust security settings in Internet Explorer for the relevant security zone. For example, for the local intranet zone, you typically need to change a custom setting to "Initiali...
Debug.write - Archive of obsolete content
has no effect. The Debug.write function is almost identical to the Debug.writeln function. The only difference is that the Debug.writeln function sends a newline character after the strings are sent. Example This example uses the Debug.write function to display the value of the variable in the Immediate window of the script debugger. Note: To run this example, you must have a script debugger installed and the script must run in debug mode. Internet Explorer 8 includes the JavaScript debugger. If you are using an earlier version of Internet Explorer, see How to: Enable and Start Script Debugging from Internet Explorer. var counter = 42; Debug.write("The value of counter is " + counter); Requirements Supported in the following document modes: Quirks, Internet Explorer 6 standards, Interne...
Debug.writeln - Archive of obsolete content
he Debug.writeln function is almost identical to the Debug.write function. The only difference is that the Debug.write function does not send a newline character after sending the strings. Example This example uses the Debug.writeln function to display the value of the variable in the Immediate window of the Microsoft Script Debugger. Note: To run this example, you must have a script debugger installed and the script must run in debug mode. Internet Explorer 8 includes the JavaScript debugger. If you are using an earlier version of Internet Explorer, see How to: Enable and Start Script Debugging from Internet Explorer. var counter = 42; Debug.writeln("The value of counter is " + counter); Requirements Supported in the following document modes: Quirks, Internet Explorer 6 standards, Int...
Debug - Archive of obsolete content
yntax You do not instantiate the Debug object. Its properties and methods are called off the Debug class. There are different ways to debug Internet Explorer and Windows 8.x Store apps. In Windows 8.x Store apps, the write and writeln functions of the Debug object display strings in the Visual Studio Output window at run time. To debug Internet Explorer scripts, you must have a script debugger installed and the script must run in debug mode. Internet Explorer 8 and later versions include the JavaScript debugger. If the script is not being debugged, the Debug methods and properties have no effect. Constants Async Callback Status Codes Contant Description Value Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE The synchronous work item assigned a callback or continuat...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
Jaxer - Example Application The example application consists of a simple form used to accept comments from public users and was built to cover some of the most useful Jaxer features. The example application is running under Jaxer build 0.9.7.2472 and also incorporates the ExtJS version 2.1 JavaScript framework for user interface controls. For more information how to obtain and install these products, refer to the resources section. Single Page Applications The first feature the application demonstrates is the concept of a single page application. Since Jaxer allows you to define which code is reserved for the server-side, which code stays on the client-side, and which code is shared between the two, it's very possible to produce a single page appli...
background-size - Archive of obsolete content
obal market share is 0.05%, (< 5% of Linux users). Given the fact that this reference has serious shortcomings in many places and few contributors, I think spending much time here is not effective. People especially interested in this browser are welcome to contribute. It's hard to get reliable information about its CSS support without having this browser (read: multiple versions of this browser) installed. Are you able and willing to do that for all CSS properties? If so, feel free to change the en/CSS_Reference/Property_Template and all CSS property pages ; ) Start with -webkit-background-size and investigate support of contain and cover keywords and "omitted second value" behavior. [I assume it's the same as Safari, since they just backported a WebKit patch into KHTML. But we need facts, rat...
Building Mozilla XForms - Archive of obsolete content
rything ready, you can rebuild Mozilla with the same command you used before to build Firefox without xforms. Switch to the root of your source directory and start the build with make -f client.mk build After the build finishes, you'll have a xforms.xpi in obj-*/dist/xpi-stage/xforms.xpi. Congratulations, you've successfully built your first Mozilla XForms extension! The built XPI file will only install on a nightly snapshot from the same day or your self-built Firefox version. If you are sure that older or newer Firefox versions are compatible with your extension, you can unzip the XPI file (it's a regular ZIP file), edit the install.rdf and change the minVersion and maxVersion entries. The following scheme usually works (replace {GeckoVersion} with the used Gecko/Toolkit version): <em:minVers...
Developing Mozilla XForms - Archive of obsolete content
ng Always start with a debug build of the xforms and the schema-validation extensions. See Building Mozilla XForms for a .mozconfig for debug builds. You should create a new, clean profile for debugging. Then start Firefox out of the build directory: cd obj-*/dist/firefox ./firefox -no-remote -jsconsole -P yourProfileName The XForms extension that was built together with Firefox should be already installed. Then open your form that causes problems and have a look on the console. Often you'll find the first starting points here or in the Error Console. Schema validation problems The schema-validation extension contains a logging facility that can show some internals on the schema processing. To activate this logging output, set the NSPR_LOG_MODULES environment variable: export NSPR_LOG_MODULES=sch...
XForms - Archive of obsolete content
f data from presentation, strong data typing, the ability to submit XML data to servers instead of name/value pairs, and a descriptive way to author forms so that they can be displayed by a wide variety of devices. XForms is a W3C specification. XForms Tutorial and Cookbook XForms in Wikibook Format - Over 50 examples tested with Firefox. XForms support can be added to Firefox and SeaMonkey by installing the Mozilla XForms extension. This extension, while supporting a significant subset of the XForms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010. The last official release has been done for Firefox 3.6 and is available for download on addons.mozilla.org. For more details about the future of the Mozilla XForms extension see this blog post. ...
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
the above mentioned new variables should be added to the plugin implementation of NPP_GetValue (see example 3). How to call plugin native methods The following HTML code will do the job:</p> This should be changed, we shouldn't advocate EMBED <embed type="application/plugin-mimetype"> <script language="javascript"> var embed = document.embeds[0]; embed.nativeMethod(); </script> How to build and install Having the built Mozilla tree is probably not necessary, but building the plugin with a scriptable instance interface will require Mozilla headers and the XPCOM compatible idl compiler -- xpidl.exe. MS DevStudio MIDL must not be used. (Let's assume 'TestPlugin' as a plugin name-place holder.) Compile nsITestPlugin.idl with the idl compiler. This will generate nsITestPlugin.h and nsITestPlugin.xp...
XQuery - Archive of obsolete content
lusion, etc. While XQuery is currently not supported in Firefox (whether through JavaScript to developers or to browser users), at least one extension has been developed to give a preliminary support for XQuery for browser users (and serving as a simple model for how XQuery can be implemented within extensions). XqUSEme is a working proof-of-concept (so far tested on Windows and Linux with Java installed; Mac does not work) extension which allows one to perform XQueries on external URLs, the currently loaded webpage (even if originally from poorly formed HTML), and/or XML (including well-formed XHTML) documents stored locally. The extension now includes and interfaces with the open-source version of Saxonica's Saxon B (though this extension currently only performs the XQueries). Other popular ...
Archive of obsolete content
rom a certain URL or domain or scheme. Or whenever you make network requests yourself, you almost always need to enforce same-origin policy. Index of archived content Inner-browsing extending the browser navigation paradigm This article is the version from 2003 with slight modifications (no images and no links to samples). It's here for reference. Install.js See also this article from XulPlanet's Main Tutorial. JXON JXON (lossless JavaScript XML Object Notation) is a generic name by which is defined the representation of JavaScript Objects using XML. There are no real standards for this conversion, but some conventions begin to appear on the web. There are some cases in which the whole content of...
Index - Game development
ndow.requestAnimationFrame. 29 Implementing controls using the Gamepad API Controls, Gamepad API, Gamepads, Games, JavaScript, controllers The Gamepad API is very easy to develop with. Now it's easier than ever to deliver a console-like experience to the browser without the need for any plugins. You can play the full version of the Hungry Fridge game directly in your browser, install it from the Firefox Marketplace or check the source code of the demo along with all the other resources on the Gamepad API Content Kit. 30 Implementing game control mechanisms Controls, Desktop, Gamepad, Games, JavaScript, Laptop, Mobile, keyboard, mouse, touch One of HTML5's main advantages as a game development platform is the ability to run on various platforms and devices...
Game distribution - Game development
em and refresh the game on your server to provide players with the updated code almost instantly. Direct link distribution and instant play You don't have to tell people to search for your game in an app store with HTML5 games. You can just send them a direct URL to access the game, which they can then click to play the game right away without the need to use third party plugins or download and install a large package. Bear in mind that downloading the game might still take a bit of time depending on the size of the game and your network speed. In any case, it's a lot easier to promote the game if you can drive traffic directly where you want it and don't have to jump through lots of hoops to play. Desktop vs mobile The vast majority of the traffic we are interested in -- people playing HTML5...
Unconventional controls - Game development
Leap Motion plugin for Kiwi.js, or the case study of building a web game with Leap Motion and Pixi.js. Be sure to visit the LeapJS repository on GitHub to learn about the JavaScript client for the Leap Motion controller and read the documentation there. If all else fails, there's also a gallery of working examples you can look at. To get the Leap Motion working on your computer you have to first install it by following the steps at leapmotion.com/setup. When everything is installed and the controller is connected to your computer we can proceed with implementing support in our little demo. First, we add a <script> tag with the url pointing at this file, and add <div id="output"></div> just before the closing </body> tag for outputting diagnostic information. We will need a few helper variables ...
Implementing controls using the Gamepad API - Game development
he specification as they were thought to not be very useful. The discussion is still ongoing as to whether they should be put back, and in what form. Summary The Gamepad API is very easy to develop with. Now it's easier than ever to deliver a console-like experience to the browser without the need for any plugins. You can play the full version of the Hungry Fridge game directly in your browser, install it from the Firefox Marketplace or check the source code of the demo along with all the other resources on the Gamepad API Content Kit. ...
Game development
ed in how you can port your games over to the Web, you should learn more about our Emscripten tool -- this is an LLVM to JavaScript compiler, which takes LLVM bytecode (e.g. generated from C/C++ using Clang, or from another language) and compiles that into asm.js, which can be run on the Web. To get started, see: About Emscripten for an introduction including high-level details. Download and Install for installing the toolchain. Emscripten Tutorial for a tutorial to teach you how to get started. Examples For a list of web game examples, see our examples page. Also, check out games.mozilla.org for more useful resources! ...
CSS preprocessor - MDN Web Docs Glossary: Definitions of Web-related terms
ssor is a program that lets you generate CSS from the preprocessor's own unique syntax. There are many CSS preprocessors to choose from, however most CSS preprocessors will add some features that don't exist in pure CSS, such as mixin, nesting selector, inheritance selector, and so on. These features make the CSS structure more readable and easier to maintain. To use a CSS preprocessor, you must install a CSS compiler on your web server; Or use the CSS preprocessor to compile on the development environment, and then upload compiled CSS file to the web server. ...
FTU - MDN Web Docs Glossary: Definitions of Web-related terms
You can use FTU to set many important options (e.g. ...
Gaia - MDN Web Docs Glossary: Definitions of Web-related terms
The user interface and default application suite of the Firefox OS platform. Once Firefox OS starts, anything drawn to screen is a product of the Gaia layer (e.g., the lock screen, home screen, standard apps). Gaia is implemented entirely with HTML, CSS, and JavaScript, and its only interfaces to the underlying operating system are through open Web APIs, which the Gecko layer implements. You can install third-party apps alongside Gaia. Learn more Technical reference Gaia platform guide Gaia development/hacking guide ...
Google Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
key differences are described on the Chromium wiki. Chrome supports its own layout called Blink. Note that the iOS version of Chrome uses that platform's WebView, not Blink. Learn more General knowledge Google Chrome on Wikipedia For Chrome Users Use one of these links if you're an everyday user. Android iOS Desktop For Web Developers If you want to try the latest Chrome features, install one of the pre-stable builds. Google pushes updates frequently and has designed the distributions to run side-by-side with the stable version. Visit the Chrome Releases Blog to learn what's new. Chrome Dev for Android Chrome Canary for desktop. ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
gly, though, teams and hosting accounts don't allow FTP and instead rely on a version control system like Git. You will still find it used on older hosting accounts, but it is safe to say that FTP is no longer considered best practice. 139 FTU FTU, Firefox OS, First time use, Gaia, Glossary, Infrastructure, Intro FTU (First Time Use) is the app that loads when you run a newly-installed version of Gecko on a Firefox OS device. 140 Fallback alignment CSS, Glossary, alignment In CSS Box Alignment, a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fullfilled. For example, if you specify justify-content: space-between there must be more than one alignment subject. If there is not, the fallback alignment is us...
Progressive web apps - MDN Web Docs Glossary: Definitions of Web-related terms
evelopment. This involves taking standard web sites/apps that enjoy all the best parts of the Web -- such as discoverability via search engines, being linkable via URLs, and working across multiple form factors -- and supercharging them with modern APIs (such as Service Workers and Push) and features that confer other benefits more commonly attributed to native apps. These features include being installable, working offline, and being easy to sync with and re-engage the user from the server. Learn more The App Center on MDN Progressive web apps on Google Developers ...
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
c, or prototype). In depth Signatures in JavaScript JavaScript is a loosely typed or a dynamic language. That means you don't have to declare the type of a variable ahead of time. The type will get determined automatically while the program is being processed. A signature in JavaScript can still give you some information about the method: MyObject.prototype.myFunction(value) The method is installed on an object called MyObject. The method is installed on the prototype of MyObject (thus it is an instance method) as opposed to being a static method. The name of the method is myFunction. The method accepts one parameter, which is called value and is not further defined. Signatures in Java In Java, signatures are used to identify methods and classes at the level of the virtual machine c...
Test your skills: HTML accessibility - Learn web development
oint for this task to work in your own editor or in an online editor. HTML accessibility 3 In this task you are required to turn all the information links in the paragraph into good, accessible links. The first two links just go to regular web pages. The third link goes to a PDF, and it's large -- 8MB. The fourth link goes to a Word document, so the user will need some kind of application installed that can handle that. Try updating the live code below to recreate the finished example: Download the starting point for this task to work in your own editor or in an online editor. HTML accessibility 4 In our final HTML accessibility task, you are given a simple image gallery, which has some accessibility problems. Can you fix them? The header image has an accessiiblity issue, and ...
Backgrounds and borders - Learn web development
Previous Overview: Building blocks Next In this lesson, we will take a look at some of the creative things you can do with CSS backgrounds and borders. From adding gradients, background images, and rounded corners, backgrounds and borders are the answer to a lot of styling questions in CSS. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn how to style the background and border of boxes. Styling backgrounds in CSS The CSS background property is a shorthand for a number of background longhand properties that we will meet in this lesson. If you discover a complex background propert...
Cascade and inheritance - Learn web development
re resolved. While working through this lesson may seem less immediately relevant and a little more academic than some other parts of the course, an understanding of these things will save you much pain later on! We encourage you to work through this section carefully, and check that you understand the concepts before moving on. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the cascade and specificity, and how inheritance works in CSS. Conflicting rules CSS stands for Cascading Style Sheets, and that first word cascading is incredibly important to understand -- the way that the cascade...
Debugging CSS - Learn web development
expect. Perhaps you believe that a certain selector should match an element, but nothing happens, or a box is a different size than you expected. This article will give you guidance on how to go about debugging a CSS problem, and show you how the DevTools included in all modern browsers can help you to find out what is going on. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn the basics of what browser DevTools are, and how to do simple inspection and editing of CSS. How to access browser DevTools The article What are browser developer tools is an up-to-date guide explaining how to access the ...
Handling different text directions - Learn web development
ferent directionality of content, including right-to-left but also top-to-bottom content (such as Japanese) -- these different directionalities are called writing modes. As you progress in your study and begin to work with layout, an understanding of writing modes will be very helpful to you, therefore we will introduce them now. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To understand the importance of writing modes to modern CSS. What are writing modes? A writing mode in CSS refers to whether the text is running horizontally or vertically. The writing-mode property lets us switch from one writing...
Images, media, and form elements - Learn web development
t how certain special elements are treated in CSS. Images, other media, and form elements behave a little differently in terms of your ability to style them with CSS than regular boxes. Understanding what is and isn't possible can save some frustration, and this lesson will highlight some of the main things that you need to know. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To understand the way that some elements behave unusually when styled with CSS. Replaced elements Images and video are described as replaced elements. This means that CSS cannot affect the internal layout of these elements -- only...
Overflowing content - Learn web development
Previous Overview: Building blocks Next Overflow is what happens when there is too much content to fit in a container. In this guide you will learn what overflow is and how to manage it. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To understand overflow and how to manage it. What is overflow? Everything in CSS is a box. You can constrain the size of these boxes by assigning values of width and height (or inline-size and block-size). Overflow happens when there is too much content to fit in a box. CSS provides various tools to manage overflow. As you go further with CSS layout and wr...
Attribute selectors - Learn web development
Previous Overview: Building blocks Next As you know from your study of HTML, elements can have attributes that give further detail about the element being marked up. In CSS you can use attribute selectors to target elements with certain attributes. This lesson will show you how to use these very useful selectors. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn what attribute selectors are and how to use them. Presence and value selectors These selectors enable the selection of an element based on the presence of an attribute alone (for example href), or on various different mat...
Combinators - Learn web development
Previous Overview: Building blocks Next The final selectors we will look at are called combinators, because they combine other selectors in a way that gives them a useful relationship to each other and the location of content in the document. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the different combinator selectors that can be used in CSS. Descendant combinator The descendant combinator -- typically represented by a single space ( ) character -- combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent,...
Pseudo-classes and pseudo-elements - Learn web development
and pseudo-elements. There are a large number of these, and they often serve quite specific purposes. Once you know how to use them, you can look at the list to see if there is something which works for the task you are trying to achieve. Once again the relevant MDN page for each selector is helpful in explaining browser support. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the pseudo-class and pseudo-element selectors. What is a pseudo-class? A pseudo-class is a selector that selects elements that are in a specific state, e.g. they are the first element of their type, or they are bein...
Type, class, and ID selectors - Learn web development
Previous Overview: Building blocks Next In this lesson we will take a look at the simplest selectors that are available, which you will probably use the most in your work. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the different CSS selectors we can use to apply CSS to a document. Type selectors A type selector is sometimes referred to as a tag name selector or element selector, because it selects an HTML tag/element in your document. In the example below we have used the span, em and strong selectors. All instances of <span>, <em> and <strong> elements are therefore...
CSS selectors - Learn web development
In CSS, selectors are used to target the HTML elements on our web pages that we want to style. There are a wide variety of CSS selectors available, allowing for fine-grained precision when selecting elements to style. In this article and its sub-articles we'll run through the different types in great detail, seeing how they work. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn how CSS selectors work in detail. What is a selector? You have met selectors already. A CSS selector is the first part of a CSS Rule. It is a pattern of elements and other terms that tell the browser which HTML elements s...
Sizing items in CSS - Learn web development
ious lessons so far you have come across a number of ways to size items on a web page using CSS. Understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways elements get a size via CSS and define a few terms around sizing that will help you in the future. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To understand the different ways we can size things in CSS. The natural or intrinsic size of things HTML Elements have a natural size, set before they are affected by any CSS. A straightforward example is an image. An image has a ...
The box model - Learn web development
n CSS has a box around it, and understanding these boxes is key to being able to create layouts with CSS, or to align items with other items. In this lesson, we will take a proper look at the CSS Box Model so that you can build more complex layout tasks with an understanding of how it works and the terminology that relates to it. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the CSS Box Model, what makes up the box model and how to switch to the alternate model. Block and inline boxes In CSS we broadly have two types of boxes -- block boxes and inline boxes. These characteristics refer ...
CSS values and units - Learn web development
: Building blocks Next Every property used in CSS has a value or set of values that are allowed for that property, and taking a look at any property page on MDN will help you understand the values that are valid for any particular property. In this lesson we will take a look at some of the most common values and units in use. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn about the different types of values and units used in CSS properties. What is a CSS value? In CSS specifications and on the property pages here on MDN you will be able to spot values as they will be surrounded by angle br...
CSS building blocks - Learn web development
ooking to become a front-end web developer? We have put together a course that includes all the essential information you need to work towards your goal. Get started Prerequisites Before starting this module, you should have: Basic familiarity with using computers, and using the Web passively (i.e. just looking at it, consuming the content.) A basic work environment set up as detailed in Installing basic software, and an understanding of how to create and manage files, as detailed in Dealing with files. Basic familiarity with HTML, as discussed in the Introduction to HTML module. An understanding of the basics of CSS, as discussed in the CSS first steps module. Note: If you are working on a computer/tablet/another device where you don't have the ability to create your own files, you...
Supporting older browsers - Learn web development
isitors in older IE versions, you may find it better to focus on creating a fallback that works for all non-supporting browsers. Testing older browsers With the majority of browsers supporting Flexbox and Grid, it can be reasonably hard to test older browsers. One way is to use an online testing tool such as Sauce Labs, as detailed in the Cross browser testing module. You can also download and install Virtual Machines, and run older versions of browsers in a contained environment on your own computer. Having access to older versions of Internet Explorer is particularly useful, and for that purpose, Microsoft has made a range of Virtual Machines available for free download. These are available for Mac, Windows and Linux operating systems and so are a great way to test in old and modern Windows ...
Getting started with CSS - Learn web development
Previous Overview: First steps Next In this article we will take a simple HTML document and apply CSS to it, learning some practical things about the language along the way. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, and HTML basics (study Introduction to HTML.) Objective: To understand the basics of linking a CSS document to an HTML file, and be able to do simple text formatting with CSS. Starting with some HTML Our starting point is an HTML document. You can copy the code from below if you want to work on your own computer. Save the code below as index.html in a folder on your machine. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Getting started with CSS</ti...
How CSS is structured - Learn web development
Objective: To learn CSS's fundamental syntax structures in detail. ...
How CSS works - Learn web development
Previous Overview: First steps Next We have learned the basics of CSS, what it is for and how to write simple stylesheets. In this lesson we will take a look at how a browser takes CSS and HTML and turns that into a webpage. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, and HTML basics (study Introduction to HTML.) Objective: To understand the basics of how CSS and HTML are parsed by the browser, and what happens when a browser encounters CSS it does not understand. How does CSS actually work? When a browser displays a document, it must combine the document's content with its style information. It processes the document in a number of stages, which we've listed below. Bear in mind that t...
What is CSS? - Learn web development
Overview: First steps Next CSS (Cascading Style Sheets) allows you to create great-looking web pages, but how does it work under the hood? This article explains what CSS is, with a simple syntax example, and also covers some key terms about the language. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, and HTML basics (study Introduction to HTML.) Objective: To learn what CSS is. In the Introduction to HTML module we covered what HTML is, and how it is used to mark up documents. These documents will be readable in a web browser. Headings will look larger than regular text, paragraphs break onto a new line and have space between them. Links are colored and underlined to distinguish them from the rest o...
CSS first steps - Learn web development
Looking to become a front-end web developer? We have put together a course that includes all the essential information you need to work towards your goal. Get started Prerequisites Before starting this module, you should have: Basic familiarity with using computers, and using the Web passively (i.e. looking at it, consuming the content.) A basic work environment set up as detailed in Installing basic software, and an understanding of how to create and manage files, as detailed in Dealing with files. Basic familiarity with HTML, as discussed in the Introduction to HTML module. Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin o...
Learn to style HTML using CSS - Learn web development
and forth between the two topics. This is because HTML is far more interesting and much more fun to learn when you apply CSS, and you can't really learn CSS without knowing HTML. Before starting this topic, you should also be familiar with using computers and using the web passively (i.e., just looking at it, consuming the content). You should have a basic work environment set up as detailed in Installing basic software and understand how to create and manage files, as detailed in Dealing with files -- both of which are parts of our Getting started with the web complete beginner's module. It is recommended that you work through Getting started with the web before proceeding with this topic. However, doing so isn't absolutely necessary as much of what is covered in the CSS basics article is als...
How do you upload your files to a web server? - Learn web development
Summary If you have built a simple web page (see HTML basics for an example), you will probably want to put it online, on a web server. In this article we'll discuss how to do that, using various available options such as SFTP clients, RSync and GitHub. SFTP There are several SFTP clients out there. Our demo covers FileZilla, since it's free and available for Windows, macOS and Linux. To install FileZilla go to the FileZilla downloads page, click the big Download button, then install from the installer file in the usual way. Note: Of course there are lots of other options. See Publishing tools for more information. Open the FileZilla application; you should see something like this: Logging in For this example, we'll suppose that our hosting provider (the service that will host ou...
How do I use GitHub Pages? - Learn web development
publishing content using Github's gh-pages feature. Publishing content GitHub is a very important and useful community to get involved in, and Git/GitHub is a very popular version control system -- most tech companies now use it in their workflow. GitHub has a very useful feature called GitHub Pages, which allows you to publish website code live on the Web. Basic Github setup First of all, install Git on your machine. This is the underlying version control system software that GitHub works on top of. Next, sign up for a GitHub account. It's simple and easy. Once you've signed up, log in to github.com with your username and password. Preparing your code for upload You can store any code you like in a Github repository, but to use the GitHub Pages feature to full effect, your code shoul...
What software do I need to build a website? - Learn web development
ile devices cost money, of course, so we suggest taking a look at the Open Device Lab initiative. You can also share devices if you want to test on many platforms without spending too much. Next steps Some of this software is free, but not all of it. Find out how much it costs to do something on the web. If you'd like to learn more about text editors, read our article about how to choose and install a text editor. If you're wondering how to publish your website on the web, look at "How to upload files to a web server". ...
Common questions - Learn web development
edit, upload, or view a website. How much does it cost to do something on the Web? When you're launching a website, you may spend nothing or your costs may go through the roof. In this article we discuss how much everything costs and what you get for what you pay (or don't pay). What text editors are available? In this article we highlight some things to think about when choosing and installing a text editor for Web development. What are browser developer tools? Every browser features a set of devtools for debugging HTML, CSS, and other Web code. This article explains how to use the basic functions of your browser's devtools. How do you make sure your website works properly? So you've published your website online -- very good! But are you sure it works properly? This art...
Front-end web developer - Learn web development
iscourse forum. Let's get started. Good luck! The learning pathway Getting started Time to complete: 1.5-2 hours Prerequisites Nothing except basic computer literacy. How will I know I'm ready to move on? There are no assessments in this part of the course. But make sure you don't skip. It is important to get you set up and ready to do work for exercises later on in the course. Guides Installing basic software -- basic tool setup (15 min read) Background on the web and web standards (45 min read) Learning and getting help (45 min read) Semantics and structure with HTML Time to complete: 35-50 hours Prerequisites Nothing except basic computer literacy, and a basic web development environment. How will I know I'm ready to move on? The assessments in each module are designed to ...
CSS basics - Learn web development
Dealing with files HTML basics CSS basics JavaScript basics Publishing your website How the web works ...
Dealing with files - Learn web development
system tends to use backslashes, not forward slashes, e.g. C:\windows. ...
HTML basics - Learn web development
Dealing with files HTML basics CSS basics JavaScript basics Publishing your website How the web works ...
Publishing your website - Learn web development
ng What is a web server Understanding domain names How much does it cost to do something on the web? Deploy a Website: A nice tutorial from Codecademy that goes a bit further and shows some additional techniques. Cheap or Free Static Website Hosting by Scott Murray has some useful ideas on available services. Previous Overview: Getting started with the web Next In this module Installing basic software What will your website look like? Dealing with files HTML basics CSS basics JavaScript basics Publishing your website How the web works ...
What will your website look like? - Learn web development
er the results. Click the "plus" (Add to) icon next to the font you want. ...
Getting started with the Web - Learn web development
ebsite It's a lot of work to create a professional website, so if you're new to web development, we encourage you to start small. You won't build another Facebook right away, but it's not hard to get your own simple website online, so we'll start there. By working through the articles listed below in order, you will go from nothing to getting your first webpage online. Let's begin our journey! Installing basic software When it comes to tools for building a website, there's a lot to pick from. If you're just starting out, you might be confused by the array of code editors, frameworks, and testing tools out there. In Installing basic software, we show you step-by-step how to install just the software you need to begin some basic web development. What will your website look like? Before you st...
Getting started with HTML - Learn web development
cle defines elements, attributes, and all the other important terms you may have heard. It also explains where these fit into HTML. You will learn how HTML elements are structured, how a typical HTML page is structured, and other important basic language features. Along the way, there will be an opportunity to play with HTML too! Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of working with files. Objective: To gain basic familiarity with HTML, and practice writing a few HTML elements. What is HTML? HTML (Hypertext Markup Language) is not a programming language. It is a markup language that tells web browsers how to structure the web pages you visit. It can be as complicated or as simple as the web developer wants it to be. ...
Introduction to HTML - Learn web development
course that includes all the essential information you need to work towards your goal. Get started Prerequisites Before starting this module, you don't need any previous HTML knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content). You should have a basic work environment set up (as detailed in Installing basic software), and understand how to create and manage files (as detailed in Dealing with files). Both are parts of our Getting started with the web complete beginner's module. Note: If you are working on a computer/tablet/other devices that doesn't let you create your own files, you can try out (most of) the code examples in an online coding program such as JSBin or Glitch. Guides This...
Images in HTML - Learn web development
added. There are other types of multimedia to consider, but it is logical to start with the humble <img> element, used to embed a simple image in a webpage. In this article we'll look at how to use it in depth, including the basics, annotating it with captions using <figure>, and detailing how it relates to CSS background images. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, familiarity with HTML fundamentals (as covered in Getting started with HTML.) Objective: To learn how to embed simple images in HTML, annotate them with captions, and how HTML images relate to CSS background images. How do we put an image on a webpage? In order to put a simple image on a webpage, we use the <img> element. This is an em...
Structuring the web with HTML - Learn web development
ont-end web developer? We have put together a course that includes all the essential information you need to work towards your goal. Get started Prerequisites Before starting this topic, you should have at least basic familiarity with using computers and using the web passively (i.e. just looking at it, consuming the content). You should have a basic work environment set up as detailed in Installing basic software, and understand how to create and manage files, as detailed in Dealing with files -- both are parts of our Getting started with the web complete beginner's module. It is recommended that you work through Getting started with the web before attempting this topic, however, it isn't absolutely necessary; much of what is covered in the HTML basics article is also covered in our Int...
Introduction to web APIs - Learn web development
ipt libraries -- Usually one or more JavaScript files containing custom functions that you can attach to your web page to speed up or enable writing common functionality. Examples include jQuery, Mootools and React. JavaScript frameworks -- The next step up from libraries, JavaScript frameworks (e.g. Angular and Ember) tend to be packages of HTML, CSS, JavaScript, and other technologies that you install and then use to write an entire web application from scratch. The key difference between a library and a framework is "Inversion of Control". When calling a method from a library, the developer is in control. With a framework, the control is inverted: the framework calls the developer's code. What can APIs do? There are a huge number of APIs available in modern browsers that allow you to do a ...
HTML performance features - Learn web development
ese two properties when creating or editing HTML code. Complications can occur when, for example, the file size of a <video> embed is too large, or when a webpage is not optimized for mobile devices. This module intends to walk you through the key HTML performance features that can drastically improve the quality of your webpage. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To learn about the impact of HTML elements and attributes on web performance optimization. Elements & attributes impacting performance The <picture> Element The <video> Element The <source> Element The <img> srcset attribute Responsive images Preloading content with rel="preload" - (https://w3c...
Measuring performance - Learn web development
should be relevant to your users, site, and business goals. They should be collected and measured in a consistent manner and analyzed in a format that can be consumed and understood by non-technical stakeholders. This article introduces web perfomrance metrics that you can use to measure and optimize your site's performance. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To provide information about web performance metrics that you can collect through various web performance APIs and tools that you can use to visualize that data. Performance APIs When writing code for the Web, there are a large number of Web APIs available that allow you to create your own performance ...
Multimedia: Images - Learn web development
Previous Overview: Performance Next Media, namely images and video, account for over 70% of the bytes downloaded for the average website. In terms of download performance, eliminating media, and reducing file size is the low-hanging fruit. This article looks at optimizing image and video to improve web performance. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To learn about the various image formats, their impact on performance, and how to reduce the impact of images on overall page load time. This is a high-level introduction to optimizing multimedia delivery on the web, covering general principles and techniques. For a more in-depth guide, see https://images.guide. ...
Perceived performance - Learn web development
aps more important, than any objective statistic, but it's subjective, and not as readily measurable. Perceived performance is user perspective, not a metric. This article provides a brief introduction to perceived performance, looking at user perceptions, and what objective tools can be used to measure that which is subjective. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To gain basic familiarity of user perception of web performance. Performance is about user perception. How fast a website feels like it's loading and rendering has a greater impact on user experience than how fast the website actually loads and renders. Even if an operation is going to take a long time (because ...
What is web performance? - Learn web development
interacting with it quickly, and offer reassuring feedback if something is taking time to load (e.g. a loading spinner)? Are scrolling and animations smooth? This article provides a brief introduction to objective, measureable web performance*, looking at what technologies, techniques, and tools are involved in web optimization. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To gain basic familiarity of what is involved with web performance. * versus subjective, perceived performance, covered in the next article What is web performance? Web performance is the objective measurement and perceived user experience of a web site or application. This includes the following major areas: ...
JavaScript performance - Learn web development
rformance Next While images and video account for over 70% of the bytes downloaded for the average website, byte per byte, JavaScript has a greater negative impact on performance. This article looks to introduce performance issues caused by scripts and introduces tips and tricks for optimizing JavaScript for web performance. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To learn about the effects of JavaScript on performance optimization, and how a JavaScript file size is not the only impact on web performance. Similar to images and video, the best way to improve performance is to omit what is not, in fact, necessary. But not all bytes downloaded have the same impact. JavaScrip...
Multimedia: video - Learn web development
Previous Overview: Performance Next As we learned in the previous section, media, namely images and video, account for over 70% of the bytes downloaded for the average website. We have already taken a look at optimizing images. This article looks at optimizing video to improve web performance. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To learn about the various video formats, their impact on performance, and how to reduce video impact on overall page load time while serving the smallest video file size based on each browsers file type support. Why optimize your multimedia? For the average website, 25% of bandwidth comes from video. Optimizing video has the potential f...
The "why" of web performance - Learn web development
Overview: Performance Next Web performance is all about making websites fast, including making slow processes seem fast. This article provides an introduction into why web performance is important to site visitors and for your business goals. Prerequisites: Basic computer literacy, basic software installed, and basic knowledge of client-side web technologies. Objective: To gain basic familiarity of why web performance is important for good user experience. Web performance refers to how quickly site content loads and renders in a web browser, and how well it responds to user interaction. Bad performing sites are slow to display and slow to respond to input. Bad performing sites increase site abandonment. At its worst, bad performance causes content to be co...
Properly configuring server MIME types - Learn web development
ake to determine the correct MIME type value to be used for your content. If your content was created using a vendor's software application, read the vendor's documentation to see what MIME types should be reported for different media types. Look in the IANA | MIME Media Types registry which contains all registered MIME types. If the media type is displayed using a plug-in in Netscape Gecko, install the plug-in and then look in the Help->About Plug-ins Menu to see what MIME types are associated with the media type. Search for the file extension in FILExt or File extensions reference to see what MIME types are associated with that extension. How to set up your server to send the correct MIME types The fundamental idea is to configure your server to send the correct Content-Type HTTP heade...
Ember resources and troubleshooting - Learn web development
o search for relevant code, when a debugger is placed, the sourcemap will be loaded and the breakpoint will be placed in the pre-transpiled code for easier correlation to your project code. For more information on sourcemaps, why they're needed, and what the ember-cli does with them, see the Advanced Use: Asset Compilation guide. Note that sourcemaps are enabled by default. ember-data comes pre-installed; do I need it? Not at all. While ember-data solves the most common problems that any app dealing with data will run in to, it is possible to roll your own front-end data client. A common alternative is to any fully-featured front-end data client is The Fetch API. Using the design patterns provided by the framework, a Route using fetch() would look something like this: import Route from '@...
Ember app structure and componentization - Learn web development
a component, we use the ember generate component command, followed by the name of the component. Let's create the header component first. To do so: Stop the server running by going to the terminal and pressing Ctrl + C. Enter the following command into your terminal: ember generate component header These will generate some new files, as shown in the resulting terminal output: installing component create app/components/header.hbs skip app/components/header.js tip to add a class, run `ember generate component-class header` installing component-test create tests/integration/components/header-test.js header.hbs is the template file where we'll include the HTML structure for just that component. Later on we'll add the required dynamic functionality such as data binding...
Introduction to client-side frameworks - Learn web development
growth of the web. Now, JavaScript is an essential part of the web, used on 95% of all websites, and the web is an essential part of modern life. Users write papers, manage their budgets, stream music, watch movies, and communicate with others over great distances instantaneously, with text, audio or video chat. The web allows us to do things that used to be possible only in native applications installed on our computers. These modern, complex, interactive websites are often referred to as web applications. The advent of modern JavaScript frameworks has made it much easier to build highly dynamic, interactive applications. A framework is a library that offers opinions about how software gets built. These opinions allow for predictability and homogeneity in an application; predictability allows...
React interactivity: Events and state - Learn web development
ve you a warning in your DevTools console -- "Warning: Encountered two children with the same key..." We need to fix this. Making unique identifiers is a hard problem - one for which the JavaScript community has written some helpful libraries. We'll use nanoid because it's tiny, and it works. Make sure you're in the root directory of your application and run the following terminal command: npm install nanoid Note: If you're using yarn, you'll need the following instead: yarn add nanoid Now we can import nanoid into the top of App.js so we can use it to create unique IDs for our new tasks. First of all, include the following import line at the top of App.js: import { nanoid } from "nanoid"; Now let's update addTask() so that each task ID becomes a prefix todo- plus a unique string generat...
React resources - Learn web development
lterButton, and Todo components are indented to the right - this indicates that App is their parent. In more complex apps, this view is great for understanding parent/child relationships at a glance. React DevTools is available in a number of forms: A Chrome browser extension. A Firefox browser extension. A Chromium Edge browser extension (available soon). A stand-alone application you can install with NPM or Yarn. Try installing one of these, then using it to inspect the app you've just built! You can read more about React DevTools on the React blog. The Context API The application that we built in this tutorial utilized component props to pass data from its App component to the child components that needed it. Most of the time, props are an appropriate method for sharing data; for c...
Using Vue computed properties - Learn web development
e work similarly to methods, but only re-run when one of their dependencies changes. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn how to use Vue computed properties. Using computed properties The aim here is to add a summary count of our to-do list. This can be useful for users, while also serving to label the list for assi...
Vue conditional rendering: editing existing todos - Learn web development
date todo item labels. We'll also look at adding functionality to delete todo items. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn how to do conditional rendering in Vue. Creating an editing component We can start by creating a separate component to handle the editing functionality. In your components directory, create a new...
Adding a new todo form: Vue events, methods, and models - Learn web development
the list, and a model to control the data. This is what we'll cover in this article. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn about handling forms in Vue, and by association, events, models, and methods. Creating a New To-Do form We now have an app that displays a list of to-do items. However, we can't update our list o...
Focus management with Vue refs - Learn web development
direct access from one component to the internal DOM structure of a child component. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn how to handle focus management using Vue refs. The focus management problem While we do have working edit functionality, we aren't providing a great experience for non-mouse users. Specifically, ...
Rendering a list of Vue components - Learn web development
en loop through and display inside ToDoItem components using the v-for directive. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn how to loop through an array of data and render it in multiple components. Rendering lists with v-for To be an effective to-do list, we need to be able to render multiple to-do items. To do that,...
Vue resources - Learn web development
ources that you can use to go further in your learning, plus some other useful tips. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn where to go to find further information on Vue, to continue your learning. Further resources Here's where you should go to learn more about Vue: Vue Docs -- The main Vue site. Contains compreh...
Styling Vue components with CSS - Learn web development
In this article we'll explore the different ways of styling Vue components with CSS. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like Single File Components or render functions), you'll need a terminal with node + npm installed. Objective: To learn about styling Vue components. Styling Vue components with CSS Before we move on to add more advanced features to our app, we should add some basic CSS to make it look better. Vue has three common...
Implementing feature detection - Learn web development
something that demonstrates this, although we'll keep it simple for now. Start by making local copies of our css-feature-detect.html, flex-layout.css, float-layout.css, and basic-styling.css files. Save them in a new directory. We will add the HTML5 Shiv to our example too so that the HTML5 semantic elements will style properly in older versions of IE. ...
Introduction to cross browser testing - Learn web development
combinations on physical hardware, you can also make use of emulators (emulate a device using software on your desktop computer) and virtual machines (software that allows you to emulate multiple operating system/software combinations on your desktop computer). This is a very popular choice, especially in some circumstances -- for example, Windows doesn't let you have multiple versions of Windows installed simulataneously on the same machine, so using multiple virtual machines is often the only option here. Another option is user groups -- using a group of people outside your development team to test your site. This could be a group of friends or family, a group of other employees, a class at a local university, or a professional user testing setup, where people are paid to test out your site an...
Cross browser testing - Learn web development
times per day, can get tedious and time-consuming. To handle this efficiently, you should become familiar with automation tools. In this article, we look at what is available, how to use task runners, and the basics of how to use commercial browser test automation apps such as Sauce Labs and Browser Stack. Setting up your own test automation environment In this article, we will teach you how to install your own automation environment and run your own tests using Selenium/WebDriver and a testing library such as selenium-webdriver for Node. We will also look at how to integrate your local testing environment with commercial apps like the ones discussed in the previous article. ...
Git and GitHub - Learn web development
opy, and then push those changes back up to the server, where an administrator will decide whether to merge your changes with the master copy. Looking to become a front-end web developer? We have put together a course that includes all the essential information you need to work towards your goal. Get started Prerequisites To use Git and GitHub, you need: A desktop computer with Git installed on it (see the Git downloads page). A tool to use Git. Depending on how you like to work, you could use a Git GUI client (we'd recommend GitHub Desktop, SourceTree or Git Kraken) or just stick to using a terminal window. In fact, it is probably useful for you to get to know at least the basics of git terminal commands, even if you intend to use a GUI. A GitHub account. If you haven't already ...
Tools and testing - Learn web development
using test runners. In addition, you should start with the first module in this topic, which gives a useful overview of the general area. Modules Understanding client-side web development tools Client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line. We finish up by providing a complete toolchain example showing you how to get productive. Understanding client-side JavaScript frameworks JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. Many m...
Learn web development
thon) and Express (Node.js). Getting our code examples The code examples you'll encounter in the Learning Area are all available on GitHub. If you want to copy them all to your computer, the easiest way is to download a ZIP of the latest master code branch. If you prefer to copy the repo in a more flexible way that allows for automatic updates, you can follow the more complex instructions: Install Git on your machine. This is the underlying version control system software that GitHub works on top of. Open your computer's command prompt (Windows) or terminal (Linux, macOS). To copy the learning area repo to a folder called learning-area in the current location your command prompt/terminal is pointing to, use the following command: git clone https://github.com/mdn/learning-area You ca...
Mozilla Plugin Accessibility
ility API support Most plugins that work with Mozilla do not yet support accessibility APIs. A notable acception is the Adobe PDF plugin on Windows, which supports MSAA. In other cases, vendors need to find or be convinced of the business justification so that resources are applied to the problem. Plugin vendors. Unknown 4. Seamonkey has no message bar for plugin installation The message bar will be ported to Seamonkey as part of the toolkit merging work that will occur for xulrunner. Mozilla community No target ...
Mozilla's Section 508 Compliance
e executable from a keyboard where the function itself or the result of performing a function can be discerned textually. Mostly complete. Caveats: 1) Although sidebar cannot be customized without a mouse, all sidebar functions that come with the browser are available through other means 2) Java and in-page plugins cannot be used with the keyboard, so they must not be installed for keyboard-only users Additional features for the keyboard: 1) Find as you type allows for quick navigation to links and convenient text searching 2) Browse with caret (F7 key toggles) allows users to select arbitrary content with the keyboard and move through content as if inside a readonly editor. Incomplete. Inadequate attention paid to Mac keyboard bugs. Needs...
ZoomText
th Mozilla/ZoomText compatibility. Here's how you can test: Download a copy of Mozilla 1.8a6 (this is not Firefox). Read the release notes if you're interested. These builds are pretty stable considering they're only alpha, I'm having very good luck with them. It doesn't do us any good to get bug reports on older stuff right now. Our main focus is on the browser itself, so you you only need to install mailnews or address book if curious about the other apps. You will also need to install ZoomText 8.11.3. Happy testing! You may wish to read through the current issues on this page before reporting bugs. Send me email so that I'm aware that you're testing and let me know what bugs you're finding. My email address is aaronleventhal@moonset.net. Issues for AI Squared, from high to low priority...
Obsolete
This page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs. ...
Add-ons
g add-ons Addons.mozilla.org, commonly known as "AMO," is Mozilla's official site for developers to list add-ons, and for users to discover them. By uploading your add-on to AMO, you can participate in our community of users and creators and find an audience for your add-on. You are not required to list your add-on on AMO, but your add-on must be signed by Mozilla else users will not be able to install it. For an overview for the process of publishing your add-on see Signing and distributing your add-on. Other types of add-ons In addition to extensions, there are a few other add-on types that allow users to customize Firefox. Those add-ons include: User dictionaries let you spell-check in different languages. Language packs let you have more languages available for the user inter...
Bugzilla
troduction to Bugzilla Bugzilla for humans Bugzilla QuickSearch help page. QuickSearch is a quick, easy, and very effective way of quickly querying bugzilla. Testopia - test case management extension bugzilla.org - the project site wikipedia:Bugzilla - general description of Bugzilla (not specific to Mozilla projects) BMO on wiki.mozilla.org - information about Mozilla's customized Bugzilla installation, including how to contribute to it Tools Bugzilla Todos lists review and flag requests, patches to check in, unfulfilled requests you made of other people, and assigned bugs. Bz Kanban is a board to visualize the status of bugs within a milestone. ...
Building SpiderMonkey with UBSan
1. Compile a recent version of LLVM & Clang. 2. Save the following bash script, fixing LLVM_ROOT to point to your installation. #! /bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 autoconf213 mkdir $1 cd $1 LLVM_ROOT="$HOME/llvm" SANFLAG="-fsanitize=undefined -fno-sanitize=alignment,float-cast-overflow,float-divide-by-zero,vptr -Dxmalloc=myxmalloc" \ CC="$LLVM_ROOT/build/Release+Asserts/bin/clang" \ CXX="$LLVM_ROOT/build/Release+Asserts/bin/clang++" \ CFLAGS="$SANFLAG" \ CXXFLAGS="$SANFLAG" \ MOZ_LLVM_HACKS=1 \ ../configure --enable-debug --disable-optimize make -j 8 fi 3. Use the script to compile SpiderMonkey. This enables all the cheap un...
Creating MozSearch plugins
earch engine, its URL, and the parameters that need to be passed to that URL. Warning: MozSearch is non-standard and is intended for internal use within Mozilla projects only. It should only be used if your intention is to distribute the search plugin packaged in a Firefox extension, or if you are creating plugins meant to be shipped by default in a Firefox build. For creating search plugins for installation from the web, see Creating OpenSearch plugins for Firefox The plugin file The MozSearch format is similar to the OpenSearch format. The only difference is the root element and XML namespace. Example: searching Yahoo! The following XML is the bundled Firefox 2 search plugin for searching using Yahoo!: <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> <ShortName>Yahoo</Sh...
Capturing a minidump
Breakpad, these minidumps contain the complete contents of program memory. They are therefore much more likely to contain private information, if there is any in the browser. For this reason, you may prefer to generate minidumps against a clean profile where possible. Capturing a minidump: application crash To capture a full minidump for an application crash, you can use a tool called windbg. Install debugging tools for Windows Microsoft distributes the Debugging Tools for Windows for free, those include WinDbg which you will need here. Download it from Install Debugging Tools for Windows. (You'll want the 32-bit version of WinDbg only if you are using a 32-bit version of Firefox) Then install it, the standard settings in the installation process are fine. Capture a minidump Connect F...
Building Firefox with Debug Symbols
load symbols to a socorro server. ...
Configuring Build Options
...
Makefile - targets
ded by the makefile. Target name Description build Default target. Compile Firefox, Thunderbird, etc check Standalone shell unit test invoked directly by make configure Launch the configure program to define headers and and attributes for the target build machine. ...
Makefiles - Best practices and suggestions
orm specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware. For classes of hardware (unix/windows) place your makefile in a subdirectory, unix/Makefile.in Always include dependencies when creating a target Initial make call should always be the workhorse: build, generate, deploy, install, etc. All subsequent make calls must become a NOP unless sources or dependencies change or have been removed. Incorrect dependencies will contribute to wasted cycles and can contribute to circular dependencies. Directory dependencies Do not use directories as a dependency for generated targets, ever. Any activity within a directory will alter inodes forcing targe...
Simple Instantbird build
nder a directory with spaces in the path (e.g., don't use "Documents and Settings"). You can pick any other location, such as a new directory C:\instantbird-src. Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving i...
Updating NSPR or NSS in mozilla-central
update the README file. Check for new or removed files $ hg addremove -n Review the output to make sure it looks correct Update the minimum required system NSS version in old-configure.in. This is for builds with --with-system-nss. For example, in the following, "3.16.1" would be replaced with the new NSS version. MOZ_ARG_WITH_BOOL(system-nss, [ --with-system-nss Use system installed NSS], _USE_SYSTEM_NSS=1 ) if test -n "$_USE_SYSTEM_NSS"; then AM_PATH_NSS(3.16.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) fi Commit the update: $ hg commit -A In order to eliminate any problems related to how NSS and NSPR are built differently in Firefox than they are standalone, you should push your commit to Try first. ...
pymake
On other operating systems (Linux, OS X, etc), pymake itself only requires Python 2.6 or higher (but not Python 3). Please note that Python 2.7 is strongly recommended. ...
The Firefox codebase: CSS Guidelines
esList { box-shadow: inset -2px 0 0 hsla(0,0%,100%,.2); } @media (-moz-mac-yosemite-theme) { #placesList { box-shadow: none; } } Theme support Firefox comes built-in with 3 themes: default, light and dark. The built-in light/dark themes are a bit special as they load the compacttheme.css stylesheet. In addition to this, Firefox supports a variety of WebExtension themes that can be installed from AMO. For testing purposes, here is an example of a WebExtension theme. Writing theme-friendly CSS Some CSS variables that are pre-adjusted for different platforms are also pre-adjusted for themes, so it's again a good idea to use them for theme support. The text color of elements often contains valuable information from the theme colors, so currentcolor/inheritance is again a good ide...
Runtime Directories
Default Application Installation and User Profile Directories Firefox OS Application Directory User Profile Directory Temporary Directory Windows Vista/7 C:\Program Files\Mozilla Firefox\ C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\ (or %APPDATA%\Mozilla\Firefox\) C:\Users\<username>\AppData\Local\Mozilla\Firefox\ (or %LOCALAPPDATA%\Mozilla\Firefox) and C:\Users\<username>\AppData\Local\VirtualStore\Program Files\Mozilla Firefox\ Windows 2000/XP C:\Program Files\Mozilla Firefox\ C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\ (or %APPDATA%\Mozilla\Firefox\) C:\Documents and Settings\<username>\Local Settings\Application Data\Mozilla\Firefox\ OS X /Applications/Firefox.app ~/...
Index
compatibility matrix The following table lists the available library versions for the mozilla.org-distributed Firefox builds dependencies, and/or to build Firefox. 143 Multiple Firefox profiles Beginner, Firefox, Guide, Intro, Profiles, QA A profile in Firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of Firefox. You can find details about profiles on Mozilla's end-user support site. 168 Performance best practices for Firefox front-end engineers Best practices, Developing Firefox, Developing Mozilla, Firefox, Front-end, Mozilla, Performance This guide will help Firefox developers working on front-end code produce code which is as performant as possible--n...
Limitations of chrome scripts
rns described here we've implemented compatibility shims so the patterns still work. For example: whenever extensions try to access web content from the chrome process, the browser will return a Cross Process Object Wrapper that gives the chrome code synchronous access to the content. You'll get the shims for your add-on by default, unless you set the multiprocessCompatible flag in your add-on's install manifest. However, these shims are not a substitute for migrating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly You can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledWarnings preference and watc...
Firefox
tentially some sites that have been pinned to always appear in that space. Linux compatibility matrixThe following table lists the available library versions for the mozilla.org-distributed Firefox builds dependencies, and/or to build Firefox.Multiple Firefox profilesA profile in Firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of Firefox. You can find details about profiles on Mozilla's end-user support site.Performance best practices for Firefox front-end engineersThis guide will help Firefox developers working on front-end code produce code which is as performant as possible--not just on its own, but in terms of its impact on other parts of Firefox. Always keep in mind the side effects your changes ...
Firefox Operational Information Database: SQLite
A large amount of operational information about websites visited and browser configuration is stored in relational databases in SQLite used by Firefox. The SQLite Manager add-on allows convenient browsing of this information. (Install the SQLite Mangager add-on, click Tools -> SQLite Manager. In the manager, select the database you want to explore in the '(Select Profile Database)' pulldown, click 'Go', select one of the tables listed in the left column and see the current contents of the database in the 'Browse & Search' tab.) Some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons...
Overview of Mozilla embedding APIs
nsIWebProgress Interface status... Interface definition: nsIWebProgressListener Interface status... Interface definition: nsIPrompt Interface status... Interface definition: nsIPrefs Interface status... Interface definition: nsIProfile The Profile Manager creates and manages user profiles; each profile is essentially a complete configuration of the application, including preferences, installed extensions, and so forth. nsIDirectoryServiceProvider Interface status... Interface definition: nsILocalFile Interface status... Interface definition: nsIFile Interface status... Interface definition: nsIClipboardCommands Interface status... Interface definition: nsISelection Interface status... Interface definition: nsIURILoader Interface status... Interface definition: ns...
Roll your own browser: An embedding how-to
not, use embedding/config. What bits do I need? One of the requirements of building a SDK is the ability to identify and package up required files. Like that isn't totally obvious, nonetheless it has to be done. Here is that effort. I have created a directory under embedding called config. Contained within this directory are a couple of makefiles: basebrowser-unix basebrowser-win The XPInstall packager follows the same format. However in our case, we only have one named XPI package. After the build is done, you can change directory into mozilla/embedding/config, and do a make. This will produce a directory in DIST named Embed. It should include all of the base support that you need to get a web browser started up. Included is the sample test application (gtkEmbed or winEmbed). What ...
Gecko SDK
when running the tool that looks something along the lines of this: dyld: Library not loaded: /opt/local/lib/libintl.3.dylib Referenced from: /Users/varmaa/xulrunner-sdk/bin/./xpidl Reason: image not found Trace/BPT trap Unfortunately, this is caused by a problem with the SDK build process which cannot currently be resolved (see Bugzilla bug #430274). To get around it, you'll need to first install MacPorts as outlined in the Mac OS X Build Prerequisites and install libidl with it. On 64-bit versions of Mac OS X, you'll need to install libidl with the +universal flag. Once that's done, you should perform the following command: ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib This should fix the problem. Building the SDK To build the SDK, you should build XULRunner (t...
How test harnesses work
invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the browser check for crashes (mozcrash) reporting (moztest) Marionette Tests List of Testing Extensions pageloader (talos) mochitest: //github.com/RealityRipple/UXP/blob/master/testing/mochitest/install.rdf (mochitest) ...
How to implement a custom autocomplete search component
Because creating an XPCOM component in order to build a custom autocomplete source can be enough to discourage some developers, below is an example JavaScript XPCOM component called "simple-autocomplete" that implements the necessary interfaces. Note: When copying the examples below, change the UUID that uniquely identifies the component, otherwise you might have problems if your component gets installed along another component derived from those same examples. That can happen! So, get a UUID from http://www.famkruithof.net/uuid/uuidgen, for example, and paste it in. Basic example for Gecko 2.0 and up (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This example is your first best try because: it has no specific logic (it just returns a dummy array of choices) it doesn't care about compatibilit...
How to investigate Disconnect failures
r > Windows Logs > Application And here we look for errors that overlapped with the test run; we cannot see the freezes (the main thread is blocked). Crashes (not freezes) If we have a crash we always should submit it. Under about:crashes we have links to all the crashes submitted by Firefox to crash-stats. From there use "Signature" as summary for bugzilla bug. In "Extensions" check installed addons and check if they might be responsible for the failure. 3. Single out the failing test or shorten the required tests needed to reproduce. 4. Reproduce manually if possible. File a bug Once you found what caused the failure, file a new bug; if you could make it reproducible, narrow down the test case as much as you can so we can see what causes the failure. ...
How to Report a Hung Firefox
# on osx kill -s SIGABRT 31042 The Firefox crash report UI should appear. Please check the box to send the crash report to Mozilla Start Firefox. Type "about:crashes" in the URL bar and click on the top listing. Create a new bug report at bugzilla.mozilla.org using this link. All OS As long as you do not need to be in Firerfox's safe mode, a user friendly method of crashing Firefox is to install and use the addon Crash Me Now! (Simple) Use the menu button to find the Crash me icon and click the icon. Firefox crash report UI should appear. Please check the box to send the crash report to Mozilla Start Firefox. Type "about:crashes" in the URL bar and click on the top listing. Create a new bug report at bugzilla.mozilla.org using this link. Another way to trigger a crash in a hung ...
IME handling guide
cess of "Stop IME state management". When IMEStateManager::StopIMEStateManagement() is called in the remote process by this, the IMEStateManager forgets all focus information (i.e., that indicates nobody has focus). When IMEStateManager in parent process is notified of pseudo focus move from or to menubar while a remote process has focus, it notifies the remote process of "Menu keyboard listener installed". Then, TabChild calls IMEStateManager::OnInstalledMenuKeyboardListener() in the remote process. Style of each clause The style of each IME selection is managed by LookAndFeel class per platform. Therefore, it can be overridden by prefs. Background color, foreground color (text color) and underline color can be specified with following prefs. The values must be string of "#rrggbb" format. ...
AddonType
They are mostly used to help the UI know how to display the different types of add-on. Properties Attribute Type Description id string The unique ID for the type. name string The localized name for the type. uiPriority integer A number used to determine the order of types displayed in the user interface. The lower the number the higher in the list the type will appear. ...
Add-on Repository
tances: retrieveRecommendedAddons(), which returns a list of recommended add-ons, and searchAddons(), which performs a search of the repository. These searches are asynchronous; results are passed to the provided SearchCallback object when the search is completed. Results passed to the SearchCallback object only include add-ons that are compatible with the current application and are not already installed or in the process of being installed. AddonRepository can only process one search at a time. A new search will immediately fail if the AddonRepository is already handling another search request. To import the Add-on Repository code module, use: Components.utils.import("resource://gre/modules/AddonRepository.jsm"); Method overview string getRecommendedURL() string getSearc...
AsyncShutdown.jsm
tered for this condition, this is a noop. boolean removeBlocker( in function|promise|* condition ) Arguments condition A condition blocking the completion of the phase. This must be the same condition as was passed to addBlocker prior. Return Value Returns true if a blocker has been removed, or false otherwise. Note that a result of false may mean either that the blocker has never been installed or that the phase has completed and the blocker has already been resolved. Examples AsyncShutdown.profileBeforeChange.addBlocker("Module: just a promise", promise); // profileBeforeChange will not complete until // promise is resolved or rejected AsyncShutdown.profileBeforeChange.addBlocker("Module: a callback", function condition() { // ... // Execute th...
source-editor.jsm
Redo(); Parameters None. Return value true if there are changes that can be redone, otherwise false. canUndo() Determines whether or not there are changes that can be undone. Boolean canUndo(); Parameters None. Return value true if there are changes that can be undone, otherwise false. destroy() Destroys the editor, releasing resource it's allocated and removing event handlers it's installed. You should call this method when you're done using the editor object. void destroy(); Parameters None. dropSelection() Deselects the currently selected text. void dropSelection(); Parameters None. endCompoundChange() Ends a compound change that was previously started by calling startCompoundChange(). All changes made to the text between the two calls is considered to be a single ed...
JavaScript code modules
import a JavaScript code module. Components.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 JavaScript modules, along with download links and documentation, that extension developers can use in their code. Standard code modules AddonManager.jsm An interface to install, manage, and uninstall add-ons. AddonRepository.jsm Provides a search of add-ons in the repository. Assert.jsm Implements the CommonJS Unit Testing specification version 1.1, which provides a basic standardized interface for performing in-code logical assertions with optional, customizable error reporting. BookmarkHTMLUtils.jsm Provides utility functions for importing and exporting bookmark...
Index
w a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (DTD and properties) used in the Mozilla source code. With that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation. Repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version. 28 Mozilla L10n Style Guide Localization Cultural references, idioms, and slang require a full understanding of these references between the cultures of your source and target languages. An example of a cultural reference in English would be ...
Localizing with Mozilla Translator
MozillaTranslator (MT) is a Java-based CAT tool used to translate a variety of Mozilla applications. Since it is written in Java, any platform that supports Java 1.7 or above supports MozillaTranslator also. If you decide to use MozillaTranslator, be sure you have Java 1.7 or above installed on your system. Like most CAT tools, MozillaTranslator employs glossaries and translation memory to leverage your work from previous translations, thus cutting time and effort when localizing new versions of Mozilla applications. Getting started with MozillaTranslator MT uses products as groups of localization files with a common root directory (for instance, you may have a product for Thunderbird, other for SeaMonkey, other for Dom, other for Toolkit, etc.) You update your repository copy using your...
Patching a Localization
you are to the point that you are patching existing localizations, we assume that you have the basic set of tools listed on the L10n Prerequisites wiki page. If you do not have these tools, take a few steps back, grab a cookie (because, let's face it, you deserve it for all of your work), and visit the L10n Prerequisites page. There you'll learn what tools you need, where to find them, and how to install them. Get the source First, you need to get the source for the localization in question using its two or three character ISO language code. For our example, I'll use gl (Galician). Whenever you see gl in blue text, replace it with the locale code for your language. Next thing you need to know is which localization version you want to patch. All of our localizations work on the Aurora branch. The ...
What every Mozilla translator should know
VERIFIED and write verified1.8.xxx in the keyword field Tinderbox In Tinderbox you can see the result of the build process. Once you have made some changes in Mercurial, as soon as the next build is done you can check the Tinderbox and see if something was wrong. ...
Test
You should see a grid with perfectly straight black lines. If not, please consider installing some MathML fonts. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
MathML3Testsuite
When the markup is intentionally errorous, the correct behavior is not defined by the recommendation and hence the tests are considered passed if there is no fatal error (crash, etc). ...
MathML Torture Test
oad, false); The following test contains sample TeX formulas from Knuth's TeX book and equivalent MathML representations. It compares the rendering by the XeTeX engine using the default Latin Modern Math font against the MathML rendering by your browser using the default math font, or an alternative OpenType MATH fonts. To get the best rendering, be sure to have appropriate mathematical fonts installed on your system and to use a browser with OpenType MATH support such as Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28) or higher. You may also try this test page for Mathematical OpenType Fonts which instead relies on Web fonts. Finally, you may want to check this table comparing how the tests are read by various screen readers for Mozilla browsers. Link to test: MathML Torture T...
Mozilla Port Blocking
Run time Users can modify the default port blocking through the addition of preferences containing comma delimited lists of port numbers to the user.js file (for single users with the user_pref(...) command) in the user's profile directory. See the example below. Additionaly administrators can edit the all.js file (for multi-user systems with pref(...) ) in the defaults/pref/ sub-directory in the installation directory. Enabling Ports user_pref("network.security.ports.banned.override, "port1,port2"); Disabling Ports user_pref("network.security.ports.banned", "port3,port4"); Blocked Ports Ports blocked by default in Mozilla: Port Service 1 tcpmux 7 echo 9 discard 11 systat 13 daytime 15 netstat 17 qotd...
Build Metrics
"Build Metrics" is a catch-all term for performance measures that are generated by the Firefox build system and tracked by Perfherder. num_constructors Number of static constructors found by the compiler in the Firefox C++ codebase. Lower is better. Static constructors are undesirable because their initialization imposes an unavoidable time penalty every time Firefox is started. installer size Size in bytes of the Firefox installer. Lower is better here, especially on space-restricted platforms like Android. build times Amount of time it takes to build Firefox in automation on a specific platform / configuration. Lower is better. compiler warnings Number of compiler warnings detected during a build. Lower is better. Due to the way the build system works, compiler warnings are not...
Automated performance testing and sheriffing
Currently we aggregate this information in the Perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate. ...
Gecko Profiler FAQ
typically happens as one of the last stages of the work, since you'd typically have finished fully analyzing the issue and through that have managed to figure out how to write a micro-benchmark that reproduces the exact issue. It's better to start getting used to profiling and analyzing real pages more. :-) What's the best way to profile startup performance? Install the Gecko profiler add-on. Quit the browser. Start the browser with the environment variable MOZ_PROFILER_STARTUP=1 set. As soon as startup is done, collect a profile. What's the best way to do repeatable tests? ie: I want to measure perf of loading the same page with different stylo configurations. Probably by using Talos, especially if you want to measure and not profil...
Profiling with the Firefox Profiler
" but NOT with --enable-profiling. Nightly builds are already built with the appropriate flags. You'll need to have adb and arm-eabi-addr2line (which is part of the Android NDK) in your bash PATH, so use locate arm-eabi-addr2line (on Linux) or mdfind name:arm-eabi-addr2line (on OS X) and stick an export to its location in ~/.bash_profile. The extension will invoke bash to use adb and addr2line. Install the latest pre-release build in your host machine's Firefox browser that has your phone reachable via ADB. This will add a icon in the top right of the browser. Set devtools.debugger.remote-enabled to true in about:config for Fennec. Select target Mobile USB and press Connect. The first run will take an additional 1 minute or so to pull in the required system libraries. Profiling Firefox Star...
Productization guide
, so we provide a couple of well-thought suggestions for different services. For example, we ship Firefox with 6 or 7 search engine plug-ins to make users' lives easier when they're looking for information, translation, products, multimedia, spelling and definitions, etc. Another example: when the user clicks on a mailto: link, we suggest a couple of possible handlers chosen from the applications installed on their computer. But we also suggest a few web-based clients (like Yahoo! Mail and GMail), so that if the user happens to use one of these in the browser, they don't have to configure them. The second purpose (demonstrate certain features of the product) is equally important: by providing these default services, we demonstrate particular features of the product, the ones which otherwise would...
JSHydra
JSHydra is a static analysis tool that is capable of performing analysis of general JavaScript code. It is inspired by the Dehydra and Treehydra tools, which can perform similar tasks in C++ code. In its back-end, it uses the parse tree created by the SpiderMonkey engine. All analysis is performed by running JavaScripts. Documentation Installing JSHydra Download, installation and dependency info for JSHydra Community View JSHydra Forums... Mailing list Newsgroup RSS feed #static on irc.mozilla.org Blogs Joshua Cranmer Related topics Dehydra, Treehydra, SpiderMonkey Categories Interwiki Language Links ...
Building NSS
o build NSS. Because NSS is a cross-platform library that builds on many different platforms and has many options, it may be complex to build. Please read these instructions carefully before attempting to build. Build environment NSS needs a C and C++ compiler. It has minimal dependencies, including only standard C and C++ libraries, plus zlib. For building, you also need make. Ideally, also install gyp and ninja and put them on your path. This is recommended, as the build is faster and more reliable. Windows NSS compilation on Windows uses the same shared build system as Mozilla Firefox. You must first install the Windows Prerequisites, including MozillaBuild. You can also build NSS on the Windows Subsystem for Linux, but the resulting binaries aren't usable by other Windows application...
NSS Certificate Download Specification
This document is currently being revised and has not yet been reviewed for accuracy. Data Formats NSS can accept certificates in several formats. In all cases the certificates are X509 version 1, 2, or 3. Binary Formats NSS's certificate loader will recognize several binary formats. They are: DER encoded certificate: This is a single binary DER encoded certificate. PKCS#7 certificate chain: This is a single PKCS#7 SignedData object. The only significant field in the SignedData object is the certificates field, which may contain multiple certificates to be imported together. ...
Introduction to Network Security Services
only on 64-bit CPUs, not on 32-bit CPUs) or that doesn't use the more efficient 64-bit code on 64-bit CPUs, which defeats the purpose of having these shared libraries. On platforms for which these shared libraries exist, NSS 3.2 will fail if these shared libs are not present. So, an application must include these files in its distribution of NSS shared libraries. These shared libraries should be installed in the same directory where the other NSS shared libraries (such as libnss3.so) are installed. Both shared libs should always be installed whether the target system has a 32-bit CPU or a 64-bit CPU. NSS will pick the right one for the local system at run time. Note that NSS 3.x is also available in the LP64 model for these platforms, but the LP64 model of NSS 3.x does not have these two extra ...
JSS FAQ
Mozilla › Projects › NSS › JSS › JSS FAQ
3.x works with JDK versions 1.2 or higher, except version 1.3.0. Most attention for future development and bug fixing will go to JDK 1.4 and later, so use that if you can. If you are using JDK 1.3.x, you will need to use at least version 1.3.1--see bug 113808. JSS only supports the native threading model (no green threads). For JSS 3.2 and higher, if you use JDK 1.4 or higher you will not need to install the JCE, but if you using an earlier version of the JDK then you will also have to install JCE 1.2.1. See also the document Using JSS. Does JSS have 64 bit support? Yes, JSS 3.2 and higher supports 64 bit. You will need JDK 1.4 or higher and all the 64 bit versions of NSPR, and NSS. As well you must use the java flag -d64 to specify the 64-bit data model. Is JSS FIPS Compliant? ...
NSS_3.12.1_release_notes.html
New and revised documents available since the release of NSS 3.11 include the following: Build Instructions for NSS 3.11.4 and above NSS Shared DB Compatibility NSS 3.12.1 shared libraries are backward compatible with all...
NSS_3.12.2_release_notes.html
ibrary: SEC_PKCS12AddCertOrChainAndKey (see p12.h) New PKCS11 errors (see secerr.h) SEC_ERROR_PKCS11_GENERAL_ERROR SEC_ERROR_PKCS11_FUNCTION_FAILED SEC_ERROR_PKCS11_DEVICE_ERROR Bugs Fixed The following bugs have been fixed in NSS 3.12.2. ...
NSS_3.12_release_notes.html
regression with studio 12 compiler Bug 391770: OCSP_Global.monitor is leaked on shutdown Bug 403687: move pkix functions to certvfypkix.c, turn off EV_TEST_HACK Bug 428105: CERT_SetOCSPTimeout is not defined in any public header file Bug 213359: enhance PK12util to extract certs from p12 file Bug 329067: NSS encodes cert distinguished name attributes with wrong string type Bug 339906: sec_pkcs12_install_bags passes uninitialized variables to functions Bug 396484: certutil doesn't truncate existing temporary files when writing them Bug 251594: Certificate from PKCS#12 file with colon in friendlyName not selectable for signing/encryption Bug 321584: NSS PKCS12 decoder fails to import bags without nicknames Bug 332633: remove duplicate header files in nss/cmd/sslsample Bug 335019: pk12util takes fr...
NSS 3.14.2 release notes
https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_2_RTM/src/ For the primary NSS documentation pages please visit /docs/NSS New in NSS 3.14.2 NSS will now make use of the Intel AES-NI and AVX instruction sets for hardware-accelerated AES-GCM on 64-bit Linux systems. Note: the new assembly code requires GNU as version 2.19 or newer. On Red Hat Enterprise Linux 5.x systems, install the binutils220 package and add /usr/libexec/binutils220 to the beginning of your PATH environment variable. Initial manual pages for some NSS command line tools have been added. They are still under review, and contributions are welcome. The documentation is in the docbook format and can be rendered as HTML and UNIX-style manual pages using an optional build target. New Types: in certt.h ...
NSS 3.18 release notes
st TLS protocol version enabled by default has been increased from TLS 1.0 to TLS 1.2. Similarly, the highest DTLS protocol version enabled by default has been increased from DTLS 1.0 to DTLS 1.2. The default key size used by certutil when creating an RSA key pair has been increased from 1024 bits to 2048 bits. On Mac OS X, by default the softokn shared library will link with the sqlite library installed by the operating system, if it is version 3.5 or newer. The following CA certificates had the Websites and Code Signing trust bits turned off OU = Equifax Secure Certificate Authority SHA1 Fingerprint: D2:32:09:AD:23:D3:14:23:21:74:E4:0D:7F:9D:62:13:97:86:63:3A CN = Equifax Secure Global eBusiness CA-1 SHA1 Fingerprint: 7E:78:4A:10:1C:82:65:CC:2D:E1:F1:6...
NSS 3.27.2 Release Notes
ctionality is introduced in this release. This is a patch release to address a memory leak in the SSL_SetTrustAnchors() function. Notable Changes in NSS 3.27.2 The SSL_SetTrustAnchors() function is used to set the distinguished names that an NSS server includes in its TLS CertificateRequest message. If this function is not used, NSS will include the distinguished names for all trust anchors installed in the database. This can be a lengthy list. Previous versions of NSS leaked the memory used to store distinguished names when SSL_SetTrustAnchors() was used. This release fixes that error. Bugs fixed in NSS 3.27.2 The following bug has been fixed in NSS 3.27.2: Bug 1318561 - SSL_SetTrustAnchors leaks Compatibility NSS 3.27.2 shared libraries are backward compatible with all older NSS...
NSS 3.43 release notes
C0D7EB3 CN = Hongkong Post Root CA 3 SHA-256 Fingerprint: 5A2FC03F0C83B090BBFA40604B0988446C7636183DF9846E17101A447FB8EFD6 The following CA certificates were Removed: None Bugs fixed in NSS 3.43 Bug 1528669 and Bug 1529308 - Improve Gyp build system handling Bug 1529950 and Bug 1521174 - Improve NSS S/MIME tests for Thunderbird Bug 1530134 - If Docker isn't installed, try running a local clang-format as a fallback Bug 1531267 - Enable FIPS mode automatically if the system FIPS mode flag is set Bug 1528262 - Add a -J option to the strsclnt command to specify sigschemes Bug 1513909 - Add manual for nss-policy-check Bug 1531074 - Fix a deref after a null check in SECKEY_SetPublicValue Bug 1517714 - Properly handle ESNI with HRR Bug 1529813 - Expose HKDF-...
NSS 3.49 release notes
Notable Changes in NSS 3.49 The legacy DBM database, libnssdbm, is no longer built by default when using gyp builds. See Bug 1594933 for details. Bugs fixed in NSS 3.49 Bug 1513586 - Set downgrade sentinel for client TLS versions lower than 1.2. ...
PKCS11
PKCS #11 information for implementors of cryptographic modules: Implementing PKCS11 for NSS PKCS11 FAQ Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module PKCS #11 Conformance Testing ...
Migration to HG
ve merged the contents of directories mozilla/dbm and mozilla/security/dbm into the new directory lib/dbm. Besides the new layout, the build system hasn't changed. Most parts of the NSS build instructions remain valid, especially the instructions about setting environment variables. Updated instructions for building NSS with NSPR can be found at: /docs/NSS_reference/Building_and_installing_NSS/Build_instructions It's best to refer to the above document to learn about the various environment variables that you might have to set to build on your platform (this part hasn't changed). However, below is a brief summary that shows how to checkout the source code and build both NSPR and NSS: mkdir workarea cd workarea hg clone https://hg.mozilla.org/projects/nsp...
NSS environment variables
e NSS support in optimized builds for logging SSL/TLS key material to a logfile if the SSLKEYLOGFILE environment variable. As of NSS 3.24 this is disabled by default. 3.24 NSS_BUILD_CONTINUE_ON_ERROR Boolean (1 to enable) Continue building NSS source directories when a build error occurs. 3.12.4 NSS_USE_SYSTEM_SQLITE Boolean (1 to enable) Use the system installed sqlite library instead of the in-tree version. 3.12.6 NSS_DISABLE_ECC (deprecated) Boolean (1 to disable) Disable Elliptic Curve Cryptography features. As of NSS 3.16, ECC features are enabled by default. As of NSS 3.33 this variable has no effect. 3.16 NSS_ENABLE_ECC (deprecated) Boolean (1 to enable) Enable building of code that uses Ellipt...
NSS tools : crlutil
050204153000Z * Add an extension to a CRL or a crl certificate entry: addext extension-name critical/non-critical [arg1[arg2 ...]] Where: extension-name: string value of a name of known extensions. critical/non-critical: is 1 when extension is critical and 0 otherwise. arg1, arg2: specific to extension type extension parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range. * Add certificate entries(s) to CRL: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter. date: revocation date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhh...
NSS reference
ed in the MDN Style Guide. If you are inclined to help with this migration, your help would be very much appreciated. The proposed chapters below are based on the chapters of the SSL Reference and the categories of functions in NSS Public Functions. Should a particular page require the use of an underscore, please see the documentation for the Title Override Extension. Building and installing NSS Overview of an NSS application Based on "Overview of an SSL Application" in the SSL Reference. Getting started with NSS Based on "Getting Started With SSL" in the SSL Reference. Data types Based on "Selected SSL Types and Structures" in the SSL Reference. NSS initialization and shutdown NSS_Init NSS_InitReadWrite NSS_NoDB_Init NSS_Initialize NSS_Shutdown Utility functions ...
modutil-tasks.html
NSS Security Tools: modutil Tasks Newsgroup: mozilla.dev.tech.crypto Task List The jar installation script is very fragile with respect to platform definitions (especially version numbers). A fix was made for "HPUX B.11.00," but issues may still arise for platforms like "Linux 2.2.12-20." Documentation needs to be explicit about the use of Fo ...
NSS Tools crlutil
rl certificate entry: addext extension-name critical/non-critical [arg1[arg2 ...]] Where: extension-name: string value of a name of known extensions. critical/non-critical: is 1 when extension is critical and 0 otherwise. arg1, arg2: specific to extension type extension parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range. See "Implemented extensions" for more information regarding extensions and theirs parameters. Add certificate entries(s) to CRL: addcert range date Where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert wi...
NSS Tools modutil-tasks
NSS Security Tools: modutil Tasks Newsgroup: mozilla.dev.tech.crypto Task List The jar installation script is very fragile with respect to platform definitions (especially version numbers). A fix was made for "HPUX B.11.00," but issues may still arise for platforms like "Linux 2.2.12-20." Documentation needs to be explicit about the use of Fo ...
NSS tools : crlutil
Mozilla › Projects › NSS › tools › crlutil
Add an extension to a CRL or a crl certificate entry: addext extension-name critical/non-critical [arg1[arg2 ...]] Where: extension-name: string value of a name of known extensions. critical/non-critical: is 1 when extension is critical and 0 otherwise. arg1, arg2: specific to extension type extension parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range. * Add certificate entries(s) to CRL: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter. date: revocation date of a cert. Date should be represented in GeneralizedTime f...
Network Security Services
.11. NSS 3.1 Loadable Root Certificates Archived version. Describes the scheme for loading root CA certificates. cert7.db Archived version. General format of the cert7.db database. PKCS #11 information Documentation on PKCS #11 modules Implementing PKCS #11 for NSS The strings NSS uses to load PKCS #11 modules PKCS #11 FAQ Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module PKCS #11 Conformance Testing - Archived version CA certificates pre-loaded into NSS Mozilla CA certificate policy List of pre-loaded CA certificates Consumers of this list must consider the trust bit setting for each included root certificate. More Information, Extracting roots and thei...
Pork Tool Development
rsed, using the visitor pattern. The diff file is generated using the "Patcher" class. source locations AST nodes have a location associated with them; SourceLoc is defined to be an integer corresponding to an string offset. This can be translated to an UnboxedLoc, which has a line and column offset (see renamer.cc:65). macro expansion This section refers to macro expansion when using mcpp (see Installing Pork). For the rename_class.cpp test, generate the file with "gcc -E -Wp,-W0,-K rename_class.cpp > rename_class.cc" and run the renamer with "../renamer -rename Foo Bar rename_class.cc". For terminology, suppose "MY_FOO" --> "Foo". Then any post-location variables refer to "Foo" and pre-location variables refer to "MY_FOO". CPPSourceLoc wraps SourceLoc, providing information about macro expan...
Pork
work on other systems. Note: Pork is not presently used at Mozilla. Please refer to the oink link below for a more up-to-date toolchain. Pork is based on the Elsa (and Oink) tool chain, and the MCPP preprocessor. As of October 2009 Oink incorporates the Pork functionality into its standard distribution; look for files and tests having the prefix "xform". Documentation Installing Pork Download, installation and dependency info for Pork Pork Tools Description of rewriting tools Pork Tool Development in progress page... Old Pork Page Pork details that haven't been moved to MDC Renaming With Pork Sample pork application TODOs Pork 1.0 release tracking bug Pork releases Download Pork here Com...
Rhino shell
Versions for more information on language versions. -strict Enable strict mode. -continuations Enable experimental support for continuations and set the optimization level to -1 to force interpretation mode. Starting with Rhino 1.7 this options is no longer available. Note If the shell is invoked with the system property rhino.use_java_policy_security set to true and with a security manager installed, the shell restricts scripts permissions based on their URLs according to Java policy settings. This is available only if JVM implements Java2 security model. Predefined Properties Scripts executing in the shell have access to some additional properties of the top-level object. arguments The arguments object is an array containing the strings of all the arguments given at the command line w...
GCIntegration - SpiderMonkey Redirect 1
ter to C and then created a regular (strong) reference from B to C. Now C is reachable, but it won't be marked because B was already fully marked. No write barrier is invoked when creating the pointer from B to C because no pointer is being destroyed. As a concrete example of this, imagine that we call GetWrapper() on an nsWrapperCache instance. This will return a JSObject *. Then this pointer is installed as a property on another JSObject that was already marked. The solution to this problem is to require a read barrier on every weak reference. Whenever the weak pointer is read during incremental marking, we mark the object that it points to. In the example above, C would be marked when reading it out of A. A very simple way to identify weak pointers is to look for usage of JS_IsAboutToBeFinal...
How to embed the JavaScript engine
oworld -lmozjs-31 -lz [Linux] g++ -std=c++11 -I<objdir>/dist/include -L<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz -lpthread -ldl It should print "helloworld, it is TIME" (here TIME is the current time). Make sure the build computer has the prerequisites for building SpiderMonkey: Linux, Windows, Mac OS X, others. For Windows, the following steps will assume that you have installed the MozillaBuild package. Get the SpiderMonkey source code. You can download a source archive or use Mercurial (hg) to pull the SpiderMonkey repository. On Windows, do not install the SpiderMonkey source code under the MSYS root directory (which is usually c:\mozilla-build\msys). Instead use something like c:\mozjs-31.2.0 Compile SpiderMonkey using the build instructions at SpiderMonkey Build...
Introduction to the JavaScript shell
Script shell The shell offers two modes of operation. You can use it as an interactive shell, in which you type JavaScript code at a prompt and get instant gratification, which is handy for experimenting or testing new features. You can also pass in, on the command line, a JavaScript program file to run, in which case the program is run automatically. After following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ If you get " symbol lookup error: ./js: undefined symbol: PR_SetCurrentThreadName" e.g. from a Bash console when using a pre-compiled binary, try <path to your Firefox's run-mozilla.sh>/run-mozilla.sh ./js -- that worked for me] If you'd like to run the JavaScript code in the file foo.
JSAPI User Guide
becomes unreachable and will eventually be collected. */ return false; } Security Many applications use SpiderMonkey to run untrusted code. In designing this kind of application, it's important to think through the security concerns ahead of time. Your application will need to do several things. Deploy security updates - Firefox automatically installs updates, so security fixes are deployed as soon as they are available. Unless you also regularly deploy SpiderMonkey security updates, a determined hacker could use publicly known bugs in the engine to attack your application. Note that the kind of attack we're talking about here is where a hacker uses JavaScript to attack the C++ code of the engine itself (or your embedding). The rest of the it...
JS::CompileOptions
. strictOption bool true if the code is strict mode ("use strict"). extraWarningsOption bool Show extra warning. werrorOption bool Treat warning as error. asmJSOption bool true if asm.js is allowed in the code. forceAsync bool false means JS::CanCompileOffThread may returns false depends on the length of the code. installedFile bool true iff pre-compiling js file in packaged app. sourceIsLazy bool true indicates that, after compilation, script source should not be cached by the JS engine and should be lazily loaded from the embedding as-needed. introductionType const char A statically allocated C string: one of following in general: "eval" - code passed to eval ...
JSDeletePropertyOp
obj JS::HandleObject The object whose properties are being deleted. id JS::HandleId The name or index of the property being deleted. This is either a string (Unicode property identifier) or an integer (element index). succeeded bool * Out parameter. Receives the result of deletion. Description JSDeletePropertyOp callback is a hook that applications may install to be called at some point during property access. A JSDeletePropertyOp may be installed on a JSClass to hook property deletes. If a JSDeletePropertyOp does nothing and returns true, then property delete is unaffected. It proceeds as normal. This callback may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false. The operation then...
JSPropertyOp
(element index). strict bool (JSStrictPropertyOp only) If strict is true, treating the assignment as strict mode code. vp JS::MutableHandleValue In/out parameter. Points to a JS::Value variable. The meaning of this variable is different for each of the hooks; see below. Description JSPropertyOp and JSStrictPropertyOp callbacks are hooks that applications may install to be called at some point during property access. A JSPropertyOp may be installed on an individual property as a getter or setter; or it may be installed on a JSClass to hook property gets, sets, or adds. These different cases are described in more detail in the sections below. If a JSPropertyOp or JSStrictPropertyOp does nothing and returns true, then property get, set, or add is unaffected. I...
JS_AddArgumentFormatter
mat string handler for JS_ConvertArguments, JS_PushArguments, JS_ConvertArgumentsVA, and JS_PushArgumentsVA. Syntax JSBool JS_AddArgumentFormatter(JSContext *cx, const char *format, JSArgumentFormatter formatter); void JS_RemoveArgumentFormatter(JSContext *cx, const char *format); Name Type Description cx JSContext * The context in which to install the formatter. format const char * The format string prefix that should be handled by formatter, or whose handler should be removed. formatter JSArgumentFormatter The function to be used to convert arguments described by the given format. This function is described in more detail below. Description JS_AddArgumentFormatter establishes formatter as the conversion...
JS_CheckAccess
the above values, check for permission to write the property, not read it. The access check proceeds as follows. If obj has custom JSObjectOps, the access check is delegated to the JSObjectOps.checkAccess callback. Otherwise, if obj's class has a non-null JSClass.checkAccess callback, then it is called to perform the check. Otherwise, if a runtime-wide check-object-access callback has been installed by calling JS_SetCheckObjectAccessCallback, then that is called to perform the check. Otherwise, access is granted. On success, JS_CheckAccess returns JS_TRUE, *vp is set to the current value of the specified property, and *attrsp is set to the property's attributes. On error or exception, including if access is denied, JS_CheckAccess returns JS_FALSE, and the values left in *vp and *attrsp ar...
JS_SetExtraGCRoots
is to be set. traceop The trace operation. This is described below. data Closure pointer, to be passed through to traceop. Callback Syntax typedef void JSTraceDataOp (JSTracer *trc, void *data); Argument Meaning trc Tracing data, to be passed through to JS_CallTracer. data Closure pointer. This is the data value that was passed to JS_SetExtraGCRoots when this callback function was installed. Callback Description Generic trace operation that calls JS_CallTracer on additional traceable things. ...
SpiderMonkey 1.8.5
This versioning scheme will not be rolled back into the upstream Mozilla source tree(s), and may not be used in future source releases. Comments in bug 62872...
SpiderMonkey 1.8.7
This versioning scheme will not be rolled back into the upstream Mozilla source tree(s), and may not be used in future source releases. Comments in bug 62872...
SpiderMonkey 1.8
Callbacks and friends, bug 451729). js.mak, an old Windows-specific nmake file, has been deleted. It hasn't worked for a long time. It is fairly easy to create a Microsoft Visual Studio project file for SpiderMonkey 1.8 from scratch. (If you would like to contribute and maintain a project file, please feel free to contact the SpiderMonkey team via email, bugzilla, or IRC.) Alternatively, you can install MozillaBuild and run the command make -f Makefile.ref in the js/src directory. SpiderMonkey 1.8 does not include the new TraceMonkey JIT or the configure-based build system, both of which are (a) pretty darn awesome and (b) coming in SpiderMonkey 1.8.1. On to the fun stuff. New JavaScript language features JavaScript 1.8 adds Array.reduce() and reduceRight(), expression closures, and generat...
Setting up CDT to work on SpiderMonkey
ts -fcolor-diagnostics' CXX='clang++ -Qunused-arguments -fcolor-diagnostics' \ ../configure --enable-debug --disable-optimize --enable-debug-symbols Note: If you want to use ccache, you can enable it by adding --with-ccache to the arguments list. Due to a bug in CDT, you have to make a small change to CDT's build configuration as explained in Step 3 below for that to work, though. Step 2 - Installing Eclipse and setting up the project The following run-down is a condensed and updated version of what is explained in much more detail for the entire Mozilla codebase. Luckily, improvements in CDT have reduced the basic process to manageable five steps: Download and extract "Eclipse IDE for C/C++ Developers" from the Eclipse downloads page. Start Eclipse and create a workspace somewhere. ...
Shell global objects
Evaluate s in optional sandbox object o. if (s == '' && !o) return new o with eager standard classes, if (s == 'lazy' && !o) return new o with lazy standard classes evalInWorker(str) Evaluate str in a separate thread with its own runtime. getSharedArrayBuffer() Retrieve the SharedArrayBuffer object from the cross-worker mailbox. The object retrieved may not be identical to the object that was installed, but it references the same shared memory. getSharedArrayBuffer performs an ordering memory barrier. setSharedArrayBuffer() Install the SharedArrayBuffer object in the cross-worker mailbox. setSharedArrayBuffer performs an ordering memory barrier. shapeOf(obj) Get the shape of obj (an implementation detail). groupOf(obj) Get the group of obj (an implementation detail). unwrappedObjectsHa...
TPS Pref Lists
For a more detailed test example, see the TPS prefs unit test. ...
Thread Sanitizer
Starting Firefox After the build has completed, you can start Firefox from the objdir as usual. Building only the JavaScript shell If you want to build only the Jav...
compare-locales
compare-locales is a Python script that helps localizers to check their work without running Firefox or another application. If you want to run compare-locales on Windows, be sure to first install MozillaBuild. Installation compare-locales needs to be installed, and it requires that you have Python 2.7 or 3.5+ installed on your machine. The easiest way is to just run $ pip install -U compare-locales Running it compare-locales gathers the directories to compare from a TOML file, usually found in $APP/locales/l10n.toml. The details of the configuration file are described in the l10n-config docs. You pass the path to the toml file and the parent dir of the localizations as first arguments, followed by the locale codes of the locales you want to compare. If you want to test the localiz...
Mozilla Projects
McCoy McCoy uses XULrunner which is bound to break, for details see this post. Mozilla calls McCoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not. McCoy is an application that allows add-on authors to provide secure updates to their users. Applications periodically look for and install updates to their add-ons. It's important that the update information retrieved has not been tampered with since being written by the add-on author. Specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels. Midas ...
Redis Tips
h redis for at least 5 or 10 minutes. If you have not, here is a fantastic on-line, interactive redis tutorial: http://try.redis.io/ For reference later on, you'll want the source of all things redis: https://redis.io You'll want to run a redis-server on your machine, and use the redis-cli at the command-line for hacking. Node.JS redis client: https://github.com/mranney/node_redis npm install redis Python redis client: https://github.com/andymccurdy/redis-py There are some gotchas with the Python API: https://github.com/andymccurdy/redis-py#api-reference SELECT statement not implemented DEL is 'delete' in python ZADD argument order is wrong SETEX argument order is wrong The default redis port is 6379. In node, create client with explicit host and port like so: > var r...
Signing Mozilla apps for Mac OS X
to Create a self-signed signing identity". For release Creating a Developer ID requires a paid Apple Developer Account. Once you have that you can do the following to create your ID: Open the Developer Certificate Utility. Click "Certificates" from the left hand menu. Click "Create a Certificate" at the top right corner Select the "Developer ID" radio button and uncheck the "Developer ID Installer Certificate" box. Click "Create" and follow the instructions in the wizard. It will guide you through creating a private key, certificate signing request, and importing your new Developer ID into the Keychain Access application on your Mac. If the "Developer ID" radio button is greyed out you probably have a group account. These types of accounts only allow for the "Agent" role to create Devel...
Task graph
ker images, build toolchains, perform analyses, check syntax, and so on. These tasks are arranged in a "task graph", with some tasks (e.g., tests) depending on others (builds). Once its prerequisite tasks complete, a dependent task begins. The result of each task is sent to TreeHerder where developers and sheriffs can track the status of the push. The outputs from each task, log files, Firefox installers, and so on, appear attached to each task when it completes. These are viewable in the Task Inspector. All of this is controlled from within the Gecko source code, through a process called task-graph generation. This means it's easy to add a new job or tweak the parameters of a job in a try push, eventually landing that change on an integration branch. The details of task-graph generation a...
XForms Accessibility
A/ATK in a similar way. Get Build Subsections below explain how you can obtain accessible XForms-enabled build. These are either downloading latest build of firefox or building it yourself. Downloading Builds Notion: XForms is no longer distributed with Firefox build. You must build it yourself. See section below. For Firefox, you may directly download the nighly "trunk" build of Firefox and install the XForms extension which lives in 'xpi' directory of the build. Note, XForms accessibility is implemented only on trunk. Trunk builds are not considered stable and should not be installed on top of the Firefox used for daily browsing. Currently we have verified that XForms accessibility is working on the Windows platform, and Linux testing has not yet been done, although everything should work ...
Embedded Dialog API
ant example is implemented in PromptService.cpp. (TestGtkEmbed doesn't override PromptService; it uses the default dialogs.) Both are source for a library set up as a Mozilla component and factory. (Note to self: is there decent documentation on writing factories or components? I can't find any.) Both contain implementations of nsIPromptService as native dialogs. The replacement library should be installed during application initialization. The default dialog-posing library is a component (PromptService for instance is part of the embedding component), registered as a component during Gecko initialization (by NS_InitEmbedding). (line number accurate in version 1.30). After initializing embedding, an application can override a default factory by registering its replacement. A PowerPlant example ca...
The Publicity Stream API
pects). It is suggested that the list be processed and condensed into an attractive, cohesive format for users (eg., multiple tweets show as 'Adam tweeted 4 times'). onsuccess will be called with a single argument: a json list of the current user's socially relevant app activity in the FIXME: deadLinkActivity Streams open specification. onerror is an error callback that will be invoked if the installation fails. Possible error codes include: denied - if the user does not log in correctly permissionDenied - if the site is not allowed to access the publicity stream networkError - if the publicity server is unreachable for_apps is a json list of apps that this store has (each represented as its origin URL), so that stream events not relating to applications in a given presentati...
XML Extras
The XML Extras module contains several features that allow developers to treat XML as data i.e. not as just another document format. The module is structured as a drop-in component and exposes its XML-as-data features both to JavaScript and C++/XPCOM users. The XML Extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds. Feature Status Feature Status XMLSerializer Available XMLHttpRequest Available DOMParser (string and stream input source) Available Web Services with SOAP and WSDL No longer available from Gecko 1.9/Firefox 3. XML Persistence FIXptr and XPointer Available since 1.4alpha in the core Mozilla. Moved to XML Extr...
Accessing the Windows Registry Using XPCOM
To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products. The examples in this document are all written in JavaScript using XPCOM. Support in Firefox 1.5 or newer In Firefox 1.5, a new API was added, nsIWindowsRegKey, which provides extensive registry functionality. ...
Preface
d smart pointers to optimize your code. Define the functionality for the component; create an XPIDL interface for that functionality; create the implementation code specific to the custom WebLock component interface. Finish implementing the WebLock component: nsIContentPolicy, file I/O, locking, etc. Creating the user interface for the WebLock component. Packaging WebLock for distribution and installation. Following Along with the Examples There are a couple of different ways to get XPCOM onto your machine so you can begin to create components. If you already have a Mozilla build or the source from Mozilla 1.2 or later, then you can use the XPCOM framework available there. If you don't already have the Mozilla source, then an even easier way to get and use XPCOM is to download the Gecko SD...
Starting WebLock
rface in a commented section of the generated header file, in which each method returns NS_ERROR_NOT_IMPLEMENTED. If you copy the stub implementation from the header file into the source, then rename the dummy class name ("_MYCLASS_") to the WebLock class name already defined, you should be able to compile the source successfully. Getting the WebLock Service from a Client At this point, you can install the XPCOM component and have other systems use it. The component doesn't do anything useful, of course, but you have written enough of the code to have it recognized and accessed as a component in XPCOM. The code snippet below illustrates how to get the WebLock service when the component is present: nsCOMPtr<nsIServiceManager> servMan; nsresult rv = NS_GetServiceManager(getter_AddRefs(servMan));...
Using XPCOM Components
er, is that the process of freezing the interfaces that are implemented by these components is still ongoing. The Component Viewer does not distinguish between components that are frozen and those that are not. In the source code you view in MXR, interfaces that have been frozen are marked at the top with @status frozen. The XPCOM Component Viewer The XPCOM Component Viewer is an add-on you can install in your browser (in sandbox, not available for now). Alternatively, you can try XPCOMViewer, a similar add-on. XPCOM Component Viewer The left column shows the components - in this case a subset returned from a search on "gfx" as part of the contract ID and the right column a list of the interfaces. When you open a component on the left, you can see the interfaces it implements along with a ...
Creating XPCOM components
Uniform Resource Locators Checking the White List Creating nsIURI Objects Building the WebLock UI User Interface Package List Client Code Overview XUL The XUL Document The Locking UI Site Adding UI weblock.xul Overlaying New User Interface Into Mozilla webLockOverlay.xul Other Resources weblock.css Image Resources Packaging WebLock Component Installation Overview Archiving Resources The WebLock Installation Script The WebLock Trigger Script Distributing Your Component Appendix A - Setting up the Gecko SDK Downloading and Setting the SDK Building a Microsoft Visual Cpp Project Creating a New Project Adding the Gecko SDK to the Project Settings Building a Windows Project A Makefile for Unix Appendix B - Resources Web...
Receiving startup notifications
ceive is now profile-after-change. Your add-on will not receive xpcom-startup or app-startup notifications. The startup process During application startup, the application's manifest is used to get a list of the components it needs to register, and those components are loaded. This gets enough of XPCOM and the application loaded and running that the Extension Manager can then be loaded and handle installing, uninstalling, and updating any installed extensions. Once that process is completed, extensions can then be loaded by simply reading their manifests, loading their components, and continuing with application startup, all without having to restart the browser. Receiving startup notifications prior to Gecko 2.0 (Firefox 4) To receive startup notifications, one needs to register with the "app-st...
How to build a binary XPCOM component using Visual Studio
SPECIALTHING_CID, SPECIALTHING_CONTRACTID, CSpecialThingConstructor, } }; NS_IMPL_NSGETMODULE("SpecialThingsModule", components) Assuming you have the right SDK and setup the include and LIB folders correctly, the project should build your XPCOM component. Test Component in a XULRunner Application In order to test your component in a XULRunner application, you need to "install" the component, "clear" the component registry, and use the component from JavaScript. Install Component: Copy your XPT and DLL files to the {app}/components folder. You should not put your component in the xulrunner/components folder. Clear Registry: Increment the BuildID in your {app}/application.ini. Use in JavaScript: function doXPCOM() { try { const cid = "@starkravingfinkle.org/s...
Components.classes
e constructed or accessed as an XPCOM service. The properties of this object are indexed by the ContractID (or human-readable name) of the component class. All of the properties and methods of the nsIJSCID and its ancestor interface nsIJSID are available for use on the objects contained in this object. Note that Components.classes reflects only those component classes that have been previously installed and registered with the component manager using ContractIDs. If you want to use a class which was only registered with their CID, use Components.classesByID instead of Components.classes to retrieve it. Note also that it is possible that a given add-on component with a given ContractID will be present on one machine but not have been installed on another machine. If the given element in the Co...
Components.utils.unload
Once this method has been called, references to the module will continue to work but any subsequent import of the module will reload it and give a new reference. If the JavaScript code module has not yet been imported then this method will do nothing. ...
Language bindings
lection. You can get details on what this method does in JS_SetGCZeal. This method calls through to that thusly:Components.utils.unloadComponents.utils.unload was introduced in Firefox 7 and is used to unload JavaScript code modules. ...
Monitoring HTTP activity
This is done using the nsIHttpActivityDistributor.addObserver() method in nsIHttpActivityDistributor: var activityDistributor = Components.classes["@mozilla.org/network/http-activity-distributor;1"] .getService(Components.interfaces.nsIHttpActivityDistributor); activityDistributor.addObserver(httpObserver); Observable activities There a...
Observer Notifications
: These notifications are no longer available starting with Gecko 2.0, instead use AddonManager.addAddonListener() to receive similar events. This topic indicates when the extension manager performs some action. Note that any action will be taken the next time the application starts. See nsIExtensionManager for details. Topic Data Description em-action-requested item-installed A new extension has been installed. em-action-requested item-upgraded A different version of an existing extension has been installed. em-action-requested item-uninstalled An addon has been marked to be uninstalled. em-action-requested item-enabled An addon has been enabled. em-action-requested item-disabled An addon has been disabl...
nsIAlertsService
he principal of the page that created the alert. Used for IPC security checks, and to determine whether the alert is actionable. inPrivateBrowsing Optional Controls the image loading behavior. If true, the image URL will be loaded in private browsing mode. Exceptions thrown NS_ERROR_NOT_AVAILABLE Unable to display the notification; this may happen, for example, on Mac OS X if Growl is not installed. Example Simple usage The following code was used to display the above notification. var alertsService = Components.classes["@mozilla.org/alerts-service;1"]. getService(Components.interfaces.nsIAlertsService); try { alertsService.showAlertNotification("chrome://mozapps/skin/downloads/downloadIcon.png", "Alert title", "Alert text...
nsICommandLine
from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Components may implement the nsICommandLineHandler interface to add custom command line handling behavior. Definitions arguments Any values found on the command line. switches Flags. In normalized form, these are preceded by a single dash. Some flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". Method overview long findFlag(in AString aFlag, in boolean aCaseSensitive); AString getArgument(in long aIndex); boolean handleFlag(in AString aFlag, in boolean aCaseSensitive); AString handleFlagWithParam(in AString aFlag, in boolean aCaseSensitive); void removeArguments(in long aStart, in long aEnd); nsIFile resolveFile(in AString aArgument); nsIURI resolveURI(in A...
nsIDOMMozNetworkStatsManager
filtering start date is greater than the end date, an exception is thrown. Exceptions thrown NS_ERROR_INVALID_ARG The filtering start date is greater than the end date. NS_ERROR_NOT_IMPLMENTED Both appManifestURL and serviceType are specified at the same time in the NetworkStatsGetOptions dictionary. InvalidNetwork The network must be in the return of getAvailableNetworks. addAlarm() Install an alarm on a network. When total data usage reaches threshold bytes, a "networkstats-alarm" system message is sent to the application, where the optional parameter data must be a cloneable object. nsIDOMDOMRequest addAlarm(in nsISupports network, in long threshold, [optional] in jsval options /* NetworkStatsAlarmOptions */); Parameters net...
nsIDownload
state short The downloads current state. See nsIDownloadManager.Constants. Read only. target nsIURI The target of the transfer. Read only. targetFile nsILocalFile Indicates the location at which the downloaded file will be (or is, if the download is complete) stored. Read only. See also nsIDownloadManager nsIDownloadProgressListener nsIXPInstallManagerUI ...
nsIEditorSpellCheck
( in wstring word ); Parameters word The word to add to the current personal dictionary. canSpellCheck() Determines whether or not spell checking can be enabled. boolean canSpellCheck(); Parameters None. Return value Returns true if spell checking can be enabled. If there are no available dictionaries, the return value is false. checkCurrentDictionary() Call this after any change in installed dictionaries to ensure that the spell checker is not using a current dictionary which is no longer available. If the current dictionary is no longer available, pick another dictionary. void checkCurrentDictionary(); Parameters None. CheckCurrentWord() Checks a given word. In spite of the name, this function checks the word you give it, returning true if the word is misspelled. If the word is m...
ExtensionManager (Toolkit)
The ExtensionManager follows the nsIExtensionManager API. Note: This API is obsolete starting in Gecko 2.0, and has been replaced by the new Add-on Manager. ...
nsIFrameScriptLoader
he same frame that have also set the flag. removeDelayedFrameScript() Removes aURL from the list of scripts which support delayed load. This cancels the effect of the aAllowDelayedLoad flag, meaning that the loader will no longer load the script into new frames. If you used aAllowDelayedLoad, you should call this as part of your cleanup (for example, when your add-on is disabled or uninstalled). Parameters Name Type Description aURL String URL for the script to remove. getDelayedFrameScripts() Returns all delayed scripts that will be loaded once a (remote) frame becomes available. The return value is a list of pairs [<URL>, <WasLoadedInGlobalScope>]. Returns List of the delayed scripts. Each script is returned as a pair: [<URL>, <WasLoadedInG...
nsIINIParserWriter
setString(in AUTF8String aSection, in AUTF8String aKey, in AUTF8String aValue); void writeFile([optional] in nsIFile aINIFile, [optional] in unsigned long aFlags); Constants File writing constants These constants are specified when calling writeFile(), in order to change its behavior. Constant Value Description WRITE_UTF16 0x1 Windows and the NSIS installer code sometimes expect INI files to be in UTF-16 encoding. On Windows only, this flag to writeFile() can be used to change the encoding from its default UTF-8. Methods setString() Set the value of a property string for a particular section and key. void setString( in AUTF8String aSection, in AUTF8String aKey, in AUTF8String aValue ); Parameters aSection The name of the sec...
nsIJumpListBuilder
RG If incorrect parameters are passed for a particular category or item type. commitListBuild() Commits the current jump list build to the Taskbar. boolean commitListBuild(); Parameters None. Return value true if the operation completed successfully. deleteActiveList() Deletes any currently applied taskbar jump list for this application. Common uses would be the enabling of a privacy mode and uninstallation. boolean deleteActiveList(); Parameters None. Return value true if the operation completed successfully. Exceptions thrown NS_ERROR_UNEXPECTED On internal errors. initListBuild() Initializes a jump list build and returns a list of items the user removed since the last time a jump list was committed. Removed items can become state after initListBuild is called, lists should be built in sin...
nsIPrinterEnumerator
NameList nsIStringEnumerator The list of printer names. Read only. Methods displayPropertiesDlg() void displayPropertiesDlg( in wstring aPrinter, in nsIPrintSettings aPrintSettings ); Parameters aPrinter aPrintSettings enumeratePrinters() Obsolete since Gecko 1.9 (Firefox 3) Returns an array of the names of all installed printers. void enumeratePrinters( out PRUint32 aCount, [retval, array, size_is(aCount)] out wstring aResult ); Parameters aCount Returns number of printers returned. aResult Returns array of names. initPrintSettingsFromPrinter() Initializes certain settings from the native printer into the PrintSettings These settings include, but are not limited to: Page Orie...
nsIProcessScriptLoader
u should always pass true here. removeDelayedProcessScript() Removes aURL from the list of scripts which support delayed load. This cancels the effect of the aAllowDelayedLoad flag, meaning that the loader will no longer load the script into new child processes. If you used aAllowDelayedLoad, you should call this as part of your cleanup (for example, when your add-on is disabled or uninstalled). Parameters Name Type Description aURL String URL for the script to remove. getDelayedProcessScripts() Returns all delayed scripts that will be loaded once a child process becomes available. The return value is a list of pairs [<URL>, false]. Returns List of the delayed scripts. Each script is returned as a pair: [<URL>, false]. ...
nsISearchEngine
[optional] The MIME type that we'd like to receive in response to this submission. If null, will default to "text/html". purpose [optional] A string meant to indicate the context of the search request. This allows the search service to provide a different nsISearchSubmission depending on e.g. where the search is triggered in the UI. Possible values depend on the application's installed search engines. Return value An nsISearchSubmission supportsResponseType() Determines whether the engine can return responses in the given MIME type. boolean supportsResponseType( in AString responseType ); Parameters responseType The MIME type to check for. Return value Returns true if the engine spec has a URL with the given responseType, false otherwise. See also nsISe...
nsIUpdateManager
1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview nsIUpdate getUpdateAt(in long index); void saveUpdates(); Attributes Attribute Type Description activeUpdate nsIUpdate An nsIUpdate object describing the currently in use update. This update is not in the history list. Read only. ...
nsIUpdatePatch
escription finalURL AString The final URL this patch was being downloaded from. hashFunction AString The hash function to use when determining the integrity of the patch file. hashValue AString The value of the hash function named in hashFunction that should be computed if the file is not corrupt. selected boolean true if this patch is currently selected as the patch to be downloaded and installed for this update transaction. false if another update is selected. size unsigned long The size of the patch file in bytes. state AString The state of this patch. type AString The type of patch represented by the object: "partial" A binary difference between two application versions. "complete" A complete patch containing all the replacement files to update to the new version. URL AStr...
nsIWebProgressListener
progress for all requests associated with aWebProgress. onSecurityChange() Notification called for security progress. This method will be called on security transitions (for example HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. It might also be called if an error occurs during network loading. Note: These notifications will only occur if a security package is installed. void onSecurityChange( in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aState ); Parameters aWebProgress The nsIWebProgress instance that fired the notification. aRequest The nsIRequest that has new security state. aState A value composed of the Security State Flags and the Security Strength Flags listed above. Any undefined bits are reserved for futur...
nsIWinAppHelper
Methods fixReg() Obsolete since Gecko 1.9 (Firefox 3) Invokes helper.exe with the /fixreg parameter. Note that this parameter was never actually supported. void fixReg(); Parameters None. postUpdate() Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Invokes helper.exe with the /postupdate parameter. This updates the uninstallation log so that the application can be uninstalled correctly after an update. void postUpdate( in nsILocalFile logFile ); Parameters logFile The file to use for the uninstallation log. The path is passed to helper.exe as the /uninstalllog parameter. ...
XPCOM Interface Reference by grouping
nsISound nsIWifiMonitor Document nsIWebNavigation Environment nsIEnvironment Event nsIEventListenerInfo nsIEventListenerService nsIEventTarget Exception nsIException Extention nsIExtensionManager nsIInstallLocation External nsIExternalProtocolService Frame nsIContentFrameMessageManager History nsISHEntry nsISHistory Idle nsIIdleService Internal Command nsICommandLine nsICommandLineHandler nsIComma...
Setting HTTP request headers
---------> createInstance"); return new myHTTPListener(); } }, canUnload: function(compMgr) { return true; } }; function NSGetModule(compMgr, fileSpec) { return myModule; } Privacy and security good practice A use case for setting specific a HTTP request header is to have a specific web site be able to check if a specific plugin / addon / extension is installed. The good practice is not to have this specific HTTP header (for example "X-site.net-extension") sent all the time but only when doing requests with this specific web sites. By not advertising to all sites what extensions are installed this improves both privacy (this makes it harder to track a user known by his set of plugins, addons and extensions) and security (some plugins, addons and exten...
Using the Gecko SDK
ild XPCOM components in C++ using the Gecko SDK. Introduction It is assumed that you already know something about XPCOM component development. (More information on XPCOM is available at the XPCOM project page.) The intent of this guide is to help you build your components "the right way" such that they will remain compatible with future versions of Mozilla. For information on how to retrieve and install the Gecko SDK, see here. An XPCOM component will be compatible with future versions of Mozilla if it only makes use of frozen Gecko APIs. A frozen Gecko API is one that is included in the Gecko and marked frozen with the text <tt>@status FROZEN</tt> (with NSPR as the exception to the rule). The frozen Gecko API consists of a set of component interfaces (C++ vtables) and <tt>extern "C"</tt> symbol...
XPCOM
, arrays, variants), etc. The majority of XPCOM components are not part of this core set and are provided by other parts of the platform (e.g. Gecko or Necko) or by an application or even by an extension. Accessing the Windows Registry Using XPCOMWhen implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products.Aggregating the In-Memory Datasourcealready_AddRefedalready_AddRefed in association with nsCOMPtr allows you to assign in a pointer without AddRefing it.Binary compatibilityIf Mozilla decides to upgrade to a compiler that...
Generating xpt on Windows
In order to generate an .xpt file from an .idl file in recent versions of the Gecko \ XUL Runner SDK in Windows, you need to use the typelib.py script. ...
Mozilla technologies
t indexed search engine that runs on AWS.XML ExtrasThe XML Extras module contains several features that allow developers to treat XML as data i.e. not as just another document format. The module is structured as a drop-in component and exposes its XML-as-data features both to JavaScript and C++/XPCOM users. The XML Extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds.XPCOMXPCOM is a cross platform component object model, similar to Microsoft COM. It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++.XPIDLXPIDL is an Interface Description Language used to specify XPCOM interface classes.Xray visionGecko runs JavaScript from a variety...
Filelink Providers
er interface. The Hightail implementation is a great place to look for examples and inspiration. The nsIMsgCloudFileProvider implementation must be registered as a component. If the provider is being merged into the comm-central code repository (and thus added to the official Thunderbird build), you must also add the components to the cloudfile/cloudFileComponents.manifest, cloudfile/jar.mn, and installer/package-manifest.in. If the nsIMsgCloudFileProvider is being created as part of an add-on, the add-on must register the component in chrome.manifest. Also, you must add the component's contract ID to the "cloud-file" category. See cloudfile/cloudFileComponents.manifest for an example, as well as this document on chrome.manifest files. The Account Setup Dialog The account setup dialog allows ...
Building a Thunderbird extension 5: XUL
ies XUL fragments to insert at specific merge points within a "master" document. These fragments can specify widgets to be inserted, removed or modified. In this example you are adding a line to the indented statusbar. Therefore it becomes an item owned by the id called "status-bar". This shows how the Thunderbird architecture allows extensions to modify the user experience without modifying the installation files. This also enables version independence between Thunderbird and Thunderbird extensions. Example XUL Overlay Document Create a new file called myhelloworld.xul within the content folder you created earlier with the following content: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"...
Building a Thunderbird extension 6: Adding JavaScript
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. In this step we will create a small piece of JavaScript code that inserts the current date into our statusbar widget. The statusbar is usually displayed at the bottom of the Thunderbird window. Depending on the installed theme the result will look something like this: Modify XUL elements with JavaScript Save the following JavaScript code into the content/ folder next to your myhelloworld.xul file and name it overlay.js. window.addEventListener("load", function(e) { startup(); }, false); window.setInterval( function() { startup(); }, 60000); //update date every minute function startup() { var myPanel = document.getElementById("...
Creating a Custom Column
at columns aren't restricted to text - they can also load images (via getImageSrc()) so that your extension can display a new visual cue to the user. As you develop your custom extension, please revisit this article and add any helpful hints that you find along the way! Caveats Some weird behaviors have been witnessed, namely failing to be notified of the MsgCreateDBView event when Enigmail is installed [protz]. What happens is: usually, the event sequence is: jsm load -> onload -> MsgCreateDBView with Enigmail, the event sequence becomes jsm load -> MsgCreateDBView -> onload To workaround this, you can either i) manually run addCustomHandler() at the end of your onload handler or ii) register CreateDbObserver when your .jsm is loaded. Some extensions (e.g. rkent's junquilla) use i). ...
Demo Addon
tent is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. Overview This demo add-on has been created by Jonathan Protzenko for his presentation at MozCamp 2011. It shows how to achieve various goals in a working live example, such as working with Gloda. You can download it at the bottom of the page. How to use After installing the demo add-on in Thunderbird, right click on the toolbar and choose "Customize". Drag the "Demo" button into the toolbar. Afterwards, just click that button to show the demo overview. All three demos are explained in the following sections. Only the interesting parts are shown, it's recommended that you download the add-on and have a look at its files. The basics The interesting parts cov...
Finding the code for a feature
onse: nsIMsgTagService is used to store the list of valid tags, so it is not the correct way to tag messages. Tags are applied using the message database property "keyword". I know the underlying code, but I don't remember the user interface level function to do it. But here is how I find out. There are two key tools that you need. The first is the DOM inspector extension which I have routinely installed in all of my Thunderbird installations. (For debug builds, you can make it appear by default using "ac_add_options --enable-extensions=default,venkman,inspector" which is part of my standard configuration). The second is mozilla's source code search tool mxr. I keep two prominent links to this on my Firefox toolbar, one to comm-central string search, and one to comm-central file search. So, ho...
Using MAPI with Thunderbird's Windows 7 developer builds
MAPI (Messaging Application Programming Interface) is a Windows feature that allows applications to send files via a system's default mail application. The Thunderbird installer sets the installed build as the default mapi/mail client. If you want to set a debug build as the default mail client, you need configure it manually: In the objdir/mozilla/dist/bin directory, copy mozMapi32.dll to mozMapi32_InUse.dll and MapiProxy to MapiProxy_InUse.dll. (Be sure to copy - not move - these files.) In the uninstall sub-directory of the bin directory, run these two commands: helper.exe /SetAsDefaultAppGlobal helper.exe /SetAsDefaultAppUser Create an elevated shell and register the MAPI proxy.dll as a COM server. (One way to create an elevated shell is to invoke the command prompt from the S...
Toolkit version format
The following preferences: app.extensions.version, extensions.lastAppVersion Versions returned by nsIXULAppInfo. ...
Add to iPhoto
This extension for Mac OS X serves as a demonstration of how to use js-ctypes to call Mac OS X Carbon, Core Foundation, and other system frameworks from an extension written entirely in JavaScript. Note: This extension uses Carbon routines, which can no longer be used in Firefox add-ons now that Firefox is a 64-bit application. You can download an installable version of this extension on AMO. Once installed, when you right-click on an image, you'll see among the options in the contextual menu an option to "Add Image to iPhoto". Choose it, and iPhoto will start up (if it's not already running) and import the image. Declaring the APIs The first thing we have to do is declare the Mac OS X APIs we'll be using. This extension uses a number of methods and data types, as well as constants, from ...
Blocking By Domain - Plugins
uable to users by reducing unnecessary prompts. According to the Firefox plugin roadmap, the plugin block list is planned for Firefox 55. Effects of Plugin Blocking Once a site is included in plugin blocking, it is not possible for that site or any subframes within that site to use plugins. Any attempt to use a plugin (via the <object> or <embed> element) will behave as if the plugin was not installed, and use fallback content as specified by the HTML standard. Plugin detection mechanisms such as navigator.mimeTypes and navigator.plugins will also behave as if the plugin were not installed. There are two versions of plugin blocking: First-party Plugin Blocking List Sites on this list may not use plugins. Third-party Plugin Block List Sites on this list may not use plugins when they ar...
Version, UI, and Status Information - Plugins
r ret = NPN_GetValue(instance, NPNVSupportsWindowless, &supportsWindowless); return ret == NPERR_NO_ERROR && supportsWindowless; } Reloading a Plug-in When the browser starts up, it loads all the plug-ins it finds in the Plugins directory for the platform. If you call NPN_ReloadPlugins, the browser reloads all plug-ins in the Plugins directory without restarting. This causes the browser to install a new plug-in and load it, or remove a plug-in, without having to restart. Consider using this function as part of the plug-in's SmartUpdate process. void NPN_ReloadPlugins(NPBool reloadPages); The reloadPages parameter is a boolean that indicates whether to reload the page (true) or not (false). << PreviousNext >> ...
Gecko Plugin API Reference - Plugins
lug-ins Registering Plug-ins MS Windows Unix Mac OS X Drawing a Plug-in Instance Handling Memory Sending and Receiving Streams Working with URLs Getting Version and UI Information Displaying Messages on the Status Line Making Plug-ins Scriptable Building Plug-ins Building, Platforms, and Compilers Building Carbonized Plug-ins for Mac OS X Type Libraries Installing Plug-ins Native Installers XPI Plug-ins Installations Plug-in Installation and the Windows Registry Initialization and Destruction Initialization Instance Creation Instance Destruction Shutdown Initialize and Shutdown Example Drawing and Event Handling The NPWindow Structure Drawing Plug-ins Printing the Plug-in Setting the Window Getting Information ...
Plugins
Important: plugins are a legacy technology that are a security and performance problem for Firefox (and other browser) users. They may not be supported in the future. New content should not be written using Flash or any other plugin technology. Roadmap Plugin Roadmap Information about the roadmap for Adobe Flash and other plugin support in Firefox. Roadmap Highlights Since Firefox 52, plugins other than Flash are not loaded by Firefox. Starting in Firefox 55, users will be asked to choose which sites may use Flash content. This feature will be rolled out gradually to Firefox users. ...
DOM Inspector internals - Firefox Developer Tools
ing away from the current viewer and back. Knowing this about the way viewers are written, we should now be at a place where we can look at the way the DOM Inspector source is organized. Source code organization The contents of the top-level directory for the DOM Inspector repository should look like base/ js/ inspector-cmdline.js Makefile.in build/ install.js Makefile.in resources/ content/ ... locale/ ... skin/ ... Makefile.in install.rdf jar.mn Makefile.in makefiles.sh Almost all the interesting stuff is in resources/content/. Its contents should resemble the following: extensions/ ... jsutil/ ... prefs/ ... res/ ...
Introduction to DOM Inspector - Firefox Developer Tools
either application. DOM Inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own XULRunner app. DOM Inspector can serve as a sanity check to verify the state of the DOM, or it can be used to manipulate the DOM by hand, if desired. Note: Starting with Firefox 3, the DOM Inspector is not included in Firefox by default; instead, you must download and install it from the Mozilla add-ons web site. (Note: this is now a dead link.) When you first start the DOM Inspector, you are presented with a two-pane application window that looks a little like the main Mozilla browser. Like the browser, the DOM Inspector includes an address bar, and some of the same menus. In SeaMonkey additional global menus will be available. Inspecting a Document When the DOM...
Browser Console - Firefox Developer Tools
ly. Here's an example add-on that just logs an error when the user clicks a widget: widget = require("sdk/widget").Widget({ id: "an-error-happened", label: "Error!", width: 40, content: "Error!", onClick: logError }); function logError() { console.error("something went wrong!"); } If you build this as an XPI file, then open the Browser Console, then open the XPI file in Firefox and install it, you'll see a widget labeled "Error!" in the Add-on bar: Click the icon. You'll see output like this in the Browser Console: For Add-on SDK-based add-ons only, the message is prefixed with the name of the add-on ("log-error"), making it easy to find all messages from this add-on using the "Filter output" search box. By default, only error messages are logged to the console, although you ca...
Migrating from Firebug - Firefox Developer Tools
gged messages between page navigations and reloads. In the DevTools this option is called Enable persistent logs and is available within the Toolbox Options panel. Server logs Firebug extensions like FirePHP allow to log server-side messages to the Firebug console. This functionality is already integrated into the DevTools using the ChromeLogger protocol and doesn't require any extensions to be installed. Command history The command history available through a button in Firebug's command line, is available by pressing ?/? within the DevTools command line. Inspect object properties By clicking on an object logged within the console you can inspect the object's properties and methods within the DOM panel. In the Firefox DevTools you can also inspect the objects. The difference is that they sh...
Edit fonts - Firefox Developer Tools
ecause you can easily determine whether a font is a web font or a font hosted on your system. Each font listed in this section shows you: The font-family identifier and full name of the font. The URL to the font file in the case of web fonts not available on your system, or "System" in the case of fonts loaded from your computer (either default system fonts, or web fonts that you've also got installed on your system). You can copy the URL to the font file by clicking on the icon to the right of the URL. The @font-face descriptor that loads the font into the page, in the case of web fonts. The descriptor is expandable -- when opened it shows its full syntax as defined in the stylesheet. A text sample, to give you an idea of what the font looks like when rendered. The default text for the sa...
Validators - Firefox Developer Tools
This document lists different resources for developers to validate web pages. Sidebar tabs are not available at this time. Tune-up wizard links back to devedge If you're writing new code that isn't validating immediately, see the available standards-compliant authoring and development tools. Firefox Extensions for Validation Quick Reference Sidebar Tabs Install DevEdge Toolbox Sidebars for quick access to web development references. Checky Checky adds a submenu to your Netscape or Mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services. Applications and Services DevEdge Web Tune-Up Wizard This interface to W3C services guides beginning-to-intermediate web authors through the process of up...
Console messages - Firefox Developer Tools
error() exception() group() groupEnd() info() log() table() time() timeEnd() trace() warn() The console prints a stack trace for all error messages, like this: function foo() { console.error("it explodes"); } function bar() { foo(); } function doStuff() { bar(); } doStuff(); Server Server-side log messages was introduced in Firefox 43, but removed in Firefox 56. You can install the Chrome Logger extension to (re)-enable the feature. With the Chrome Logger extension, Web Console can display messages sent from the server. This enables you to use the Web Console to debug server-side code. It uses the Chrome Logger protocol. Briefly, the way it works is: Your server-side code -- Python, PHP, Node.js, etc. -- includes a library that provides a console API. Your server...
Cache.add() - Web APIs
Web › API › Cache › add
Exception Happens when TypeError The URL scheme is not http or https. The Response status is not in the 200 range (i.e., not a successful response.) This occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) Examples This code block waits for an InstallEvent to fire, then calls waitUntil() to handle the install process for the app. This consists of calling CacheStorage.open to create a new cache, then using Cache.add to add an asset to it. this.addEventListener('install', function(event) { event.waitUntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); Specifications Spe...
Cache.addAll() - Web APIs
Web › API › Cache › addAll
Exception Happens when TypeError The URL scheme is not http or https. The Response status is not in the 200 range (i.e., not a successful response.) This occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) Examples This code block waits for an InstallEvent to fire, then runs waitUntil() to handle the install process for the app. This consists of calling CacheStorage.open to create a new cache, then using addAll() to add a series of assets to it. this.addEventListener('install', function(event) { event.waitUntil( caches.open('v1').then(function(cache) { return cache.addAll([ '/sw-test/', '/sw-test/index.html', ...
CacheStorage.open() - Web APIs
Web › API › CacheStorage › open
d a Promise that resolves to this new Cache object is returned. Syntax caches.open(cacheName).then(function(cache) { // Do something with your cache }); Parameters cacheName The name of the cache you want to open. Return value A Promise that resolves to the requested Cache object. Examples This example is from the MDN sw-test example (see sw-test running live). Here we wait for an InstallEvent to fire, then runs waitUntil() to handle the install process for the app. This consists of calling CacheStorage.open() to create a new cache, then using Cache.addAll() to add a series of assets to it. self.addEventListener('install', function(event) { event.waitUntil( caches.open('v1').then(function(cache) { return cache.addAll([ '/sw-test/', '/sw-test/index.html...
Document.plugins - Web APIs
Web › API › Document › plugins
The plugins read-only property of the Document interface returns an HTMLCollection object containing one or more HTMLEmbedElements representing the <embed> elements in the current document. For a list of installed plugins, use NavigatorPlugins.plugins instead. Syntax embedArrayObj = document.plugins Value An HTMLCollection, or null if there are no embeds in the document. Specifications Specification Status Comment HTML Living StandardThe definition of 'Document.plugins' in that specification. Living Standard ...
ExtendableEvent() - Web APIs
init Optional An options object containing any custom settings that you want to apply to the event object. ...
FileSystem - Web APIs
btained from the filesystem property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome's requestFileSystem() method. This interface will not grant you access to the users filesystem. Instead you will have a "virtual drive" within the browser sandbox. If you want to gain access to the users filesystem you need to invoke the user by eg. installing a Chrome extension. The relevant Chrome API can be found here. Basic concepts There are two ways to get access to a FileSystem object: You can directly ask for one representing a sandboxed file system created just for your web app directly by calling window.requestFileSystem(). If that call is successful, it executes a callback handler, which receives as a parameter a FileSystem object d...
Geolocation.clearWatch() - Web APIs
The Geolocation.clearWatch() method is used to unregister location/error monitoring handlers previously installed using Geolocation.watchPosition(). Syntax navigator.geolocation.clearWatch(id); Parameters id The ID number returned by the Geolocation.watchPosition() method when installing the handler you wish to remove. Example var id, target, option; function success(pos) { var crd = pos.coords; if (target.latitude === crd.latitude && target.longitude === crd.longitude) { console.log('Congratulation, you reach the target'); navigator.geolocation.clearWatch(id); } }; function error(err) { console.warn('ERROR(' + err.code + '): ' + err.message); }; target = { latitude : 0, longitude: 0, } options = { enableHighAccuracy: false, timeout: 5000, maximumAge: 0...
Geolocation - Web APIs
ocation.getCurrentPosition() Secure context Determines the device's current location and gives back a GeolocationPosition object with the data. Geolocation.watchPosition() Secure context Returns a long value representing the newly established callback function to be invoked whenever the device location changes. Geolocation.clearWatch() Secure context Removes the particular handler previously installed using watchPosition(). Specifications Specification Status Comment Geolocation API Recommendation Initial specification. ...
GlobalEventHandlers.onerror - Web APIs
EventListener (not only capturing)). When a resource (such as an <img> or <script>) fails to load, an error event using interface Event is fired at the element that initiated the load, and the onerror() handler on the element is invoked. These error events do not bubble up to window, but (at least in Firefox) can be handled with a window.addEventListener configured with useCapture set to True. Installing a global error event handler is useful for automated collection of error reports. Syntax For historical reasons, different arguments are passed to window.onerror and element.onerror handlers (as well as on error-type window.addEventListener handlers). window.onerror window.onerror = function(message, source, lineno, colno, error) { ... }; Function parameters: message: error message (s...
HTMLBaseFontElement - Web APIs
ts parent, HTMLElement. HTMLBaseFontElement.color Is a DOMString representing the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. HTMLBaseFontElement.face Is a DOMString representing a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. HTMLBaseFontElement.size Is a DOMString representing the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. Relative value starts with a '+' or a '-'. Methods No specific method; inherits methods from its pa...
HTMLFontElement.face - Web APIs
The obsolete HTMLFontElement.face property is a DOMString that reflects the face HTML attribute, containing a comma-separated list of one or more font names. The document text, in the default style, is rendered as the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. The format of the string must follow one of the following HTML microsyntax: Microsyntax Description Examples List of one or more valid font family names A list of font names, that have to be present on the local system courier,verdana Syntax faceString = fontObj.face; fontObj.face = faceString; Examples // Assumes there is <font id="f"> el...
IdleDeadline - Web APIs
n idle and a property, didTimeout, which lets you determine if your callback is executing because its timeout duration expired. To learn more about how request callbacks work, see Collaborative Scheduling of Background Tasks. Properties IdleDeadline.didTimeout Read only A Boolean whose value is true if the callback is being executed because the timeout specified when the idle callback was installed has expired. Methods IdleDeadline.timeRemaining() Returns a DOMHighResTimeStamp, which is a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period. If the idle period is over, the value is 0. Your callback can call this repeatedly to see if there's enough time left to do more work before returning. Example See our complete examp...
startSoftwareUpdate - Web APIs
Summary Triggers the downloading and installation of the software at the specified URL. Method of InstallTrigger object Syntax Boolean startSoftwareUpdate ( String url); Parameters The startSoftwareUpdate method has the following parameter: url A uniform resource locator specifying the location of the XPI file containing the software. Returns True. Description The startSoftwareUpdate method triggers a software download and install from the specified URL. This method has been largely superseded by newer install method, which is more flexible and allows you to install more than one XPI. Note also that XPIs installed with this method must have their own install.js files in which the full installation is defined. ...
Web-based protocol handlers - Web APIs
Firefox will, by default, prompt the user before handing off the action. Example <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> ...
Navigator - Web APIs
Web › API › Navigator
ine. Navigator.permissions Read only Returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API. NavigatorID.platform Read only Returns a string representing the platform of the browser. Do not rely on this function to return a significant value. NavigatorPlugins.plugins Read only Returns a PluginArray listing the plugins installed in the browser. NavigatorID.product Read only Always returns 'Gecko', on any browser. This property is kept only for compatibility purpose. Navigator.serviceWorker Read only Returns a ServiceWorkerContainer object, which provides access to registration, removal, upgrade, and communication with the ServiceWorker objects for the associated document. NavigatorStorage.storage Read only R...
Using the Payment Request API - Web APIs
w PaymentRequest( [{supportedMethods: 'https://example.com/preauth'}], ...); // Send `CanMakePayment` event to the payment handler. paymentRequest.canMakePayment() .then(function(res) { if (res) { // The payment handler has pre-authorized a transaction // with some static amount, e.g., USD $1.00. } else { // Pre-authorization failed or payment handler not installed. } }) .catch(function(ex1) { // Unexpected error occurred. }); The payment handler would include the following code: self.addEventListener('canmakepayment', function(evt) { // Pre-authorize here. let preAuthSuccess = ...; evt.respondWith(preAuthSuccess); }); This payment handler would need to live in a service worker at https://example.com/preauth scope. Not...
PluginArray - Web APIs
var pluginsLength = navigator.plugins.length; document.write( pluginsLength.toString() + " Plugin(s)<br>" + "Name | Filename | description<br>" ); for(var i = 0; i < pluginsLength; i++) { document.write( navigator.plugins[i].name + " | " + navigator.plugins[i].filename + " | " + navigator.plugins[i].description + " | " + navigator.plugins[i].versi...
Multi-touch interaction - Web APIs
= new Array(); var evCache2 = new Array(); var evCache3 = new Array(); Register event handlers Event handlers are registered for the following pointer events: pointerdown, pointermove and pointerup. The handler for pointerup is used for the pointercancel, pointerout and pointerleave events, since these four events have the same semantics in this application. function set_handlers(name) { // Install event handlers for the given element var el=document.getElementById(name); el.onpointerdown = pointerdown_handler; el.onpointermove = pointermove_handler; // Use same handler for pointer{up,cancel,out,leave} events since // the semantics for these events - in this app - are the same. el.onpointerup = pointerup_handler; el.onpointercancel = pointerup_handler; el.onpointerout = pointerup_h...
Pinch zoom gestures - Web APIs
. // Global vars to cache event state var evCache = new Array(); var prevDiff = -1; Register event handlers Event handlers are registered for the following pointer events: pointerdown, pointermove and pointerup. The handler for pointerup is used for the pointercancel, pointerout and pointerleave events since these four events have the same semantics in this application. function init() { // Install event handlers for the pointer target var el=document.getElementById("target"); el.onpointerdown = pointerdown_handler; el.onpointermove = pointermove_handler; // Use same handler for pointer{up,cancel,out,leave} events since // the semantics for these events - in this app - are the same. el.onpointerup = pointerup_handler; el.onpointercancel = pointerup_handler; el.onpointerout = pointe...
RTCRtpReceiver.getCapabilities() static function - Web APIs
options may fail to work when you actually try to use them. Calling RTCRtpReceiver.getCapabilities() doesn't prime the browser in any way to handle media. Nothing is loaded, fetched, or otherwise prepared. It's simply a means of determining what might be usable before starting to try to access media. Because the set of capabilities available tend to be stable for a length of time (people don't install and uninstall codecs and the like very often), the media capabilities can in whole or in part provide a cross-origin method for identifying a user. For that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations. Example The function below returns a Boolean indicating whether or ...
RTCRtpSender.getCapabilities() static function - Web APIs
of options may fail to work when you actually try to use them. Calling RTCRtpSender.getCapabilities() doesn't prime the browser in any way to handle media. Nothing is loaded, fetched, or otherwise prepared. It's simply a means of determining what might be usable before starting to try to access media. Because the set of capabilities available tend to be stable for a length of time (people don't install and uninstall codecs and the like very often), the media capabilities can in whole or in part provide a cross-origin method for identifying a user. For that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations. Example The function below returns a Boolean indicating whether or ...
Screen.lockOrientation() - Web APIs
Syntax lockAllowed = window.screen.lockOrientation(orientation); Parameters orientation The orientation into which to lock the screen. This is either a string or an array of strings. Passing several strings lets the screen rotate only in the selected orientations. ...
Screen.unlockOrientation() - Web APIs
Syntax var unlocked = window.screen.unlockOrientation(); Return value Returns true if the orientation was successfully unlocked or false if the orientation couldn't be unlocked. ...
Screen - Web APIs
Web › API › Screen
he screen. Screen.mozEnabled Boolean. Setting to false will turn off the device's screen. Screen.mozBrightness Controls the brightness of a device's screen. A double between 0 and 1.0 is expected. Events handler Screen.onorientationchange A handler for the orientationchange event. Methods Screen.lockOrientation Lock the screen orientation (only works in fullscreen or for installed apps) Screen.unlockOrientation Unlock the screen orientation (only works in fullscreen or for installed apps) Methods inherited from EventTarget: EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to thi...
ServiceWorkerGlobalScope.onactivate - Web APIs
Syntax ServiceWorkerGlobalScope.onactivate = function(event) { ... }; Examples The following snippet shows how you could use an activate event handler to upgrade a cache. ...
ServiceWorkerGlobalScope - Web APIs
orkerRegistration acquires a new ServiceWorkerRegistration.active worker. Also available via the ServiceWorkerGlobalScope.onactivate property. contentdelete Occurs when an item is removed from the Content Index. Also available via the ServiceWorkerGlobalScope.oncontentdelete property. fetch Occurs when a fetch() is called. Also available via the ServiceWorkerGlobalScope.onfetch property. install Occurs when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker. Also available via the ServiceWorkerGlobalScope.oninstall property. message Occurs when incoming messages are received. Controlled pages can use the MessagePort.postMessage() method to send messages to service workers. The service worker can optionally send a response back via the MessagePort e...
ServiceWorkerRegistration.onupdatefound - Web APIs
Note: This feature is available in Web Workers. Syntax serviceWorkerRegistration.onupdatefound = function() { ... ...
ServiceWorkerRegistration.update() - Web APIs
The fetch of the worker bypasses any browser caches if the previous fetch occurred over 24 hours ago. Note: This feature is available in Web Workers. Syntax serviceWorkerRegistration.update(); Parameters None. Return value A Promise that resolves with a ServiceWorkerRegistration object. ...
ServiceWorkerRegistration.waiting - Web APIs
The waiting property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is installed. This property is initially set to null. Note: This feature is available in Web Workers. Syntax var serviceWorker = serviceWorkerRegistration.waiting; Value A ServiceWorker object, if it is currently in an installed state. Specifications Specification Status Comment Service WorkersThe definition of 'ServiceWorkerRegistration.waiting' in that specification. Working Draft Initial definition. ...
SpeechSynthesisErrorEvent.error - Web APIs
he user-agent couldn't identify an audio output device (for example, the user may need to connect a speaker or configure system settings.) network The operation couldn't be completed at this time because some required network communication failed. synthesis-unavailable The operation couldn't be completed at this time because no synthesis engine was available (For example, the user may need to install or configure a synthesis engine.) synthesis-failed The operation failed because the synthesis engine raised an error. language-unavailable No appropriate voice was available for the language set in SpeechSynthesisUtterance.lang. voice-unavailable The voice set in SpeechSynthesisUtterance.voice was not available. text-too-long The contents of the SpeechSynthesisUtterance.text attribute was...
Multi-touch interaction - Web APIs
/style> Global state tpCache is used to cache touch points for processing outside of the event where they were fired. // Log events flag var logEvents = false; // Touch Point cache var tpCache = new Array(); Register event handlers Event handlers are registered for all four touch event types. The touchend and touchcancel event types use the same handler. ...
WebGL constants - Web APIs
A list is provided below. ...
WebRTC API - Web APIs
WebRTC (Web Real-Time Communication) is a technology which enables Web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between browsers without requiring an intermediary. The set of standards that comprise WebRTC makes it possible to share data and perform teleconferencing peer-to-peer, without requiring that the user installs plug-ins or any other third-party software. WebRTC consists of several interrelated APIs and protocols which work together to achieve this. The documentation you'll find here will help you understand the fundamentals of WebRTC, how to set up and use both data and media connections, and more. Interoperability Because implementations of WebRTC are still evolving, and because each browser has different...
Fundamentals of WebXR - Web APIs
that the virtual world completely surrounds them, the FOV needs to at least approach the width of the binocular vision area. Basic headsets typically start around 90? or so, while the best headsets generally have a field of view of around 150?. Because the FOV is a matter of the size of the lenses and how close they are to the user's eyes, there are limitations on how wide the FOV can get without installing lenses into the user's eyeballs. A wide FOV can substantially improve the user's sense of immersion. However, increasing the FOV can also increase the weight and cost of the headset. Degrees of freedom The term degrees of freedom is an indication of how much freedom of movement the user has within the virtual world. This is directly related to how many types of movement the WebXR hardware c...
Starting up and shutting down a WebXR session - Web APIs
Group that's in charge of the WebXR standardization process. The polyfill brings support for WebXR to browsers that don't have native WebXR support, and smooths out the inconsistencies among implementations in the browsers that do have it, so it can sometimes also be useful even if WebXR is natively available. Here we define a getXR() function, which returns the XRSystem object after optionally installing the polyfill, assuming that the polyfill has been included or loaded using a prior <script> tag. let webxrPolyfill = null; function getXR(usePolyfill) { let tempXR; let tempPoly; switch(usePolyfill) { case "if-needed": if (!navigator.xr) { webxrPolyfill = new WebXRPolyfill(); } tempXR = navigator.xr; break; case "yes": webxrPolyfill = new ...
Window.external - Web APIs
Web › API › Window › external
related to adding external search providers to the browser. However, this is now deprecated, and the contained methods are now dummy functions that do nothing as per spec. Methods The External object has the following methods: Method Description AddSearchProvider(descriptionURL) Dummy function; does nothing. See Autodiscovery of search plugins. IsSearchProviderInstalled() Dummy function; does nothing. Specifications Specification Status HTML Living StandardThe definition of 'External' in that specification. Living Standard ...
Window.pkcs11 - Web APIs
Web › API › Window › pkcs11
Obsolete since Gecko 29 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary Returns the pkcs11 object, which is used to install drivers and other software associated with the pkcs11 protocol. If pkcs11 isn't supported, this property returns null. Note: This property has been returned null since Gecko 1.9.0.14 (Firefox 3.0.14) and removed in Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)) for security reasons. For more information on installing PKCS11 modules, see installing PKCS11 modules. See bug 326628 for details on why the property was removed. Syntax objRef = window.pkcs11 Example window.pkcs11.addModule(sMod, sec...
Window.sidebar - Web APIs
Web › API › Window › sidebar
bar" option instead. Also see Creating a Firefox sidebar. addPersistentPanel(title, contentURL, "") Adds a sidebar panel, which is able to work in the background. AddSearchProvider(descriptionURL) Dummy function; does nothing. See Autodiscovery of search plugins. addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory) Obsolete since Gecko 44 Installs a search engine (Sherlock). Adding Sherlock search engines contains more details. Note: This was made obsolete in Firefox 44, and has been removed completely in Firefox 59. IsSearchProviderInstalled(descriptionURL) Indicates if a specific search provider (OpenSearch) is installed. Specification Mozilla-specific. Not part of any standard. ...
WindowOrWorkerGlobalScope.caches - Web APIs
torage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests. Syntax var myCacheStorage = self.caches; // or just caches Value A CacheStorage object. Example The following example shows how you'd use a cache in a service worker context to store assets offline. ...
Accessibility Information for Web Authors - Accessibility
ibility evaluation process. Rather than providing a complex technical report, WAVE 4.0 shows the original web page with embedded icons and indicators that reveal the accessibility information within your page. You can get accessibity report for errors, warnings. You can view the structure and order view of the document. You can see a text-only view and and outline view of the document. You can install a custom WAVE toolbar in Firefox for a quick, easy and convenient evaluation of web pages directly within Firefox. You can also add a WAVE bookmarklet in Firefox or even WAVE direct links for checking a webpage. HTML advanced validator (Firefox extension) by Marc Gueury This HTML Validator (based on W3C Tidy and on OpenSP for SGML validation) is a powerful, versatile, extended HTML validator...
src - CSS: Cascading Style Sheets
Web › CSS › @font-face › src
function to describe the format of the font resource referenced by that URL. The format hint contains a comma-separated list of format strings that denote well-known font formats. If a user agent doesn't support the specified formats, it skips downloading the font resource. If no format hints are supplied, the font resource is always downloaded. <font-face-name> Specifies the name of a locally-installed font face using the local() function, which uniquely identifies a single font face within a larger family. The name can optionally be enclosed in quotes. Description The value of this descriptor is a prioritized, comma-separated list of external references or locally-installed font face names. When a font is needed the user agent iterates over the set of references listed using the first one...
font-family - CSS: Cascading Style Sheets
ic family names for the selected element. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Values are separated by commas to indicate that they are alternatives. The browser will select the first font in the list that is installed or that can be downloaded using a @font-face at-rule. It is often convenient to use the shorthand property font to set font-size and other font related properties all at once. You should always include at least one generic family name in a font-family list, since there's no guarantee that any given font is available. This lets the browser select an acceptable fallback font when necessary. Th...
font-stretch - CSS: Cascading Style Sheets
map to a wider face. The table below demonstrates the effect of supplying various different percentage values of font-stretch on two different fonts: 50% 62.5% 75% 87.5% 100% 112.5% 125% 150% 200% Helvetica Neue League Mono Variable Helvetica Neue, which is installed by default on macOS, has a single condensed face in addition to the normal face. All values of font-stretch less than 100% select the condensed face, while all other values select the normal face. League Mono Variable is a variable font that offers something like a continuous range of widths for different percentage values of font-stretch. Formal definition Initial valuenormalApplies toall ...
font-variant-alternates - CSS: Cascading Style Sheets
You can find a few free versions for testing purposes, for example from fontsgeek.com. Specifications Not part of any standard. ...
font-variant-east-asian - CSS: Cascading Style Sheets
HTML <table> <thead></thead> <tbody style="border:0;"> <tr> <th>normal/jis78:</th> <td>??</td> <td class="jis78">??</td> </tr> <tr> <th>normal/ruby:</th> <td>??????</td> <td class="ruby">??????</td> </tr> <tr> <th>normal/traditional:</th> <td>??</td> <td class="traditional">??</td> </tr>...
list-style-type - CSS: Cascading Style Sheets
an @counter-style rule */ list-style-type: custom-counter-style; /* Keyword value */ list-style-type: none; /* Global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; The list-style-type property may be defined as any one of: a <custom-ident> value a symbols() value a <string> value the keyword none. Note that: Some types require a suitable font installed to display as expected. The cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons. Values <custom-ident> A identifier matching the value of a @counter-style or one of the predefined styles: symbols() Defines an anonymous style of the list. <string> The specified string will be used as the item's marker. none No item marker is shown. disc A...
Cross-browser audio basics - Developer guides
These are also deprecated, and soon won't work in any modern browsers. Manipulating the Audio Element with JavaScript In addition to being able to specify various attributes in HTML, the <audio> element comes complete with several properties and methods that you can manipulate via JavaScrip...
Live streaming web audio and video - Developer guides
ed to them. Icecast The Icecast server is an open source technology for streaming media. Maintained by the Xiph.org Foundation, it streams Ogg Vorbis/Theora as well as MP3 and AAC format via the SHOUTcast protocol. Note: SHOUTcast and Icecast are among the most established and popular technologies, but there are many more streaming media systems available. Streaming Services Although you can install software like GStreamer, SHOUTcast and Icecast you will also find a lot of third-party streaming services that will do much of the work for you. See Also HTTP Live Streaming HLS Browser Support HTTP Live Streaming JavaScript player The Basics of HTTP Live Streaming DASH Adaptive Streaming for HTML 5 Video Dynamic Adaptive Streaming over HTTP (MPEG-DASH) MPEG-DASH Media Source Demo DASH...
Setting up adaptive streaming media sources - Developer guides
yet support MPEG-DASH: <video> <source src="my.mpd" type="application/dash+xml"> <!-- fallback --> <source src="my.mp4" type="video/mp4"> <source src="my.webm" type="video/webm"> </video> LIVE Profile A useful piece of software when dealing with MPEG-DASH is Dash Encoder. This uses MP4Box to encode media into MPEG-DASH format. Note: You will need to be comfortable with make files and installing dependencies to get this software up and running. Note: Since MPEG-DASH decoding is done partially using JavaScript and MSE files are often grabbed using XHR, keep same origin rules in mind. Note: If you use WebM you can use the methods shown in this tutorial DASH Adaptive Streaming for HTML 5 Video. Once encoded your file structure may look something like this: play list -> ...
Creating a cross-browser video player - Developer guides
r: MP4, WebM, and Ogg. Using these different source formats gives the best chance of being supported across all browsers that support HTML5 video. For further information on video formats and browser compatibility, see supported media formats. For browsers that do not support HTML5 video, a Flash player is provided that will allow playback of the MP4 video source, provided the end user has Flash installed. In addition a download link is displayed to allow users to download the MP4 video file, should they wish to (providing those without Flash installed with a method of viewing the video, a fallback for a fallback if you like). The code above would allow playback of the video in most browsers, using the browser's default control set. The next step is to define a custom control set, also in HTML,...
DOM onevent handlers - Developer guides
bject in different ways: Adding an HTML attribute named on<eventtype>: <button onclick="handleClick()">, Or by setting the corresponding property from JavaScript: document.querySelector("button").onclick = function(event) { ... }. An onevent event handler property serves as a placeholder of sorts, to which a single event handler can be assigned. In order to allow multiple handlers to be installed for the same event on a given object, you can call its addEventListener() method, which manages a list of handlers for the given event on the object. A handler can then be removed from the object by calling its removeEventListener() function. When an event occurs that applies to an element, each of its event handlers is called to allow them to handle the event, one after another. You don't nee...
Localizations and character encodings - Developer guides
ut Firefox is moving to treating windows-1252 as the preferred label for this encoding in accordance with the Encoding Standard. For locales where Internet Explorer has more market share than Firefox, the fallback encoding should typically be set to the same value as in Internet Explorer. You can see the fallback encoding a particular browser has by loading a test page. (Be sure to use a browser installation that has its settings left to the defaults when investigating!) For locales where Firefox has more market share than Internet Explorer, it's probably best not to change the fallback encoding even if it doesn't follow the guidance given above. (For example, the fallback encoding for the Polish, Hungarian and Czech locales should probably continue to be ISO-8859-2 even though IE has a differe...
User input and controls - Developer guides
epresented by the MouseEvent DOM Interface. Common mouse events include click, dblclick, mouseup, and mousedown. The list of all events using the Mouse Event Interface is provided in the Events reference. When the input device is a mouse, you can also control user input through the Pointer Lock API and implement Drag & Drop (see below). Finger touch When developing web applications meant to be installed on touchscreen devices, it's a good practice to take into consideration the different capabilities in terms of screen resolution and user input. Touch events can help you implement interactive elements and common interaction gestures on touchscreen devices. If you want to use touch events, you need to add event listeners and specify handler functions, which will be called when the event gets f...
<basefont> - HTML: Hypertext Markup Language
Web › HTML › Element › basefont
Like all other HTML elements, this element supports the global attributes. color This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. face This attribute contains a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. size This attribute specifies the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. Usage notes Do not use this element! Though once (imprecisely) normalized in HTML 3.2, it wasn't supported in all major br...
<font> - HTML: Hypertext Markup Language
Web › HTML › Element › font
HTML elements, this element supports the global attributes. color This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. face This attribute contains a comma-separated list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. size This attribute specifies the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. It can be defined using a relative value, like +2 or -3, which set it relative to the value of the size attribute of the <bas...
Common MIME types - HTTP
spatch-javascript-mjs/ .json JSON format application/json .jsonld JSON-LD format application/ld+json .mid .midi Musical Instrument Digital Interface (MIDI) audio/midi audio/x-midi .mjs JavaScript module text/javascript .mp3 MP3 audio audio/mpeg .mpeg MPEG Video video/mpeg .mpkg Apple Installer Package application/vnd.apple.installer+xml .odp OpenDocument presentation document application/vnd.oasis.opendocument.presentation .ods OpenDocument spreadsheet document application/vnd.oasis.opendocument.spreadsheet .odt OpenDocument text document application/vnd.oasis.opendocument.text .oga OGG audio audio/ogg .ogv OG...
Configuring servers for Ogg media - HTTP
This guide covers a few server configuration changes that may be necessary for your web server to correctly serve Ogg media files. This information may also be useful if you encounter other media types your server isn't already configured to recognize. Serve media with the correct MIME type *.ogg and *.ogv files containing video (possibly with an audio track as well, of course), should be served with the video/ogg MIME type. *.oga and *.ogg files containing only audio should be served with the audio/ogg MIME type. ...
Expect-CT - HTTP
eports/enforcement. Browsers will not remember an Expect-CT policy, unless the site has 'proven' it can serve a certificate satisfying the certificate transparency requirements. Browsers implement their own trust model regarding which CT logs are considered trusted for the certificate to have been logged to. Builds of Chrome are designed to stop enforcing the Expect-CT policy 10 weeks after the installation's build date. Specifications Specification Title Internet Draft Expect-CT Extension for HTTP ...
Large-Allocation - HTTP
we cannot allow them to switch processes. A Large-Allocation header was ignored due to the document not being loaded out of process. Firefox has moved to a multiprocess architecture, and this architecture is required in order to support the Large-Allocation header. Some legacy Addons can prevent Firefox from using this new, faster, multiprocess architecture. If you have one of these Addons installed, then we will continue to use the old single process architecuture for compatibility, and cannot handle the Large-Allocation header. This page would be loaded in a new process due to a Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms. Firefox currently only supports the Large-Allocation header in our 32-bit Windows builds, as memory fragmen...
Firefox user agent string reference - HTTP
notes for applications, vendors, and extensions Prior to Firefox 4 and Gecko 2.0, it was possible for extensions to add user agent parts through the general.useragent.extra.identifier preferences, (see the obsolete User Agent Strings Reference). But that has not been possible since bug 581008. In the past, specific plug-ins, add-ons or extensions added user agent parts to notify sites they were installed. The recommended way to do this, if it's absolutely necessary (remember that it slows down every request) is to set a custom HTTP header. See Also Firefox OS User Agent String (blog post w/bug 777710 reference) Final User Agent string for Firefox 4 (blog post) Recommendations on sniffing the UA string for cross-browser support window.navigator.userAgent Add Android version to Fennec UA ...
Atomics - JavaScript
Unlike the other global objects, Atomics is not a constructor. You cannot use it with a new operator or invoke the Atomics object as a function. All properties and methods of Atomics are static (as is the case with the Math object, for example). Atomic operations When memory is shared, multiple threads can read and write the same data in memory. ...
prefer_related_applications - Web app manifests
If omitted, prefer_related_applications defaults to false. ...
related_applications - Web app manifests
Such applications are intended to be alternatives to the manifest's website that provides similar/equivalent functionality -- like the native app equivalent. Note: Developer can specify that the native applications are preferred over the web application by setting prefer_related_applications to true. ...
serviceworker - Web app manifests
Examples "serviceworker": { "src": "./serviceworker.js", "scope": "/app", "type": "", "update_via_cache": "none" } Values Service worker contain the following values (only src is required): Member Description src The URL to download the service worker script from. This is the only required member of the serviceworker member. ...
start_url - Web app manifests
No The start_url member is a string that represents the start URL of the web application -- the prefered URL that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen). Note: The start_url member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards. Examples Absolute URL "start_url": "https://example.com" Relative URL If the URL is relative, the manifest URL is used as the base URL to resolve it. "start_url": "../startpoint.html" Specification Specification Status Comment Feedback Web App ManifestThe definition of 'start_url' in that specification. Working Draft ...
Web app manifests
Web app manifests are part of a collection of web technologies called progressive web apps (PWAs), which are websites that can be installed to a device's homescreen without an app store. Unlike regular web apps with simple homescreen links or bookmarks, PWAs can be downloaded in advance and can work offline, as well as use regular Web APIs. The web app manifest provides information about a web application in a JSON text file, necessary for the web app to be downloaded and be presented to the user similarly to a native app (e.g., be installed on the homescreen of a device, providing users with quicker access and a richer experience). PWA manifests include its name, author, icon(s), version, description, and list of all the necessary resources (among other things). Can PWA manifest contain c...
Web audio codec guide - Web media technologies
...
Web video codec guide - Web media technologies
Maintaining organization MPEG / ITU Specification https://mpeg.chiariglione.org/standards/mpeg-4/advanced-video-coding https://www.itu.int/rec/T-REC-H.264 Licensing Proprietary with numerous patents. Commercial use requires a license. Note that multiple patent pools may apply. [1] Firefox support for AVC is dependent upon the operating system's built-in or preinstalled codecs for AVC and its container in order to avoid patent concerns. H.263 ITU's H.263 codec was designed primarily for use in low-bandwidth situations. In particular, its focus is for video conferencing on PSTN (Public Switched Telephone Networks), RTSP, and SIP (IP-based videoconferencing) systems. Despite being optimized for low-bandwidth networks, it is fairly CPU intensive and may not per...
Codecs used by WebRTC - Web media technologies
odecs Codec name Profile(s) Browser compatibility VP8 -- Chrome, Edge, Firefox, Safari (12.1+) AVC / H.264 Constrained Baseline (CB) Chrome (52+), Edge, Firefox[1], Safari [1] Firefox for Android 68 and later do not support AVC (H.264) anymore. This is due to a change in Google Play store requirements that prevent Firefox from downloading and installing the OpenH264 codec needed to handle H.264 in WebRTC connections. See this article on SUMO for details. For details on WebRTC-related considerations for each codec, see the sub-sections below by following the links on each codec's name. Complete details of what video codecs and configurations WebRTC is required to support can be found in RFC 7742: WebRTC Video Processing and Codec Requirement...
Progressive web app structure - Progressive web apps (PWAs)
wa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesImages = []; for(var i=0; i<games.length; i++) { gamesImages.push('data/img/'+games[i].slug+'.jpg'); } var contentToCache = appShellFiles.concat(gamesImages); The next block installs the service worker, which then actually caches all the files contained in the above list: self.addEventListener('install', function(e) { console.log('[Service Worker] Install'); e.waitUntil( caches.open(cacheName).then(function(cache) { console.log('[Service Worker] Caching all: app shell and content'); return cache.addAll(contentToCache); }) ); }); Last of all, the s...
PWA developer guide - Progressive web apps (PWAs)
ogressive web applications (PWAs). For all other documentation about web development, which generally pertains to PWAs as well, see our primary web development documentation. --->>> Titles below are just for the list; give articles good SEO names and feel free to tweak those and this as needed... <<<--- Web app basics Introduction and getting started with PWA development some description Installing and uninstalling web apps An introductory guide to how a web app can be installed on the user's device... Using service workers to run offline description Alerting the user using notifications description Creating a web app from an existing site description Advanced topics Pushing data from the server to your web application some description Resource management description Inte...
Progressive loading - Progressive web apps (PWAs)
t approach -- offer a usable product no matter the device or platform, but be sure to enrich the experience to those using modern browsers. Final thoughts That's all for this tutorial series -- we went through the source code of the js13kPWA example app and learned about the use of progressive web apps features including an Introduction, PWA structure, offline availability with Service Workers, installable PWAs, and finally notifications. We also explained push with help from the Service Worker Cookbook. And in this article, we've looked into the concept of progressive loading, including an interesting example that makes use of the Intersection Observer API. Feel free to experiment with the code, enhance your existing app with PWA features, or build something entirely new on your own. PWAs giv...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
But instead of relying only on user actions, we can do more, using push messages and notifications to automatically re-engage and deliver new content whenever it is available. Two APIs, one goal The Push API and Notifications API are two separate APIs, but they work well together when you want to provide engaging functionality in your app. ...
The building blocks of responsive design - Progressive web apps (PWAs)
with an unsightly gap at the top of the screen in landscape mode. Changes the sizing of the control buttons (e.g. Take Picture, Delete Photo) so they don't look too big and sit properly on the screen. This results in the following layout: Note: Another solution with respect to orientation might be to just lock the orientation of your app, to portrait or landscape. If you are working on an installed app, you can easily do this with the orientation manifest field. If you want a solution that works across general web apps, you could use the Screen orientation API, and/or provide a message asking the user to rotate their screen if they are using the wrong orientation (for example, if window.innerWidth is larger than window.innerHeight, assume the game is landscape mode and show a "please rot...
<font-face-name> - SVG: Scalable Vector Graphics
Usage context CategoriesNonePermitted contentEmpty Attributes Global attributes Core attributes >> Specific attributes name DOM Interface This element implements the SVGFontFaceNameElement interface. ...
<font-face-src> - SVG: Scalable Vector Graphics
Usage context CategoriesFont elementPermitted contentOne or more of the following elements, in any order:<font-face-name>, <font-face-uri> Attributes Global attributes Core attributes Specific attributes None DOM Interface This element implements the SVGFontFaceSrcElement interface. ...
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
lter CSS property for SVG/HTML elements. 336 <font-face-format> Deprecated, Element, NeedsExample, Reference, SVG, SVG Font The <font-face-format> SVG element describes the type of font referenced by its parent <font-face-uri>. 337 <font-face-name> Deprecated, Element, NeedsExample, Reference, SVG, SVG Font The <font-face-name> element points to a locally installed copy of this font, identified by its name. 338 <font-face-src> Deprecated, Element, NeedsExample, Reference, SVG, SVG Font The <font-face-src> SVG element corresponds to the src descriptor in CSS @font-face rules. It serves as container for <font-face-name>, pointing to locally installed copies of this font, and <font-face-uri>, utilizing remotely defined fonts. 339 ...
SVG In HTML Introduction - SVG: Scalable Vector Graphics
s that the aspect ratio must be preserved by centering the picture in the available size, sizing to the maximum of the height or width and then cutting off any overflow. The style attribute pins the SVG element to the background of the form. Related Links Another SVG in HTML example: A swarm of motes Working example that works in both Mozilla and in Internet Explorer with Adobe's SVG Viewer installed. (For inline SVG to work in both Firefox and Internet Explorer it is necessary to serve documents with a different Content-Type to each browser. For this reason, if you're behind a proxy server that caches the page, the example wont work in the second browser you load it in because it will receive the wrong Content-Type.) ...
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
e the Download Actions window. 6. Try and load a local .svg file and this scripting across embed demo. If the files you attempt to load in step 6 work, then your problem was mimeTypes.rdf corruption. If they still don't work, then you operating system is the likely culprit. Fix for OS file associations Your OS may be associating the wrong media type with the .svg filename extension if you have installed an old program such as Photoshop Elements 1.0 and chose to install the *very* old Adobe SVG Viewer that comes bundled with it. This will set up the OS to associate the .svg filename extension with the incorrect media type "image/svg-xml" instead of "image/svg+xml". Microsoft Windows One way to fix this in Microsoft Windows is to start RegEdit (Start > Run > regedit) and search for "svg". Cha...
Insecure passwords - Web security
PS protocol is designed to protect user data from eavesdropping (confidentiality) and from modification (integrity) on the network. Websites that handle user data should use HTTPS to protect their users from attackers. If a website uses HTTP instead of HTTPS, it is trivial to steal user information (such as their login credentials). This was famously demonstrated by Firesheep. To fix this issue, install and configure an SSL/TLS certificate onto your server. There are various vendors offering free and paid certificates. If you are using a cloud platform, it may have its own ways of enabling HTTPS. Note on password reuse Sometimes websites require username and passwords but don't actually store data that is very sensitive. For example, a news site may save which news articles a user wants to go ...
Mixed content - Web security
mixed display content above, mixed active content is vulnerable to a few other attack vectors. In the mixed active content case, a man-in-the-middle attacker can intercept the request for the HTTP content. The attacker can also rewrite the response to include malicious JavaScript code. Malicious active content can steal the user's credentials, acquire sensitive data about the user, or attempt to install malware on the user's system (by leveraging vulnerabilities in the browser or its plugins, for example). The risk involved with mixed content does depend on the type of website the user is visiting and how sensitive the data exposed to that site may be. The webpage may have public data visible to the world or private data visible only when authenticated. If the webpage is public and has no sensi...
Transport Layer Security - Web security
n Web Services CloudFormation Elastic Load Balancer Using the configurator is a recommended way to create the configuration to meet your needs; then copy and paste it into the appropriate file on your server and restart the server to pick up the changes. The configuration file may need some adjustments to include custom settings, so be sure to review the generated configuration before using it; installing the configuration file without ensuring any references to domain names and the like are correct will result in a server that just doesn't work. TLS 1.3 RFC 8446: TLS 1.3 is a major revision to TLS. TLS 1.3 includes numerous changes that improve security and performance. The goals of TLS 1.3 are: Remove unused and unsafe features of TLS 1.2. Include strong security analysis in the design.
Types of attacks - Web security
This article describes various types of security attacks and techniques to mitigate them. Click-jacking Click-jacking is the practice of tricking a user into clicking on a link, button, etc. that is other than what the user thinks it is. This can be used, for example, to steal login credentials or to get the user's unwitting permission to install a piece of malware. (Click-jacking is sometimes called "user interface redressing", though this is a misuse of the term "redress".) Cross-site request forgery (CSRF) Cross-site scripting (XSS) Cross-site scripting (XSS) is a security exploit which allows an attacker to inject into a website malicious client-side code. This code is executed by the victims and lets the attackers bypass access controls and impersonate users. According to the Open We...
WebAssembly Concepts - WebAssembly
and and then convert it into the binary format with any of several WebAssemby text-to-binary tools. For a simple guide on how to do this, see our Converting WebAssembly text format to wasm article. Writing Rust Targeting WebAssembly It is also possible to write Rust code and compile over to WebAssembly, thanks to the tireless work of the Rust WebAssembly Working Group. You can get started with installing the necessary toolchain, compiling a sample Rust program to a WebAssembly npm package, and using that in a sample web app, over at our Compiling from Rust to WebAssembly article. Using AssemblyScript For web developers who want to try WebAssembly without needing to learn the details of C or Rust, AssemblyScript will be the best option. It generates a small bundle and it's performance is slig...