Search completed in 1.34 seconds.
Common causes of memory leaks in extensions - Extensions
This page explains coding patterns that cause extension to cause memory leaks. Causes of zombie compartments Zombie compartments are a particular kind of memory leak. All zombie compartments in
extensions are caused by a failure to release resources appropriately in certain circumstances, such as when a window is closed, a page unloads, or an extension is disabled or removed. ...
...led or removed. While bug 695480 should prevent most of these compartment leaks, add-ons still need to be aware of the practices that caused these leaks, as the fix causes many add-ons which would have otherwise caused a leak to instead throw errors when attempting to access nodes from documents which no longer exist. Storing references to window objects and DOM nodes The most common problem is
extensions holding onto references to content windows for too long. For example, in XUL overlay code: var contentWindows = []; function inBrowserXulOverlay(contentWindow) { // forgetting or failing to pop the content window thing again contentWindows.push(contentWindow); } This will keep the content window compartments alive until the browser window is closed. Users often only open a single browser ...
... an unload event listener or by similar means. Another solution would be to use the setInterval()/setTimeout() instances content windows provide, but there is a big drawback with this idea: If the user disables JavaScript globally or locally (such as by using an add-on like NoScript), then using the content window functions won't work. Problems in bootstrapped (restartless) add-ons Bootstrapped
extensions use a bootstrap.js compartment. If you put a reference to anything within this compartment into a long-lived window object (such as browser.xul), JavaScript module or XPCOM component, the bootstrap.js compartment will become a zombie. For example, the following code snippets -- part of a bootstrap.js -- will leak: function leakref() {} function modifyDocument(document) { var a = document.crea...
... // will leak the whole bootstrap compartment. a.someProperty = leakref; } function modifyDocument2(document) { // The "body" DOM node holding a reference to leakref will prevent // that function object from being garbage collected and hence // will leak the whole bootstrap compartment. document.body.someProperty = leakref; } See also Kris Maglione's guide to cleaning up bootstrapped
extensions. Failing to clean up event listeners
Extensions can be disabled and removed by user actions, but it also happens when an add-on is updated. If a bootstrapped (restartless) extension fails to clean up event listeners when disabled or removed, the listeners will still reference the enclosing scope -- usually the bootstrap.js sandbox -- and therefore keep that scope (and its enclosing compartment)...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
Reasons why you might want to include C++ components in your extension include: Need for high-performance beyond what can be delivered by JavaScript code. Use of third-party libraries written in C or C++. Use of Mozilla interfaces that are not exposed via XPCOM (e.g. NSPR). ...
...ly work effortlessly from then on. Maybe. On Other Platforms On other platforms, namely Linux and MacOS, the process is much easier. All the tools for building are available built-in, 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...
...Use only lowercase letters. You should see a bunch of other directories (inspector/, reporter/ and so forth) at the same level in the build tree. ...
...And 14 more matches
Chapter 1: Introduction to Extensions - Archive of obsolete content
ures are considered standard for web browsers these days? Perhaps things like fine-grained tab controls, mouse gestures, extensive toolbars and buttons, a feed reader, 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. 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. The Add-ons Manager handles the following tasks: Safely i...
...disabling them and offering a safe mode Confirms and runs updates Provides access to add-ons' settings dialogs Provides access to add-ons' support sites Development environment amenities Initially, there wasn't adequate documentation available, and extension developers were largely left to fend for themselves1; however, now there's a considerable store of knowledge. ...
...s Provides access to add-ons' settings dialogs Provides access to add-ons' support sites Development environment amenities Initially, there wasn't adequate documentation available, and extension developers were largely left to fend for themselves1; however, now there's a considerable store of knowledge. ...
...And 9 more matches
Getting Started with Firefox Extensions - Archive of obsolete content
As described in the quoted text, an extension is a small application that adds something new to one or more Mozilla applications. This tutorial focuses on
extensions for Firefox, but the same (or very similar) principles apply to creating
extensions for other applications such as Thunderbird, Seamonkey, and Flock. ...
... As described in the quoted text, an extension is a small application that adds something new to one or more Mozilla applications. This tutorial focuses on
extensions for Firefox, but the same (or very similar) principles apply to creating
extensions for other applications such as Thunderbird, Seamonkey, and Flock. ...
...oolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download. Taken from the
Extensions page. As described in the quoted text, an extension is a small application that adds something new to one or more Mozilla applications. This tutorial focuses on
extensions for Firefox, but the same (or very similar) principles apply to creating
extensions for other applications such as Thunderbird, Seamonkey, and Flock. It is also worth noting that there are differences between the definition of extension and add-on. All
extensions are add-ons, but add-ons can also be themes, plugins, or language packs. This tutorial is about extension development, but themes and ...
...And 5 more matches
JS_PreventExtensions
Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. obj JS::HandleObject Object to be made non-extensible. result JS::ObjectOpResult & (out parameter) Receives the result of the operation. ...
... succeeded bool * Outparam indicating, on JSAPI success, whether the object is now non-extensible. Obsolete since JSAPI 39 Description All JavaScript objects recognize the concept of extensibility: whether new properties may be added to the object. In some situations, it may be convenient to prohibit new properties. ...
...uccess, whether the object is now non-extensible. Obsolete since JSAPI 39 Description All JavaScript objects recognize the concept of extensibility: whether new properties may be added to the object. In some situations, it may be convenient to prohibit new properties. In JavaScript this may be accomplished using the Object.prevent
Extensions method. The similar JSAPI method is JS_Prevent
Extensions. The failure-mode information below is new as of SpiderMonkey 36. Before then, JS_Prevent
Extensions did not accept a succeeded argument; in those cases where *succeeded would be set to false, JS_Prevent
Extensions would throw a TypeError and return false. Unlike Object.prevent
Extensions, JS_Prevent
Extensions doesn't necessarily throw a TypeError if the object couldn't be made non-extensible. ...
...And 5 more matches
Object.preventExtensions() - JavaScript
The Object.prevent
Extensions() method prevents new properties from ever being added to an object (i.e. prevents future
extensions to the object). 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. Syntax Object.prevent
Extensions(obj) Parameters obj The object which should be made non-extensible. Return value The object being made non-extensible. Description An object is extensible if new properties can be added to it. Object.prevent
Extensions() marks an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Note that the properties ...
...longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Note that the properties of a non-extensible object, in general, may still be deleted. Attempting to add new properties to a non-extensible object will fail, either silently or by throwing a TypeError (most commonly, but not exclusively, when in strict mode). Object.prevent
Extensions() only prevents addition of own properties. Properties can still be added to the object prototype. This method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a TypeError. This behavior is specific to the internal [[prototype]] property, other properties of the target object will remain mutable. There is no way to make an object extensible again onc...
...be added to the object prototype. This method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a TypeError. This behavior is specific to the internal [[prototype]] property, other properties of the target object will remain mutable. There is no way to make an object extensible again once it has been made non-extensible. ...
...And 5 more matches
PublicKeyCredentialCreationOptions.extensions - Web APIs
extensions, an optional property of the PublicKeyCredentialCreationOptions dictionary, is an object providing the client
extensions and their input values.
Extensions are values requesting additional processing by the client and by the authenticator. For instance,
extensions may be used for: backward compatibility with the legacy FIDO JS API, knowing the user verification process, etc. Note: An analogous option exists for the fetching operation (navigators.credentials.get()), see PublicKeyCredentialRequestOptions.
extensions. Syntax
extensions = publicKeyCredentialCreationOptions.
extensions Value An object with various keys and values. Here is the current (as of March 2019) list of potential
extensions which may be used during the registration operation. Warning! As of June 2020, ...
...Firefox does not seem to support any extension. Also Chrome doesn't plan to support any other extension in future Extension identifier Type Description authnSel Array of BufferSource Authenticator selection. Restricts the list of authenticator models which may be used. ...
... doesn't plan to support any other extension in future Extension identifier Type Description authnSel Array of BufferSource Authenticator selection. Restricts the list of authenticator models which may be used. If no matching authenticator is available, the credential is still generated with another available authenticator. exts Boolean Supported
extensions. If true, the client outputs an array of strings containing the
extensions which are supported by the authenticator. uvi Boolean User verification index. If true, the client outputs an ArrayBuffer which contains a value uniquely identifying a user verification data record. In other words, this may be used server side to check if the current operation is based on the same biometric ...
...And 3 more matches
Using WebGL extensions - Web APIs
WebGL, like its sister APIs (OpenGL and OpenGL ES), supports
extensions. A complete list of
extensions is available in the khronos webgl extension registry. Note: In WebGL, unlike in other GL APIs,
extensions are only available if explicitly requested. Canonical extension names, vendor prefixes and preferences
Extensions may be supported by browser vendors before being officially ratified (but only when they are in draft stage). In that case, their name can be prefixed by the vendor prefix (MOZ_, WEBKIT_, etc.) or the extension is only available once a browser preference has been toggled. ...
...uested. Canonical extension names, vendor prefixes and preferences
Extensions may be supported by browser vendors before being officially ratified (but only when they are in draft stage). In that case, their name can be prefixed by the vendor prefix (MOZ_, WEBKIT_, etc.) or the extension is only available once a browser preference has been toggled. If you wish to work with the bleeding edge of
extensions, and want to keep working on upon ratification (assuming, of course, that the extension doesn't change in incompatible ways), that you query the canonical extension name as well as the vendor extension name. For instance: var ext = ( gl.getExtension('OES_vertex_array_object') || gl.getExtension('MOZ_OES_vertex_array_object') || gl.getExtension('WEBKIT_OES_vertex_array_object') ); Note th...
...ange in incompatible ways), that you query the canonical extension name as well as the vendor extension name. For instance: var ext = ( gl.getExtension('OES_vertex_array_object') || gl.getExtension('MOZ_OES_vertex_array_object') || gl.getExtension('WEBKIT_OES_vertex_array_object') ); Note that, vendor prefix have been discouraged more and more and thus most browser implement experimental
extensions behind a feature flag rather than vendor prefix. The feature flags are: webgl.enable-draft-
extensions in Firefox chrome://flags/#enable-webgl-draft-
extensions in Chromium based browsers (Chrome, Opera). Naming conventions WebGL
extensions are prefixed with "ANGLE", "OES", "EXT" or "WEBGL". These prefixes reflect origin and intent: ANGLE_:
Extensions that are written by the ANGLE librar...
...And 3 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
Draft This page is not complete. << Previous This document was authored by Taro (btm) Matsuzawa and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Matsuzawa-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008.) This chapter discusses tools to assist in developing
extensions. Tools for extension developers FIXME: Are we sure we'll talking about Venkman since it's not well maintained FIXME: We maybe should talk about Firebug and Chromebug FIXME: and what about Console 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 ...
... maintained FIXME: We maybe should talk about Firebug and Chromebug FIXME: and what about Console 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...
...om the above URL and relaunch Firefox. Starting up Select "JavaScript Debugger" from the Tools menu. Targeting JavaScript for debugging. When Venkman first launches, it can only debug the file currently open in your web browser. This is because a lot of JavaScript files can 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, ac...
...And 2 more matches
Overlay extensions - Archive of obsolete content
The privileged JavaScript APIs described here can still be used in these newer types of add-ons. ...
...The privileged JavaScript APIs described here can still be used in these newer types of add-ons. ...
...The privileged JavaScript APIs described here can still be used in these newer types of add-ons. XUL School XUL School is a comprehensive add-on development tutorial, focusing on Firefox extension development but mostly applicable to other Gecko-based applications. ...
...And 2 more matches
Performance best practices in extensions - Archive of obsolete content
That means every time a window opens, your extension can have an impact on how long it takes the user to see the content they're trying to view. ...
...This article offers some best practices and suggestions that can not only improve the performance and speed of your extension, but also of Firefox itself. Improving startup performance
Extensions are loaded and run whenever a new browser window opens. That means every time a window opens, your extension can have an impact on how long it takes the user to see the content they're trying to view. ...
...That means every time a window opens, your extension can have an impact on how long it takes the user to see the content they're trying to view. There are several things you can do to reduce the amount of time your extension delays the appearance of the user's desired content. ...
...And 2 more matches
Security best practices in extensions - Archive of obsolete content
velopers to promote best practices in securing your extension. Your goal is to keep your users safe. Some items mentioned are strict guidelines, meaning that if you don't follow them then your add-on will not be approved on Mozilla add-ons. Other items are recommendations. The difference will be clearly flagged. This is written from the perspective of a Firefox extension, but most items apply to
extensions for other Mozilla-based applications such as Thunderbird or SeaMonkey. Web content handling In general the best way to ensure that the browser is not compromised when you load content is to make sure it does not have those privileges. A more detailed explanation of this process is in Displaying web content in an extension without security issues. The privileges that a document gets also depend...
...k into the Web browser and run malicious code. The main way to do this is by creating an iframe or browser element in the sidebar, and loading your content there. Give the element a type="content" attribute, which essentially sandboxes the code there and blocks callback rights into chrome. Using eval() in an extension Using the built-in JavaScript eval function is frowned upon in the context of
extensions. While there are some legitimate use-cases, most of the time there are safer alternatives. This blog post offers some excellent reasons not to use eval(). Sandboxed HTTP connections The main purpose of sandboxed HTTP connections is to interact with a web service, without interfering with the cookies set in the browser by that service/site. For example, if you are loading pictures or other data ...
...er is not affected. For a real world use case, take a look at this blog post. Handling of logins and passwords There are various ways of storing data in Firefox, but for user logins and passwords, you should use the Login Manager. This is the same store that holds the logins from web pages, and passwords can only be retrieved using a site/username pairing known to the author. The convention for
extensions is to use a chrome url for the site identifier, to avoid clashes with logins for sites. It could be the case that your extension provides a different tool or tools for services on your site. This approach is preferable because it provides users with a familiar interface for interacting with logins, via the Firefox Password Manager. When users clear logins using the "Clear Recent History" option,...
...And 2 more matches
bootstrap.js - Extensions
The bootstrap.js script should contain several specific functions, which are called by the browser to manage the extension. The script 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. ...
...ript should contain several specific functions, which are called by the browser to manage the extension. The script 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. ...
...ral specific functions, which are called by the browser to manage the extension. The script 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. ...
...And 2 more matches
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
Draft This page is not complete. << PreviousNext >> This document was authored by Hiroshi Shimoda of Clear Code Inc. and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Shimoda-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008). Before we dive into a thorough explanation, we'll quickly introduce the technologies used to develop Firefox
extensions. We will also look at the minimum knowledge you'll need to have in order to develop for Firefox. Technologies used to develop Firefox
extensions Firefox and its
extensions are both based on and developed with technologies widely used on the web. Its structure is similar to that of the dynamic HTML used on some web pages, or the HTML applications used on Windows. If you've had experience developi...
... The role of each technology Firefox is largely built using four technologies: XUL, CSS, JavaScript, and XPCOM.
Extensions are also built using these four technologies. ...
...web. Its structure is similar to that of the dynamic HTML used on some web pages, or the HTML applications used on Windows. If you've had experience developing with dynamic HTML, you'll probably find it relatively easy to pick up the knowledge you'll need to develop Firefox
extensions. The role of each technology Firefox is largely built using four technologies: XUL, CSS, JavaScript, and XPCOM.
Extensions are also built using these four technologies. Figure 1: role of each technology in Firefox In addition to these technologies, extension development will require you to learn about how to confer privileges to overcome security restrictions on code that you write, and how to embed your code into the Firefox UI. These issues are discussed in Chapter 5. The minimum knowledge required In the in...
...s has more recently led to a re-evaluation of JavaScript as a programming language. JavaScript is a prototype-based object-oriented language, and as shown in Listing 3, also permits independent class definitions. It does not have strict typing like Java, making it extremely flexible and giving it qualities that in some senses could be considered similar to Lisp. Firefox 3.5 includes a number of
extensions to the specification standardized in ECMAScript 3rd Edition, and can use JavaScript 1.7 and JavaScript 1.8. Listing 3: An example of a class definition in JavaScript function MyClass() { } MyClass.prototype = { property1 : true, property2 : 'string', method : function() { alert('Hello, world!'); } }; var obj = new MyClass(); obj.method(); DOM: An API for manipulating XML documents...
handler.preventExtensions() - JavaScript
The handler.prevent
Extensions() method is a trap for Object.prevent
Extensions(). 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. Syntax const p = new Proxy(target, { prevent
Extensions: function(target) { } }); Parameters The following parameter is passed to the prevent
Extensions() method. this is bound to the handler. target The target object. Return value The prevent
Extensions() method must return a boolean value. Description The handler.prevent
Extensions() method is a trap for Object.prevent
Extensions(). ...
... { } }); Parameters The following parameter is passed to the prevent
Extensions() method. this is bound to the handler. target The target object. Return value The prevent
Extensions() method must return a boolean value. Description The handler.prevent
Extensions() method is a trap for Object.prevent
Extensions(). Interceptions This trap can intercept these operations: Object.prevent
Extensions() Reflect.prevent
Extensions() Invariants If the following invariants are violated, the proxy will throw a TypeError: Object.prevent
Extensions(proxy) only returns true if Object.isExtensible(proxy) is false. Examples Trapping of prevent
Extensions The following code traps Object.prevent
Extensions(). ...
...tercept these operations: Object.prevent
Extensions() Reflect.prevent
Extensions() Invariants If the following invariants are violated, the proxy will throw a TypeError: Object.prevent
Extensions(proxy) only returns true if Object.isExtensible(proxy) is false. Examples Trapping of prevent
Extensions The following code traps Object.prevent
Extensions(). const p = new Proxy({}, { prevent
Extensions: function(target) { console.log('called'); Object.prevent
Extensions(target); return true; } }); console.log(Object.prevent
Extensions(p)); // "called" // false The following code violates the invariant. ...
...s The following code traps Object.prevent
Extensions(). const p = new Proxy({}, { prevent
Extensions: function(target) { console.log('called'); Object.prevent
Extensions(target); return true; } }); console.log(Object.prevent
Extensions(p)); // "called" // false The following code violates the invariant. const p = new Proxy({}, { prevent
Extensions: function(target) { return true; } }); Object.prevent
Extensions(p); // TypeError is thrown Specifications Specification ECMAScript (ECMA-262)The definition of '[[Prevent
Extensions]]' in that specification. ...
Reflect.preventExtensions() - JavaScript
The static Reflect.prevent
Extensions() method prevents new properties from ever being added to an object (i.e., prevents future
extensions to the object). It is similar to Object.prevent
Extensions(), but with some differences. 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. Syntax Reflect.prevent
Extensions(target) Parameters target The target object on which to prevent
extensions. Return value A Boolean indicating whether or not the target was successfully set to prevent
extensions. Exceptions A TypeError, if target is not an Object. ...
...ct, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax Reflect.prevent
Extensions(target) Parameters target The target object on which to prevent
extensions. Return value A Boolean indicating whether or not the target was successfully set to prevent
extensions. Exceptions A TypeError, if target is not an Object. Description The Reflect.prevent
Extensions() method allows you to prevent new properties from ever being added to an object (i.e., prevents future
extensions to the object). It is similar to Object.prevent
Extensions(). Examples Using Reflect.prevent
Extensions() See also Object.prevent
Extensions(). // Objects are extensible by default. let empty = {} Reflect.isExtensible(empty) // === true // ...but that can be changed. Reflect.preve...
... method allows you to prevent new properties from ever being added to an object (i.e., prevents future
extensions to the object). It is similar to Object.prevent
Extensions(). Examples Using Reflect.prevent
Extensions() See also Object.prevent
Extensions(). // Objects are extensible by default. let empty = {} Reflect.isExtensible(empty) // === true // ...but that can be changed. Reflect.prevent
Extensions(empty) Reflect.isExtensible(empty) // === false Difference from Object.prevent
Extensions() If the target argument to this method is not an object (a primitive), then it will cause a TypeError. ...
...so Object.prevent
Extensions(). // Objects are extensible by default. let empty = {} Reflect.isExtensible(empty) // === true // ...but that can be changed. Reflect.prevent
Extensions(empty) Reflect.isExtensible(empty) // === false Difference from Object.prevent
Extensions() If the target argument to this method is not an object (a primitive), then it will cause a TypeError. With Object.prevent
Extensions(), a non-object target will be coerced to an object. Reflect.prevent
Extensions(1) // TypeError: 1 is not an object Object.prevent
Extensions(1) // 1 Specifications Specification ECMAScript (ECMA-262)The definition of 'Reflect.prevent
Extensions' in that specification. ...
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 the ...
... 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 the application does is call into this script file; the extension is responsible for adding and removing its user interface and handling any other setup and shutdown tasks it requires. This article discusses how bootstrapped
extensions work. See this tutorial on converting from an overlay extension to restartless for a practical step by step guide to migrating. The startup and shutdown process A key feature of bootstrapped
extensions is that they must be able to start up and shut down on demand by the application. When the extension's startup() function is called, it must manually inject its user interface and other behavior ...
...ded. The page is based on and expanded from Dave Garrett's step-by-step guide to convert an old overlay based extension into a restartless addon. Dave Townsend provides a basic code base to load UI for each opened window in a bootstrapped extension. Mark Finkle provides some simple example code for restartless add-ons in mobile Firefox, adding resources (like the options window) to bootstrapped
extensions and using default preferences without a default/preferences/prefs.js file. Kris Maglione writes about the requirements for the cleanup procedures in bootstrapped
extensions. Edward Lee shows off some helpful coding patterns and examples you can use in your bootstrapped add-on. Documentation for Inline Options in Firefox 7 and later. ...
Extensions - Archive of obsolete content
Extensions are built using the same methods as any Mozilla-based extension. Since Prism is a totally separate host application, there are some Prism-specific issues that you need to handle 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. ...
...install manifest changes, you may want to expose your extension into the Prism UI. 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. 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 in...
...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 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. ...
PublicKeyCredentialRequestOptions.extensions - Web APIs
extensions, an optional property of the PublicKeyCredentialRequestOptions dictionary, is an object providing the client
extensions and their input values.
Extensions are values requesting additional processing by the client and by the authenticator. For instance,
extensions may be used for: backward compatibility with the legacy FIDO JS API, knowing the user verification process, etc. Note: An analogous option exists for the creation operation (navigators.credentials.create()), see PublicKeyCredentialCreationOptions.
extensions. Syntax
extensions = publicKeyCredentialRequestOptions.
extensions Value An object with various keys and values. Here is the current (as of March 2019) list of potential
extensions which may be used during the registration operation. Warning! As of June 2020...
...t outputs a Coordinates object representing the geolocation of the authenticator. uvm Boolean User verification method. If true, the client outputs an array of arrays with 3 values containing information about how the user was verified (e.g. fingerprint, pin, pattern), how the key is protected, how the matcher (tool used for the authentication operation) is protected. Note:
Extensions are optional and different browsers may recognize different
extensions. All
extensions are optional for the client to process them: if a browser does not know a given extension, that will not cause any failure, the extension simply will not be processed. Examples var options = {
extensions: { uvm: true, loc: false, txAuthSimple: "Could you please verify yourself?" }, challeng...
... Recommendation Initial definition. ...
requiredExtensions - SVG: Scalable Vector Graphics
Language
extensions are capabilities within a user agent that go beyond the feature set defined in this specification. Each extension is identified by an URL reference. Usage notes Value <list-of-
extensions> Default value None Animatable No <list-of-
extensions> The value is a list of references (IRI references in SVG 1, URL References in SVG 2) which identify the required
extensions, with the individual values separated by white space. Determines whether all of the named
extensions are supported by the user agent. ...
...tension is identified by an URL reference. Usage notes Value <list-of-
extensions> Default value None Animatable No <list-of-
extensions> The value is a list of references (IRI references in SVG 1, URL References in SVG 2) which identify the required
extensions, with the individual values separated by white space. Determines whether all of the named
extensions are supported by the user agent. If all of the given
extensions are supported, then the attribute evaluates to true; otherwise, the current element and its children are skipped and thus will not be rendered. Note: If a given extension reference contains white space within itself, that white space must be escaped. required
Extensions is often used in conjunction with the <switch> element. If the...
...ring value is given, the attribute evaluates to "false". The IRI names for the extension should include versioning information, such as "http://example.org/SVGExtensionXYZ/1.0", so that script writers can distinguish between different versions of a given extension. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'required
Extensions' in that specification. Candidate Recommendation IRIs replaced with URLs Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'required
Extensions' in that specification. Recommendation Initial definition ...
Installing Extensions and Themes From Web Pages - Archive of obsolete content
Extension and web authors are encouraged to use the method described below to install XPIs, as it provides the best experience to users. ...
... function:hash value, for example, sha1:28857e60d043447c5f4550853f2d40770b326a13. toString() The toString() property should return the XPI URL, for compatibility with Firefox browsers older than version 1.0, and other applications such as Seamonkey. Themes Pretty much everything I've described applies to themes too, except you'll use the installChrome function. Because so many sites installed
extensions by direct-linking the XPI file and relying on content handling to invoke the confirmation UI, many sites are (incorrectly) doing so for theme JAR files too and wondering why they aren't auto-detected and installed. Well, XPI is a Mozilla-specific extension and so we can have special handling for it, but JAR is not - not all .jar files are Firefox themes, so if you click on a .jar link you'll be s...
Java in Firefox Extensions - Archive of obsolete content
These 2 objects let you make use of the standard JDK classes, e.g., var aJavaList = new java.util.LinkedList(); If you want to load your own JARs, then you can create your own Java class loader. The following technique only works in JavaScript code linked from or contained in XUL files. If you wish to call Java code from within JavaScript code that implements some XPCOM components, at this ...
...); policy.addPermission(new java.security.AllPermission()); for (var j=0; j < urls.length; 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 /...
Using workers in extensions - Archive of obsolete content
If you haven't already created an extension, or would like to refresh your 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 Updating an extension to support multiple Mozilla applications Download the sample You may download the complete example: Download the example. ...
...This worker object has access to js-ctypes, which standard workers do not have. ...
Community - Extensions
If you know of useful mailing lists, newsgroups, forums, or other communities related to extension development, please link to them here. ...
...g lists, newsgroups, forums, or other communities related to extension development, please link to them here. ...
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google Chrome, Opera Browser, and Microsoft Edge . ...
... Web
Extensions is a cross-browser system for developing browser
extensions in Firefox. This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google Chrome, Opera Browser, and Microsoft Edge . ...
Thunderbird extensions
This documention series focuses on Thunderbird. Need personalized help? See Community / Communications. Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. ...
... Play with a demo add-on that exercises some more advanced Thunderbird-specific features Want to do even more? Don't reinvent the wheel: steal from the thunderbird-stdlib project (doc here). Functions for dealing with messages (delete, archive, change tags, etc.) are included. MailUtils.js. Haven't found what you need? Read the Thunderbird how-tos; they contain many recipes for things
extensions want to do. Still stuck? Ask in a community communication channel on the right. Feeling really brave? Read the source using a fancy interface; you can often find tests that demonstrate what you're trying to achieve. The Gloda database Thunderbird has a subsystem called Gloda. Gloda stands for << Global Database >>, and creates Thunderbird-wide relations between objects. ...
Encrypted Media Extensions API - Web APIs
Interfaces MediaKeyMessageEvent Contains the content and related data when the content decryption module (CDM) generates a message for the session. MediaKeys Represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback. MediaKeySession Represents a context for message exchange with a content decryption module (CDM). MediaKeyStatusMap Is a read-only map of media key statuses by key IDs. MediaKeySystemAccess Provides access to a Key System for decryption and/or a content protection provider. ...
...th a content decryption module (CDM). ...
Microsoft API extensions - Web APIs
Note: These APIs will only work in Microsoft applications, and are not on a standards track. ...
... Note: These APIs will only work in Microsoft applications, and are not on a standards track. ...
WebGLRenderingContext.getSupportedExtensions() - Web APIs
The WebGLRenderingContext.getSupported
Extensions() method returns a list of all the supported WebGL
extensions. Syntax gl.getSupported
Extensions(); Return value An Array of strings with all the supported WebGL
extensions. Examples var canvas = document.getElementById('canvas'); gl = canvas.getContext('webgl'); var
extensions = gl.getSupported
Extensions(); // Array [ 'ANGLE_instanced_arrays', 'EXT_blend_minmax', ... ] See also the WebGLRenderingContext.getExtension() method to get a specific extension object. WebGL
extensions Extensions for the WebGL API are registered in the WebGL Extension Registry. The current
extensions are: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_float EXT_color_buffer_half_float EXT_disjoint_timer_query EXT_float_blend EXT_frag_depth EX...
... Recommendation Initial definition. ...
Downloading JSON and JavaScript in extensions - Archive of obsolete content
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. The practice is dangerous because the decoded JavaScript has full chrome privileges and could perform some nasty actions. How could the JavaScript an extension downloads perform nasty actions? Fairly easy if the webserver where the JavaScript is hosted were to be hijacked or compromised. It happens to the best of us. ...
Extensions support in SeaMonkey 2 - Archive of obsolete content
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. ...
Extensions - Archive of obsolete content
s a <menupopup>. Adding a new menuitem You might wish to add a new item to one of the menus. This can be done by overlaying the popup to append the item to. For a list of the ids of the menus for Firefox, see Firefox Menus. For example, to add an item to the end of the Tools menu, use the following: <menupopup id="menu_ToolsPopup"> <menuitem label="Thesaurus"/> </menupopup> Note that other
extensions may be adding their own items into the same menus. Because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied. As you cannot predict this order, you should not rely on any menuitems being in particular positions in the presence of other
extensions. Modifying the context menu An ...
Microsoft JavaScript extensions - Archive of obsolete content
Warning: These APIs will only work in Microsoft applications, and are not on a standards track. Microsoft browsers (Internet Explorer, and in a few cases, Microsoft Edge) support a number of special Microsoft
extensions to the otherwise standard JavaScript APIs. Objects ActiveXObject Debug Enumerator VBArray Functions GetObject ScriptEngine ScriptEngineBuildVersion ScriptEngineMajorVersion ScriptEngineMinorVersion Statements @cc-on @if @set Other Date.getVarDate() Error.description Error.number Error.stackTraceLimit ...
Transcoding assets for Media Source Extensions - Web APIs
This article takes you through the requirements and shows you a toolchain you can use to encode your assets appropriately. Getting started The first and most important step is to ensure that your files are comprised of a container and codec that users' browsers support. Depending on the codec, you might need to fragment the file to comply with the ISO BMFF spec. (Optional) If you decide to use Dynamic Adaptive Streaming over HTTP (DASH) for adaptive bitrate streaming, you need to transcode your assets into multiple resolutions. ...
WebSocket.extensions - Web APIs
The WebSocket.
extensions read-only property returns the
extensions selected by the server. This is currently only the empty string or a list of
extensions as negotiated by the connection. Syntax var
extensions = aWebSocket.
extensions; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'WebSocket:
extensions' in that specification. Living Standard Initial definition ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
Mozilla-only properties and pseudo-classes (avoid using on websites) Note: These properties and pseudo-classes will only work in Mozilla applications such as Firefox, and are not on a standards track. Some of them apply only to XUL elements. ...
WebKit CSS extensions - CSS: Cascading Style Sheets
Most -webkit- prefixed properties also work with an -apple- prefix. A few are prefixed with -epub-. WebKit-only properties Note: Avoid using on websites. These properties will only work in WebKit applications. ...
Index - Archive of obsolete content
ser. Currently, these are only supported on Firefox Mobile and Firefox OS. See Displaying notifications for an example. 7 Window: deviceproximity event Sensors, events The deviceproximity event is fired when fresh data is available from a proximity sensor. 8 Window: userproximity event Sensors, events No summary! 9 Add-ons Add-ons, Archive,
Extensions Archived add-ons documentation. 10 Add-on SDK Add-on SDK, Jetpack No summary! 11 Builder No summary! 12 Guides Add-on SDK No summary! 13 Content Scripts Add-on SDK Many add-ons need to access and modify the content of web pages. But the main add-on code doesn't get direct access to web content. Instead, SDK...
... 14 Communicating With Other Scripts No summary! 15 Communicating using "port" To enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object. ...
..."port" To enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object. ...
...And 157 more matches
Index - Web APIs
empty string. 191 AudioTrack.language API, Audio, AudioTrack, HTML DOM, Language, Localization, Media, Property, Read-only, Reference, Translated, Translation, track The read-only AudioTrack property language returns a string identifying the language used in the audio track. 192 AudioTrack.sourceBuffer API, Audio, AudioTrack, HTML DOM, MSE, Media, Media Source
Extensions, Property, Read-only, Reference, SourceBuffer, track The read-only AudioTrack property sourceBuffer returns the SourceBuffer that created the track, or null if the track was not created by a SourceBuffer or the SourceBuffer has been removed from the MediaSource.sourceBuffers attribute of its parent media source. 193 AudioTrackList API, Audio, AudioTrackList, HTML DOM, Interfa...
... 218 AuthenticatorAssertionResponse.signature API, AuthenticatorAssertionResponse, Property, Reference, Web Authentication API, WebAuthn The signature read-only property of the AuthenticatorAssertionResponse interface is an ArrayBuffer object which is the signature of the authenticator for both AuthenticatorAssertionResponse.authenticatorData an...
...in Quirks mode or Standards mode. 875 Document.contentType API, DOM, Document, MIME, Property, Read-only, Reference The Document.contentType read-only property returns the MIME type that the document is being rendered as. This may come from HTTP headers or other sources of MIME information, and might be affected by automatic type conversions performed by either the browser or
extensions. 876 Document.cookie API, DOM, Document, HTML DOM, JS, NeedsMarkupWork, Reference, Storage, cookie The Document property cookie lets you read and write cookies associated with the document. It serves as a getter and setter for the actual values of the cookies. 877 Simple cookie framework Cookies, cookie As cookies are just specially formatted strings it i...
...And 136 more matches
Index
Found 1275 pages: # Page Tags and summary 1 XPCOM Add-ons,
Extensions, Landing, Mozilla, XPCOM XPCOM 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++. 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 severa...
...s to upgrade to a compiler that does not have the same ABI as the current version, any built component may fail. It is a possiblity that is introduced when upgrading to a new compiler without recompiling everything. Effectively, it is a different platform. 5 Bundling multiple binary components Binary XPCOM components are sometimes required to implement low-level features for
extensions. Since binary components are linked against a single Gecko SDK, a dependency to a particular version of Gecko is created. If the component uses only "frozen" XPCOM interfaces, there is a good chance the same binary component will work with different versions of Gecko (version 1.8 and 1.9, for example). The more likely case is that the component uses "unfrozen" interfaces and those interfaces can ...
...ications with Mozilla already provides a tutorial for making a simple JavaScript or C++ component (implementing the nsISimple interface). Here is how to make the same component in Python using PyXPCOM. 7 Fun With XBL and XPConnect XBL, XPCOM, XPCOM:Language Bindings, XPConnect No summary! 8 Generating GUIDs Add-ons, Developing Mozilla, Developing_Mozilla:Tools,
Extensions, Tools, XPCOM GUIDs are used in Mozilla programming for identifying several types of entities, including XPCOM Interfaces (this type of GUIDs is callled IID), components (CID), and legacy add-ons--like
extensions and themes--that were created prior to Firefox 1.5. Add-ons can (and should) be identified with IDs of the form extensionname@organization.tld since Firefox 1.5. 9 Gener...
...And 41 more matches
Enhanced Extension Installation - Archive of obsolete content
ion type is just an integration hook that has no meaningful UI presence. Extension installation and registration is also prohibitively difficult/annoying for developers, who are forced to either dangerously hand-edit all the appropriate manifest files, or package their code as a XPI and install it that way every time they make a change. ...
.../annoying for developers, who are forced to either dangerously hand-edit all the appropriate manifest files, or package their code as a XPI and install it that way every time they make a change. The State of the World Install Locations In Firefox 1.0
Extensions can be installed into only two locations: The Firefox user's profile directory directory, e.g. ...
...priate manifest files, or package their code as a XPI and install it that way every time they make a change. The State of the World Install Locations In Firefox 1.0
Extensions can be installed into only two locations: The Firefox user's profile directory directory, e.g. ~/.mozilla/firefox/abcdefgh.default/
extensions/ The Firefox application directory, e.g. ...
...And 24 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
XPCOM. In this chapter, we'll discuss how to put them together to actually build an extension. An easier method of building a Firefox/Thunderbird Addon for developers who are well-acquainted with IDEs like Netbeans, Eclipse, etc. is to use Netbeans (IDE from Sun Microsystems) and Foxbeans (Plugin for Netbeans, by TeeSoft). Setting up your development environment In order to develop (and test)
extensions in a most convenient way it is recommended to apply some changes to Firefox. In the following you will find a brief description how to do so; a more detailed one can be found under Setting up an extension development environment. Create a development profile If you want to partition your everyday browsing environment from your development environment in Firefox, set up a second profile for deve...
...e of the dump method for debugging. Refer to the "JavaScript debugging methods" sidebar. True javascript.options.showInConsole (present in Firefox 3.5+) Outputs JavaScript errors to the error console. True javascript.options.strict (present in Firefox 3.5+) Enforces strict error output from JavaScript True Table 1: Preferences to 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. Install the DOM Inspector The ...
... 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. 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:/...
...And 20 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. ...
...r, it seems that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
... that with XULRunner 1.9 the XULRunner directory is ignored, while the profile and application directories are checked. ...
...And 15 more matches
Index
tbox. 2 Account Provisioner The Account Provisioner is the dialog that first comes up when starting Thunderbird. The Account Provisioner gives the user the chance to search for and order a vanity email account from a list of partner providers. If the user already has an email account, the user can switch to the original account setup wizard. 3 Account examples
Extensions, thunderbird This article provides examples on accessing and manipulating Thunderbird accounts. Account interfaces provides an overview of the related interfaces. See An overview of Thunderbird components for a general description of the Thunderbird user interface and related programmatic interfaces. 4 Account interfaces Code snippets, Extension Development, thunderbird ...
...d accounts. Account interfaces provides an overview of the related interfaces. See An overview of Thunderbird components for a general description of the Thunderbird user interface and related programmatic interfaces. 4 Account interfaces Code snippets, Extension Development, thunderbird This page contains a list of the interfaces that you'll will most likely use when writing
extensions that work with email or other accounts. See Account examples for examples and code snippets. 5 Activity Manager Thunderbird 3, thunderbird The Activity Manager is a simple component that understands how to display a combination of user activity and history. The Activity Manager works in conjunction with the Interactive Status Bar to give the user notifications concerning what...
... is described on the Activity Manager page, and the Activity Manager examples page has code snippets. See nsIActivityManager.idl and nsIActivity.idl files for source documentation. 7 Address Book Interfaces MailNews, Mozilla, SeaMonkey, thunderbird This page contains a list of the interfaces that you'll will most likely hit when writing patches for the Address Book or writing
extensions. The complete list of interfaces for the address book can be found here. Address Book examples show how to perform various tasks and provide code snippets. 8 Address Book examples MailNews, SeaMonkey, thunderbird This article provides examples on accessing and manipulating Thunderbird address books. Address book interfaces provides an overview of the related interfaces. See A...
...And 14 more matches
Preferences - Archive of obsolete content
way you instantiate any XPCOM service. To get an nsIPrefBranch, either QueryInterface() the pref service (that will give you the root branch) or call nsIPrefService.getBranch() to get a sub-branch. Here are two examples: // Get the root branch var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); // Get the "
extensions.myext." branch var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); prefs = prefs.getBranch("
extensions.myext."); Simple types There are three types of preferences: string, integer, and boolean. Each entry in the preferences database (prefs.js) has one of those types. There are six methods in nsIPrefBranch t...
...ces.nsISupportsString, str); nsIPrefLocalizedString Another complex type supported by Mozilla is nsIPrefLocalizedString. It is similar to nsISupportsString, except that when there is no user value, getComplexValue() gets the default value from a locale file (thus making the default value localizable). It's easier to explain this by example. ...
...plexValue() gets the default value from a locale file (thus making the default value localizable). It's easier to explain this by example. Let's say you want to make the default value for the
extensions.myext.welcomemessage preference localizable. ...
...And 13 more matches
Index - Archive of obsolete content
s, XUL Reference An individual element of a statusbar. This is a special type of button which is drawn differently. Unlike normal buttons, a statusbarpanel can only have a label or an image but not both. This element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. 3 A XUL Bestiary Add-ons,
Extensions, NeedsTechnicalReview, XUL This XULNote presents some of the key concepts and terms in the XUL development environment. The purpose of this article is not to describe these items in any great detail but to define what they are in simple terms. I selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to th...
... they had no way of knowing that a particular collection of div and span elements should be treated as a single cohesive control (such as a tab bar or a treeview). 422 Deprecated and defunct markup Reference, XUL {many elements on this page are wrongly marked as deprecated, this page needs review} 423 Dynamically modifying XUL-based user interface Add-ons, DOM,
Extensions, XUL This article discusses manipulating XUL interfaces, using DOM and other APIs. It explains the concept of DOM documents, demonstrates a few simple examples of using DOM calls to perform basic manipulations on a document, and then demonstrates working with anonymous XBL content using Mozilla-specific methods. 424 FileGuide See IO 425 Accessing Files ...
...ialogs) will be described using this mechanism. XUL (pronounced "zool," as if that spelling helped any, and short for "XML User Interface Language") is our name for the language in which these UI descriptions are built. 439 List of commands XUL The following lists commands which might be usable by <command> or command dispatchers/controllers. ...
...And 12 more matches
A Web PKI x509 certificate primer
ificates. This article provides an overview of what these are and how they work. Three versions of the x509 standard have been defined for web-pki. In this document we will be referring to the current standard in use for web pki: x509 v3, which is described in detail in RFC 5280. In general, x509 certificates bind a signature to a validity period, a public key, a subject, an issuer, and a set of
extensions. The
extensions define extra properties of the certificate such as extra attributes of the certificate or constraints on the use of the certificate. In order for a certificate to be valid these three requirements must be met: There is a verification path from the site certificate to a trusted certificate of the user agent (ie if you follow the issuer path you will end on a self-signed certific...
...ation checks are considered OK for that particular validation. One issue that is not commonly known is that the x509 trust graph is not a forest (a bunch of trees where each root is a trusted root) but a cyclic graph, where the same key/issuer can be a root or an intermediate for another root in the browsers key store (when roots create intermediates for each other it is called cross-signing). ...
...t particular validation. One issue that is not commonly known is that the x509 trust graph is not a forest (a bunch of trees where each root is a trusted root) but a cyclic graph, where the same key/issuer can be a root or an intermediate for another root in the browsers key store (when roots create intermediates for each other it is called cross-signing).
Extensions While RFC 5280 defines 16
extensions for webpki in this document we will be describing the six
extensions we considered critical for understanding. Certificates can have other
extensions not described on RFC 5280, but that is out of the scope of this document.
Extensions can be marked as critical or non-critical, conforming certificate verification libraries should stop processing verification when encountering a critical extension ...
...And 12 more matches
Index
en parties are transported using a container; the container is called a certificate, following standard X.509 version 3. A certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate. The trust assigned by the third party might be restricted to certain uses, which are listed in certificate
extensions that are contained in the certificate. Many (if not most) of the operations performed by NSS involve the use of X.509 certificates (often abbreviated as "cert", unfortunately making it easy to confuse with the term "computer emergency response team"). When checking whether a certificate is trusted or not, it's necessary to find a relevant trust anchor (root certificate) that represents the ...
... in a (chain of) issuer certificate(s), we're still not done with verifying the certificate A. In a PKI it's suggested/required to perform additional checks. For example: Certificates were valid at the time the signature was made, name in certificates matches the expected signer (check subject name, common name, email, based on application), the trust restrictions recorded inside the certificate (
extensions) permit the use (e.g., encryption might be allowed, but not signing), and based on environment/application policy it might be required to perform a revocation check (OCSP or CRL), that asks the issuer(s) of the certificates whether there have been events that made it necessary to revoke the trust (revoke the validity of the cert). Trust anchors contained in the CKBI module are usually self sig...
...or "next update" CRL fields: update=YYYYMMDDhhmmssZ nextupdate=YYYYMMDDhhmmssZ Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ). For example: 20050204153000Z * 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 certifi...
...And 11 more matches
Index of archived content - Archive of obsolete content
Unload Localization Logging Modifying Web Pages Based on URL Modifying the Page Hosted by a Tab Open a Web Page Troubleshooting Unit Testing Using XPCOM without chrome Using third-party modules (jpm) Bootstrapped
extensions Code snippets Alerts and Notifications Autocomplete Bookmarks Boxes Canvas code snippets Cookies Customizing the download progress bar Delayed Execution Dialogs and Prompts Downloading Files Drag & Drop Embedding SVG ...
...RI parsing View Source for XUL Applications Windows XML-related code snippets xml:base support in old browsers XPath getAttributeNS Common Pitfalls Communication 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 ...
...dd-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 extension to restartless Inline options Install Manifests Installing
Extensions and Themes From Web Pages Interaction between privileged and non-privileged pages Jetpack Processes ...
...And 9 more matches
Inline options - Archive of obsolete content
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. Options file The XUL allowed for the inline options is limited to a few new tags. ...
...d in Firefox mobile and is now available in Firefox on the desktop as well. Options file The XUL allowed for the inline options is limited to a few new tags. Here is an example of an options.xul file: <?xml version="1.0"?> <!DOCTYPE mydialog SYSTEM "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="
extensions.myaddon.bool" title="Boolean" desc="Stored as a boolean preference" /> </vbox> Note that it's limited to <setting> tags. The root <vbox> just acts as a container, it isn't merged into the main window. If you need script support, see the display notifications section. Setting types There are several types of <setting>s, each with a different type attribute: type attribute displaye...
... The pref attribute should have the full name of the preference to be stored. The title attribute is used as a label for the controls. To set a description, either use the desc attribute, or a text node as a child of the <setting> tag. Settings are tied to actual preferences, except the button setting, which is designed more for actions. ...
...And 8 more matches
Install Manifests - Archive of obsolete content
em:strictCompatibility> in the main <Description> of your install.rdf (i.e. not in <em:targetApplication>). These version strings are formatted in the same fashion as the version property and will be compared to the application version; this allows the extension author to specify which versions of Firefox an extension has been tested with. id, minVersion, and maxVersion are all required. Note:
Extensions compatible with Firefox 3.5 should specify a maxVersion of 3.5.*, so that they are automatically compatible with security and stability updates. For Firefox 3.0, a maxVersion of 3.0.* should be used.
Extensions compatible only with Firefox or Thunderbird 2 should specify a maxVersion of 2.0.0.*. The Install Manifest must specify at least one of these objects, and may specify more if the add-on ...
...sion>1.5</em:minVersion> <em:maxVersion>3.0.*</em:maxVersion> </Description> </em:targetApplication> Gecko 1.9 based applications allow you to use the special targetApplication id toolkit@mozilla.org to say that the add-on is compatible with any toolkit app with a toolkit version matching the minVersion and maxVersion. type An integer value representing the type of add-on. 2
Extensions 4 Themes 8 Locale 32 Multiple Item Package 64 Spell check dictionary 128 Telemetry Experiment 256 WebExtension Experiment Examples <em:type>2</em:type> This property was added for Firefox 1.5, and is only required for add-on types other than
Extensions and Themes. Firefox 2 and previous supported a value of 16 to re...
... from, although backwards-compatible with, 1.0's. For add-ons hosted on addons.mozilla.org - Mozilla's update website may repackage your add-on and correct or reject malformed version strings. Optional Property Reference You may need to supply these properties, depending on the capabilities of your add-on. aboutURL The chrome:// URL of the extension's about dialog box. This is only useful to
extensions. If this property is specified, in the about:addons
extensions list, the About... link in the extension's context menu will show this dialog, rather than the default. Note: As of Gecko 2.0, the dialog receives the Addon object representing your add-on as a parameter. Examples <em:aboutURL>chrome://myext/content/about.xul</em:aboutURL> bootstrap A Boolean value that tells the application w...
...And 8 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ndLdap.patch diff -ur thunderbird-3.0/configure thunderbird-3.0.autoldap/configure --- thunderbird-3.0/configure 2009-06-29 11:37:21.677372297 +0200 +++ thunderbird-3.0.autoldap/configure 2009-06-29 14:41:11.547435040 +0200 @@ -12855,7 +12855,7 @@ MOZ_FEEDS=1 MOZ_JSDEBUGGER=1 MOZ_JSLOADER=1 -MOZ_LDAP_XPCOM= +MOZ_LDAP_XPCOM=1 MOZ_MAIL_NEWS= MOZ_MORK=1 MOZ_MORKREADER= And set --enable-
extensions=pref in mozconfig file, in fedora source RPM it is: [root@b008-02 SOURCES]# grep enable-
extensions /root/rpmbuild/SOURCES/thunderbird-mozconfig ac_add_options --enable-
extensions=pref It seems worse this time , as even after applying those compilation options mentioned above, I now get the following error message while stating thunderbird with autoconfig (autoconf.js having pref('general.confi...
...ZED) [nsILDAPURL.spec]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: file:////usr/lib/thunderbird-3.0b2/defaults/autoconfig/prefcalls.js :: getLDAPAttributes :: line 174" data: no] bug 295329 had been re-opened . AutoConfig Option and LDAP Support in Thunderbird 1.5.x Fortunately, AutoConfig is now part of Thunderbird default packages. MOZ_LDAP_XPCOM=1 and MOZ_
EXTENSIONS_DEFAULT="wallet spellcheck xmlextras pref webservices universalcharset auth" are now present in the default configure script. See bug 295329 for details. Add the AutoConfig Option for Old Thunderbird 1.0.x By default, AutoConfig did not make part of the binaries distribution of Thunderbird (1.0.x). It was apparently supposed to increase the load of the binary for a feature not used by lots of i...
...he AutoConfig Option for Old Thunderbird 1.0.x By default, AutoConfig did not make part of the binaries distribution of Thunderbird (1.0.x). It was apparently supposed to increase the load of the binary for a feature not used by lots of individuals. ...
...And 8 more matches
Setting Up a Development Environment - Archive of obsolete content
<< PreviousNext >> Getting the right tools There are 3 tools that we think are essential for effective add-on development (or any kind of development, really): a source code editor, a source control system, and a build system. In regards to code editing, there's no official Mozilla IDE. On the other hand,
extensions use the same (or similar) languages that are used for web development, so most text editors and IDEs are up to the task. Most XUL tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help. We recommend Komodo Edit. It's free, open source, and cross-platform. It's based on the Mozilla XULRunner platform, so it has support for some of the particularities in Firefox extension development. Komodo Edit has a...
...ine are merely templates that generate the folder structure for the project, and that's not much help. We recommend Komodo Edit. It's free, open source, and cross-platform. It's based on the Mozilla XULRunner platform, so it has support for some of the particularities in Firefox extension development. Komodo Edit has automatic completion for XUL tags and attributes, and it supports Mozilla's CSS
extensions (CSS values and properties beginning with "-moz"). It has an add-on system similar to the one in Firefox, and there are some Komodo
extensions that provide additional help in extension development. That is more than what you can get with most other editors, so we recommend you to give it a try. All of our examples are handled with Komodo Edit, so if you see a .kpf or .komodoproject file in an exa...
... you use "bash -c". The file Makefile specifies which profile folder the add-on will be reinstalled to. This is set in the profile_dir variable (set to "xulschool-dev" in this case). When creating a development profile for your add-on, make sure you choose an easy name for the profile folder, and set it in your Makefile in order to take advantage of the install command. Building IDL files Some
extensions require developing XPCOM components to add certain advanced functions. There's a section dedicated to XPCOM in this tutorial, but we'll briefly discuss the impact it has on building the extension. You can skip this section and keep it present as a reference in case you do need to use XPCOM in your project. XPCOM interfaces are defined using IDL files. These are text files that define the attribu...
...And 7 more matches
Chrome registration
Note: With Gecko 1.9.2 and older, Mozilla reads chrome/*.manifest files from applications. ...
.... Note: There 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...
...There may be chrome registration lines which only apply to a particular application version. The flag appversion=version appversion<version appversion<=version appversion>version appversion>=version indicates that the instruction should only be applied if the extension is installed into the application version identified. Multiple appversio...
...And 7 more matches
nss tech note4
*CERT_GetLocalityName(CERTName *name); char *CERT_GetStateName(CERTName *name); char *CERT_GetOrgName(CERTName *name); char *CERT_GetOrgUnitName(CERTName *name); char *CERT_GetDomainComponentName(CERTName *name); char *CERT_GetCertUid(CERTName *name); Example code to illustrate access to the info is given below. Background on cert
extensions An extension has the following attributes Object Id (OID) : A unique OID represents an algorithm, a mechanism, a piece of information, etc. Examples: X500 RSA Encryption, Certificate Basic Constraints, PKCS#7 Digested Data, etc. There is a long list of pre-defined OIDs, and new ones can be added dynamically by an application. The OID data structure contains an ...
...ong list of pre-defined OIDs, and new ones can be added dynamically by an application. The OID data structure contains an array of identifier bytes (each byte is a "level" in a hierarchical namespace), a text description, and some other things. ...
...w ones can be added dynamically by an application. The OID data structure contains an array of identifier bytes (each byte is a "level" in a hierarchical namespace), a text description, and some other things. ...
...And 7 more matches
NSS tools : certutil
cert, print binary DER encoding of extension OID. -e Check a certificate's signature during the process of validating a certificate. --email email-address Specify the email address of a certificate to list. Used with the -L command option. --extGeneric OID:critical-flag:filename[,OID:critical-flag:filename]... Add one or multiple
extensions that certutil cannot encode yet, by loading their encodings from external files. . OID (example): 1.2.3.4 . critical-flag: critical or not-critical . filename: full path to a file containing an encoded extension -f password-file Specify a file that will automatically supply the password to include in a certificate or to access ...
... + certSigning + crlSigning + critical -2 Add a basic constraint extension to a certificate that is being created or added to a database. This extension supports the certificate chain verification process. certutil prompts for the certificate constraint extension to select. X.509 certificate
extensions are described in RFC 5280. -3 Add an authority key ID extension to a certificate that is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Datab...
... is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Database Tool will prompt you to select the authority key ID extension. X.509 certificate
extensions are described in RFC 5280. -4 Add a CRL distribution point extension to a certificate that is being created or added to a database. This extension identifies the URL of a certificate's associated certificate revocation list (CRL). certutil prompts for the URL. X.509 certificate
extensions are described in RFC 5280. -5...
...And 7 more matches
Add-ons - Archive of obsolete content
eate 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. bookmarks.export() Exports bookmarks to an HTML bookmark file. bookmarks.import() Imports bookmarks from an HTML bookmark file. ...
...SDK includes JavaScript APIs, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons. bookmarks.export() Exports bookmarks to an HTML bookmark file. bookmarks.import() Imports bookmarks from an HTML bookmark file. Bootstrapped
extensions browser.bookmarks.export( function() {...} // optional function ) Code snippets ... Creating custom Firefox
extensions with the Mozilla build system There is a wealth of material on creating
extensions for Firefox. All of these documents currently assume, however, that you are developing your extension 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...
...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. ...
...And 6 more matches
Theme changes in Firefox 2 - Archive of obsolete content
global/tab-left.png New file; the left edge of a tab. global/tab-middle.png New file; the middle of a tab. global/tab-right.png New file; the right edge of a tab. global/tabbrowser-tabs-bkgnd.png New file; the background for the tab bar, displayed behind all tabs. global/toolbar.css Needs to be updated to include new styles. ...
...b. global/tab-right.png New file; the right edge of a tab. global/tabbrowser-tabs-bkgnd.png New file; the background for the tab bar, displayed behind all tabs. global/toolbar.css Needs to be updated to include new styles. mozapps/
extensions/about.css Updated with a simplified set of style names, since several styles were identical. mozapps/
extensions/
extensions.css CSS for the add-ons manager window. Updated to support the new features of the Firefox 2 add-ons manager. ...
... bar, displayed behind all tabs. global/toolbar.css Needs to be updated to include new styles. mozapps/
extensions/about.css Updated with a simplified set of style names, since several styles were identical. mozapps/
extensions/
extensions.css CSS for the add-ons manager window. Updated to support the new features of the Firefox 2 add-ons manager. mozapps/
extensions/itemDisabledFader.png New file; a translucent PNG used as an overlay on top of items that are disabled in the add-ons manager. ...
...And 6 more matches
certutil
t o certSigning o crlSigning o critical -2 Add a basic constraint extension to a certificate that is being created or added to a database. This extension supports the certificate chain verification process. certutil prompts for the certificate constraint extension to select. X.509 certificate
extensions are described in RFC 5280. -3 Add an authority key ID extension to a certificate that is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Database Tool wil...
...e that is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Database Tool will prompt you to select the authority key ID extension. X.509 certificate
extensions are described in RFC 5280. -4 Add a CRL distribution point extension to a certificate that is being created or added to a database. This extension identifies the URL of a certificate's associated certificate revocation list (CRL). certutil prompts for the URL. X.509 certificate
extensions are described in RFC 5280. -5 | --nsCertType...
...pe certificate type extension to a certificate that is being created or added to the database. There are several available keywords: o sslClient o sslServer o smime o objectSigning o sslCA o smimeCA o objectSigningCA o critical X.509 certificate
extensions are described in RFC 5280. -6 | --extKeyUsage keyword,keyword Add an extended key usage extension to a certificate that is being created or added to the database. Several keywords are available: o serverAuth o clientAuth o codeSigning o emailProtection o timeStamp o ocspResponder ...
...And 6 more matches
Extension Packaging - Archive of obsolete content
Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. ...
... Every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique ID, version, author, and compatibility information. ...
...fter 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, the XPI itself is placed in the
extensions directory, and files are loaded directly out of the package. Making an extension XPI An XPI (XPInstall) file is simply a ZIP file, containing the extension files, with the install.rdf file at the root of the ZIP. Users can download XPI files from a website, or from a local file, and install by opening it, or dragging it into th...
...And 5 more matches
Extension Etiquette - Archive of obsolete content
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. User Interface Tools menu items Using the Tool menu option gives the author the maximum amount of choices. Whether the
extensions should go at the top, bottom, or somewhere in between on the Tools menu, the author always has a choice. Ideally, the location would be below the Add-ons item, grouped with the other extension-related commands (menuitem:insertafter="javascriptConsole,devToolsSeparator"). Sub-menus should be used for single
extensions needing multiple menu items, and a Tools menu item should not be created for options and preferences (for options and preferences, see the add-on manager). If possible, create a menu ite...
... item in the menu where it is most applicable; for instance, a bookmark sharing extension should be called from the Bookmarks menu. To maintain the default theme, avoid the use of an icon next to the menu items. Other UI elements In general, toolbar items are very useful to end users because they can be removed or added to various toolbars as necessary. Status bar items should only be added for
extensions that need constant monitoring, such as ad blocking, page ranking, or cookie management. Likewise, 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 requ...
...sion that do functions similar to ones that already exist in a browser -- for example, a feed reader that reloads and stops -- use icons from the browser's theme. The icons makes the extension lighter, while providing more consistency, especially for users using different themes. Extension icons Unique icons are usually worth their download weight. They allow for easy identification among other
extensions in the
Extensions manager. Coding practices Namespace conflicts There are many namespaces which
extensions often must share with other consumers, be they other add-ons, web code, or the browser itself. These often include areas such as: Object prototypes, such as String.prototype, which are often extended to add methods to native objects. Global variables, such as top-level declarations on...
...And 5 more matches
The Essentials of an Extension - Archive of obsolete content
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. There are two accepted standards for add-on ids. One is the email-like format in the Hello World example, which should be something like <project-name>@<yourdomain>. The other standard practice is to use a generated UUID string, which is extremely unlikely to be duplicated. Unix-based systems have a command line tool called uuidgen that gene...
...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 code: <em:localized> <Description> <em:locale>es-ES</em:locale> <em:name>XUL School Hola Mundo</em:name> <em:description>Bienvenido a XUL School!</em:description> </Description> </em:localized...
... and (2) possibly a content area, like the one that displays web pages in a Firefox tab. Windows like the Downloads window are pure chrome. Most of the code for an extension resides in the chrome folder, just like in the Hello World example. As we saw in the directory structure of the unpacked extension, the chrome is composed of 3 sections: content, locale and skin. The 3 are necessary for most
extensions. If we open the chrome.manifest file (again, any text editor will do), we see that the same 3 sections are mentioned: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/ locale xulschoolhello en-US locale/ The chrome.manifest file tells Firefox where to look for chrome files. The text is spaced to look like a table, but that is not necessary...
...And 5 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. ...
... 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) from your testing environment. You could be running two instances of Fi...
...ition or similar. You do not have to install these unstable versions, if you do not wish. Make a symbolic link (also referred to as a shortcut) to the firefox binary (firefox.exe on Windows), then move the link to your desktop, or your preferred location. To run this version of Firefox, simply double click on this file. Explore this profile a little: change some settings, install any additional
extensions, and finally close this instance of Firefox. 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. Choose default and uncheck "Don't ask at startup" checkbox. Click "Start Firefox". Now when yo...
...And 5 more matches
Index
675 Creating an appealing add-on listing Add-ons, Beginner, Guide, WebExtension, publishing There are two essential steps to getting people to use your add-on: they need to discover your add-on and open the listing page, then the listing page needs to encourage them to click the Add to Firefox button. ...
...fore vital: from making effective use of keywords in your descriptions, to get visibility in external search engine results, through having an icon that attracts a user's attention from a category list, to screenshots that show how useful your add-on is. ...
...m making effective use of keywords in your descriptions, to get visibility in external search engine results, through having an icon that attracts a user's attention from a category list, to screenshots that show how useful your add-on is. ...
...And 5 more matches
NSS Tools certutil
-1 Add a key usage extension to a certificate that is being created or added to a database. This extension allows a certificate's key to be dedicated to supporting specific operations such as SSL server or object signing. The Certificate Database Tool will prompt you to select a particular usage for the certificate's key. These usages are described under Standard X.509 v3 Certificate
Extensions in Appendix A.3 of theRed Hat Certificate System Administration Guide. -2 Add a basic constraint extension to a certificate that is being created or added to a database. This extension supports the certificate chain verification process. The Certificate Database Tool will prompt you to select the certificate constraint extension. Constraint
extensions are described i...
...ertificate System Administration Guide. -2 Add a basic constraint extension to a certificate that is being created or added to a database. This extension supports the certificate chain verification process. The Certificate Database Tool will prompt you to select the certificate constraint extension. Constraint
extensions are described in Standard X.509 v3 Certificate
Extensions in Appendix A.3 of theRed Hat Certificate System Administration Guide. -3 Add an authority keyID extension to a certificate that is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Data...
... -3 Add an authority keyID extension to a certificate that is being created or added to a database. This extension supports the identification of a particular certificate, from among multiple certificates associated with one subject name, as the correct issuer of a certificate. The Certificate Database Tool will prompt you to select the authority keyID extension. Authority key ID
extensions are described under Standard X.509 v3 Certificate
Extensions in Appendix B.3 of theRed Hat Certificate System Administration Guide. -4 Add a CRL distribution point extension to a certificate that is being created or added to a database. This extension identifies the URL of a certificate's associated certificate revocation list (CRL). The Certificate Database Tool pro...
...And 5 more matches
PublicKeyCredential.getClientExtensionResults() - Web APIs
getClientExtensionResults() is a method of the PublicKeyCredential interface that returns an ArrayBuffer which contains a map between the
extensions identifiers and their results after having being processed by the client. During the creation or fetching of a PublicKeyCredential (respectively via navigator.credentials.create() and navigator.credentials.get()), it is possible to have "custom" processing by the client for different
extensions which are respectively given by PublicKeyCredentialCreationOptions.
extensions and PublicKeyCredentialRequestOptions.
extensions. ...
...er having being processed by the client. During the creation or fetching of a PublicKeyCredential (respectively via navigator.credentials.create() and navigator.credentials.get()), it is possible to have "custom" processing by the client for different
extensions which are respectively given by PublicKeyCredentialCreationOptions.
extensions and PublicKeyCredentialRequestOptions.
extensions. Note:
Extensions are optional and different browsers may recognize different
extensions. All
extensions are optional for the client to process them: if a browser does not know of a given extension, that will not cause any failure. Note: This method may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax mapArrayBuffer = publicKeyCredential.getClientExtensionResult...
...lient to process them: if a browser does not know of a given extension, that will not cause any failure. Note: This method may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax mapArrayBuffer = publicKeyCredential.getClientExtensionResults() Parameters None. ...
...And 5 more matches
Handling Preferences - Archive of obsolete content
rences can be seen in this page. You don't need to know them by heart; if doing task X requires some preference, then it's better to look for an explanation on how to do X rather than diving into the preferences list and see if you can find the preference you need. MDC articles and other guides are usually good at specifying the preferences you'll need to use. Adding preferences to an extension
Extensions can read and write Firefox preferences and, most importantly, create and manage their own. The Preferences System provides a simple, unified storage facility for name / value mappings. When your storage needs are more complicated than this, you'll need more advanced APIs that will be discussed in a section further ahead. To add preferences to your extension you should first create a JS preferenc...
...o your extension you should first create a JS preferences file that describes the preferences and their default values, although setting defaults is not required. As mentioned earlier, a preference with no default value can be set later on. Note: We recommend that you include all of your extension preferences in the JS defaults file. It makes it easier to compile a list of the preferences your
extensions handle, and to document what they do. The preferences file you need to create should be defaults/preferences/yourextensionname.js, under your extension root. The naming of the JS file is not compulsory, but it is the standard most
extensions use. Note: The purpose of the defaults directory is to hold non-code files your extension needs. In the past we have used this directory to store XSLT ...
...es for XML transformations and local storage template files (more on this later). It's the best place to put miscellaneous files your extension needs. Download this sample Hello World using preferences. There are a couple of additions in the Makefiles, to include the preference file xulschoolhello.js. The contents of the file are fairly simple: // Amount of messages shown to the user. ...
...And 4 more matches
Adding preferences to an extension - Archive of obsolete content
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 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...
...erval routine to update the stock information periodically. var StockWatcher = { prefs: null, tickerSymbol: "", // Initialize the extension startup: function() { // Register to receive notifications of preference changes this.prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("
extensions.stockwatcher2."); this.prefs.addObserver("", this, false); this.tickerSymbol = this.prefs.getCharPref("symbol").toUpperCase(); this.refreshInformation(); window.setInterval(this.refreshInformation, 10*60*1000); } }, Our object has two member variables. prefs is configured by startup() to reference our extension's preferences, while tickerSymbol indicates the stock symb...
...t has two member variables. prefs is configured by startup() to reference our extension's preferences, while tickerSymbol indicates the stock symbol to monitor. The first thing the startup() function does is to get a reference to the preferences for our extension. This is done in two steps: First, we get the Preferences service. This component handles preference management for Firefox and any
extensions. Second, we call nsIPrefService.getBranch(). This lets us specify a specific branch of the preference tree to access. By default, we would have access to all preferences, but we only want access to those belonging to our own extension, so we specify that we want to access the "
extensions.stockwatcher2" branch. After getting the preference branch for our extension, we call the nsISupports.Qu...
...And 4 more matches
Manifest Files - Archive of obsolete content
.xul chrome://browser/content/viewSourceOverlay.xul overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul overlay chrome://browser/content/pageInfo.xul chrome://pippki/content/PageInfoOverlay.xul Two packages are listed here, 'branding' and 'browser'. Three overlays are also specified, which allow content from different packages to combine together.
Extensions will make the most use of overlays, since they merge their UI with the browser UI. The file paths for the branding and browser packages use jar URLs as the content is packaged up into an archive. A JAR archive can be created with a ZIP utility. For a JAR file located in the chrome directory, the syntax is fairly simple: jar:<filename.jar>!/<path_in_archive> For the browser package, the archive is...
...f 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 instead. Otherwise, if an extension attempted to call the modified versions, it would likely not work properly, or worse, create a security hole. This flag was added to prevent this problem and should always be used for newer
extensions, but is left out for older
extensions that might not be compatible with the change. For more information about this feature, see XPCNativeWrapper. Themes and Locales The themes and locales, the syntax is similar as for content packages, but you also need to specify the content package you are providing a theme or locale for. For example: skin browser classic/1.0 jar:classic.jar!/skin/classic/brow...
...ich was specified on the first line.The three paths above specify subdirectories for each part. You will want to create these subdirectories to keep each part's files separate. Installing a Package For an application to be installed, you will need to create an installer for it, or include it as part of another application. The method used depends on what kind of application you are creating. For
extensions, you will need to create an install file install.rdf which describes what will be installed, the author of the extension and which versions of the browser or other applications it is compatible with. A specific directory structure is needed as well since
extensions are limited in where the files may be installed to. An extension is packaged up into an XPI file. XPI is short for XPInstall and is u...
...And 4 more matches
XUL Structure - Archive of obsolete content
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 signed with a digital certificate and the user has granted 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 calle...
... 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. These files are accessed via a chrome URL and have enhanced privileges and work just like any other package. Of course, the browser is much larger and more sophisticated than most
extensions. Firefox and Thunderbird, as well as number of other components are all written in XUL and are all accessible via chrome URLs. You can examine these packages by looking in the chrome directory where Firefox or another XUL application is built. The chrome URL always begins with 'chrome://'. In much the same way as an 'http://' URL always refers to remote web sites accessed using HTTP, and the 'fi...
...ccessible via chrome URLs. You can examine these packages by looking in the chrome directory where Firefox or another XUL application is built. The chrome URL always begins with 'chrome://'. In much the same way as an 'http://' URL always refers to remote web sites accessed using HTTP, and the 'file://' URL always refers to local files, the 'chrome://' URL always refers to installed packages and
extensions. We'll look more at the syntax of a chrome URL in the next section. It is important to note that when accessing content through a chrome URL, it gains the enhanced privileges described above that other kinds of URLs do not. For instance, an HTTP URL does not have any special privileges, and an error will occur if a web page tries, for example, to read a local file. However, a file loaded via a ch...
...And 4 more matches
Plug-in Development Overview - Gecko Plugin API Reference
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). Until your new MIME type is registered, preface its name with "x-", for example, image/x-nwim. For more information about MIME types, see these MIME RFCs: RFC-2045: "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Bodies" RFC-2046: "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types" RFC-4288: "Media Type Specifications and Registration Procedures" There are some variations to how plug-ins are handled on different platforms. The following sections describe platform-specific discovery and registration: MS Windows Unix Mac OS X MS Windows...
...dia Types" RFC-4288: "Media Type Specifications and Registration Procedures" There are some variations to how plug-ins are handled 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...
...ent 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". ...
...And 4 more matches
XPCOM changes in Gecko 2.0
t files, similarly to how chrome is registered. In fact, the same chrome manifest file will be used to register components. All existing XPCOM components will need to be updated to support this. However, it's very easy to do, and you can actually support both types of registration for backward compatibility. Component manifests All component registration is now handled through manifest files. For
extensions, this is the same chrome.manifest currently used to register chrome. XPT files The path of any XPT files must be listed explicitly in a manifest using an interfaces directive: interfaces components/mycomponent.xpt JavaScript components The registration information for JavaScript components is no longer located in the component itself; instead, it's located in the manifest. The component is loaded...
...ssible for a binary component to be compatible with Mozilla 1.9.2 and Mozilla 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 c...
...mac/mycomponent64.dylib ABI=Darwin_x86_64-gcc3 binary-component components/linux/mycomponent.so ABI=Linux_x86-gcc3 This also means that platform-specific preferences are no longer possible. If you need to adjust default preferences based on platform, you can do so at first run by looking up what platform you're on and changing the preferences at that time. Category registration Prior to Gecko 2,
extensions could listen for the xpcom-startup and app-startup notifications during startup, and perform actions during those. This is no longer the case. The earliest startup notification
extensions can receive now is profile-after-change, which has always been the recommended notification to observe. That's because it's among the earliest notifications that occurs after the profile folder (and therefore pr...
...And 4 more matches
Plug-in Development Overview - Plugins
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). Until your new MIME type is registered, preface its name with "x-", for example, image/x-nwim. For more information about MIME types, see these MIME RFCs: RFC-2045: "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Bodies" RFC-2046: "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types" RFC-4288: "Media Type Specifications and Registration Procedures" There are some variations to how plug-ins are handled on different platforms. The following sections describe platform-specific discovery and registration: MS Windows Unix Mac OS X MS Windows...
...dia Types" RFC-4288: "Media Type Specifications and Registration Procedures" There are some variations to how plug-ins are handled 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...
...ent 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". ...
...And 4 more matches
about:debugging - Firefox Developer Tools
n about:debugging: Type about:debugging in the Firefox URL 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...
...ver the Network You can connect to a Firefox Debug server on your network, or on your debugging machine using the Network Location settings of the about:debugging page. Enter the location and port on which the debugger server is running. When you do, it is added to the Network locations list along with the devices, as shown below: This Firefox The This Firefox tab combines the features of
Extensions, Tabs, and Workers into a single tab with the following sections: Temporary
Extensions Displays a list of the
extensions that you have loaded using the Load Temporary Add-on button.
Extensions This section lists information about the
extensions that you have installed on your system. Service Workers, Shared Workers, and Other Workers There are three sections on this page that deal with Se...
...emporary
Extensions Displays a list of the
extensions that you have loaded using the Load Temporary Add-on button.
Extensions This section lists information about the
extensions that you have installed on your system. Service Workers, Shared Workers, and Other Workers There are three sections on this page that deal with Service Workers, Shared Workers, and Other Workers. Whether internal
extensions appear in the list on this page depends on the setting of the devtools.aboutdebugging.showHiddenAddons preference. If you need to see these
extensions, navigate to about:config and make sure that the preference is set to true.
Extensions Loading a temporary extension With the Load Temporary Add-on button you can temporarily load a web extension from a directory on disk. Click the button, navig...
...And 4 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
Note: If you want to contribute to this document please follow the guidelines on the Contribute page. << PreviousNext >> This document was authored by Hiroshi Shimoda of Clear Code Inc. and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Shimoda-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008). Before you learn how to develop
extensions, let's learn about XUL, the XML-based User-interface Language, which is one of the building blocks for
extensions. Introduction An overview of XUL XUL is an XML-based language, and was developed to be the GUI markup language for the Mozilla browser. There are earlier experiments going back a long way in developing user interfaces using a combination of HTML and scripting languages, and XUL could be co...
...that I explain in this chapter, I will illustrate it with a source code example. You can type these examples up and open them in Firefox to see how they behave and appear. You can download a file with all the source code examples from: FIXME: Attache the translated tarball - Paul Task !. ...
...fox and Thunderbird, and
extensions for them, but other web browsers based on Firefox or the Gecko engine, and even web-based content also used XUL. For example, there is the Mozilla Amazon Browser, which helps with shopping at Amazon, and the Presentation Method in XUL, a tool for writing and displaying presentations To try out the code samples in this chapter, save them as text files with .xul
extensions and drag and drop them into the Firefox browser window. FIXME: Explain how setting this option and use next listings If we want to run Firefox displaying none of its GUI and only the contents of a certain XUL file, we can launch Firefox and set the option: -chrome file_URL.xul Another way, as shown in Listing 1, is to use the window.openDialog() method, which can be used only within a XUL wind...
...And 3 more matches
Supporting private browsing mode - Archive of obsolete content
tion is not recorded. This includes cookies, history information, download information, and so forth. When private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. The temporary cookie and local storage databases start out empty.
Extensions that may record potentially private information may wish to hook into the private browsing service so that they can avoid saving personal information when private browsing mode is enabled. Doing this is quite easy, using the nsIPrivateBrowsingService interface. Detecting private browsing mode Determining whether or not the user is currently in private browsing mode is simple. Just check the val...
.../privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; if (!inPrivateBrowsingMode) { /* save private information */ } In the above example, we only save the user's private information if not in private browsing mode. Note: Private browsing mode may only be detected by chrome code, such as
extensions; web content cannot detect whether or not private browsing is in effect. Detecting whether private browsing mode is permanent Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Firefox 4 added support for having private browsing mode permanently enabled. The theme looks different in this scenario. To determine whether or not the browser is permanently in private browsing mo...
...var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); var oldPrivateMode = pbs.privateBrowsingMode; pbs.privateBrowsingEnabled = true; /* this is all private */ pbs.privateBrowsingEnabled = oldPri...
...And 3 more matches
Complete - Archive of obsolete content
This article is not finished yet. When it is finished, it will get a category and links from other pages. This page is for readers who have followed the Custom Toolbar Button tutorial for Firefox, Thunderbird and Sunbird, or the Custom Toolbar Button:SeaMonkey tutorial for SeaMonkey, and who want to learn more about developing
extensions. Introduction You can use the Custom Toolbar Button tutorial as a very 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 down...
...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 this extension This extension is a more complex version of the original Custom Toolbar Button extension. It provides a user interface in two languages (English and French). It supports Firefox, Thunderbird, Sunbird and Flock--these are referred to as "Firefox etc." in the rest of this page. It also supports SeaMonkey. In SeaMonkey it supports two th...
... extension jar defaults/preferences Directory containing a preferences file Inside the jar there are three directories: content XUL, JavaScript and other content that does not depend on the locale or theme locale Files for each locale skin Files for each theme Version checks Firefox etc. check
extensions for compatibility before installing them. These version checks depend on the version numbers specified in the install.rdf file. There are two approaches: pessimistic and optimistic. The approach that is normally recommended is pessimistic. The extension is assumed to fail in any future version of the application. To adopt this approach, set the maxVersion to the latest actual version where you ha...
...And 3 more matches
Custom toolbar button - Archive of obsolete content
Instead, you make your custom button as a self-contained extension in your profile. You can use the sample code provided here to make buttons that do various useful things. If you know how to program in JavaScript, then you can write your own code that does other things. You can use this page if all you really want is a button for some special purpose. You can also use this page to learn about
extensions, and as a starting point if you plan to write a more complex extension. Note that this extension is very simplified. Use other tutorials and articles to find out more--the main
Extensions page here is a good starting point. In particular, the articles Creating toolbar buttons and Building an Extension explain the process in more detail. Supported applications You can use the steps on this page ...
...r version Sunbird 0.3 or a later version Pre-release versions of these (alphas, betas and release candidates) are also OK. In the rest of this page, the term application means the Mozilla application where you want to add the button. Note: There is a similar tutorial for SeaMonkey 1.x on the page: Custom Toolbar Button:SeaMonkey Earlier versions and other Mozilla applications also support
extensions, but some parts of this tutorial are not appropriate for them. Required tools You will need two tools. Your operating system normally provides them: A way to create and work with files and directories A text editor for plain text files Character encoding Some text editors have a setting for character encoding. If your language uses only plain Latin (ASCII) characters, set your text edi...
...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 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 profil...
...And 3 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
es internal to your bundle Unfortunately, resource mappings in your chrome.manifest were not usable in restartless add-ons until Mozilla finally fixed this bug in Firefox 38, which looked bad, but only because Mozilla is still using resource:// URIs internally and in examples. Resource mappings for files in the mozilla distribution, such as Services.jsm (above), will continue to work. In overlay
extensions, you can place a resource mapping in the chrome.manifest for your add-on and load your own JSM from resource:// URIs. It's a great way to modularize your code that's been available since Firefox 3. You can use chrome:// URIs with "Components.utils.import()" just fine; in fact you've been able to since Firefox 4. However, because it was implemented first for only file:// and resource:// but not ch...
...ataView will be fairly straightforward. Just read the docs and it's pretty simple. It will probably be notably faster than whatever you were doing before. Reportedly XMLHttpRequest doesn't work reliably when used in JSM under versions of Firefox less than 16, however as previously mentioned, this guide should be taken as requiring Firefox 17+. Step 4: Manually handle default preferences Normal
extensions load default preferences from a standardized file automatically. Restartless
extensions don't (for no good reason). This part is fairly easy to implement yourself, at least. Here are some functions to handle this: function getGenericPref(branch,prefName) { switch (branch.getPrefType(prefName)) { default: case 0: return undefined; // PREF_INVALID ...
...s are provided above in case you need them. Unfortunately, the built in APIs for dealing with preferences are missing this basic stuff, and its plain text handling doesn't work with Unicode properly. Step 4a: Another way to handle default preferences If you want to keep your preference file in defaults/preferences/, the approach above only works as long as your extension is unpacked. For packed
extensions (the default), you can either load a module similar to Firebug's prefLoader.js or load this workaround module (N.B. As of May 29, 2017, that module does not work with packed
extensions; I'm preserving the link in case the author updates the gist to fix this issue). Step 5: No more internal JAR files You know how I've been mentioning extractionless add-ons every once in a while thus far? Well, y...
...And 2 more matches
Multiple item extension packaging - Archive of obsolete content
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). The basic structure is shown below: /install.rdf Install Manifest /extension1.xpi Extension /extension2.xpi Extension /theme1.jar Theme /theme2.jar Theme ... The Extension Manager will read the install.rdf Install Manifes...
...on specified should be the lowest maxVersion from all of the installable bundles contained by the multiple item package for the em:targetApplication. If this is not done, any items that are not compatible will not be installed unless a compatibility check discovers updated compatibility information. Installation Installation can be performed using any of the existing methods used for installing
extensions / themes. The same user interface is used for installing a multiple item package (i.e. the individual packages contained in the multiple item package will not be listed). This also allows displaying of signing information for the multiple item package. If a manager (e.g. extension / theme manager) is used, the manager will display the individual items contained by the multiple item package after...
... a manager (e.g. extension / theme manager) is used, the manager will display the individual items contained by the multiple item package after the download completes in the same manner that it would if the user had chosen to install multiple individual items simultaneously. The manager will not display the multiple item package in the list of items after the download has completed. Signing All
extensions now require signing by Mozilla. For multiple item packages, all internal add-ons need to be signed, but the container doesn't need to be signed. This means that the contained add-ons need to be submitted to AMO individually for signing. Additionally, the container add-on ID must not be the same as the ID of any of the contained add-ons. Official References for Toolkit API Official References. D...
...And 2 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
ossibly merging multiple toolbars in the process. Firefox allows all of this by default, and if you don't pay attention to the details we describe here, your toolbar may not be as easy to customize as the rest. The first thing you need to do is add your buttons to the toolbar palette. The toolbarpalette is a collection of all toolbar buttons and toolbar items in Firefox, including those added by
extensions. To add your buttons, all you need to do is overlay the palette in your main browser overlay. <overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton id="xulschoolhello-hello-world-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="&xulscho...
...your toolbar, you can use the toolbaritem element instead. This element is nothing more than a wrapper, so you can have whatever XUL content you want in it. However, you should keep in mind that odd-looking toolbars are likely to confuse and annoy users. Use custom toolbar items sparingly. Toolbar button icons Creating the icons for toolbar buttons is one of the most difficult tasks when making
extensions. It is not too hard to come up with some graphics for the buttons, but it can be hard to make them blend in with Firefox on all operating systems. The way icons are handled in Firefox changed considerably after Firefox 4, so supporting older versions is not mentioned here (you can check this document's change history for older revisions, though). These are the current icon sets for Firefox: Win...
...m without having to worry about the rest. On the other hand, it is often the case that there are multiple images and CSS sheets that are the same for all systems. For example, your extension logo icon will probably be the same. Having multiple copies of these files can be wasteful, so you may want to have a "common" directory. Image files use the most space in an extension package, by far. Most
extensions are a few hundred kilobytes in size or smaller. If your file is getting too big, you should look into optimizing your images. Given the way manifest files work, we have found that the best solution is to have a separate package name for OS-specific skin files. skin xulschoolhello classic/1.0 skin/all/ skin xulschoolhello-os classic/1.0 skin/unix/ skin xulschoolhello-os classic/1.0 skin/win/...
...And 2 more matches
Creating a status bar extension - Archive of obsolete content
Some of the samples in this series may be similar to samples you've seen elsewhere, but the goal of this series of articles is to help compile information for new extension developers into one place to make it easy to jump in and get started. Note: The extension created by this tutorial won't work in Firefox that don't have a static status bar (that is, Firefox 4 and up). You can find a more up-to-date tutorial in the XUL School tutorial The Essentials of an Extension. ...
...ed so Firefox can uniquely identify your extension. In this sample, these fields are: Property name Description id A unique identification string. Before Firefox 1.5, this was a GUID. Starting with Firefox 1.5, however, you should use a string in the form extension-name@creator-domain. version The extension's version number. type The addon type. For
extensions, this is 2. Human-readable information In this sample, we have four pieces of human-readable information; that is, information that is displayed to the user within the Firefox interface. These are: Property name Description em:name The extension's name. This name is displayed in the
Extensions window. em:description A short, one-line description of the ex...
... em:creator The author's name. ...
...And 2 more matches
Extentsions FAQ - Archive of obsolete content
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. ...
...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. Inspector, Talkback and the default theme are nowadays installed like this. Does Firefox clean up the preferences set by extension? If not, how to proceed? When user chooses to uninstall an extension, a nsIObserverService notification is sent out. The problem is, while your extension is still active, user can cancel uninstallation, and when it is ph...
...ne make an addressbook enhancer extension that has the ability to put pictures on a contact and other features the Thunderbird address book lacks. ...
...And 2 more matches
Building Mozilla XForms - Archive of obsolete content
Getting started Things to know first: The xforms extension has a dependency on the schema-validation extension, so you need to build both (that's done automatically) Mozilla switched from CVS to Mercurial starting with Firefox 3.5. During CVS times, the Mozilla repository contained both
extensions. Since the switch to Mercurial, the
extensions live in separate repositories. Before you can start building the xforms extension, you should check your Mozilla build environment by doing a regular Firefox build. Have a look at the Build Instructions for detailed information for your platform. The following table gives you an overview of which version you want to build: Firefox version Gecko/Toolkit version source code notes status Firefox 2.0 Gecko 1.8.1 CVS, branch MOZILLA_1_8_BRANCH no...
...stly works upcoming 0.8.7 release If you have your first working Firefox build, you can go on with building the xforms extension. Firefox 3.5 and up: get the source code If you want to build XForms for Firefox up to 3.0, you already have the required source code, it's part of your CVS checkout. Skip to the next section. ...
...ore Mercurial checkouts: cd
extensions hg clone http://hg.mozilla.org/xforms hg clone http://hg.mozilla.org/schema-validation That's it, you now have everything you need to get started. Configure your build: the .mozconfig file Mozilla uses a file called .mozconfig in your home directory to store the build configuration. For xforms, you will need to add the following line: ac_add_options --enable-
extensions="default,xforms" # if you're using a Mozilla source before 2010-11-06 (e.g. an old Firefox 3.6 release) use this instead (see bug 601570 for details): ac_add_options --enable-
extensions="default,xforms,schema-validation" A complete .mozconfig file for a release build might look like that: . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_CO_PROJECT=browser mk_add_options MOZ_OBJDIR=@TOP...
...And 2 more matches
Add-ons
pers to extend and modify the functionality of Firefox. They are written using standard Web technologies - JavaScript, HTML, and CSS - plus some dedicated JavaScript APIs. Among other things, an add-on could: Change the appearance or content of particular websites Modify the Firefox user interface Add new features to Firefox There are several types of add-ons, but the most common type are
extensions. Developing
extensions In the past, there were several toolsets for developing Firefox
extensions, but as of November 2017,
extensions must be built using Web
Extensions APIs. Other toolsets, such as overlay add-ons, bootstrapped add-ons, and the Add-on SDK, are no longer supported.
Extensions written using Web
Extensions APIs for Firefox are designed to be cross-browser compatible. In most case...
...nger supported.
Extensions written using Web
Extensions APIs for Firefox are designed to be cross-browser compatible. In most cases, it will run in Chrome, Edge, and Opera with few if any changes. They are also fully compatible with multiprocess Firefox. You can see the APIs currently supported in Firefox and other browsers. ...
...This new, high-performance browser for Android has been rebuilt from the ground up using GeckoView, Mozilla's mobile browser engine. We are currently building support for the Web
Extensions API on GeckoView. ...
...And 2 more matches
NSS_3.12_release_notes.html
po in sha512.c, and use SEC_BEGIN_PROTOS/SEC_END_PROTOS in secport.h Bug 419242: 'all' is not the default makefile target in lib/softoken and lib/softoken/legacydb Bug 419523: Export Cert_NewTempCertificate. Bug 287061: CRL number should be a big integer, not ulong Bug 301213: Combine internal libpkix function tests into a single statically linked program Bug 324740: add generation of SIA and AIA
extensions to certutil Bug 339737: LIBPKIX OCSP checking calls CERT_VerifyCert Bug 358785: Merge NSS_LIBPKIX_BRANCH back to trunk Bug 365966: infinite recursive call in VFY_VerifyDigestDirect Bug 382078: pkix default http client returns error when try to get an ocsp response. Bug 384926: libpkix build problems Bug 389411: Mingw build error - undefined reference to `_imp__PKIX_ERRORNAMES' Bug 389904: avoid m...
...IX ALLOC ERROR Bug 390888: CERT_Verify* functions should be able to use libPKIX Bug 391457: libpkix does not check for object ref leak at shutdown Bug 391774: PKIX_Shutdown is not called by nssinit.c Bug 393174: Memory leaks in ocspclnt/PKIX. Bug 395093: pkix_pl_HttpCertStore_ProcessCertResponse is unable to process certs in DER format Bug 395224: Don't reject certs with critical NetscapeCertType
extensions in libPKIX Bug 395427: PKIX_PL_Initialize must not call NSS_Init Bug 395850: build of libpkix tests creates links to nonexistant shared libraries and breaks windows build Bug 398401: Memory leak in PKIX init. Bug 399326: libpkix is unable to validate cert for certUsageStatusResponder Bug 400947: thread unsafe operation in PKIX_PL_HashTable_Add cause selfserv to crash. Bug 402773: Verify the list ...
...e Bug 422859: libPKIX builds & validates chain to root not in the caller-provided anchor list Bug 425516: need to destroy data pointed by CERTValOutParam array in case of error Bug 426450: PKIX_PL_HashTable_Remove leaks hashtable key object Bug 429230: memory leak in pkix_CheckCert function Bug 392696: Fix copyright boilerplate in all new PKIX code Bug 300928: Integrate libpkix to NSS Bug 303457:
extensions newly supported in libpkix must be marked supported Bug 331096: NSS Softoken must detect forks on all unix-ish platforms Bug 390710: CERTNameConstraintsTemplate is incorrect Bug 416928: DER decode error on this policy extension Bug 375019: Cache-enable pkix_OcspChecker_Check Bug 391454: libPKIX does not honor NSS's override trust flags Bug 403682: CERT_PKIXVerifyCert never succeeds Bug 324744: ad...
...And 2 more matches
nsIFilePicker
itting 'Cancel' returnReplace 2 The user chose an existing file and acknowledged that they want to overwrite the file Filter constants These constants are used to create filters for commonly-used file types. For the most up to date list see filepicker.properties. Constant Value Description filterAll 0x001 Corresponds to the *.* filter for file
extensions. All files will pass through the filter. filterHTML 0x002 Corresponds to the *.html, *.htm, *.shtml and *.xhtml filters for file
extensions. filterText 0x004 Corresponds to the *.txt and *.text filter for file
extensions. filterImages 0x008 Corresponds to the *.jpe, *.jpg, *.jpeg, *.gif, *.png, *.bmp, *.ico, *.svg, *.svgz, *.tif, *.tiff, *.ai, *.drw, *...
...lterHTML 0x002 Corresponds to the *.html, *.htm, *.shtml and *.xhtml filters for file
extensions. filterText 0x004 Corresponds to the *.txt and *.text filter for file
extensions. filterImages 0x008 Corresponds to the *.jpe, *.jpg, *.jpeg, *.gif, *.png, *.bmp, *.ico, *.svg, *.svgz, *.tif, *.tiff, *.ai, *.drw, *.pct, *.psp, *.xcf, *.psd and *.raw filters for file
extensions. filterXML 0x010 Corresponds to the *.xml filter for file
extensions. filterXUL 0x020 Corresponds to the *.xul filter for file
extensions. filterApps 0x040 Corresponds to the platform specific application filter for file
extensions. Application files for the user's platform will pass through the filter. filterAllowURLs 0x80 Allow URLs. ...
... Methods appendFilter() Appends a custom file extension filter to the dialog. ...
...And 2 more matches
Mozilla
s 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 commands by hand. It's your choice! Creating a Login Manager storage module The Login Manager manages and stores user passwords.
Extensions can replace the built-in password storage with their own implementation. This can be useful if you want to integrate a gecko application's password management with an existing password management system, or use 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...
...lowing C++ code to pass messages between processes or threads in an organized and secure way. All messages for multi-process plugins and tabs in Firefox are declared in the IPDL language. JavaScript code modules JavaScript code modules let multiple privileged JavaScript scopes share code. For example, a module could be used by Firefox itself as well as by
extensions, in order to avoid code duplication. JavaScript libraries from Mozilla projects In addition to Firefox and other applications, Mozilla developers have created a number of useful JavaScript libraries you can use in your projects. Documentation for these libraries can be found here. JavaScript Tips JavaScript-DOM Prototypes in Mozilla ...
...u the opportunity not only to use very powerful and complete DOM support, but also to work on a world-class implementation of one of the greatest Internet technologies ever created. Mozilla external string guide The Mozilla codebase used to have a notion of "external" strings, which were the string classes visible to code outside of the Mozilla codebase (
Extensions, XULRunner applications, and embedders). These classes were removed a long time ago. The only remaining string classes are the "internal" ones, which are documented XPCOM Guide Internal strings. Mozilla Framework Based on Templates (MFBT) The Mozilla Framework Based on Templates ("mfbt") is the central repository for macros, functions, and data structures...
...And 2 more matches
Writing WebSocket servers - Web APIs
ection. So, you must know how to interpret the client's request. The client will send a pretty standard HTTP request with headers that looks like this (the HTTP version must be 1.1 or greater, and the method must be GET): GET /chat HTTP/1.1 Host: example.com:8000 Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Version: 13 The client can solicit
extensions and/or subprotocols here; see Miscellaneous for details. Also, common headers like User-Agent, Referer, Cookie, or authentication headers might be there as well. Do whatever you want with those; they don't directly pertain to the WebSocket. It's also safe to ignore them. In many common setups, a reverse proxy has already dealt with them. Tip: All browsers send an Origin header. You can use this...
...t must be masked, so your server must expect this to be 1. (In fact, section 5.1 of the spec says that your server must disconnect from a client if that client sends an unmasked message.) When sending a frame back to the client, do not mask it and do not set the mask bit. We'll explain masking later. Note: You must mask messages even when using a secure socket. RSV1-3 can be ignored, they are for
extensions. The opcode field defines how to interpret the payload data: 0x0 for continuation, 0x1 for text (which is always encoded in UTF-8), 0x2 for binary, and other so-called "control codes" that will be discussed later. In this version of WebSockets, 0x3 to 0x7 and 0xB to 0xF have no meaning. The FIN bit tells whether this is the last message in a series. If it's 0, then the server keeps listening fo...
...nnection either the client or server can send a control frame with data containing a specified control sequence to begin the closing handshake (detailed in Section 5.5.1). Upon receiving such a frame, the other peer sends a Close frame in response. The first peer then closes the connection. Any further data received after closing of connection is then discarded. Miscellaneous WebSocket codes,
extensions, subprotocols, etc. are registered at the IANA WebSocket Protocol Registry. WebSocket
extensions and subprotocols are negotiated via headers during the handshake. Sometimes
extensions and subprotocols very similar, but there is a clear distinction.
Extensions control the WebSocket frame and modify the payload, while subprotocols structure the WebSocket payload and never modify anything. Extensi...
...And 2 more matches
Evolution of HTTP - HTTP
r: https://developer.mozilla.org/docs/Glossary/Simple_header 200 OK Age: 9578461 Cache-Control: public, max-age=315360000 Connection: keep-alive Content-Length: 3077 Content-Type: image/png Date: Thu, 31 Mar 2016 13:34:46 GMT Last-Modified: Wed, 21 Oct 2015 18:27:50 GMT Server: Apache (image content of 3077 bytes) HTTP/1.1 was first published as RFC 2068 in January 1997. More than 15 years of
extensions Thanks to its extensibility - creating new headers or methods is easy - and even if the HTTP/1.1 protocol was refined over two revisions, RFC 2616 published in June 1999 and the series of RFC 7230-RFC 7235 published in June 2014 in prevision of the release of HTTP/2, this protocol has been extremely stable over more than 15 years. Using HTTP for secure transmissions The largest change that hap...
...-Lee for the Web wasn't a read-only medium. He envisioned a Web where people can add and move documents remotely, a kind of distributed file system. Around 1996, HTTP has been extended to allow authoring, and a standard called WebDAV was created. It has been further extended for specific applications like CardDAV to handle address book entries and CalDAV to deal with calendars. But all these *DAV
extensions had a flaw: they had to be implemented by the servers to be used, which was quite complex. Their use on Web realms stayed confidential. In 2000, a new pattern for using HTTP was designed: representational state transfer (or REST). The actions induced by the API were no more conveyed by new HTTP methods, but only by accessing specific URIs with basic HTTP/1.1 methods. This allowed any Web applica...
... allowed any Web application to provide an API to allow retrieval and modification of its data without having to update the browsers or the servers: all what is needed was embedded in the files served by the Web sites through standard HTTP/1.1. The drawback of the REST model resides in the fact that each website defines its own non-standard RESTful API and has total control on it; unlike the *DAV
extensions were clients and servers are interoperable. RESTful APIs became very common in the 2010s. Since 2005, the set of APIs available to Web pages greatly increased and several of these APIs created
extensions, mostly new specific HTTP headers, to the HTTP protocol for specific purposes: Server-sent events, where the server can push occasional messages to the browser. WebSocket, a new protocol tha...
...And 2 more matches
HTTP Index - HTTP
t sub-documents fetched, for instance text, layout description, images, videos, scripts, and more 4 Basics of HTTP Guide, HTTP, Overview HTTP is a pretty extensible protocol. It relies on a few basic concepts like the notion of resources and URIs, a simple structure of messages, and a client-server structure for the communication flow. On top of these basic concepts, numerous
extensions have appeared over the years, adding new functionality and new semantics by creating new HTTP methods or headers. 5 Choosing between www and non-www URLs Guide, HTTP, URL A recurring question among website owners is whether to choose non-www or www URLs. This page provides some advice on what's best. 6 Data URLs Base64, Guide, HTTP, Intermediate, URL Data...
...a document, a photo, or anything else. Each resource is identified by a Uniform Resource Identifier (URI) used throughout HTTP for identifying resources. 9 MIME types (IANA media types) Content-Type, Guide, HTTP, MIME Types, Meta, Request header, Response Header, application/javascript, application/json, application/xml A media type (also known as a Multipurpose Internet Mail
Extensions or MIME type) is a standard that indicates the nature and format of a document, file, or assortment of bytes. 10 Incomplete list of MIME types Audio, File Types, Files, HTTP, MIME, MIME Types, PHP, Reference, Text, Types, Video Here is a list of MIME types, associated by type of documents, ordered by their common
extensions. 11 Resource URLs Guide, HTTP, Interm...
...0 Incomplete list of MIME types Audio, File Types, Files, HTTP, MIME, MIME Types, PHP, Reference, Text, Types, Video Here is a list of MIME types, associated by type of documents, ordered by their common
extensions. 11 Resource URLs Guide, HTTP, Intermediate, Resource Resource URLs, URLs prefixed with the resource: scheme, are used by Firefox and Firefox browser
extensions to load resources internally, but some of the information is available to sites the browser connects to as well. 12 Browser detection using the user agent Compatibility, HTTP, Web Development Serving different Web pages or services to different browsers is usually a bad idea. The Web is meant to be accessible to everyone, regardless of which browser or device they're using. T...
...And 2 more matches
HTTP resources and specifications - HTTP
This page lists relevant resources about HTTP. ...
...nsfer Protocol (HTTP/1.1): Semantics and Content Proposed Standard RFC 7232 Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests Proposed Standard RFC 7233 Hypertext Transfer Protocol (HTTP/1.1): Range Requests Proposed Standard RFC 7234 Hypertext Transfer Protocol (HTTP/1.1): Caching Proposed Standard RFC 5861 HTTP Cache-Control
Extensions for Stale Content Informational RFC 8246 HTTP Immutable Responses Proposed Standard RFC 7235 Hypertext Transfer Protocol (HTTP/1.1): Authentication Proposed Standard RFC 6265 HTTP State Management Mechanism Defines Cookies Proposed Standard Draft spec Cookie Prefixes IETF Draft Draft spec Same-Site Cookies IETF Draf...
...Modern APIs for application are defines using the RESTful pattern nowadays. Proposed Standard RFC 2324 Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) April 1st joke spec RFC 7168 The Hyper Text Coffee Pot Con...
...And 2 more matches
Unicode property escapes - JavaScript
Syntax The following section is also duplicated on this cheatsheet. Do not forget to edit it as well, thanks! // Non-binary values \p{UnicodePropertyValue} \p{UnicodePropertyName=UnicodePropertyValue} // Binary and non-binary values \p{UnicodeBinaryPropertyName} // Negation: \P is negated \p \P{UnicodePropertyValue} \P{UnicodeBinaryPropertyName} General_Category (gc) Script (sc) Script_
Extensions (scx) See also PropertyValueAliases.txt UnicodeBinaryPropertyName The name of a binary property. E.g.: ASCII, Alpha, Math, Diacritic, Emoji, Hex_Digit, Math, White_space, etc. See Unicode Data PropList.txt for more info. UnicodePropertyName The name of a non-binary property: UnicodePropertyValue One of the tokens listed in the Values section, below. Many values have aliases or shorthan...
...For instance, English and Spanish are written using the Latin script while Arabic and Russian are written with other scripts (respectively Arabic and Cyrillic). The Script and Script_
Extensions Unicode properties allow regular expression to match characters according to the script they are mainly used with (Script) or according to th...
...uivalent (conjunction of all the subcategories using short aliases) story.match(/\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}/gu); Scripts and script
extensions Some languages use different scripts for their writing system. For instance, English and Spanish are written using the Latin script while Arabic and Russian are written with other scripts (respectively Arabic and Cyrillic). The Script and Script_
Extensions Unicode properties allow regular expression to match characters according to the script they are mainly used with (Script) or according to the set of scripts they belong to (Script_
Extensions). For example, A belongs to the Latin script and ? to the Greek script. let mixedCharacters = "a??"; // Using the canonical "long" name of the script mixedCharacters.match(/\p{Script=Latin}/u); // a // U...
...And 2 more matches
Object.isFrozen() - JavaScript
all its properties are non-configurable, and all its data properties (that is, properties which are not accessor properties with getter or setter components) are non-writable. Examples Using Object.isFrozen // A new object is extensible, so it is not frozen. Object.isFrozen({}); // === false // An empty object which is not extensible // is vacuously frozen. ...
...ew object is extensible, so it is not frozen. Object.isFrozen({}); // === false // An empty object which is not extensible // is vacuously frozen. var vacuouslyFrozen = Object.prevent
Extensions({}); Object.isFrozen(vacuouslyFrozen); // === true // A new object with one property is also extensible, // ergo not frozen. var oneProp = { p: 42 }; Object.isFrozen(oneProp); // === false // Preventing
extensions to the object still doesn't // make it frozen, because the property is still // configurable (and writable). Object.prevent
Extensions(oneProp); Object.isFrozen(oneProp); // === false // ...but then deleting that property makes the object // vacuously frozen. delete oneProp.p; Object.isFrozen(oneProp); // === true // A non-extensible object with a non-writable // but still configurable property ...
...operty is still // configurable (and writable). Object.prevent
Extensions(oneProp); Object.isFrozen(oneProp); // === false // ...but then deleting that property makes the object // vacuously frozen. delete oneProp.p; Object.isFrozen(oneProp); // === true // A non-extensible object with a non-writable // but still configurable property is not frozen. var nonWritable = { e: 'plep' }; Object.prevent
Extensions(nonWritable); Object.defineProperty(nonWritable, 'e', { writable: false }); // make non-writable Object.isFrozen(nonWritable); // === false // Changing that property to non-configurable // then makes the object frozen. Object.defineProperty(nonWritable, 'e', { configurable: false }); // make non-configurable Object.isFrozen(nonWritable); // === true // A non-extensible object with a non-con...
...And 2 more matches
Media container formats (file types) - Web media technologies
used by WebRTC for information about codecs commonly used for making WebRTC calls, as well as browser compatibility information around codec support in WebRTC. Common container formats While there are a vast number of media container formats, the ones listed below are the ones you are most likely to encounter. Some support only audio while others support both audio and video. ...
...For example, an Ogg file with only an Opus audio track is sometimes referred to as an Opus file, and might even have the extension .opus. But it's still actually just an Ogg file. ...
... Chrome 6, Edge 173 (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 ...
...And 2 more matches
preferences/service - Archive of obsolete content
ice gives you full access to the preferences system. You can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the Add-on Manager. Globals Functions set(name, value) Sets the application preference name to value. Parameters name : string Preference name. value : string,number,boolean Preference value. Example: var name = "
extensions.checkCompatibility.nightly"; require("sdk/preferences/service").set(name, false); get(name, defaultValue) Gets the application preference name. Parameters name : string defaultValue : string,number,boolean Preference value. Returns string,number,boolean : Preference value, returns defaultValue if no preference is set, returns undefined if defaultValue is not provided. Example: var name ...
...eckCompatibility.nightly"; require("sdk/preferences/service").set(name, false); get(name, defaultValue) Gets the application preference name. Parameters name : string defaultValue : string,number,boolean Preference value. Returns string,number,boolean : Preference value, returns defaultValue if no preference is set, returns undefined if defaultValue is not provided. Example: var name = "
extensions.checkCompatibility.nightly"; var nightlyCompatChk = require("sdk/preferences/service").get(name); has(name) Parameters name : string Preference name. Returns boolean : Returns whether or not the application preference name exists. defaultValue Example: var name = "
extensions.checkCompatibility.nightly"; if (require("sdk/preferences/service").has(name)) { // ... } keys(root) Parameter...
...ing Preference root name. Returns array : Returns an array of strings representing the child preferences of the root of this branch. isSet(name) Parameters name : string Preference name. Returns boolean : Returns whether or not the application preference name both exists and has been set to a non-default value by the user (or a program acting on the user's behalf). ...
... Parameters name : string defaultValue : string Preference value. Returns string : Localized preference value, returns a default value if no preference is set. Some preferences refer to a properties file. ...
Firefox addons developer guide - Archive of obsolete content
The Firefox add-ons developer guide was contributed by the Mozilla Japan community; it covers how to go about building Firefox
extensions using XPCOM and XUL. These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach. ...
... The Firefox add-ons developer guide was contributed by the Mozilla Japan community; it covers how to go about building Firefox
extensions using XPCOM and XUL. These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach. ...
... The Firefox add-ons developer guide was contributed by the Mozilla Japan community; it covers how to go about building Firefox
extensions using XPCOM and XUL. These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach. ...
...using XPCOM and XUL. These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach. ...
Intercepting Page Loads - Archive of obsolete content
and filtering by URL. You can also use these in conjunction with nsITraceableChannel to get and modify the response text before it gets to the original requester. You won't be able to make DOM modifications like with the load events, since these notifications are triggered before the response arrives and is parsed into DOM tree, so this is not the best approach for the typical Greasemonkey-style
extensions. Notes on usage: Efficiency is very important when adding HTTP observers. Remember that your observe method will be called for every HTTP request made by Firefox, usually several dozen per page visit. In the previous example, one of the first things we do is check if the URL is of interest to us, otherwise we let it go. Avoid heavy, time-consuming operations, or the user's browsing experience w...
...s.DOMWindow != aWebProgress.DOMWindow.top) { // this is a frame. } In this case, the URL can be obtained from aRequest.name. Make sure you access it from inside the state validation if condition. There may be other cases where accessing this property will throw an exception. Canceling the request works just like with onLocationChange. See "Recognizing page load failure" at mozilla.dev.
extensions for tips on detecting connection failures and HTTP response codes. XPCOM Solutions There are a couple more solutions you may be interested in trying if the previous ones are insufficient. These require creating XPCOM components that implement existing Firefox interfaces. They may be useful in case you have most of your application logic in XPCOM, or if you absolutely need a single point of i...
...you don't have to worry about adding and removing listeners every time a tab is opened or closed. This also has the advantage of detecting page loads anywhere in the application, not only in browser windows. If you are building a web filtering extension, you should keep in mind that XUL windows such as the DOM Inspector window and the Add-ons Manager window allow (limited) web navigation. Other
extensions might add XUL windows that allow navigation as well, so in those cases it's best to use a global solution like this one. Content Policy Finally, there is the option of implementing nsIContentPolicy. You can create an XPCOM component that extends nsIContentPolicy and register it to the "content-policy" category using the nsICategoryManager. The nsIContentPolicy.shouldLoad() method is the only o...
... a very clean cancel operation. This characteristic brings 2 limitations to this approach. The first one is that you can't easily read or modify the content to be loaded. The second one is that shouldLoad is not invoked for redirects. You only get one call, for the first URL requested. If you let it pass, it can redirect anywhere without you noticing it. This approach is used in popular filtering
extensions, such as AdBlock Plus. We recommend you look into the other solutions first, though. Maybe a combination of some or all of these will be what your extension needs. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Introduction - Archive of obsolete content
XUL School Tutorial! This tutorial is meant to be the stepping stone that will turn you into a professional Firefox extension developer in no time. We have poured years of XUL experience into it, providing many solutions for problems extension developers commonly run into. XUL School was created by Appcoast (formerly Glaxstar), one of the few companies dedicated to building high-quality Firefox
extensions. A team of over a dozen XUL developers conformed Glaxstar at the time this tutorial was created, and the combined experiences of years creating Firefox
extensions are reflected here. With this tutorial you'll learn how to develop Firefox
extensions. You'll learn how to quickly do the most common tasks in extension development, comparing several different approaches to solve them. In most cases w...
...The tutorial aims to be as brief as possible, often falling back on Mozilla documentation for more detailed information. You can think of it as a quick guide to the expansive world that is the Mozilla platform. Most links in this documentation are meant to be clicked and read. ...
...dards-compliance and sophistication of open source with the focus on user experience and powerful outreach more commonly seen in less open companies. Version 1.0 of Firefox was released in November 2004, version 2.0 in October 2006, and version 3.0 in June 2008. This tutorial was written after Firefox 3 was released, and has been updated with time. While most of it should still work for creating
extensions in Firefox 3 (and even Firefox 2), it is strongly recommended that you aim to support modern Firefox versions, to encourage users to stay up to date with security fixes. A release that is more than 6 months old is likely vulnerable to published security bugs. Firefox and other Mozilla applications can be seen as composed of two different parts: a user interface layer that is distinct for each pr...
...her Mozilla applications can be seen as composed of two different parts: a user interface layer that is distinct for each project, and a common platform on top of which the interface layer is built. The user interface is built with technology known as XUL, and the platform is known as XULRunner. XUL XUL (pronounced "zool") is one of many technologies used for creating Mozilla-based products and
extensions. It is only one part of the development landscape, but given that it's practically exclusive to Mozilla, it tends to be used to identify all Mozilla-related development. You'll sometimes read terms like "XUL applications" and "XUL
extensions", but rarely will they refer to projects that are exclusively built with XUL. It usually means that the projects were built using Mozilla technologies. Even ...
Tabbed browser - Archive of obsolete content
hin the Firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the XUL sense of a browser element. Furthermore another meaning of 'browser' in this document and in some Firefox source is "the tabbrowser element" in a Firefox XUL window. Getting access to the browser From main window Code running in Firefox's global ChromeWindow, common for
extensions that overlay into browser.xul, can access the tabbrowser element using the global variable gBrowser. // gBrowser is only accessible from the scope of // the browser window (browser.xul) gBrowser.addTab(...); If gBrowser isn't defined your code is either not running in the scope of the browser window or running too early. You can access gBrowser only after the browser window is fully loaded. If...
... attributes: {}, image: null })); Reusing tabs Rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already displays the desired URL--if one is already open. Following this practice minimizes the proliferation of tabs and browsers created by your extension. Reusing by URL/URI A common feature found in many
extensions is to point the user to chrome:// URIs in a browser window (for example, help or about information) or external (on-line http(s)://) HTML documents when the user clicks an extension's button or link. The following code demonstrates how to re-use an existing tab that already displays the desired URL/URI. If no such tab exists, a new one is opened with the specified URL/URI. function openAndReuseO...
...HttpChannel); //i used nsIHttpChannel but i guess you can use nsIChannel, im not sure why though var interfaceRequestor = oHttp.notificationCallbacks.QueryInterface(Components.interfaces.nsIInterfaceRequestor); //var DOMWindow = interfaceRequestor.getInterface(Components.interfaces.nsIDOMWindow); //not to be done anymore because: https://developer.mozilla.org/docs/Updating_
extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request //instead do the loadContext stuff below var loadContext; try { loadContext = interfaceRequestor.getInterface(Components.interfaces.nsILoadContext); } catch (ex) { try { loadContext = aSubject.loadGroup.notificationCallbacks.getInterface(Components.interfac...
...ttpChannel = subject.QueryInterface(Ci.nsIHttpChannel);" //start loadContext stuff var loadContext; try { var interfaceRequestor = httpChannel.notificationCallbacks.QueryInterface(Ci.nsIInterfaceRequestor); //var DOMWindow = interfaceRequestor.getInterface(Components.interfaces.nsIDOMWindow); //not to be done anymore because: https://developer.mozilla.org/docs/Updating_
extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request //instead do the loadContext stuff below try { loadContext = interfaceRequestor.getInterface(Ci.nsILoadContext); } catch (ex) { try { loadContext = subject.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext); } catch (ex2) {} } } catch (ex0) {} if ...
Using Dependent Libraries In Extension Components - Archive of obsolete content
The Firefox extension system does not provide automatic support for loading these dependent libraries, but it is possible to load these libraries explicitly using a component stub. The basic strategy of the stub is to dynamically load the dependent libraries, then load the component library and continue 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. ...
...l" 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 = @srcdir@ topsrcdir = @top_srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = bsmedberg LIBRARY_NAME = bsmedberg_stub IS_COMPONENT = 1 FORCE_SHARED_LIB = 1 REQUIRES = \ xpcom \ string \ $(NULL) CPPSRCS = bdsStubLoader.cpp EXTRA_DSO_LDOPTS += \ $(DIST)/lib/$(LIB_PREFIX...
...)/config/autoconf.mk MODULE = bsmedberg LIBRARY_NAME = bsmedberg_stub IS_COMPONENT = 1 FORCE_SHARED_LIB = 1 REQUIRES = \ xpcom \ string \ $(NULL) CPPSRCS = bdsStubLoader.cpp EXTRA_DSO_LDOPTS += \ $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(XPCOM_FROZEN_LDOPTS) \ $(NSPR_LIBS) \ $(NULL) include $(topsrcdir)/config/rules.mk DEFINES += -DMOZ_DLL_PREFIX=\"$(DLL_PREFIX)\"
extensions/stub/bdsStubLoader.cpp // Copyright (c) 2005 Benjamin Smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsModule.h" #include "prlink.h" #include "nsILocalFile.h" #include "nsStringAPI.h" #include "nsCOMPtr.h" static char const *const kDependentLibraries[] = { // dependent1.dll on windows, libdependent1.so on linux MOZ_DLL_PREFIX "dependent1" MOZ_DLL_SUFFIX, MOZ_DLL_PREFIX "d...
...don't care about that either. } library->SetNativeLeafName(NS_LITERAL_CSTRING(kRealComponent)); PRLibrary *lib; rv = library->Load(&lib); if (NS_FAILED(rv)) return rv; nsGetModuleProc getmoduleproc = (nsGetModuleProc) 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...
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. In particular, changing the location bar search keyword URL in a way which is not automatically reset when the add-on is removed will result in a reset prompt for users. ...
...ng 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 reverted when the extension is disabled if they have not been changed in the meantime. While changes to default preference values will not persist across sessions, restartless
extensions must nevertheless restore them for the balance of the session after they have been disabled. The following example bootstrap.js file illustrates the method: const...
...storing the previous default when your extension is uninstalled). Adding a New Search Engine Search engines may be added either directly via an API call, or indirectly via an XML description file. While the former is the simpler method, it does not support complex descriptions containing suggestion URLs or separate keyword search URLs. Note: Example uninstall code is only provided for restartless
extensions. A separate tutorial exists for running code at uninstall in non-restartless
extensions. An example bootstrap.js file illustrating the simple method follows: const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; // Import the Services module. Cu.import("resource://gre/modules/Services.jsm"); // The details of the engine to add const ENGINE_DETAILS = { name: "Example En...
...e the engine if it appears to be the same one we // added. if (engine && engine.getSubmission("_searchTerms_").uri.spec == ENGINE_DETAILS.url) Services.search.removeEngine(engine); } } function install() {} function uninstall() {} The complex method requires two files, an XML search description file and a JavaScript file to register the engine. In non-restartless
extensions, the XML search description may instead simply be placed in the searchplugins/ directory in the root of your XPI, as em:unpack is specified in your install.rdf file. As above, install and uninstall code is only provided for restartless add-ons but can be adapted for traditional add-ons. search.xml <?xml version="1.0" encoding="UTF-8"?> <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/sear...
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. ...
...sion 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 supporting application. (>=2.0) /chrome.manifest Chrome Registration Manifest (>=1.8) /components/* XPCOM components (*.js, *.dll), and interface files from *.xpt (>=1.7) /defaults/preferences/*.js Default Preferences (>=1.7) /plugins/* NPAPI Plugins (>=1.8) /chrome/icons/default/* Window Icons (>...
...esses 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. ...
...RGET}_{TARGET_XPCOM_ABI}/). When default preferences are defined in several directories, the ones loaded later overwrite the earlier ones. ...
Creating a Firefox sidebar extension - Archive of obsolete content
s some GUI creation and registration in the destination application. First a simple XUL page is created. Then the registration files are made and finally the sidebar is packed into an installable XPI file. Pre-requisites This article is a quick start, it won't explain all elements of XUL, packaging and XPI's. It's preferable you have some basic knowledge of how XUL works and how Firefox handles
extensions. See Building an Extension for more detailed information about structuring, packaging, and deploying
extensions. Packages
Extensions to Firefox are installed with packages ("Bundles"). 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 structu...
...This is an separate XUL file that specifies the location of menu items. The sidebar here is added to the View | Sidebar menu. The overlay file is listed in Example 4. Example 4. chrome/content/firefoxOverlay.xul <?xml version="1.0"?> <!DOCTYPE overlay SYSTEM "chrome://emptysidebar/locale/emptysidebar.dtd"> <o...
...locale emptysidebar en-US chrome/locale/ skin emptysidebar classic/1.0 chrome/skin/ overlay chrome://browser/content/browser.xul chrome://emptysidebar/content/firefoxOverlay.xul Test While you're developing your sidebar, you will need to test it frequently from Firefox. There is a simple way to do this. First, we need to tell Firefox about your extension. Open your Profile Folder Open the
extensions folder (create it if it doesn't exist) Create a new text file, and put the path to your extension folder inside, e.g. C:\
extensions\myExtension or ~/
extensions/myExtension. Save the file with the id of your extension as its name, e.g. emptysidebar@yourdomain.com Now you're ready to test your extension! Restart Firefox and the sidebar is included in the menu. You can now go back and make cha...
...e folder containing emptysidebar.xpi. Click on the file and the Extension installation window pops up. After a restart of Firefox, the sidebar is installed. You can download the empty sidebar project to use as a basis for your own sidebars. The EmptySidebar extension Resources Code snippets:Sidebar Building an Extension Creating Applications with Mozilla Packaging Firefox/Thunderbird
Extensions Creating a Firefox 1 Sidebar Original Document Information Author: J.C. Wesdorp <jcwesdorp . at . occidopagus.nl> - May 30, 2005. Updated for Firefox 2 - Dec 12, 2006. Permission granted to migrate in Jan 2006, including permission to relicense under the CC:By-SA. Original Source: http://occidopagus.nl/firefox/emptysidebar/ ...
Introduction to XUL - Archive of obsolete content
and included in the XUL file <html:script language="javascript" src="our.js"/> or relegated to the contents of a CDATA section, to prevent the XML parser from choking on JavaScript which may look like XML content (a < character, for instance.) <html:script type="application/javascript"> <![CDATA[ function lesser(a,b) { return a < b ? ...
... DOM
Extensions Since XUL is not the same thing as HTML, while XUL documents will support the DOM Level 1 Core API, they...
....) <html:script type="application/javascript"> <![CDATA[ function lesser(a,b) { return a < b ? a : b; } ]]> </html:script> JavaScript
Extensions Mozilla has found it necessary to make a few
extensions to JavaScript, to support new features not conceived of in a strictly browser environment. These are currently nonstandard, of course, and subject to change for now. Individual
extensions are described in individual documents dedicated to the features requiring the
extensions. DOM
Extensions Since XUL is not the same thing as HTML, while XUL documents will support the DOM Level 1 Core API, they will not support the DOM Level 1 HTML API. However, Mozilla supports extended DOM functionality for the XUL content model, patterned after the HTML
extensions. At this time these addition...
...types unique to itself, which add functionality to the window. Widgets Widgets are generally objects like form controls: buttons, text boxes, tree controls and the like. A window can just as easily contain HTML form elements (using the html namespace) like any HTML content (though there is no need to put them within a FORM element). In fact, XUL largely uses extant widgets from HTML, with a few
extensions and additions. Each widget will define a unique XML syntax for describing itself; see the widget documentation referenced at the index for details. Other Infrastructure Widgets may have JavaScript event handlers just as in HTML, and are tied together using JavaScript and broadcaster nodes. Broadcaster nodes are declared as <broadcaster> elements in the XUL description, and are involved with the...
Archived Mozilla and build documentation - Archive of obsolete content
zilla HTTP implementation. Introducing the Audio API extension The Audio Data API extension extends the HTML5 specification of the <audio> and <video> media elements by exposing audio metadata and raw audio data. This enables users to visualize audio data, to process this audio data and to create new audio data. Java in Firefox
Extensions If you are in need of calling Java code from within a Firefox extension, you can make use of LiveConnect. LiveConnect gives your extension's JavaScript code (linked from or contained in XUL code) access to 2 objects: java and Packages (note that per this thread, although the new documentation for the LiveConnect reimplementation states that these ...
...These 2 objects let you make use of the standard JDK classes, e.g., JavaScript crypto Mozilla defines a special JavaScript object to allow web pages access to certain cryptographic-related services. These services are a balance between the functionality web pages need and the requirement to protect users from malicious web sites. Most of these servi...
...ould 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! Structure of an installable bundle 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. Supporting private browsing mode Firefox 3.5 introduced private browsing mode, in which potentially private information is not recorded. This includes cookies, history information,...
...tscape 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. Video presentations Mozilla is actively working to produce video presentations that can help you learn how the Mozilla codebase works and how to take advantage of its technology in your own applications and
extensions. This article is a jumping-off point to help you find those presentations. Gecko - the Smart Embedding Choice xbDesignMode.js XML in Mozilla Mozilla has a relatively good support for XML. Several World Wide Web Consortium (W3C) Recommendations and drafts from the XML family of specifications are supported, as well as ot...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
ions. 60 Cacheable Glossary, WebMechanics A cacheable response is an HTTP response that can be cached, that is stored to be retrieved and used later, saving a new request to the server. Not all HTTP responses can be cached, these are the following constraints for an HTTP response to be cached: 61 CalDAV CalDAV, Glossary, Infrastructure CalDAV (Calendaring
extensions to WebDAV) is a protocol standardized by the IETF and used to remotely access calendar data from a server. 62 Call stack Call Stack, CodingScripting, Glossary, JavaScript A call stack is a mechanism for an interpreter (like the JavaScript interpreter in a web browser) to keep track of its place in a script that calls multiple functions -- what function is currently being run ...
...sy compression for digital images. 239 JSON CodingScripting, Glossary, Intro, JSON, l10n:priority JavaScript Object Notation (JSON) is a data-interchange format. Although not a strict subset, JSON closely resembles a subset of JavaScript syntax. Though many programming languages support JSON, JSON is especially useful for JavaScript-based apps, including websites and browser
extensions. 240 Jank Beginner, CodingScripting, Glossary, Performance, Web Performance Jank refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes. 241 Java CodingScripting, Glossary, Java, Programming Language Java is a compiled, object-...
...ure WebAssembly (abbr. Wasm) is an open binary programming format that can be run in modern web browsers in order to gain performance and/or provide new features for web pages. 493 WebDAV Glossary, Infrastructure WebDAV (Web Distributed Authoring and Versioning) is an HTTP Extension that lets web developers update their content remotely from a client. 494 Web
Extensions CodingScripting, Glossary, NeedsContent, Web
Extensions Web
Extensions is a cross-browser system for developing browser
extensions in Firefox. This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google Chrome, Opera Browser, and Microsoft Edge . 495 WebGL Advanced, CodingScripting, Glossary, Web Graphics, WebGL ...
...nt that has undergone lossy compression should generally not be further edited. 523 markup Glossary, Intro, Markup, NeedsContent A markup language is one that is designed for defining and presenting text. HTML (HyperText Markup Language), is an example of a markup language. 524 mime Beginner, Glossary, Infrastructure, MIME MIME "Multipurpose internet mail
extensions" is a standard to describe documents in other forms beside ASCII text, e.g. audio, video and images. Initially used for E-Mail attachments, it has become the de facto standard to define types of documents anywhere. 525 minification Glossary, Performance, Reference, Web Performance Minification is the process of removing unnecessary or redundant data without affecting how a re...
Certificate functions
and later CERT_FindKeyUsageExtension MXR 3.4 and later CERT_FindSMimeProfile MXR 3.2 and later CERT_FindSubjectKeyIDExtension MXR 3.7 and later CERT_FindUserCertByUsage MXR 3.4 and later CERT_FindUserCertsByUsage MXR 3.4 and later CERT_FinishCertificateRequestAttributes MXR 3.10 and later CERT_Finish
Extensions MXR 3.5 and later CERT_FormatName MXR 3.2 and later CERT_FreeDistNames MXR 3.2 and later CERT_FreeNicknames MXR 3.2 and later CERT_GetAVATag MXR 3.2 and later CERT_GetCertChainFromCert MXR 3.4 and later CERT_GetCertEmailAddress MXR 3.2 and later CERT_GetCertificateNames MXR 3.10 and late...
...T_FormatName MXR 3.2 and later CERT_FreeDistNames MXR 3.2 and later CERT_FreeNicknames MXR 3.2 and later CERT_GetAVATag MXR 3.2 and later CERT_GetCertChainFromCert MXR 3.4 and later CERT_GetCertEmailAddress MXR 3.2 and later CERT_GetCertificateNames MXR 3.10 and later CERT_GetCertificateRequest
Extensions MXR 3.10 and later CERT_GetCertIssuerAndSN MXR 3.2 and later CERT_GetCertNicknames MXR 3.2 and later CERT_GetCertTrust MXR 3.2 and later CERT_GetCertUid MXR 3.2 and later CERT_GetClassicOCSPDisabledPolicy MXR 3.12 and later CERT_GetClassicOCSPEnabledHardFailurePolicy MXR 3.12 and later CERT_Ge...
...cii MXR 3.2 and later CERT_Hexify MXR 3.2 and later CERT_ImportCAChain MXR 3.2 and later CERT_ImportCerts MXR 3.2 and later CERT_IsRootDERCert MXR 3.8 and later CERT_IsUserCert MXR 3.6 and later CERT_KeyFromDERCrl MXR 3.4 and later CERT_MakeCANickname MXR 3.4 and later CERT_Merge
Extensions MXR 3.10 and later CERT_NameToAscii MXR 3.2 and later CERT_NewCertList MXR 3.2 and later CERT_NewTempCertificate MXR 3.12 and later CERT_NicknameStringsFromCertList MXR 3.4 and later CERT_OpenCertDBFilename MXR 3.2 and later CERT_OCSPCacheSettings MXR 3.11.7 and later CERT_PKIXVerifyCert MX...
...tListNode MXR 3.6 and later CERT_RFC1485_EscapeAndQuote MXR 3.2 and later CERT_SaveSMimeProfile MXR 3.2 and later CERT_SetSlopTime MXR 3.2 and later CERT_SetOCSPFailureMode MXR 3.11.7 and later CERT_SetOCSPTimeout MXR 3.12 and later CERT_SetUsePKIXForValidation MXR 3.12 and later CERT_StartCert
Extensions MXR 3.5 and later CERT_StartCertificateRequestAttributes MXR 3.10 and later CERT_StartCRLEntry
Extensions MXR 3.10 and later CERT_StartCRL
Extensions MXR 3.10 and later CERT_UncacheCRL MXR 3.10 and later CERT_VerifyCertName MXR 3.2 and later CERT_VerifyCACertForUsage MXR 3.6 and later CERT_Verif...
NSS functions
and later CERT_FindKeyUsageExtension MXR 3.4 and later CERT_FindSMimeProfile MXR 3.2 and later CERT_FindSubjectKeyIDExtension MXR 3.7 and later CERT_FindUserCertByUsage MXR 3.4 and later CERT_FindUserCertsByUsage MXR 3.4 and later CERT_FinishCertificateRequestAttributes MXR 3.10 and later CERT_Finish
Extensions MXR 3.5 and later CERT_FormatName MXR 3.2 and later CERT_FreeDistNames MXR 3.2 and later CERT_FreeNicknames MXR 3.2 and later CERT_GetAVATag MXR 3.2 and later CERT_GetCertChainFromCert MXR 3.4 and later CERT_GetCertEmailAddress MXR 3.2 and later CERT_GetCertificateNames MXR 3.10 and late...
...T_FormatName MXR 3.2 and later CERT_FreeDistNames MXR 3.2 and later CERT_FreeNicknames MXR 3.2 and later CERT_GetAVATag MXR 3.2 and later CERT_GetCertChainFromCert MXR 3.4 and later CERT_GetCertEmailAddress MXR 3.2 and later CERT_GetCertificateNames MXR 3.10 and later CERT_GetCertificateRequest
Extensions MXR 3.10 and later CERT_GetCertIssuerAndSN MXR 3.2 and later CERT_GetCertNicknames MXR 3.2 and later CERT_GetCertTrust MXR 3.2 and later CERT_GetCertUid MXR 3.2 and later CERT_GetClassicOCSPDisabledPolicy MXR 3.12 and later CERT_GetClassicOCSPEnabledHardFailurePolicy MXR 3.12 and later CERT_Ge...
...cii MXR 3.2 and later CERT_Hexify MXR 3.2 and later CERT_ImportCAChain MXR 3.2 and later CERT_ImportCerts MXR 3.2 and later CERT_IsRootDERCert MXR 3.8 and later CERT_IsUserCert MXR 3.6 and later CERT_KeyFromDERCrl MXR 3.4 and later CERT_MakeCANickname MXR 3.4 and later CERT_Merge
Extensions MXR 3.10 and later CERT_NameToAscii MXR 3.2 and later CERT_NewCertList MXR 3.2 and later CERT_NewTempCertificate MXR 3.12 and later CERT_NicknameStringsFromCertList MXR 3.4 and later CERT_OpenCertDBFilename MXR 3.2 and later CERT_OCSPCacheSettings MXR 3.11.7 and later CERT_PKIXVerifyCert MX...
...tListNode MXR 3.6 and later CERT_RFC1485_EscapeAndQuote MXR 3.2 and later CERT_SaveSMimeProfile MXR 3.2 and later CERT_SetSlopTime MXR 3.2 and later CERT_SetOCSPFailureMode MXR 3.11.7 and later CERT_SetOCSPTimeout MXR 3.12 and later CERT_SetUsePKIXForValidation MXR 3.12 and later CERT_StartCert
Extensions MXR 3.5 and later CERT_StartCertificateRequestAttributes MXR 3.10 and later CERT_StartCRLEntry
Extensions MXR 3.10 and later CERT_StartCRL
Extensions MXR 3.10 and later CERT_UncacheCRL MXR 3.10 and later CERT_VerifyCertName MXR 3.2 and later CERT_VerifyCACertForUsage MXR 3.6 and later CERT_Verif...
XPCOM
atibilityIf Mozilla decides to upgrade to a compiler that does not have the same ABI as the current version, any built component may fail. It is a possiblity that is introduced when upgrading to a new compiler without recompiling everything. Effectively, it is a different platform.Bundling multiple binary componentsBinary XPCOM components are sometimes required to implement low-level features for
extensions. Since binary components are linked against a single Gecko SDK, a dependency to a particular version of Gecko is created. If the component uses only "frozen" XPCOM interfaces, there is a good chance the same binary component will work with different versions of Gecko (version 1.8 and 1.9, for example). The more likely case is that the component uses "unfrozen" interfaces and those interfaces can ...
...rovides a tutorial for making a simple JavaScript or C++ component (implementing the nsISimple interface). Here is how to make the same component in Python using PyXPCOM.Fun With XBL and XPConnectGenerating GUIDsGUIDs are used in Mozilla programming for identifying several types of entities, including XPCOM Interfaces (this type of GUIDs is callled IID), components (CID), and legacy add-ons--like
extensions and themes--that were created prior to Firefox 1.5. Add-ons can (and should) be identified with IDs of the form extensionname@organization.tld since Firefox 1.5.Generic factoryMost XPCOM factories can be very simple. Rick Potts wrote a templated-based generic factory (nsFactory<t>) that simplifies the factory creation process that just requires writing a CreateInstance() method. The new nsIGeneri...
... course of an application. Unless otherwise noted you register for the topics using the nsIObserverService.Setting HTTP request headersHTTP is one of the core technologies behind the Web. In addition to the actual content, some important information is passed with HTTP headers for both HTTP requests and responses.StorageStorage is a SQLite database API. It is available to trusted callers, meaning
extensions and Firefox components only.The Thread ManagerThe Thread Manager, introduced in Firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing. Troubleshooting XPCOM components registrationOften the first time you create an XPCOM component, it may fail to register correctly.Using nsCOMPtrThis document is the sum total of everything written down a...
...OM components written in a scripting language (such as JavaScript) can be moved across platforms (such as Windows and OS X) without adaptation, those written in a compiled language (such as C++) require recompilation when moving to a different platform. Often, compiled XPCOM components are called 'binary' or 'native'.XPCOM category image-sniffing-servicesIn versions of Firefox prior to Firefox 3,
extensions could add decoders for new image types. However, such decoders relied on servers sending correct MIME types; images sent with incorrect MIME types would not be correctly displayed.XPCOM glueThe XPCOM Glue is a static library which component developers and embedders can link against. It allows developers to link only against the frozen XPCOM method symbols and maintain compatibility with multiple ...
Building a Thunderbird extension 1: introduction
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. ...
... 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 are many tools available that help with developing Thunderbird
extensions. At a minimum you will need: Text editor: Any editor that is capable of writing plain text can be used to write
extensions. However, most developers use an editing program optimized for writing code (also known as an Integrated Development Environment). These provide features like syntax highlighting and code colo...
...editing program optimized for writing code (also known as an Integrated Development Environment). These provide features like syntax highlighting and code coloration, indentation, auto-complete, etc. File archive utility: Any utility that is capable of creating archive files can be used. ...
...ion, auto-complete, etc. File archive utility: Any utility that is capable of creating archive files can be used. There are also a number of extension and applications that are useful for testing and debugging Thunderbird
extensions, such as JavaScript consoles and XPCOM inspectors. These are described on the page "Setting up an extension development environment". Documentation Thunderbird
extensions (documentation overview) Firefox addons developer guide (many topics are applicable to Thunderbird) Mozilla cross-reference source code browser ("comm-central" contains the Thunderbird code repository) Community The Thunderbird development community has a mailing list with an extensive searchable archive with an extensive searchable archive. You can also talk with the community on the #maild...
Scripting plugins - Plugins
(A bit of history: NPAPI plugins that used to take advantage of being scriptable via LiveConnect in 4.x Netscape browsers lost this possibility in Mozilla (due to the JNI making the Netscape 4.x JRI obsolete). ...
... (A bit of history: NPAPI plugins that used to take advantage of being scriptable via LiveConnect in 4.x Netscape browsers lost this possibility in Mozilla (due to the JNI making the Netscape 4.x JRI obsolete). ...
...eObject) when the browser requests it by calling: NPP_GetValue(npp, NPPVpluginScriptableNPObject, ...); Accessing browser objects from a plugin A plugin that wishes to access objects in the browser window that loaded the plugin can do this by getting the NPObject for the browser's window object, or the DOM element that loaded the plugin. This is done by using an extension to NPN_GetValue. The
extensions are two additions to the NPNVariables enumeration; the new enumerations are NPNVWindowNPObject and NPNVPluginElementNPObject. Calling NPN_GetValue() with either of those new enumerations will return an NPObject representing the browser object, and from there, the functions in this API can be used to get and set properties, and to call methods on those browser objects. And as always when working ...
... new NPNVariable enumerations are defined in npapi.h as: NPNVWindowNPObject = 15, NPNVPluginElementNPObject = 16 How to call plugin native methods The following HTML code will do the job: <embed type="application/plugin-mimetype"> <script> var embed = document.embeds[0]; embed.nativeMethod(); alert(embed.nativeProperty); embed.nativeProperty.anotherNativeMethod(); </script> The API
extensions The API
extensions are based on four new structs: NPString NPVariant NPN_ReleaseVariantValue NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetIntIdentifier NPN_IdentifierIsString NPN_UTF8FromIdentifier NPN_IntFromIdentifier NPObject NPN_Construct (since Firefox 3.0b1) NPN_CreateObject NPN_RetainObject NPN_ReleaseObject NPN_Invoke NPN_...
Debugger.Object - Firefox Developer Tools
r to recognize when two Debugger.Object instances refer to the same debuggee object, and place its own properties on a Debugger.Object instance to store metadata about particular debuggee objects. JavaScript code in different compartments can have different views of the same object. For example, in Firefox, code in privileged compartments sees content DOM element objects without redefinitions or
extensions made to that object's properties by content code. (In Firefox terminology, privileged code sees the element through an "xray wrapper".) To ensure that debugger code sees each object just as the debuggee would, each Debugger.Object instance presents its referent as it would be seen from a particular compartment. This "viewing compartment" is chosen to match the way the debugger came across the ref...
...aled is implicit and in a different compartment from the caller.) freeze() Prevent properties from being added to or deleted from the referent, and mark each property as non-writable. Return this Debugger.Object instance. (This function behaves like the standard Object.freeze function, except that the object to be sealed is implicit and in a different compartment from the caller.) prevent
Extensions() Prevent properties from being added to the referent. (This function behaves like the standard Object.prevent
Extensions function, except that the object to operate on is implicit and in a different compartment from the caller.) isSealed() Return true if the referent is sealed--that is, if it is not extensible, and all its properties have been marked as non-configurable. (This function b...
...ed; if only the value is changing, SpiderMonkey calls the handler's set method. set(frame,oldValue,newValue) The data property namedname of the referent is about to have its value changed fromoldValue tonewValue. SpiderMonkey only calls this method on assignments to data properties that will succeed; assignments to un-writable data properties fail without notifying the debugger.
extensionsPrevented(frame) The referent has been made non-extensible, as if by a call to Object.prevent
Extensions. For all watchpoint handler methods: Handler calls receive the handler object itself as the this value. Theframe argument is the current stack frame, whose code is about to perform the operation on the object being reported. If the method returns undefined,...
...tyWatchpoint(name,handler)(future plan) Set a watchpoint on the referent's property namedname, reporting events by callinghandler's methods. Any previous watchpoint handler on this property for this Debugger.Object instance is replaced. Ifhandler is null, the property is no longer watched.Handler is as described for Debugger.Object.prototype.setObjectWatchpoint, except that it does not receive
extensionsPrevented events. clearPropertyWatchpoint(name)(future plan) Remove any watchpoint set on the referent's property namedname. unwrap() If the referent is a wrapper that this Debugger.Object's compartment is permitted to unwrap, return a Debugger.Object instance referring to the wrapped object. If we are not permitted to unwrap the referent, return null. If the referent is not a wrapper,...
WebGL best practices - Web APIs
ion should run without generating any WebGL errors (as returned by getError). Every WebGL error is reported in the Web Console as a JavaScript warning with a descriptive message. After too many errors (32 in Firefox), WebGL stops generating descriptive messages, which really hinders debugging. The only errors a well-formed page generates are OUT_OF_MEMORY and CONTEXT_LOST. Know your limits (and
extensions) The availability of most WebGL
extensions depends on the client system. When using WebGL
extensions, if possible, try to make them optional by gracefully adapting to the case there they are not supported. Likewise the limits of your system will be different than your clients' systems! Don't assume you can use thirty texture samplers per shader just because it works on your machine! Take advan...
...nsions depends on the client system. When using WebGL
extensions, if possible, try to make them optional by gracefully adapting to the case there they are not supported. ...
...nt system. When using WebGL
extensions, if possible, try to make them optional by gracefully adapting to the case there they are not supported. ...
...mats. Support for float textures doesn't mean you can render into them! There are many, many systems that support RGBA32F textures, but if you attach one to a framebuffer you'll get FRAMEBUFFER_INCOMPLETE_ATTACHMENT from checkFramebufferStatus(). It may work on your system, but most mobile systems will not support it! On WebGL 1, use the EXT_color_buffer_half_float and WEBGL_color_buffer_float
extensions to check for render-to-float-texture support for float32 and float16 respectively. On WebGL 2, EXT_color_buffer_float is your check for render-to-float-texture support for both float32 and float16. Render-to-float32 doesn't imply float32-blending! If may work on your system, but on many others it wont. Avoid it if you can. Check for the EXT_float_blend extension to check for support. Float16-...
Audio and Video Delivery - Developer guides
new Error(e.name); // e.name is FF non-spec } recorder.onstop = function(e) { var audio = document.createElement('audio'); audio.src = window.URL.createObjectURL(new Blob(data)); } setTimeout(function() { rec.stop(); }, 5000); }) .catch(function onError(error) { console.log(error.message); }); See MediaRecorder API for more details. ...
...s FF non-spec } recorder.onstop = function(e) { var audio = document.createElement('audio'); audio.src = window.URL.createObjectURL(new Blob(data)); } setTimeout(function() { rec.stop(); }, 5000); }) .catch(function onError(error) { console.log(error.message); }); See MediaRecorder API for more details. ...
... The API supports use cases ranging from simple clear key decryption to high value video (given an appropriate user agent implementation). ...
... The API supports use cases ranging from simple clear key decryption to high value video (given an appropriate user agent implementation). ...
TypeError: can't define property "x": "obj" is not extensible - JavaScript
The JavaScript exception "can't define property "x": "obj" is not extensible" occurs when Object.prevent
Extensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Message TypeError: Cannot create property for a non-extensible object (Edge) TypeError: can't define property "x": "obj" is not extensible (Firefox) TypeError: Cannot define property: "x", object is not extensible. (Chrome) Error type TypeError What went wrong? Usually, an object is extensible and new properties can be added to it. However, in this case Object.prevent
Extensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Examp...
...no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. Examples Adding new properties to a non-extensible objects In strict mode, attempting to add new properties to a non-extensible object throws a TypeError. In sloppy mode, the addition of the "x" property is silently ignored. ...
...t throws a TypeError. In sloppy mode, the addition of the "x" property is silently ignored. 'use strict'; var obj = {}; Object.prevent
Extensions(obj); obj.x = 'foo'; // TypeError: can't define property "x": "obj" is not extensible In both, strict mode and sloppy mode, a call to Object.defineProperty() throws when adding a new property to a non-extensible object. var obj = { }; Object.prevent
Extensions(obj); Object.defineProperty(obj, 'x', { value: "foo" } ); // TypeError: can't define property "x": "obj" is not extensible To fix this error, you will either need to remove the call to Object.prevent
Extensions() entirely, or move it to a position so that the property is added earlier and only later the object is marked as non-extensible. Of course you can also remove the property that was at...
...fix this error, you will either need to remove the call to Object.prevent
Extensions() entirely, or move it to a position so that the property is added earlier and only later the object is marked as non-extensible. Of course you can also remove the property that was attempted to be added, if you don't need it. 'use strict'; var obj = {}; obj.x = 'foo'; // add property first and only then prevent
extensions Object.prevent
Extensions(obj); ...
Web Components
connectedCallback: Invoked when the custom element is first connected to the document's DOM. disconnectedCallback: Invoked when the custom element is disconnected from the document's DOM. adoptedCallback: Invoked when the custom element is moved to a new document. attributeChangedCallback: Invoked when one of the custom element's attributes is added, removed, or changed.
Extensions for creating custom built-in elements The is global HTML attribute: Allows you to specify that a standard HTML element should behave like a registered custom built-in element. The "is" option of the Document.createElement() method: Allows you to create an instance of a standard HTML element that behaves like a given registered custom built-in element. CSS pseudo-classes Pseudo-class...
...ide the DOM hierarchy. CSS pseudo-elements Pseudo-elements relating specifically to custom elements: ::part: Represents any element within a shadow tree that has a matching part attribute. Shadow DOM ShadowRoot Represents the root node of a shadow DOM subtree. DocumentOrShadowRoot A mixin defining features that are available across document and shadow roots. Element
extensions Extensions to the Element interface related to shadow DOM: The Element.attachShadow() method attaches a shadow DOM tree to the specified element. The Element.shadowRoot property returns the shadow root attached to the specified element, or null if there is no shadow root attached. Relevant Node additions Additions to the Node interface relevant to shadow DOM: The Node.getRootNode...
...dow DOM: The Node.getRootNode() method returns the context object's root, which optionally includes the shadow root if it is available. The Node.isConnected property returns a boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM. Event
extensions Extensions to the Event interface related to shadow DOM: Event.composed: Returns a Boolean which indicates whether the event will propagate across the shadow DOM boundary into the standard DOM (true), or not (false). Event.composedPath: Returns the event's path (objects on which listeners will be invoked). This does not include nodes in shadow trees if the shadow root was created with Sha...
...d DOM interface is HTMLSlotElement. The slot global HTML attribute Assigns a slot in a shadow DOM shadow tree to an element. Slotable A mixin implemented by both Element and Text nodes, defining features that allow them to become the contents of an <slot> element. The mixin defines one attribute, Slotable.assignedSlot, which returns a reference to the slot the node is inserted in. Element
extensions Extensions to the Element interface related to slots: Element.slot: Returns the name of the shadow DOM slot attached to the element. CSS pseudo-elements Pseudo-elements relating specifically to slots: ::slotted: Matches any content that is inserted into a slot. The slotchange event Fired on an HTMLSlotElement instance (<slot> element) when the node(s) contained in that slot c...
simple-prefs - Archive of obsolete content
ty, and listen for changes to a preference using on(). Simple-prefs in the preferences system Preferences defined using simple-prefs are stored in the Firefox preferences system alongside all the other preferences. This means that they're visible in about:config, and they can be accessed using the global simple-preferences module. ...
...ongside all the other preferences. This means that they're visible in about:config, and they can be accessed using the global simple-preferences module. By default, simple preferences are stored in a preference like:
extensions.<addon-id>.<preference-name> For example, if you had a simple-pref named "somePreference" then you could get its value like so: require('sdk/preferences/service').get(['
extensions', require('sdk/self').id, 'somePreference'].join('.')) This would give you the same value as: require('sdk/simple-prefs').prefs['somePreference'] The ability to change the default preferences branch is new in Add-on SDK 1.15. The branch of the preferences tree under which simple-prefs are stored is, by default, the add-on ID. Sometimes you might need to use a different branch, especially if...
... you the same value as: require('sdk/simple-prefs').prefs['somePreference'] The ability to change the default preferences branch is new in Add-on SDK 1.15. The branch of the preferences tree under which simple-prefs are stored is, by default, the add-on ID. Sometimes you might need to use a different branch, especially if you are porting an add-on to the SDK. You can change the sub-branch of
extensions using the preferences-branch key in your add-on's package.json file. Globals Functions on(prefName, listener) Registers an event listener that will be called when a preference is changed. The event listener may take an optional parameter that specifies the name of the property which changed. Preference change events are triggered for every character typed by the user. They are also trigger...
Deploying a Plugin as an Extension - Archive of obsolete content
ur 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 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. First, let's take a look at the structure of the XPI file used for a browser plugin. RhapsodyPlayerEngine_Inst_Win.xpi ...
...lly, 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. Here's what a basic install.rdf file looks like: <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>RhapsodyPlayerEngine@rhapsody.com</em:id> <em:name>Rhapsody Player Engine</em:name> <em:version>1.0.0.487</em:version> <em:targetApplication> <Desc...
...f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>1.5.0.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> You can get more detailed information about this file at install.rdf. We'll cover the basics. The id specifies a unique ID that uniquely identifes this extension of the form. If you have written
extensions for Firefox in the past, you'll notice that we no longer require the use of GUIDs as extension IDs. The name specifies the name of the extension that appears in the extension manager. The version is used for version checking when we are updating
extensions. The targetApplication section specifies that platform we want to work on (that ID is for Firefox). It also specifies what versions of Firefox...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
ages. EnablePrivilege is disabled in Firefox 15 and will be removed in Firefox 17. About XPCOM XPCOM is a framework for developing platform-independent components. Components developed in line with that framework are referred to as XPCOM components, and sometimes the components are simply referred to as XPCOMs. Firefox itself includes a great number of XPCOM components, and they can be used in
extensions as well. Sometimes an extension will be packaged with a special XPCOM component developed specifically for it. Note: If you're developing components in C++ or other compiled languages, be sure to include binaries for every platform. Reference materials To get an idea of what kinds of functions embedded XPCOM can handle, take a look at the API reference and the interface definitions from XPIDL...
... it will be C:\Documents and Settings\username\Application 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", "UniversalXPC...
...iting a text string to a unique preference. Again, you can use about:config to check that the value has been stored correctly. Note: The value for the second parameter of nsIPrefBranch.setCharPref() is a UTF-8 bytestring; here, we are converting a UTF-16 to UTF-8 using unescape() and encodeURIComponent(). ...
Local Storage - Archive of obsolete content
eferred storage mechanism in Firefox. It is the storage system used for the Places API that manages bookmarks and history. It's also used for storing cookies, form inputs, and others. SQLite is a lightweight SQL based storage system. It is ideal for embedding in other programs, and is currently in use in several popular applications. It's also the storage system we recommend for local storage in
extensions. The Storage page has a good explanation on how to use the SQLite API, so we won't go over that again. If you're unfamiliar with SQL or if you're interested in knowing the restrictions in the syntax used by SQLite, you can read more at the SQLite site. You should carefully design your database structure, taking into account features you're planning on adding in the future. Adding or removing co...
...ata when your extension starts up for the first time. If you need a complex database this can be heavy in terms of time and code, but this will only happen once and this can be done in a lazy or asynchronous way. Have an initial database file in your defaults directory that you can copy to the user's profile. This way you just need to do a file copy. You can reach the defaults directory at ProfD/
extensions/YOUR_EXTENSION_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 ...
...y were designed with RDF datasources in mind, but since Firefox 3 they have been extended to support SQLite datasources as well. Handling templates can also be complicated, but it is worth the effort if you need to display long lists or trees with complex data. If you manage to get your display code to use templates, you will have saved a lot of coding. Since templates are not necessary for most
extensions and they're a complicated subject, it's better that you read it from the experts. There's a very detailed XUL Template Guide here. As mentioned before, it revolves around RDF, so you may need to take some time to understand how RDF works. There's a section about SQLite Templates in the guide, but there are some concepts in it that will require you to read at least some of the rest of it. << P...
XPCOM Objects - Archive of obsolete content
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 like @xulschool.com/ to make our own components. Components are either services (static objects) or instances of classes, just like the objects we handle in JS. The method you cal...
...s a preference observer. The nsIObserver has a single method observe, so all you need to do is have an observe method in your object and you'll be OK. XULSchool.PrefObserver = { init: function() { this._prefService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch2); // pass 'this' as if it implemented nsIObserver. this._prefService.addObserver( "
extensions.xulschoolhello.somePref", this, false); }, observe : function(aSubject, aTopic, aData) { // do stuff here. } }; Finally, here's a table summarizing the types you will most likely encounter in XPCOM interfaces, and how to handle them: JS type IDL types Notes Strings AUTF8String, string, wstring, char*, others Historically there have been several string ...
...e this: var CounterFactory = { createInstance: function(aOuter, aIID) { if (aOuter != null) { throw Cr.NS_ERROR_NO_AGGREGATION; } return (new Counter()).QueryInterface(aIID); } }; The instructions on how to build an IDL file are included in the section Setting up a Development Environment. C++ XPCOM Components C++ XPCOM components are no longer supported in Firefox
extensions. They are only available to code built into Firefox itself. If you are writing an extension and need to interact with 3rd-party binary code, the best way to do that is to use the system/child_process IPC layer from the Addon SDK. The c-types module is also available as a bridge to load and use shared libraries from extension code. << PreviousNext >> This tutorial was kindly donated to Mo...
Source code directories overview - Archive of obsolete content
Sun's ATK accessibility API for Linux. browser contains the code for Firefox. This will be covered below. build contains scripts (usually Perl) and programs used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of the dist directory. calendar contains the code for the various Mozilla calendar apps and
extensions. caps contains C interfaces and code for determining the capabilities of content based on the security settings and certificates (e.g. Verisign). chrome contains the toolkit chrome registry. config contains scripts and programs used by Mozilla developers to manipulate the code base and to perform special actions inside makefiles. These programs are used for code level things instead of build l...
...roduct. The editor is designed like a "browser window with editing features" with extra classes for editing text and managing undo/redo. embedding contains C interfaces and code for generic high-level browser functions (e.g. forward, back, history). The [#seamonkey-webshell webshell] code wraps these interfaces according to the particular platform and way (e.g. ActiveX) that is being supported.
extensions contains C interfaces, C code, XUL and Javascript code for various add-ins that are related to browsing. These include: cookies, IRC, wallet, DOM Inspector, P3P, schema validation, spellchecker, transformiix, typeaheadfind, JavaScript debugger, XForms, etc. gfx contains C interfaces and code for platform independent drawing and imaging. It can be used to draw rectangles, lines, images, etc. Esse...
...stalling 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 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, type...
Hacking wiki - Archive of obsolete content
it, but in case you don't, you can copy one from the MediaWiki tarball. Once you're done with the configuration script, copy the <tt>config/LocalSettings.php</tt> file it created to the parent directory and navigate to the location you installed MediaWiki to. 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. ...
... MediaWiki tarball. Once you're done with the configuration script, copy the <tt>config/LocalSettings.php</tt> file it created to the parent directory and navigate to the location you installed MediaWiki to. 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. ...
...t> file it created to the parent directory and navigate to the location you installed MediaWiki to. 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>. For example: [snip] include("
extensions/Breadcrumbs.php"); include("
extensions/TitleOverride.php"); include("
extensions/Abbr.php"); include("
extensions/Object.php"); include("
extensions/Kbd.php"); ?> TBD installing/configuring RSS and Doxygen
extensions - anything special needs to be done? The title-override / breadcrumbs
extensions need an additional table created. To configure it, run <tt>update-devmo.php</tt> from the command line.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
Another tutorial, which walks you through the entire process from the beginning, is also available. ...
...id documents at the bottom of this page. Note: Some people overlay chrome://messenger/content/mailWindowOverlay.xul. that should cause the button to appear on all windows that mailWindowOverlay.xul is applied to (i.e. Main window and View Message window). This needs to be looked into. Adding the toolbar button Toolkit applications have customizable toolbars; therefore, it's common practice for
extensions to add their toolbar buttons to the toolbar palette, rather than adding them directly to the toolbar. The latter is possible, but is not recommended and is harder to implement. Adding a button to the toolbar palette is very easy. Just add code like this to your overlay: <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolb...
...illa:skin:classic/1.0:myextension"/> </Seq> </chrome:packages> </Description> <Seq about="urn:mozilla:stylesheets"> <li resource="chrome://global/content/customizeToolbar.xul"/> </Seq> <Seq about="chrome://global/content/customizeToolbar.xul"> <li>chrome://myextension/skin/toolbar-button.css</li> </Seq> </RDF> The skin/contents.rdf file is denigrated in developing for later releases of Firefox.
Extensions for Firefox/Thunderbird 1.5 and above should instead use something like this in their chrome.manifest: skin myextension classic/1.0 chrome/skin/ style chrome://global/content/customizeToolbar.xul chrome://myextension/skin/toolbar-button.css ia Take note of the Packaging section in this article; you may need to include .jar references if you are delivering your extension as an .xpi file. Common...
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
volve any hacking. Instead, you make your custom button as a self-contained extension. You can use the sample code provided here to make buttons that do various useful things. If you know how to program in JavaScript, then you can write your own code that does other things. You can use this page if all you really want is a button for some special purpose. You can also use this page to learn about
extensions, and as a starting point if you plan to write a more complex extension. Note that this extension is very simplified. Use other tutorials and articles to find out more--the main
Extensions page here is a good starting point. In particular, the articles Creating toolbar buttons and Building an Extension explain the process in more detail. Supported applications You can use the steps on this page on...
... support the same process as Firefox, Thunderbird and others. This tutorial adds a customizable button to all SeaMonkey's toolbars. It adds a menu choice to ChatZilla's menu bar (because ChatZilla has no toolbar). Note: For a similar tutorial that applies to SeaMonkey 2, Firefox, Thunderbird and Sunbird, see: Custom Toolbar Button Earlier versions and other Mozilla applications also support
extensions, but some parts of this tutorial are not appropriate for them. Required tools You will need two tools. Your operating system normally provides them: A way to create and work with files and directories A text editor for plain text files Character encoding Some text editors have a setting for character encoding. If your language uses only plain Latin (ASCII) characters, set your text editor ...
...rties).get("AChrom", Components.interfaces.nsIFile).path In the JavaScript Console window, paste the code in the field near the top. Presss the Return or Enter key, or the Evaluate button. The console displays the location of SeaMonkey's chrome directory. Explanation: The chrome directory contains program 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 h...
2006-10-20 - Archive of obsolete content
t and expanded on the original content of his question. Marcus claims that when he builds Firefox using CentOs he encounters crashes (segmentation faults) under Linux distributions such as gentoo, suse and fedora. He also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine. Adding extension to
extensions/ folder Originally posted on Oct 19th: Christopher Finke is currently learning how to compile Firefox. Though he has succeeded in building Firefox he has so far failed to compile Firefox with his own
extensions of choice so that his custom build would have those
extensions enabled in the end product. Christopher Finke is asking the community members for tutorials or any tips on how to get star...
... On October 20th Jeff Walden responded Christopher Finke's question. ...
...ct. Christopher Finke is asking the community members for tutorials or any tips on how to get started. On October 20th Christopher Finke responded to his original post. He stated that he was able to pre-package the
extensions that he wanted by following this walkthrough and a little bit 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...
Sunbird Theme Tutorial - Archive of obsolete content
nced themes. Making a theme A theme consists of: A unique identifier A file containing information about the theme A file that registers the theme with Sunbird Some files containing the theme itself Set up your theme in Sunbird's profile directory. For information on how to find the profile directory, see the Mozillazine article: Profile Folder Inside the profile directory, go to the <tt>
extensions</tt> directory. Note: If the <tt>
extensions</tt> directory is empty, you are in the wrong place--start again and follow the instructions more carefully. Creating a unique identifier Create an identifier that is likely to be unique, in the form: <tt>something@domain-name</tt> It must contain an at-sign (<tt>@</tt>), making it look something like an e-mail address, but it does not need to be ...
...hing like an e-mail address, but it does not need to be a real e-mail address. Before and after the at-sign, it can only contain the characters A-Z, a-z, 0-9, full stop, hyphen and underscore. If you do not own a domain name, you can make up something 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. Creating information about your theme In your theme directory, create a plain text file named <tt>install.rdf</tt>. Copy and paste the content from here, making sure that you scroll to get all of it: <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999...
... at the end: label {color: red;} Save the file. Fixing bug 320823 If you are using the Sunbird 0.3a1 release, or a test build before 2005-12-21, then you must apply a fix for bug 320823 to allow Sunbird to use themes. Go to Sunbird's program directory, then to the <tt>defaults</tt> directory there. In the <tt>pref</tt> directory, edit the file <tt>sunbird.js</tt> and search for the <tt>pref("
extensions</tt> entries. Add the line: pref("
extensions.dss.enabled", false); Save the file. Using your theme To use your theme, restart Sunbird. From the menu bar, choose Tools - Themes... In the Themes window, check that your new theme has appeared. Select it and press the Use Theme button. Restart Sunbird again. If your theme is working, you see the effect of the changes that you made. Developing ...
Building a Theme - Archive of obsolete content
tes the background color of the toolbars in Firefox. Note: This tutorial is about building themes for Firefox 29 and later. Other tutorials exist for building themes for earlier versions of Firefox. For an older 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. An example of the content within a typical XPI file for a theme: example.xpi: /install.rdf /chrome.manifest /preview.png /icon.png /chrome/ browser/ communicator/ ...
...Save the file. Test First, we need to tell Firefox about your theme. During the development phase for Firefox versions 2.0 and higher, you can point Firefox to the folder where you are developing the theme, and it'll load it up every time you restart Firefox. Locate your profile folder and beneath it the profile you want to work with (e.g. Firefox/Profiles/<profile_id>.default/). Open the
extensions/ folder, creating it if need be. Create a new text file and put the full path to your development folder inside (e.g. C:\themes\my_theme\ or ~/themes/my_theme/). Windows users should retain the OS' slash direction, and everyone should remember to include a closing slash and remove any trailing spaces. Save the file with the id of your theme as its name (e.g. sample@example.net). No file extensi...
...n. Now upload the .xpi file to your server, making sure it's served as application/x-xpinstall. You can link to it and allow people to download and install it. For the purposes of just testing our .xpi file we can just drag it into the Add-ons Manager via "Tools -> Add-ons Manager", or open it using "File -> Open File...". Installing from a web page There are a variety of ways you can install
extensions from web pages, including direct linking to the XPI files and using the InstallTrigger object. Extension and web authors are encouraged to use the InstallTrigger method to install XPIs, as it provides the best experience to users. Using addons.mozilla.org Mozilla Add-ons is a distribution site where you can host your theme for free. Your theme will be hosted on Mozilla's mirror network to gu...
Common Firefox theme issues and solutions - Archive of obsolete content
f panel including border. This issue also applies to the edit bookmark panel, which is activated by double clicking on the bookmark star in the URL bar. For details, please see bug 708797. "About" Pages about:addons Disabled add-on Icons are not grey scale In Tools > Add-ons, the icons of disabled icons need to be converted to grey scale. ...
...luding border. This issue also applies to the edit bookmark panel, which is activated by double clicking on the bookmark star in the URL bar. For details, please see bug 708797. "About" Pages about:addons Disabled add-on Icons are not grey scale In Tools > Add-ons, the icons of disabled icons need to be converted to grey scale. ...
...mark panel, which is activated by double clicking on the bookmark star in the URL bar. For details, please see bug 708797. "About" Pages about:addons Disabled add-on Icons are not grey scale In Tools > Add-ons, the icons of disabled icons need to be converted to grey scale. To accomplish this copy the file chrome://mozapps/skin/
extensions/
extensions.svg from the default theme into the mozapps/
extensions/ folder of your theme and add the following style rule to the CSS file
extensions.css: .addon[active="false"] .icon { filter: url("chrome://mozapps/skin/
extensions/
extensions.svg#greyscale"); opacity:0.3; } about:memory About:memory nodes do not collapse The styling of about:memory is a little messed up in that nodes do not collapse as they should when clicked on. To fix this issue you nee...
Mozilla XForms Specials - Archive of obsolete content
Limitations Repeat Using Attributes The specifications mentions "Creating Repeating Structures Via Attributes", this is partially supported. (limitation tracked in bug 280368) Mixing Repeat and table or ul It is not possible to mix repeats with either table or ul. That means that it is not possible to do: <table> <xf:repeat ...> <tr> ... ...
...ed in bug 271724) Optional parameters in XPath functions Optional parameters in XPath functions are not supported, you will have to specify all parameters when calling a function. This affects functions like hmac() or digest(). Instead of using digest('abc', 'SHA-1') explicitly use the third parameter (the results are equal): digest('abc', 'SHA-1', 'base64') (limitation tracked in bug 477857)
Extensions Enumerating Instances The standardized nsIXFormsModelElement does not allow one to enumerate over all possible instances, but only to retrieve instances by their name. In the Mozilla XForms Extension we added a getInstanceDocuments() function to the model which returns all the model's instance documents. This is documented in nsIXFormsNSModelElement. Getting To Instance Element From A Data Node I...
...form authors to create custom controls. It involves exposing some (script) functionality on all our controls, like output, input, etc. and allowing the UI to be represented in XBL. More information can be found in XForms:Custom Controls. labelposition For xforms:input elements bound to a boolean node we support an attribute labelposition in the namespace http://www.mozilla.org/projects/xfor...009/
extensions, which allows the form author to define on which side of the checkbox the label will be shown. For details, see the input control documentation. Misc Cross Domain Submission Not exactly either a limitation, or an extension, but it is worth mentioning here. For security reasons, it is not per default possible for an XForms to submit data to another domain. This is due to security reasons. Informat...
Mozilla's DOCTYPE sniffing - Archive of obsolete content
hout a system identifier. The public identifier "-//W3C//DTD HTML 4.01 Frameset//EN", without a system identifier. The public identifier "-//W3C//DTD HTML 4.0 Transitional//EN" (see also test with a system identifier). The public identifier "-//W3C//DTD HTML 4.0 Frameset//EN" (see also test with a system identifier). The public identifier "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::
extensions to HTML 4.0//EN". The public identifier "-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::
extensions to HTML 4.0//EN". The public identifier "-//IETF//DTD HTML//EN//3.0". The public identifier "-//W3O//DTD W3 HTML 3.0//EN//". The public identifier "-//W3O//DTD W3 HTML 3.0//EN". The public identifier "-//W3C//DTD HTML 3 1995-03-24//EN". The public identifier "-//IETF//DTD HTML 3.0//EN". The pub...
...L 3 1995-03-24//EN". The public identifier "-//IETF//DTD HTML 3.0//EN". The public identifier "-//IETF//DTD HTML 3.0//EN//". The public identifier "-//IETF//DTD HTML 3//EN". The public identifier "-//IETF//DTD HTML Level 3//EN". The public identifier "-//IETF//DTD HTML Level 3//EN//3.0". The public identifier "-//IETF//DTD HTML 3.2//EN". The public identifier "-//AS//DTD HTML 3.0 asWedit +
extensions//EN". The public identifier "-//AdvaSoft Ltd//DTD HTML 3.0 asWedit +
extensions//EN". The public identifier "-//IETF//DTD HTML Strict//EN//3.0". The public identifier "-//W3O//DTD W3 HTML Strict 3.0//EN//". The public identifier "-//IETF//DTD HTML Strict Level 3//EN". The public identifier "-//IETF//DTD HTML Strict Level 3//EN//3.0". The public identifier "HTML". The public identifier "-//...
...un Microsystems Corp.//DTD HotJava Strict HTML//EN". The public identifier "-//IETF//DTD HTML 2.1E//EN". The public identifier "-//O'Reilly and Associates//DTD HTML Extended 1.0//EN". The public identifier "-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//EN". The public identifier "-//O'Reilly and Associates//DTD HTML 2.0//EN". The public identifier "-//SQ//DTD HTML 2.0 HoTMetaL +
extensions//EN". The public identifier "-//Spyglass//DTD HTML 2.0 Extended//EN". The public identifier "+//Silmaril//DTD HTML Pro v0r11 19970101//EN". The public identifier "-//W3C//DTD HTML Experimental 19960712//EN". The public identifier "-//W3C//DTD HTML 3.2//EN". The public identifier "-//W3C//DTD HTML 3.2 Final//EN". The public identifier "-//W3C//DTD HTML 3.2 Draft//EN". The public identifier ...
CalDAV - MDN Web Docs Glossary: Definitions of Web-related terms
CalDAV (Calendaring
extensions to WebDAV) is a protocol standardized by the IETF and used to remotely access calendar data from a server. ...
... CalDAV (Calendaring
extensions to WebDAV) is a protocol standardized by the IETF and used to remotely access calendar data from a server. ...
... CalDAV (Calendaring
extensions to WebDAV) is a protocol standardized by the IETF and used to remotely access calendar data from a server. Learn more General Knowledge CalDAV on Wikipedia Technical reference RFC 4791: Calendaring
extensions to WebDAV (CalDAV) RFC 6638: Scheduling
Extensions to CalDAV ...
Testopia
you probably noticed that Testopia 2.5 is not compatible with this version. Despite Bugzilla 5.0 has already been released a few months ago, we don't plan to release a fix for Testopia immediately, because it's currently under heavy work to make Testopia a fully self-contained extension, which means that all tr_*.cgi scripts which are currently in the bugzilla/ root directory are being moved into
extensions/Testopia/lib/. This is not an trivial task, it takes time (it started in August 2014), and we decided that it was not a good idea to release half-baked code which still needs testing to make sure we didn't regress anything. The good news is that the current code in the git repository already works with Bugzilla 5.0, and so if you upgraded to 5.0 already, and if you don't mind having a work-in-pr...
...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 have made modifications to the testopia source code, you will need to merge them into the new Testopia folder (capital T). If you are on Windows or another case insensitive file system you should first rename the folder (testopia-old for example) and then unzip the tarball. You can then merge your changes before deleting the old version. API USERS TAKE NOTE: Positional paramete...
... to limit access to modifying test objects. Testopia allows users to attach bugs to test case run results for centralized management of the software engineering process. Requirements As our development has moved forward, we have decided to try to keep abreast of the latest stable release from Bugzilla (currently 5.0). This gives us a stable code base to work from. Developing plugins or
extensions for any software is like trying to hit a moving target. This decision allows us to focus our time more on releasing new features often and early rather than back porting. However, this means that most major feature will not be back ported to earlier versions unless and until we have time to do so. Anyone wishing to help in this effort is more than welcome. Bugzilla 4.x Mysql 5.0 or Po...
Interface Compatibility
es of Mozilla. Jetpack The Jetpack SDK and APIs are not yet complete. The stable version 1.0 of the Jetpack SDK is planned for later in 2010. Documented APIs which are shipped as part of the Jetpack SDK are designed to work in future versions of Firefox. Achieving this compatibility may require rebuilding the extension with a new version of the Jetpack SDK. JavaScript/XUL Interfaces Traditional
extensions written using XUL overlays and XPCOM have access to the full power of the Mozilla platform. With the power, however, comes the understanding that the Mozilla platform is constantly changing and many APIs may change in future versions of Firefox. In micro/maintenance releases, there should be no incompatible changes to interfaces, except as a last resort when a security fix leaves no other optio...
...here should be no incompatible changes to interfaces, except as a last resort when a security fix leaves no other option. This includes not only XPCOM interfaces, but JavaScript functions, XBL bindings, and any other visible behavior. Between major releases, there is no guarantee of interface stability. Changes should not be taken lightly, however: especially if a change is likely to affect many
extensions, the change should try to maintain backwards compatibility by using optional/default parameters or other JavaScript techniques. Where appropriate, new APIs should be designed so that they are compatible with future plans, and clients do not need XPCOM boilerplate. This may involve using JavaScript modules, passing named parameters using objects, or other similar techniques. Binary Interfaces Tr...
...tionally, Mozilla has maintained a set of XPCOM interfaces and functions with the @status FROZEN marking. Using these interfaces, and using dynamic calls to QueryInterface, it has been possible to write binary XPCOM components which were compatible with multiple versions of Firefox. Beginning with Mozilla 2 (Firefox 4), this will no longer be supported: all @status markings have been removed, and
extensions that use binary components will need to recompile for each major version they wish to support. JS-ctypes is the recommended way for
extensions to call into OS or third-party native code. You should strongly consider migrating existing code to use js-ctypes instead of binary components. If necessary, it is possible for an extension to support multiple versions by shipping multiple shared librar...
Experimental features in Firefox
you define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools. Release channel Version added Enabled by default? Nightly 30 No Developer Edition 30 No Beta 30 No Release 30 No Preference name canvas.hitregions.enabled WebGL: Draft
extensions When this preference is enabled, any WebGL
extensions currently in "draft" status which are being tested are enabled for use. Currently, there are no WebGL
extensions being tested by Firefox. WebGPU API This new API provides low-level support for performing computation and graphics rendering using the Graphics Processing Unit (GPU) of the user's device or computer. The specification is still a...
... Media Session API The entire Firefox implementation of the Media Session API is currently experimental. This API is used to customize the handling of media-related notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata. See bug 1...
... Media Session API The entire Firefox implementation of the Media Session API is currently experimental. This API is used to customize the handling of media-related notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata. See bug 1112032 for more details. R...
Localizing extension descriptions
ly have them, create localized properties files. Make sure to use UTF-8 encoding (without BOM) to ensure foreign characters display correctly. ...
... of your extension that you want to appear in the given language):
extensions.EXTENSION_ID.description=LOCALIZED_DESCRIPTION If you do not currently have one, create a default preferences file. ...
...e chrome path to the localization file you added to earlier): pref("
extensions.EXTENSION_ID.description", "PATH_TO_LOCALIZATION_FILE"); Localizable strings The following add-on metadata can be localized using this process: name description creator homepageURL Localizable lists In cases where multiple values can exist, a numeric index is appended to the end of the preference name:
extensions.EXTENSION_ID.contributor.1=FIRST_LOCALIZED_CONTRIBUTOR_NAME
extensions.EXTENSION_ID.contributor.2=SECOND_LOCALIZED_CONTRIBUTOR_NAME
extensions.EXTENSION_ID.contributor.3=THRID_LOCALIZED_CONTRIBUTOR_NAME pref("
extensions.EXTENSION_ID.contributor.1", "PATH_TO_LOCALIZATION_FILE"); pref("
extensions.EXTENSION_ID.contributor.2", "PATH_TO_LOCALIZATION_FILE"); pref("
extensions.EXTENSION_ID.contributor.3...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
certReq = GetCertRequest(inFileName, ascii); if (certReq == NULL) { rv = SECFailure; goto cleanup; } subjectCert = MakeV1Cert(handle, certReq, issuerNickName, selfsign, serialNumber, warpmonths, validityMonths); if (subjectCert == NULL) { rv = SECFailure; goto cleanup; } extHandle = CERT_StartCert
Extensions (subjectCert); if (extHandle == NULL) { rv = SECFailure; goto cleanup; } if (certReq->attributes != NULL && certReq->attributes[0] != NULL && certReq->attributes[0]->attrType.data != NULL && certReq->attributes[0]->attrType.len > 0 && SECOID_FindOIDTag(&certReq->attributes[0]->attrType) == SEC_OID_PKCS9_EXT...
...= SECFailure; goto cleanup; } if (certReq->attributes != NULL && certReq->attributes[0] != NULL && certReq->attributes[0]->attrType.data != NULL && certReq->attributes[0]->attrType.len > 0 && SECOID_FindOIDTag(&certReq->attributes[0]->attrType) == SEC_OID_PKCS9_EXTENSION_REQUEST) { rv = CERT_GetCertificateRequest
Extensions(certReq, &CRexts); if (rv != SECSuccess) { PR_fprintf(PR_STDERR, "%s\n", PORT_ErrorToString(rv)); goto cleanup; } rv = CERT_Merge
Extensions(extHandle, CRexts); if (rv != SECSuccess) { PR_fprintf(PR_STDERR, "%s\n", PORT_ErrorToString(rv)); goto cleanup; } } CERT_Finish
Extensions(extHandle); ...
...oto cleanup; } arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) { fprintf(stderr, "out of memory"); rv = SECFailure; goto cleanup; } extHandle = CERT_StartCertificateRequestAttributes(cr); if (extHandle == NULL) { PORT_FreeArena (arena, PR_FALSE); rv = SECFailure; goto cleanup; } CERT_Finish
Extensions(extHandle); CERT_FinishCertificateRequestAttributes(cr); /* Der encode the request */ encoding = SEC_ASN1EncodeItem(arena, NULL, cr, SEC_ASN1_GET(CERT_CertificateRequestTemplate)); if (encoding == NULL) { PR_fprintf(PR_STDERR, "der encoding of request failed\n"); rv = SECFailure; goto cleanup; } /* S...
sample2
CREATE_FILE | PR_TRUNCATE, 00660); /* Create a cert request object from the input cert request der */ certReq = GetCertRequest(inFileName, ascii); if (certReq == NULL) { rv = SECFailure; goto cleanup; } subjectCert = MakeV1Cert(handle, certReq, issuerNickName, selfsign, serialNumber, warpmonths, validityMonths); if (subjectCert == NULL) { rv = SECFailure; goto cleanup; } extHandle = CERT_StartCert
Extensions (subjectCert); if (extHandle == NULL) { rv = SECFailure; goto cleanup; } if (certReq->attributes != NULL && certReq->attributes[0] != NULL && certReq->attributes[0]->attrType.data != NULL && certReq->attributes[0]->attrType.len > 0 && SECOID_FindOIDTag(&certReq->attributes[0]->attrType) == SEC_OID_PKCS9_EXTENSION_REQUEST) { rv = CERT_GetCertificateRequest
Extensions(certReq, &CRexts); if (rv != SE...
...!= NULL && certReq->attributes[0] != NULL && certReq->attributes[0]->attrType.data != NULL && certReq->attributes[0]->attrType.len > 0 && SECOID_FindOIDTag(&certReq->attributes[0]->attrType) == SEC_OID_PKCS9_EXTENSION_REQUEST) { rv = CERT_GetCertificateRequest
Extensions(certReq, &CRexts); if (rv != SECSuccess) { PR_fprintf(PR_STDERR, "%s\n", PORT_ErrorToString(rv)); goto cleanup; } rv = CERT_Merge
Extensions(extHandle, CRexts); if (rv != SECSuccess) { PR_fprintf(PR_STDERR, "%s\n", PORT_ErrorToString(rv)); goto cleanup; } } CERT_Finish
Extensions(extHandle); /* self-signing a cert request, find the private key */ if (*selfsignprivkey == NULL) { *selfsignprivkey = PK11_FindKeyByDERCert(slot, subjectCert, pwarg); if (!*selfsignprivkey) { PR_fprintf(PR_STDERR, "Failed to locate private key.\n"); rv = SECF...
...NULL); if (!cr) { PR_fprintf(PR_STDERR, "unable to make certificate request\n"); rv = SECFailure; goto cleanup; } arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) { fprintf(stderr, "out of memory"); rv = SECFailure; goto cleanup; } extHandle = CERT_StartCertificateRequestAttributes(cr); if (extHandle == NULL) { PORT_FreeArena (arena, PR_FALSE); rv = SECFailure; goto cleanup; } CERT_Finish
Extensions(extHandle); CERT_FinishCertificateRequestAttributes(cr); /* Der encode the request */ encoding = SEC_ASN1EncodeItem(arena, NULL, cr, SEC_ASN1_GET(CERT_CertificateRequestTemplate)); if (encoding == NULL) { PR_fprintf(PR_STDERR, "der encoding of request failed\n"); rv = SECFailure; goto cleanup; } /* Sign the request */ signAlgTag = SEC_GetSignatureAlgorithmOidTag(keyType, hashAlgTag); if (signAlgT...
nss tech note3
Bolyard This week at least 5 different people came to me with variants of the same question: What certificate
extensions do I have to put into my cert for NSS to allow it to be used for purpose <x>?? This message attempts to answer that question, and to document NSS's approach to validating certificates for certain purposes. When NSS is asked to verify the validity of a certificate chain, it verifies the validity of that cert chain for a particular purpose, known as a SECCertUsage, as of a specific date and time. ...
...ING_CA OR EMAIL_CA OR SSL_CA; StatusResponder: CERT_SIGN; OBJECT_SIGNING_CA OR EMAIL_CA OR SSL_CA; Note: When the required key usage is KEY_AGREEMENT OR KEY_ENCIPHERMENT, the actual key usage required depends on the key's algorithm. For RSA keys, the required usage is KEY_ENCIPHERMENT. For other types of keys, it is KEY_AGREEMENT. Cert
Extensions: One vital Certificate extension is the "Basic Constraints" extension. It tells NSS whether the cert is a CA cert, or not, and affects every other aspect of how the cert is interpreted by NSS. The OID for this extension is { 2 5 29 19 }, encoded in hex as 0x55, 0x1d, 0x13. If the extension is present and has the value TRUE, then this cert is taken to be a CA cert. Otherwise it is not (except t...
...ly defined Cert Type extension, which can be used to explicitly set the Cert Type in any Cert. The Cert Type extension has bits in it that correspond directly to the cert types named above. The OID for this extension is { 2 16 840 1 113730 1 1 } encoded in hex as 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, 0x01, 0x01 In addition to Netscape's own Cert Type extension, NSS recognizes various X.509
extensions. The X.509 key usage extension has OID { 2 5 29 0F } encoded in hex as 0x55, 0x1d, 0x0f. If present, this extension directly determines the values of the 8 key usages defined above. If absent, the cert is assumed to be valid for all key usages. The X.509v3 extended Key usage extension as OID { 2 5 29 37 } encoded in hex as 0x55, 0x1d, 0x25. That extension contains a sequence of OIDs, each of...
NSS tools : crlutil
* Set "this update" or "next update" CRL fields: update=YYYYMMDDhhmmssZ nextupdate=YYYYMMDDhhmmssZ Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ). For example: 20050204153000Z * 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 b...
... that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter. * Change range of certificate entry(s) in CRL range new-range Where: new-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. Implemented
Extensions The
extensions defined for CRL provide methods for associating additional attributes with CRLs of theirs entries. For more information see RFC #3280 * Add The Authority Key Identifier extension: The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a CRL. authKeyId critical [key-id | dn cert-serial] Where: authK...
...s is non-critical extension date: invalidity date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhhmmssZ). Usage The Certificate Revocation List Management Tool's capabilities are grouped as follows, using these combinations of options and arguments. Options and arguments in square brackets are optional, those without square brackets are required. See "Implemented
extensions" for more information regarding
extensions and their parameters. * Creating or modifying a CRL: crlutil -G|-M -c crl-gen-file -n nickname [-i crl] [-u url] [-d keydir] [-P dbprefix] [-l alg] [-a] [-B] * Listing all CRls or a named CRL: crlutil -L [-n crl-name] [-d krydir] * Deleting CRL from db: crlutil -D -n nickname [-d keydir] [-P dbprefix] * Erasing CRLs from db: crlutil -E [-d...
NSS tools : crlutil
or "next update" CRL fields: update=YYYYMMDDhhmmssZ nextupdate=YYYYMMDDhhmmssZ Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ). For example: 20050204153000Z * 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 certifi...
...by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter. * Change range of certificate entry(s) in CRL range new-range Where: new-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. Implemented
Extensions The
extensions defined for CRL provide methods for associating additional attributes with CRLs of theirs entries. For more information see RFC #3280 * Add The Authority Key Identifier extension: The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a CRL. authKeyId critical [key-id | dn cert-serial...
...cal extension date: invalidity date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhhmmssZ). Usage The Certificate Revocation List Management Tool's capabilities are grouped as follows, using these combinations of options and arguments. Options and arguments in square brackets are optional, those without square brackets are required. See "Implemented
extensions" for more information regarding
extensions and their parameters. * Creating or modifying a CRL: crlutil -G|-M -c crl-gen-file -n nickname [-i crl] [-u url] [-d keydir] [-P dbprefix] [-l alg] [-a] [-B] * Listing all CRls or a named CRL: crlutil -L [-n crl-name] [-d krydir] * Deleting CRL from db: crlutil -D -n nickname [-d keydir] [-P dbprefix] * Erasing...
Places Developer Guide
var bookmarkURI = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService) .newURI("http://www.mozilla.com", null, null); var bookmarkId = bookmarks.insertBookmark( bookmarks.toolbarFolder, // The id of the folder the bookmark will b...
...aItemId) - Returns the time in microseconds that an item was added PRTime getItemLastModified(aItemId) - Returns the time in microseconds that an item was last modified Int64 getFolderIdForItem(aItemId) - Returns the id of the folder containing the given item. String getItemGUID(aItemId) Obsolete since Gecko 14.0 - Returns a globally unique identifier for the item. This is mainly for use by
extensions that sync bookmark data between different profiles. For bookmarks: nsIURI getBookmarkURI(aItemId) - Returns the URI of a bookmark item String getKeywordForBookmark(aItemId) - Returns a bookmark's keyword, or null For folders: Int64 getChildFolder(aFolderId, aSubfolderTitle) - Returns the id of the first subfolder matching the given title. Int64 getIdForItemAt(aFolderId, aPosition) - R...
...ndex the whole folder - use moveItem for a managed solution. setItemDateAdded(aItemId, aDateAdded) - Set the date the item was first added, in microseconds. setItemLastModified(aItemId, aLastModified) - Set the date the item was last modified, in microseconds. setItemGUID(aItemId, aGUID) Obsolete since Gecko 14.0 - Returns a globally unique identifier for the item. This is mainly for use by
extensions that sync bookmark data between different profiles. moveItem (aFolderId, aNewParentId, aIndex) - Move an item from one folder to another. For bookmarks: changeBookmarkURI(aItemId, aURI) - Change a bookmark's URI. setKeywordForBookmark(aItemId, aKeyword) - Set the keyword for a bookmark. Deleting Bookmark Items With the bookmarks service: removeItem(aItemId) - Works for all types rem...
extIApplication
This content covers features introduced in Thunderbird 3 The extIApplication is defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview boolean quit() boolean restart() void get
Extensions(extI
ExtensionsCallback aCallback) Attributes The following interfaces are available to all applications: Attribute Type Description id readonly attribute AString The id of the application. name readonly attribute AString The name of the application. version readonly attribute AString The version number of the application. console readonl...
...ll applications: Attribute Type Description id readonly attribute AString The id of the 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 extI
Extensions The
extensions object for the application. Contains a list of all installed
extensions. Not available anymore on Gecko 2.0 (see [1]), use get
Extensions() instead Obsolete since Gecko 2.0 prefs readonly attribute extIPreferenceBranch The preferences object for the application. Defaults to an empty root branch. storage readonly attr...
... Methods quit() Attempts to shutdown the application. 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. get
Extensions(aCallback) Calls aCallback with the list of installed
extensions. void get
Extensions(extI
ExtensionsCallback 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"].ge...
Toolkit API
programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. ...
...vices include: Profile management Chrome registration Browsing history Extension and theme management Application update service Safe mode Printing Official references Structure of an Installable Bundle: describes the common structure of installable bundles, including
extensions, themes, and XULRunner applications Extension Packaging: specific information about how to package
extensions Theme Packaging: specific information about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications Chrome Registration Printing in XUL Apps See also The following developer pages contain examples and discussions of particular...
...n about how to package themes Multiple-item Extension Packaging: specific information about multiple-item extension XPIs XUL Application Packaging: specific information about how to package XULRunner applications Chrome Registration Printing in XUL Apps See also The following developer pages contain examples and discussions of particular topics: XUL XUL overlays Developing
extensions XULRunner Developing themes DOM RDF Storage ...
Packaging WebLock
ackage 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. ...
...The installation script for the WebLock component can also be used to register the component with the browser into which it is installed (see Registration Methods in XPCOM for more information on registration). ...
... (see Registration Methods in XPCOM for more information on registration). The sample installation script shown below uses the Mozilla XPInstall technology to manipulate an installer and talk to Mozilla'schrome registry as high-level JavaScript objects. What Is the Chrome Registry? Like the Windows registry, the chrome registry is a database of information about applications, skins, and other
extensions that have been installed in a Gecko application. Since Mozilla and other Gecko-based applications are cross-platform, this database is abstracted above the operating system or any particular platform's registry. The chrome registry lives in a series of RDF/XML files in the application directory of Mozilla and other Gecko-based browsers, where new installs, user configurable data, skins, and othe...
Setting up the Gecko SDK
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 Platform SDK: http://www.microsoft.com/downloads/e...displaylang=en moztools: http://ftp.mozilla.org/pu...
...ing against winapi functions like kernel32.lib, user32.lib, etc. Also, if you notice, this turns on "XP_WIN" and "XP_WIN32" definitions, this allows XP and onward support. To build the component, just type "gmake", to clean up files run "gmake clean". Installing Component This if for manually installing the component for testing. I used a different firefox profile for testing purposes called
extensions. Copy the .dll file to your
extensions directory. %APPLICATIONDATA%\Mozilla\Firefox\Profiles\x.
extensions\
extensions\bob@george.com. Then copy the .xpt file to the C:\Program Files (x86)\Mozilla Firefox\components directory. Next run the regxpcom to registister the component in firefox (this writes to the complist.dat file in your profile) regxpcom -x "C:\Program Files (x86)\Mozilla Firefox\"...
... I used XPCOMViewer, to make sure the class and the interface were showing. Now you can use this component in your javascript extension. A Makefile for Unix On Linux, the equivalent project settings are typically handled in a Makefile. The Makefile allows you to spe...
Observer Notifications
r window and all its components have been loaded and initialized. Documents These topics indicate notifications you can monitor related to DOM documents. Topic Subject Data Description chrome-document-global-created nsIDOMWindow null Sent immediately after a chrome document window has been set up, but before any script code has been executed. This lets
extensions inject API into chrome windows as needed (see nsIDOMGlobalPropertyInitializer for an alternative method of doing this, which uses significantly less memory). data is intentionally left blank. content-document-global-created nsIDOMWindow origin Sent immediately after a web content document window has been set up, but before any script code has been executed. This lets extensi...
.... Topic Subject Description dom-window-destroyed nsIDOMWindow Called just before a DOM window is destroyed. inner-window-destroyed nsIDOMWindow Called when an inner window is removed from the backward/forward cache. See Working With BFCache for information about the bfcache, and Inner and outer windows for details about how the window hierarchy works.
Extensions that cache information about windows may wish to observe this so they can release information when the window is destroyed. The window id can be obtained from subject.QueryInterface(Components.interfaces.nsISupportsPRUint64).data outer-window-destroyed nsIDOMWindow Called when an outer window is disconnected from its docshell. See Inner and outer windows for details about how the...
...bout windows may wish to observe this so they can release information when the window is destroyed. The window id can be obtained from subject.QueryInterface(Components.interfaces.nsISupportsPRUint64).data outer-window-destroyed nsIDOMWindow Called when an outer window is disconnected from its docshell. See Inner and outer windows for details about how the window hierarchy works.
Extensions that cache information about windows may wish to observe this so they can release information when the window is destroyed. The window id can be obtained from subject.QueryInterface(Components.interfaces.nsISupportsPRUint64).data toplevel-window-ready nsIWindowWatcher Called just after a new top level window has been opened and is ready, but has not yet loaded a document. ...
nsIMsgCustomColumnHandler
The interface inherits from nsITreeView, however when you're implementing a custom handler in Javascript its not necessary to implement all of nsITreeView's methods. ...
...The interface inherits from nsITreeView, however when you're implementing a custom handler in Javascript its not necessary to implement all of nsITreeView's methods. ...
... Return value The long value that sorting will be done with. ...
nsISessionStore
The API operates on top-level browser.xul and navigator.xul windows; see Note on windows for details. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In versions of Firefox prior to 3.5, the user preference browser.sessionstore.enabled must be true for these calls to be successful. Starting in Firefox 3.5, this preference is no longer used. ...
... previously assigned to aKey using nsISessionStore.setWindowValue(), or an empty string if no value is set for that key. If the previously saved value was originally a complex data (ie a JavaScript object) it can then be deserialized using JSON.parse cf. nsISessionStore.setWindowValue(). init() Initializes the session store service. Note: This function is intended for use only by the browser;
extensions shouldn't call it. void init( in nsIDOMWindow aWindow ); Parameters aWindow The window for which to initialize the service. persistTabAttribute() Sets the name of a tab attribute to be saved and restored for all XUL tabs. Note: At present, there's no way to pick and choose tabs to set persistent attributes for. This method affects all tabs indiscriminately. void persistTabAttribute(...
...o the window at index 0 is the last one that was closed. Return value Returns a reference to the reopened window as an nsIDOMWindow object. Note on windows The nsISessionStore API stores state information for certain windows inside the web brower. These windows are nsIDOMWindow objects that contain the tabbrowser that users see as tabs; the document in these windows is browser.xul. For many
extensions, those that overlay browser.xul, the appropriate window object for nsISessionStore is the global object 'window'. For JavaScript running in windows other than the one you want to use in nsISessionStore, you need a nsIDOMWindow object containing browser.xul. This will be the outermost or root nsIDOMWindow in a nsIXULWindow (the window seen by users as a moveable frame on the display). This kind o...
nsIWebSocketChannel
Read only. loadGroup nsILoadGroup The load group of the WebSockets code. notificationCallbacks nsIInterfaceRequestor The notification callbacks for authorization and so forth. originalURI nsIURI The original URI used to construct the protocol connection. This is used in the case of a redire...
...Read only. loadGroup nsILoadGroup The load group of the WebSockets code. notificationCallbacks nsIInterfaceRequestor The notification callbacks for authorization and so forth. originalURI nsIURI The original URI used to construct the protocol connection. This is used in the case of a redirect or URI "resolution" (for example reso...
...S Reserved. Indicates that no status code was provided even though one was expected. 1006 CLOSE_ABNORMAL Reserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. 1007-1999 Reserved for future use by the WebSocket standard. 2000-2999 Reserved for use by WebSocket
extensions. 3000-3999 Available for use by libraries and frameworks. May not be used by applications. 4000-4999 Available for use by applications. Methods asyncOpen() Asynchronously opens the WebSocket connection. Received messages are fed to the socket listener as they arrive. The socket listener's methods are called on the thread that calls asyncOpen() and are not c...
Tips and Tricks from the newsgroups
The following discussions on mozilla.dev.apps.thunderbird and mozilla.dev.
extensions include useful tips for Thunderbird add-on developers. Please feel free to add links to threads. We will add a categorization system as the link list grows. You can also help by creating how-tos from any of these topics. ...
... The following discussions on mozilla.dev.apps.thunderbird and mozilla.dev.
extensions include useful tips for Thunderbird add-on developers. Please feel free to add links to threads. We will add a categorization system as the link list grows. You can also help by creating how-tos from any of these topics. ...
...useful tips for Thunderbird add-on developers. Please feel free to add links to threads. We will add a categorization system as the link list grows. You can also help by creating how-tos from any of these topics. ...
AuthenticatorAssertionResponse.authenticatorData - Web APIs
The authenticatorData property of the AuthenticatorAssertionResponse interface returns an ArrayBuffer containing information from the authenticator such as the Relying Party ID Hash (rpIdHash), a signature counter, test of user presence, user verification flags, and any
extensions processed by the authenticator. Syntax var authnrData = authenticatorAssertionResponse.authenticatorData; Value An ArrayBuffer that has a ArrayBuffer.byteLength of at least 37 bytes, containing the following fields: rpIdHash (32 bytes) - A SHA256 hash of the relying party ID that was seen by the browser. The server will ensure that this hash matches a hash of its own origin in order to prevent phishing or other man-in-the-middle attacks. flags (1 bytes) - A bitfield that indicates various attributes that were a...
...y follows these bytes. credentialId (variable length) - A unique identifier for this credential so that it can be requested for future authentications. The credential is "credentialIdLength" bytes long. credentialPublicKey (variable length) - A COSE encoded public key. This public key will be stored on the server associated with a user's account and be used for future authentications.
extensions (variable length) - An optional CBOR map of
extensions. Examples var options = { challenge: new Uint8Array(26), // will be another value, provided by the relying party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionPKCred) { var authenticatorData = assertionPKCred.response.authenticatorData; // Maybe try to convert the authen...
... Recommendation Initial definition. ...
EXT_color_buffer_float - Web APIs
Extended methods The following sized formats become color-renderable: gl.R16F, gl.RG16F, gl.RGBA16F, gl.R32F, gl.RG32F, gl.RGBA32F, gl.R11F_G11F_B10F. ...
... Availability: This extension is available to WebGL 2 contexts only. For WebGL 1, see the EXT_color_buffer_half_float and WEBGL_color_buffer_float
extensions. ...
... Extended methods The following sized formats become color-renderable: gl.R16F, gl.RG16F, gl.RGBA16F, gl.R32F, gl.RG32F, gl.RGBA32F, gl.R11F_G11F_B10F. Color-renderable means: The WebGLRenderingContext.renderbufferStorage() method now accepts these formats. ...
EXT_shader_texture_lod - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. It requires GLSL #version 300 es. ...
... Availability: This extension is only available to WebGL1 contexts. ...
... float lod) vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod) vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy) vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy) vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy) vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy) Examples Enabling the
extensions: gl.getExtension('EXT_shader_texture_lod'); Shader code that avoids artifacts when wrapping texture coordinates: <script type="x-shader/x-fragment"> #extension GL_EXT_shader_texture_lod : enable #extension GL_OES_standard_derivatives : enable uniform sampler2D myTexture; varying vec2 texcoord; void main(){ gl_FragColor = texture2DGradEXT(myTexture, mod(texcoord, vec2(0.1, 0.5)), ...
Media Source API - Web APIs
The Media Source API, formally known as Media Source
Extensions (MSE), provides functionality enabling plugin-free web-based streaming media. Using MSE, media streams can be created via JavaScript, and played using <audio> and <video> elements. Media Source
Extensions concepts and usage Playing video and audio has been available in web applications without plugins for a few years now, but the basic features offered have really only been useful for playing single whole tracks. We can't, for example, combine/split arraybuffers. Streaming media has up until recently been the domain of Flash, with technologies like Flash Media Server serving video streams using the RTMP protocol. The MSE standard With Media Source
Extensions (MSE), this is changing. MSE allows us to replace the usual single track...
...ayed by a <video> element, such as number of dropped or corrupted frames. Returned by the HTMLVideoElement.getVideoPlaybackQuality() method. TrackDefault Provides a SourceBuffer with kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk. TrackDefaultList A simple container list for multiple TrackDefault objects.
Extensions to other interfaces URL.createObjectURL() Creates an object URL pointing to a MediaSource object that can then be specified as the src value of an HTML media element to play a media stream. HTMLMediaElement.seekable When a MediaSource object is played by an HTML media element, this property will return a TimeRanges object that contains the time ranges that the user is able to seek to. HTML...
... ...
Performance Timeline - Web APIs
The Performance Timeline API defines
extensions to the Performance interface to support client-side latency measurements within applications. The
extensions provide interfaces to retrieve performance entry metrics based on specific filter criteria. The standard also includes interfaces that allow an application to define performance observer callbacks that are notified when specific performance events are added to the browser's performance timeline. This document provides an overview of the standard's interfaces. For more details about the interfaces, see the reference pages and Using Performance Timeline. ...
...fic filter criteria. The standard also includes interfaces that allow an application to define performance observer callbacks that are notified when specific performance events are added to the browser's performance timeline. This document provides an overview of the standard's interfaces. For more details about the interfaces, see the reference pages and Using Performance Timeline. Performance
extensions The Performance Timeline API extends the Performance interface with three methods that provide different mechanisms to get a set of performance records (metrics), depending on the specified filter criteria. The methods are: getEntries() Returns all recorded performance entries or, optionally, the entries based on the specified name, performance type and/or the initiatorType (such as an HTML ...
...bserve), the PerformanceObserver interface also has a disconnect() method that stops an observer from receiving further events. Performance observers were added to the Level 2 version of the standard and were not widely implemented. Implementation status A summary of the interfaces' implementation status is provided below, including a link to more detailed information. Performance interface
extensions: As shown in the Performance interface's Browser Compatibility table, most of these interfaces are broadly implemented by desktop browsers and have less support on mobile devices. PerformanceEntry: As shown in the PerformanceEntry interface's Browser Compatibility table, most of these interfaces are broadly implemented by desktop browsers and have less support on mobile devices. Performance Obs...
Pointer events - Web APIs
Pointer events address that need. Pointer events are DOM events that are fired for a pointing device. They are designed to create a single DOM event model to handle pointing input devices such as a mouse, pen/stylus or touch (such as one or more fingers). The pointer is a hardware-agnostic device that can target a specific set of screen coordinates. ...
...r capture Pointer capture allows the events for a pointer to be retargeted to a particular element other than the normal hit test result of the pointer's location. pointer event A DOM event fired for a pointer. Interfaces The primary interface is the PointerEvent interface which has a constructor plus several event types and associated global event handlers. The standard also includes some
extensions to the Element and Navigator interfaces. The following sub-sections contain short descriptions of each interface and property. PointerEvent interface The PointerEvent interface extends the MouseEvent interface and has the following properties. (All of the following properties are Read only .) pointerId A unique identifier for the pointer causing the event. width The width (magnitude on t...
...hen a pointer is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer. gotpointercapture ongotpointercapture Fired when an element receives pointer capture. lostpointercapture onlostpointercapture Fired after pointer capture is released for a pointer. Element
extensions There are three
extensions to the Element interface: setPointerCapture() Designates a specific element as the capture target of future pointer events. releasePointerCapture() This method releases (stops) pointer capture that was previously set for a specific pointer event. Navigator extension The Navigator.maxTouchPoints property is used to determine the maximum number of simultaneous t...
PublicKeyCredentialCreationOptions - Web APIs
already have some. PublicKeyCredentialCreationOptions.authenticatorSelection Optional An object whose properties are criteria used to filter out the potential authenticators for the creation operation. PublicKeyCredentialCreationOptions.attestation Optional A String which indicates how the attestation (for the authenticator's origin) should be transported. PublicKeyCredentialCreationOptions.
extensions Optional An object with several client
extensions' inputs. Those
extensions are used to request additional processing (e.g. dealing with legacy FIDO APIs credentials, prompting a specific text on the authenticator, etc.). Methods None. Examples // some examples of COSE algorithms const cose_alg_ECDSA_w_SHA256 = -7; const cose_alg_ECDSA_w_SHA512 = -36; var createCredentialOptions = { //...
...me: "john.p.smith@example.com", displayName: "John P. ...
... }, { type: "public-key", // the id for john-doe@example.com id : new Uint8Array(26) /* another id */ } ] } }; // Create the new credential with the options above navigator.credentials.create(createCredentialOptions) .then(function (newCredentialInfo) { var attestationResponse = newCredentialInfo.response; var client
ExtensionsOutputs = newCredentialInfo.getClient
ExtensionsResults(); // Send the response to the relying party server // it will verify the content and integrity before // creating a new credential }).catch(function (err) { // Deal with any error properly console.error(err); });; Specifications Specification Status Comment Web Authentication: An API fo...
WebGL: 2D and 3D graphics for the web - Web APIs
ed by the Canvas API to do 2D graphics on web pages. ...
...st webglcontextrestored webglcontextcreationerror Constants and types WebGL constants WebGL types WebGL 2 WebGL 2 is a major update to WebGL which is provided through the WebGL2RenderingContext interface. It is based on OpenGL ES 3.0 and new features include: 3D textures, Sampler objects, Uniform Buffer objects, Sync objects, Query objects, Transform Feedback objects, Promoted
extensions that are now core to WebGL 2: Vertex Array objects, instancing, multiple render targets, fragment depth. See also the blog post "WebGL 2 lands in Firefox" and webglsamples.org/WebGL2Samples for a few demos. Guides and tutorials Below, you'll find an assortment of guides to help you learn WebGL concepts and tutorials that offer step-by-step lessons and examples. Guides Data in WebGL A gui...
...s and tutorials Below, you'll find an assortment of guides to help you learn WebGL concepts and tutorials that offer step-by-step lessons and examples. Guides Data in WebGL A guide to variables, buffers, and other types of data used when writing WebGL code. WebGL best practices Tips and suggestions to help you improve the quality, performance, and reliability of your WebGL content. Using
extensions A guide to using WebGL
extensions. Tutorials WebGL tutorial A beginner's guide to WebGL core concepts. A good place to start if you don't have previous WebGL experience. Examples A basic 2D WebGL animation example This example demonstrates the simple animation of a one-color shape. Topics examined are adapting to aspect ratio differences, a function to build shader programs from sets...
Window.open() - Web APIs
renced resource of a link in a new tab? or in a specific tab? To open a resource in a new tab see Tabbed browser. Some Code snippets are available. If you are using the SDK, tabs are handled a bit differently K-meleon 1.1, a Mozilla-based browser, gives complete control and power to the user regarding how links are opened. Only the user can set his advanced preferences to do that. Some advanced
extensions also give Mozilla and Firefox a lot of power over how referenced resources are loaded. In a few years, the target property of the CSS3 hyperlink module may be implemented (if CSS3 Hyperlink module as it is right now is approved). And even if and when this happens, you can expect developers of browsers with tab-browsing to give the user entire veto power and full control over how links can open w...
...esorting to window.open() Generally speaking, it is preferable to avoid resorting to window.open() for several reasons: Most modern desktop browsers offer tab-browsing, and tab-capable browser users overall prefer opening new tabs than opening new windows in a majority of webpage situations. Most modern browsers offers a popup-blocking feature. Users can be using browser-built-in feature or
extensions include opening a link in a new window or not, in the same window, in a new tab or not, in "background" or not. Coding carelessly to open new windows can no longer be assured of success, cannot succeed by force and, if it does, it will annoy a majority of users. New windows can have menubar missing, scrollbars missing, status bar missing, window resizability disabled, etc.; new tabs cannot be mi...
... surf on the web but under strict security policies: no javascript enabled, no java, no activeX, no Flash. For various reasons (security, public access, text browsers, etc..), about 5% to 10% of users on the web surf with javascript disabled. "javascript:" links will interfere with advanced features in tab-capable browsers: eg. middle-click on links, Ctrl+click on links, tab-browsing features in
extensions, etc. "javascript:" links will interfere with the process of indexing webpages by search engines. "javascript:" links interfere with assistive technologies (e.g. voice browsers) and several web-aware applications (e.g. PDAs and mobile browsers). "javascript:" links also interfere with "mouse gestures" features implemented in browsers. Protocol scheme "javascript:" will be reported as an error...
Live streaming web audio and video - Developer guides
requiring plugins, although this looks set to change. Protocols other than HTTP may also be subject to blocking from firewalls or proxy servers. Using streaming protocols The process of using the various protocols is reassuringly familiar if you are used to working with media over HTTP. For example: <video src="rtsp://myhost.com/mymedia.format"> <!-- Fallback here --> </video> Media Source
Extensions (MSE) Media Source
Extensions is a W3C working draft that plans to extend HTMLMediaElement to allow JavaScript to generate media streams for playback. Allowing JavaScript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams. For example, you could implement MPEG-DASH using JavaScript while offloading the decoding to MSE. Note: Time Shi...
...deo formats are beginning to see support across browsers. Note: You can find a guide to encoding HLS and MPEG-DASH for use on the web at Setting up adaptive streaming media sources. MPEG-DASH DASH stands for Dynamic Adaptive Streaming over HTTP and is a new format that has recently seen support added to Chrome, and Internet Explorer 11 running on Windows 8.1. It is supported via Media Source
Extensions which are used by JavaScript libraries such as DASH.js. This approach allows us to download chunks of the video stream using XHR and "append" the chunks to the stream that's played by the <video> element. So for example, if we detect that the network is slow, we can start requesting lower quality (smaller) chunks for the next segment. This technology also allows an advertising segment to be appen...
... 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 Reference Client Dynamic Streaming over HTTP The State of MPEG-DASH Deployment Look, no plugins: Live streaming to the browser using Media Source
Extensions and MPEG-DASH Media Source
Extensions (W3C) Icecast SHOUTcast GStreamer Streaming GStreamer Pipelines Via HTTP Streaming media using GStreamer on the web GStreamer and Raspberry Pi Acceptance of Media Source
Extensions as W3C Candidate Recommendation will accelerate adoption of dash.js Comparison of Streaming Media Systems Mozilla Hacks - Streaming Media on demand with Media Source Exte...
Firefox user agent string reference - HTTP
The recommended way to do this, if i...
...The recommended way to do this, if it's absolutely necessary (remember that it slows down every reques...
...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. ...
console - Archive of obsolete content
(), log(), time(), timeEnd(), trace(), warn() info error(), exception(), 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 pre...
... 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 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. ...
Code snippets - Archive of obsolete content
Many of these samples can also be used in XULRunner applications, as well as in actual Mozilla code itself. These examples demonstrate how to accomplish basic tasks that might not be immediately obvious. General Examples and demos from MDN articles A collection of examples and demos from articles. Window code Opening and manipulating windows Toolbar Toolbar related code Sidebar Sidebar related code Forms Forms related code XML Code used to parse, write, manipulate, etc. ...
... Downloading Files Code to download files, images, and to monitor download progress Password Manager Code used to read and write passwords to/from the integrated password manager Bookmarks Code used to read and write bookmarks JavaScript Debugger Service Code used to interact with the JavaScript Debugger Service SVG General General information and utilitie...
Developing add-ons - Archive of obsolete content
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. Add-ons topics Submitting an add-on to AMO Provides helpful information for add-on developers to help them properly package and deliver their add-ons. This includes information about addons.mozilla.org, Mozilla's add-on distribution web site. ...
..., Thunderbird, or other software based on the Mozilla platform, as well as how to distribute your add-ons. Add-ons topics Submitting an add-on to AMO Provides helpful information for add-on developers to help them properly package and deliver their add-ons. This includes information about addons.mozilla.org, Mozilla's add-on distribution web site.
Extensions Extensions add new functionality to Mozilla applications such as Firefox, SeaMonkey and Thunderbird. They can add anything from a toolbar button to a completely new feature. Plugins Information about how to create plugins, which are binary components that let Mozilla based software display content they can't handle natively. Jetpack Browser extension development for every...
Extension Theming Guidelines - Archive of obsolete content
n while leaving it open for styling by custom themes. Skin Packages Just as extension code should exist in chrome content packages, all of the styling for an extension including CSS and images should exist in a chrome skin package. Custom themes may then register a replacement for your skin package allowing them to provide their own styles for all of your content. Branding Certain items of your
extensions style, in particular logos and icons can be kept in the chrome content package such that they are not replaceable by custom themes Stylesheets guidelines Include Stylesheets For every new window that your extension adds and for every window that your extension overlays content into be sure to add a stylesheet from your chrome skin package. While it may be tempting to use the same stylesheet in m...
... to add a stylesheet from your chrome skin package. While it may be tempting to use the same stylesheet in multiple places try to avoid this so that themes can correctly target the right windows. CSS Selectors When writing stylesheet rules for windows that you are overlaying always try to be specific with the css selector. If you are not then you run a risk of conflicting with content that other
extensions add to the window. XUL guidelines XBL Bindings XBL bindings are applied using style rules. However these are rarely part of the style of the widgets but more about adding custom widgets. In this case you should add a stylesheet to your chrome content package and apply the bindings there. This is one of the rare cases where it is sensible to put the stylesheet into the content area. Style attrib...
Extension Versioning, Update and Compatibility - Archive of obsolete content
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 add-on will install into any toolkit based application. Overriding Compatibility Checking For testing purposes you can tell the application to somewhat ignore compatibility checks when installing add-ons. Simply create the boolean preference
extensions.checkCompatibility and set it to false. Note: Before Firefox 1.5 the preference app.
extensions.version could be used to override the version that the application believed itself to be to allow normally incompatible
extensions to install. Choosing minVersion and maxVersion minVersion and maxVersion should specify the range of versions of the application you have tested with. In particular you s...
...ng, then hashed using a sha512 hashing algorithm and this hash is signed using the private key. The resultant data is DER encoded then base 64 encoded for inclusion in the update.rdf as an signature entry. Debugging and solving problems The update mechanism logs information to the console, and display various information which can help you to find problem. To enable the log: Set the value of
extensions.logging.enabled to true (using URL about:config) Run Firefox from command with option -console If you encounter problems, search the output in console for your extension id, and see if failures were logged. ...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
ener( "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 Handling Preferences section. So, if we were to use FUEL, we can do the following in the init function: init : function() { let firstRunPref = "
extensions.xulschoolhello.firstRunDone"; if (!Application.prefs.getValue(firstRunPref, false)) { Application.prefs.setValue(firstRunPref, true); // all the rest of the first run code goes here. } } In this case you would need to declare the first run preference in your default preferences file, with a default value of false. You should also change the preference value before you run any other ...
... uninstalled, so it would be consistent to keep it. On the other hand, local data that is no longer needed takes unnecessary disk space and can contain private information that users forget is there. It's up to the developer's discretion. Uninstalling an add-on happens in 2 stages: first the add-on is flagged to be uninstalled, and then the add-on is actually removed. In the case of Bootstrapped
Extensions, both steps happen at the same time. In the case of "traditional"
extensions, like those explained in the tutorial, both steps happen at different times. In this case the user is told that Firefox needs to restart in order for the extension to be completely removed. Then the user has the option to restart right away, wait to restart whenever is convenient, or even cancel the uninstall operation. ...
Connecting to Remote Content - Archive of obsolete content
against SQL injection attacks. Convert XML into RDF. This was more useful when RDF was the default storage format. 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 ...
...lp 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 "Start Tamper" button, for every request made you will get a popup dialog for tampering with it before it is sent. You can use it to view or even modify the data in a request, and then inspect the result. This can be a lot of work because there is a lot of web activity in a normal Firefox window, so use it sparingly. A tut...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
In most cases, .text() should be used instead of the latter. When using the jQuery constructor, only empty tags should be specified in order to avoid invoking the DOM parser. var href = "http://www.g...
...MoreStuffWith(someStuff); } return script.toSource() + "(" + [String.quote(href), uneval(otherStuff)] + ")"; } Safely Using Remote HTML In the above cases, we're working with text content that needs to appear in generated DOM. There are cases, however, where we need to safely display formatted HTML sent by a remote server. Fortunately, there is a safe and simple way to do this. For Web
Extensions the most simple way is sanitize the output about javaScript inline declaration and other wrong content. For XUL addon based the nsIParserUtils.parseFragment() method will convert a string to a document fragment while removing any scripts or other unsafe content in the process. let { Cc, Ci } = require("chrome"); /** * Safely parse an HTML fragment, removing any executable * JavaScript, and re...
JavaScript Object Management - Archive of obsolete content
ow to handle JavaScript data effectively, beginning with chrome code, in ways which will prevent pollution of shared namespaces and conflicts with other add-ons resulting from such global namespace pollution. The first step to good JavaScript object management is having a namespace, or a JavaScript object that contains our code and data, that you know will not conflict with Firefox code or other
extensions. Namespace declaration is best located in a file of its own, so that you have this one JS file that should be included in all of your XUL files. We'll be using the placeholder <Namespace> below. This needs to be replaced with an identifier name which is unique to your add-on. If your add-on is called Sergeant Pepper, for instance, then SgtPepper would be a good namespace name. /** * <Namespa...
...dd-on is called Sergeant Pepper, for instance, then SgtPepper would be a good namespace name. /** * <Namespace> namespace. */ if (typeof <Namespace> == "undefined") { var <Namespace> = {}; }; Note: The naming standard that we normally follow is that the first part of the namespace corresponds to the development group (or company), and the second to the specific project. However, most
extensions are small projects by individuals, so these examples follow a more practical approach of having just one namespace with the project name. Notice how the <Namespace> namespace is declared using var. We need the namespace to be a global object that it can be used everywhere in the window chrome. You can include functions in any namespace, since namespaces are just regular JS objects. That shoul...
Useful Mozilla Community Sites - Archive of obsolete content
tions. This is the best way to get your extension to users from all around the world. Adding your extension to AMO is easy. All you need is your XPI, a few screenshots (good ones will make your extension much more appealing), and a 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 ...
...hat 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 will be pushed as an update to all your users. If you decide to host your own extension, you'll have to learn about the update system in order to push your own updates. Babelzilla Babelzilla is a worldwide community of localizers. Developers submit their
extensions using the Web Translation System (WTS) and volunteers around the world translate them to different languages. The community is very active, and you can be sure to get translations for the most commonly used languages within a few days of submitting your extension. You'll also receive feedback that you wouldn't notice by testing only in one language, which can reveal other bugs in your locale hand...
User Notifications and Alerts - Archive of obsolete content
Using modal dialogs and alerts is usually a bad idea. They interrupt the user's workflow, demanding immediate action before anything else can be done. Users will find them annoying and probably will learn to dismiss them as quickly as possible without even reading what they have to say. Or they will just get rid of your add-on. This section lists a few alternatives that give you the possibility of notifying the user and requesting action without being too annoying. The notificationbox element You have probably seen these before. The "remember password" prompt is the one that shows up the most often. ...
...id of . On Firefox 3 and above, this seems to have been corrected, using the panel element. The bottom right corner of the browser is the recommended location for an alert, because it normally doesn't block the part of the content where the user is reading, or the most important parts of page content, such as menus and titles. Remember this is not a recommended practice. Imagine having multiple
extensions notifying you in their own custom way, probably even at the same time! This is not good from a UI perspective, so you consider custom alerts the very last resort. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Install.js - Archive of obsolete content
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 file. And it also knows how to install packaged components, search engines and default preferences. 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 th...
...Project. Pros: This version consolidates all the changable information at the top of the file. And it also knows how to install packaged components, search engines and default preferences. 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 ). It assumes the following structure of your XPI file: sampleext.xpi chrome\ sampleext.jar content\ sampleext\ locale\ (optional) en-US\ sampleext\ ... skin\ (optional) classic\ sampleext\ ... install.js install.rdf (optional -- see above) Code // install.js // XpiInstaller // By Pike (Heavily inspire...
List of Mozilla-Based Applications - Archive of obsolete content
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 ...
...ation to manage TomTom GPS devices Review article from GPS Magazine; over 2.4m users TopStyle HTML, XHTML and CSS editor Seems to have optional Gecko embedding but doesn't use it by default ToxTox Media Browser for TV 5000 downloads Trixul GUI toolkit Uses Mozilla SpiderMonkey TrustedBird email client Thunderbird bundled with a set of
extensions (formerly known as Milimail) TuneUp music collection organizer Listed on XULRunner Hall of Fame but haven't seen information elsewhere TuxGuitar tabulature editor Uses XULRunner TwitFactory standalone twitter/identi.ca client UIS University Information System Intranet application, 1000 users, Thin client based on FF3 Unison Des...
Building TransforMiiX standalone - Archive of obsolete content
hich are the same as for Mozilla. You need to get the source from CVS. Add TX_EXE=1 mk_add_options BUILD_MODULES="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. This will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/
extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/Makefile.in plus nspr and xpcom from the cvs repository. Building from a full mozilla tree is not supported. It is recommended to add ac_add_options --disable-gtktest ac_add_options --without-jpeg ac_add_options --without-zlib ac_add_options --without-png ac...
...nded to add ac_add_options --disable-gtktest ac_add_options --without-jpeg ac_add_options --without-zlib ac_add_options --without-png ac_add_options --without-x to your .mozconfig, too, as it stops configure from testing unneeded libs. make -f client.mk build as usual. Of course, make -f client.mk checks out and builds just TransforMiiX alright. The binary transformiix(.exe) will be in
extensions/transformiix/source and dist/bin/ (symbolic link). Run it via run-mozilla.sh transformiix on unices and just transformiix.exe on Windows. Original Document Information Author: Axel Hecht Last Updated Date: April 5, 2004 Copyright Information: Portions of this content are (C) 1998-2006 by individual mozilla.org contributors; content available under a Creative Commons license ...
Download Manager improvements in Firefox 3 - Archive of obsolete content
r data management, download resuming, and more. In addition, you can augment or replace the Download Manager's user interface by implementing the new nsIDownloadManagerUI interface. Note: These changes will require some modest revisions to code using the Download Manager; several methods have had minor changes. Download Manager interfaces nsIDownloadManager Gives applications and
extensions access to the Download Manager, allowing them to add and remove files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads. nsIDownload Describes a file in the download queue; these files may currently be queued for download, actively being downloaded, or finished being downloaded. nsIDownloadPr...
...ng them to add and remove files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads. nsIDownload Describes a file in the download queue; these files may currently be queued for download, actively being downloaded, or finished being downloaded. nsIDownloadProgressListener Applications and
extensions implement this interface to be made aware of changes in the status of downloads. nsIDownloadManagerUI Implement this interface to replace or augment the Download Manager user interface. Other Download Manager documentation Download Manager preferences This article lists preferences used by the Download Manager as well as their default values. The Download Man...
Error Console - Archive of obsolete content
he Error Console can be opened from the tools menu or by Ctrl-Shift-J. For information about what JavaScript exceptions get logged into the Error Console, and how to make all exceptions get logged, read the article Exception logging in JavaScript. See Setting up extension development environment#Development preferences for the preferences you should set if you want to see errors from Firefox and
extensions in the Error console. Before Gecko 1.8.1 (Firefox 2), it was called JavaScript Console (see bug 265871). Types of errors Error usually a syntax error that prevents the program from compiling. Warning usually lets the program compile but warns of bad coding and suggests design flaws. Message very similar to warning, used very rarely. Ma...
...r usually a syntax error that prevents the program from compiling. Warning usually lets the program compile but warns of bad coding and suggests design flaws. Message very similar to warning, used very rarely. Manipulating data displayed in Error Console Information displayed in Error Console can be accessed and manipulated through the Console service.
Extensions can write to the Error Console from JavaScript using Components.utils.reportError, or if you're fine with logging to the OS-provided console, dump(). To bring up Error Console from within a browser or mail window, use the function toJavaScriptConsole(). Alternatives Console2 This extension provides a replacement for Error Console, fixing many of its bugs and imple...
XPInstall - Archive of obsolete content
ding="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. 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. Documentation XPInstall API Reference XPInstall API Reference. Learn XPI Installer Scripting by Example This article uses the installer script from browser.xpi insta...
...kaging scheme of the Mozilla and offers a tutorial for creating a new package that can then be redistributed, installed, and made available to users. Install Wizards (aka: Stub Installers) View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed Tools XPInstall trigger page Related Topics
Extensions, XUL, XPI ...
Popup Guide - Archive of obsolete content
tion about these events, see Popup Events. Handling Keys Within Popups For information about how keys are handled within menus and panels, see Handling Keys Within Popups. Platform Specific Menu Considerations See Special Per-Platform Menu Considerations for some notes about handling menus on certain platforms, for instance creating the Application menu on a Macintosh. Using Popups in
Extensions Extensions may add additional menuitems either to a menu on the menu bar or to the context menu. In addition, an extension may add an entirely new menu. For example, an extension might wish to add a new command on the Tools menu to open a dialog specific to the extension. Another common task is to create an extension which adds an item to the browser's context menu. See Using Menus and Popups in...
...
Extensions may add additional menuitems either to a menu on the menu bar or to the context menu. In addition, an extension may add an entirely new menu. For example, an extension might wish to add a new command on the Tools menu to open a dialog specific to the extension. Another common task is to create an extension which adds an item to the browser's context menu. See Using Menus and Popups in
Extensions for details. ...
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. ...
Introduction - Archive of obsolete content
several ways you can use XUL: Firefox extension An extension adds functionality to the browser itself, often in the form of extra toolbars, context menus, or customizations to the browser's user interface. This is done using a feature of XUL called an overlay, which allows the UI provided from one source, in this case, the Firefox browser, to be merged together with the UI from the extension.
Extensions may also be applied to other Mozilla based products such as Thunderbird. Standalone XULRunner application XULRunner is a packaged version of the Mozilla platform which allows you to create standalone XUL applications. A browser 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 w...
...tions 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 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 le...
Using Visual Studio as your XUL IDE - Archive of obsolete content
r own elements in XBL, you can download a XBL schema from mozilla.doslash.org/xblschema. Grab the XSD version and add it in the same way, you added the XUL schema. To combine both, you can also add your own XBL elements to the XUL schema to get autocompletion-support and validation for those in your XUL files. Mihailo posted some instructions in this Codeplex discussion. 4. Visual Assist and file
extensions Since version 10.5, Visual Assist supports Javascript and XML. As it does not work out of the box with unknown file
extensions (like .xul, .xbl and .jsm), you have to do some registry tricks, so that VA knows how to treat these file types. All VA options can be found at: HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\ Find the folder that represents your Visual Studio version ((VANet8...
...Make sure that Visual Studio is not running, when you do this. 5. Problems that need to be solved There are still some problems for which I did not find a solution yet. ...
Building XULRunner with Python - Archive of obsolete content
This page describes how to build and use XULRunner with the Python extension on Windows and while generally useful it is written based on experiences with accessibility projects. See also XULRunner. Or, if you are interested in working with XULRunner with Python on Linux, see Mark Lise's Post With the Python
extensions enabled XULRunner provides python script access to the DOM and XPCOM in addition to the usual Java Script. This gives access to Python features and modules and builds on Mark Hammond's pyXPCOM work from Active State. XPCOM components can also be created in Python. Currently (Mar 07) Python is not enabled by default so a custom build of Mozilla is needed. This page provides instructions in the hope of eliminating much trial and error. You should also read the the developer documenta...
... any other project specific .mozconfig files as sometimes shown. It effectively specifies a release build that is not particularly suitable for debugging XULRunner itself. It uses the trunk (or latest) code in CVS so may be unstable. ...
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
download an existing SDK and follow the instructions in Getting started with XULRunner. This is by far the simplest approach. In some cases, however, you may want to use the Mozilla build system to create your application. The only obvious reason for this would be if you need to implement part of your application in C++, as described in the introduction to the now classic Creating Custom Firefox
Extensions with the Mozilla Build System. For the purposes of this article I'm using Dave Townsend's McCoy as an example. It's a straightforward XULRunner app that nonetheless uses most of the features any given application is likely to need. Building XULRunner Do I need to build XULRunner? If you are just creating a XULRunner app with some C++ components, you can avoid the challenge of building XULRunner i...
...reading this guide, you probably need to include C++ components in your application. If you've never done this before, you should consult Creating XPCOM Components or another XPCOM reference. The public/ and src/ directories that you put in the components/ directory will look the same as for an extension that includes C++ components, so you can use the relevant sections of Creating Custom Firefox
Extensions with the Mozilla Build System as a reference. The makefiles, however, will be difference since you won'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. So for most XULRunner apps tha...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
a.org/network/ldap-connection;1"] is null). This is due to the fact that the native LDAP library files are not found by the XULRunner process. The solution is to use the bsmedberg stub, described in Using Dependent Libraries In Extension Components: the component library is just a loader of the real library and all its dependencies, so as all the needed libraries are loaded. Create a subdirectory
extensions/ldapstub in the mozilla source code directory, containing two files, Makefile.in and LDAPStubLoader.cpp: Makefile.in: # Copyright (c) 2005 Benjamin Smedberg <benjamin@smedbergs.us> DEPTH = ../.. srcdir = @srcdir@ topsrcdir = @top_srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = mozldapstub LIBRARY_NAME = mozldap_stub IS_COMPONENT = 1 FORCE_SHARED_LIB = 1 REQUIRES = \ xpc...
...This will create a new file in the components subdirectory of the built package, mozldap_stub.dll (on Windows) or libmozldap_stub.so (on Linux). Copy mozldap.xpt and mozldap_stub.dll into your components XUL app subdirectory. Create a libraries subdirectory in your XUL app directory, and copy mozldap.dll (or libmozldap.so), and the native LDAP binaries into it. Don't ...
2006-11-24 - Archive of obsolete content
hat the licensing incompatibilities between GPL and MPL would prevent Java code to be added in Mozilla. ...
...lities between GPL and MPL would prevent Java code to be added in Mozilla. ...
External resources for plugin creation - Archive of obsolete content
tomatically generate glue code for NPAPI plugins (plugins for browsers such as Google Chrome or Firefox), letting you easily expose C++ classes to Javascript from a simple IDL representation. Nixysa was originally conceived for the needs of O3D, but is flexible enough to support a wide range of use cases. Project: JUCE Project Home Page Description (from the home page): JUCE (Jules' Utility Class
Extensions) is an all-encompassing C++ class library for developing cross-platform applications. It contains pretty much everything you're likely to need to create most applications, and is particularly good for creating highly-specialised UIs and for handling graphics and sound. Supported development environments are XCode, Visual Studio, GCC (and probably any other modern C++ compiler) Browser plugins c...
... Firefox plugin - part one: Discusses the difference between NPAPI and NPRuntime and summarizes the basic APIs needed to create a plugin Building a Firefox plugin - part two: Discusses the basic lifecycle of a NPAPI plugin Building a Firefox plugin - part three: Discusses NPObjects and how to use them Memory Management in NPAPI: Discusses how memory is managed in a NPAPI plugin Browser Plugins vs
Extensions (Add-ons) -- the difference: Discusses the oft-misunderstood difference between a plugin and an extension Wikipedia NPAPI: History and general information about NPAPI Plugins and
Extensions: The general difference between them Boom Swagger Boom Writing an NPAPI Plugin for Mac OS X ...
Plugins - Archive of obsolete content
ke your plugin scriptable from web pages, use npruntime. Plugins can be written completely from scratch using C APIs (usually in C or C++) or they may be built on a plugin framework such as Firebreath, JUCE, or QtBrowserPlugin. There are also some code generation tools that may be helpful. More information about these tools can be found on the External Resources page. Plugins are different from
extensions, which modify or enhance the functionality of the browser itself. Plugins are also different from search plugins, which plug additional search engines in the search bar. Gecko Plugin API Reference (NPAPI) This reference describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces. Site Author Guide For Click-To-Activate Plug...
...ce describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces. Site Author Guide For Click-To-Activate Plugins These guidelines will help website 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 us...
Introduction to Public-Key Cryptography - Archive of obsolete content
ithm used and a representation of the key itself. The DN of the CA that issued the certificate. The period during which the certificate is valid (for example, between 1:00 p.m. on November 15, 1999 and 1:00 p.m. November 15, 2000) The DN of the certificate subject (for example, in a client SSL certificate this would be the user's DN), also called the subject name. Optional certificate
extensions, which may provide additional data used by the client or server. For example, the certificate type extension indicates the type of certificate-that is, whether it is a client SSL certificate, a server SSL certificate, a certificate for signing email, and so on. Certificate
extensions can also be used for a variety of other purposes. The signature section includes the following information: ...
...d:27:40:4d:86:b3:05:c0:01:bb:50:15:c9:de:dc:85:19:22: 43:7d:45:6d:71:4e:17:3d:f0:36:4b:5b:7f:a8:51:a3:a1:00: 98:ce:7f:47:50:2c:93:36:7c:01:6e:cb:89:06:41:72:b5:e9: 73:49:38:76:ef:b6:8f:ac:49:bb:63:0f:9b:ff:16:2a:e3:0e: 9d:3b:af:ce:9a:3e:48:65:de:96:61:d5:0a:11:2a:a2:80:b0: 7d:d8:99:cb:0c:99:34:c9:ab:25:06:a8:31:ad:8c:4b:aa:54: 91:f4:15 Public Exponent: 65537 (0x10001)
Extensions: Identifier: Certificate Type Critical: no Certified Usage: SSL Client Identifier: Authority Key Identifier Critical: no Key Identifier: f2:f2:06:59:90:18:47:51:f5:89:33:5a:31:7a:e6:5c:fb:36: 26:c9 Signature: Algorithm: PKCS #1 MD5 With RSA Encryption Signature: 6d:23:af:f3:d3:b6:7a:df:90:df:cd:7e:18:6c:01:69:8e:54:65:fc:06: 30:43:34:d1:63:1f:0...
Object.observe() - Archive of obsolete content
the change was made. type: A string indicating the type of change taking place. One of "add", "update", or "delete". oldValue: Only for "update" and "delete" types. The value before the change. acceptList The list of types of changes to be observed on the given object for the given callback. If omitted, the array ["add", "update", "delete", "reconfigure", "setPrototype", "prevent
Extensions"] will be used. Return value The object to be observed. Description callback is called each time a change is made to obj, with an array of all changes in the order in which they occurred. Examples Logging all six different types var obj = { foo: 0, bar: 1 }; Object.observe(obj, function(changes) { console.log(changes); }); obj.baz = 2; // [{name: 'baz', object: <obj>, type: 'add'}...
... Object.defineProperty(obj, 'foo', {writable: false}); // [{name: 'foo', object: <obj>, type: 'reconfigure'}] Object.setPrototypeOf(obj, {}); // [{name: '__proto__', object: <obj>, type: 'setPrototype', oldValue: <prototype>}] Object.seal(obj); // [ // {name: 'foo', object: <obj>, type: 'reconfigure'}, // {name: 'bar', object: <obj>, type: 'reconfigure'}, // {object: <obj>, type: 'prevent
Extensions'} // ] Data Binding // A user model var user = { id: 0, name: 'Brendan Eich', title: 'Mr.' }; // Create a greeting for the user function updateGreeting() { user.greeting = 'Hello, ' + user.title + ' ' + user.name + '!'; } updateGreeting(); Object.observe(user, function(changes) { changes.forEach(function(change) { // Any time name or title change, update the greeting if (ch...
Archived JavaScript Reference - Archive of obsolete content
ed in browsers.Legacy generator functionThe legacy generator function statement declares legacy generator functions with the specified parameters.Legacy generator function expressionThe function keyword can be used to define a legacy generator function inside an expression. ...
...e specified parameters.Legacy generator function expressionThe function keyword can be used to define a legacy generator function inside an expression. ...
LiveConnect - Archive of obsolete content
ect. Removal of java and Packages global objects in Mozilla 16 See bug 748343 for the rationale and workarounds. You can still embed Java applets and access their API from JavaScript. LiveConnect Overview An overview for Liveconnect. LiveConnect reference The Java classes used for LiveConnect, along with their constructors and methods. Java in Firefox
extensions Community View mozilla.dev.tech.java forums... Mailing list Newsgroup RSS feed Related Topics JavaScript, Plugins Older notes (Please update or remove as needed.) While the bloated LiveConnect code in the Mozilla source was removed in version 1.9.2 of the platform (see bug 442399), its former API has been restored (...
...The reimplementation also restores the ability to use try-catch exceptions within JavaScript, and is free of the increasing number of other bugs introduced by the decline of the original LiveConnect (e.g., java.lang.String and arrays not working properly). LiveConnect use by applets is enabled via the use of the "MAYSCRIPT" attribute in apple...
XForms Custom Controls - Archive of obsolete content
ormsUIWidget interface. This interface is used by the XForms engine to interact with the underlying control. For example, when the control needs to be updated according to the rules of XForms, the refresh method will be called by the processor. Below is the structure of the interface. As always, please refer directly to the source code to be sure that you are using the latest, up-to-date version:
extensions/xforms/nsIXFormsUIWidget.idl. interface nsIXFormsUIWidget : nsIDOMElement { /** * Is called when control should be updated to reflect the value of the bound node. */ void refresh(); /** * Is called when focus is advanced to the XForms element. */ boolean focus(); /** * Is called when control should be disabled. * This really only applies to the submit element. */ ...
...ensure that the proper widget is given focus. With rare exception, your control should only need to implement the nsIXFormsUIWidget interface. But certain XForms controls need to implement additional interfaces. Such elements include upload and case. nsIXFormsAccessors The nsIXFormsAccessors interface allows access to the value and the state of the instance node that the control is bound to (see
extensions/xforms/nsIXFormsAccessors.idl). Currently interface is: interface nsIXFormsAccessors : nsISupports { /** * Return value of instance node. */ DOMString getValue(); /** * Set value of instance node. */ void setValue(in DOMString value); /** * Return true if the instance node is readonly as determined by the MDG. */ boolean isReadonly(); /** * Return true if the...
XForms Input Element - Archive of obsolete content
ound (see the spec). Attributes UI Common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control Single-Node Binding Special inputmode - not supported for this control incremental - supported. The default value is 'false'. Mozilla
Extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) Type restrictions The input element can be bound to a node containing simple content of any data type except xsd:base64Binary, xsd:hexBinray or any data type derived from these. Representations The xforms input element can be represented by the following widgets for the spcified data types (or type...
...osition attribute. Specific handling of attributes incremental - if "true" or this attribute is omitted from this element, then the instance node will be updated when the user checks or un-checks the checkbox. If "false" then the instance node will be updated when the checkbox loses the focus. labelposition - a Mozilla XForms extension in the namespace http://www.mozilla.org/projects/xfor...009/
extensions. This attribute is optional, possible values are before and after. The default value if omitted is after. It controls the display of the label relative to the checkbox. before shows the label first, then the checkbox, after shows the checkbox, than the label. labelposition was introduced with Mozilla XForms 0.8.8. Before that, the default behavior was to display the label first, then the checkbox...
XForms - Archive of obsolete content
re 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. Documentation Implementation status Implementation status of the Mozilla XForms extension Building Get started with building your own XForms
extensions from source. Troubleshooting tips for XForms A small collection of tips for troubleshooting common problems with XForms forms. Mozilla XForms specials Explains where, and how, Mozilla XForms deviates or extends the XForms 1.0 specification. XForms custom controls Custom controls lets the form author "skin" each XForms control through XBL, and cr...
...ements reference XForms user interface elements documentation. ...
XQuery - Archive of obsolete content
r the query portion, and has scripting features such as function and variable definitions, XML-inclusion, 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 ...
...QJ) for Java and eXist is in the midst of getting such an API. Berkeley DB XML was the initial choice by the extension developer for its support across many languages (C++, Java, Python, Perl, PHP, etc.) (besides its also being open source), but now some problems may exist with BDBXML (unlike Saxon). A simple usage example is available. Notes for developers wishing to access XQuery in their own
extensions At present, the extension works simply by using LiveConnect to work with Berkeley DB XML's Java API (and via a Java wrapper class which circumvents LiveConnect's current inability to handle some types of Java exceptions properly). However, use of the approach of the Java Firefox extension might be used to turn the above extension concept into an XPCOM component (giving it access to all open win...
Archive of obsolete content
is used for syndicating news, blog posts, IPradio, and IPTV, with an amazing amount of momentum. SAX SAX, short forSimple API for XML, is a parsing API. SAX was the first widely adopted API for XML in Java, and later implemented in several other programming language environments. Starting with Firefox 2, a SAX parser is available to XUL applications and
extensions. For more information, please see SAX homepage. Security Relying on these obsolete security articles is highly discouraged. Doing so may put your systems at risk. Solaris 10 Build Prerequisites Sunbird Theme Tutorial This tutorial is a step-by-step guide to making a theme for Sunbird 0.3a1 and later versions. It is designed for be...
... This technical memo is a cautionary note on using NetScape Portable Runtime's (NSPR) IO timeout and interrupt on Windows NT 3.51 and 4.0. Due to a limitation of the present implementation of NSPR IO on NT, programs must follow the following guideline: Using SSH to connect to CVS Using Web Standards in your Web Pages Using workers in
extensions This article shows you how to use worker threads in
extensions to perform tasks in the background without blocking the user interface. Web Standards The Web Standards Project Windows Media in Netscape Netscape 7.1 has the ability to load the Microsoft(R) Windows Media Player(TM) as an ActiveX control, and thus developers can now...
CSS FAQ - Learn web development
reen; } <div id="orange" class="green" style="color: red;">This is red</div> The rules are more complicated when the selector has multiple parts. More detailed information about how selector specificity is calculated can be found in the CSS 2.1 Specification chapter 6.4.3. What do the -moz-*, -ms-*, -webkit-*, -o-* and -khtml-* properties do? These properties, called prefixed properties, are
extensions to the CSS standard. They allow use of experimental and non-standard features in browsers without polluting the regular namespace, preventing future incompatibilities to arise when the standard is extended. The use of such properties on production websites is not recommended -- they have already created a huge web compatibility mess. For example, many developers only using the -webkit- prefixed ...
...ard version afterwards so it can automatically override the prefixed versions where supported. For example: -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); Note: For more information on dealing with prefixed properties, see Handling common HTML and CSS problems -- Handling CSS prefixes from our Cross-browser testing module. Note: See the Mozilla CSS
Extensions page for more information on the Mozilla-prefixed CSS properties. How does z-index relate to positioning? The z-index property specifies the stack order of elements. An element with a higher z-index/stack order is always rendered in front of an element with a lower z-index/stack order on the screen. Z-index will only work on elements that have a specified position (position:absolute, position...
TypeScript support in Svelte - Learn web development
sively. Once you have TypeScript configured, you can start using it from a Svelte component by just adding a <script lang='ts'> at the beginning of the script section. To use it from regular JavaScript files, just change the file extension from .js to .ts. You'll also have to update any corresponding import statements (don't include the .ts in your import statements; TypeScript chose to omit the
extensions). Note: using TypeScript in component markup sections is not supported yet. You'll have to use JavaScript from the markup, and TypeScript in the <script lang='ts'> section. Improved developer experience with TypeScript TypeScript provides code editors and IDEs with lots of information to allow them to deliver a friendlier development experience. We'll use Visual Studio Code to do a quick te...
..." by James Birtles, which has been discontinued. In case you have it installed, you should uninstall it and install the official Svelte extension instead. Anyway, assuming you are inside the VS Code application, from the root of your project's folder, type code . (the trailing dot tells VS code to open the current folder) to open the code editor. VS Code will tell you that there are recommended
extensions to install. Clicking Install all will install Svelte for VS Code. We can also see that the setupTypeScript.js file made a couple of changes to our project. The main.js file has been renamed to main.ts, which means that VS Code can provide hover-information on our svelte components: We also get type-checking for free. If we pass an unknown property in the options parameter of the App cons...
Getting started with Svelte - Learn web development
ly when you build your app, producing highly-optimized vanilla JavaScript. The outcome of this approach is not only smaller application bundles and better performance, but also a developer experience that is more approachable for people that have limited experience of the modern tooling ecosystem. Svelte sticks closely to the classic web development model of HTML, CSS, and JS, just adding a few
extensions to HTML and JavaScript. It arguably has fewer concepts and tools to learn than some of the other framework options. It's main current disadvantages are that it is a young framework -- its ecosystem is therefore more limited in terms of tooling, support, plugins, clear usage patterns, etc. than more mature frameworks, and there are also less job opportunities. But it's advantages should be enough...
...extends CSS by adding a scoping mechanism, allowing each component to define their own styles without the risk of clashing with other component's styles. It extends JavaScript by reinterpreting specific directives of the language to achieve true reactivity and ease component state management. The compiler only intervenes in very specific situations and only in the context of Svelte components.
Extensions to the JavaScript language are minimal and carefully picked in order to not break JavaScript 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 compil...
Accessibility Features in Firefox
er to computer. View selection source (techies only): when you select some text and right click or press Shift+F10, you can "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. ...
...er. View selection source (techies only): when you select some text and right click or press Shift+F10, you can "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 we...
CSUN Firefox Materials
b 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 downloads Customize Your Experience! Many users are finding the true greatness of Firefox lies in support for third party
extensions. ...
...e 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 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...
A bird's-eye view of the Mozilla framework
is article assumes you have access to Mozilla sources and are familiar with the directory structure of the source tree. The code samples in the article are based on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051104 SeaMonkey/1.1a from a new source tree checked out 11/04/05. The build ID is 2005110409. TheHelp Viewer files referenced in the article are located in /seamonkey/
extensions/help/ This article also assumes you are familiar with the JavaScript and C++ programming languages, object-oriented programming (OOP) terminology and design concepts, the Microsoft(R) Component Object Model (COM), and the CORBA OMG Interface Definition Language (IDL). Organization This article first covers some conceptual groundwork, then walks through a user scenario to illustrate how key Moz...
...m UI controls implemented as XML User Interface Language (XUL) packages. A XUL package consists of a XUL description of the UI widget Cascading Style Sheets customizing appearance JavaScript services implementing the UI behavior A package (also known as chrome) is really just a bundling of a set of UI widgets and associated services implementing a particular application feature. Chrome and
Extensions are examples of packages. Content (DOM) The Mozilla Document Object Model (DOM) specifies a logical tree structure for storing UI and document content, and provides an API (Application Programming Interface) for accessing and manipulating the content. An application such as the browser may have one or more open documents accessible via DOM APIs. When an HTML, XML, SVG or other type of document ...
Debugging JavaScript
this ddumpObject(). Log.jsm (formerly log4moz) This is a partial implementation of the Log4* interfaces (for example, see log4j or log4net). Components.utils.import("resource://gre/modules/Log.jsm"); "debugger" keyword You can halt Venkman or Chromebug at a line using the keyword debugger. In debug builds this also dumps a stack trace to the console, even when the debugger is not running. ...
... ...
Configuring Build Options
ac_add_options --enable-debug-js-modules Enable only JavaScript assertions. This is useful when working locally on JavaScript-powered components like the DevTools. This will help catch any errors introduced into the JS code, with less of a performance impact compared to the --enable-debug option. You can make an optimized build with debugging symbols. See Building Firefox with Debug Symbols.
Extensions ac_add_options --enable-
extensions=default|all|ext1,ext2,-skipext3 There are many optional pieces of code that live in
extensions/. Many of these
extensions are now considered an integral part of the browsing experience. There is a default list of
extensions for the suite, and each app-specific mozconfig specifies a different default set. Some
extensions are not compatible with all apps, for ...
...ns are now considered an integral part of the browsing experience. There is a default list of
extensions for the suite, and each app-specific mozconfig specifies a different default set. Some
extensions are not compatible with all apps, for example: cookie is not compatible with thunderbird typeaheadfind is not compatible with any toolkit app (Firefox, Thunderbird) Unless you know which
extensions are compatible with which apps, do not use the --enable-
extensions option; the build system will automatically select the proper default set of
extensions. Tests ac_add_options --disable-tests By default, many auxiliary test applications are built, which can help debug and patch the mozilla source. Disabling these tests can speed build time and reduce disk space considerably. Developers s...
Limitations of chrome scripts
of things that will break an old add-on in multiprocess Firefox. The fix is generally some variant of "do that in a frame script loaded into the content process". This is one of a pair of articles: the other one lists limitations of frame scripts. Compatibility shims For many of the patterns described here we've implemented compatibility shims so the patterns still work. ...
...ill 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 watching the browser console as you use the add-on. The rest of this page documen...
Using the Browser API
it is available to desktop chrome code and used in places like the Firefox devtools. It consists of two major parts: Custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content. This means that window.top, window.parent, window.frameElement, etc. should not reflect the frame hierarchy. API
extensions: the API includes several new methods and events to manipulate and listen for changes to the embedded content's state, interited by the HTMLIFrameElement interface. Note: An iframe enhanced by the Browser API is commonly referred to as a "browser iframe". We'll be using this term throughout the current article, and other parts of the documentation. Demo To demonstrate basic usage of this AP...
...hild process -- separate to the page embedding this frame -- by including the remote attribute. <iframe src="http://hostname.tld" mozbrowser remote> Warning: This last attribute is necessary for security reasons if you plan to load content from an untrusted/unknown origin. If you don't use it, you run the risk of your application being compromised by a malicious web site. It is implied for Web
Extensions, which always run in a separate content process from web content. Aside from the iframe, there are some basic controls: <button> elements, a simple <form> to implement the browser controls, and a search bar. The search bar also contains buttons, as well as a form to type search requests into. You can see the full HTML listing here. The JavaScript implementation To wire up the functionality re...
How Mozilla determines MIME Types
n will be used, otherwise application/octet-stream. ExternalHelperAppService (located at uriloader/exthandler/nsExternalHelperAppService.cpp) The file->MIME type mapping works like this: On BeOS, the operating system is asked for the type of the file (not quite yet, bug 217723) On MacOS, the type and creator code will be used to lookup the type of the file from the OS a hardcoded list of
extensions is checked (containing currently 13 entries, nsExternalHelperAppService.cpp line 463 (This is done for speed - it is faster to find data in the hardcoded list than asking the OS or looking in preferences) If the extension is not listed there, it becomes interesting. Firstly, the Operating System is asked for a MIME type. (On Unix, this means checking mime.types.) If that fails, a user-supplied ...
...it/Preferences/Helper Applications) If that failed, a list of "extra" MIME types is searched for an extension match. See line 507 for the complete list. If that also failed, the list of loaded plugins is checked for a plugin that can handle this extension, and is asked for the MIME type If no plugin is registered, the ext-to-type-mapping XPCOM category is searched for the extension. This allows
extensions to register additional mappings. The key of the category entry is the extension without leading dot, the value is the MIME type. The extension must be lowercase. If no ext-to-type-mapping category is found, the ExternalHelperAppService returns application/x-extension-EXT, where EXT is the extension of the file. Helper Applications A somewhat related issue are the helper applications. When loa...
AddonManager
eTypeListener(in TypeListener listener) nsIURI getURIForResourceInFile(in nsIFile aFile, in string aPath) Properties Overview Attribute Type Description addonTypes dictionary A dictionary that maps type ID to AddonType. autoUpdateDefault boolean Whether add-ons should auto-update by default (overrideable per add-on). Corresponds to the
extensions.autoUpdateDefault preference. Callbacks InstallCallback() A callback that is passed a single AddonInstall void InstallCallback( in AddonInstall install ) Parameters install The AddonInstall passed back from the asynchronous request InstallListCallback() A callback that is passed an array of AddonInstalls void InstallListCallback( in AddonInstall installs[] ) Parameters ...
...(Installed and owned by Firefox). SCOPE_PROFILE 1 This add-on is installed in the current profile directory. SCOPE_SYSTEM 8 This add-on is installed somewhere global to the system (installed for all users of the computer). SCOPE_USER 2 This add-on is installed somewhere specific to the current user (all profiles of the logged-in user). Note: The
extensions.enabledScopes preference lets you configure which of these scopes are enabled; however, you can't turn off the profile scope. Starting in Firefox 8, you can also set the value of the preference
extensions.autoDisabledScopes to prevent Firefox from automatically installing add-ons from the specified scopes. AddonType viewTypes Constant Description VIEW_TYPE_LIST The type ...
Interfacing with the Add-on Repository
preference for the URL to query to get recommended add-ons is not included by default; see bug 628785. ...
... Starting a 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...
Using JavaScript code modules
f the XUL application gre - Alias to the location of the XUL runtime The <relative-path> can be multiple levels deep and is always relative to the location defined by the <alias>. The common relative path is "modules" and is used by XUL Runner and Firefox. Code modules are simple JavaScript files with a .js or .jsm extension. ...
...e multiple levels deep and is always relative to the location defined by the <alias>. The common relative path is "modules" and is used by XUL Runner and Firefox. Code modules are simple JavaScript files with a .js or .jsm extension. <alias> must be unique to your add-on, as the application and other
extensions share the same namespace for all aliases. ...
Index
is a breeze. 8 Localization and Plurals Internationalization, Localization You're likely here because you're localizing a .properties file and it had a link to this page. This page is to help explain how to localize these strings so that the correct plural form is shown to the user. For example, "1 page" vs "2 pages". 9 Localization content best practices Apps,
Extensions, Internationalization, Localization, Mozilla, l10n, l12y This document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes. 10 Localization notes Guide, Internationalization, Localization, Mozilla Localizers usually work on the localizable files without the context of the source files ...
...ranslation tools support the XLIFF standard, making localizing the XLIFF files for Firefox for iOS easy to do using translation tools. Editing the raw XLIFF file is also rather easy, especially if you're already familiar with XML. This tutorial will walk you through the steps you need to take to translation strings within an XLIFF file. 21 Localizing extension descriptions Add-ons,
Extensions, Guide, Internationalization, Localization This article provides details on how to go about localizing the descriptions of Mozilla add-ons, as well as for other metadata about your add-on. 22 Localizing extension metadata on addons.mozilla.org Add-ons,
Extensions, Internationalization, Localization AMO supports localized metadata for each extension. This data describes ...
Localization and Plurals
You're likely here because you're localizing a .properties file and it had a link to this page. This page is to help explain how to localize these strings so that the correct plural form is shown to the user. For example, "1 page" vs "2 pages". If you're here to make your code (e.g.,
extensions) localizable for plural forms, you can jump straight to Developing with PluralForm. You may also need to localize the initial strings for your code, so it would be good to read through at least the Usage section as well. Usage Here are a couple terms used in this page to help keep things clear: plural rule: For a given language, there is a grammatical rule on how to change words, depending on the number qualifying the word. Different languages can have different rules. plural form: For a partic...
...minimize the sample output to at most 3 of each form Developing with PluralForm The functionality for getting the correct plural forms is provided by a JavaScript Module, PluralForm.jsm. This module provides a couple methods for localizing to the browser's current locale as well as getting methods to localize to a desired plural rule. The latter ability of specifying a plural rule is useful for
extensions because the extension doesn't necessarily have to be localized to the browser's locale. Loading PluralForm.jsm Loading the PluralForm module from JavaScript is simple with Components.utils.import. Just put the following line somewhere that will be evaluated before you want to use PluralForm. At the top of your JavaScript file is fine. Components.utils.import("resource://gre/modules/PluralForm.
Localizing with Mozilla Translator
f ''root'' directories instead of just one, and maybe someday it will do, but it will probably won't happen before SeaMonkey 1.1.x dies (and SeaMonkey 2.0 finally conquers the web, if I may add). ;-) Enough chatting, what's next? Anyway, we need to work around the full-fledged repository problem. These are your options: Create one product for each ''root'' directories. This means browser,
extensions/reporter, dom, netwer, security, and toolkit. Besides that, you will need to create one tiny product for other-licenses/branding/firefox. For each one of the above, the ''root'' directory will be ''.../locales/en-US''. FrenchMozilla has just [http://groups.google.es/group/mozill...eaf9f1322fa2fb announced] they are providing an en-US only Mercurial repository comprising both mozilla-central and ...
...saries from the old product, selecting the ''link'' origin (see the previous section) and importing them into the ''link'' target. Defining symbolic links for browser This is an example just for browser, without shared components, but it should suffice to get the idea. ; Assuming we are in a directory containing mozilla-central/ $ mkdir locale-only $ cd locale-only $ mkdir -p browser
extensions/reporter other-licenses/branding/firefox/ $ cd browser; ln -s ../../mozilla-central/browser/locales/; cd .. $ cd
extensions/reporter; ln -s ../../../mozilla-central/
extensions/reporter/locales/; cd ../.. $ cd other-licenses/branding/firefox/; ln -s ../../../../mozilla-central/other-licenses/branding/firefox/locales/; cd ../../.. ...
Extras
1)"/> <g transform="translate(150,125)"> <g> <animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="360" dur="6s" repeatCount="indefinite"/> <g transform="translate(-50,-35)"> <rect width="100" height="70" fill="url(#grad2)"/> <switch> <foreignObject width="100" height="70" required
Extensions="http://www.w3.org/1998/Math/MathML"> <math display="block"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd><mi>cos</mi><mi>?</mi></mtd> <mtd><mo>-</mo><mi>sin</mi><mi>?</mi></mtd> </mtr> <mtr> <mtd><mi>sin</mi><mi>?</mi></mtd> <mtd><mi>cos</mi><mi>?</mi></mtd> </mtr> </mtable> <mo>)</mo> </mrow> </math> </foreignObject> <text>rotation matrix</text> </switch> </g></g></g> <g> <animateMotion path="M 32,69 ...
..." begin="0s" dur="20s" repeatCount="indefinite"/> <animateTransform attributeName="transform" attributeType="XML" type="scale" values="1;2;.5;1" keyTimes="0;.25;.75;1" dur="20s" repeatCount="indefinite"/> <circle fill="url(#grad3)" r="30"/> <g transform="translate(-30,-30)"> <switch> <foreignObject width="60" height="60" required
Extensions="http://www.w3.org/1998/Math/MathML"> <math display="block"> <mrow> <munderover> <mo>?</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mo>+</mo> <mi>?</mi> </mrow> </munderover> <mfrac> <msup> <mi>?</mi> <mi>n</mi> </msup> <mrow> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> </math> </foreignObject> <text>exp(?)</text> </switch> </g> </g> </svg> </div> Inline JavaScript HTML...
about:memory
for browser subsystems such as the startup cache and XPConnect. Some add-on memory usage is identified, as the following example shows. ...
... Some add-ons are identified by a name, such as Tree Style Tab. Others are identified only by a hexadecimal identifier. You can look in about:support to see which add-on a ...
Performance
cles linked to from here will help you improve performance, whether you're developing core Mozilla code or an add-on. Documentation Reporting a Performance Problem A user friendly guide to reporting a performance problem. A development environment is not required. Benchmarking Tips on generating valid performance metrics. Performance best practices in
extensions A performance "best practices" guide for extension developers. Measuring Add-on Startup Performance A guide for add-on developers on how to set up a performance testing environment. XUL School: Add-on Performance Tips for add-on developers to help them avoid impairing application performance. GPU performance Tips for profiling and improving performance when usin...
...ux-only) turbostat is a command-line utility that gathers and displays various power-related measurements, with a focus on per-CPU measurements such as frequencies and C-states. powertop (Linux-only) powertop is an interactive command-line utility that gathers and displays various power-related measurements. Related Topics JavaScript, XPCOM, Developing Mozilla,
Extensions, Addons ...
An overview of NSS Internals
en parties are transported using a container; the container is called a certificate, following standard X.509 version 3. A certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate. The trust assigned by the third party might be restricted to certain uses, which are listed in certificate
extensions that are contained in the certificate. Many (if not most) of the operations performed by NSS involve the use of X.509 certificates (often abbreviated as "cert", unfortunately making it easy to confuse with the term "computer emergency response team"). When checking whether a certificate is trusted or not, it's necessary to find a relevant trust anchor (root certificate) that represents the ...
... in a (chain of) issuer certificate(s), we're still not done with verifying the certificate A. In a PKI it's suggested/required to perform additional checks. For example: Certificates were valid at the time the signature was made, name in certificates matches the expected signer (check subject name, common name, email, based on application), the trust restrictions recorded inside the certificate (
extensions) permit the use (e.g., encryption might be allowed, but not signing), and based on environment/application policy it might be required to perform a revocation check (OCSP or CRL), that asks the issuer(s) of the certificates whether there have been events that made it necessary to revoke the trust (revoke the validity of the cert). Trust anchors contained in the CKBI module are usually self sig...
NSS 3.35 release notes
om a later NSS release. If these experimental functions are made permanent in a later NSS release, no 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-chose...
... an initial ClientHello, an application can control whether NSS sends a HelloRetryRequest, 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_Get
ExtensionSupport - 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 g...
NSS 3.46 release notes
version. See Bug 1573118 for details. TLS extended master secret will be enabled by default, where possible. See Bug 1575411 for details. ...
...or details. TLS extended master secret will be enabled by default, where possible. See Bug 1575411 for details. ...
PKCS11 module installation
Note: The information in this article is specific to Firefox 3.5 and newer. ...
...ption" > "Security Devices" Choose "Load" Enter a name for the security module, such as "My Client Database". NOTE: there is currently a bug in Firefox where international characters may cause problems. Choose "Browse..." to find the location of the PKCS #11 module on your local computer, and choose "OK" when done. Provisioning PKCS #11 modules using the pkcs11 API Starting with Firefox 58,
extensions can use the pkcs11 browser extension API to enumerate PKCS #11 modules and make them accessible to the browser as sources of keys and certificates. ...
Python binding for NSS
lize nss.nss_init_context nss.nss_shutdown_context Release 0.15.0 Release Date 2014-09-09 SCM Tag PYNSS_RELEASE_0_15_0 Source Download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/PYNSS_RELEASE_0_15_0/src/ Change Log The primary enhancements in this version was fixing access to
extensions in a CertificateRequest and giving access to CertificateRequest attributes. There is a bug in NSS which hides the existence of
extensions in a CSR if the
extensions are not contained in the first CSR attribute. This was fixable in python-nss without requiring a patch to NSS. Formerly python-nss did not provide access to the attributes in a CSR only the
extensions, with this release all compone...
... Socket.readlines() Socket.sendall() SSLSocket.next() SSLSocket.readlines() SSLSocket.sendall() AuthKeyID.key_id AuthKeyID.serial_number AuthKeyID.get_general_names() CRLDistributionPoint.issuer CRLDistributionPoint.get_general_names() CRLDistributionPoint.get_reasons() CertDB.find_crl_by_cert() CertDB.find_crl_by_name() Certificate.
extensions CertificateExtension.critical CertificateExtension.name CertificateExtension.oid CertificateExtension.oid_tag CertificateExtension.value GeneralName.type_enum GeneralName.type_name GeneralName.type_string SecItem.der_to_hex() SecItem.get_oid_sequence() SecItem.to_hex() SignedCRL.delete_permanently() AVA.oid AVA.oid_tag AVA...
NSS Tools certutil-tasks
. Sorting by trust will return CA certs first. Allow listing and lookup of keys by index and nickname. Improve coherence of key and certificate nicknames. Remove keys "stranded" without a certificate (except for the imminent (????) encryption key for password files). Support importing keys from a file. Improve hardware token support. ...
... (bugfix) Some certificate
extensions cause certutil to crash. (bugfix) Certificate entries require a serial number; one should be generated automatically if not provided. (bugfix) Null password is given to new key3.db; should prompt user for an initial password. (bugfix) Listing provate keys does not work: requires password authentication. (bugfix) Listing certificate
extensions has typos and does not provide much information. ...
NSS Tools crlutil
update=YYYYMMDDhhmmssZ nextupdate=YYYYMMDDhhmmssZ Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ). For example: 20050204153000Z 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. See "Implemented
extensions" for more information regarding
extensions and theirs parameters. Add certificate ...
...sh is used as a delimiter. Only one cert will be added if there is no delimiter. Change range of certificate entry(s) in CRL range new-range Where: new-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. Implemented
Extensions The
extensions defined for CRL provide methods for associating additional attributes with CRLs of theirs entries. For more information see RFC #3280 Add The Authority Key Identifier extension: The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a CRL. authKeyId critical [key-id | dn cert-serial]...
Index
Parse a string using the JSON syntax described in ECMAScript 5 and return the corresponding value. 425 JS_PopArguments JSAPI_Reference, Obsolete, SpiderMonkey JS_PopArguments frees the stack frame pointer previously allocated by JS_PushArguments and unroots the jsvals which have been associated with it (those returned by JS_PushArguments as well). 426 JS_Prevent
Extensions JSAPI Reference, SpiderMonkey All JavaScript objects recognize the concept of extensibility: whether new properties may be added to the object. In some situations, it may be convenient to prohibit new properties. In JavaScript this may be accomplished using the Object.prevent
Extensions method. The similar JSAPI method is JS_Prevent
Extensions. 427 JS_PropertyStub JSAPI ...
...rMonkey is a fast interpreter that runs an untyped bytecode and operates on values of type JS::Value--type-tagged values that represent the full range of JavaScript values. In addition to the interpreter, SpiderMonkey contains a Just-In-Time (JIT) compiler, a garbage collector, code implementing the basic behavior of JavaScript values, a standard library implementing ECMA 262-5.1 ?15 with various
extensions, and a few public APIs. 528 64-bit Compatibility SpiderMonkey The following types or typedefs are always 64-bit on 64-bit platforms, and 32-bit on 32-bit platforms: 529 Bytecode Descriptions SpiderMonkey This document is automatically generated from Opcodes.h by make_opcode_doc.py. 530 Bytecodes SpiderMonkey SpiderMonkey bytecodes are...
JS_IsExtensible
examine. extensible bool * Out parameter. ...
...nsible bool * Out parameter. ...
SpiderMonkey 38
tyIterator (bug 1081660) JS_NextProperty (bug 1081660) JS_ResolveStub (bug 1103152) JS_SetFinalizeCallback (bug 996785) JS_SetFunctionCallback (bug 1103269) jschar (bug 1063962) API changes jschar, a typedef for the standard C++ type char16_t, has been removed. JSAPI functions that used jschar now use char16_t directly. Embedder code should use char16_t, too. ...
... JavaScript shell changes Detail added/removed methods here... ...
TPS Tests
ng tool for Sync (which is a misnomer, since it doesn't do any profiling), and it should not be confused with the similarly named tests in Talos. TPS consists of a Firefox extension of the same name, along with a python test runner, both of which live inside mozilla-central. The python test runner will read a test file (in JavaScript format), setup one or more Firefox profiles with the necessary
extensions and preferences, then launch Firefox and pass the test file to the extension. The extension will read the test file and perform a series of actions specified therein, such as populating a set of bookmarks, syncing to the Sync server, making bookmark modifications, etc. A test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file ma...
...uch more verbose logging in all engines. Check the tps.log file written out after TPS runs. It will include log output written by the python driver, which includes information about where the temporary profiles it uses are stored. run test_sync.js. This test generally validates your tps setup and does a light test of a few engines. Comment out the goQuitApplication() calls in services/sync/tps/
extensions/tps/modules/tps.jsm (remember to undo this later!). You will have to manually quit the browser at each phase, but you will be able to inspect the browser state manually. Using this technique in conjunction with aboutsync is helpful. (Note that the python testrunner will generally still kill firefox after a TPS test runs for 5 or so minutes, so it's often helpful to kill the python testru...
Web Replay
plemented) Recordings can be replayed on a different machine from the one which recorded them. This requires using the same build of firefox and a reasonably similar version of the operating system; otherwise the tab will probably crash. This feature has had little testing or polishing and there is not yet a good definition of 'reasonably similar'. Time Travel Features This section describes
extensions to the developer tools that use time travel to help debug a recording/replaying tab. Step Back When paused, the reverse step button in the Debugger developer tool will step to the previous line executed and allow inspecting program state there. It is the opposite of the normal forward step button. Rewind to Breakpoint When paused, if there are any breakpoints set then the rewind button wil...
...g both recording and replaying children is that by switching between different children the middleman can effectively rewind a live recording, then play forward and allow the user to resume interacting with the tab after they have finished inspecting state in the past. The advantage of using two replaying processes is to provide a smoother experience when rewinding. Recording/replaying process
extensions During initialization the child process spawns a thread that does not participate in the recording -- any IPC or other system calls it performs are live, even when replaying. This thread sends and receives messages from the middleman. Messages describe actions the child process is able to do independently from the recording; currently this includes sending graphics updates, taking and restorin...
Animated PNG graphics
Value Constant Description 0 APNG_BLEND_OP_SOURCE All color components of the frame, including alpha, overwrite the current contents of the frame's output buffer region. 1 APNG_BLEND_OP_OVER The frame should be composited onto the output buffer based on its alpha, using a simple OVER operation as described in the Alpha Channel Processing section of the
Extensions to the PNG Specification, Version 1.2.0. Note that the second variation of the sample code is applicable. Note that for the first frame the two blend modes are functionally equivalent due to the clearing of the output buffer at the beginning of each play. The 'fcTL' chunk corresponding to the default image, if it exists, has these restrictions: The x_offset and y_offset fields must be ...
...ple images are available from the APNG implementation page at http://littlesvr.ca/apng/ An encoder (open source) is available in versions of the Gecko engine starting with version 1.9 alpha 4. An application (open source) using the Mozilla encoder to assemble APNGs available here: http://littlesvr.ca/apng/apngedit.html See also Portable Network Graphics (PNG) Specification (Second Edition)
Extensions to the PNG Specification, Version 1.2.0 Graphics Interchange Format 89a ...
FUEL
FUEL is new in Firefox 3. FUEL is about making it easier for extension developers to be productive, by minimizing some of the XPCOM formality and adding some "modern" JavaScript ideas. We want to start with areas that will provide the most benefit. FUEL has a fuelIApplication interface that implements all the functions of extIApplication. ...
... JavaScript ideas. We want to start with areas that will provide the most benefit. FUEL has a fuelIApplication interface that implements all the functions of extIApplication. The library has also been implemented in Thunderbird ("STEEL") and in SeaMonkey ("SMILE"). Objects extIApplication Objects extIApplication extIConsole extIEventItem extIEventListener extIEvents extIExtension extI
Extensions extIPreference extIPreferenceBranch extISessionStorage fuelIApplication Objects fuelIAnnotations fuelIApplication fuelIBookmark fuelIBookmarkFolder fuelIBookmarkRoots fuelIBrowserTab fuelIWindow XPCOM Although the FUEL 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: v...
SMILE
SMILE is about making it easier for extension developers to be productive, by minimizing some of the XPCOM formality and adding some "modern" JavaScript ideas. We want to start with areas that will provide the most benefit. SMILE has a smileIApplication interface that implements all the functions of extIApplication. The library has also been implemented in Firefox ("FUEL") and in Thunderbird ("STEEL"). ...
...ding some "modern" JavaScript ideas. We want to start with areas that will provide the most benefit. SMILE has a smileIApplication interface that implements all the functions of extIApplication. The library has also been implemented in Firefox ("FUEL") and in Thunderbird ("STEEL"). Objects extIApplication Objects extIConsole extIEventItem extIEventListener extIEvents extIExtension extI
Extensions extIPreference extIPreferenceBranch extISessionStorage smileIApplication Objects smileIBookmarkRoots smileIWindow smileIBrowserTab smileIApplication XPCOM Although the extIApplication 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/s...
extIExtension
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: "uninstall" Methods FIXME: See also See extApplication.js line:395 for the implementation of firstRun. A preference "install-event-fired" u...
...nid>." 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. ...
extIPreferenceBranch
All preference "aName" parameters used in this interface are relative to the root branch. ...
...e. void setValue(in AString aName, in nsIVariant aValue) Parameters aName The name of a preference aValue The value of a preference Return value reset() Resets all preferences in a branch back to their default values. Note: This function has not been implemented and will raise an exception. ...
XML Extras
XPointer Available since 1.4alpha in the core Mozilla. Moved to XML Extras during 1.4beta. See also: XML in Mozilla document.load() A few examples dealing with XML from MozillaZine Knowledge Base. QA and Testing There are some online tests for mainly exercising the HTTP GET method via XMLHttpRequest. Other test cases for each of the implemented components listed above exist in
extensions/xmlextras/tests/. More exhaustive test suites need to be created, however. If you'd like to help out with QA, you can do one of the following: Sign up as the QA owner for any of the implemented components. The QA owner will manage the tests associated with their component, act as QA contact for related bugs and help with regression testing. Contribute a test suite or individual tests that use...
...like to help out with QA, you can do one of the following: Sign up as the QA owner for any of the implemented components. The QA owner will manage the tests associated with their component, act as QA contact for related bugs and help with regression testing. Contribute a test suite or individual tests that use the implemented components. File bugs for new test you have, and/or check them into
extensions/xmlextras/tests/. File bugs against the implemented components. Bugs should be filed against the XML component in the Browser product. Documentation Probably the best way to learn how to use these technologies is through examples. There are some in
extensions/xmlextras/tests/. If you follow that link to look at the examples you will need to look at page source for the HTML documents. For XML...
mozISpellCheckingEngine
Implement this interface to add support for a new spell checking engine. Inherits from: nsISupports Last changed in Gecko 1.7 This interface represents a spell checking engine. The built in Hunspell engine has contract ID "@mozilla.org/spellchecker/engine;1".
Extensions can use this interface to check spelling or provide its own spell checker to editors. ...
...
extensions/spellcheck/idl/mozISpellCheckingEngine.idlScriptable This interface represents a spelling checker. Implement this interface to add support for a new spell checking engine. Inherits from: nsISupports Last changed in Gecko 1.7 This interface represents a spell checking engine. The built in Hunspell engine has contract ID "@mozilla.org/spellchecker/engine;1".
Extensions can use this interface to check spelling or provide its own spell checker to editors. Method overview void addDirectory(in nsIFile dir); boolean check(in wstring word); void getDictionaryList([array, size_is(count)] out wstring dictionaries, out PRUint32 count); void removeDirectory(in nsIFile dir); void suggest(in wstring word,[a...
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. ...
... 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. ...
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>. ...
...te: 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>. ...
Building an Account Manager Extension
ad8b-0800200c9a55}"); // ... the description and ... DevmoAccountManagerExtension.prototype.classDescription = "Devmo Account Manager Extension"; // ... textual unique identifier or rendez-vous point in the category manager. ...
...mo Account Manager Extension"; // ... textual unique identifier or rendez-vous point in the category manager. DevmoAccountManagerExtension.prototype.contractID = "@mozilla.org/accountmanager/extension;1?name=example@mozilla.org"; // Add the component to the mailnews-accountmanager-
extensions category DevmoAccountManagerExtension.prototype._xpcom_categories: [{ category: "mailnews-accountmanager-
extensions" }], // Create entry point for the module if (XPCOMUtils.generateNSGetFactory) var NSGetFactory = XPCOMUtils.generateNSGetFactory([DevmoAccountManagerExtension]); else var NSGetModule = XPCOMUtils.generateNSGetModule([DevmoAccountManagerExtension]); Step3: Create the new panel As next Step we create the XUL and the property file for your new panel. We defined in Step 1 "devmo-account" as...
nsIZipReader
ull for checking all entries in the archive. Examples List contents of XPI and read file contents This example uses findEntries, getEntry, getInputStream, open, and close. It also uses nsIScriptableInputStream to read the stream returned by getInputStream. XPI files are ZIP files, just Firefox needs the extension to be XPI. Change "PortableTester@jetpack.xpi" to the name of a XPI file in your
extensions folder. Then you can copy and paste this code in scratchpad to run it. var zr = Cc["@mozilla.org/libjar/zip-reader;1"].createInstance(Ci.nsIZipReader); Cu.import('resource://gre/modules/osfile.jsm'); Cu.import('resource://gre/modules/FileUtils.jsm'); var reusableStreamInstance = Cc['@mozilla.org/scriptableinputstream;1'].createInstance(Ci.nsIScriptableInputStream); ...
...n it. ...
Storage
Getting started This document covers the Storage API and some peculiarities of SQLite. It does not cover SQL or "regular" SQLite. ...
... only. The API is currently "unfrozen", which means it is subject to change at any time; in fact, it has changed somewhat with each release of Firefox since it was introduced, and will likely continue to do so for a while. Note: Storage is not the same as the DOM:Storage feature which can be used by web pages to store persistent data or the Session store API (an XPCOM storage utility for use by
extensions). Getting started This document covers the Storage API and some peculiarities of SQLite. It does not cover SQL or "regular" SQLite. You can find some very useful links in the See also section however. For Storage API help, you can post to mozilla.dev.apps.platform on the news server news.mozilla.org. To report bugs, use Bugzilla. The overall procedure for use is: Get the Storage service - m...
Troubleshooting XPCOM components registration
(and not your own compile of trunk Firefox, etc.). If you are compiling 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.
... ...
XUL Overlays
e UI Reusing particular pieces of the UI XUL files and overlays work together to describe a single master document. Though there 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. The installation of a media plug-in, for example, may add new icons and menu items to the interface: In the navigatorOverlay.xul file or in a separate navigatorSSPOverlay.xul file (where navigator.xul defines the basic UI for the navigator package), these new plug-in elements would b...
..."Super Stream Player"/> </menu> </menupopup> </overlay> The result will be: ... <menu id="file-menu"> <menupopup id="menu_FilePopup"> <menuitem name="New"/> <menuitem name="Open"/> <menuitem name="Save"/> <menuitem name="Close"/> <menuitem name="Super Stream Player"/> </menupopup> </menu> ... If you are developing a Mozilla extension, note that the ID namespace is shared by all the
extensions. So, in order to avoid unpredicted behaviors you will probably benefit from using a unique prefix for the IDs of the XUL elements of your extension. For instance, you can use the name of your extension, or an abbreviation of it. Loading overlays Overlays can be loaded explicitly or dynamically. When you load an overlay explicitly, it means that you intend to make it available every time the base ...
Creating a gloda message query
message bodies. query.attachmentTypes(mimeType1, mimeType2, ...): Constrain to messages with attachments among the given mime types. In theory, providing no arguments should result in finding messages with any attachment, but this is somewhat untested. More constraints can be found in the three js files given further below. From https://developer.mozilla.org/docs/Mozilla/Thunderbird/Thunderbird_
extensions/Demo_Addon, Demo3, it seems that the attributeName given in these files is the constraintname to be used (e.g. query.subjectMatches(searchString) for message subject (compare fundattr.js line 145 ). Create a collection from the query Your listener is notified as messages are added to the collection as the database query completes. You may also see new messages show up if new messages are in...
...obal.search.msg.limit" Although you can deal with the messages as they show up via the listener, the list of messages in the collection is available in collection.items. Each message is a GlodaMessage, whose database-row attributes are implemented/defined in gloda's datamodel.js. However, many attributes are dynamically contributed by built-in logic (fundattr.js and explattr.js) as well as other
extensions. The database-row attributes are: id: The gloda message id. This is a locally unique identifier. folder: The folder the message is found in, as represented by a GlodaFolder instance. conversation: The conversation the message belongs to, as represented by a GlodaConversation instance. Somewhat magic attributes: headerMessageID: The contents of the Message-ID header of the message. You ...
Adding items to the Folder Pane
changed), a "rebuild" occurs. When this happens, the Folder Pane consults the map-generator for the current mode, and that generator returns the necessary data for the Folder Pane's display. This data is returned in the form of an array of folder-tree-items. Listening for Folder Pane rebuilds Every time the Folder Pane rebuilds, it fires a "mapRebuild" event, which is the ideal opportunity for
extensions to step in and modify the display data. The following code snippet listens for that event: let gNumbersExt = { load: function gne_load() { window.removeEventListener("load", gNumbersExt.load, false); let tree = document.getElementById("folderTree"); tree.addEventListener("mapRebuild", gNumbersExt._insert, false); }, _insert: function gne__insert() { // This function is cal...
...ver, the complete example file includes code to display the number selected in Thunderbird's main viewing pane, when such a number is selected in the Folder Pane. A note about the initial rebuild When Thunderbird first starts up, the Folder Pane does an initial rebuild to get the first data it should display. Unfortunately, this rebuild will occur before an extension's "load" event fires. Thus,
extensions may need to do manual insertions when this load event fires, if they want to add items to the initial display. add_code.js also includes code to accomplish this result. ...
Theme Packaging
50c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} Pale Moon {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4} Official References for Toolkit API Official References. Do not add to this list without contacting Benjamin Smedberg. Note that this page is included from the pages listed below. ...
...r Toolkit API Official References. Do not add to this list without contacting Benjamin Smedberg. Note that this page is included from the pages listed below. ...
Working with windows in chrome code
It contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows. Opening windows From a <script> in a window or an overlay To open a new window, we usually use a window.open or window.openDialog DOM call, like this: var win = window.open("chrome://myextension/content/about.xul", "aboutMyExtension", "chrome,centerscreen"); The first parameter to window.open is the URI of the XUL file that describes the window and its contents. ...
...service and not cleaning up after yourself can cause prefs.js to grow large and slow down application startup. ...
XPI
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. ...
...nstall, 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. 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 ...
ctypes.open
rome-registry;1'].getService(Components.interfaces.nsIChromeRegistry); var chromeURI_myLib = Services.io.newURI('chrome://youraddon/content/mySubFolder/myCFunctionsForUnix.so', 'UTF-8', null); var localFile_myLib = cr.convertChromeURL(chromeURI_myLib); var jarPath_myLib = localFile_myLib.spec; // "jar:file:///C:/Users/Vayeate/AppData/Roaming/Mozilla/Firefox/Profiles/aecgxse.Unnamed%20Profile%201/
extensions/youraddon@jetpack.xpi!/mySubFolder/myCFunctionsForUnix.so" var filePath_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 ...
...don 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) + '!/'; // 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 + 'mySubF...
Debugger.Object - Firefox Developer Tools
r to recognize when two Debugger.Object instances refer to the same debuggee object, and place its own properties on a Debugger.Object instance to store metadata about particular debuggee objects. JavaScript code in different compartments can have different views of the same object. For example, in Firefox, code in privileged compartments sees content DOM element objects without redefinitions or
extensions made to that object's properties by content code. (In Firefox terminology, privileged code sees the element through an "xray wrapper".) To ensure that debugger code sees each object just as the debuggee would, each Debugger.Object instance presents its referent as it would be seen from a particular compartment. This "viewing compartment" is chosen to match the way the debugger came across the ref...
... be sealed is implicit and in a different compartment from the caller.) freeze() Prevent properties from being added to or deleted from the referent, and mark each property as non-writable. Return this Debugger.Object instance. (This function behaves like the standard Object.freeze function, except that the object to be sealed is implicit and in a different compartment from the caller.) prevent
Extensions() Prevent properties from being added to the referent. (This function behaves like the standard Object.prevent
Extensions function, except that the object to operate on is implicit and in a different compartment from the caller.) isSealed() Return true if the referent is sealed--that is, if it is not extensible, and all its properties have been marked as non-configurable. (This function behaves...
Deprecated tools - Firefox Developer Tools
panels to try out new ideas. Not all of these have had wide adoption, and due to the cost of maintenance, seldom used panels are eventually removed. We have created this list of deprecated or removed panels. This page documents the deprecated panels and the bugs that track their removal. Although these panels have been removed, you still have access to the old code, and there are alternative web
extensions that you can try to get similar functionality. When we deprecate a panel, we begin by getting feedback from the community to determine the impact of removing that panel. Once we have decided to remove the panel, we will provide a warning message, and finally, we will remove the panel from the codebase. You may see a warning message, as in the following image, when trying to activate a deprecate...
... are connected in the way you expect. It was possible to edit the AudioParam properties for each node in the graph. Some non-AudioParam properties, like an OscillatorNode's type property, were displayed and editable as well. It was deprecated due to lack of use. More details about the Web Audio Editor Alternatives Alternatives include AudioN and https://github.com/spite/WebAudioExtension web
extensions. Shader editor Bugzilla issue: bug 1342237 Removed as of Firefox 67 Description The Shader Editor allowed users to examine and edit the source of the WebGL vertex and fragment shaders. It was deprecated due to low usage and maintenance costs. More details about the Shader Editor Alternatives An alternative to this panel is this extension: https://github.com/spite/ShaderEditorExtension, ...
Index - Firefox Developer Tools
veloper Tools lets you see what a web page would look like to users with various forms of color vision deficiency (better known as "color blindness"), as well as contrast sensitivity loss. 5 Add-ons Web Development, Web Development:Tools Developer tools that are not built into Firefox, but ship as separate add-ons. 6 DOM Inspector DOM, DOM:Tools, DOM_Inspector,
Extensions,
Extensions:Tools, Themes, Themes:Tools, Tools, Web Development, Web Development:Tools, XUL, XUL:Tools The DOM Inspector (also known as DOMi) is a developer tool used to inspect, browse, and edit the Document Object Model of documents - usually web pages or XUL windows. The DOM hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and a...
..., l10n:priority When you select an origin inside the Cookies storage type from the storage tree, all the cookies present for that origin will be listed in a table. The cookies table has the following columns: 108 Extension Storage Dev Tools, Extension Storage, Firefox, Guide, Storage, Storage Inspector, Tools, l10n:priority This storage type is only shown when debugging
extensions. When selecting an extension ID in the storage tree of the Storage Inspector, a table lists the details of all the extension storage present for the extension. This table contains the following columns: 109 IndexedDB Dev Tools, Firefox, Guide, IndexedDB, Storage, Storage Inspector, Tools, l10n:priority When you select an origin inside the Indexed DB storage type in the storag...
about:debugging (before Firefox 68) - Firefox Developer Tools
for add-ons and one for workers. Whether or not system add-ons appear in the list on this page depends on the setting of the devtools.aboutdebugging.showSystemAddons preference. If you need to see system add-ons, navigate to about:config and make sure that this value is set to true. Add-ons The Add-ons section in about:debugging only supports restartless add-ons, including basic bootstrapped
extensions, Add-on SDK add-ons, and Web
Extensions. 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 t...
...oxes" and "Enable remote debugging" in the Developer Tools Settings. Loading a temporary 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. The add-on will stay installed until you restart Firefox. The big advantages of this method, compared with installing an add-on from an XPI, are: you don't have to rebuild an XPI and reinstall when you change the add-on's code you can load an add-on without signing it and without needing to disable signing. Updating a temporary add-...
ANGLE_instanced_arrays - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default and the constants and methods are available without the "ANGLE" suffix. ...
... Availability: This extension is only available to WebGL1 contexts. ...
Document - Web APIs
Element objects that are children of this ParentNode, omitting all of its non-element nodes. ParentNode.firstElementChild Read only Returns the first node which is both a child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElementChild Read only Returns the last node which is both a child of this ParentNode and is an Element, or null if there is none.
Extensions for HTMLDocument The Document interface for HTML documents inherits from the HTMLDocument interface or, since HTML5, is extended for such documents. Document.cookie Returns a semicolon-separated list of the cookies for that document or sets a single cookie. Document.defaultViewRead only Returns a reference to the window object. Document.designMode Gets/sets the ability to edit the whole...
...ilable via the ontransitioncancel property. transitionend Fired when a CSS transition has completed. Also available via the ontransitionend property. transitionrun Fired when a CSS transition is first created. Also available via the ontransitionrun property. transitionstart Fired when a CSS transition has actually started. Also available via the ontransitionstart property. Non-standard
extensions Firefox notes Mozilla defines a set of non-standard properties made only for XUL content: Document.currentScript Returns the <script> element that is currently executing. Document.documentURIObject (Mozilla add-ons only!) Returns the nsIURI object representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect priv...
EXT_blend_minmax - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. The constants in WebGL2 are gl.MIN and gl.MAX. ...
... Availability: This extension is only available to WebGL1 contexts. ...
EXT_disjoint_timer_query - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension should be available in WebGL1 contexts only. EXT_disjoint_timer_query_webgl2 is available in WebGL 2 contexts . In WebGL 2, the getQueryObject was renamed to getQueryParameter. ...
... Availability: This extension should be available in WebGL1 contexts only. EXT_disjoint_timer_query_webgl2 is available in WebGL 2 contexts . ...
EXT_float_blend - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. However, to use it, you need to enable the use of 32-bit floating-point draw buffers by enabling the extension WEBGL_color_buffer_float (for WebGL1) or EXT_color_buffer_float (for WebGL2). Doing so automatically enables EXT_float_blend as well. ...
...ror. Usage notes On devices that support the EXT_float_blend extension, it is automatically, implicitly, enabled when any one or more of EXT_color_buffer_float, OES_texture_float, or WEBGL_color_buffer_float are enabled. This ensures that content written before EXT_float_blend was exposed by WebGL will function as expected. ...
EXT_texture_compression_bptc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: Support depends on the system's graphics driver. There is no support on Windows. This extension is available to both, WebGL1 and WebGL2 contexts. ...
... Availability: Support depends on the system's graphics driver. There is no support on Windows. ...
EXT_texture_compression_rgtc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: Support depends on the system's graphics driver. There is no support on Windows. ...
... The EXT_texture_compression_rgtc extension is part of the WebGL API and exposes 4 RGTC compressed texture formats. RGTC is a block-based texture compression format suited for unsigned and signed red and red-green textures (Red-Green Texture Compression). WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: Support depends on the system's graphics driver. There is no support on Windows. This extension is available to both, WebGL1 and WebGL2 contexts. Constants The compressed texture formats are exposed by 4 constants and can be used in two functions: compressedTexImage2D() and compressedTexSubImage2D(). ext.COMPRESSED_RED_RGTC1_EXT Each 4x4 block of texels consists of 64 b...
EXT_texture_filter_anisotropic - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
...c extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). AF improves the quality of mipmapped texture access when viewing a textured primitive at an oblique angle. Using just mipmapping, these lookups have a tendency to average to grey. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Constants ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT This is the pname argument to the gl.getParameter() call, and it returns the maximum available anisotropy. ext.TEXTURE_MAX_ANISOTROPY_EXT This is the pname argument to the gl.getTexParameter() and gl.texParameterf() / gl.texParameteri() calls...
Gamepad - Web APIs
ontroller. Gamepad.index Read only An integer that is auto-incremented to be unique for each device currently connected to the system. Gamepad.mapping Read only A string indicating whether the browser has remapped the controls on the device to a known layout. Gamepad.timestamp Read only A DOMHighResTimeStamp representing the last time the data for this gamepad was updated. Experimental
extensions to Gamepad The following interfaces are defined in the Gamepad
Extensions specification, and provide access to experimental features like haptic feedback and WebVR controller pose information. Gamepad.hand Read only An enum defining what hand the controller is being held in, or is most likely to be held in. Gamepad.hapticActuators Read only An array containing GamepadHapticActuator objec...
...ow.addEventListener("gamepadconnected", function(e) { console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); Specifications Specification Status Comment GamepadThe definition of 'Gamepad' in that specification. Working Draft Initial definition Gamepad
ExtensionsThe definition of 'Gamepad
extensions' in that specification. Editor's Draft Defines the Experimental
extensions to Gamepad ...
Gamepad API - Web APIs
ted, and to access other information about the gamepads themselves, and what buttons and other controls are currently being pressed. Interfaces Gamepad Represents a gamepad/controller connected to the computer. GamepadButton Represents a button on one of the connected controllers. GamepadEvent The event object representing events fired that are related to gamepads. Experimental Gamepad
extensions GamepadHapticActuator Represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. See also the
extensions to the Gamepad interface, for features that allow you to access the above information.
Extensions to other interfaces Navigator Navigator.getGamepads() An extension to the Navigator object that returns an ...
...t will run when a gamepad is connected (when the gamepadconnected event fires). Window.ongamepaddisconnected Represents an event handler that will run when a gamepad is disconnected (when the gamepaddisconnected event fires). Tutorials and guides Using the Gamepad API Implementing controls using the Gamepad API Specifications Specification Status Comment Gamepad
Extensions Editor's Draft Defines the Experimental Gamepad
extensions. GamepadThe definition of 'The Gamepad API specification' in that specification. Working Draft Initial definition ...
HTML Drag and Drop API - Web APIs
HTML Drag and Drop interfaces enable applications to use drag-and-drop features in browsers. The user may select draggable elements with a mouse, drag those elements to a droppable element, and drop them by releasing the mouse button. A translucent representation of the draggable elements follows the pointer during the drag operation. For web sites,
extensions, and XUL applications, you can customize which elements can become draggable, the type of feedback the draggable elements produce, and the droppable elements. This overview of HTML Drag and Drop includes a description of the interfaces, basic steps to add drag-and-drop support to an application, and an interoperability summary of the interfaces. Drag Events HTML drag-and-drop uses the DOM event model and drag events inherited from mouse e...
...g event's state, such as the type of drag being done (like copy or move), the drag's data (one or more items), and the MIME type of each drag item. DataTransfer objects also have methods to add or remove items to the drag's data. The DragEvent and DataTransfer interfaces should be the only ones needed to add HTML Drag and Drop capabilities to an application. (Firefox supports some Gecko-specific
extensions to the DataTransfer object, but those
extensions will only work on Firefox.) Each DataTransfer object contains an items property, which is a list of DataTransferItem objects. A DataTransferItem object represents a single drag item, each with a kind property (either string or file) and a type property for the data item's MIME type. The DataTransferItem object also has methods to get the drag item...
MediaKeyMessageEvent - Web APIs
The MediaKeyMessageEvent interface of the EncryptedMedia
Extensions API contains the content and related data when the content decryption module generates a message for the session. <div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveAspectRatio="xMinYMin meet"><a xlink:href="/docs/Web/API/Event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Event</text></...
...essage from the content decryption module. Messages vary by key system. MediaKeyMessageEvent.messageType Read only Indicates the type of message. May be one of license-request, license-renewal, license-release, or individualization-request. Methods Inherits methods from its parent, Event. Examples // TBD Specifications Specification Status Comment Encrypted Media
ExtensionsThe definition of 'MediaKeyMessageEvent' in that specification. Recommendation Initial definition. ...
MediaKeySession - Web APIs
Properties MediaKeySession.closed Read only Returns a Promise signaling when a MediaKeySession closes. This promise can only be fulfilled and is never rejected. Closing a session means that licenses and keys associated with it are no longer valid for decrypting media data. MediaKeySession.expiration Read only The time after which the keys in the current session can no longer be used to decrypt media data, or NaN if no such time exists. This value is determined by the CDM and measured in milliseconds since January 1, 1970, UTC. ...
...ise that resolves to a boolean value after loading data for a specified session object. MediaKeySession.remove() Returns a Promise after removing any session data associated with the current object. MediaKeySession.update() Returns a Promise after loading messages and licenses to the CDM. Examples // TBD Specifications Specification Status Comment Encrypted Media
ExtensionsThe definition of 'MediaKeySession' in that specification. Recommendation Initial definition. ...
MediaKeyStatusMap - Web APIs
Properties MediaKeyStatusMap.size Read only Returns the number of key/value pars in the status map. Methods MediaKeyStatusMap.entries() Read only Returns a new Iterator object containing an array of [key, value] for each element in the status map, in insertion order. MediaKeyStatusMap.forEach(callback[, argument]) Read only Calls callback once for each key-value pair in the status map, in insertion order. If argument is present it will be passed to the callback. MediaKeyStatusMap.get() Read only Returns the value associated with the given key, or undefined if there is none. ...
... Recommendation Initial definition. ...
MediaSource - Web APIs
A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent. ...
... Recommendation Initial definition. ...
OES_fbo_render_mipmap - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL 1. In WebGL2, the functionality of this extension is available in the WebGL 2 context by default. ...
... The OES_fbo_render_mipmap extension is part of the WebGL API and makes it possible to attach any level of a texture to a framebuffer object. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL 1. In WebGL2, the functionality of this extension is available in the WebGL 2 context by default. Examples See the sample code in the Khronos specification. Specifications Specification Status OES_fbo_render_mipmap Draft ...
OES_standard_derivatives - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. In WebGL 2, the constant is available as gl.FRAGMENT_SHADER_DERIVATIVE_HINT and it requires GLSL #version 300 es. Constants This extension exposes one new constant, which can be used in the hint() and getParameter() methods. ...
...getParameter() methods. ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES A Glenum indicating the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth. ...
OES_vertex_array_object - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. ...
... The OES_vertex_array_object extension is part of the WebGL API and provides vertex array objects (VAOs) which encapsulate vertex array states. These objects keep pointers to vertex data and provide names for different sets of vertex data. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default and the constants and methods are available without the "OES" suffix. Constants This extension exposes one new constant, which can be used in the gl.getParameter() method: ext.VERTEX_ARRAY_BINDING_OES Returns a WebGLVertexArrayObject object wh...
Performance - Web APIs
rty. Specifications Specification Status Comment High Resolution Time Level 2The definition of 'Performance' in that specification. Recommendation Defines toJson() method. High Resolution TimeThe definition of 'Performance' in that specification. Recommendation Defines now() method. Performance Timeline Level 2The definition of 'Performance
extensions' in that specification. Candidate Recommendation Changes getEntries() interface. Performance TimelineThe definition of 'Performance
extensions' in that specification. Recommendation Defines getEntries(), getEntriesByType() and getEntriesByName() methods. Resource Timing Level 1The definition of 'Performance
extensions' in that specification. Candidate Recommendati...
... Recommendation Defines getEntries(), getEntriesByType() and getEntriesByName() methods. Resource Timing Level 1The definition of 'Performance
extensions' in that specification. Candidate Recommendation Defines clearResourceTimings() and setResourceTimingBufferSize() methods and the onresourcetimingbufferfull property. User Timing Level 2The definition of 'Performance
extensions' in that specification. Working Draft Clarifies mark(), clearMark(), measure() and clearMeasure() methods. User TimingThe definition of 'Performance
extensions' in that specification. Recommendation Defines mark(), clearMark(), measure() and clearMeasure() methods. ...
Using Performance Timeline - Web APIs
The following example show the usage of these methods getEntries(), getEntriesByName() and getEntriesByType(). ...
...The following example show the usage of these methods getEntries(), getEntriesByName() and getEntriesByType(). ...
Pointer Lock API - Web APIs
ock || canvas.mozRequestPointerLock; canvas.requestPointerLock() If a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event generated as a result of an engagement gesture must be received by the document before requestPointerLock will succeed. (from https://w3c.github.io/pointerlock/#
extensions-to-the-element-interface) pointerLockElement and exitPointerLock() The Pointer lock API also extends the Document interface, adding both a new property and a new method. The new property is used for accessing the currently locked element (if any), and is named pointerLockElement and the new method on Document is exitPointerLock() and, as the name implies, it is used to exit the pointer lock. ...
...r exitPointerLock(), the pointerlockerror event is dispatched to the document. This is a simple event and contains no extra data. document.addEventListener('pointerlockerror', lockError, false); document.addEventListener('mozpointerlockerror', lockError, false); function lockError(e) { alert("Pointer lock failed"); } Note: until Firefox 50 the above events were prefixed with moz in Firefox.
Extensions to mouse events The Pointer lock API extends the normal MouseEvent interface with movement attributes. Two new attributes to mouse events--movementX and movementY--provide the change in mouse positions. The values of the parameters are the same as the difference between the values of MouseEvent properties, screenX and screenY, which are stored in two subsequent mousemove events, eNow and ePrevio...
PublicKeyCredential.response - Web APIs
the demand is legitimate. An AuthenticatorResponse is either: an AuthenticatorAttestationResponse (when the PublicKeyCredential is created via CredentialsContainer.create()) an AuthenticatorAssertionResponse (when the PublicKeyCredential is obtained via CredentialsContainer.get()). In order to validate the creation of credentials, a relying party's server needs both: this response the
extensions of the client (given by PublicKeyCredential.getClientExtensionResults()) to validate the demand. Note: When validating the fetching of existing credentials, the whole PublicKeyCredential object and the client
extensions are necessary for the relying party's server. Note: This property may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax resp...
... Recommendation Initial definition. ...
PublicKeyCredential - Web APIs
ntext An instance of an AuthenticatorResponse object. It is either of type AuthenticatorAttestationResponse if the PublicKeyCredential was the results of a navigator.credentials.create() call, or of type AuthenticatorAssertionResponse if the PublicKeyCredential was the result of a navigator.credentials.get() call. Methods PublicKeyCredential.getClientExtensionResults()Secure context If any
extensions were requested, this method will return the results of processing those
extensions. PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()Secure context A static method returning a Promise which resolves to true if an authenticator bound to the platform is capable of verifying the user. With the current state of implementation, this method only resolves to true when Windows Hello i...
... var options = { challenge: new Uint8Array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publicKey": options ...
PublicKeyCredentialRequestOptions - Web APIs
e client will use the current origin's domain. PublicKeyCredentialRequestOptions.allowCredentials Optional An Array of credentials descriptor which restricts the acceptable existing credentials for retrieval. PublicKeyCredentialRequestOptions.userVerification Optional A string qualifying how the user verification should be part of the authentication process. PublicKeyCredentialRequestOptions.
extensions Optional An object with several client
extensions' inputs. Those
extensions are used to request additional processing (e.g. dealing with legacy FIDO APIs credentials, prompting a specific text on the authenticator, etc.). Methods None. Examples var options = { challenge: new Uint8Array([/* bytes sent from the server */]), rpId: "example.com", /* will only work if the current domain ...
... something like foo.example.com */ userVerification: "preferred", timeout: 60000, // Wait for a minute allowCredentials: [ { transports: "usb", type: "public-key", id: new Uint8Array(26) // actually provided by the server }, { transports: "internal", type: "public-key", id: new Uint8Array(26) // actually provided by the server } ],
extensions: { uvm: true, // RP wants to know how the user was verified loc: false, txAuthSimple: "Could you please verify yourself?" } }; navigator.credentials.get({ "publicKey": options }) .then(function (credentialInfoAssertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); });...
format - Web APIs
as the 'format' property of SVGGlyphRefElement property. If the font is in one of the formats listed in CSS2([CSS2], section15.3.5), then its value is the corresponding <string> parameter of the font. Syntax string = myGlyph.format; myGlyph.format = string; Value The format values listed below are taken from CSS2([CSS2], section15.3.5). ...
...on15.3.5). String Font Format Examples of common
extensions truedoc-pfr TrueDoc(TM) Portable Font Resource .pfr embedded-opentype Embedded OpenType .eot type-1 PostScript(TM) Type 1 .pfb, .pfa truetype TrueType .ttf opentype OpenType, including TrueType Open .ttf truetype-gx TrueType with GX
extensions - speedo Speedo - intellifont Intellifont - Example myGlyph.format = "truedoc-pfr"; Specifications Specification Status Comment Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'format' in that specification. Recommendation ...
WEBGL_compressed_texture_astc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: ASTC compression is typically available on Mali ARM GPUs, Intel GPUs, and Nividia Tegra chips. ...
... The WEBGL_compressed_texture_astc extension is part of the WebGL API and exposes Adaptive Scalable Texture Compression (ASTC) compressed texture formats to WebGL. For more information, see the article Using ASTC Texture Compression for Game Assets by nvidia. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: ASTC compression is typically available on Mali ARM GPUs, Intel GPUs, and Nividia Tegra chips. This extension is available to both, WebGL1 and WebGL2 contexts. Methods This extension exposes one new methods. ext.getSupportedProfiles() Returns an array of strings containing the names of the ASTC profiles supported by the implementation. Constants The compress...
WEBGL_compressed_texture_etc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
...ompressed_texture_etc extension is part of the WebGL API and exposes 10 ETC/EAC compressed texture formats. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Constants The compressed texture formats are exposed by 10 constants and can be used in two functions: compressedTexImage2D() and compressedTexSubImage2D(). ext.COMPRESSED_R11_EAC One-channel (red) unsigned format compression. ext.COMPRESSED_SIGNED_R11_EAC One-channel (red) signed form...
WEBGL_compressed_texture_etc1 - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
..._compressed_texture_etc1 extension is part of the WebGL API and exposes the ETC1 compressed texture format. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Constants The compressed texture format is exposed by a constant and can be used with the compressedTexImage2D() method (note that ETC1 is not supported with the compressedTexSubImage2D() method). ext.COMPRESSED_RGB_ETC1_WEBGL Compresses 24-bit RGB data with no alpha channel. Examples ...
WEBGL_compressed_texture_pvrtc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
...pressed_texture_pvrtc extension is part of the WebGL API and exposes four PVRTC compressed texture formats. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: PVRTC is typically only available on mobile devices with PowerVR chipsets. It is used in all generations of the iPhone, iPod Touch and iPad and supported on certain Android devices that use a PowerVR GPU. This extension is available to both, WebGL1 and WebGL2 contexts. Note: On iOS devices, this extension is named WEBKIT_WEBGL_compressed_texture_pvrtc. C...
WEBGL_compressed_texture_s3tc - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
...ompressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Constants The compressed texture formats are exposed by four constants and can be used in two functions: compressedTexImage2D() and compressedTexSubImage2D(). ext.COMPRESSED_RGB_S3TC_DXT1_EXT A DXT1-compressed image in an RGB image format. ext.COMPRESSED_RGBA_S3TC_DXT1_EXT A DXT1-compr...
WEBGL_compressed_texture_s3tc_srgb - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. ...
...xtension is part of the WebGL API and exposes four S3TC compressed texture formats for the sRGB colorspace. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both WebGL1 and WebGL2 contexts. Constants The compressed texture formats are exposed by four constants and can be used in two functions: compressedTexImage2D() and compressedTexSubImage2D(). ext.COMPRESSED_SRGB_S3TC_DXT1_EXT A DXT1-compressed image in an sRGB image format. ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT A DXT...
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
The WebGLRenderingContext.compressedTexImage2D() and WebGL2RenderingContext.compressedTexImage3D() methods of the WebGL API specify a two- or three-dimensional texture image in a compressed format. Compressed image formats must be enabled by WebGL
extensions before using these methods. Syntax // WebGL 1: void gl.compressedTexImage2D(target, level, internalformat, width, height, border, ArrayBufferView? pixels); // Additionally available in WebGL 2: // read from buffer bound to gl.PIXEL_UNPACK_BUFFER void gl.compressedTexImage2D(target, level, internalformat, width, height, border, GLsizei imageSize, GLintptr offset); void gl.compressedTexImage2D(target, level, internalformat, width, height, border, ArrayBufferView srcData, optional srcOffset, optional srcLengthOver...
...RE_CUBE_MAP_NEGATIVE_Z: Negative Z face for a cube-mapped texture. Possible values for compressedTexImage3D: gl.TEXTURE_2D_ARRAY gl.TEXTURE_3D level A GLint specifying the level of detail. Level 0 is the base image level and level n is the nth mipmap reduction level. internalformat A GLenum specifying the compressed image format. Compressed image formats must be enabled by WebGL
extensions before using this method. All values are possible for compressedTexImage2D. See compressed texture formats for which are valid for compressedTexImage3D. Possible values: When using the WEBGL_compressed_texture_s3tc extension: ext.COMPRESSED_RGB_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT3_EXT ext.COMPRESSED_RGBA_S3TC_DXT5_EXT When ...
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
The WebGLRenderingContext.compressedTexSubImage2D() method of the WebGL API specifies a two-dimensional sub-rectangle for a texture image in a compressed format. Compressed image formats must be enabled by WebGL
extensions before using this method or a WebGL2RenderingContext must be used. Syntax // WebGL 1: void gl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, ArrayBufferView? pixels); // Additionally available in WebGL 2: void gl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, offset); void gl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, ArrayBufferView srcData, optional srcOffset, optional srcLengthOverride); Parameters target A GLenum specifying the binding point (target) of...
...t specifying the horizontal offset within the compressed texture image. yoffset A GLint specifying the vertical offset within the compressed texture image. width A GLsizei specifying the width of the compressed texture. height A GLsizei specifying the height of the compressed texture. format A GLenum specifying the compressed image format. Compressed image formats must be enabled by WebGL
extensions before using this method. Possible values: When using the WEBGL_compressed_texture_s3tc extension: ext.COMPRESSED_RGB_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT3_EXT ext.COMPRESSED_RGBA_S3TC_DXT5_EXT When using the WEBGL_compressed_texture_s3tc_srgb extension: ext.COMPRESSED_SRGB_S3TC_DXT1_EXT ext.COMPRESSED_SRGB_ALPHA...
WebGL constants - Web APIs
stants that are passed into or returned by functions. All constants are of type GLenum. Standard WebGL constants are installed on the WebGLRenderingContext and WebGL2RenderingContext objects, so that you use them as gl.CONSTANT_NAME: var canvas = document.getElementById('myCanvas'); var gl = canvas.getContext('webgl'); gl.getParameter(gl.LINE_WIDTH); Some constants are also provided by WebGL
extensions. A list is provided below. var debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); var vendor = gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL); The WebGL tutorial has more information, examples, and resources on how to get started with WebGL. Table of contents Standard WebGL 1 constants Standard WebGL 2 constants WebGL extension constants Standard WebGL 1 constants These consta...
... WEBGL_debug_renderer_info Constant name Value Description UNMASKED_VENDOR_WEBGL 0x9245 Passed to getParameter to get the vendor string of the graphics driver. ...
Web Animations API - Web APIs
f accessed by developers. AnimationEvent Actually part of CSS Animations. DocumentTimeline Represents animation timelines, including the default document timeline (accessed using the Document.timeline property). EffectTiming Element.animate(), KeyframeEffectReadOnly.KeyframeEffectReadOnly(), and KeyframeEffect.KeyframeEffect() all accept an optional dictionary object of timing properties. ...
...s animation timelines, including the default document timeline (accessed using the Document.timeline property). EffectTiming Element.animate(), KeyframeEffectReadOnly.KeyframeEffectReadOnly(), and KeyframeEffect.KeyframeEffect() all accept an optional dictionary object of timing properties.
Extensions to other interfaces The Web Animations API adds some new features to document and element.
Extensions to the Document interface document.timeline The DocumentTimeline object representing the default document timeline. document.getAnimations() Returns an Array of Animation objects currently in effect on elements in the document.
Extensions to the Element interface Element.animate() A shortcut method for creating and playing an animation on an element. It returns the created Animation ...
Using Web Workers - Web APIs
sult, then spawns the worker. After spawning the worker, the onmessage handler is configured to display the results by setting the contents of the div element, and the onerror handler is set to dump the error message. Finally, a message is sent to the worker to start it. Try this example live. Performing web I/O in the background You can find an example of this in the article Using workers in
extensions . Dividing tasks among multiple workers As multi-core computers become increasingly common, it's often useful to divide computationally complex tasks among multiple workers, which may then perform those tasks on multiple-processor cores. Other types of worker In addition to dedicated and shared web workers, there are other types of worker available: ServiceWorkers essentially act as proxy ...
...s) enable the creation of effective offline experiences, intercepting network requests and taking appropriate action based on whether the network is available and updated assets reside on the server. They will also allow access to push notifications and background sync APIs. Chrome Workers are a Firefox-only type of worker that you can use if you are developing add-ons and want to use workers in
extensions and have access to js-ctypes in your worker. See ChromeWorker for more details. Audio Worklet provide the ability for direct scripted audio processing to be done in a worklet (a lightweight version of worker) context. Functions and interfaces available in workers You can use most standard JavaScript features inside a web worker, including: Navigator XMLHttpRequest Array, Date, Math, and ...
Web APIs
APIs are typically used with JavaScript, although this doesn't always have to be the case. Specifications This is a list of all the APIs that are available. ...
...MCanvas APIChannel Messaging APIConsole APICredential Management APIDDOMEEncoding APIEncrypted Media
ExtensionsFFetch APIFile System API Frame Timing APIFullscreen APIGGamepad API Geolocation APIHHTML Drag and Drop APIHigh Resolution TimeHistory APIIImage Capture APIIndexedDBIntersection Observer APILLong Tasks API MMedia Capabilities API Media Capture and StreamsMedia Session APIMedia Source
Extensions MediaStream RecordingNNavigation TimingNetwork Information API PPage Visibility APIPayment Request APIPerformance APIPerformance Timeline APIPermissions APIPointer EventsPointer Lock APIProximity Events Push API RResize Observer APIResource Timing APISServer Sent EventsService Workers APIStorageStorage Access APIStreams TTouch EventsUURL APIVVibration APIVisual Viewport WWeb AnimationsWeb A...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
is so commonly done, that no one even bothers to support the MSAA caret, after all the hack is general solution works with pretty much all applications. MSAA provides information in several different ways: A COM interface (IAccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and Custom interface
extensions via interfaces via QueryInterface and QueryService. This can provide assistive technology with contextual information specific to your object model. For example, Gecko support ISimpleDOMNode to provide information about the DOM node for an accessible object. A set of system messages that confer accessibility-related events such as focus changes, changes to document content and state changes in U...
...ssibility is Longhorn. Don't use MSAA if you're not going to take it all the way via testing with assistive technologies and working with AT vendors. Don't use MSAA for exposing documents or other specialized data, if it's important that the user get access to formatting information. You will have to expose interfaces that contain more info than MSAA does. This information may be in the form of
extensions to MSAA, like Mozilla has done with ISimpleDOMNode (you can QI to it from IAccessible). This is likely to be a painful road even if you are a major player, in terms of getting the cooperation of AT vendors. It may be a good enough solution; however, if what you need is JAWS, Dragon and ZoomText support. ZoomText and Dragon can get by with your MSAA support., and JAWS can be scripted (even by exte...
<color> - CSS: Cascading Style Sheets
The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border. Window Window background. Should be used with the WindowText foreground color. WindowFrame Window frame. WindowText Text in windows. Should be used with the Window background color. Mozilla System Color
Extensions -moz-ButtonDefault The border color that goes around buttons that represent the default action for a dialog box. -moz-ButtonHoverFace The background color of a button that the mouse pointer is over (which would be ThreeDFace or ButtonFace when the mouse pointer is not over it). Should be used with the -moz-ButtonHoverText foreground color. -moz-ButtonHoverText The text color of...
...ed for text in objects with -moz-appearance: -moz-win-media-toolbox. -moz-win-accentcolor Used to access the Windows 10 custom accent color that you can set on the start menu, taskbar, title bars, etc. -moz-win-accentcolortext Used to access the color of text placed over the Windows 10 custom accent color in the start menu, taskbar, title bars, etc. Mozilla Color Preference
Extensions -moz-activehyperlinktext User's preference for text color of active links. Should be used with the default document background color. -moz-default-background-color User's preference for the document background color. -moz-default-color User's preference for the text color. -moz-hyperlinktext User's preference for the text color of unvisited links. Should be used with the...
Guide to Web APIs - Developer guides
ogy such as Node.js, on a server. On this page you'll find a complete list of all of the APIs provided by the full web technology stack. ...
...MCanvas APIChannel Messaging APIConsole APICredential Management APIDDOMEEncoding APIEncrypted Media
ExtensionsFFetch APIFile System API Frame Timing APIFullscreen APIGGamepad API Geolocation APIHHTML Drag and Drop APIHigh Resolution TimeHistory APIIImage Capture APIIndexedDBIntersection Observer APILLong Tasks API MMedia Capabilities API Media Capture and StreamsMedia Session APIMedia Source
Extensions MediaStream RecordingNNavigation TimingNetwork Information API PPage Visibility APIPayment Request APIPerformance APIPerformance Timeline APIPermissions APIPointer EventsPointer Lock APIProximity Events Push API RResize Observer APIResource Timing APISServer Sent EventsService Workers APIStorageStorage Access APIStreams TTouch EventsUURL APIVVibration APIVisual Viewport WWeb AnimationsWeb A...
HTML5 - Developer guides
ing videoconferencing directly in the browser, without the need for a plugin or an external application. Offline & storage Offline resources: The application cache Firefox fully supports the HTML5 offline resource specification. Most others have offline resource support at some level. Online and offline events Firefox 3 supports WHATWG online and offline events, which let applications and
extensions detect whether or not there's an active Internet connection, as well as to detect when the connection goes up and down. WHATWG client-side session and persistent storage (aka DOM storage) Client-side session and persistent storage allows web applications to store structured data on the client side. IndexedDB IndexedDB is a web standard for the storage of significant amounts of structured data...
...istory. This is especially useful for pages loading interactively new information. The contentEditable Attribute: Transform your website to a wiki! HTML5 has standardized the contentEditable attribute. Learn more about this feature. Drag and drop The HTML5 drag and drop API allows support for dragging and dropping items within and between web sites. This also provides a simpler API for use by
extensions and Mozilla-based applications. Focus management in HTML The new HTML5 activeElement and hasFocus attributes are supported. Web-based protocol handlers You can now register web applications as protocol handlers using the navigator.registerProtocolHandler() method. requestAnimationFrame Allows control of animations rendering to obtain optimal performance. Fullscreen API Controls the usage ...
HTML attribute: accept - HTML: Hypertext Markup Language
n. Unique file type specifiers A unique file type specifier is a string that describes a type of file that may be selected by the user in an <input> element of type file. Each unique file type specifier may take one of the following forms: A valid case-insensitive filename extension, starting with a period (".") character. For example: .jpg, .pdf, or .doc. A valid MIME type string, with no
extensions. The string audio/* meaning "any audio file". The string video/* meaning "any video file". The string image/* meaning "any image file". The accept attribute takes as its value a string containing one or more of these unique file type specifiers, separated by commas. For example, a file picker that needs content that can be presented as an image, including both standard image formats and PDF ...
...he user to be able to pick any arbitrary type of file; instead, you often want them to select files of a specific type or types. For example, if your file input lets users upload a profile picture, you probably want them to select web-compatible image formats, such as JPEG or PNG. Acceptable file types can be specified with the accept attribute, which takes a comma-separated list of allowed file
extensions or MIME types. Some examples: accept="image/png" or accept=".png" -- Accepts PNG files. accept="image/png, image/jpeg" or accept=".png, .jpg, .jpeg" -- Accept PNG or JPEG files. accept="image/*" -- Accept any file with an image/* MIME type. (Many mobile devices also let the user take a picture with the camera when this is used.) accept=".doc,.docx,.xml,application/msword,application/vnd.ope...
<input type="file"> - HTML: Hypertext Markup Language
. Unique file type specifiers A unique file type specifier is a string that describes a type of file that may be selected by the user in an <input> element of type file. Each unique file type specifier may take one of the following forms: A valid case-insensitive filename extension, starting with a period (".") character. For example: .jpg, .pdf, or .doc. A valid MIME type string, with no
extensions. The string audio/* meaning "any audio file". The string video/* meaning "any video file". The string image/* meaning "any image file". The accept attribute takes as its value a string containing one or more of these unique file type specifiers, separated by commas. For example, a file picker that needs content that can be presented as an image, including both standard image formats and PDF ...
...he user to be able to pick any arbitrary type of file; instead, you often want them to select files of a specific type or types. For example, if your file input lets users upload a profile picture, you probably want them to select web-compatible image formats, such as JPEG or PNG. Acceptable file types can be specified with the accept attribute, which takes a comma-separated list of allowed file
extensions or MIME types. Some examples: accept="image/png" or accept=".png" -- Accepts PNG files. accept="image/png, image/jpeg" or accept=".png, .jpg, .jpeg" -- Accept PNG or JPEG files. accept="image/*" -- Accept any file with an image/* MIME type. (Many mobile devices also let the user take a picture with the camera when this is used.) accept=".doc,.docx,.xml,application/msword,application/vnd.ope...
HTML documentation index - HTML: Hypertext Markup Language
33 translate Experimental, Global attributes, HTML, Reference The translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its Text node children should be translated when the page is localized, or whether to leave them unchanged. ...
... 34 x-ms-acceleratorkey Attribute, HTML, HTML:Microsoft
Extensions, Non-standard, Reference, x-ms-acceleratorkey The x-ms-acceleratorkey attribute accessibly declares that an accelerator key has been assigned to an element: the element is activated via JavaScript when the key(s) are pressed on a keyboard. 35 x-ms-format-detection Attribute, HTML, HTML:Microsoft
Extensions, Non-standard, Reference, x-ms-format-detection The x-ms-format-detection attribute determines whether data formats within the element's text, like phone numbers, are automatically converted to followable links. 36 HTML attribute reference Attribute, Attributes, Beginner, Configuring, Element Attributes, Elements, HTML, Reference, Settings, Web Elements in HTML have att...
Resource URLs - HTTP
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. Resource URLs, URLs prefixed with the resource: scheme, are used by Firefox and Firefox browser
extensions to load resources internally, but some of the information is available to sites the browser connects to as well. Syntax Resource URLs are composed of two parts: a prefix (resource:), and a URL pointing to the resource you want to load: resource://<url> An example: resource://gre/res/svg.css When arrows are found in the resource URL's ('->'), it means that the first file loaded the next one: reso...
...gurations, such as platform and locale, which means web sites could identify individual users using this information. Solution In order to fix this problem, Mozilla changed the behavior of loading resource: URIs in bug 863246, which landed in Firefox 57 (Quantum). In the past, web content was able to access whatever resource: URIs were desired -- not only Firefox's internal resources, but also
extensions' assets. Now this behavior is prohibited by default. It is however still necessary for Firefox to load resources in web content under certain circumstances. For example, if you open the view source page (View Page Source or View Selection Source), you will find it requires viewsource.css through a resource: URI. Resources that have to be exposed to web content have been moved to a new locatio...
Basics of HTTP - HTTP
Articles Overview of HTTP Describes what HTTP is and its role in web architecture, including its position in the protocol stack. Evolution of HTTP HTTP was created in the early 1990s and has been extended several times. ...
...ources, identifiers, and locations on the web. Identifying resources on the Web Describes how web resources are referenced and how to locate them. Data URIs A specific kind of URI that directly embeds the resource it represents. Data URIs are very convenient, but have some caveats. Resource URLs Resource URLs, those prefixed with the resource scheme are used by Firefox and Firefox browser
extensions to load resources internally, but is also available to some sites the browser connects to as well. Separating identity and location of a resource: The Alt-Svc HTTP header Most of the time the identity and location of a web resource are shared, this can be changed with the Alt-Svc header. MIME types Since HTTP/1.0, different types of content can be transmitted. This article explains how this i...
Feature-Policy: encrypted-media - HTTP
When this policy is enabled, the Promise returned by Navigator.requestMediaKeySystemAccess() will reject with a DOMException. Syntax Feature-Policy: encrypted-media <allowlist>; <allowlist> An allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: The feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. ...
...ng contexts (iframes) in the same origin. The feature is not allowed in cross-origin documents in nested browsing contexts. 'none': The feature is disabled in top-level and nested browsing contexts. Default policy The allow list is 'self'. Specifications Specification Status Comment Feature Policy Editor's Draft Initial definition. Encrypted Media
ExtensionsThe definition of 'Feature Policy integration' in that specification. Recommendation ...
Protocol upgrade mechanism - HTTP
pgrade by adding to a standard request the Upgrade and Connection headers, as follows: Connection: Upgrade Upgrade: websocket WebSocket-specific headers The following headers are involved in the WebSocket upgrade process. Other than the Upgrade and Connection headers, the rest are generally optional or handled for you by the browser and server when they're talking to each other. Sec-WebSocket-
Extensions Specifies one or more protocol-level WebSocket
extensions to ask the server to use. Using more than one Sec-WebSocket-Extension header in a request is permitted; the result is the same as if you included all of the listed
extensions in one such header. Sec-WebSocket-
Extensions:
extensions extensions A comma-separated list of
extensions to request (or agree to support). These should be selec...
...nsions to ask the server to use. Using more than one Sec-WebSocket-Extension header in a request is permitted; the result is the same as if you included all of the listed
extensions in one such header. Sec-WebSocket-
Extensions:
extensions extensions A comma-separated list of
extensions to request (or agree to support). These should be selected from the IANA WebSocket Extension Name Registry.
Extensions which take parameters do so by using semicolon delineation. For example: Sec-WebSocket-
Extensions: superspeed, colormode; depth=16 Sec-WebSocket-Key Provides information to the server which is needed in order to confirm that the client is entitled to request an upgrade to WebSocket. This header can be used when insecure (HTTP) clients wish to upgrade, in order to offer some degree of protect...
Introduction - JavaScript
ects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example: Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). ...
... This means that in the browser, JavaScript can change the way the webpage (DOM) looks. ...
JavaScript modules - JavaScript
square on a specified canvas, with a specified size, position, and color. Returns an object containing the square's size, position, and color. reportArea() -- writes a square's area to a specific report list, given its length. reportPerimeter() -- writes a square's perimeter to a specific report list, given its length. Aside -- .mjs versus .js Throughout this article, we've used .js
extensions for our module files, but in other resources you may see the .mjs extension used instead. V8's documentation recommends this, for example. The reasons given are: It is good for clarity, i.e. it makes it clear which files are modules, and which are regular JavaScript. It ensures that your module files are parsed as a module by runtimes such as Node.js, and build tools such as Babel. However,...
...h the correct MIME type. Because .mjs is a non-standard file extension, some operating systems might not recognise it, or try to replace it with something else. For example, we found that macOS was silently adding on .js to the end of .mjs files and then automatically hiding the file extension. So all of our files were actually coming out as x.mjs.js. Once we turned off automatically hiding file
extensions, and trained it to accept .mjs, it was OK. ...
Intl - JavaScript
(variant) The subtags identifying languages, scripts, regions (including countries), and (rarely used) variants in Unicode BCP 47 locale identifiers are registered in the IANA Language Subtag Registry. This registry is periodically updated over time, and implementations may not always be up to date, so be careful not to rely too much on tags being universally supported. BCP 47 also allows for
extensions, each consisting of a single digit or letter (other than "x") and one or more two- to eight-letter or digit tags, all separated by hyphens. JavaScript internationalization functions use the "u" (Unicode) extension, which can be used to request additional customization of Collator, NumberFormat, or DateTimeFormat objects. Examples: "de-DE-u-co-phonebk": Use the phonebook variant of the German s...
...ther BCP 47 extension tags can be found in the Unicode CLDR Project. Finally, an extension using the letter "x" may appear, followed by one or one- to eight-letter or digit tags. This extension allows applications to encode information for their own private use, that will be ignored by all Intl operations. Locale negotiation The list of locales specified by the locales argument, after Unicode
extensions have been removed from them, is interpreted as a prioritized request from the application. The runtime compares it against the locales it has available and picks the best one available. Two matching algorithms exist: the "lookup" matcher follows the Lookup algorithm specified in BCP 47; the "best fit" matcher lets the runtime provide a locale that's at least, but possibly more, suited for the req...
eval() - JavaScript
ay to create parameterized functions without concatenating strings. Parsing JSON (converting strings to JavaScript objects) If the string you're calling eval() on contains data (for example, an array: "[1, 2, 3]"), as opposed to code, you should consider switching to JSON, which allows the string to use a subset of JavaScript syntax to represent data. See also Downloading JSON and JavaScript in
extensions. Note that since JSON syntax is limited compared to JavaScript syntax, many valid JavaScript literals will not parse as JSON. For example, trailing commas are not allowed in JSON, and property names (keys) in object literals must be enclosed in quotes. Be sure to use a JSON serializer to generate strings that will be later parsed as JSON. Pass data instead of code For example, an extension des...
...otes. Be sure to use a JSON serializer to generate strings that will be later parsed as JSON. Pass data instead of code For example, an extension designed to scrape contents of web-pages could have the scraping rules defined in XPath instead of JavaScript code. Run code with limited privileges If you must run the code, consider running it with reduced privileges. This advice applies mainly to
extensions and XUL applications, which can use Components.utils.evalInSandbox for this. Examples Using eval In the following code, both of the statements containing eval() return 42. The first evaluates the string "x + y + 1"; the second evaluates the string "42". var x = 2; var y = 39; var z = '42'; eval('x + y + 1'); // returns 42 eval(z); // returns 42 Using eval to evaluate a string of J...
Strict mode - JavaScript
The normal code may duplicate property names,...
...) === 2); console.assert(fun.apply(null) === null); console.assert(fun.call(undefined) === undefined); console.assert(fun.bind(true)() === true); That means, among other things, that in browsers it's no longer possible to reference the window object through this inside a strict mode function. Second, in strict mode it's no longer possible to "walk" the JavaScript stack via commonly-implemented
extensions to ECMAScript. In normal code with these
extensions, when a function fun is in the middle of being called, fun.caller is the function that most recently called fun, and fun.arguments is the arguments for that invocation of fun. Both
extensions are problematic for "secure" JavaScript because they allow "secured" code to access "privileged" functions and their (potentially unsecured) arguments. If ...
Web video codec guide - Web media technologies
ny other licensing requirements [1] While Theora doesn't support Variable Frame Rate (VFR) within a single stream, multiple streams can be chained together within a single file, and each of those can have its own frame rate, thus allowing what is essentially VFR. However, this is impractical if the frame rate needs to change frequently. [2] Edge supports Theora with the optional Web Media
Extensions add-on. VP8 The Video Processor 8 (VP8) codec was initially created by On2 Technologies. Following their purchase of On2, Google released VP8 as an open and royalty-free video format under a promise not to enforce the relevant patents. In terms of quality and compression rate, VP8 is comparable to AVC. If supported by the browser, VP8 allows video with an alpha channel, allowing the video to p...
... Container support 3GP, Ogg, WebM RTP / WebRTC compatible Yes; VP8 is one of the spec-required codecs for WebRTC Supporting/Maintaining organization Google Specification RFC 6386 Licensing Open and free of royalties and any other licensing requirements [1] Edge support for VP8 requires the use of Media Source
Extensions. [2] Safari only supports VP8 in WebRTC connections. [3] Firefox only supports VP8 in MSE when no H.264 hardware decoder is available. Use MediaSource.isTypeSupported() to check for availability. VP9 Video Processor 9 (VP9) is the successor to the older VP8 standard developed by Google. Like VP8, VP9 is entirely open and royalty-free. Its encoding and decoding performance is comparable to or ...
SVG Attribute reference - SVG: Scalable Vector Graphics
order orient orientation origin overflow overline-position overline-thickness P panose-1 paint-order path pathLength patternContentUnits patternTransform patternUnits ping pointer-events points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits R r radius referrerPolicy refX refY rel rendering-intent repeatCount repeatDur required
Extensions requiredFeatures restart result rotate rx ry S scale seed shape-rendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stro...
... XLink Attributes xlink:href, xlink:type, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate Presentation Attributes Note that all SVG presentation attributes can be used as CSS properties. alignment-baseline, baseline-shift, clip, clip-path, clip-rule, color, color-interpolation, color-interpolation-filters, color-profile, color-rendering, cu...
SVG documentation index - SVG: Scalable Vector Graphics
Reference, SVG, SVG Container, Web The svg element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document. 369 <switch> Element, NeedsExample, SVG, SVG Container The <switch> SVG element evaluates any requiredFeatures, required
Extensions and systemLanguage attributes on its direct child elements in order, and then renders the first child where these attributes evaluate to true. 370 <symbol> SVG, SVG Container The <symbol> element is used to define graphical template objects which can be instantiated by a <use> element. 371 <text> Element, Reference, SVG, SVG Text Content The SVG <text> el...
... Server Configuration SVG See http://wiki.svg.org/Server_Configuration 381 Sizing SVG This page was auto-generated because a user created a sub-page to this page. 382 Specification Deviations SVG There are a few places where we have consciously decided to make Gecko deviate from or extend the SVG specification. This page lists those deviations/
extensions and our reasoning for them. 383 mimeTypes.rdf corruption SVG This page explains a problem that can cause SVG to stop working in Mozilla due to the way Mozilla maps filename
extensions to media types. ...
Example - SVG: Scalable Vector Graphics
XHTML, SVG, JavaScript, and the DOM to animate a swarm of "motes". These motes are governed by two simple principles. First, each mote tries to move towards the mouse cursor, and second each mote tries to move away from the average mote position. Combined, we get this very natural-looking behavior. This is done completely in W3C Standards-XHTML, SVG, and JavaScript-no Flash or any vendor-specific
extensions. This example should work in Firefox 1.5 and above. View the example <?xml version='1.0'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <title>A swarm of motes</title> <style type='text/css'> <![CDATA[ label, input { width: 150px; display: block; float: left; margin-bottom: 10px; } label { text-align: right; width: 75px...
...ff' fill-opacity='0.5'/> </svg:svg> <p>A swarm of motes, governed by two simple principles. First, each mote tries to move towards the cursor, and second each mote tries to move away from the average mote position. Combined, we get this very natural looking behavior. </p> <p> This is done completely in W3C Standards-XHTML, SVG and JavaScript-no flash or any vendor specific
extensions. Currently, this will work in Mozilla Firefox version 1.5 and above. </p> <div> (C) 2006 <a id='emailme' href='#'>Nick Johnson</a> <script type='text/javascript'> <![CDATA[ // foil spam bots var email = '@riovia.net'; email ='nick' + email; document.getElementById('emailme').href = 'mailto:'+email; ]]> </script> This software is free for you to use in any way what...
Introduction to using XPath in JavaScript - XPath
Mozilla implements a fair amount of the DOM 3 XPath, which means that XPath expressions can be run against both HTML and XML documents. The main interface to using XPath is the evaluate function of the document object. document.evaluate This method evaluates XPath expressions against an XML based document (including HTML documents), and returns a XPathResult object, which can be a single node or a set of nodes. ...
... var req = new XMLHttpRequest(); req.open("GET", "chrome://yourextension/content/peopleDB.xml", false); req.send(null); var xmlDoc = req.responseXML; var nsResolver = xmlDoc.createNSResolver( xmlDoc.ownerDocument == null ? xmlDoc.documentElement : xmlDoc.ownerDocument.documentElement); var personIterator = xmlDoc.evaluate('//person', xmlDoc, nsResolver, XPathResult.ANY_TYP...
XUL Migration Guide - Archive of obsolete content
User Interface Components XUL-based add-ons typically implement a user interface using a combination of two techniques: XUL overlays and XUL windows. XUL Overlays XUL overlays are used to modify existing windows such as the main browser window. In this way an extension can integrate its user interface into the browser: for example, adding menu items, buttons, and toolbars. Because SDK-based
extensions are restartless, they can't use XUL overlays. To add user interface components to the browser, there are a few different options. In order of complexity, the main options are: the SDK includes modules that implement some basic user interface components including buttons, dialogs, and context menu items. there is a collection of community-developed modules that includes various user in...
context-menu - Archive of obsolete content
create your item only once and supply a context that matches the target URL. Context menu items are displayed in the order created or in the case of sub menus the order added to the sub menu. Menu items for each add-on will be grouped together automatically. If the total number of menu items in the main context menu from all add-ons exceeds a certain number (normally 10 but configurable with the
extensions.addon-sdk.context-menu.overflowThreshold preference) all of the menu items will instead appear in an overflow menu to avoid making the context menu too large. Specifying contexts As its name implies, the context menu should be reserved for the occurrence of specific contexts. Contexts can be related to page content or the page itself, but they should never be external to the page. For example,...
tabs - Archive of obsolete content
use the favicon module's getFavicon() function instead. contentType This is currently an experimental API, so we might change it in future releases. Returns the MIME type that the document currently loaded in the tab is being rendered as. This may come from HTTP headers or other sources of MIME information, and might be affected by automatic type conversions performed by either the browser or
extensions. This property is read-only. index The index of the tab relative to other tabs in the application window. This property can be set to change its relative position. isPinned Whether or not this tab is pinned as an app tab. This property is read-only. window The window object for this tab. readyState New in Firefox 33. A string telling you the load state of the document hosted by this t...
chrome - Archive of obsolete content
You should avoid using the API if at all possible. We intend to deprecate it in future releases. If you use this API you can expect your add-on to get an extra security review by addons.mozilla.org. This module should not be confused with the "chrome" global variable that Web
Extensions can use to access APIs. The chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs. chrome is a built-in pseudo module of the toolkit loader. See the chrome authority tutorial for more details. You can see an example of using this API in the XUL Migration Guide. ...
Developing for Firefox Mobile - Archive of obsolete content
To follow this tutorial you'll need to have learned the basics of jpm. Firefox for Android implements its UI using native Android widgets instead of XUL. With the add-on SDK you can develop add-ons that run on this new version of Firefox Mobile as well as on the desktop version of Firefox. You can use the same code to target both desktop Firefox and Firefox Mobile, and use jpm-mobile instead of the normal jpm. Right now not all modules are fully functional, but we're working on adding support for more modules. The tables at the end of this guide list the modules that are currently supported on Firefox Mobile. ...
Canvas code snippets - Archive of obsolete content
Saving a canvas image to a file The following function accepts a canvas object and a destination file path string. The canvas is converted to a PNG file and saved to the specified location. The function returns a promise which resolves when the file has been completely saved. function saveCanvas(canvas, path, type, options) { return Task.spawn(function *() { var...
File I/O - Archive of obsolete content
how you should save a path in user prefs. Storing nsIFile in preferences The following two snippets show the right way to store a file path in user preferences (more about preferences in Mozilla): Absolute path (nsIFile) To store an arbitrary path in user preferences, use this code: // |file| is nsILocalFile. Uses Services.jsm. // 1. Write path to prefs var prefs = Services.prefs.getBranch("
extensions.myext."); prefs.setComplexValue("filename", Components.interfaces.nsIFile, file); // 2. Read path from prefs var file = prefs.getComplexValue("filename", Components.interfaces.nsILocalFile); Relative path (nsIRelativeFilePref) To store paths relative to one of the predefined folders listed above, for example file relative to profile folder, use the following code: // 1. Write to prefs var re...
Progress Listeners - Archive of obsolete content
Progress listeners implement the nsIWebProgressListener interface. Note that if you just want to execute your code each time a page loads, you can use an an easier method, onPageLoad(). Note that onPageLoad does not fire for back button clicks. In the examples below the progress listener is attached to the tabbrowser, which means you don't get any notifications for inactive tabs. Firefox 3.5 includes a way to set up a listener for all tabs, selected and not: Listening to events on all tabs. ...
Sidebar - Archive of obsolete content
marks sidebar (close it if it's open or // open it if it's currently closed) SidebarUI.toggle("viewBookmarksSidebar"); // show the history sidebar, whether it's hidden or already showing SidebarUI.show("viewHistorySidebar"); // hide the sidebar, if one is showing SidebarUI.hide(); Avoid opening the sidebar on startup. Users have been known to complain about this "feature", and if two or more
extensions try to open their sidebars on startup, the user will see a flurry of sidebars opening and closing with which ever extension going last "winning". Web panels sidebar Content such as web pages can be safely loaded as sidebar in the "viewWebPanelsSidebar". Bookmarks with "Load this bookmark in sidebar" checked in the properties open in the "viewWebPanelsSidebar". A web page can use window.sideba...
Common Pitfalls - Archive of obsolete content
These are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort. The first couple of items deal with loading content from a URI. It's important to create the URI correctly, and then check that it's secure to load. This will shield you from loading <tt>javascript:</tt> or <tt>chrome:</tt> URIs when you shouldn't. ...
Default Preferences - Archive of obsolete content
do any kind of program flow control (ifs, loops etc.) nor even calculated values (i.e. 3600 * 24 * 5). Doing so will cause Mozilla to stop processing your preferences file without any notification, warning, error, or exception. Think of it more as an .ini file. Comments are perfectly acceptable. Inside your file you set preferences using the pref() function: pref("name", "value") example: pref('
extensions.defaultPrefs.example.int', 1); pref('
extensions.defaultPrefs.example.float', 0.1); pref('
extensions.defaultPrefs.example.string', 'fadf'); pref('
extensions.defaultPrefs.example.bool', true); Notice that unlike when you're reading preferences, writing default preferences uses the same function no matter the data type of the preference. You simply pass it directly to the function. Original Docum...
Displaying web content in an extension without security issues - Archive of obsolete content
A typical example is an RSS reader extension that would take the content of the RSS feed (HTML code), format it nicely and insert into the extension window. The issue that is commonly overlooked here is that the RSS feed could contain some malicious JavaScript code and it would then execute with the privileges of the extension -- meaning that it would get full access to the browser (cookies, history etc) and to user's files. These issues can easily be avoided by making use of the existing security mechanisms in the Mozilla codebase. ...
Hiding browser chrome - Archive of obsolete content
bar, and so forth), in order to reduce clutter when presenting a particular user interface. This is done, for example, by the about:addons page. This can be accomplished by augmenting the behavior of the XULBrowserWindow object's hideChromeForLocation() method. Note: Don't simply replace the hideChromeForLocation() method; this will likely hurt the functionality of Firefox itself as well as other
extensions. Use the technique demonstrated here. var prevFunc = XULBrowserWindow.hideChromeForLocation; XULBrowserWindow.hideChromeForLocation = function(aLocation) { return (/* your test goes here */) || prevFunc.apply(XULBrowserWindow, [aLocation]); } This works by saving a reference to the current implementation of the hideChromeForLocation() method, then replacing it with a new method that calls thro...
Legacy Add-ons - Archive of obsolete content
This section contains links to documentation for legacy technology for add-on development, including: Add-on SDK Legacy
extensions for Firefox for Android Earlier technology Bootstrapped
extensions Overlay
extensions ...
Adding Events and Commands - Archive of obsolete content
ar, you can't be sure if a given button is present or not, so it's easier to use a broadcaster. This way you only need to set values to the broadcaster instead of having to check if the button is there or not. Commands The command element is a specialized type of broadcaster, meant to be used with the oncommand event. This is the recommended way of centralizing common UI behavior in Firefox and
extensions. Commands are heavily used in Firefox, as a quick look into the DOM Inspector should show. Their behavior is identical as broadcaster elements, but they should be used when oncommand is one of the shared attributes. Our menu example is in fact better suited for a command. <commandset id="xulschoolhello-commandset"> <command id="xulschoolhello-hello-command" oncommand="XULSchoolChrome.Brow...
Adding sidebars - Archive of obsolete content
oCheck="false" group="sidebar" sidebarurl="chrome://xulschoolhello/content/sidebar.xul" sidebartitle="&xulschoolhello.sidebar.title;" oncommand="toggleSidebar('xulschoolhello-sidebar');" /> </menupopup> The example in the MDC page includes a shortcut key combination to toggle the new sidebar. Keyboard shortcuts are an essential feature of Firefox, and you can add your own into your
extensions, which is also great. The problem is that choosing the right keyboard shortcuts is very, very hard, as explained by the creator of AdBlock Plus, and the Mozilla Keyboard Reference. To sum up both of these references: you can choose an obscure key combination that won't conflict with Firefox, such as Ctrl+Shift+(some letter), but there's no way of knowing if any other extension uses that same comb...
Adding windows and dialogs - Archive of obsolete content
ed dimensions because of potential localization problems. Dialogs are sized to their contents and will generally work fine. However, there are cases where the dialog contents are generated or expanded dynamically by your code, and you'll need to resize them appropriately. The window.sizeToContent function is what you need in this case. Input Controls Most additional XUL windows and dialogs in
extensions are some kind of input form. Let's look into the most commonly used form elements and how to use them in your XUL windows. There isn't much we need to add from what the XUL Tutorial explains, so go ahead and read the following sections: Input controls Numeric controls List controls There are some other aspects to take into account when handling input controls, which we cover in the followi...
Appendix A: Add-on Performance - Archive of obsolete content
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. ...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
eval to "string-patch" the function body. // DO NOT USE! var functionBody = gBrowser.addTab.toSource(); var afterBracket = functionBody.indexOf("{") + 1; functionBody = functionBody.substring(0, afterBracket) + "myAddon.onAddTab(aURI);" + functionBody.substring(afterBracket); eval("gBrowser.addTab = " + functionBody); Of course, this not only looks messy, but can be quite error prone. Other
extensions might do something similar, trying to hook the same functions, but a little different, ending up with completely broken code. The code is hard to read and by that hard to maintain and review. (The example is a quite simple one. In real life such code is often far more complex) The code might break in the future, as certain assumptions might not longer be true, for example the function signature...
Appendix F: Monitoring DOM changes - Archive of obsolete content
TML several years ago in order to allow web applications to monitor changes to the DOM by other scripts. Unfortunately, adding listeners for any of these events to a document has a highly deleterious effect on performance, an effect which is not mitigated in the slightest by later removing those listeners. For this reason, it is best to avoid using mutation listeners at all costs, especially from
extensions. This document lays out some alternatives which do not have such severe performance impacts. Mutation observers Mutation observers are the more efficient, W3C speced replacement for the highly inefficient mutation events. Their major advantage is in their performance and their ease of use, especially when combined with simple libraries. Their main disadvantage is that, due to their recent adven...
Custom XUL Elements with XBL - Archive of obsolete content
indow. In conjuntion with inheritance, it's even easy to do. You can enrich the UI of a Firefox window by extending and replacing elements, which is what the Console2 extension does in order to improve the Error Console window. Replacing elements should always be a last resort solution, specially if it is done on the main browser window. It's very easy to break the UI of the application or other
extensions if you do this the wrong way, so be very careful about it. If you only need to change some specific instances of an element, use very specific CSS rules. You can use the -moz-binding property with any CSS selector. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Mozilla Documentation Roadmap - Archive of obsolete content
obscure communication channel is the Mozilla Newsgroups. They are also very diverse and active, and there's a good chance you'll get your queries answered. Thunderbird also comes in handy for reading and posting to the newsgroups. Another advantage is that discussions are archived and searchable through Google Groups. Other And finally, a couple resources you should also keep in mind: Other
extensions. There are thousands of
extensions out there, and you may strike luck and find one that does exactly what you need. Be sure to look at the license the extension's code is released with before thinking about copying large sections of it. Also, remember to give credit when it's due. Mozilla's Bugzilla repository. Pretty much every code change done in Firefox and Mozilla projects is documented in t...
Observer Notifications - Archive of obsolete content
server. You should normally set the third parameter to false. let observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); observerService.addObserver(testObserver, "xulschoolhello-test-topic", false); You should come up with a notification topic that is unique so you know it will not conflict with Firefox or other
extensions topics. To remove an observer for a specific topic, you use the removeObserver method. The method takes the observer object and notification topic as parameters. observerService.removeObserver(testObserver, "xulschoolhello-test-topic"); After you have registered some observers to listen to a notification topic, you can then use the notifyObservers method to send a notification to all of ...
XUL School Tutorial - Archive of obsolete content
XUL School is a comprehensive add-on development tutorial, focusing on Firefox extension development. It is recommended that you read through all of it at least once. While Firefox changes rapidly, the content in this tutorial should be up to date and valid. ...
Session store API - Archive of obsolete content
One key scenario in which supporting this feature can be crucial for an extension: Firefox 2 lets users undo the closing of tabs. In order to properly restore your extension's state when a tab is restored, it needs to use the session store API's setTabValue() method to save any data it 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. ...
Signing an XPI - Archive of obsolete content
Note: These instructions are outdated. For an extension to work in Firefox it must be signed by Mozilla, not by yourself. See Signing and distributing your add-on. Note: These instructions are for how to test with a self-signed certificate. See Signing an extension for a practical guide. Introduction This article describes how to sign your own Firefox
extensions with a code-signing certificate on a Windows platform. It was developed from the linux article So you want to sign your XPI package? by MozDev Group's Pete Collins. This article is a mirror of the original, with minor reformatting, some new info and all links updated in March 2010. Get network security services 1. Download the latest Network Security Services (NSS) package from the Mozilla FTP site at https://ftp.mozilla.org/pu...
Promises - Archive of obsolete content
OM.Addon)); AOM._replaceMethod("getInstallsByTypes", installs => installs); Components.utils.import("resource://gre/modules/AddonManager.jsm", AOM); Example usage: Task.spawn(function* () { // Get an extension instance, and its data directory. let addon = yield AOM.getAddonByID(ADDON_ID); let path = yield addon.getDataDirectory(); writer.writeDataTo(path); // Disable all
extensions. for (let extension of yield AOM.getAddonsByTypes(["extension"])) extension.userDisabled = true; }); JSON File Storage This helper simplifies the use of JSON data storage files with asynchronous IO. The JSONStore object must be instantiated with the base name of the storage file and, optionally, a JSON-compatible object to be used if the file does not yet exist. The constructor retu...
Using the Stylesheet Service - Archive of obsolete content
The API is defined in nsIStyleSheetService.idl. The stylesheets registered with this API apply to all documents; Firefox 18 extended nsIDOMWindowUtils with loadAdditionalStyleSheet() and removeAdditionalStyleSheet() to manage stylesheets for a specific document (bug 737003). The examples in this document are all written in JavaScript using XPCOM. Using the API The string "chrome://myext/content/myext.css" in the examples below is just an example. Replace it with the URL of the CSS file you want to load. ...
Localizing an extension - Archive of obsolete content
property files containing localizable strings for our JavaScript code, we need to create localized versions of those property files in the chrome/locale/es-ES directory as well. Only the strings should be localized; the keys should be the same for each localization. << PreviousNext >> See Also How to localize html pages, xul files, and js/jsm files from bootstrapped add-ons: Bootstrapped
Extensions :: Localization (L10n) XUL School Localization Tutorial: DTD/Entities method and Properties method ...
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
written under HKEY_CURRENT_USER\Software also. However, always look at HKEY_LOCAL_MACHINE first. Enumerate the Mozilla subkey. Here you will find keys on a per-product basis. You can enumerate the application subkeys, e.g. HKEY_LOCAL_MACHINE\Software\Mozilla\Productx.y\. The keys "Product x.y" contain application keys for the given Mozilla based browser. Example: Netscape 6 6.1\ Look at the
Extensions subkey, e.g. HKEY_LOCAL_MACHINE\Software\Mozilla\Netscape 6 6.1\
Extensions\ Access the Plugins value and value-data pair, e.g: Plugins = C:\Program Files\Netscape\Netscape 6\Plugins. You also have the Components value and value-data pair; this is for XPCOM components. In addition, if you have made your plugin scriptable and accessible from JavaScript, you ought to put the associated XPT file in...
Using content preferences - Archive of obsolete content
This makes it possible to write an extension that lets the user customize the appearance of specific web sites (setting the font size larger on sites that use obnoxiously small fonts, for instance). The content preferences service, implemented by nsIContentPrefService, offers functions for setting and retrieving preferences for specific sites or in the global preference space; global preferences are used whenever a site-specific preference isn't available. ...
Blackwood - Archive of obsolete content
The Blackwood project, started by engineers at Sun Microsystems, is an attempt to better integrate the Java platform with the Mozilla browser. Blackwood consists of a series of Java-based
extensions to Mozilla. Blackwood's mission is to put Java support in Mozilla on a par with JavaScript support. Active Subprojects Webclient Java DOM API Java Pluglet API Defunct Subprojects BlackConnect -- Blackconnect was superseeded by JavaXPCOM ...
Making a Mozilla installation modifiable - Archive of obsolete content
non-compiled files in the archive each time it starts up. Because of this, we can modify the files in the archive and see our changes to the UI merely by restarting the application. This makes modifying Mozilla's UI much easier than for many other applications. Although Mozilla stores the UI files in JAR archives, it can also access them in their original, unarchived form, which is useful for the
extensions developer because it makes it unnecessary to extract the files from the archive before changing the code and then re-add them to the 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 ...
Making it into a static overlay - Archive of obsolete content
g 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 are just standard ZIP archives of the...
In-Depth - Archive of obsolete content
System Colours CSS2 defines colours which are the same as your operating systems theme. A list of the different operating system colours can be found on the W3C's web site. Mozilla CSS Properties Mozilla.org created their own CSS properties to allow them to use the technology for the UI of Mozilla. All of the properties follow the W3C's standards for vendor
extensions, which is why they all begin with -moz. This is only a list of properties which may be useful to you; it is in no way all of the Mozilla specific properties available. Other sites which list Mozilla specific CSS properties XulPlanet.com [dead link, 26.03.13] Mozilla-prefixed properties on the standard track 26.03.13 -moz-appearance Makes a widget look like it's from your operating system. Possible are (This is probably an incom...
Extension Frequently Asked Questions - Archive of obsolete content
the other applications. For Thunderbird, you may also find the extension HowTo or FAQ pages helpful. If you're looking for a place to get started, try our tutorial, Building an Extension or MozillaZine's Getting started tutorial. Use the Extension Wizard to generate a template to start with. Be sure to set the development preferences. TODO: Add content. Where can I get more help? Please see
Extensions:Other Resources and
Extensions:Community. Before asking for help, be sure to set the debugging prefs and check the Error Console for related messages. Also, don't forget to do at least a simple web search before asking. And read this FAQ! ...
Repackaging Firefox - Archive of obsolete content
basic tutorial to get you started, and some tips specific for creating a DEX. If you already have an extension that you want to bundle with Firefox, and don't want to bundle an extra extension solely to set a few defaults, you can do everything you need to do in your existing extension. However, it's still recommended that you look through this tutorial, as it contains tips specific for creating
extensions of this type, and there are a few options that you will need to set to ensure a smooth upgrade path for users. At the very least, don't skip the "Important Extension Preferences" section below. 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 a...
JavaScript Client API - Archive of obsolete content
t actually persistently store anything, but rather serve as short-lived data stores during the course of a single sync and act as proxies to other data stores within the application (like the places database) outside of Sync. Creating a Custom Engine The Sync client ships with a number of engines out of the box (history, bookmarks, etc). It is possible for other components, including 3rd party
extensions, to supplement the set of engines and synchronize their own data. A word of warning: the JavaScript Client API is still a young component and is continuing to evolve. Therefore, developers outside of the Sync core should know that their code could require significant refactoring in future releases. Before developing against the JavaScript API, it is recommended to speak to developers of the API.
CRMF Request object - Archive of obsolete content
en removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla
extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. RFC 4211, the Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF), defines a certReqMessage. The object returned by generateCRMFRequest() contains one of those. ...
generateCRMFRequest() - Archive of obsolete content
en removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla
extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. crmfObject = crypto.generateCRMFRequest("requestedDN", "regToken", "authenticator", "escrowAuthorityCert", "CRMF Generation Done Code", keySize1, "keyParams1", "keyGenAlg1", ...
importUserCertificates - Archive of obsolete content
en removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla
extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. resultString = crypto.importUserCertificates("nicknameString","certString",forceBackup); Argument Description "nicknameString" This is the nickname that will be used to describe the certificate in the client's certificate...
popChallengeResponse - Archive of obsolete content
en removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla
extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. resultString = crypto.popChallengeResponse("challengeString"); Argument Description "challengeString" A base-64 encoded CMMF POPODecKeyChallContent message. The current implementation does not conform to that defined in the CMMF draft, a...
JavaScript crypto - Archive of obsolete content
en removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla
extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. Using the Mozilla crypto object from JavaScript Mozilla defines a special JavaScript object to allow web pages access to certain cryptographic-related services. These services are a balance between the functionality web pages need and the requirement to protec...
Message Summary Database - Archive of obsolete content
new database interface and change all the code that uses the nsIMsgDatabase interface. Message Headers The message header object implements the nsIMsgDBHdr interface. This includes a set of per-message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords. There are a set of generic property methods so that core code and
extensions can set attributes on msg headers without changing nsIMsgHdr.idl.Msg Threads We store thread information persistently in the database and expose these object through the [nsIMsgThread interface. So the db knows which messages are in a thread, which message a message is in reply to, etc. This allows us to store watch/ignore information on a thread object, and avoids having to generate threading in...
Microsummary XML grammar reference - Archive of obsolete content
ment is the root tag for 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 ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
--- unlink Removes all link information from the selection. --- useCSS Toggles the usage of CSS in the generated markup. Boolean value For more information, visit Rich-Text Editing in Mozilla. XML differences Mozilla has strong support for XML and XML-related technologies, such as XSLT and Web services. It also supports some non-standard Internet Explorer
extensions, such as XMLHttpRequest. How to handle XML As with standard HTML, Mozilla supports the W3C XML DOM specification, which allows you to manipulate almost any aspect of an XML document. Differences between Internet Explorer's XML DOM and Mozilla are usually caused by Internet Explorer's nonstandard behaviors. Probably the most common difference is how they handle white space text nodes. Often when...
Mozilla Application Framework in Detail - Archive of obsolete content
orm 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 applications are stored. XPInstall makes it easy to write both simple installation scripts and complex installations that check versions, log installation data to the local system, execute other installers, and update the appropriate registry settings. It is often used to install Mozilla-based applications and browser add-ons, but can just...
How to Write and Land Nanojit Patches - Archive of obsolete content
edwsmith and stejohns usually do it for Adobe. Note that you'd only do this for your company's TM/TR repo, ie. Mozilla people for TM, and Adobe people for TR. Propagate all recent nanojit-central changes to your local TM/TR repo. For tracemonkey, use the "make update-nanojit" target (it requires that Mercurial's "convert" extension be enabled; add "hgext.convert =" to your .hgrc file under "[
extensions]"). For tamarin, use the update-nanojit.sh script. Note that updating will clobber the contents of the nanojit/ directory in your private TM/TR repo. It will also generate a commit that updates the nanojit-import-rev file in your target repository; this file records which commits have been copied over from nanojit. Build and test the changes. In the easy case, you'll have a consistent TM/TR ...
Plug-n-Hack Phase1 - Archive of obsolete content
rposes, Ringleader (the Firefox addon implementation of the browser component) allows you to set a preference to relax or disable origin checks. The preference is ringleader.check.origin This can be set to 'off' to disble origin checks completely, or 'noport' to disable only port checks. ...
Plug-n-Hack - Archive of obsolete content
Overview Plug-n-Hack (PnH) is a proposed standard from the Mozilla security team for defining how security tools can interact with browsers in a more useful and usable way. Security researchers commonly use security tools in conjunction with browsers, but until now direct integration has required writing platform and browser specific
extensions. Configuring a browser to work with a security tool can be a non-trivial process, and this can discourage people with less experience from using such tools. This can include application developers and testers, exactly the sort of people we would like to use these tools more! For example, to configure a browser to use an intercepting proxy that can handle HTTPS traffic, the user must typically: Configure their browser to proxy via the tool Configu...
Prism - Archive of obsolete content
lications running in a normal browser). It should be possible for developers to include Prism-style extension directly in their web app. We would like to harmonize our API with those of similar projects such as Adobe AIR and Google Gears. Operating-system integration: Binary components provided access to OS-specific features like shortcut creation and dock/tray icons. We intend to propose these
extensions for inclusion in future versions of XULRunner. Firefox extension: A Firefox extension, code-named "Refractor", can be used to spin out new Prism apps from inside the web browser. Refractor adds a new menu item to call up the shortcut creation dialog for inside Firefox. Web apps can also point to a complete web app bundle or some elements of a web app (like higher resolution icons). Refractor au...
Safely loading URIs - Archive of obsolete content
I string to some other API like window.open or <img src="">, passing a URI object to an API that loads URI objects, etc.) use whichever method best fits the data you can get your hands on. If you have a choice as to what data you have, prefer checkLoadURIWithPrincipal to checkLoadURI and prefer checkLoadURI to checkLoadURIStr. Note that checkLoadURIWithPrincipal is not scriptable in Gecko 1.8, so
extensions are not able to use it. Changes in Gecko 1.9 A key security change in Gecko 1.9 is the addition of the new security.fileuri.strict_origin_policy preference. This Boolean preference, which defaults to true, can be set to false if the user doesn't want to strictly enforce the same origin policy on file: URIs. See Same-origin policy for file: URIs for details. ...
Table Layout Regression Tests - Archive of obsolete content
also known as regressions. It is good style to check for these unwanted regressions and fixing them before checkin rather than causing Bugzilla avalanches. Prerequisites In order to run these tests, you will need to have: Make sure that your build is a debug build (in short you need ac_add_options --enable-debug in your .mozconfig file). to build the layoutdebugger itself, build either all
extensions or include layoutdebug in your .mozconfig file. For example ac_add_options --enable-
extensions=all. a Mozilla tree with the test files at %MOZ_SRC%/layout/html/tests, DISABLE_TESTS should not be defined (so ac_add_options --enable-tests), patience and time. Test Runs Go to the %MOZ_SRC%/layout/html/tests/block directory. Avoid the nasty assertions to pop up by set XPCOM_DEBUG_BREAK=warn, ...
Actionscript Acceptance Tests - Archive of obsolete content
e inheritClass.as test, the files in inheritClass will be included: java -jar asc.jar -import builtin.abc -in shell.as -in inheritClass/a.as -in inheritClass/b.as inheritClass.as Additional files required by a test: If a test requires additional files to run, but are not to be included when compiling, a testname_support directory can be created. The directory name should not include any testname
extensions. Any .as files in this directory will be compiled, but will not be run by the harness. Note that if you have .as files in the _support dir, they will be compiled as if they are regular tests. If you do not wish to have shell.as included when compiling, you must create a dir.asc_args file with an override parameter: # the following line will override all compile arguments and just compile a .as ...
Venkman Introduction - Archive of obsolete content
ical examples in the articles that follow this one. The best way to get to know Venkman, of course, is to play around with it -- to set it up in the way that makes the most sense to you, to try loading scripts and setting breakpoints, evaluating expressions in the Interactive Session View, watching the values of variables as they change when scripts are executed, getting profile data. Debugging
extensions Although at first glance it might seem that Venkman cannot debug
extensions, doing so is in fact fully supported; it's just disabled by default. To debug your extension with Venkman (XUL files and their attached JS files), you'll have to load browser and extension files into Venkman by unchecking Debug > Exclude Browser Files. Resources Using Breakpoints in Venkman -- next article about Ven...
Using Breakpoints in Venkman - Archive of obsolete content
e of these dots in the Source Code View will set a breapoint at that line. Venkman will stop BEFORE 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 sto...
Video presentations - Archive of obsolete content
This article is a jumping-off point to help you find those presentations. Architecture These presentations provide an architectural overview of the codebase. How pages are built using the DOM This presentation describes how documents are loaded and the DOM tree is constructed. ...
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? An installer package is an archive file (called xpi--pronounced "zippies"--because of its .xpi
extensions) in Phil Katz zip format. It contains some files to be installed and the install script, usually named install.js, which contains JavaScript directives for actions to take during an install including adding files and directories, removing old or obsolete files and directories, executing command line tools, etc. To learn more about the XPInstall and installer packages please refer to The Annotated Browser XPI Installer and the XPInstall API Reference. What do we mean by engine code? The XPInstall engine processes installer packages by read...
XTech 2005 Presentations - Archive of obsolete content
so underway "under the hood" on a new unified graphics architecture that uses 3D graphics processors to accelerate all rendering. This work provides additional benefits to Web developers such as the ability to apply SVG effects to HTML content. Extending Gecko with XBL and XTF - Brian Ryner This session explored ways to extend Mozilla/Firefox to handle new XML tags and namespaces via drop-in
extensions to the layout engine. XUL - Mozilla's XML User Interface Language - Ben Goodger Ben Goodger, lead engineer for Mozilla Firefox, talked about XUL, Mozilla's XML User Interface toolkit. ...
XTech 2006 Presentations - Archive of obsolete content
ation demonstrates the convergence of rich-client and web application development and discuss application deployment using Mozilla XULRunner. Etna, a WYSIWYG XML RELAX NG- and Gecko-based editor - Daniel Glazman This presentation describes Etna, a new Wysiwyg XML editor based on Gecko, the RELAX NG parser and validator Disruptive Innovations implemented for it and its Query API, and RELAX NG
extensions that were necessary to solve very old and well known problems in markup languages. An HTML version of the paper is available here. ...
Building accessible custom components in XUL - Archive of obsolete content
es can "read" a web page and know how to present these complex controls to the end user. This has all been well-documented for some time. However, it is less well-known that the same DHTML Accessibility techniques can be applied to XUL, Mozilla's XML markup language for building user interfaces. (The Firefox interface itself is built in XUL, as well as the graphical interface presented by Firefox
extensions.) XUL itself has a much richer set of built-in controls than HTML. 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 equall...
findbar - Archive of obsolete content
For example, the standard findbar in Firefox 3.5 looks like this on the Mac: You may attach a findbar to a particular browser element by either setting the findbar's browserid attribute to the ID of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself. ...
Providing Command-Line Options - Archive of obsolete content
See also: XULRunner:CommandLine Overview The code below is an example of writing a JavaScript XPCOM component to handle command line parameters. You can learn more about how the command line is interpreted by looking at the documentation for the nsICommandLine interface. Example The below example component implements two command line parameters: firefox.exe -myapp Opens a chrome window for My Application. firefox.exe -viewapp url Opens a chrome window for My Application and passes it an nsIURI object. ...
Introduction - Archive of obsolete content
ggregation'. This can be quite a useful feature and works regardless of the datasource. For instance, you might use the built-in bookmarks datasource which holds the user's browser bookmarks and use your own datasource to add custom data about those bookmarks. <vbox datasources="rdf:bookmarks http://www.xulplanet.com/ds/sample.rdf"> In addition, when using the RDF type for chrome XUL (such as in
extensions), the datasource rdf:local-store is always included in the composite. The local store is a datasource which is usually used to hold state information such as window sizes, which columns in a tree are showing, and which tree items are open. You can query for any data in the local store in a template though this is rarely done. Sometimes, you will want to specify the datasource to be used later, po...
Creating a Skin - Archive of obsolete content
obal directory rather than in individual style files. This includes colors, fonts and general widget appearances. If you change the color of something in a local skin file (such as findfile.css), the dialog may look odd if the user changes their global skin. Don't expect the user to be using the default one. Our Find files example with this skin: Source View Stylesheet See also Mozilla CSS
extensions CSS reference The next section discusses how to make a XUL application localizable. << PreviousNext >> ...
Install Scripts - Archive of obsolete content
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. ...
Localization - Archive of obsolete content
dd text for a new language all you need to do is create another DTD file. By using the chrome system to add the DTD file to a different locale, the same XUL file can be used in any language. Find files example so far: Source Next, we'll look at property files. << PreviousNext >> See Also How to localize html pages, xul files, and js/jsm files from bootstrapped add-ons: Bootstrapped
Extensions :: Localization (L10n) ...
RDF Datasources - Archive of obsolete content
http://home.netscape.com/NC-rdf#Content-Length The length of the file. LastModifiedDate http://home.netscape.com/NC-rdf#LastModifiedDate The date that URL was last modified. extension http://home.netscape.com/NC-rdf#extension The extension of the file, including the period. This property is only available on platforms that use file
extensions. Possible Files Roots NC:FilesRoot Top level of the filesystem (usually the list of drives) A file URL By using a file URL for the ref attribute, you can select a specific directory to be returned. For example, you might use file:///windows or files:///usr/local. The files datasource is an example of a datasource that de...
Skinning XUL Files by Hand - Archive of obsolete content
t-weight: bold; } Pseudo-classes reflect states of the element: when the mouse moves over a button, for example, the appropriate pseudo-class stylesheet rules are applied. The parent-child relationship is more economical than the aforementioned contextual subgrouping, which searches the entire subtree of an element for the subelement. Finally, Mozilla provides some special
extensions to the Cascading Style Sheets specification that allow even more control over the way that XUL is skinned within the browser. On to the actual global.css file: After some comments, the CSS file contains basic style information for the <window> and <dialog> elements. After these, the global skin defines styles for some of the XUL widgets: statusbar, statusbarpanel and so on. Most widgets have the...
The Chrome URL - Archive of obsolete content
In the above example, the file browser.xul is selected. For messenger, messenger.xul would be selected. When creating your own applications, you will want to create a file for your main window with the same name as the package, so it can be referred to using this shorter form. This is convenient since all a user needs to know is the package name to be able to open the application. Of course, for
extensions that modify the browser interface, the user will not need to know the URL, as the extension will present itself in the UI. For a skin, the file <package name>.css is selected; for a locale, the file <package name>.dtd is selected. Remember, the chrome URL is not related to where it is located on disk. The first two pieces of the chrome URL are the package name and the part (either content, skin, ...
Toolbars - Archive of obsolete content
created just as easily by adding more toolbar elements after the first one. The toolbox is a container for toolbars. In some applications, you will have several toolbars along the top of the window. You can put them all inside a toolbox. You do not have to put toolbar elements inside a toolbox. Customizable toolbars Firefox or other Toolkit applications have customizable toolbars; therefore, many
extensions add their toolbar buttons to the toolbar palette, rather than adding them directly to the toolbar. For more information about customizable toolbars, see Creating toolbar buttons. Our find files example Let's add a toolbar to the find files dialog. We don't really need one but we'll add one anyway to demonstrate its use. Two buttons will be added, an Open button and a Save button. Presumably,...
Using multiple DTDs - Archive of obsolete content
e of the document (root) element. Assuming you have an entity called someButton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&someButton.label"> Multiple DTDs If you want to use multiple DTDs with your XUL file, you can simply list all of the DTDs inside your DTD declaration: <!DOCTYPE window [ <!ENTITY % commonDTD SYSTEM "chrome://my
extensions/locale/common.dtd"> %commonDTD; <!ENTITY % mainwindowDTD SYSTEM "chrome://myextension/locale/mainwindow.dtd"> %mainwindowDTD; ]> You can now access the entities declared in the DTDs as shown above. Assume you have an entity okButton.label defined in file common.dtd. Then accessing entities from both DTDs would look like this: <button id="somebutton" label="&someButton.label"> ... <button...
Using nsIXULAppInfo - Archive of obsolete content
This is not useful for scripts on webpages, which should continue using the navigator object when it's not possible to rely on feature-detection. nsIXULAppInfo interface To distinguish between different Mozilla-based applications, use the frozen nsIXULAppInfo interface. ...
Using the standard theme - Archive of obsolete content
e sheet only: <?xml-stylesheet href="chrome://myextension/skin/custom.css" type="text/css"?> Applying different custom style sheets depending on the selected theme Mozilla is able to automatically pick your custom style sheet depending on the theme currently chosen by the user. That is, depending on the theme currently selected by the user, you can provide different custom style sheets for your
extensions. For this to work, you need to create an approriate directory structure, with directory names corresponding to the names of the themes you want to extend, and of course, your adapted custom style sheets. For more information on how to do this, read about theming a custom toolbar button. Note that both approaches described above work with this automatic style selection. ...
XULBrowserWindow - Archive of obsolete content
mented methods. You may also wish to refer to the implementation of XULBrowserWindow in browser/base/content/browser.js. Method overview boolean hideChromeForLocation(in String aLocation); Attributes Attribute Type Description inContentWhitelist String[] An array of URL strings for which chrome is automatically hidden. Defaults to about:addons but
extensions can append specific URLs to the array. Methods hideChromeForLocation Determines whether or not browser chrome should be hidden for the specified location. By default, chrome is hidden for about:addons and any other pages in the in content whitelist. You can augment the functionality of this method using chaining in order to hide chrome for other locations. See Hiding browser chrome for d...
XUL element attributes - Archive of obsolete content
seful for custom elements implemented in XBL. The element should fire change, command, or input event when the value is changed so that the preference will update accordingly. See the pref system documentation for more information. querytype Type: string Indicates the type of datasource used in a template. Firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'.
Extensions may provide support for additional datasources. ref Type: URI For template-generated elements, this attribute is used to specify the root RDF node where content generation begins. This will correspond to the value of an about attribute on an RDF container. This attribute should be placed alongside the datasources attribute. removeelement Type: id When placed on an element in an ...
XUL accessibility tool - Archive of obsolete content
and other apps looking for bugs and fixing them. Improve tool along the way Add checking tool to DOM Inspector or other popular XUL debugging tools. Merge with other XUL checking tools -- this doesn't need to be a11y-specific. One problem is that Mark Finkle's XUL Validator tool uses a different engine. Add the tool into the addons.mozilla.org review process Go through the most useful/popular
extensions with tool and fix a11y issues Add checker to tinderbox so that bugs are caught at checkin time Some or all of this work could be done through grants, and a likely person to oversee the grant deliverables and milestones would be Mark Finkle. He has volunteered to take that on. ...
preferences - Archive of obsolete content
e [ Examples | Attributes | Properties | Methods | Related ] Overview <preferences> is a container for <preference> elements. It's supposed to be a child of <prefpane> element. <preferences> element should contain one or more <preference> elements. Note: it's not clear which of the following methods and properties are public. Examples <preferences> <preference id="pref_one" name="
extensions.myextension.one" type="bool"/> <preference id="pref_two" name="
extensions.myextension.two" type="string"/> ... etc ... </preferences> Attributes These ought to be readonly; three of these could be merged into a single member attribute nsIPrefService service; The preferences service. attribute nsIPrefBranch rootBranch; The root prefs branch. attribute nsIPrefBranch defaultBranch; ...
prefpane - Archive of obsolete content
more preferences ... </preferences> <checkbox label="Number one?" preference="pref_one"/> ... more UI elements ... </prefpane> Attributes helpURI Type: URI The URI of the help page associated with a preference panel. The URI will be opened using the help viewer when the help button is pressed. image Type: URI The URI ...
tabbrowser - Archive of obsolete content
tes | Properties | Methods | Related ] This element is used for holding a set of read-only views of Web documents. It is similar to the browser element, except that multiple documents can be displayed, each in a separate tab. Note: Starting in Firefox 3 (XULRunner/Gecko 1.9), this is only used in the main Firefox window and cannot be used in other XUL windows by third-party applications or
extensions. Attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handleCtrlPageUpDown, onbookmarkgroup, onnewtab, tabmodalPromptShowing Properties browsers, canGoBack, canGoForward, contentDocument, contentTitle, contentViewerEdit, contentViewerFile, contentWindow, currentURI, docShell, documentCharsetInfo, homePage, markupDocumentViewer, securityUI, sele...
toolbar - Archive of obsolete content
nformation is available in the XUL tutorial. Note: Starting in Gecko 1.9.1, toolbar items are moved from the toolbarpalette and added to the toolbar when a toolbar is first displayed. In earlier versions, a copy of each item was created and placed on the toolbar. This means that the palette now only contains items not already in the toolbar. This introduces a potential compatibility problem for
extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. Attributes autohide, currentset, customindex, customizable, defaultset, grippyhidden, grippytooltiptext, height, iconsize, mode, toolbarname Properties accessibleType, currentSet, firstPermanentChild, lastPermanentChild, toolbarName, toolboxid Methods insertItem Style classes chr...
XUL - Archive of obsolete content
lorer) Extension developer's extension (featuring a Live XUL Editor) XULRef sidebar Firebug DOM Inspector Spket IDE, IDE for XUL/XBL Ample SDK, (Cross-browser XUL renderer in JavaScript/HTML) View All... Related Topics JavaScript, XBL , CSS, RDF,
Extensions, XULRunner ...
XUL Application Packaging - Archive of obsolete content
d the application. REQUIRED Example: MinVersion=1.8 MaxVersion Specify the maximum XULRunner version needed by this application. OPTIONAL - default value is any XULRunner less than XULRunner 2 Example: MaxVersion=1.8.0.* The [XRE] section The XRE section specifies various features of XULRunner startup that can be enabled EnableExtensionManager Specifies whether to enable
extensions and extension management. Legal values are 1 and 0. OPTIONAL - default is 0 Note: This option does not add menu items that make the extension/theme manager available in the UI; that is the responsibility of the application author. Example: EnableExtensionManager=1 EnableProfileMigrator Specifies whether, when the application is launched for the first time and there are no profiles, ...
nsIContentPolicy - Archive of obsolete content
r implicitly). Due to various DOM0 things, this leads to item 4. If you do any of these things in your shouldLoad() implementation, expect unpredictable behavior, possibly including crashes, content not showing up, content showing up doubled, etc. If you need to 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 aCont...
2006-12-01 - Archive of obsolete content
ndows DDE Shell Integration removal A call for responses or concerns regarding the removal of the DDE Shell Integration. How do allow an internal web site to have UniversalBrowserWrite? A question regarding having an internal website use UniversalBrowserWrite on a local intranet. Developping microsummary generator Questions and discussion surrounding microsummaries in FF 2.0. Applying
extensions Question regarding the proper application of FF
extensions. Finding out how blur() works... Question regarding how to access the functionality that arises when window.blur() is called. FF2 not responding to click on link Concerns regarding FF 2.0 not responding to button or link clicks until the button or link is clicked a second time. Dual Screen browsing Discussion regarding browsi...
2006-09-06 - Archive of obsolete content
Summary: mozilla.dev.tech.xpcom - Oct 06-13, 2006 Announcements None during this week. Discussions Windows gecko-SDK and g++ components Discussion on the problems and possible solutions running cygwin/g++ compiled XPCOM components with Windows-based Gecko-SDK/XULRunner DLL/EXEs. Threading in XPCOM Rules on threading in XPCOM or to Firefox
extensions. How to build xpcom component on Mac OS X A tutorial on how to build xpcom component on Mac OS X Firefox crashes when calling a function provided by a .so library A solution to the problem loading a shared library when using xpcom Firefoxes crashes while getting url in XPCOM Solutions to resolve the problem of the firefox crash when trying to get the path and the prePath of the url of the current page in XPCOM Meetings None ...
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. ...
Newsgroup summaries - Archive of obsolete content
FormatMozilla.dev.apps.firefox-2006-09-29Mozilla.dev.apps.firefox-2006-10-06mozilla.dev.apps.calendarmozilla.dev.tech.js-enginemozilla-dev-accessibilitymozilla-dev-apps-calendarmozilla-dev-apps-firefoxmozilla-dev-apps-thunderbirdmozilla-dev-buildsmozilla-dev-embeddingmozilla-dev-
extensionsmozilla-dev-i18nmozilla-dev-l10nmozilla-dev-planningmozilla-dev-platformmozilla-dev-qualitymozilla-dev-securitymozilla-dev-tech-js-enginemozilla-dev-tech-layoutmozilla-dev-tech-xpcommozilla-dev-tech-xul ...
NP_GetMIMEDescription - Archive of obsolete content
NP_GetMIMEDescription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file. Each MIME type description should be separated by a semicolon (;). Each MIME type description contains the MIME Type, an
extensions list and a short description. One MIME type // example inside http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/plugin.cpp #define MIME_TYPE_DESCRIPTION "application/basic-plugin:bsp:Basic Example Plug-in for Mozilla" const char* NP_GetMIMEDescription(void) { return(MIME_TYPES_DESCRIPTION); } Two MIME types const char* NP_GetMIMEDescription(void) { return "application/basic-example-plugin:xmp1:Example 1;application/basic-example2-plugin...
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
is 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 be used for all add-ons including
extensions, themes and plugins. Plugin packages should only need to package a small set of files in the following structure in the xpi file: install.rdf plugins/ pluginlib.dll plugintypes.xpt The install.rdf file contains an install manifest that describes the plugin to the user. The library and scripting interfaces are held in the plugins directory. Platform-specific files Gecko 1.9.2 (Firefox 3.6...
The First Install Problem - Archive of obsolete content
ee below), but that key doesn't link suffixes to a particular mimetype. Example: [HKEY_LOCAL_MACHINE\Software\MozillaPlugins\]\@mycompany.com/MyApplication,version=5.01\MimeTypes\application/x-myapp] Suffixes=app Suffixes -- a subkey containing string values (REG_SZ) representing all the suffixes (3 digit
extensions) supported by this module. Example: [HKEY_LOCAL_MACHINE\Software\MozillaPlugins\]\@mycompany.com/MyApplication,version=5.01\Suffixes] Inside this subkey, string values might look like: app typ avi Note that these string values (REG_SZ) don't actually have values affiliated with them. "Description" -- string value describ...
SAX - Archive of obsolete content
For more information, please see SAX homepage. Quick start The SAX parser functionality is available through the XML reader component. ...
TCP/IP Security - Archive of obsolete content
such protection. While application layer controls can protect application data, they cannot protect TCP/IP information such as IP addresses because this information exists at a lower layer. Whenever possible, application layer controls for protecting network communications should be standards-based solutions that have been in use for some time. One example is Secure Multipurpose Internet Mail
Extensions (S/MIME), which is commonly used to encrypt email messages. Transport Layer. Controls at this layer can be used to protect the data in a single communication session between two hosts. Because IP information is added at the network layer, transport layer controls cannot protect it. The most common use for transport layer protocols is securing HTTP traffic; the Transport Layer Security (TLS) p...
Theme changes in Firefox 3 - Archive of obsolete content
> :not(#go-button) , #urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button { visibility: collapse; } Images to add Add the following images: chrome://global/skin/icons/information-16.png Used when presenting information notices. chrome://global/skin/icons/warning-16.png Used when displaying warnings. Images to remove The following images were removed: chrome://mozapps/skin/
extensions/question.png No longer used. Mac OS X Mac OS X themes for Firefox 3 should add these two rules to the end of chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:Xpx; } .wizard-label-box { display: none; } The numeric value ofX, the number of pixels of padding in .wizard-buttons-btm, should be the same as the value of the margin for .wizard-buttons-box-2. Image Changes chr...
Theme changes in Firefox 4 - Archive of obsolete content
e: #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 following structure : /My_Theme/chrome/browser/* /My_Theme/chrome/communicator/...
New in JavaScript 1.8.5 - Archive of obsolete content
rty descriptor for a named property on an object. bug 505587 Object.keys() Returns an array of all enumerable properties on an object. bug 307791 Object.getOwnPropertyNames() Returns an array of all enumerable and non-enumerable properties on an object. bug 518663 Object.prevent
Extensions() Prevents any
extensions of an object. bug 492849 Object.isExtensible() Determines if extending of an object is allowed. bug 492849 Object.seal() Prevents other code from deleting properties of an object. bug 492845 Object.isSealed() Determines if an obje...
ECMAScript 2015 support in Mozilla - Archive of obsolete content
otypeOf() (Firefox 31) Object.assign() (Firefox 34) Object.getOwnPropertySymbols() (Firefox 33) Additions to the Date object Date.prototype is an ordinary object (Firefox 41) generic Date.prototype.toString (Firefox 41) Date.prototype[@@toPrimitive] (Firefox 44) New Promise object Promise (Firefox 24, enabled by default in Firefox 29) New Proxy object Proxy (Firefox 18) prevent
Extensions() trap (Firefox 22) isExtensible() trap (Firefox 31) getPrototypeOf() and setPrototypeOf() traps (Firefox 49) New Reflect object Reflect (Firefox 42) Additions to the RegExp object RegExp sticky (y) flag (Firefox 38) RegExp unicode (u) flag (Firefox 46) generic RegExp.prototype.toString (Firefox 39) RegExp.prototype[@@match]() (Firefox 49) RegExp.prototype[@@replace]() (Firefox 49...
Old Proxy API - Archive of obsolete content
butes are determined by the given propertyDescriptor. The return value of this method is ignored. delete proxy.name delete: function(name) -> boolean Delete the named property from the proxy. The boolean return value of this method should indicate whether or not the name property was successfully deleted. Object.freeze(proxy) Object.seal(proxy) Object.prevent
Extensions(proxy) fix: function() -> PropertyDescriptor map (indexed on property names) | undefined Should return an object that maps property names to property descriptors. After a call to fix(), the proxy becomes a regular (non-proxy) object with the properties listed in the return value. The handler is no longer used. Moreover, the respective method (freeze(), seal(), or preventExtension()...
Standards-Compliant Authoring Tools - Archive of obsolete content
. Macromedia(TM) Dreamweaver(TM) CS6 Style Master and Layout Master by Western Civilisation Some caveats: It appears that tools currently available from Namo generate IE-specific or Netscape 4-specific code that may require extra debugging for compatibility with standards-based browsers. Newer versions of Microsoft FrontPage(TM) have improved, however be sure not to rely on FrontPage-specific
extensions for critical website content or functionality. Some versions of Microsoft Word create invalid HTML code that only works with Internet Explorer. Always be sure to validate your web pages. Original Document Information Last Updated Date: January 30th, 2003 Copyright (C) 2001-2003 Netscape. All rights reserved. Related links Validators HTML Central ...
Developing Mozilla XForms - Archive of obsolete content
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. ...
Implementation Status - Archive of obsolete content
These can be found on the Mozilla XForms Specials page. Specification Chapter Index Here we give an overview of XForms 1.1 specification chapters and the current status of the Mozilla support. The sections are marked with their current status: Supported, partial support, in progress, and not currently supported. We have listed the most relevant bugs here, but check out the Bugzilla XForms buglist for the complete list. 3. ...
Archived open Web documentation - Archive of obsolete content
sing how to create and use private variables in objects, which is great if you want to protect the various properties within an object from being poked at accidentally. I also just read a document on proper inheritance using apply(). Well if you combine the two, you can have inherited private variables: Scope Cheatsheet JavaScript with Mozilla
extensions has both function-scoped vars and block-scoped lets. Along with hoisting and dynamic behavior, scope in JavaScript is sometimes surprising. Server-Side JavaScript Here's a radical idea: Use one language to write entire Web apps -- the same language which billions of web pages already use, every day. Sharp variables in JavaScript A sharp variable ...
The Business Benefits of Web Standards - Archive of obsolete content
ata and render it slightly differently). Using valid, standards-compliant markup ensures that data will still be re-usable for a long time, as specifications on how to parse the standard formats are well documented and here to stay. Contrary to popular belief, coding to standards does not mean producing less compelling content. As a matter of fact, almost anything taking advantage of proprietary
extensions can be done in a standards-compliant way, with the added benefit of being cross-platform and future-proof. By ensuring that all of the digital content owned by the operator is marked up in a consistent and standards compliant way, the content base becomes a perennially reusable asset without any additional costs in the future. Extensibility Using strict HTML and separating structure from conte...
CardDAV - MDN Web Docs Glossary: Definitions of Web-related terms
CardDAV (vCard Extension to WebDAV) is a protocol standardized by the IETF and used to remote-access or share contact information over a server. Learn more General knowledge CardDAV on Wikipedia Technical reference RFC 6352: vCard
Extensions to Web Distributed Authoring and Versioning (WebDAV) ...
WebKit - MDN Web Docs Glossary: Definitions of Web-related terms
s, but many individuals and companies have since contributed (including KDE, Apple, Google, and Nokia). WebKit is an Apple trademark, and the framework is distributed under a BSD-form license. However, two important components fall under the LGPL: the WebCore rendering library and the JavaScriptCore engine. Learn more General knowledge WebKit on Wikipedia Technical reference WebKit CSS
extensions ...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
nguage); } switch (parse) { case 'text': // Priority should be on media type: var contentType = request.getResponseHeader('Content-Type'); //text/xml; charset="utf-8" // Send to get headers first? // Fix: We test for file
extensions as well in case file:// doesn't return content type (as seems to be the case); can some other tool be uesd in FF (or IE) to detect encoding of local file? Probably just need BOM test since other encodings must be specified var patternXML = /\.(svg|xml|xul|rdf|xhtml)$/; if ((contentType && contentType.match(/[text|application]\/(.*)\+?xml/)) ...
MDN Web Docs Glossary: Definitions of Web-related terms
URN Usenet User agent UTF-8 UX V Validator Value Variable Vendor Prefix Viewport Visual Viewport VoIP W W3C WAI WCAG Web performance Web server Web standards WebAssembly WebDAV Web
Extensions WebGL WebIDL WebKit WebM WebP WebRTC WebSockets WebVTT WHATWG Whitespace World Wide Web Wrapper X XForms XHR (XMLHttpRequest) XHTML XInclude XLink XML XPath XQuery XSLT Other ...
Dealing with files - Learn web development
ate a folder called styles, inside your test-site folder. scripts folder: This folder will contain all the JavaScript code used to add interactive functionality to your site (e.g. buttons that load data when clicked). Create a folder called scripts, inside your test-site folder. Note: On Windows computers, you might have trouble seeing the file names, because Windows has an option called Hide
extensions for known file types turned on by default. Generally, you can turn this off by going to Windows Explorer, selecting the Folder options... option, unchecking the Hide
extensions for known file types check box, then clicking OK. For more specific information covering your version of Windows, you can search on the web. File paths To make files talk to one another, you have to provide a file path...
Use JavaScript within a webpage - Learn web development
Let users initiate interactions. That means, don't update content, redirect, or refresh automatically. Don't use carousels or display popups without warning. Have a plan B for users without JavaScript. People may have JavaScript turned off to improve speed and security, and users often face network issues that prevent loading scripts. Moreover, third-party scripts (ads, tracking scripts, browser
extensions) might break your scripts. At a minimum, leave a short message with <noscript> like this: <noscript>To use this site, please enable JavaScript.</noscript> Ideally, replicate the JavaScript functionality with HTML and server-side scripting when possible. If you're only looking for simple visual effects, CSS can often get the job done even more intuitively. Since almost everybod...
What’s in the head? Metadata in HTML - Learn web development
. Instead of pointing to an external script file, you can also choose to put your script inside the <script> element. Active learning: applying CSS and JavaScript to a page To start this active learning, grab a copy of our meta-example.html, script.js and style.css files, and save them on your local computer in the same directory. Make sure they are saved with the correct names and file
extensions. Open the HTML file in both your browser, and your text editor. By following the information given above, add <link> and <script> elements to your HTML, so that your CSS and JavaScript are applied to your HTML. If done correctly, when you save your HTML and refresh your browser you should be able to see that things have changed: The JavaScript has added an empty list to the page. Now whe...
Introduction to events - Learn web development
see Test your skills: Events. Conclusion You should now know all you need to know about web events at this early stage. As mentioned, events are not really part of the core JavaScript -- they are defined in browser Web APIs. Also, it is important to understand that the different contexts in which JavaScript is used have different event models -- from Web APIs to other areas such as browser Web
Extensions and Node.js (server-side JavaScript). We are not expecting you to understand all of these areas now, but it certainly helps to understand the basics of events as you forge ahead with learning web development. If there is anything you didn't understand, feel free to read through the article again, or contact us to ask for help. ...
Properly configuring server MIME types - Learn web development
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 header for each document. If you're using the Apache web server, simply copy this sample .htaccess file to the directory that contains the files that you want to send with the corr...
Client-Server Overview - Learn web development
https://developer.mozilla.org/profiles/hamishwillee Keep-Alive: timeout=5, max=1000 Connection: Keep-Alive X-Frame-Options: DENY X-Cache-Info: not cacheable; request wasn't a GET or HEAD Content-Length: 0 Note: The HTTP responses and requests shown in these examples were captured using the Fiddler application, but you can get similar information using web sniffers (e.g. Websniffer) or browser
extensions like HttpFox. You can try this yourself. Use any of the linked tools, and then navigate through a site and edit profile information to see the different requests and responses. Most modern browsers also have tools that monitor network requests (for example, the Network Monitor tool in Firefox). Static sites A static site is one that returns the same hard coded content from the server whenever ...
Handling common accessibility problems - Learn web development
en't good enough to solve all your accessibility problems on their own. You'll need a combination of these, knowledge and experience, 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 framework...
Strategies for carrying out testing - Learn web development
the question mark button a few times on your touch screen device. Toggling the button should make the information box appear/disappear. Does it do this, in each of the above three cases? Is the text readable? Does the information box animate smoothly as it appears/disappears? When running tests, it can also be a good idea to: Set up a separate browser profile where possible, with browser
extensions and other such things disabled, and run your tests in that profile (see Use the Profile Manager to create and remove Firefox profiles and Share Chrome with others or add personas, for example). Use browser's private mode functionality when running tests, where available (e.g. Private Browsing in Firefox, Incognito Mode in Chrome) so things like cookies and temp files are not saved. These steps...
Command line crash course - Learn web development
d connects to a shell. A shell is your session and session environment (where things like the prompt and shortcuts might be customised). The command line is the literal line where you enter commands and the cursor blinks. Do you have to use the terminal? Although there's a great wealth of tools available from the command line, if you're using tools like Visual Studio Code there's also a mass of
extensions that can be used as a proxy to using terminal commands without needing to use the terminal directly. However, you won't find a code editor extension for everything you want to do -- you'll have to get some experience with the terminal eventually. Basic built-in terminal commands Enough talk -- let's start looking at some terminal commands! Out of the box, here are just a few of the things the c...
Introducing a complete toolchain - Learn web development
ed to build and deploy a mini site that lists data (taken from one of NASA's open APIs) concerning potentially hazardous space objects that threaten our existence on Earth! It looks like this: You can see a live version of the site at near-misses.netlify.com. Tools used in our toolchain In this article we're going to use the following tools and features: JSX, a React-related set of syntax
extensions that allow you to do things like defining component structures inside JavaScript. You won't need to know React to follow this tutorial, but we've included this to give you an idea of how a non-native web language could be integrated into a toolchain. The latest built-in JavaScript features (at time of writing), such as import. Useful development tools such as Prettier for formatting and eslint ...
Client-side tooling overview - Learn web development
on that you can use to figure out whether it does what you need it to do. Based on these criteria, the date-fns library looks like a good date formatting tool to use. You'll see this tool in action and learn more about package managers in general in Chapter 3 of this module. If you are looking for a plugin to integrate tool functionality into your code editor, look at the code editor's plugins/
extensions page -- see Atom packages and VSCode
extensions, for example. Have a look at the featured
extensions on the front page, and again, try searching for the kind of extension you want (or the tool name, for example search for "eslint" on the VSCode
extensions page). When you get results, have a look at information such as how many stars or downloads the extension has, as an indicator of its quality. ...
Information for users
any special features and keyboard shortcuts designed to help users with disabilities. Please check the Accessibility help topic for more information. Firefox Accessibility Features This page defines most of the accessibility features possible in Firefox. Features include assistive technology support on Windows (like Window-Eyes, JAWS, etc.), Firefox keyboard support, available accessibility
extensions like Fire Vox and other
extensions. Assistive Technology Compatibility This is a wiki page which users can edit to provide up to date information on any issues related to compatibility with assistive technologies such as screen readers, screen magnifiers, voice input software and on screen keyboards. Planning Ahead for Accessibility This document is intended to help testers and designer...
Theme concepts
These theme options can be implemented as static themes (although the theme images themselves may be animated) or as dynamic themes created in a browser extension. If you have a lightweight theme it will be converted to this new theme format automatically before lightweight themes are deprecated. You do not need to port your theme. However, please feel free to update your themes to use any of the new features described here. ...
Themes
me concepts Get an introduction to creating themes for the latest versions of Firefox Using the AMO theme generator Use the theme generator to create and submit a new theme to AMO Lightweight Themes Lightweight themes have been deprecated and are no longer accepted by AMO. Only browser themes will be accepted going forward. Tools & Resources Browser theme manifest.json keys Browser
extensions theme API Discourse forum Theme related blog posts Archived resources ...
Adding a new word to the en-US dictionary
pointing out situations where perfectly legitimate words are missing from the English spell check dictionary in Firefox. This article describes the process for adding a word to the dictionary. The process is pretty straight-forward: Get a clone of UXP, if you don't already have one, and make sure you can build it successfully. Get into the dictionary sources directory using this command: cd
extensions/spellcheck/locales/hunspell/dictionary-sources There's a special script used for editing dictionaries. The script only works if you have the environment variable EDITOR set to the executable of an editor program; if you don't have it set, you can do EDITOR=vim sh edit-dictionary to edit using vim (or you can substitute some other editor), or you can just do sh edit-dictionary if you have an EDI...
Choosing the right memory allocator
lot of different memory allocators in the Mozilla source tree. This article looks over some of them and tries to sort out which should be used under what circumstances. Allocating memory in XPCOM These are general purpose memory-management routines that you should use unless your code falls into one of the other categories below. Use these if you link against XPCOM or XPCOM Glue; this includes
extensions with binary components. See the XPCOM string guide for additional information. NS_Alloc() == nsIMemory::alloc() NS_Realloc() == nsIMemory::realloc() NS_Free() == nsIMemory::free() nsMemory::Clone() (note: not part of nsIMemory) See Infallible memory allocation for information about how to allocate memory infallibly; that is, how to use memory allocators that will only return valid memory ...
Command line options
Same as above, but for themes. You must have administrative privileges. Note: Since Firefox 2.0.0.7, use of the -install-global-extension and -install-global-theme command line arguments have been restricted to only allow installing add-ons that are on local disks or mapped drives. Installing from a network share directly will no longer succeed. -safe-mode Launches the application with all
extensions disabled, for that launch only (
extensions are not loaded, but are not permanently disabled in the extension manager data source). Remote control -remote remote_command This feature was removed in Firefox 36.0, restored in 36.0.1 and removed again in 39.0. See bug 1080319. Execute the specified remote_command in an already running application process. firefox -remote "openURL(www.mozilla...
Creating a Firefox sidebar
Web publishers can offer visitors a Firefox sidebar to 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. An extension An extension is a kind of add-ons that adds new functionalities to Firefox. There is a wide range of
extensions available, and some of them provide a sidebar. Such kind of sidebar can be a simple Web panel or a full-featured extension that is completely integrated with the browser. There are some ways to create an extension: The new sidebar API has been implemented in Firefox 29 as part of the Add-on SDK. It's the easiest way to create an extension with a sidebar.Obsolete since Gecko 57 You can also build a restartless extension yourself without the...
Creating a Login Manager storage module
This can be useful if you want to integrate a gecko application's password management with an existing password management system, or use 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. If you just want to use the Login Manager in your
extensions, refer to the article Using nsILoginManager. Overriding the built-in Login Manager storage consists of two tasks: Implement the nsILoginManagerStorage interface. Register that interface in a specific category. ...
Simple Instantbird build
tasks. See the mach article for more. Building can take a significant amount of time, depending on your system, OS, and chosen build options. Linux builds on a fast box may take under 15 minutes, but Windows builds on a slow box may take several hours. Building purplexpcom and libpurple First download the purplexpcom code: hg clone http://hg.mozilla.org/users/florian_queze.net/purple mozilla/
extensions/purple If you've set up your build environment as above, then all you need to do is: echo 'ac_add_options --enable-
extensions=purple' >> .mozconfig in the comm-central directory, or just add the ac_add_options --enable-
extensions=purple line to your .mozconfig with your favorite editor. Then just re-run the mach command above (you may need to clobber (see below), or you can do the addition b...
Creating Custom Events That Can Pass Data
ing on the data passed along with this event, you want Firefox to react differently. Note that starting with version 6, Firefox supports DOM Level 3 customEvent, which lets you dispatch custom events with arbitrary data from JavaScript. (see bug 427537) Requirements In order to do this you must be able to do all of the following: Download Mozilla Source Code Build Mozilla Creating Custom Firefox
Extensions with the Mozilla Build System. This is the foundation for everything we'll do. What's in a name Despite whatever you may have been taught in your English class, there's a lot in a name when it's an event name. As of Gecko 1.8, if your event names do not start with "nsDOM" and their interfaces do not start with "nsIDOM" then you can forget about passing data. You will still be able to throw event...
Gecko Logging
al time or get logs immediately before crash. raw Print exactly what has been specified in the format string, without the process/thread/timestamp, etc. prefix. timestamp Insert timestamp at start of each log line. rotate:N This limits the produced log files' size. Only most recent N megabytes of log data is saved. We rotate four log files with .0, .1, .2, .3
extensions. Note: this option disables 'append' and forces 'timestamp'. For example, if you want to specify "sync", "timestamp" and "rotate": set MOZ_LOG="example_logger:3,timestamp,sync,rotate:10" To adjust the logging after Firefox has started, you can set prefs under the logging. prefix. For example, setting logging.foo to 3 will set the log module foo to start logging at level 3. The special b...
Multiple Firefox profiles
fferent 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 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 triagi...
Message manager overview
These processes run web content. Message managers are designed to enable chrome-privileged JavaScript code in one process to communicate with chrome-privileged JavaScript code in a different process. This article describes the different types of message manager, how to access them, and at a high level, what sorts of things you can use them for. ...
Message manager overview
Different tabs may run in different processes. Message managers are designed to enable code in one process to communicate with code in a different process. ...
Browser API
Firefox desktop (version 47 and above). Browser API concepts and usage The Browser API consists of two major parts: Custom <iframe> attributes: By adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content. This means that window.top, window.parent, window.frameElement, etc. should not reflect the frame hierarchy. API
extensions: The API includes several new methods and events to manipulate and listen for changes to the embedded content's state, interited by the HTMLIFrameElement interface. Browser API interfaces To support the requirement of a browser <iframe>, the HTMLIFrameElement DOM interface has been extended with new methods that give the <iframe> some super powers. Navigation methods The following navigation...
Overview of Mozilla embedding APIs
gress 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: nsIURIContentLi...
Gecko SDK
Gecko versions 2.0 and higher, you must recompile your component for each release as cross-version compatibility is no longer supported. In addition to the below versions, you can find other versions (including Beta) here: Xulrunner Releases (files include "sdk" in the name). The SDK follows the same release schedule as Firefox/Thunderbird. Once the SDK enters Beta, it is suitable for building
extensions; your component should work with release builds of the SDK without any modifications. Due to the Rapid Release process, it may be a good idea to target the SDK in Beta. Download Link Latest Gecko (Latest Firefox) Gecko 1.9.2 (Firefox 3.6) Gecko 1.9.1 (Firefox 3.5) Gecko 1.9 (Firefox 3.0) Gecko 1.8 (Firefox 1.5 and 2.0) Windows Download Download Download...
Script security
another, and what access is allowed cross-origin, are now mostly standardized across browsers. Gecko has an additional problem, though: while its core is written in C++, the front-end code is written in JavaScript. This JavaScript code, which is commonly referred to as chrome code, runs with system privileges. If the code is compromised, the attacker can take over the user's computer. Legacy SDK
extensions also run with chrome privileges. Having the browser front end in JavaScript has benefits: it can be much quicker to develop in JavaScript than in C++, and contributors do not need to learn C++. However, JavaScript is a highly dynamic, malleable language, and without help it's difficult to write system-privileged code that interacts safely with untrusted web content. From the point of view of chr...
How test harnesses work
gathers the tests (manifestdestiny) potentially sets up an HTTP server for test data (mozhttpd) 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 investigate Disconnect failures
ent > Event Viewer > 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. ...
Integrated Authentication
ntication protocols supported by the operating system. SPNEGO is commonly referred to as the "negotiate" authentication protocol. Mozilla does not have its own internal implementation of SPNEGO. Instead, it leverages system libraries that provide SPNEGO; SSPI on Microsoft Windows, and GSS-API on Linux, Mac OSX, and other UNIX-like systems. The Mozilla implementation of SPNEGO can be found under
extensions/auth/. It used to live in
extensions/negotiateauth. Mozilla also supports raw NTLM authentication using an internal implementation (based on the documentation provided by Eric Glass) that supports NTLMv1/LMv1 and NTLM2 Session Key modes. As of Mozilla 1.7, there is no support for NTLMv2/LMv2. This is mainly due to the fact that NTLMSSP does not provide a means to negotiate use of NTLMv2/LMv2. <i...
JavaScript-DOM Prototypes in Mozilla
er Function) src (getter and setter Functions) getElementsByTagName (Function) TEXT_NODE (Number property, constant) ... All those properties come from the interfaces that the C++ image object (nsHTMLImageElement) implements and chooses to expose to XPConnect through the object's class info. One of these interfaces is nsIDOMHTMLImageElement, others are nsIDOMNSHTMLImageElement (Netscape
extensions to the standard interface), nsIDOMEventTarget, nsIDOMEventListener, nsIDOM3Node, and so on. The prototype object that XPConnect creates for the classes that have class info are shared within a scope (window). Because of this, the following holds true (assuming img1 and img2 are two different image objects in the same document): img1.__proto__ === img2.__proto__ If img1 would come from one doc...
PopupNotifications.jsm
code module into your JavaScript scope: Components.utils.import("resource://gre/modules/PopupNotifications.jsm"); Once you've imported the module, you can then use the PopupNotifications object it exports; this object provides methods for creating and displaying popup notification panels. Note: This code module is imported by Firefox chrome windows, so you don't have to do it yourself in most
extensions. Method overview void locationChange(); Notification getNotification(id, browser); void remove(notification); Notification show(browser, id, message, anchorID, mainAction, secondaryActions, options); Properties Attribute Type Description isPanelOpen Boolean Returns true if the notification panel is currently visible, fals...
JavaScript code modules
General topics Using JavaScript code modules An introduction to how to use JavaScript code modules. Components.utils.import How to import a JavaScript code module. ...
Application Translation with Mercurial
le system to the file and open it in your favorite text editor. Windows users can use e.g. Notepad++. Paste the following content into the file: [ui] username = Firstname Lastname <mynick@example.com> merge = internal:merge [alias] qexport = export -g -r qtip qexportall = diff -r qparent [defaults] commit = -v diff = -p -U 8 qdiff = -p -U 8 qnew = -U [diff] git = 1 showfunc = 1 unified = 8 [
extensions] hgext.mq = progress = [hooks] Put in your name and email address which later will be public on the internet after your translation patch got accepted and uploaded. Save the file and close it. Enabling Mercurial queues (revertable patches) Some time will pass between the moment in which you start the localization, finish it, test it, improve it, upload it for review and get review (maybe no...
L10n Checks
other locales instead of the directory containing the source by setting the -l parameter (useful for e.g. "KompoZer"), e.g.: check-l10n-completeness -l browser/locales/l10n.ini ../l10n/ de Compare every directory In the source mode you can tell L10n Checks to compare every directory, not only the ones set in the all-locales file, by setting the -f parameter (useful for e.g. ...
Localizing extension metadata on addons.mozilla.org
. Getting translation help You are kindly advised NOT to use any automatic online translation, which can bring unpleasant low-quality output to users. Always prefer a qualified human translation. AMO doesn't directly provide translation assistance to extension authors, but there are a couple services that can help: BabelZilla.org BabelZilla.org is a community dedicated to the localization of
extensions for Moz family apps. They are volunteer translators from all over the world and are maintaining translations for more than 400
extensions with an online translation system. They also provide help for adding a localization support to your extension if there is no localization structure yet. You can already request for AMO fields localization on the forums, and these fields will be added soon to th...
Localizing with Mercurial
ting L10n patches of your work for someone else to commit to your remote L10n repo on the Mozilla servers. Doing this ensures that your dashboards are always accurate, as they look at your remote repo. Here's how to create a L10n patch with Hg and the Mq extension: Enable Mq by adding hg.ext = to your Mercurial config file (~/.hgrc on Unix-like systems or Mercurial.ini on Windows) under the [
extensions] section. Open your command line tool and navigate to your L10n directory. Inside your L10n directory, init your repo with Mq by running hg init --mq. To create a new patch, run hg qnew -m "Your commit message" patch-name.patch. The commit message should take the form of "Bug 123456 - Change this thing to work better by doing something; r=reviewers" if you are to fix a bug. Make your change. ...
Localization formats
Warning: This document pertains to the development of Mozilla web sites and not to the development of Gecko-based
extensions or applications. There are 4 main approaches to web l10n with regards to the choice of technology used for localization logic: HTML/PHP .lang gettext (.po) wiki (TBD) The choice of the filetype depends on a couple of factors: How much content is there to be localized? How often, if at all, the site will be updated after the launch? Is this a long-term project with continuous updates to content? Is this a long-term project with stable content? Is this a short-term project? Will the content differ per locale? If so, to what extent? As every new web-dev project takes shape, a project manager should ask themselves these questions and ...
gettext
Plurals gettext lets you define and use singular and plural forms of a string. To take advantage of this functionality, you need to use a different keyword (i.e. different gettext function name) for string which are supposed to support plurals. For instance, in PHP the default keyword for regular messages is gettext() and _(). For messages with plural support, the default keyword is ngettext(). ...
Mozilla external string guide
The Mozilla codebase used to have a notion of "external" strings, which were the string classes visible to code outside of the Mozilla codebase (
Extensions, XULRunner applications, and embedders). These classes were removed a long time ago. The only remaining string classes are the "internal" ones, which are documented XPCOM Guide Internal strings. ...
Preferences
eferences for uber-geeks A guide to preferences that only truly elite geeks should play with. Examples Code snippets Preference-related code snippets. Adding preferences to an extension How to add preferences to an existing extension. Related Topics XUL, JavaScript, XPCOM,
Extensions, Developing Mozilla ...
Patches and pushes
ow each tag functions, visit the OpenSearch wiki page and the MozSearch wiki page. The pages are old (I mean, Firefox 2???), but still accurate. Each plugin has an icon image which is linked within the XML file as an URI ID. Upload your plugins icon image to Data Kitchen to obtain its URI ID and add to the XML file within the Image tag. In list.txt, add the search plugin's XML filename (without
extensions) on a new line and save. Note that if your team selects a local version of an already default plugin (e.g., Wikipedia), the XML filename should include the locale code (e.g., Wikipedia-es). Create a patch of the searchplugins directory by entering the following command in your command-line tool, where mypatch.diff is where you give your patch a name: $ hg add mozilla/browser/searchplugins/ $ hg...
Profile Manager
nd 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. ...
McCoy
This is in the form of the public part of a cryptographic key included in the original add-on you release. ...
NSS_3.11.10_release_notes.html
n contains key identifier Bug 385946: Can't import certificate into cert database in FIPS mode (certutil). Bug 387892: Add Entrust root CA certificate(s) to NSS Bug 396999: PK11_Authenticate Bug 397478: Lock from ssl_InitSymWrapKeysLock not freed on selfserv shutdown. Bug 397486: Session cache locks not freed on strsclnt shutdown. ...
NSS_3.12.2_release_notes.html
hould set the PR_NOT_IMPLEMENTED_ERROR error. Bug 456854: CERT_DecodeCertPackage does not set NSPR error code upon error Bug 457980: hundreds of kilobytes of useless strings in libPKIX Bug 457984: Enable PKCS11 module logging in optimized builds Bug 458905: Memory leaks in PKIX bridge certificates. Bug 459231: Memory leak in cert fetching - AIA extension. Bug 459248: Support Intel AES
extensions. Bug 459359: ForwardBuilderState object is leaked when AIA path incorrect Bug 459481: NSS build problem with GCC 3.4.6 on OS/2 Documentation For a list of the primary NSS documentation pages on mozilla.org, see NSS Documentation. 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 Compat...
NSS 3.15 release notes
ns may enable this via a call to SSL_OptionSetDefault(SSL_ENABLE_OCSP_STAPLING, PR_TRUE); Added function SECITEM_ReallocItemV2. It replaces function SECITEM_ReallocItem, which is now declared as obsolete. Support for single-operation (eg: not multi-part) symmetric key encryption and decryption, via PK11_Encrypt and PK11_Decrypt. certutil has been updated to support creating name constraints
extensions. New Functions in ssl.h SSL_PeerStapledOCSPResponse - Returns the server's stapled OCSP response, when used with a TLS client socket that negotiated the status_request extension. SSL_SetStapledOCSPResponses - Set's a stapled OCSP response for a TLS server socket to return when clients send the status_request extension. in ocsp.h CERT_PostOCSPRequest - Pri...
NSS 3.16.2 release notes
ror code that means the server supports no protocols that the client advertises in the ALPN extension. Notable Changes in NSS 3.16.2 The btoa command has a new command-line option -w suffix, which causes the output to be wrapped in BEGIN/END lines with the given suffix. Use "c" as a shorthand for the suffix CERTIFICATE. The certutil commands supports additionals types of subject alt name
extensions: --extSAN type:name[,type:name]... The certutil commands supports generic certificate
extensions, by loading binary data from files, which have been prepared using external tools, or which have been extracted and dumped to file from other existing certificates: --dump-ext-val OID --extGeneric OID:critical-flag:filename[,OID:critical-flag:filename]... The certutil comman...
NSS 3.19 release notes
sedNameConstraints) has been added that allows one to lookup imposed constraints. It is possible to override the directory (SQLITE_LIB_DIR) in which the NSS build system will look for the sqlite library. New Functions in cert.h CERT_GetImposedNameConstraints - Check if any imposed constraints exist for the given certificate, and if found, return the constraints as encoded certificate
extensions. Notable Changes in NSS 3.19 The SSL 3 protocol has been disabled by default. NSS now more strictly validates TLS
extensions and will fail a handshake that contains malformed
extensions (bug 753136). In TLS 1.2 handshakes, NSS advertises support for the SHA512 hash algorithm in order to be compatible with TLS servers that use certificates with a SHA512 signature (bug 1155922). Bugs ...
NSS 3.22 release notes
Set the NSS_DISABLE_GTESTS variable to 1 to disable building these tests. Bugs fixed in NSS 3.22 This Bugzilla query returns all the bugs fixed in NSS 3.22: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&...
NSS 3.23 release notes
ServerRandom anti-downgrade mechanism. Clients that perform a version downgrade (which is a dangerous practice) call this with the highest version number that they possibly support. This gives them access to the version downgrade protection from TLS 1.3. Notable Changes in NSS 3.23 The copy of SQLite shipped with NSS has been updated to version 3.10.2 (bug 1234698) The list of TLS
extensions sent in the TLS handshake has been reordered to increase compatibility of the Extended Master Secret with servers (bug 1243641) The build time environment variable NSS_ENABLE_ZLIB has been renamed to NSS_SSL_ENABLE_ZLIB (Bug 1243872). The build time environment variable NSS_DISABLE_CHACHAPOLY was added, which can be used to prevent compilation of the ChaCha20/Poly1305 code. The following CA ce...
NSS 3.31 release notes
equested version range wasn't fully allowed by the systemwide crypto policy. They have been changed to return success, if at least one TLS version overlaps between the requested range and the systemwide policy. An application may call SSL_VersionRangeGet and SSL_VersionRangeGetDefault to query the TLS version range that was effectively activated. Corrected the encoding of Domain Name Constraints
extensions created by certutil NSS supports a clean seeding mechanism for *NIX systems now using only /dev/urandom. This is used only when SEED_ONLY_DEV_URANDOM is set at compile time. CERT_AsciiToName can handle OIDs in dotted decimal form now. Bugs fixed in NSS 3.31 This Bugzilla query returns all the bugs fixed in NSS 3.31: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Co...
NSS API Guidelines
are publicly available to higer-level APIs. Library Description Layer Directory Public Headers certdb Provides all certificate handling functions and types. The certdb library manipulates the certificate database (add, create, delete certificates and CRLs). It also provides general certificate-handling routines (create a certificate, verify, add/check certificate
extensions). Low Cert lib/certdb cdbhdl.h, certdb.h, cert.h, certt.h certhi Provides high-level certificate-related functions, that do not access the certificate database, nor individual certificate data directly. Currently, OCSP checking settings are exported through certhi. High Cert lib/certhigh ocsp.h, ocspt.h crmf Provides functions, and data types, to handle C...
Enc Dec MAC Output Public Key as CSR
ilure; goto cleanup; } arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) { fprintf(stderr, "out of memory"); rv = SECFailure; goto cleanup; } extHandle = CERT_StartCertificateRequestAttributes(cr); if (extHandle == NULL) { PORT_FreeArena (arena, PR_FALSE); rv = SECFailure; goto cleanup; } CERT_Finish
Extensions(extHandle); CERT_FinishCertificateRequestAttributes(cr); /* Der encode the request */ encoding = SEC_ASN1EncodeItem(arena, NULL, cr, SEC_ASN1_GET(CERT_CertificateRequestTemplate)); if (encoding == NULL) { PR_fprintf(PR_STDERR, "der encoding of request failed\n"); rv = SECFailure; goto cleanup; } /* Sign the reques...
NSS Tech Notes
NSS Technical Notes Newsgroup: mozilla.dev.tech.crypto NSS technical notes provide latest information about new NSS features and supplementary documentation for advanced topics in programming with NSS. TN1: How to use the NSS ASN.1 and QuickDER decoders. TN2: Using the PKCS #11 Module Logger. TN3: All About Certificate
Extensions. TN4: Pulling certificate extension information out of SSL certificates. TN5: Using NSS to perform miscellaneous cryptographic operations. TN6: NSS .chk Files for the FIPS Mode. TN7: RSA Signing and Encryption with NSS. TN8: Background Information on libSSL's Cache Functions and SIDs. ...
NSS cryptographic module
Therefore, an application that supports PKCS #11 cryptographic tokens can be easily modified to use the NSS cryptographic module. The NSS cryptographic module has two modes of operation: the non-FIPS (default) mode and FIPS mode. The FIPS mode is an Approved mode of operation compliant to FIPS 140-2. ...
Rhino and BSF
mework (or BSF) was originally developed by IBM and now published as open source as a project at the Apache Software Foundation. It provides a framework for using a number of scripting languages with Java. Rhino is one of the supported languages. This framework has been embedded in a number of open source projects, including the XSL processor Xalan and the XML/Java build tool Ant. See Xalan-Java
Extensions for more information on adding JavaScript to XSL and the description of the optional Script task in the Apache Ant Manual for using scripting in Ant build files. Using BSF with Rhino Now that the Apache Jakarta Bean Scripting Framework (BSF), version 2.4.0, has been officially released, you can use Rhino easily with BSF. See http://commons.apache.org/proper/commons-bsf/index.html. ...
Rhino overview
perties, and the constructors With, Closure, and Call. Attempts to invoke these constructors with the language version 1.4 will result in an error. For other versions, a warning will be generated. Internationalization The messages reported by the JavaScript engine are by default retrieved from the property file org/mozilla/javascript/resources/Messages.properties. If other properties files with
extensions corresponding to the current locale exist, they will be used instead. JavaScript Language Versions Some behavior in the JavaScript engine is dependent on the language version. In browser embeddings, this language version is selected using the LANGUAGE attribute of the SCRIPT tag with values such as "JavaScript1.2". Version 1.3 and greater are ECMA conformant. Operators == and != Version 1.2 ...
Creating JavaScript jstest reftests
the browser. This directory contains tests of SpiderMonkey conformance to ECMAScript as well as SpiderMonkey non-standard extenstions to ECMAScript. Directory Overview In the js/src/tests directory, there are a few important subdirectories. non262 tests The directory js/src/tests/non262/ should contain all tests of the following type: Regressions of SpiderMonkey Non-standard SpiderMonkey
extensions to the JavaScript language Test of "implementation-defined" details of the ECMAScript Standard For example, the exact definition of pi or some details of array sorting. You should not add tests of the following type: Tests of the JIT Test of JIT correctness belong in the jit-test suite, read more here. Performance tests or stress tests Tests of SpiderMonkey's comform...
FOSS
mbed SpiderMonkey in OCaml applications Perl http://jspl.msg.mx/ - bindings to cross-embed SpiderMonkey and Perl. Includes a JS shell that allows you to use CPAN modules from JavaScript. Python http://pypi.python.org/pypi/python-spidermonkey wxWidgets GLUEscript (formerly wxJavaScript) Code generators jsapigen - generates bindings for embedding SpiderMonkey in C applications
Extensions http://code.google.com/p/jslibs/ - zlib, SQLite, NSPR, ode, libpng, libjpeg, libffi, (...) libraries for SpiderMonkey http://www.jsdb.org/ - a JS Shell with native objects for files, networks, databases, compression, email, etc. http://code.google.com/p/gpsee/ - commonJS platform, native-language module interoperability methods, modules, etc. for SpiderMonkey. Designed to supple...
SpiderMonkey Internals
rMonkey is a fast interpreter that runs an untyped bytecode and operates on values of type JS::Value--type-tagged values that represent the full range of JavaScript values. In addition to the interpreter, SpiderMonkey contains a Just-In-Time (JIT) compiler, a garbage collector, code implementing the basic behavior of JavaScript values, a standard library implementing ECMA 262-5.1 ?15 with various
extensions, and a few public APIs. Interpreter Like many portable interpreters, SpiderMonkey's interpreter is mainly a single, tremendously long function that steps through the bytecode one instruction at a time, using a switch statement (or faster alternative, depending on the compiler) to jump to the appropriate chunk of code for the current instruction. A JS-to-JS function call pushes a JavaScript stac...
JSVersion
SVERSION_1_5Obsolete since JSAPI 24 150 JavaScript 1.5 "1.5" JSVERSION_1_6 160 JavaScript 1.6 "1.6" JSVERSION_1_7 170 JavaScript 1.7 "1.7" JSVERSION_1_8 180 JavaScript 1.8 "1.8" JSVERSION_ECMA_5 185 ECMA 262 Edition 5 "ECMAv5" JSVERSION_DEFAULT 0 Latest JavaScript version, but omitting web-incompatible
extensions "default" JSVERSION_UNKNOWN -1 Unknown JavaScript version NULL JSVERSION_LATEST JSVERSION_ECMA_5 Latest JavaScript version NULL See Also MXR ID Search for JSVersion JS_GetVersion JS_SetVersion JS_StringToVersion JS_VersionToString bug 824312 ...
JS_ParseJSON
to the created value after parsing; see JSON.parse. vp jsval * Out parameter. *vp receives the value after parsing (and optionally, processing by the reviver). If an error occurs, the value left in *vp is undefined. Description Use these functions to parse a sequence of characters as JSON. The parsing rules applied by these methods are exactly those specified by ECMAScript 5. Various JSON
extensions like trailing commas, unquoted property names, more generous number parsing, and so on are not supported. MXR ID Search for JS_ParseJSON MXR ID Search for JS_ParseJSONWithReviver ...
JSAPI reference
otype Added in JSAPI 17 JS_GetFunctionPrototype Added in SpiderMonkey 17 JS_GetArrayPrototype Added in SpiderMonkey 24 JS_GetConstructor JS_GetGlobalForObject JS_GetInstancePrivate JS_GetPrototype JS_SetPrototype JS_GetPrivate JS_SetPrivate JS_FreezeObject Added in SpiderMonkey 1.8.5 JS_DeepFreezeObject Added in SpiderMonkey 1.8.5 JS_IsExtensible Added in SpiderMonkey 1.8.5 JS_Prevent
Extensions Added in SpiderMonkey 45 JS_InstanceOf JS_HasInstance JS_IsNative Added in SpiderMonkey 17 JS::ToPrimitiveAdded in SpiderMonkey 45 JS::NewFunctionFromSpecAdded in SpiderMonkey 45 JS_DefaultValueObsolete since JSAPI 44 JS_GET_CLASS Obsolete since JSAPI 13 JS_SealObject Obsolete since JavaScript 1.8.5 JS_GetParent Obsolete since JSAPI 39 JS_SetParent Obsolete since JSAPI 39 Standard ...
Shell global objects
its OsiPoint. displayName(fn) Gets the display name for a function, which can possibly be a guessed or inferred name based on where the function was defined. This can be different from the name property on the function. isAsmJSCompilationAvailable Returns whether asm.js compilation is currently available or whether it is disabled (e.g., by the debugger). isSimdAvailable Returns true if SIMD
extensions are supported on this platform. getCompilerOptions() Return an object describing some of the JIT compiler options. isAsmJSModule(fn) Returns whether the given value is a function containing "use asm" that has been validated according to the asm.js spec. isAsmJSModuleLoadedFromCache(fn) Return whether the given asm.js module function has been loaded directly from the cache. This function thr...
AT APIs Support
d HTML editing made simple Sunbird - cross-platform calendar application KompoZer - a complete Web Authoring System for Linux Desktop, Microsoft Windows and Macintosh users to rival programs like FrontPage and Dreamweaver. Open Komodo - platform for building developer environments Miro - a free, open source internet tv and video player Any XulRunner application (Songbird media player, etc.)
Extensions to other XUL apps (e.g. Firefox
extensions) Gecko Version For Firefox and all other Gecko-based products: this documentation applies to up-to-date product builds based on Gecko 1.9.2 -- currently not available on official releases. However most of described features are supported starting from Gecko 1.9.0 (Firefox 3.0). However it's preferable to grab the current build of Firefox or any other ...
XForms Accessibility
h everything should work and is ready to be tested. You will find trunk builds of Firefox at ftp.mozilla.org, trunk builds of XForms extension (Windows) at ftp.mozilla.org or trunk builds of XForms extension (Linux) ftp.mozilla.org. Build It Yourself If you would like to build firefox/seamonkey yourself then please ensure your .mozconfig file has the following option: ac_add_options --enable-
extensions=default,xforms,schema-validation How To Test There are two approaches to test XForms accessibility. The first is to use and assistive technology such as a screen reader, or an accessibility testing tool, to make sure XForms elements have proper accessible objects. Or you may be guided by toolkit checklist to check keyboard navigation for XForms controls. You can try the following link to test...
The Places database
renced by any non-expired visit or bookmark. Delete favicons for those expiring history entries that are not referenced by any other history entry. Delete annotations that belong to the expiring pages. At shutdown time, an extra step is performed in case there are any orphans. There are several ways for orphans to be created, including calling markPageAsTyped and then never visiting the page.
Extensions might also set favicons for pages that have never been visited. Delete any history entries that have no visits, are not bookmarked, and are not place: URIs. Delete any favicons that are not referenced by any history entries. See Places Expiration for more information. ...
Using the Places annotation service
For an overview of the Places database design, see The Places database. Most methods in the service are duplicated with one method labeled as a 'Page Annotation' taking an nsIURI and the others labeled as an 'Item Annotation' and taking the id of an item in the places database. ...
Places
Places keywords API How to manage Places keywords Querying Places How to query the bookmarks and history system with specific parameters. Retrieving part of the bookmarks tree How to fetch a section of the bookmarks tree using queries. Displaying Places information using views How to use Places views to display Places data in your own applications or
extensions. Places utilities for JavaScript A library of convenient routines that make it easier to work with Places. Places Database troubleshooting How to deal with a corrupt places.sqlite database. View All... Design documents The Places database High-level overview of the Places database design. History Service Design Design of the hist...
STEEL
EL-like set of interfaces to facilitate Thunderbird extension development. Currently, STEEL has an steelIApplication interface that implements all the functions of extIApplication. The library has also been implemented in Firefox ("FUEL") and in SeaMonkey ("SMILE"). Objects extIApplication Objects extIApplication extIConsole extIEventItem extIEventListener extIEvents extIExtension extI
Extensions extIPreference extIPreferenceBranch extISessionStorage steelIApplication Objects steelIApplication XPCOM Although the STEEL steelIApplication 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/steel/application;1"].getService(Components.in...
Bundling multiple binary components
Since binary components are linked against a single Gecko SDK, a dependency to a particular version of Gecko is created. If the component uses only "frozen" XPCOM interfaces, there is a good chance the same binary component will work with different versions of Gecko (version 1.8 and 1.9, for example). The more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between Gecko versions. This can create a difficult situation for extension developers trying to support multiple Gecko versions (Firefox 2 and 3, for example). ...
Generating GUIDs
Add-ons can (and should) be identified with IDs of the form extensionname@organization.tld since Firefox 1.5. Warning: If you just want an ID for your add-on, generating a GUID is almost definitely not what you want to do. Using the extensionname@organization.tld form is approximately one thousand times easier for everyone involved. ...
How to build an XPCOM component in JavaScript
tils.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. Delete compreg.dat and...
Using XPCOM Components
ll over - in high-level browser-like functionality such as nsWebBrowserFind, which provides find() and findNext() methods for finding content in web pages, and in low-level tasks such as the manipulation of data. Though not every API in Mozilla is or should be "XPCOMified", much if not all of the typical functionality that browsers provide is available in components that can be reused via browser
extensions and/or Gecko embedders. In addition to the CookieManager component, for example, the WebBrowserFind component is another part of a large set of web browsing interfaces you can use. Its nsIWebBrowserFind interface is shown in The nsIWebBrowserFind Interface. To use this component, you access it through the nsIWebBrowserFind interface and call its methods. The nsIWebBrowserFind Interface ...
Receiving startup notifications
ot 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-startup" category using nsICategoryManager; having done so...
Components.utils.unload
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. 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. You should not unload modules that are part of the application (anything under resource://gre/ or resource:/// or resource://app/) as these may be in use by other
extensions and the application. Only unload modules you include as part of your extension. Syntax Components.utils.unl...
Development
Build Instructions The build instructions are available here: Building JavaXPCOM. Bugs All JavaXPCOM bugs are tracked in Bugzilla, using the "Core" product and "Java to XPCOM Bridge" component. ...
appShellService
Quitting Mozilla: var Cc = Components.classes; var Ci = Components.interfaces; shell = Cc["@mozilla.org/appshell/appShellService;1"]; shell = shell.getService(Ci.nsIAppShellService); shell.quit(3); // eForceQuit Bam! There goes Mozilla. Then again, there's a much easier way; One of the xpcshell
extensions is a quit function: quit(3) ...
XPCShell Reference
s designated by -f options. These arguments appear on the global property arguments. For instance, assume that you have a file called test.js with the following contents: for (prop in arguments) { print(prop + "=" + arguments[prop]); } Entering the following at the command line should produce the following output: $ xpcshell test.js This is a test 0=This 1=is 2=a 3=test XPCShell
Extensions Once you execute XPCShell without a script you'll be at the JS> command line. The following are some useful functions that can be invoked from the command line: clear(object) clear() removes all properties from an object. For example, if you created anObject with a property named value and then called clear(anObject), the property value would no longer exist. gc(heapDumpFilename) gc() w...
Language bindings
ertently collected.Components.utils.setGCZealThis method lets scripts set the zeal level for garbage collection. 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. ...
amIInstallCallback
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. ...
amIInstallTrigger
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. ...
amIWebInstallInfo
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. ...
amIWebInstallListener
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. ...
amIWebInstallPrompt
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. ...
amIWebInstaller
toolkit/mozapps/
extensions/amIWebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. 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 boolean installAddonsFromWebpage(in AString aMimetype, in nsIDOMWindow aWindow, in nsIURI aReferer, [array, size_is(aInstallCount)] in wstring aUris, [array, size_is(aInstallCount)] in wstring aHashes, [array, size_is(aInstallCount)] in wstring aNames, [array, size_is(aInstallCount)] in wstring aIcons, [optional] in amIInstallCallback aCallback, [optional] in PRUint32 aInstallCount); boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer); Note: Prior to G...
nsIFeedContainer
: The returned array will contain nsIFeedCategory objects, except that interface has not been implemented yet. contributors nsIArray An array of nsIFeedPerson objects describing contributors to the feed or entry. fields nsIWritablePropertyBag2 Provides access to all the fields found in the document. Common Atom and RSS fields are normalized, including some namespaced
extensions such as "dc:subject" and "content:encoded". Consumers can avoid normalization by checking the feed type and accessing specific fields. Common namespaces are accessed using prefixes, such as get("dc:subject");. See nsIFeedResult.registerExtensionPrefix() for more information about prefixes. id AString A string that identifies the feed or entry. Not all feeds have these, but ...
nsIFeedEntry
the entry was published, in RFC822 format. This date is parsable by both JavaScript (via Date.parse()) and mail code. Note, that the related updated attribute is available from the nsIFeedContainer interface. summary nsIFeedTextConstruct A summary of the feed entry's content. This is generated automatically using the entry's description, subtitle, summary, content, and appropriate
extensions. See also nsIFeedContainer Interwiki lin ...
Using nsILoginManager
To do so securely, they can use nsILoginManager, which provides for secure storage of sensitive password information and nsILoginInfo, which provides a way of storing login information. Getting nsILoginManager To get a component implementing nsILoginManager, use the following: var passwordManager = Components.classes["@mozilla.org/login-manager;1"].getService( Components.interfaces.nsILoginManager ); Most Login Manager functions take an nsILoginInfo object as a parameter. An nsILoginInfo object contains the following attributes: hostname, form submit URL, HTTP realm, username, username field, password, and password field. ...
nsILoginManagerStorage
.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) For example, if you wish to provide operating system integration with a native password manager system, implementing and registering a storage module for the Login Manager is how you do it. See Creating a Login Manager storage module for details. Note:
Extensions that simply want to access/store logins should use the Login Manager service and nsILoginManager interface instead. The Login Manager will handle selecting and using the correct nsILoginManangerStorage module. Method overview void addLogin(in nsILoginInfo aLogin); unsigned long countLogins(in AString aHostname, in AString aActionURL, in AString aHttpRealm); void findLogins(out unsigned lon...
nsIMicrosummaryGenerator
his 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. Methods calculateUpdateInterval() Calculates the interval until the microsummary should be updated for the next time, depending on the page content. If the generator doesn't specify an interval, null is returned. long calculateUpdateInterval( in nsIDOMNode aPageContent ); Parameters aPageContent The...
nsIMsgAccountManagerExtension
sion with a "name" attribute of "devmo" and the "chromePackageName" attribute set to "extension@example.org" means, that the Account Manager expects to find a XUL file in "chrome://extension@example.org/content/am-devmo.xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefPanel-devmo". You have to register any new Account Manager
Extensions via the the category manager at start up. Simply add a new Entry with the Contact ID of the component to the "mailnews-accountmanager-
extensions" category. //github.com/RealityRipple/UXP/blob/master/mailnews/base/public/nsIMsgAccountManager.idlScriptable Please add a summary to this article. Last changed in Gecko ??? Inherits from: nsISupports Method overview boolean showPanel(in ns...
nsIParserUtils
1.0 66 Introduced Gecko 13.0 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Warning: Do not use this from within Gecko--use nsContentUtils, nsTreeSanitizer, and so on directly instead. ...
nsIPrivateBrowsingService
ldn't save any potentially private information. The browser itself stops caching, and also doesn't record history information. In addition, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. The temporary cookie and local storage databases start out empty.
Extensions that record potentially private information should use this interface to detect whether private browsing mode is enabled, and if it is, avoid saving that information. For details on how to do this, see the article Supporting private browsing mode. Similarly, plug-ins can detect whether or not private browsing mode is in effect by using the NPN_GetValue() function to check the current value of t...
nsIProtocolProxyService
proxy and the nsIProtocolHandler for the queried URI does not permit proxying via HTTP. If a nsIProtocolHandler disallows all proxying, then filters will never have a chance to intercept proxy requests for such URLs. Note: It is possible to construct filters that compete with one another in undesirable ways. This API does not attempt to protect against such problems. It is recommended that any
extensions that choose to call this method make their position value configurable at runtime (perhaps via the preferences service). void registerFilter( in nsIProtocolProxyFilter aFilter, in unsigned long aPosition ); Parameters aFilter The nsIProtocolProxyFilter instance to be registered. aPosition The position of the filter. unregisterFilter() This method may be used to unregister a proxy ...
nsIScriptableUnescapeHTML
is interface is a utility interface that exposes the kind of markup parser behavior that the feed service needs. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 14.0 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Note: As of Firefox 14, this interface is obsolete (but still available for compatibility with legacy
extensions) and all its functionality is available with more configuration options via the nsIParserUtils interface. Implemented by: @mozilla.org/feed-unescapehtml;1 as a service: var scriptableUnescapeHTML = Components.classes["@mozilla.org/feed-unescapehtml;1"] .getService(Components.interfaces.nsIScriptableUnescapeHTML); Method overview nsIDOMDocumentFragment pa...
nsISecurityCheckedComponent
es of arbitrary XPCOM objects and calling methods and setting properties on them. Code that has the "UniversalBrowserRead" capability is allowed to perform certain actions that allow it to read information from the local system. For example, this capability allows code to set the value of <input type="file"> and access an arbitrary file on disk. Standard web pages have no special capabilities.
Extensions can define their own capabilities and use this interface to only allow access to code trusted with that capability. The two special return values of '"allAccess" or "noAccess" unconditionally allow or deny access to the operation. All code has the "allAccess" capability, and no code has the "noAccess" capability. This interface is used in Mozilla by XPConnect and a handful of things that need s...
nsIStyleSheetService
layout/base/nsIStyleSheetService.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Inherits from: nsISupports Implemented by: @mozilla.org/content/style-sheet-service;1. ...
nsIThreadManager
xpcom/threads/nsIThreadManager.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview nsIThread getThreadFromPRThread(in PRThread prthread); Native code only! nsIThread newThread(in unsigned long creationFlags); Attributes Attribute Type Description currentThread nsIThread The currently executing thread. If the calling thread does not already have a nsIThread associated with it, one is created and associate with the current PRThread. Read only. ...
nsIUpdateItem
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. ...
nsIXFormsModelElement
1.0 66 Introduced Gecko 1.8 Obsolete Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview nsIDOMDocument getInstanceDocument(in DOMString instanceID); void rebuild(); void recalculate(); void refresh(); void revalidate(); Methods getInstanceDocument() nsIDOMDocument getInstanceDocument( in DOMString instanceID ); Parameters instanceID The ID of the instance element to be returned. Return value An nsIDOMDocument. Exceptions thrown DOMException If there is no matching instance data. ...
nsIXFormsNSInstanceElement
Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Interface Code [scriptable, uuid(80669b92-8331-4f92-aaf8-06e80e6827b3)] interface nsIXFormsNSInstanceElement : nsISupports { nsIDOMDocument getInstanceDocument(); }; Methods getInstanceDocument nsIDOMDocument getInstanceDocument(); getInstanceDocument returns a DOM Document that corresponds to the instance data associated with the instance element. ...
nsIXFormsNSModelElement
nsIXFormsNSModelElement is implemented by all XForms <model/> elements. It defines Mozilla
extensions to the nsIXFormsModelElement interface.
extensions/xforms/nsIXFormsNSModelElement.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Interface Code [scriptable, uuid(85fd60c7-1db7-40c0-ae8d-f723fdd1eea8)] interface nsIXFormsNSModelElement : nsISupports { nsIDOMNodeList getInstanceDocuments(); }; Methods getInstanceDocuments nsIDOMNodeList getInstanceDocuments(); getInstanceDocuments returns a nsIDOMNodeList containing all the instance documents for the model, making it possible to enumerate over instances in the model without knowing their names. Related Interfaces nsIXFormsModelElement Example Code No...
nsIXULRuntime
1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/xre/app-info;1. ...
nsIXmlRpcClient
Warning: This interface was removed from Firefox 3 and is no longer available.
extensions/xml-rpc/idl/nsIXmlRpcClient.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Inherits from: nsISupports Method overview void init(in string serverURL); void setAuthentication(in string username, in string password); void clearAuthentication(in string username, in string password); void setEncoding(in string encoding); void setEncoding(in unsigned long type, out nsIIDRef uuid, out nsQIResult result); void asyncCall (in nsIXmlRpcClientListener listener, in nsISupports ctxt, in string methodName, in nsISupports arguments, in PRUInt32 count); Attributes Attribute Type Description serverURL readonly nsIURL Th...
nsIXmlRpcFault
XML-RPC server fault codes are returned wrapped in this; access it using nsIXPConnect.GetPendingException->data. ...
Setting HTTP request headers
ivacy 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
extensions may be known to have flaws by attackers). With this privacy and security addition the code to use becomes: observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { var httpChannel = s...
Using nsIPasswordManager
ile I was at it. This code is tested, but barely, and I am by no means an expert on this area. Review and cleanup would be appreciated. Zachlipton 22:52, 18 July 2006 (PDT) The code on this page will work with applications using Toolkit 1.8 and below such as Firefox 2.0.0.x and Thunderbird 2.0.0.x. For similar functionality in Toolkit 1.9, see Using nsILoginManager. Working with Password Manager
Extensions often need to securely store passwords to external sites, web applications, and so on. To do so securely, they can use nsIPasswordManager, which provides for secure storage of sensitive password information. Getting nsIPasswordManager To get a component implementing nsIPasswordManager, use the following: var passwordManager = Components.classes["@mozilla.org/passwordmanager;1"] ...
XPCOM ABI
amed 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 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 buil...
XPCOM category image-sniffing-services
However, such decoders relied on servers sending correct MIME types; images sent with incorrect MIME types would not be correctly displayed. In Firefox 3, a new XPCOM category was added in bug 391667 to allow "third-party" XPCOM components to identify images based on their content. If Mozilla's built-in image code cannot identify an image, then any XPCOM components implementing the nsIContentSniffer interface may register under the "image-sniffing-services" category, and will be queried to determine the MIME type of the image being downloaded. Note: This category was removed. ...
wrappedJSObject
source comments say, you can get comp.wrappedJSObject if three conditions are met: comp really is an XPConnect wrapper around a JS object. Wrappers around non-JS objects don't have this property. The underlying object has a wrappedJSObject property that returns a JS object. nsIXPCSecurityManager allows access (see the source code comments for details; this is usually not an issue for Mozilla
extensions and applications) This means that in order to access the JS object implementing our component directly, we must modify the component. For example: function HelloWorld() { this.wrappedJSObject = this; }; Now we can get the component directly: var comp = Components.classes["@myself.com/my-component;1"] .getService().wrappedJSObject; This is a real JS object: > comp [...
Xptcall Porting Status
sted it with older GNU compilers such as gcc 2.8.x. From looking at the Linux x86 code, I gather that the vtable layout is a little different for those compilers and the code will need minor modifications in order to work properly. I am not sure how much of the code can be used for OpenVMS Alpha and/or Digital UNIX. Currently the code is dependent on the g++ name mangling convention and a few GNU
extensions so I'm not sure how useful it will be for the other systems. Hopefully the comments in the code are detailed enough to help people attempting a port. <font color="white">Done</font> SunOS x86 Arthur Jones <aljones@lbl.gov> <font color="red">?</font> Philip Pokorny <ppokorny@mindspring.com> The word I hear is that this is working and done <font color="white">Done</font> HP-UX Thomas Wang <...
XSLT 2.0
Although XSLT 2.0 is not natively supported in Firefox, it is possible via Saxon-B (Java) or, more recently, Saxon-CE (JavaScript) to perform XSLT 2.0. For users Saxon-CE No
extensions are required, Saxon-CE runs whenever a HTML page is loaded that links to the Saxon-CE JavaScript library. Saxon-B The XSL Results extension uses the new incarnation of LiveConnect (handled by Java 1.6v12+ instead of Mozilla-specific code) to connect with the Java-based Saxon-B library, and adds support for having XSLT performed automatically when visiting a page with the appropriate XSLT processing instruction (and which isn't processed by Firefox's own XSLT 1.0 processor). For developers Saxon-CE A JavaScript API is provided for initiating an XSLT 2.0 transform from a web page. Error and diagnostics...
MailNews Filters
show up in the filter log. Finally, add protocol-specific code to apply your filter action in the various ApplyFilterHit methods IMAP POP3 News and "after the fact" Since SeaMonkey and Thunderbird share the filter code, you will also need to update the SeaMonkey .dtd and .property files. I may have missed some places, but that's a start, anyway. It would be really nice if we had a mechanism for
extensions to add their own filter actions. Most if not all of the above pieces of code would be involved in the extension mechanism. ...
Thunderbird Configuration Files
ur profile folder. The file does not exist by default, so you need to create it before you can start adding your preferences. In almost all cases, edits made using the user.js can be done via the Config Editor, which is the recommended method. Windows users: If you know how to create a file, just skip this section. Before you can create the file, you must make sure that you can see the file type
extensions in Windows. Start Explorer (just click on the My Computer icon on your desktop) and select Tools > Folder Options. Click the View tab and uncheck the Hide
extensions for known file types option. Now, go to your profile folder and select File > New > Text Document. The default name New Text Document.txt should be displayed. Change the name to user.js (click Yes on the file type warning that appear...
Building a Thunderbird extension 2: extension file layout
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. ...
Building a Thunderbird extension 3: install manifest
/em:id>: This is the ID of the extension. The first portion is the short name of the extension and must be in lowercase; the last portion is a two-part period-delimited value such as your first and last name or the top-level domain of your website. While this value is in email address format, it is not an email address. It should, however, be a unique value so that it does not conflict with other
extensions. <em:name>My First Extension</em:name>: The extension name is displayed in the Thunderbird add-on Manager. <em:version>1.0</em:version>: This is the version number of your extension. It must be updated each time you release a new version of your extension. It is not the Thunderbird version number (which is stored in the minVersion and maxVersion fields). <em:creator>jenzed</em:creator>: This ...
Building a Thunderbird extension 5: XUL
document at run time. A XUL Overlay is a .xul file that specifies 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/gatekeepe...
Creating a Custom Column
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). ...
Finding the code for a feature
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, how did I use those to figure out how to do this? I know there is a menu command "Tag" to tag the message - how does it do it? Using DOM in...
Thunderbird
w the review process works and how to use the Mozilla symbol server to help with debugging. MailNews Protocols Rough documentation about mail protocols.. Database views Backend information about nsIMsgDBView and related interfaces. Thunderbird API documentation Thunderbird API documentation Extension documentation Tutorials and tips for building Thunderbird
extensions View All... Community Thunderbird product home page Thunderbird project community pages User support is handled at Mozilla Support Development discussion happens on the tb-planning mailing list: subscribe archives Add-on Developers forum/mailing list Mozillazine forums Mozilla Messaging web page ...
Toolkit version format
This document is a reference for the version format, as used in Firefox 1.5 (XULRunner 1.8) and later. This format is used by the Extension Manager, Software Update, and other parts of the platform. Versions in at least the following places must conform to this format: Addon's and target application's version in install and update manifests. The following preferences: app.
extensions.version,
extensions.lastAppVersion Versions returned by nsIXULAppInfo. application.ini in XULRunner applications appversion flag in chrome manifests. You can use nsIVersionComparator to compare versions from your application. See Older version formats below for description of the older version format used in Firefox/Thunderbird 1.0. Version format A version string consists of one or more version parts...
Virtualenv
d virtual environments of python packages. Due to its utility, tools have been built around this functionality. ...
Flash Activation: Browser Comparison - Plugins
different ways. This guide will help outline the similarities and differences between the browsers so web developers can provide the best user experience. In each browser, the decision to enable Flash is made by users on a per-site basis. When a site attempts to use Flash, the browser will prompt the user in some way and give the user an opportunity to enable Flash for that site. Flash-blocking
extensions are no longer necessary because this functionality is now built into the browser. Mozilla Firefox Google Chrome Microsoft Edge Setting Name Ask to activate HTML5 by default Click-to-run 'application/x-shockwave-flash' in navigator.mimeTypes by default when Flash is inactive yes no no 'application/x-shockwave-flash' in navigator...
Plug-in Basics - Plugins
th 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 each MIME type assigned to it. Notice in view-source that this information is simply gathered from the JavaScript. Because plug-ins are platform-specific, you must port them to every operating system and processor platform upon which you want to deploy your plug-in. Plug-ins and helper applications Before plug-ins, there were help...
Gecko Plugin API Reference - Plugins
ent Returns the browser's user agent field. NPN_Version Returns version information for the Plug-in API. NPN_Write Pushes data into a stream produced by the plug-in and consumed by the browser. ...
DOM Inspector internals - Firefox Developer Tools
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/ ... tests/ ... viewers/ ... browserOverlay.xul commandOverlay.xul editingOverlay.xul Flasher.js hooks.js inspector.css inspector.js inspectorOverlay.xul inspector.xml inspector.xul keysetOverlay.xul object.js object.xul popupOverlay.xul sidebar.js sidebar.xul statusbarOverlay.x...
DOM Inspector - Firefox Developer Tools
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-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 w...
Inspecting web app manifests - Firefox Developer Tools
You also need to make sure the JSON inside the file is of the correct format. You can test this using the Web Manifest Validator. Inspecting your manifest If your manifest is deployed successfully, you should end up with a display like the following on the Manifest view: From here, you can inspect all the information in the manifest in an easy-to-di...
Debugging service workers - Firefox Developer Tools
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. ...
Source map errors - Firefox Developer Tools
Original source missing An original source may be missing. You may encounter this when trying to open one of the original sources in the debugger. The message looks a little different in this case: In this case, the error will also be displayed in the source tab in the debugger: NetworkError when attempting to fetch resource A bug in Firefox prevents it from loading source maps for web
extensions. See Bug 1437937: Web
Extensions Doesn't Find Source Maps for details. Source-Map-Fehler: TypeError: NetworkError when attempting to fetch resource. Ressourcen-Adresse: moz-extension://c7f0f003-4fcf-49fd-8ec0-c49361266581/background.js Source-Map-Adresse: background.js.map The only workaround is to manually change the map URL to a public one (http://localhost:1234/file.map.js) and start a loc...
UI Tour - Firefox Developer Tools
ener Breakpoints DOM Mutation Breakpoints Source list pane The source list pane lists all the JavaScript source files loaded into the page, and enables you to select one to debug. At the top level sources are organized by origin, and under that they're organized by the directory structure from which they are served. You can search for a file using Ctrl + P (Cmd + P on a Mac). Web
Extensions are listed in the Source List pane using the extension's name. There are several context menu options available for individual files and folders or groups; typically viewed by right-clicking on the item. For files, the following context menu options are available: Copy source URI copies the full identifier of the file to the clipboard. Ignore source causes the debugger to skip the file ...
Migrating from Firebug - Firefox Developer Tools
PI available within the page. The Developer Tools share the same API, so your console.* statements will continue to work. Persist logs In Firebug you can click the Persist button within the toolbar to keep the logged 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...
Extension Storage - Firefox Developer Tools
When selecting an extension ID in the storage tree of the Storage Inspector, a table lists the details of all the extension storage present for the extension. This table contains the following columns: Key -- The name of the stored item. Value -- The value of the stored item. ...
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 updat...
AuthenticatorAssertionResponse.signature - Web APIs
rigin, etc. and available from AuthenticatorAssertionResponse.clientDataJSON). Examples var options = { challenge: new Uint8Array(26), // will be another value, provided by the relying party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionPKCred) { var signature = assertionPKCred.response.signature; // Send response and client
extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); Specifications Specification Status Comment Web Authentication: An API for accessing Public Key Credentials Level 1The definition of 'signature' in that specification. Recommendation Initial definition. ...
AuthenticatorAssertionResponse.userHandle - Web APIs
rsonally identifying information (e.g. username, e-mail, phone number, etc.) Examples var options = { challenge: new Uint8Array(26), // will be another value, provided by the relying party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionPKCred) { var userHandle = assertionPKCred.response.userHandle; // Send response and client
extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); Specifications Specification Status Comment Web Authentication: An API for accessing Public Key Credentials Level 1The definition of 'userHandle' in that specification. Recommendation Initial definition. ...
AuthenticatorAssertionResponse - Web APIs
ient data for the authentication, such as origin and challenge. The clientDataJSON property is inherited from the AuthenticatorResponse. AuthenticatorAssertionResponse.authenticatorData Secure contextRead only An ArrayBuffer containing information from the authenticator such as the Relying Party ID Hash (rpIdHash), a signature counter, test of user presence and user verification flags, and any
extensions processed by the authenticator. AuthenticatorAssertionResponse.signature Secure contextRead only An assertion signature over AuthenticatorAssertionResponse.authenticatorData and AuthenticatorResponse.clientDataJSON. The assertion signature is created with the private key of keypair that was created during the navigator.credentials.create() call and verified using the public key of that same ke...
AuthenticatorAttestationResponse.getTransports() - Web APIs
ntials.create(). Note: This method may only be used in top-level contexts and will not be available in an <iframe> for example. Syntaxe arrTransports = authenticatorAttestationResponse.getTransports() Parameters None. Return value An Array containing the different transports supported by the authenticator or nothing if this information is not available.of the processing of the different
extensions by the client. The elements of this array are supposed to be in lexicographical order. Their values may be : "usb": the authenticator can be contacted via a removable USB link "nfc": the authenticator may be used over NFC (Near Field Communication) "ble": the authenticator may be used over BLE (Bluetooth Low Energy) "internal": the authenticator is specifically bound to the client device (c...
Background Tasks API - Web APIs
ensure that you leave the system enough time to finish the current pass through the event loop and get on to the next one without causing other code to stutter or animation effects to lag. Currently, timeRemaining() has an upper limit of 50 milliseconds, but in reality you will often have less time than that, since the event loop may already be eating into that time on complex sites, with browser
extensions needing processor time, and so forth. Avoid making changes to the DOM within your idle callback. By the time your callback is run, the current frame has already finished drawing, and all layout updates and computations have been completed. If you make changes that affect layout, you may force a situation in which the browser has to stop and do recalculations that would otherwise be unnecessary. ...
BatteryManager - Web APIs
ry level is updated. 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 this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of
extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Specifications Specification Status Comment Battery Status API Candidate Recommendation Initial definition ...
Clipboard - Web APIs
ing it in browsers is not yet complete. Due to both potential security concerns and technical complexities, the process of integrating this API is happening gradually in most browsers. For example, Firefox does not yet support the "clipboard-read" and "clipboard-write" permissions, so access to the methods that access and change the contents of the clipboard are restricted in other ways. For Web
Extensions, you can request the clipboardRead and clipboardWrite permissions to be able to use clipboard.readText() and clipboard.writeText(). Content scripts applied on HTTP sites do not have access to the clipboard object. See
extensions in Firefox 63. In addition, read() and write() are disabled by default and require changing a preference to enable them. Check the compatibility tables for each method b...
CloseEvent - Web APIs
ponse from the upstream server. This is similar to 502 HTTP Status Code. 1015 TLS Handshake Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified). 1016-1999 Reserved for future use by the WebSocket standard. 2000-2999 Reserved for use by WebSocket
extensions. 3000-3999 Available for use by libraries and frameworks. May not be used by applications. Available for registration at the IANA via first-come, first-serve. 4000-4999 Available for use by applications. CloseEvent.reason Read only Returns a DOMString indicating the reason the server closed the connection. This is specific to the particular ...
Constraint validation API - Web APIs
t itself. Constraint validation interfaces ValidityState The ValidityState interface represents the validity states that a form control element can have, with respect to its defined constraints. Together, they help explain whether and why an element's value fails to validate. invalid event This event type is fired at a form control element if the element does not satisfy its constraints. ...
DocumentOrShadowRoot.msElementsFromRect() - Web APIs
ect a rectangle, use msElementsFromRect(top, left, width, height). var nodeList = document.msElementsFromRect(x,y,width,height) var nodeList = document.msElementsFromPoint(x,y) The returned nodeList is sorted by z-index so that you can tell the relative stacking order of the elements. See also Advanced Hit Testing APIs Demo for msElementsFromPoint() and msElementsFromRect() Microsoft API
extensions ...
How to create a DOM tree - Web APIs
This page describes how to use the DOM Core API in JavaScript to create and modify DOM objects. It applies to all Gecko-based applications (such as Firefox) both in privileged (
extensions) and unprivileged (web pages) code. Dynamically creating a DOM tree Consider the following XML document: <?xml version="1.0"?> <people> <person first-name="eric" middle-initial="H" last-name="jung"> <address street="321 south st" city="denver" state="co" country="usa"/> <address street="123 main st" city="arlington" state="ma" country="usa"/> </person> <person first-name="jed" last-name="brown"> <address street="321 north st" city="atlanta" state="ga" country="usa"/> <address street="123 west st" city="seattle" state="wa" country="usa"/> <address street="321 south avenue" city="denv...
EXT_color_buffer_half_float - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to WebGL 1 contexts only. For WebGL 2, use the EXT_color_buffer_float extension. The OES_texture_half_float extension implicitly enables this extension. Constants ext.RGBA16F_EXT RGBA 16-bit floating-point color-renderable format. ext.RGB16F_EXT RGB 16-bit floating-point color-renderable format. ...
EXT_frag_depth - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. It requires GLSL #version 300 es. ...
EXT_sRGB - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. The constants in WebGL2 are: gl.SRGB, gl.SRGB8, gl.SRGB8_ALPHA8 and gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING. ...
Element.msZoomTo() - Web APIs
nt document to scroll or zoom content hosted in an iframe. Return value This method does not return a value. Example /* Zooming in on an element while still keeping it centered in the viewport */ var args = { contentX: target.offsetLeft + target.offsetWidth/2; contentY: target.offsetTop + target.offsetHeight/2; scaleFactor: 2.0; } zoomer.msZoomTo(args); See also Microsoft API
extensions ...
Element.openOrClosedShadowRoot - Web APIs
The Element.openOrCloseShadowRoot read-only property represents the shadow root hosted by the element, regardless if its mode is open or closed. Use Element.attachShadow() to add a shadow root to an existing element. Syntax var shadowroot = element.shadowRoot; Value A ShadowRoot object instance, regardless if its mode is set to open or closed, or null if no shadow root is present. (See Element.attachShadow() for further details). ...
Element - Web APIs
element. Element.scrollWidth Read only Returns a Number representing the scroll view width of the element. Element.shadowRootRead only Returns the open shadow root that is hosted by the element, or null if no open shadow root is present. Element.openOrClosedShadowRoot Read only Returns the shadow root that is hosted by the element, regardless if its open or closed. Available only to Web
Extensions. Element.slot Returns the name of the shadow DOM slot the element is inserted in. Element.tabStop Is a Boolean indicating if the element can receive input focus via the tab key. Element.tagName Read only Returns a String with the name of the tag for the given element. Element.undoManager Read only Returns the UndoManager associated with the element. Element.undoScope Is a Bool...
Event.msConvertURL() - Web APIs
var url = URL.createObjectURL(file); if (evt.convertURL) { // Use standard if available. evt.convertURL(file, "specified", url); } else { evt.msConvertURL(file, "specified", url); } console.log("Local file: " + file.name + " (" + file.size + ")"); blobList.push(file); } // for } // handlePaste See also Microsoft API
extensions ...
EventTarget.addEventListener() - Web APIs
fely detecting option support for details. Other notes Why use addEventListener()? addEventListener() is the way to register an event listener as specified in W3C DOM. The benefits are as follows: It allows adding more than a single handler for an event. This is particularly useful for AJAX libraries, JavaScript modules, or any other kind of code that needs to work well with other libraries/
extensions. It gives you finer-grained control of the phase when the listener is activated (capturing vs. bubbling). It works on any DOM element, not just HTML elements. The alternative, older way to register event listeners, is described below. Adding a listener during event dispatch If an EventListener is added to an EventTarget while it is processing an event, that event does not trigger the listen...
EventTarget - Web APIs
get() Creates a new EventTarget object instance. Methods 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 this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of
extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example Simple implementation of EventTarget var EventTarget = function() { this.listeners = {}; }; EventTarget.prototype.listeners = null; EventTarget.prototype.addEventListener =...
SourceBuffer.timestampOffset - Web APIs
nvalidStateError One or more of the SourceBuffer objects in MediaSource.sourceBuffers are being updated (i.e. their SourceBuffer.updating property is currently true), a media segment inside the SourceBuffer is currently being parsed, or this SourceBuffer has been removed from the MediaSource. Example TBD Specifications Specification Status Comment Media Source
ExtensionsThe definition of 'timestampOffset' in that specification. Recommendation Initial definition. ...
SourceBuffer.updating - Web APIs
ty of the SourceBuffer interface indicates whether the SourceBuffer is currently being updated -- i.e. whether an SourceBuffer.appendBuffer(), SourceBuffer.appendStream(), or SourceBuffer.remove() operation is currently in progress. Syntax var isUpdating = sourceBuffer.updating; Value A Boolean. Example TBD Specifications Specification Status Comment Media Source
ExtensionsThe definition of 'updating' in that specification. Recommendation Initial definition. ...
SourceBufferList: indexed property getter - Web APIs
List[index]; Parameters index The index position of the SourceBuffer object you want to return. Return value A SourceBuffer object. Exceptions No specific exceptions are thrown, but if the supplied index is great than or equal to SourceBufferList.length, the operation will return undefined. Example TBD. Specifications Specification Status Comment Media Source
ExtensionsThe definition of 'SourceBuffer() getter' in that specification. Recommendation Initial definition. ...
SourceBufferList - Web APIs
erList.onremovesourcebuffer The event handler for the removesourcebuffer event. Methods Inherits methods from its parent interface, EventTarget. SourceBufferList: indexed property getter This getter allows the SourceBuffer objects in the list to be accessed with an array operator (i.e. [].) Examples TBD. Specifications Specification Status Comment Media Source
ExtensionsThe definition of 'SourceBufferList' in that specification. Recommendation Initial definition. ...
Storage Access API - Web APIs
ccess to first-party storage was granted, and rejects if access was denied. Note: User interaction propagates to the Promise returned by both of these methods, allowing the callers to take actions that require user interaction without requiring a second click from the user. For example, a caller could open a pop-up window from the resolved Promise without triggering Firefox's pop-up blocker.
Extensions to <iframe> sandbox The <iframe> element's sandbox attribute has a new token, allow-storage-access-by-user-activation, which permits sandboxed <iframe>s to use the Storage Access API to request storage access. Specifications The API is currently only at the proposal stage -- the standardization process has yet to begin. You can currently find specification details of the API at Apple's Introdu...
Streams API - Web APIs
a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. Related stream APIs and operations ByteLengthQueuingStrategy Provides a built-in byte length queuing strategy that can be used when constructing streams. CountQueuingStrategy Provides a built-in chunk counting queuing strategy that can be used when constructing streams.
Extensions to other APIs Request When a new Request object is constructed, you can pass it a ReadableStream in the body property of its RequestInit dictionary. This Request could then be passed to a WindowOrWorkerGlobalScope.fetch() to commence fetching the stream. Body The response Body returned by a successful fetch request is exposed by default as a ReadableStream, and can have a reader attached t...
msManipulationViewsEnabled - Web APIs
ipulation features are support available, such as touch panning and zooming using CSS rules. This proprietary property is specific to Internet Explorer and Microsoft Edge. Value Returns true if manipulation features are support available, such as touch panning and zooming using CSS rules. Example Using a JSON file: { msManipulationViewsEnabled: true, } See also Touch API Microsoft API
extensions ...
URL.createObjectURL() - Web APIs
ing this. Important: If you still have code that relies on createObjectURL() to attach streams to media elements, you need to update your code to simply set srcObject to the MediaStream directly. Specifications Specification Status Comment File APIThe definition of 'createObjectURL()' in that specification. Working Draft Initial definition. Media Source
ExtensionsThe definition of 'URL' in that specification. Recommendation MediaSource extension. Older versions of this specification used createObjectURL() for MediaStream objects; this is no longer supported. ...
Using the User Timing API - Web APIs
" entry type and the "measure" entry type. mark events are named by the application and can be set at any location in an application. measure events are also named by the application but they are placed between two marks thus they are effectively a midpoint between two marks. This document shows how to create mark and measure performance entry types and how to use User Timing methods (which are
extensions of the Performance interface) to retrieve and remove entries from the browser's performance timeline. A live version of the examples is available on Github, as is the source code. Pull requests, enhancement requests and bug reports are welcome. Performance marks A performance mark is a named performance entry that is created by the application at some location in an application. The mark is a ...
WEBGL_color_buffer_float - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to WebGL 1 contexts only. For WebGL 2, use the EXT_color_buffer_float extension. The OES_texture_float extension implicitly enables this extension. Constants ext.RGBA32F_EXT RGBA 32-bit floating-point color-renderable format. ext.RGB32F_EXT ( ) RGB 32-bit floating-point color-renderable format. ...
WEBGL_compressed_texture_atc - Web APIs
The WEBGL_compressed_texture_atc extension is part of the WebGL API and exposes 3 ATC compressed texture formats. ATC is a proprietary compression algorithm for compressing textures on handheld devices. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: ATC compression is typically available on mobile devices with Adreno GPUs, that are currently only built into Qualcomm Snapdragon devices. This extension is available to both, WebGL1 and WebGL2 contexts. Constants The compressed texture formats are exposed by ...
WEBGL_debug_renderer_info - Web APIs
Generally, the graphics driver information should only be used in edge cases to optimize your WebGL content or to debug GPU problems. The WebGLRenderingContext.getParameter() method can help you to detect which features are supported and the failIfMajorPerformanceCaveat context attribute lets you control if a context should be returned at all, if the performance would be dramatically slow. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: Depending on the privacy settings of the browser, this extension might only be available to privileged contexts or not work at all. In Firefox, if privacy.resistFingerprinting is set to true, this
extensions is disabled. This extension is ava...
WEBGL_debug_shaders - Web APIs
The WEBGL_debug_shaders extension is part of the WebGL API and exposes a method to debug shaders from privileged contexts. This extension is not directly available to web sites as the way of how the shader is translated may uncover personally-identifiable information to the web page about the kind of graphics card in the user's computer. WebGL
extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also Using
Extensions in the WebGL tutorial. Availability: Depending on the privacy settings of the browser, this extension might only be available to privileged contexts. This extension is available to both, WebGL1 and WebGL2 contexts. Methods WEBGL_debug_shaders.getTranslatedShaderSource() Returns the translated shader source. Specification...
WEBGL_depth_texture - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. The constant in WebGL2 is gl.UNSIGNED_INT_24_8. Constants This extension adds a new constant: ext.UNSIGNED_INT_24_8_WEBGL Unsigned integer type for 24-bit depth texture data. ...
WEBGL_draw_buffers - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default. In WebGL 2, the constants are available without the "WEBGL" suffix and the new GLSL built-ins require GLSL #version 300 es. ...
WEBGL_lose_context - Web APIs
For more information, see also Using
Extensions in the WebGL tutorial. Availability: This extension is available to both, WebGL1 and WebGL2 contexts. Methods WEBGL_lose_context.loseContext() Simulates losing the context. WEBGL_lose_context.restoreContext() Simulates restoring the context. ...
WebGL2RenderingContext.fenceSync() - Web APIs
bGLSync object and inserts it into the GL command stream. Syntax WebGLSync gl.fenceSync(condition, flags); Parameters condition A GLenum specifying the condition that must be met to set the sync object's state to signaled. Must be gl.SYNC_GPU_COMMANDS_COMPLETE. flags A GLbitfield specifying a bitwise combination of flags controlling the behavior of the sync object. Must be 0 (exists for
extensions only). Return value A WebGLSync object. Examples gl must be a WebGL2RenderingContext. WebGLSync objects are not available in WebGL 1. var sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0); Specifications Specification Status Comment WebGL 2.0The definition of 'fenceSync' in that specification. Editor's Draft Initial definition for WebGL. OpenGL ...
WebGL2RenderingContext.waitSync() - Web APIs
s on the GL server until the given WebGLSync object is signaled. The method is a no-op in the absence of the possibility of synchronizing between multiple GL contexts. Syntax void gl.waitSync(sync, flags, timeout); Parameters sync A WebGLSync object on which to wait on. flags A GLbitfield specifying a bitwise combination of flags controlling the flushing behavior. Must be 0 (exists for
extensions only). timeout A GLint64 specifying a timeout the server should wait before continuing. Must be gl.TIMEOUT_IGNORED. Return value None. Examples var sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0); gl.waitSync(sync, 0, gl.TIMEOUT_IGNORED); Specifications Specification Status Comment WebGL 2.0The definition of 'waitSync' in that specification. Editor's Dra...
WebGLRenderingContext.getExtension() - Web APIs
The WebGLRenderingContext.getExtension() method enables a WebGL extension. Syntax gl.getExtension(name); Parameters name A String for the name of the WebGL extension to enable. Return value A WebGL extension object, or null if name does not match (case-insensitive) to one of the strings in WebGLRenderingContext.getSupported
Extensions. Examples Once a WebGL extension is enabled, you are able to use the methods, properties or constants that this extension object provides. var canvas = document.getElementById('canvas'); gl = canvas.getContext('webgl'); gl.getExtension('WEBGL_lose_context').loseContext(); WebGL
extensions Extensions for the WebGL API are registered in the WebGL Extension Registry. The current
extensions are: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffe...
WebGLRenderingContext.getParameter() - Web APIs
gl.UNPACK_IMAGE_HEIGHT GLint See pixelStorei. gl.UNPACK_ROW_LENGTH GLint See pixelStorei. gl.UNPACK_SKIP_IMAGES GLint See pixelStorei. gl.UNPACK_SKIP_PIXELS GLint See pixelStorei. gl.UNPACK_SKIP_ROWS GLint See pixelStorei. gl.VERTEX_ARRAY_BINDING WebGLVertexArrayObject or null See bindVertexArray. WebGL
extensions You can query the following pname parameters when using WebGL
extensions: Constant Returned type Extension Description ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT GLfloat EXT_texture_filter_anisotropic Maximum available anisotropy. ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES GLenum OES_standard_derivatives Accuracy of the derivative calculation for t...
WebGLRenderingContext - Web APIs
WebGLRenderingContext.drawArrays() Renders primitives from array data. WebGLRenderingContext.drawElements() Renders primitives from element array data. WebGLRenderingContext.finish() Blocks execution until all previously called commands are finished. WebGLRenderingContext.flush() Empties different buffer commands, causing all commands to be executed as quickly as possible. Working with
extensions These methods manage WebGL
extensions: WebGLRenderingContext.getSupported
Extensions() Returns an Array of DOMString elements with all the supported WebGL
extensions. WebGLRenderingContext.getExtension() Returns an extension object. Examples WebGL context feature detection In this first example we are going to check whether the browser supports WebGL. To that end we will try to obtain t...
Compressed texture formats - Web APIs
ad of texImage2D calls. Note that WebGL makes no functionality available to compress or decompress textures: they must already be in a compressed format and can then be directly uploaded to video memory. All formats support 2D textures. Which formats support TEXTURE_2D_ARRAY and TEXTURE_3D targets (in combination with compressedTexImage3D) are noted in the following table. Compressed texture
extensions and which targets they support. Extension Notes TEXTURE_2D_ARRAY TEXTURE_3D WEBGL_compressed_texture_astc Yes Yes WEBGL_compressed_texture_atc Not usable with compressedTexSubImage2D/copyTexSubImage2D. No No WEBGL_compressed_texture_etc Yes No WEBGL_compressed_texture_etc1* Not usable with compressedTexSubI...
WebGL types - Web APIs
integer. GLfloat unrestricted float 32-bit IEEE floating point number. GLclampf unrestricted float Clamped 32-bit IEEE floating point number. WebGL 2 These types are used within a WebGL2RenderingContext. All WebGL 1 types are used as well. Type Web IDL type Description GLint64 long long Signed 64-bit integer number. WebGL
extensions These types are used within WebGL
extensions. Type Web IDL type Description GLuint64EXT long long Unsigned 64-bit integer number. Specifications Specification Status Comment WebGL 1.0The definition of 'Types' in that specification. Recommendation Initial definition WebGL 2.0The definition of 'Types' in that specificati...
WebSocket - Web APIs
rl[, protocols]) Returns a newly created WebSocket object. Constants Constant Value WebSocket.CONNECTING 0 WebSocket.OPEN 1 WebSocket.CLOSING 2 WebSocket.CLOSED 3 Properties WebSocket.binaryType The binary data type used by the connection. WebSocket.bufferedAmount Read only The number of bytes of queued data. WebSocket.
extensions Read only The
extensions selected by the server. WebSocket.onclose An event listener to be called when the connection is closed. WebSocket.onerror An event listener to be called when an error occurs. WebSocket.onmessage An event listener to be called when a message is received from the server. WebSocket.onopen An event listener to be called when the connection is opened. WebSocket.prot...
WebXR Device API - Web APIs
n and/or orientation of the device changes, or when buttons are pressed or released. XRInputSourcesChangeEvent Sent to indicate that the set of available input sources has changed for the XRSession. XRReferenceSpaceEvent Sent when the state of an XRReferenceSpace changes. XRSessionEvent Sent to indicate that the state of an XRSession has changed. For example, if the position and/or orient
Extensions to the WebGL API The WebGL API is extended by the WebXR specification to augment the WebGL context to allow it to be used to render views for display by a WebXR device. WebGLRenderingContextBase.makeXRCompatibile() Configures the WebGL context to be compatible with WebXR. If the context was not initially created with the xrCompatible property set to true, you must call makeXRCompatible() pri...
Web Storage API - Web APIs
been done to avoid memory issues caused by excessive usage of web storage. Note: Access to Web Storage from third-party IFrames is denied if the user has disabled third-party cookies (Firefox implements this behaviour from version 43 onwards.) Note: Web Storage is not the same as mozStorage (Mozilla's XPCOM interfaces to SQLite) or the Session store API (an XPCOM storage utility for use by
extensions). Web Storage interfaces Storage Allows you to set, retrieve and remove data for a specific domain and storage type (session or local.) Window The Web Storage API extends the Window object with two new properties -- Window.sessionStorage and Window.localStorage -- which provide access to the current domain's session and local Storage objects respectively, and a Window.onstorage event hand...
Web Workers API - Web APIs
s, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server. They will also allow access to push notifications and background sync APIs. Chrome Workers are a Firefox-only type of worker that you can use if you are developing add-ons and want to use workers in
extensions and have access to js-ctypes in your worker. See ChromeWorker for more details. Audio Workers provide the ability for direct scripted audio processing to be done inside a web worker context. Note: As per the Web workers Spec, worker error events should not bubble (see bug 1188141. This has been implemented in Firefox 42. Web Worker interfaces AbstractWorker Abstracts properties and met...
window.postMessage() - Web APIs
compatibility check for both the IDN and punycode values when using this property if you expect messages from IDN sites. This value will eventually be consistently IDN, but for now you should handle both IDN and punycode forms. The value of the origin property when the sending window contains a javascript: or data: URL is the origin of the script that loaded the URL. Using window.postMessage in
extensions window.postMessage is available to JavaScript running in chrome code (e.g., in
extensions and privileged code), but the source property of the dispatched event is always null as a security restriction. (The other properties have their expected values.) It is not possible for content or web context scripts to specify a targetOrigin to communicate directly with an extension (either the backgrou...
Worker - Web APIs
kers, as long as those workers are hosted at the same origin as the parent page. (Note: nested workers are not yet implemented in WebKit). Not all interfaces and functions are available to scripts inside a Worker. Workers may use XMLHttpRequest for network communication, but its responseXML and channel attributes are always null. (fetch is also available, with no such restrictions.) In Firefox
extensions, if you want to use workers with access to js-ctypes, use ChromeWorker object instead. Constructors Worker() Creates a dedicated web worker that executes the script at the specified URL. This also works for Blob URLs. Properties Inherits properties from its parent, EventTarget, and implements properties from AbstractWorker. Event handlers AbstractWorker.onerror An EventListener call...
XSL Transformations in Mozilla FAQ - Web APIs
lied? Make sure the mime type for both source and stylesheet are set to an XML mimetype, namely text/xml or application/xml. The XSLT namespace is http://www.w3.org/1999/XSL/Transform. Use the <?xml-stylesheet ?> processing instruction instead of the non-standard xml:stylesheet. The most common cause is the MIME type handling. To find out which MIME type your server sends, look at Page Info, use
extensions like LiveHTTPHeaders or a download manager like wget. Mozilla won't load XSLT stylesheets from a different domain for security reasons. Note: Starting in Gecko 7.0, both text/xsl and application/xslt+xml are supported MIME types for XSLT media stylesheets. Note that Firefox will override your XSLT stylesheet if your XML is detected as an RSS or Atom feed. A known workaround is to add a suffic...
msCaching - Web APIs
od is specific to Internet Explorer and Microsoft Edge. Syntax cacheState = object.msCaching Values Type: DOMString Property value Description auto Disables caching for stream or ms-stream data. enabled Enables caching for stream or ms-stream data. disabled Disables caching for any data. See also msCachingEnabled Microsoft API
extensions ...
msCachingEnabled - Web APIs
c to Internet Explorer and Microsoft Edge. Syntax var cacheState = XMLHttpRequest.msCachingEnabled(); Parameters cacheState[out, retval] Type = boolean. If true, XMLHttpRequest is cached to disk. If false, it is not written to disk. Return value Type: boolean. If true, XMLHttpRequest is cached to disk. If false, it is not written to disk. See also msCaching property Microsoft API
extensions ...
msGetPropertyEnabled - Web APIs
led returns whether a given property in the style object is enabled. This proprietary method is specific to Internet Explorer browser. Syntax var retVal = style.msGetPropertyEnabled(name); Parameters name [in] Type: String The name of the property to enable. Return value Type: Boolean If false, the property is not enabled. If true, the property is enabled. See also Microsoft API
extensions ...
msGetRegionContent - Web APIs
] Type: MSRangeCollection The name of the property to enable. Return value Type: Boolean Returned ranges are sorted by document position and do not overlap. If an element is not a region, this method throws a DOMException with the InvalidAccessError error code. This is only available to regions that are document elements and not to regions that are pseudo-elements. See also Microsoft API
extensions ...
msPutPropertyEnabled - Web APIs
ernet Explorer and Microsoft Edge. Syntax var retval = style.msPutPropertyEnabled(propertyName, true); Parameters name[in]: Name of the property. (String) boolean[in]: True = Enable the property. False = Disable the property. Return value Type = HRESULT: If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See also CSS Style Declaration Microsoft API
extensions ...
msRegionOverflow - Web APIs
ontent from the named flow was fitted in regions with a lower content-order value. undefined: The element is not a region. When the region is an actual element, msRegionOverflow provides the ability to find out if content fully fits into the region or not. However, it is only available to regions that are document elements and not to regions that are pseudo-elements. See also Microsoft API
extensions ...
msWriteProfilerMark - Web APIs
ncludes a pointer to a window object, current markup, and the event name passed as bstrProfilerMarkName. The bstrProfilerMarkName property has a 32-character limit when called from script. This method is useful to profile real website performance by using the operating system metrics as a baseline. Example if (msWriteProfilerMark) { msWriteProfilerMark("Mark1"); } See also Microsoft API
extensions ...
mssitemodejumplistitemremoved - Web APIs
General info Synchronous No Bubbles No Cancelable No Note This event is raised once for every item that has been removed since the last time msSiteModeShowJumpList was called. This event is not triggered if msSiteModeClearJumpList has been called. Parameters pEvtObj [in] Type: IHTMLEventObj Pointer to an IHTMLEventObj interface for the current event. See also Microsoft API
extensions ...
msthumbnailclick - Web APIs
istener('msthumbnailclick', onButtonClicked, false); // add the buttons var btnPlay = window.external.msSiteModeAddThumbBarButton(iconUri, toolTip); // refresh the taskbar window.external.msSiteModeShowThumbBar(); // call a javascript function when the button is pressed function onButtonClicked(e) { switch (e.buttonID) { case btnPlay: play(); break;} } See also Microsoft API
extensions ...
ARIA: Complementary role - Accessibility
nsors"> <!-- content --> </aside> Redundant descriptions Screen readers will announce the type of role the landmark is. Because of this, you do not need to describe what the landmark is in its label. For example, a declaration of role="complementary" with an of aria-label="Sidebar" may be announced redundantly as, "complementary sidebar". Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA: Complementary role' in that specification. Recommendation ...
ARIA: contentinfo role - Accessibility
s an immediate descendant of the <body> element, using the <footer> element will automatically communicate a section has a role of contentinfo (save for a known issue in VoiceOver). If at all possible, prefer using <footer> instead. Note that a footer element nested within an article, aside, main, nav, or section is not considered contentinfo. Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'contentinfo landmark role' in that specification. Recommendation ...
ARIA: form role - Accessibility
need to describe what the landmark is in its label. For example, a declaration of role="form" with an of aria-label="Contact form" may be announced redundantly as, "contact form form". Best practices Prefer HTML Using the <form> element will automatically communicate a section has a role of form. If at all possible, prefer using it instead. Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA Form Role' in that specification. Recommendation ...
ARIA: Main role - Accessibility
ing an id attribute to the element with a declaration of role="main" allows it to be a target of a skip navigation link. <body> <a href="#main-content">Skip to main content</a> <!-- navigation and header content --> <div id="main-content" role="main"> <!-- main page content --> </div> </body> WebAIM: "Skip Navigation" Links Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA Navigtion Role' in that specification. Recommendation ...
ARIA: Navigation Role - Accessibility
</nav> </footer> Redundant descriptions Screen readers will announce the type of role the landmark is. Because of this, you do not need to describe what the landmark is in its label. For example, a declaration of role="navigation" with an of aria-label="Primary navigation" may be announced redundantly as, "primary navigation navigation". Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA Navigtion Role' in that specification. Recommendation ...
ARIA: Region role - Accessibility
ow text If there is a content area with tabindex="0", add role="region" to convey to screen reader users that is a generic region. This is done to allow keyboard-only users to scroll regions with overflow text. SVG role="region" can be declared on areas of SVG along with an aria-label to allow individual sections of the SVG to be described. Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA Region Role' in that specification. Recommendation WAI...
ARIA: search role - Accessibility
rch input --> </form> </footer> Redundant descriptions Screen readers will announce the type of role the landmark is. Because of this, you do not need to describe what the landmark is in its label. For example, a declaration of role="search" with an of aria-label="Sitewide search" may be announced redundantly as, "sitewide search search". Added benefits Certain technologies such as browser
extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. Landmarks browser extension Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA search role' in that specification. Recommendation WAI...
Accessibility: What users can do to browse more safely - Accessibility
ble fonts by choice Enable Page Zoom Turn off animated GIFs in the browser Browsers offer much power to their users; it's just a matter of knowing where to go. Using Firefox as an example, it explains that by changing the value the image.animation_mode from "normal" to "none", all animated images will be blocked. To reverse it, you will have to change the value back to "normal" Use browser
extensions Gif Blocker For Chrome, GIF Blocker is an extension available at the web store. Gif Scrubber Gif Scrubber is a chrome extension that allows you to control gifs like a video player. There is a Github repository for it at https://github.com/0ui/gif-scrubber Beeline Reader Beeline Reader has a browser extension that allows you to set up for grayscale and Dyslexi font, among other things Ta...
Accessibility FAQ - Accessibility
For interface design with XUL, follow the Accessibile XUL Authoring Guidelines (archive.org). I'm interested in helping promote the fine accessibility features that Firefox provides, what can I do? Join the Firefox Accessibility Advocates ...
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
The :-moz-locale-dir(ltr) CSS pseudo-class is a Mozilla extension that matches an element if the user interface is being displayed left-to-right. This is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "ltr". Note: This selector is mainly used by
extensions and themes to adapt the user interface based on the user's locale. (This can vary from window to window, and even from tab to tab.) It also allows
extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics. This selector does not work properly from HTML; it always matches, regardless of whether the UI locale is left-to-right or right-to-left. Syntax :-moz-local...
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
The :-moz-locale-dir(rtl) CSS pseudo-class is a Mozilla extension that matches an element if the user interface is being displayed right-to-left. This is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "rtl". Note: This selector is mainly used by
extensions and themes to adapt the user interface based on the user's locale. (This can vary from window to window, and even from tab to tab.) It also allows
extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics. This selector does not work properly from HTML; it never matches, no matter whether the UI locale is left-to-right or right-to-left. Syntax :-moz-locale-dir...
list-style-type - CSS: Cascading Style Sheets
tional Chinese formal numbering. E.g. ????????? trad-chinese-informal Traditional Chinese informal numbering. E.g. ????????? upper-armenian * Example disclosure-open Symbol indicating that a disclosure widget such as <details> is opened. disclosure-closed Symbol indicating that a disclosure widget, like <details> is closed. Non-standard
extensions A few more predefined types are provided by Mozilla (Firefox), Blink (Chrome and Opera) and WebKit (Safari) to support list types in other languages. See the compatibility table to check which browsers supports which extension. -moz-ethiopic-halehame Example -moz-ethiopic-halehame-am Example ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-er Example ethiopi...
overflow - CSS: Cascading Style Sheets
ntent fits inside the padding box, it looks the same as visible, but still establishes a new block formatting context. Desktop browsers provide scrollbars if content overflows. overlay Behaves the same as auto, but with the scrollbars drawn on top of content instead of taking up space. Only supported in WebKit-based (e.g., Safari) and Blink-based (e.g., Chrome or Opera) browsers. Mozilla
extensions -moz-scrollbars-none [1] Use overflow: hidden instead. -moz-scrollbars-horizontal [1] Use overflow-x: scroll and overflow-y: hidden, or overflow: hidden scroll instead. -moz-scrollbars-vertical [1] Use overflow-x: hidden and overflow-y: scroll, or overflow: scroll hidden instead. -moz-hidden-unscrollable Intended mainly for internal use and by themes. Disables scrolling of XML root...
EXSLT
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes EXSLT is a set of
extensions to XSLT. There are a number of modules; those that are supported by Firefox are listed below: Common (exsl)The EXSLT Common package provides basic functions that expand upon the capabilities of XSLT.Math (math)The EXSLT Math package provides functions for working with numeric values and comparing nodes.Regular expressions (regexp)The EXSLT Regular Expressions package provides functions that allow testing, matching, and replacing text using JavaScript style regular expressions.Sets (set)The EXSLT Sets package offers functions that let you perform set manipulation.Strings (str)The EXSLT Strings package provides functions that allow the manipulation of strings. EXSLT modules ...
Adding captions and subtitles to HTML5 video - Developer guides
menu li { padding:0; text-align:center; } .subtitles-menu li button { border:none; background:#000; color:#fff; cursor:pointer; width:90%; padding:2px 5px; border-radius:2px; } Styling the displayed subtitles One of the less well known about and supported features of WebVTT is the ability to style the individual subtitles (something called text cues) via CSS
Extensions. The ::cue pseudo-element is the key to targetting individual text track cues for styling, as it matches any defined cue. There are only a handful of CSS properties that can be applied to a text cue: color opacity visibility text-decoration text-shadow background shorthand properties outline shorthand properties font shorthand properties, including line-height white-space For exampl...
Setting up adaptive streaming media sources - Developer guides
HLS Encoding HTTP Live Streaming (HLS) is an HTTP-based media streaming protocol implemented by Apple. It's incorporated into iOS and OSX platforms and works well on mobile and desktop Safari and most Android devices with some caveats. Media is usually encoded as MPEG-4 (H.264 video and AAC audio) and packaged into an MPEG-2 Transport Stream, which is...
Index - Developer guides
t perform well. That is, to make it work quickly and efficiently. This lets it work effectively both for users of powerful desktop systems as well as for handheld devices with less power. There are several tools available to check the performance of a website or blog. The most notable tools are listed below. 37 Parsing and serializing XML AJAX, Add-ons, DOM, DOM Parsing, Document,
Extensions, Guide, HTMLDocument, JSON, Parsing, Parsing XML, Serializing, Serializing XML, XML, XMLDocument, XMLHttpRequest In this article, we'll look at the objects provided by the web platform to make the common tasks of serializing and parsing XML easy. 38 Printing DOM, Guide, NeedsContent, NeedsRelocation, printing There may be times in which your web site or application woul...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
e of the emotion you wish to convey. A color that comes from imagery associated with what your content is about. If you're creating a website about a given item or product, choose a color that's physically present on that item. Browse websites that let you look at lots of existing color palettes and images to find inspiration. When trying to decide upon a base color, you may find that browser
extensions that let you select colors from web content can be particularly handy. Some of these are even specifically designed to help with this sort of work. For example, the website ColorZilla offers an extension (Chrome / Firefox) that offers an eyedropper tool for picking colors from the web. It can also take averages of the colors of pixels in various sized areas or even a selected area of the page. ...
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
en bit rates on the basis of network performance, in order to keep a video playing. Browser Support Firefox 21 includes an implementation of DASH for HTML5 WebM video which is turned off by default. It can be enabled via "about:config" and the "media.dash.enabled" preference. Firefox 23 removed support for DASH for HTML5 WebM video. It will be replaced by an implementation of the Media Source
Extensions API which will allow support for DASH via Javascript libraries such as dash.js. See bug 778617 for details. Using DASH - Server Side First you'll need to convert your WebM video to a DASH manifest with the accompanying video files in various bit rates. To start with you'll only need the ffpmeg program from ffmpeg.org, with libvpx and libvorbis support for WebM video and audio, at least version ...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
h The amount of space in pixels between the frame's content and its left and right borders. scrolling Indicates when the browser should provide a scrollbar for the frame: auto: Only when the frame's content is larger than its dimensions. yes: Always show a scrollbar. no: Never show a scrollbar. Non-standard attributes mozbrowser See bug 1318532 for exposing this to Web
Extensions in Firefox. Makes the <iframe> act like a top-level browser window. See Browser API for details. Available only to Web
Extensions. Scripting Inline frames, like <frame> elements, are included in the window.frames pseudo-array. With the DOM HTMLIFrameElement object, scripts can access the window object of the framed resource via the contentWindow property. The contentDocument property refers ...
Standard metadata names - HTML: Hypertext Markup Language
Disabling zooming capabilities by setting user-scalable to a value of no prevents people experiencing low vision conditions from being able to read and understand page content. MDN Understanding WCAG, Guideline 1.4 explanations Understanding Success Criterion 1.4.4 | W3C Understanding WCAG 2.0 See also The @viewport CSS at-rule. Other metadata names The WHATWG Wiki Meta
Extensions page contains a large set of non-standard metadata names that have not been formally accepted yet; however, some of the names included there are already used quite commonly in practice -- including the following: creator: the name of the creator of the document, such as an organization or institution. If there are more than one, several <meta> elements should be used. googlebot, a synonym of ...
<video>: The Video Embed element - HTML: Hypertext Markup Language
decs="vp8, vorbis", which says that the file is a WebM video using VP8 for its video and Vorbis for audio. Server support for video If the MIME type for the video is not set correctly on the server, the video may not show or show a gray box containing an X (if JavaScript is enabled). If you use Apache Web Server to serve Ogg Theora videos, you can fix this problem by adding the video file type
extensions to "video/ogg" MIME type. The most common video file type
extensions are ".ogm", ".ogv", or ".ogg". To do this, edit the "mime.types" file in "/etc/apache" or use the "AddType" configuration directive in httpd.conf. AddType video/ogg .ogm AddType video/ogg .ogv AddType video/ogg .ogg If you serve your videos as WebM, you can fix this problem for the Apache Web Server by adding the extension us...
itemprop - HTML: Hypertext Markup Language
m it must be: A string that contains no "." (U+002E FULL STOP) characters and no ":" characters (U+003A COLON) and is used as a proprietary item property name (again, one not defined in a public specification). Note: the rules above disallow ":" characters in non-URL values because otherwise they could not be distinguished from URLs. Values with "." characters are reserved for future
extensions. Space characters are disallowed because otherwise the values would be parsed as multiple tokens. Values The property value of a name-value pair is as given for the first matching case in the following list: If the element has an itemscope attribute The value is the item created by the element. If the element is a meta element The value is the value of the element's conten...
Microdata - HTML: Hypertext Markup Language
le, Microsoft, and Yahoo! rely on the schema.org vocabulary to improve search results. For some purposes, an ad-hoc vocabulary is adequate. For others, a vocabulary will need to be designed. Where possible, authors are encouraged to re-use existing vocabularies, as this makes content re-use easier. Localization In some cases, search engines covering specific regions may provide locally-specific
extensions of microdata. For example, Yandex, a major search engine in Russia, supports microformats such as hCard (company contact information), hRecipe (food recipe), hReview (market reviews) and hProduct (product data) and provides its own format for the definition of the terms and encyclopedic articles. This extension was made to solve transliteration problems between the Cyrillic and Latin alphabets. D...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
file. image: Image file. object: A resource to be embedded inside an <object> element. script: JavaScript file. style: CSS stylesheet. track: WebVTT file. worker: A JavaScript web worker or shared worker. video: Video file, as typically used in <video>. Note: There's more detail about these values and the web features they expect to be consumed by in the Preload spec -- see link element
extensions. Also note that the full list of values the as attribute can take is governed by the Fetch spec -- see request destinations. Including a MIME type <link> elements can accept a type attribute, which contains the MIME type of the resource the element points to. This is especially useful when preloading resources -- the browser will use the type attribute value to work out if it supports that res...
Common MIME types - HTTP
Two primary MIME types are important for the role of default types: text/plain is the default value for textual files. A textual file should be human-readable and must not contain binary data. application/octet-stream is the default value for all other cases. An unknown file type should use this type. Browsers pay a particular care when manipulating these files, attempting to safeguard the user to prevent dangerous behaviors. IANA is the official registry of MIME media types and maintains a list of all the official MIME types. ...
MIME types (IANA media types) - HTTP
It is defined and standardized in IETF's RFC 6838. The Internet Assigned Numbers Authority (IANA) is responsible for all official MIME types, and you can find the most up-to-date and complete list at their Media Types page. Important: Browsers use the MIME type, not the file extension, to determine how to process a URL, so it's important that web servers send the correct MIME type in the response's Content-Type header. ...
Using HTTP cookies - HTTP
eb. See for example the types of cookies used by Google. A third party server can build up a profile of a user's browsing history and habits based on cookies sent to it by the same browser when accessing multiple sites. Firefox, by default, blocks third-party cookies that are known to contain trackers. Third-party cookies (or just tracking cookies) may also be blocked by other browser settings or
extensions. Cookie blocking can cause some third-party components (such as social media widgets) to not function as intended. Cookie-related regulations Legislation or regulations that cover the use of cookies include: The General Data Privacy Regulation (GDPR) in the European Union The ePrivacy Directive in the EU The California Consumer Privacy Act These regulations have global reach, because the...
Cache-Control - HTTP
TTP request occurs each time, but it can skip downloading HTTP body if the content is valid. Cache-Control: no-cache Cache-Control: no-cache, max-age=0 Specifications Specification Status Comment RFC 8246: HTTP Immutable Responses IETF RFC RFC 7234: Hypertext Transfer Protocol (HTTP/1.1): Caching IETF RFC RFC 5861: HTTP Cache-Control
Extensions for Stale Content IETF RFC Initial definition ...
Feature-Policy - HTTP
h a NotAllowedError if permission is not obtained to capture the display's contents. document-domain Controls whether the current document is allowed to set document.domain. When this policy is disabled, attempting to set document.domain will fail and cause a SecurityError DOMException to be be thrown. encrypted-media Controls whether the current document is allowed to use the Encrypted Media
Extensions API (EME). When this policy is disabled, the Promise returned by Navigator.requestMediaKeySystemAccess() will reject with a DOMException. execution-while-not-rendered Controls whether tasks should execute in frames while they're not being rendered (e.g. if an iframe is hidden or display: none). execution-while-out-of-viewport Controls whether tasks should execute in frames while they're outsi...
Index - HTTP
d to use video input devices. When this policy is enabled, the Promise returned by MediaDevices.getUserMedia() will reject with a NotAllowedError. 66 Feature-Policy: encrypted-media Directive, EME, Feature Policy, Feature-Policy, HTTP, Reference The HTTP Feature-Policy header encrypted-media directive controls whether the current document is allowed to use the Encrypted Media
Extensions API (EME). When this policy is enabled, the Promise returned by Navigator.requestMediaKeySystemAccess() will reject with a DOMException. 67 Feature-Policy: fullscreen Feature Policy, Feature-Policy, HTTP, fullscreen, header The HTTP Feature-Policy header fullscreen directive controls whether the current document is allowed to use Element.requestFullScreen(). When this policy...
User-Agent - HTTP
ase read Browser detection using the user agent for why serving different Web pages or services to different browsers is usually a bad idea. Header type Request header Forbidden header name no Syntax User-Agent: <product> / <product-version> <comment> Common format for web browsers: User-Agent: Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <
extensions> Directives <product> A product identifier -- its name or development codename. <product-version> Version number of the product. <comment> Zero or more comments containing more details; sub-product information, for example. Firefox UA string For more on Firefox- and Gecko-based user agent strings, see the Firefox user agent string reference. The UA string of Firefox is broken down int...
HTTP headers - HTTP
endpoint for the browser to send warning and error reports to. Transfer coding Transfer-Encoding Specifies the form of encoding used to safely transfer the entity to the user. TE Specifies the transfer encodings the user agent is willing to accept. Trailer Allows the sender to include additional fields at the end of chunked message. WebSockets Sec-WebSocket-Key ... Sec-WebSocket-
Extensions ... Sec-WebSocket-Accept ... Sec-WebSocket-Protocol ... Sec-WebSocket-Version ... Other Accept-Push-Policy A client can express the desired push policy for a request by sending an Accept-Push-Policy header field in the request. Accept-Signature A client can send the Accept-Signature header field to indicate intention to take advantage of any available signatures and to indicate...
POST - HTTP
oundary Content-Disposition: form-data; name="field1" value1 --boundary Content-Disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- Specifications Specification Title RFC 7231, section 4.3.3: POST Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content RFC 2046, section 5.1.1: Common Syntax Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types ...
422 Unprocessable Entity - HTTP
the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. Important: The client should not repeat this request without modification. Status 422 Unprocessable Entity Specifications Specification Title RFC 4918, section 11.2: 422 Unprocessable Entity HTTP
Extensions for Web Distributed Authoring and Versioning (WebDAV) ...
510 Not Extended - HTTP
The HyperText Transfer Protocol (HTTP) 510 Not Extended response status code is sent in the context of the HTTP Extension Framework, defined in RFC 2774. In that specification a client may send a request that contains an extension declaration, that describes the extension to be used. If the server receives such a request, but any described
extensions are not supported for the request, then the server responds with the 510 status code. Status 510 Not Extended Specifications Specification Title RFC 2774, section 7: 510 Not Extended An HTTP Extension Framework ...
HTTP response status codes - HTTP
negotiation itself, and is therefore not a proper end point in the negotiation process. 507 Insufficient Storage (WebDAV) The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. 508 Loop Detected (WebDAV) The server detected an infinite loop while processing the request. 510 Not Extended Further
extensions to the request are required for the server to fulfil it. 511 Network Authentication Required The 511 status code indicates that the client needs to authenticate to gain network access. ...
Meta programming - JavaScript
handler.setPrototypeOf() Object.setPrototypeOf() Reflect.setPrototypeOf() If target is not extensible, the prototype parameter must be the same value as Object.getPrototypeOf(target). handler.isExtensible() Object.isExtensible() Reflect.isExtensible() Object.isExtensible(proxy) must return the same value as Object.isExtensible(target). handler.prevent
Extensions() Object.prevent
Extensions() Reflect.prevent
Extensions() Object.prevent
Extensions(proxy) only returns true if Object.isExtensible(proxy) is false. handler.getOwnPropertyDescriptor() Object.getOwnPropertyDescriptor() Reflect.getOwnPropertyDescriptor() getOwnPropertyDescriptor must return an object or undefined. A property cannot be reported as non-exist...
Regular expression syntax cheatsheet - JavaScript
eBinaryPropertyName} // Negation: \P is negated \p \P{UnicodePropertyValue} \P{UnicodeBinaryPropertyName} UnicodeBinaryPropertyName The name of a binary property. E.g.: ASCII, Alpha, Math, Diacritic, Emoji, Hex_Digit, Math, White_space, etc. See Unicode Data PropList.txt for more info. UnicodePropertyName The name of a non-binary property: General_Category (gc) Script (sc) Script_
Extensions (scx) See also PropertyValueAliases.txt UnicodePropertyValue One of the tokens listed in the Values section, below. Many values have aliases or shorthand (e.g. the value Decimal_Number for the General_Category property may be written Nd, digit, or Decimal_Number). For most values, the UnicodePropertyName part and equals sign may be omitted. If a UnicodePropertyName is specified, the value m...
Deprecated and obsolete features - JavaScript
re expected to be removed entirely sometime in the future. You should work to remove their use from your code. RegExp properties the following properties are deprecated. This does not affect their use in replacement strings: Property Description $1-$9 Parenthesized substring matches, if any. Warning: Using these properties can result in problems, since browser
extensions can modify them. Avoid them! $_ See input. $* See multiline. $& See lastMatch. $+ See lastParen. $` See leftContext. $' See rightContext. input The string against which a regular expression is matched. lastMatch The last matched characters. lastParen The last parenthesized substring mat...
Function.prototype.bind() - JavaScript
heir original values. The partial implementation creates functions that do not have immutable "poison pill" caller and arguments properties that throw a TypeError upon get, set, or deletion. (This could be added if the implementation supports Object.defineProperty, or partially implemented [without throw-on-delete behavior] if the implementation supports the __defineGetter__ and __defineSetter__
extensions.) The partial implementation creates functions that have a prototype property. (Proper bound functions have none.) The partial implementation creates bound functions whose length property does not agree with that mandated by ECMA-262: it creates functions with length of 0. A full implementation--depending on the length of the target function and the number of pre-specified arguments--may return...
Object.isExtensible() - JavaScript
ject.isExtensible(obj) Parameters obj The object which should be checked. Return value A Boolean indicating whether or not the given object is extensible. Description Objects are extensible by default: they can have new properties added to them, and (in engines that support __proto__) their __proto__ property can be modified. An object can be marked as non-extensible using Object.prevent
Extensions(), Object.seal(), or Object.freeze(). Examples Using Object.isExtensible // New objects are extensible. var empty = {}; Object.isExtensible(empty); // === true // ...but that can be changed. Object.prevent
Extensions(empty); Object.isExtensible(empty); // === false // Sealed objects are by definition non-extensible. var sealed = Object.seal({}); Object.isExtensible(sealed); // === false // F...
Object.isSealed() - JavaScript
ect is sealed, otherwise false. An object is sealed if it is not extensible and if all its properties are non-configurable and therefore not removable (but not necessarily non-writable). Examples Using Object.isSealed // Objects aren't sealed by default. var empty = {}; Object.isSealed(empty); // === false // If you make an empty object non-extensible, // it is vacuously sealed. Object.prevent
Extensions(empty); Object.isSealed(empty); // === true // The same is not true of a non-empty object, // unless its properties are all non-configurable. var hasProp = { fee: 'fie foe fum' }; Object.prevent
Extensions(hasProp); Object.isSealed(hasProp); // === false // But make them all non-configurable // and the object becomes sealed. Object.defineProperty(hasProp, 'fee', { configurable: false }); Objec...
Object - JavaScript
ich differs from both Abstract Equality Comparison and Strict Equality Comparison). Object.isExtensible() Determines if extending of an object is allowed. Object.isFrozen() Determines if an object was frozen. Object.isSealed() Determines if an object is sealed. Object.keys() Returns an array containing the names of all of the given object's own enumerable string properties. Object.prevent
Extensions() Prevents any
extensions of an object. Object.seal() Prevents other code from deleting properties of an object. Object.setPrototypeOf() Sets the object's prototype (its internal [[Prototype]] property). Object.values() Returns an array containing the values that correspond to all of a given object's own enumerable string properties. Instance properties Object.prototype.constructor S...
handler.has() - JavaScript
object and the target object is not extensible. Examples Trapping the in operator The following code traps the in operator. const p = new Proxy({}, { has: function(target, prop) { console.log('called: ' + prop); return true; } }); console.log('a' in p); // "called: a" // true The following code violates an invariant. const obj = { a: 10 }; Object.prevent
Extensions(obj); const p = new Proxy(obj, { has: function(target, prop) { return false; } }); 'a' in p; // TypeError is thrown Specifications Specification ECMAScript (ECMA-262)The definition of '[[HasProperty]]' in that specification. ...
Proxy() constructor - JavaScript
ndler.get() A trap for getting property values. handler.getOwnPropertyDescriptor() A trap for Object.getOwnPropertyDescriptor. handler.getPrototypeOf() A trap for Object.getPrototypeOf. handler.has() A trap for the in operator. handler.isExtensible() A trap for Object.isExtensible. handler.ownKeys() A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols. handler.prevent
Extensions() A trap for Object.prevent
Extensions. handler.set() A trap for setting property values. handler.setPrototypeOf() A trap for Object.setPrototypeOf. Examples Selectively proxy property accessors In this example the target has two properties, notProxied and proxied. We define a handler that returns a different value for proxied, and lets any other accesses through to the target. const tar...
Comparing Reflect and Object methods - JavaScript
s extensible, and false if it is not. Throws a TypeError in ES5 if the first argument is not an object (a primitive). In ES2015, it will be coerced into a non-extensible, ordinary object and will return false. Reflect.isExtensible() returns true if the object is extensible, and false if it is not. Throws a TypeError if the first argument is not an object (a primitive). prevent
Extensions() Object.prevent
Extensions() returns the object that is being made non-extensible. Throws a TypeErrorin ES5 if the argument is not an object (a primitive). In ES2015, treats the argument as a non-extensible, ordinary object and returns the object itself. Reflect.prevent
Extensions() returns true if the object has been made non-extensible, and false if it has not. Throws a TypeError ...
Reflect.isExtensible() - JavaScript
Description The Reflect.isExtensible method allows you determine if an object is extensible (whether it can have new properties added to it). It is the same method as Object.isExtensible(). Examples Using Reflect.isExtensible() See also Object.isExtensible(). // New objects are extensible. let empty = {} Reflect.isExtensible(empty) // === true // ...but that can be changed. Reflect.prevent
Extensions(empty) Reflect.isExtensible(empty) // === false // Sealed objects are by definition non-extensible. let sealed = Object.seal({}) Reflect.isExtensible(sealed) // === false // Frozen objects are also by definition non-extensible. let frozen = Object.freeze({}) Reflect.isExtensible(frozen) // === false Difference to Object.isExtensible() If the target argument to this method is not an object...
Reflect - JavaScript
as(target, propertyKey) Returns a Boolean indicating whether the target has the property. Either as own or inherited. Works like the in operator as a function. Reflect.isExtensible(target) Same as Object.isExtensible(). Returns a Boolean that is true if the target is extensible. Reflect.ownKeys(target) Returns an array of the target object's own (not inherited) property keys. Reflect.prevent
Extensions(target) Similar to Object.prevent
Extensions(). Returns a Boolean that is true if the update was successful. Reflect.set(target, propertyKey, value[, receiver]) A function that assigns values to properties. Returns a Boolean that is true if the update was successful. Reflect.setPrototypeOf(target, prototype) A function that sets the prototype of an object. Returns a Boolean that is true if th...
Web app manifests
ests are deployed in your HTML pages using a <link> element in the <head> of a document: <link rel="manifest" href="/manifest.webmanifest"> Note: The .webmanifest extension is specified in the Media type registration section of the specification (the response of the manifest file should return Content-Type: application/manifest+json). Browsers generally support manifests with other appropriate
extensions like .json (Content-Type: application/json). Note: If the manifest requires credentials to fetch - the crossorigin attribute must be set to use-credentials, even if the manifest file is in the same origin as the current page. Splash screens In Chrome 47 and later, a splash screen is displayed for sites launched from a homescreen. This splashscreen is auto-generated from properties in the we...
<math> - MathML
b</mi> <mn>2</mn> </msup> </mrow> <mo>=</mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </mrow> </math> </body> </html> Notes: XHTML documents with MathML must be served as application/xhtml+xml. You can achieve that easily by adding the .xhtml extension to your local files. For Apache servers you can configure your .htaccess file to map
extensions to the correct Mime type. Since you notate your MathML in an XML document, also be sure you write a well-formed XML document. Specifications Specification Status Comment MathML 3.0The definition of 'The Top-Level math Element' in that specification. Recommendation Current specification MathML 2.0The definition of 'The Top-Level math Element' in that sp...
Autoplay guide for media and Web Audio APIs - Web media technologies
Element.allowedToPlay property is exposed to the web. This is currently false by default (except in nightly builds, where it's true by default). If this is false, the allowedToPlay property is missing from the HTMLMediaElement interface, and is thus not present on either <audio> or <video> elements. media.autoplay.allow-extension-background-pages This Boolean preference, if true, allows browser
extensions' background scripts to autoplay audio media. Setting this value to false disables this capability. The default value is true. media.autoplay.allow-muted A Boolean preference which if true (the default) allows audio media which is currently muted to be automatically played. If this has been changed to false, media with an audio track will not be permitted to play even if muted. media.autoplay.b...
Codecs used by WebRTC - Web media technologies
t a sample rate of 8,000 Hz, yielding a bit rate of 64 kbps. Both u-law and A-law encodings are allowed. G.711 is defined by the ITU and its payload format is defined in RFC 3551: 4.5.14. WebRTC requires that G.711 use 8-bit samples at the standard 64 kbps rate, even though G.711 supports some other variations. Neither G.711.0 (lossless compression), G.711.1 (wideband capability), nor any other
extensions to the G.711 standard are mandated by WebRTC. Due to its low sample rate and sample size, G.711 audio quality is generally considered poor by modern standards, even though it's roughly equivalent to what a landline telephone sounds like. It is generally used as a least common denominator to ensure that browsers can achieve an audio connection regardless of platforms and browsers, or as a fallbac...
The "codecs" parameter in common media types - Web media technologies
video and/or Vorbis audio. video/mp4; codecs="avc1.4d002a" An MPEG-4 file containing AVC (H.264) video, Main Profile, Level 4.2. As is the case with any MIME type parameter, codecs must be changed to codecs* (note the asterisk character, *) if any of the properties of the codec use special characters which must be percent-encoded per RFC 2231, section 4: MIME Parameter Value and Encoded Word
Extensions. You can use the JavaScript encodeURI() function to encode the parameter list; similarly, you can use decodeURI() to decode a previously encoded parameter list. When the codecs parameter is used, the specified list of codecs must include every codec used for the contents of the file. The list may also contain codecs not present in the file.= Codec options by container The containers below su...
Web Performance
formance considerations. Using Performance APIs Performance API This guide describes how to use the Performance interfaces that are defined in the High-Resolution Time standard. Resource Timing API Resource loading and timing the loading of those resources, including managing the resource buffer and coping with CORS The performance timeline The Performance Timeline standard defines
extensions to the Performance interface to support client-side latency measurements within applications. Together, these interfaces can be used to help identify an application's performance bottlenecks. User Timing API Create application specific timestamps using the user timing API's "mark" and "measure" entry types - that are part of the browser's performance timeline. Frame Timing API The Performance...
Add to Home screen - Progressive web apps (PWAs)
directory (in the root is probably best) with the name somefilename.webmanifest (we've chosen manifest.webmanifest). It contains multiple fields that define certain information about the web app and how it should behave. Note: The .webmanifest extension is specified in the Media type registration section of the specification, but generally browsers will support manifests with other appropriate
extensions, e.g. .json. The fields needed for A2HS are as follows: background_color: Specifies a background color to be used in some app contexts. The most relevant one to A2HS is the splash screen displayed when the app icon on the Home screen is tapped and it first starts to load (this currently appears only when apps have been added to the Home screen by Chrome). display: Specifies how the app shou...
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
The SVG conditional processing attributes are all the attributes that can be specified on some SVG elements to control whether or not the element on which it appears should be rendered. externalResourcesRequired required
Extensions requiredFeatures systemLanguage Attributes externalResourcesRequired Deprecated since SVG 2 If set to true, it indicates that the browser must wait for all the external resources necessary to render that element to be loaded before processing the associated element. Value: false|true; Animatable: No required
Extensions List all the browser specific capabilities that must be supported by the borwser to be allowed to render the associated element. Value: A list of space-separated URI; Animatable: No requiredFeatures Deprecated since SVG 2 List all ...
requiredFeatures - SVG: Scalable Vector Graphics
. http://www.w3.org/TR/SVG11/feature#BasicStructure The browser supports <svg>, <g>, <defs>, <desc>, <title>, <metadata> and <use> elements. http://www.w3.org/TR/SVG11/feature#ContainerAttribute The browser supports the enable-background attribute http://www.w3.org/TR/SVG11/feature#ConditionalProcessing The browser supports the <switch> element, and the requiredFeatures, required
Extensions, systemLanguage attributes http://www.w3.org/TR/SVG11/feature#Image The browser supports the <image> element. http://www.w3.org/TR/SVG11/feature#Style The browser supports the <style> element. http://www.w3.org/TR/SVG11/feature#ViewportAttribute The browser supports the clip and overflow attributes. http://www.w3.org/TR/SVG11/feature#Shape The browser supports the <rect>, ...
<a> - SVG: Scalable Vector Graphics
none; Animatable: yes xlink:href Deprecated since SVG 2 The URL or URL fragment that the hyperlink points to. May be required for backwards compatibility for older browsers. ...
<altGlyph> - SVG: Scalable Vector Graphics
et of alternate glyphs is located from processing the <altGlyphDef> element, then those alternate glyphs are rendered instead of the character(s) that are inside of the <altGlyph> element. ...
<circle> - SVG: Scalable Vector Graphics
e's circumference, in user units. Value type: <number> ; Default value: none; Animatable: yes Note: Starting with SVG2, cx, cy, and r are Geometry Properties, meaning those attributes can also be used as CSS properties for that element. ...
<ellipse> - SVG: Scalable Vector Graphics
h for the path, in user units. Value type: <number> ; Default value: none; Animatable: yes Note: Starting with SVG2 cx, cy, rx and ry are Geometry Properties, meaning those attributes can also be used as CSS properties for that element. ...
<foreignObject> - SVG: Scalable Vector Graphics
oreignObject. Value type: <length>|<percentage> ; Default value: 0; Animatable: yes Note: Starting with SVG2, x, y, width, and height are Geometry Properties, meaning those attributes can also be used as CSS properties for that element. ...
<g> - SVG: Scalable Vector Graphics
to inherit presentation attributes --> <g fill="white" stroke="green" stroke-width="5"> <circle cx="40" cy="40" r="25" /> <circle cx="60" cy="60" r="25" /> </g> </svg> Attributes This element only includes global attributes Global attributes Core Attributes Most notably: id, tabindex Styling Attributes class, style Conditional Processing Attributes Most notably: required
Extensions, systemLanguage Event Attributes Global event attributes, Graphical event attributes Presentation Attributes Most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stro...
<line> - SVG: Scalable Vector Graphics
axis coordinate of the line ending point. Value type: <length>|<percentage>|<number> ; Default value: 0; Animatable: yes pathLength Defines the total path length in user units. ...
<marker> - SVG: Scalable Vector Graphics
alue type: top|center|bottom|<coordinate> ; Default value: 0; Animatable: yes viewBox This attribute defines the bound of the SVG viewport for the current SVG fragment. ...
<mask> - SVG: Scalable Vector Graphics
y-axis coordinate of the top-left corner of the masking area. Value type: <coordinate> ; Default value: -10%; Animatable: yes width This attribute defines the width of the masking area. ...
<path> - SVG: Scalable Vector Graphics
es the shape of the path. Value type: <string> ; Default value: ''; Animatable: yes pathLength This attribute lets authors specify the total length for the path, in user units. ...
<pattern> - SVG: Scalable Vector Graphics
, if both href and xlink:href are set, xlink:href will be ignored and only href will be used. y This attribute determines the y coordinate shift of the pattern tile. ...
<polygon> - SVG: Scalable Vector Graphics
s) required to draw the polygon. Value type: <number>+ ; Default value: ""; Animatable: yes pathLength This attribute lets specify the total length for the path, in user units. ...
<polyline> - SVG: Scalable Vector Graphics
s) required to draw the polyline Value type: <number>+ ; Default value: ""; Animatable: yes pathLength This attribute lets specify the total length for the path, in user units. ...
<rect> - SVG: Scalable Vector Graphics
, in user units. Value type: <number> ; Default value: none; Animatable: yes Note: Starting with SVG2, x, y, width, height, rx and ry are Geometry Properties, meaning those attributes can also be used as CSS properties for that element. ...
<svg> - SVG: Scalable Vector Graphics
ect on outermost svg elements. Value type: <length>|<percentage> ; Default value: 0; Animatable: yes Note: Starting with SVG2, x, y, width, and height are Geometry Properties, meaning these attributes can also be used as CSS properties. ...
<switch> - SVG: Scalable Vector Graphics
Other direct children will be bypassed and therefore not rendered. If a child element is a container element, like <g>, then its subtree is also processed/rendered or bypassed/not rendered. The display and visibility properties have no effect on <switch> element processing. In particular, setting display:none on a child has no effect on the true/false testing for <switch> processing. ...
<tspan> - SVG: Scalable Vector Graphics
y the textLength attribute. Value type: spacing|spacingAndGlyphs; Default value: spacing; Animatable: yes textLength A width that the text should be scaled to fit. ...
<use> - SVG: Scalable Vector Graphics
viewbox - i.e. they only have an effect when use refers to a svg or symbol element. Note: Starting with SVG2, x, y, width, and height are Geometry Properties, meaning those attributes can also be used as CSS properties for that element. ...
Specification Deviations - SVG: Scalable Vector Graphics
The 'class' and 'style' attributes Unlike HTML and MathML, the SVG specification does not specify the 'style' and 'class' attributes on all SVG elements. Nevertheless, to allow Mozilla to more cleanly share internal 'class' and 'style' related code, we will implement these attributes on all SVG elements as of Firefox 3. ...
Introduction - SVG: Scalable Vector Graphics
ransformed, composited together, or filtered to change their appearance completely. SVG came about in 1999 after several competing formats had been submitted to the W3C and failed to be fully ratified. SVG is supported by all major browsers. A downside is loading SVG can be slow. SVG does offer benefits, some of which include having a DOM interface available for it, and not requiring third-party
extensions. Whether or not to use it often depends on your specific use case. Basic ingredients HTML provides elements for defining headers, paragraphs, tables, and so on. In much the same way SVG provides elements for circles, rectangles, and simple and complex curves. A simple SVG document consists of nothing more than the <svg> root element and several basic shapes that build a graphic together. In...
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
Symptoms Previously you were able to open and display SVG content with Mozilla, but for no apparent reason its behaviour changes and now it always pops up the "Open or Save File" dialog when you try to open local SVG files, and displays the "Additional plugins are required to display all the media on this page" bar when you try to view HTML with embedded SVG. ...
Features restricted to secure contexts - Web security
precation WebKit bug 182442 Restricted to secure contexts in Firefox 62 Geolocation Restricted to secure contexts in 50 Restricted to secure contexts in 10 Restricted to secure contexts in 55 Device Orientaion / Device Motion Deprecation warning Deprecation warnings since 60. Note that these apply to secure contexts as well. Encrypted Media
Extensions Restricted to secure contexts in 58 Planned. getUserMedia() Restricted to secure contexts in Chrome 47 Temporary access available only (users cannot choose "Remember this decision" in the permission request dialog). Restricted to secure contexts in Firefox 68. Notifications Restricted to secure contexts in Chrome 62 Restricted t...
Index - XPath
olean value of true. 54 unparsed-entity-url XSLT, XSLT_Reference The unparsed-entity-url() function returns the URI of the unparsed entity with the given name. This is non-XML data referenced in the DTD of the source document. 55 Index Index, Reference, XPath, XSLT Found 57 pages: 56 Introduction to using XPath in JavaScript Add-ons, DOM,
Extensions, JavaScript, Transforming_XML_with_XSLT, Web Development, XML, XPath, XSLT This document describes the interface for using XPath in JavaScript internally, in
extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath, which means that XPath expressions can be run against both HTML and XML documents. 57 XPath snippets Example, Snippets, XML, XPath, XSLT...