Search completed in 1.22 seconds.
1724 results for "gecko":
Your results are loading. Please wait...
Gecko FAQ - Gecko Redirect 1
What is a layout engine? Basically, a layout engine takes content (such as HTML, XML, image files, applets, and so on) and formatting information (such as Cascading Style Sheets, presentational HTML tags, etc.) and displays the formatted content on the screen. ...
... What is a layout engine? Basically, a layout engine takes content (such as HTML, XML, image files, applets, and so on) and formatting information (such as Cascading Style Sheets, presentational HTML tags, etc.) and displays the formatted content on the screen. ...
... What is a layout engine? Basically, a layout engine takes content (such as HTML, XML, image files, applets, and so on) and formatting information (such as Cascading Style Sheets, presentational HTML tags, etc.) and displays the formatted content on the screen. ...
...And 30 more matches
Character sets supported by Gecko - Gecko Redirect 1
For encodings that have a compatibility name in the DOM Standard, except gbk, this is the compatibilty name. For other encodings, including gbk, this is the lower-case name from the Encoding Standard. ...
Gecko Compatibility Handbook - Archive of obsolete content
** Notes ** - The Solution Quick Reference needs more attention. - I'm also looking for a way to organize all that information. - Some inline examples were removed because of technical limitations. They are actually replaced by ''-(EXAMPLE REMOVED)-'' The goal of this handbook is to help you update websites to work with standards-based browsers and properly detect Gecko. ...
...king for a way to organize all that information. - Some inline examples were removed because of technical limitations. They are actually replaced by ''-(EXAMPLE REMOVED)-'' The goal of this handbook is to help you update websites to work with standards-based browsers and properly detect Gecko. If you're new to standards, you may find Using Web Standards in Your Web Pages a helpful introduction. Gecko is an embeddable browser, developed as part of the Mozilla open source project and based on W3 Standards rather than the proprietary approaches of the past. Adhering to web standards simplifies cross-browser web development and enables accessibility. 4.x vs. Gecko Since 1997, much of the Web's content has been developed for Microsoft Internet Explorer 4 or Netscape Navigator 4. These browsers w...
... Internet Explorer 4 and Netscape Navigator 4 share support for a large part of the HTML 3.2 standard and basic JavaScript. ...
...And 34 more matches
Setting up the Gecko SDK
<< PreviousNext >> This chapter provides basic setup information for the Gecko Software Development Kit (SDK) used to build the WebLock component in this tutorial. The following four sections tell the developer how to download and organize the Gecko SDK and create a new project in which components like WebLock can be created. Downloading and Setting the SDK The Gecko SDK provides all of the tools, headers, and libraries that you need to build XPCOM Components. The SDK is available for Windows, Linux, and Mac operating systems, and versions for other operating systems are being developed, and can be retrieved from as a single archive from the following platform-specific locations (Need correction for last version (now 1.9.2.8). There is now separate archive with gecko-sdk, just...
...th gecko-sdk, just xul-runner-sdk.): Linux: http://ftp.mozilla.org/pub/mozi....8.0.4.tar.bz2 Windows: http://ftp.mozilla.org/pub/mozi...vc-1.8.0.4.zip Mac: http://ftp.mozilla.org/pub/mozi...ac-1.8.0.4.zip Note that the version number for the archives above is 1.8. The WebLock component was built with version 1.4a, which is no longer available. You may want to check for newer versions at Gecko versions prior to 1.7: http://ftp.mozilla.org/pub/mozi...illa/releases/ Gecko versions after 1.8: http://ftp.mozilla.org/pub/mozi...nner/releases/ Once you download the SDK, you can expand it into any convenient location. In this appendix, we set up the Windows Gecko SDK in c:\gecko-sdk\. If you choose some other location, remember to adjust the settings described here (e.g., in the Building a...
...irectory structure makes build scripts slightly more complicated (since there will be many different include paths), but it helps to organize the parts of the SDK meaningfully. The two top level header files are special. The file mozilla-config.h lists all of the defines used in the SDK. Including this header file in your project ensures that the component you create uses the same defines as the Gecko libraries themselves. Note that mozilla-config.h may be need to be included before other includes in your component's source code. Each module directory is divided into three subdirectories: Module Subdirectories The bin directory contains static libraries, dynamic libraries, and in some cases tools that may be useful in development. The idl directory contains the public IDL files exported b...
...And 23 more matches
Gecko info for Windows accessibility vendors
This FAQ explains how makers of Windows screen readers, voice dictation packages and magnification software can support Gecko-based software. The base of our support for these products is MSAA (Microsoft Active Accessibility), external readonly DOM support, and the keyboard API/user interface. Definitions Here are some basic definitions that you'll need for this document to make sense: Gecko: The rendering engine for Firefox, Thunderbird, Nvu, Mozilla Seamonkey and other applications. Gecko is the internal engine that Mozilla uses to render any kind of web content. It supports HTML, XHTML, Cascading Style Sheets (CSS) and the Document Object Model (DOM). Microsoft Active Accessibility (MSAA) an API devised by Microsoft so that access...
...y with the sample apps and code that come with MSAA SDK 1.3. (I recommend SDK 1.3 because the MSAA SDK 2.0 doesn't come with the source code to the testing tools. The other differences are not important). DOM: Document Object Model This is the W3C's specification for how web content is exposed to Javascript and other languages. It covers content, style and events. Inside the Gecko process, code has full access to DOM APIs. However, exposing the entire DOM to external software packages is quite involved, partially because changes to the DOM in Firefox must occur on the main thread. We have chosen a subset of readonly methods in the DOM needed for assistive technology vendors. Events such as focus changes must be tracked through MSAA events, rather than DOM events. ...
...eryService() can be used to switch between the interfaces (IAccessible, ISimpleDOMDocument, ISimpleDOMNode and ISimpleDOMText). If there is no MSAA node for a DOM node, or vice-versa, QueryService() will return null. Anything that is focusable or conveys important information about the structure of the document is exposed in the MSAA tree of IAccessibles. ...
...And 15 more matches
Gecko versions and application versions
The following table shows the various versions of Gecko and what versions of common applications are based on them. Note that after Gecko 2.0, both Firefox and Thunderbird versions are from then on the same as the Gecko version number, at Gecko 5.0. ...
... The following table shows the various versions of Gecko and what versions of common applications are based on them. Note that after Gecko 2.0, both Firefox and Thunderbird versions are from then on the same as the Gecko version number, at Gecko 5.0. ...
... The following table shows the various versions of Gecko and what versions of common applications are based on them. Note that after Gecko 2.0, both Firefox and Thunderbird versions are from then on the same as the Gecko version number, at Gecko 5.0. ...
...And 12 more matches
Gecko Profiler FAQ
For JS code, the profiler platform doesn't capture any information about lines. It only knows what function was executed and what line this function starts at. ...
... For JS code, the profiler platform doesn't capture any information about lines. It only knows what function was executed and what line this function starts at. ...
... native code, the profiler captures the necessary information but doesn't have a way to display it. Similarly it also can't show you instruction level information about where each sample was captured (this is why there is no support for line-level sampling for native code either.) At this point the granularity of each sample it displays is a native function. Therefore the Gecko Profiler is not a suitable tool for finding hotspots within a single function. For this purpose you should try to use a native profiler on your platform of choice (for example xperf/vtune on Windows, Instruments on OSX, and perf/Zoom on Linux.) One workaround is to break the hot function into several explicitly-non-inline helpers, recompile, and re-profile. This can change some perfo...
...And 11 more matches
Gecko SDK
The Gecko SDK, also known as the XULRunner SDK, is a set of XPIDL files, headers and tools to develop XPCOM components which can then in turn e.g. be accessed from XUL using JavaScript. Note that in order to develop such components, you do not need the full sources of e.g. Firefox, since you do not access parts of the front end from within a component. Furthermore, since a component contains basic functionality, it is intended to run with every product of the Mozilla platform. Therefore it makes no sense to use a particular product to build general functionality. That's the reason why the Gecko SDK was devised. Do not confuse the Gecko/XULRunner SDK with XULRunner itself. ...
...ce you do not access parts of the front end from within a component. Furthermore, since a component contains basic functionality, it is intended to run with every product of the Mozilla platform. Therefore it makes no sense to use a particular product to build general functionality. That's the reason why the Gecko SDK was devised. Do not confuse the Gecko/XULRunner SDK with XULRunner itself. ...
...ionality. That's the reason why the Gecko SDK was devised. Do not confuse the Gecko/XULRunner SDK with XULRunner itself. The Gecko SDK is a collection of header files and tools used to develop general XPCOM components which add functionality to the existing platform, whereas XULRunner is a framework which can be used to run standalone or embedded applications based on the Mozilla framework. The Gecko SDK contains all of the necessary tools and headers for making scriptable NPAPI plugins including the xpidl compiler/linker and the latest npapi.h. Get the SDK Updates There is no need to download or rebuild the Gecko SDK corresponding to security updates of Mozilla (e.g., Mozilla 1.7.3) since the headers and glue libs in the Gecko SDK are usually not changed as a result of security updates. Y...
...And 8 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
This information applies to Mozilla based browsers that pull the Mozilla codebase after the Mozilla 0.9.1 milestone release. ...
...This information applies to Mozilla based browsers that pull the Mozilla codebase after the Mozilla 0.9.1 milestone release. ...
...hat puts the shared object (DLL) in the right place becomes much easier, since the relevant meta-information is present in the Win32 System Registry. These keys are written by the installer of Mozilla browsers -- the Netscape 6.2 installer, for example, writes these keys to the registry, and so does the Mozilla installer (for versions after Mozilla 0.9.1). Other major commercial browsers based on Gecko have committed to providing these keys as well. Some Gecko-based browsers provide additional information via the registry, and where appropriate, these registry keys are also mentioned, with the necessary version caveats. Much of this registry data follows as a consequence of the discussions in bug 109402. To find the plugins directory Applicable to Netscape 6.1, 6.2.x, Netscape 7.0 (and up), Moz...
...And 7 more matches
Gecko Keypress Event
That is, when the currently selected keyboard layout produces a Unicode character (according to the current state of CapsLock and NumLock), the charCode property contains that character. When the keypress event includes modifier keys, sometimes the charCode value is replaced with an ASCII character according to the following rules. ...
...anged significantly after Beta 5 (bug 359638, bug 429510 and the bugs on which they depend). The changes were risky so late in the release schedule, but they were necessary for fixing the many key handling bugs. charCode of DOM keypress event If a keypress event is fired without any modifier keys (Ctrl/Alt(Option)/Meta(Win/Command)), then the properties of the event are the same as they were in Gecko1.8.1. That is, when the currently selected keyboard layout produces a Unicode character (according to the current state of CapsLock and NumLock), the charCode property contains that character. When the keypress event includes modifier keys, sometimes the charCode value is replaced with an ASCII character according to the following rules. The accel key depends on the platform. Ctrl is the accel ...
...ds on the platform. Ctrl is the accel key on Windows and Linux, while Meta (i.e. Command) is the accel key on Mac. When the accel key is down, the charCode of a keypress event may be replaced with a character from a Latin keyboard layout only when the original character is not an ASCII character. This behavior helps the internationalization of web applications that have custom shortcut keys. If Gecko doesn't replace the charCode with an ASCII character, the web application developers would need to consider all non-Latin keyboard layouts (Arabic, Greek, Hebrew, Russian, etc.). The charCode value depends on the state of CapsLock and NumLock (except they are currently ignored if Alt (Option) is down on Mac - see bug 432953). There are also some differences between the platforms, as described in...
...And 7 more matches
Geckoview-Junit Tests
The geckoview-junit tests are on-device Android junit tests written for geckoview. By default, tests are from org.mozilla.geckoview.test. These tests run on an Android device, controlled by a host (typically Linux) using mozdevice (adb). In automation, tests normally run in an Android emulator. Running tests locally If desired, connect an Android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. Before running tests, install the androidTest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it. ...
...r computer, or start an emulator, and make sure your device is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. Before running tests, install the androidTest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it. ...
...ce is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. Before running tests, install the androidTest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it. mozilla-central$ mach install --app org.mozilla.geckoview.test To run all tests: mozilla-central$ mach geckoview-junit To run just one class of tests: mozilla-central$ mach geckoview-junit <class> Please note that unlike Robocop tests, <class> needs to be specified using the fully qualified class name including the package, e.g. org.mozilla.geckoview.test.ContentDelegateTest. ...
...And 6 more matches
Plug-in Development Overview - Gecko Plugin API Reference
lug-ins". Install the plug-in in the plug-in directory for your operating system. See Installing Plug-ins. Test your plug-in and debug as necessary. Create an HTML page and embed the plug-in object. For information about the HTML elements to use, see Using HTML to Display Plug-ins. To see your plug-in in action, simply display the HTML page that calls it in the browser. Registering Plug-ins Gecko identifies a plug-in by the MIME type it supports. When it needs to display data of a particular MIME type, the browser finds and invokes the plug-in object that supports that type. The data can come from either an object element in an HTML file (where the object or embed element either specifies the MIME type directly or references a file of that type), from a separate non-HTML file of that MIME...
...: "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 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...
...the "|" character, for example: video/quicktime|audio/aiff|image/jpeg The version stamp will be loaded only if it has been created with the language set to "US English" and the character set to "Windows Multilingual" in your development environment. The resource code for this language and character set combination is 040904E4. Unix On Unix, 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 loads each library and calls into the NP_GetMIMEDescription entry point. This exported C function should return a string containing the type, extension list, and type description separated by colons. Each MIME types should be separated by semicolons. For example: image/xbm:xbm:X Bitmap or for 2 ...
...And 3 more matches
Gecko
Gecko is the name of the layout engine developed by the Mozilla Project. It was originally named NGLayout. Gecko's function is to render web content, such as HTML, CSS, XUL, JavaScript, and render it on the user's screen or print it. In XUL-based applications Gecko also renders the application's user interface. Gecko is used in many applications, including a few browsers such as Firefox and SeaMonkey (for a complete list, please refer to Wikipedia's article on Gecko). Products using the same version of Gecko have identical support for Web standards. Documentation Chrome This page contains information specific to browser chrome (not Google Chrome) code running in Gecko. Gecko FAQ Frequently asked questions about Gecko. ...
...fox and SeaMonkey (for a complete list, please refer to Wikipedia's article on Gecko). Products using the same version of Gecko have identical support for Web standards. Documentation Chrome This page contains information specific to browser chrome (not Google Chrome) code running in Gecko. Gecko FAQ Frequently asked questions about Gecko. Gecko DOM reference Reference to the DOM. Gecko event reference Reference to events used within Gecko and Mozilla applications; for web-standard DOM events, see the DOM event reference. Introduction to Layout in Mozilla Tech Talk on layout. ...
...Roadmaps and more up-to-date resources. View All... ...
...And 3 more matches
XPCOM changes in Gecko 2.0
Several changes that affect XPCOM component compatibility are taking place in Gecko 2. This article details those changes, and provides suggestions for how to update your code. No more frozen interfaces There are no longer any frozen interfaces; from now on, all interfaces are subject to change. Documentation will be updated as time allows to remove references to interfaces being "frozen" or "unfrozen." Component registration The way XPCOM components are registered changed in Gecko 2. Prior to Gecko 2, during component registration, all binary and JavaScript component files were loaded and called, asking them to register themselves. If you used XPCOMUtils.jsm, some of this was hidden from you, but it was still there. ...
...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. ...
...ryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIMyComponent]), /* nsIMyComponent implementation goes here */ ... }; // The following line is what XPCOM uses to create components. Each component prototype // must have a .classID which is used to create it. const NSGetFactory = XPCOMUtils.generateNSGetFactory([myComponent]); A component may implement backwards compatibility with Gecko 1.9.2 by dynamically detecting which symbols are exported by XPCOMUtils.jsm and exporting the correct function: /** * XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4, SeaMonkey 2.1). * XPCOMUtils.generateNSGetModule was introduced in Mozilla 1.9 (Firefox 3.0). */ if (XPCOMUtils.generateNSGetFactory) var NSGetFactory = XPCOMUtils.generateNSGetFactory([myComponent]); else...
...And 3 more matches
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
Gecko is the layout engine developed by the Mozilla Project and used in many apps/devices, including Firefox and Firefox OS. Web browsers need software called a layout engine to interpret HTML, CSS, JavaScript, and embedded content (like images) and draw everything to your screen. Besides this, Gecko makes sure associated APIs work well on every operating system Gecko supports, and that appropriate APIs are exposed only to relevant support targets. This means that Gecko includes, among other things, a networking stack, graphics stack, layout engine, a JavaScript virtual machine, and porting layers. Since all Firefox OS apps are Web apps, Firefox OS uses Gecko as its app runtime as well. ...
...rk well on every operating system Gecko supports, and that appropriate APIs are exposed only to relevant support targets. This means that Gecko includes, among other things, a networking stack, graphics stack, layout engine, a JavaScript virtual machine, and porting layers. Since all Firefox OS apps are Web apps, Firefox OS uses Gecko as its app runtime as well. ...
..., and that appropriate APIs are exposed only to relevant support targets. This means that Gecko includes, among other things, a networking stack, graphics stack, layout engine, a JavaScript virtual machine, and porting layers. Since all Firefox OS apps are Web apps, Firefox OS uses Gecko as its app runtime as well. ...
Gecko Logging
It is enabled for all builds, thread-safe, and the preferred alternative to NSPR logging. Some other mostly-useless information on logging can be found on the NSPR logging page. Logging framework Declaring a log module LazyLogModule defers the creation the backing LogModule in a thread-safe manner and is the preferred method to declare a log module. Multiple LazyLogModules with the same name can be declared, all will share the same backing LogModule. This makes it much simpler to share a log module across multiple translation units. ...
...el::Error, ("i should be 10!")); } } Enabling Logging The log level for a module is controlled by setting an environment variable before launching the application. It can also be adjusted by setting prefs. By default all logging output is disabled. set MOZ_LOG="example_logger:3" In the Windows Command Prompt (cmd.exe), don't use quotes: set MOZ_LOG=example_logger:3 If you want this on GeckoView example, use the following adb command to launch process: adb shell am start -n org.mozilla.geckoview_example/.GeckoViewActivity --es env0 "MOZ_LOG=example_logger:3" There are special module names to change logging behavior. You can specify one or more special module names without logging level. Special module name append Append new logs to existing log file. ...
...otate and append options described above only apply when logging to a file. The special pref logging.config.LOG_FILE can be set at runtime to change the log file being output to. E10S Note When a content process is in sandbox, it cannot write to stderr or any file. You may need to set preference security.sandbox.content.level to 0 to see the log. Rust We're gradually adding more Rust code to Gecko, and Rust crates typically use a different approach to logging. Many Rust libraries use the log crate to log messages, which works together with env_logger at the application level to control what's actually printed via RUST_LOG. You can set an overall logging level, though it could be quite verbose: set RUST_LOG="debug" You can also target individual modules by path: set RUST_LOG="style::sty...
Using the Gecko SDK
This guide explains how to build XPCOM components in C++ using the Gecko SDK. Introduction It is assumed that you already know something about XPCOM component development. (More information on XPCOM is available at the XPCOM project page.) The intent of this guide is to help you build your components "the right way" such that they will remain compatible with future versions of Mozilla. For information on how to retrieve and install the Gecko SDK, see here. An XPCOM component will be compatible with future versions of Mozilla if it only makes use of frozen Gecko APIs. ...
...mation on XPCOM is available at the XPCOM project page.) The intent of this guide is to help you build your components "the right way" such that they will remain compatible with future versions of Mozilla. For information on how to retrieve and install the Gecko SDK, see here. An XPCOM component will be compatible with future versions of Mozilla if it only makes use of frozen Gecko APIs. A frozen Gecko API is one that is included in the Gecko and marked frozen with the text <tt>@status FROZEN</tt> (with NSPR as the exception to the rule). The frozen Gecko API consists of a set of component interfaces (C++ vtables) and <tt>extern "C"</tt> symbols exported from the XPCOM library and the NSPR libraries. The ABI of the component interfaces depends on the C++ ABI of the host compiler (i.e., the vtab...
...(<tt>about:buildconfig</tt> can be loaded in Mozilla to reveal details about the compiler that was used.) For the remainder of this guide, we'll assume you are developing components under Linux. ...
Boot2Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
Boot2Gecko (B2G) is the engineering codename for Firefox OS and refers to builds that haven't yet received official Firefox OS branding. ...
... Boot2Gecko (B2G) is the engineering codename for Firefox OS and refers to builds that haven't yet received official Firefox OS branding. ...
Gecko events
Event constants are defined in nsIAccessibleEvent interface. EVENT_DOM_CREATE An object has been created. Is Supported: yes EVENT_DOM_DESTROY An object has been destroyed. Is Supported: yes EVENT_DOM_SIGNIFICANT_CHANGE An object's properties or content have changed significantly so that the type of object has really changed, and therefore the accessible should be destroyed or recreated. ...
...ect to a non-hypertext object. EVENT_HYPERTEXT_NLINKS_CHANGED The number of hyperlinks associated with a hypertext object changed. EVENT_OBJECT_ATTRIBUTE_CHANGED An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED. EVENT_PAGE_CHANGED A slide changed in a presentation document or a page boundary was crossed in a word processing document. EVENT_INTERNAL_LOAD Used internally in Gecko. EVENT_REORDER An object's children have changed ...
Gecko Coding Help Wanted - Archive of obsolete content
ignatures. It's really improved code readability, reduced code size, and sped up performance. It's kind of tedious but it's extremely valuable and will help you learn the way around the codebase. We've done a lot, but there's a lot more to do. roc is willing to work closely with anyone with reasonable C++ experience to get them started on this. Just send him mail. Not up for coding yet? Join the Gecko BugAThon and help save Gecko engineers from imminent doom! Original Document Information Author(s): fantasai Last Updated Date: May 4, 2004 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Extending Gecko with XBL and XTF - Archive of obsolete content
Presentation View Online Download Summary This session explored ways to extend Mozilla/Firefox to handle new XML tags and namespaces via drop-in extensions to the layout engine. Questions and Discussion Extending Gecko with XBL and XTF - Discussion ...
Gecko Chrome
This page contains information specific to Chrome code running in Gecko. Chrome-only API referenceThis page lists APIs that only run in Gecko Chrome code (and sometimes in other privileged circumstances.)Chrome-only CSS referenceThis page lists CSS properties that are only available in Gecko Chrome code (and sometimes in other privileged circumstances, eg. UA stylesheets.) Chrome-only Events referenceThis page lists events that are only available in Gecko Chrome code (and sometimes in other privileged circumstances, eg. UA widgets). ...
Gecko's "Almost Standards" Mode
ks" and "standards" modes. "Almost standards" rendering mode is exactly the same as "standards" mode in all details save one, where it works like "quirks" mode: the height calculations for line boxes and some of the inline elements in them. A common case that this affects is the layout of images inside table cells. This means that sliced-images-in-tables layouts are less likely to fall apart in Gecko-based browsers based on the rendering engine found in Mozilla 1.0.1 or later when in either "quirks" or "almost standards" mode. (See the DevEdge article "Images, Tables, and Mysterious Gaps" for a detailed explanation of how such layouts are treated in "standards" mode.) In slightly more detail, what differs in almost-standards mode is roughly this: inline boxes that have no non-whitespace text...
Profiling with the Gecko Profiler and Local Symbols on Windows
me too much memory when creating the symbol table for this to work in 32 bit Firefox builds. Unfortunately, 32 bit is still the default when building Firefox locally. You need to add the lines ac_add_options --target=x86_64-pc-mingw32 and ac_add_options --host=x86_64-pc-mingw32 to your mozconfig in order to build a 64 bit build of Firefox. Profiling local talos runs If you would like to use the Gecko Profiler with a local talos run of a local build of Firefox for Windows, you will need to point talos to a zipfile containing breakpad-style symbols for your build. Follow the steps below: NOTE: You only need to do this if you're on Windows and you've built Firefox yourself. For any official release of Firefox (Nightly, Beta, etc), you do not need to use these steps. Make sure you don't have ...
Gecko object attributes
for the <html:img/> element. Tree related attributes cycles "true" when the tree cell is a cycler, which means each click will cycle to the next option. In this case action 0 is called "cycles", which moves to the next option in the same way a manual click does. Applied to: ROLE_CELL for the <xul:tree/> Note: it's not exposed currently Table related attributes layout-guess true when Gecko's heuristic determines that it is a table that is probably used for layout, not for table. Value not set means it is probably a data table. Applied to: ROLE_TABLE table-cell-index The index of the table cell accessible. Use nsIAccessibleTable and nsIAccessibleTableCell instead. Applied to ROLE_CELL Hypertext attributes formatting "block" if the object uses block formatting, and thu...
Gecko Roles
Role constants are defined in the nsIAccessibleRole interface. ROLE_NOTHING Used when the accessible item doesn't have a strongly defined role. ROLE_TITLEBAR Represents a title or caption bar for a window. Used by MSAA only, this is supported automatically by Microsoft Windows. ROLE_MENUBAR Represents the menu bar (positioned beneath the title bar of a window on most platforms or at the top of the screen on Mac OS X) from which menus are selected by the user. ROLE_SCROLLBAR Represents a vertical or horizontal scroll bar, which is part of the client area or used in a control. ...
Gecko states
State constants are defined in nsIAccessibleStates. States List STATE_UNAVAILABLE The object is unavailable, i.e. disabled. Applied to: all roles. STATE_SELECTED The object is selected, i.e. indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected. ...
Gecko Plugin API Reference - Plugins
Plug-in Basics How Plug-ins Are Used Plug-ins and Helper Applications How Plug-ins Work Understanding the Runtime Model Plug-in Detection How Gecko Finds Plug-ins Checking Plug-ins by MIME Type Overview of Plug-in Structure Understanding the Plug-in API Plug-ins and Platform Independence Windowed and Windowless Plug-ins The Default Plug-in Using HTML to Display Plug-ins Plug-in Display Modes Using the object Element for Plug-in Display Nesting Rules for HTML Elements Using the Appropriate Attributes Using the embed Element for Plug-in Display Using Custom embed Attributes Plug-in References Plug-in Development Overview Writing Plug-ins Registering Plug-ins MS Windows Unix Mac OS X Drawin...
Index - Archive of obsolete content
Unit Testing Add-on SDK, JPM No summary! 168 Using XPCOM without chrome Bookmarks, Chrome, SDK, XPCOM No summary! 169 Using third-party modules (jpm) Addon-SDK, JPM First, while in the root of your add-on, install the package that contains the modules you want to use: 170 Bootstrapped extensions Add-ons, Extensions, Firefox 4, Gecko 2.0, Guide, Localization No summary! 171 Code snippets Add-ons, Code snippets, Extensions No summary! 172 Alerts and Notifications Code snippets non-modal notification and further interaction with users 173 Autocomplete Code snippets, Form Fill, Satchel No summary! 174 Bookmarks Code snippets, Developing Mozilla, ...
...that implement the nsIJetpackService interface, and their parent chrome process communicates with them via the nsIJetpack interface. 250 Legacy Add-ons Add-ons, Extensions, Landing This section contains links to documentation for legacy technology for add-on development, including: 251 Listening to events in Firefox extensions Add-ons, Archive, DOM, Extensions, Gecko, Obsolete, events Gecko uses events to pass information about interesting things that have occurred along to the parties that may wish to know about them. There are several different categories of events; this article will help you learn about them and direct you to more specific documentation covering each of them. It also provides some use cases that may be of specific interest. 25...
...TML for its structure and a small collection of CSS files for its layout. The new design clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from Web pages. 356 Archived Mozilla and build documentation These articles are archived, obsolete documents about Mozilla, Gecko, and the process of building Mozilla projects. 357 ActiveX Control for Hosting Netscape Plug-ins in IE Add-ons, NeedsClassification, Plugins Microsoft has removed support for Netscape plug-ins from IE 5.5 SP 2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work! 358 Archived SpiderMonkey docs Archive This section con...
...And 55 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
ser detection can lead to web maintenance nightmares. Rethinking the basics of when and how to detect user agents is crucial to creating maintainable, cross browser web content. This article reviews several approaches to browser detection, their usefulness in specific circumstances to arrive at a common sense approach to browser detection. Quick Tip If you must determine if a visitor is using a Gecko-based browser, simply test navigator.product == 'Gecko' or look for the string 'Gecko/' in the navigator.userAgent. Note that some other browsers such as Safari are reporting (like Gecko) in their user agent strings and can confuse simple tests. Introduction In an ideal world, we could author HTML, XML, CSS and JavaScript and only worry about the W3C and ECMA standards. However, we don't quit...
...gelism team who has spent over a year investigating existing web content, I can say without a doubt that most compatibility problems found on the web today are due to a lack of understanding of the standards combined with inadequate and inappropriate browser detection strategies. This article is intended to provide an overview of browser detection strategies and best practices. ...
...investigating existing web content, I can say without a doubt that most compatibility problems found on the web today are due to a lack of understanding of the standards combined with inadequate and inappropriate browser detection strategies. This article is intended to provide an overview of browser detection strategies and best practices. ...
...And 47 more matches
nsINavBookmarksService
toolkit/components/places/nsINavBookmarksService.idlScriptable The BookmarksService interface provides methods for managing bookmarked history items. Bookmarks consist of a set of user-customizable folders. A URI in history can be contained in one or more such folders. 1.0 67 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Implemented by: @mozilla.org/browser/nav-bookmarks-service;1. To use this service, use: var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Components.interfaces.nsINavBookmarksService); Method overview void addObserver(in nsINavBookmarkObserver observer, in boolean ow...
...zilla.org/browser/nav-bookmarks-service;1. ...
...d overview void addObserver(in nsINavBookmarkObserver observer, in boolean ownsWeak); void beginUpdateBatch(); Obsolete since Gecko 1.9 void changeBookmarkURI(in long long aItemId, in nsIURI aNewURI); long long createDynamicContainer(in long long aParentFolder, in AUTF8String aName, in AString aContractId, in long aIndex); Note: Renamed from createContainer in Gecko 1.9 Obsolete since Gecko 13.0 long long createFolder(in long long aParentFolder, in AUTF8String name, in long index); void endUpdateBatch(); Obsolete since Gecko 1.9 void exportBookmarksHTML(in nsIFile file); Obsolete since Gecko 1.9 nsIURI getBookmarkedURIFor(in nsIURI aURI); void getBookmarkFoldersTArray(in nsIURI aURI, in PRInt64Array aResult); Nati...
...And 44 more matches
Firefox user agent string reference - HTTP
platform describes the native platform the browser is running on (e.g. ...
... platform describes the native platform the browser is running on (e.g. ...
...describes the user agent string used in Firefox 4 and later and applications based on Gecko 2.0 and later. For a breakdown of changes to the string in Gecko 2.0, see Final User Agent string for Firefox 4 (blog post). See also this document on user agent sniffing and this Hacks blog post. General form The UA string of Firefox itself is broken down into four components: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today. platform describes the native platform the browser is running on (e.g. Windows, Mac, Linux or Android), and whether or not it's a mobile phone. Firefox OS phones simply say "Mobile"; the web is the platform. Note that pla...
...And 42 more matches
Index - Web APIs
Web › API › Index
nderingContext2D.drawWidgetAsOnScreen() API, Canvas, CanvasRenderingContext2D, Method, Non-standard, Reference The non-standard and internal only CanvasRenderingContext2D.drawWidgetAsOnScreen() method of the Canvas 2D API renders the root widget of a window into the canvas. Unlike drawWindow(), this API uses the operating system to snapshot the widget on-screen, rather than reading from Gecko's own compositor. 562 CanvasRenderingContext2D.drawWindow() API, Canvas, CanvasRenderingContext2D, Method, Non-standard, Reference The non-standard and internal only CanvasRenderingContext2D.drawWindow() method of the Canvas 2D API renders a region of a window into the canvas. The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. ...
...ment, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized. 883 Document.createElementNS() API, DOM, Method, Reference Creates an element with the specified namespace URI and qualified name. 884 Document.createEntityReference() API, DOM, Method, Obsolete, Reference Prior to Gecko 7.0 this method showed up as present, due to bug bug 9850, it always only returned null. The only workaround is to create a text node, CDATA section, attribute node value, etc. which has the value referred to by the entity, using Unicode escape sequences or fromCharCode() as necessary. 885 Document.createEvent() API, DOM, Method, Reference Creates an event of the type specifi...
...erence, XPath, createExpression This method compiles an XPathExpression which can then be used for (repeated) evaluations. 887 Document.createNSResolver() API, DOM, DOM Reference, Method, Reference Creates an XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node. 888 Document.createNodeIterator() API, DOM, Gecko, MakeBrowserAgnostic, Method Returns a new NodeIterator object. 889 Document.createProcessingInstruction() API, DOM, Document, Method, Reference, createProcessInstruction createProcessingInstruction() generates a new processing instruction node and returns it. 890 Document.createRange() API, DOM, DOM Reference, Document, DocumentRange.createRange, Method,...
...And 39 more matches
imgIContainer
image/public/imgIContainer.idlScriptable Represents an image in the Gecko rendering engine. It provides access to frames as Thebes surfaces and lets users extract subregions as other imgIContainer objects. It also provides methods for drawing images onto Thebes contexts. Internally, this interface also manages animation of images. 66 Introduced Gecko 1.0 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Implemented by: ?????????????????????????????????????. To create an instance, use: Implemented by: ????????????????????????????????????? as a service: var imgIContainer = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.imgIContainer); ...
...ate an instance, use: Implemented by: ????????????????????????????????????? as a service: var imgIContainer = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.imgIContainer); Method overview void addRestoreData([array, size_is(aCount), const] in char data, in unsigned long aCount); Native code only! ...
...ethod overview void addRestoreData([array, size_is(aCount), const] in char data, in unsigned long aCount); Native code only! Obsolete since Gecko 2.0 void appendFrame(in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength); Native code only! ...
...And 38 more matches
Index
Mozilla › Tech › XPCOM › Index
e 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 change between Gecko versions. This can create a difficult ...
.... 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). 6 Creating a Python XPCOM component Guide, NeedsHelp, PyXPCOM, XPCOM, XPCOM:Language Bindings Creating Applications 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 an...
... 15 Language bindings Embedding, Landing, Mozilla, XPCOM, XPCOM:Language Bindings An XPCOM Language Binding is a bridge between a particular language and XPCOM to provide access to XPCOM objects from that language, and to let modules written in that language be used as XPCOM objects by all other languages for which there are XPCOM bindings. 16 Components object DOM, Gecko, XPCOM:Language Bindings, XPConnect The Components object is the object through which XPConnect functionality is reflected into JavaScript. The Components object is actually a native instance of the nsIXPCComponents interface which is reflected into JavaScript as a top level object using XPConnect. 17 Components.Constructor XPCOM:Language Bindings, XPConnect Creates a J...
...And 37 more matches
nsIDOMWindowUtils
dom/interfaces/base/nsIDOMWindowUtils.idlScriptable This interface is a DOM utility interface that provides useful DOM methods and attributes. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 49.0 (Firefox 49.0 / Thunderbird 49.0 / SeaMonkey 2.46) Implemented by: Window. To get this interface, use: var domWindowUtils = window.windowUtils; Method overview void activateNativeMenuItemAt(in AString indexString); void clearMozAfterPaintEvents(); PRUint32 compareCanvases(in nsIDOMHTMLCanvasElement aCanvas1, in nsIDOMHTMLCanvasElement aCanvas2, out unsigned long aMaxDifference); double computeAnimationDistance(in nsIDOMElement element, in AString property, in AString value1, in AString value...
...oid clearMozAfterPaintEvents(); PRUint32 compareCanvases(in nsIDOMHTMLCanvasElement aCanvas1, in nsIDOMHTMLCanvasElement aCanvas2, out unsigned long aMaxDifference); double computeAnimationDistance(in nsIDOMElement element, in AString property, in AString value1, in AString value2); nsICompositionStringSynthesizer createCompositionStringSynthesizer(); Obsolete since Gecko 38.0 void disableNonTestMouseEvents(in boolean aDisable); boolean dispatchDOMEventViaPresShell(in nsIDOMNode aTarget, in nsIDOMEvent aEvent, in boolean aTrusted); nsIDOMElement elementFromPoint(in float aX, in float aY, in boolean aIgnoreRootScrollFrame, in boolean aFlushLayout); void enterModalState(); nsIDOMElement findElementWithViewId(in nsView...
... void removeSheet(in nsIURI sheetURI, in unsigned long type); void resumeTimeouts(); void sendCompositionEvent(in ...
...And 29 more matches
Windows Media in Netscape - Archive of obsolete content
Right Browser Like Internet Explorer, Netscape 7.1 and later versions can play Windows Media files using the popular Windows Media Player ActiveX control. This control is widely used to provide inline media support for web pages that provide sound, video and other media. Controls such as Windows Media Player also interact closely with the scripts in a web page. Netscape 7.1 is the first Netscape Gecko(TM) browser to support the Windows Media Player as an ActiveX control -- previous Netscape browsers did not support any ActiveX controls, and thus detecting which versions of Netscape support the Windows Media ActiveX control is an important first step towards building multimedia experiences using HTML, JavaScript, and the Windows Media ActiveX control. The Windows Media 9 Series SDK documentatio...
...ul for client-side detection Detection using the user agent string which is useful for server side detection. An advantage of the client-side approach is that it is also possible to detect if Windows Media Player is installed. Client-side Detection Using JavaScript Objects Internet Explorer implements the ActiveXObject object to create new instances of ActiveX controls. Netscape 7.1 introduces GeckoActiveXObject which can be used in a similar way to create instances of the Windows Media Player. The following JavaScript illustrates one approach using object detection of ActiveXObject and GeckoActiveXObject to determine if the Windows Media ActiveX control is supported and available for use. JavaScript will dynamically write out what browser you are running, and what kind of Windows Media Play...
...indows Media Scriptable: false Windows Media Version: PluginVersion A complete source code listing showing how that detection was done can be found here (devedge-temp). Below, some of the salient points are illustrated in a code snippet: if (window.ActiveXObject && navigator.userAgent.indexOf('Windows') != -1) { // IE for Windows object instantiation -- use of ActiveXObject } else if(window.GeckoActiveXObject) { // Netscape 7.1 object instantiation --use of GeckoActiveXObject } else if(navigator.mimeTypes) { // Plugin architecture, such as in Netscape 4x - 7.02 and Opera browsers } Since IE for Mac also exposes window.ActiveXObject it is wise to determine if the browser in question is on Windows. Both ActiveXObject and GeckoActiveXObject function similarly. The next subsection discuss...
...And 23 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
ionByName, getSessionResultAt, getSessionStatusAt, getSessionValueAt, removeSession, select, setSelectionRange, syncSessions Examples (example needed) Attributes accesskey Type: character This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in the label attribute for the element. alwaysopenpopup Obsolete since Gecko 1.9.1 Type: boolean Note: Applies to: Thunderbird and SeaMonkeyIf true, the autocomplete popup will be displayed even when there are no matches. If false, the default value, the popup will be hidden. This attribute is obsolete as of Gecko 1.9.1; to control the display of the popup, use the minresultsforpopup attribute instead. autocompletesearch New in Thunderbird 2Requires SeaMonke...
... addrbook New in Thunderbird 3 Requires SeaMonkey 2.0 The user's address book is searched. ldap New in Thunderbird 25 Requires SeaMonkey 2.22 The user's LDAP directory is searched. autocompletesearchparam New in Thunderbird 2 Requires SeaMonkey 1.1 Type: string A string which is passed to the search component. ...
...ird 2 Requires SeaMonkey 1.1 Type: string A string which is passed to the search component. autoFill Obsolete since Gecko 1.9.1 Type: boolean Note: Applies to: Thunderbird and SeaMonkeyIf set to true, the best match will be filled into the textbox as the user types. If false, the default, the value will not be filled in until the user selects an item. As of Gecko 1.9.1, this attribute is now always specified in lower case. autoFillAfterMatch Obsolete since Gecko 1.9.1 Type: boolean If set to true, the entire text of the best match will be displayed at the end of the input. ...
...And 22 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
ndards such as XSLT and RDF. RDF, a core element to the framework, allows you to define dynamic elements in your UI (elements that may change after you have completed the application, such as a "history" menu item). XSLT could be used to translate information from Web Services, RSS, SOAP, or other XML-based languages and convert them into a form that you might display in your user interface. ...
... RDF. RDF, a core element to the framework, allows you to define dynamic elements in your UI (elements that may change after you have completed the application, such as a "history" menu item). XSLT could be used to translate information from Web Services, RSS, SOAP, or other XML-based languages and convert them into a form that you might display in your user interface. ...
...OAP, or other XML-based languages and convert them into a form that you might display in your user interface. The Gecko Rendering Engine Gecko is the revolutionary rendering engine that offers advanced features for Internet browsing anywhere across applications, computing platforms and devices. This innovation in browser technology offers small size, speed and industry leading standards support. Gecko is the premier cross-platform, full-featured, mature and well-tested layout engine available, providing robust and high quality support for a massive array of standards. Its ability to render web content correctly is exceptional. ...
...And 20 more matches
Plug-in Basics - Plugins
Plug-ins like these are now available: multimedia viewers such as Adobe Flash and Adobe Acrobat utilities that provide object embedding and compression/decompression services applications that range from personal information managers to games The range of possibilities for using plug-in technology seems boundless, as shown by the growing numbers of independent software vendors who are creating new and innovative plug-ins. ...
... a helper application. Plug-ins and helper applications fill different application needs. For more information about helper applications, refer to the Netscape online help. How plug-ins work The life cycle of a plug-in, unlike that of an application, is completely controlled by the web page that calls it. This section gives you an overview of the way that plug-ins operate in the browser. When Gecko starts, it looks for plugin modules in particular places on the system. For more information about where Gecko looks for plugin modules on different systems, see How Gecko Finds Plug-ins. When the user opens a page that contains embedded data of a media type that invokes a plug-in, the browser responds with the following sequence of actions: check for a plug-in with a matching MIME type load...
...If you are browsing a page that has several embedded RealAudio clips, for example, the browser will create as many instances of the RealPlayer plug-in as are needed (though of course playing several RealAudio files at the same time would seldom be a good idea). ...
...And 19 more matches
nsIAppShellService
xpfe/appshell/nsIAppShellService.idlScriptable Provides the AppShellService. ...
...st changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by: @mozilla.org/appshell/appShellService;1 as a service: var appShellService = Components.classes["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService); Method overview void closeTopLevelWindow(in nsIXULWindow aWindow); Obsolete since Gecko 1.8 void createHiddenWindow(in nsIAppShell aAppShell); Native code only! ...
...["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService); Method overview void closeTopLevelWindow(in nsIXULWindow aWindow); Obsolete since Gecko 1.8 void createHiddenWindow(in nsIAppShell aAppShell); Native code only! ...
...And 17 more matches
nsIFaviconService
toolkit/components/places/public/nsIFaviconService.idlScriptable Stores favicons for pages in bookmarks and history. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19) Implemented by: @mozilla.org/browser/favicon-service;1. To use this service, use: var faviconService = Components.classes["@mozilla.org/browser/favicon-service;1"] .getService(Components.interfaces.nsIFaviconService); Method overview void addFailedFavicon(in nsIURI aFaviconURI); void expireAllFavicons(); void getFaviconData(in nsIURI aFaviconURI, out AUTF8String aMimeType, [optional] out unsigned long aDataLen, [array,retval,size_is(aDataLen)] out octet aData);...
....org/browser/favicon-service;1"] .getService(Components.interfaces.nsIFaviconService); Method overview void addFailedFavicon(in nsIURI aFaviconURI); void expireAllFavicons(); void getFaviconData(in nsIURI aFaviconURI, out AUTF8String aMimeType, [optional] out unsigned long aDataLen, [array,retval,size_is(aDataLen)] out octet aData); Obsolete since Gecko 22.0 AString getFaviconDataAsDataURL(in nsIURI aFaviconURI); Obsolete since Gecko 22.0 nsIURI getFaviconForPage(in nsIURI aPageURI); Obsolete since Gecko 22.0 nsIURI getFaviconImageForPage(in nsIURI aPageURI); Obsolete since Gecko 22.0 nsIURI getFaviconLinkForIcon(in nsIURI aFaviconURI); boolean isFailedFavicon(in nsIURI aFaviconURI); void re...
...since Gecko 22.0 nsIURI getFaviconLinkForIcon(in nsIURI aFaviconURI); boolean isFailedFavicon(in nsIURI aFaviconURI); void removeFailedFavicon(in nsIURI aFaviconURI); void setAndLoadFaviconForPage(in nsIURI aPageURI, in nsIURI aFaviconURI, in boolean aForceReload, in unsigned long aFaviconLoadType, [optional] in nsIFaviconDataCallback aCallback); Obsolete since Gecko 22.0 void setFaviconData(in nsIURI aFaviconURI, [const,array,size_is(aDataLen)] in octet aData, in unsigned long aDataLen, in AUTF8String aMimeType, in PRTime aExpiration); Obsolete since Gecko 22.0 void setFaviconDataFromDataURL(in nsIURI aFaviconURI, in AString aDataURL, in PRTime aExpiration); Obsolete since Gecko 22.0 void setFaviconUrlForPage(in nsIURI aPageURI, i...
...And 15 more matches
nsITreeView
layout/xul/base/src/tree/public/nsITreeView.idlScriptable This interface is used by the tree widget to get information about what and how to display a tree widget. Inherits from: nsISupports Last changed in Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19) Implementing a nsITreeView in lieu of DOM methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
... performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
...he tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
...And 15 more matches
IME handling guide
Introduction IME is an abbreviation of Input Method Editor. This is a technical term from Windows but these days, this is used on other platforms as well. IME is a helper application of a user's text input. It handles native key events before or after focused application (depending on the platform) and creates a composition string (a.k.a. preedit string), suggests a list of what the user attempts to input, commits composition string as a selected item off the list and commits composition string without any conversion. IME is used by Chinese, Japanese, Korean and Taiwan users for inputting Chinese characters because the number of them is beyond thousands and cannot be input from the keyboard directly. ...
...(i.e., user cannot enable IME), we call this state "disabled". If IME is enabled but users use direct input mode (e.g., for inputting Latin characters), we call it "IME is closed". Otherwise, we call it "IME is open". (FYI: "open" is also called "active" or "turned on". "closed" is also called "inactive" or "turned off") So, this document is useful when you're try to fix a bug for text input in Gecko. Composition string and clauses Typical Japanese IME can input two or more words into a composition string. When a user converts from Hiragana characters to Chinese characters the composition string, Japanese IME separates the composition string into multiple clauses. For example, if a user types "watasinonamaehanakanodesu", it's converted to Hiragana characters, "?????????????", automatically ...
...ly. These clauses are called "converted clause"). If one or more clauses were not converted as expected, the user can choose one of the clauses with Arrow keys and look for the expected result form the list in the drop down menu (In the following screenshot, the clause with the thicker underline is called "selected clause"). Basically, composition string and each clause style is rendered by Gecko. And the drop down menu is created by IME. Each clause is represented with selection in the editor. From chrome script, you can check it with nsISelectionController. In native code, you can access it with either nsISelectionController or mozilla::SelectionType (the latter is recommended because of type safer). And editor sets these IME selections from mozilla::TextRangeType which are sent by moz...
...And 13 more matches
AT APIs Support
Introduction Documentation is in progress still. But in the meantime it more up-to-date and contains more details than existed analogues for AT-SPI and MSAA This documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support Gecko-based software. We provide for them the support of these products on Windows, Linux/Unix and OS X platforms. ...
...the meantime it more up-to-date and contains more details than existed analogues for AT-SPI and MSAA This documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support Gecko-based software. We provide for them the support of these products on Windows, Linux/Unix and OS X platforms. Accessible Gecko Gecko is a rendering engine that Firefox, SeaMonkey, Netscape and yelp use. ...
...r AT-SPI and MSAA This documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support Gecko-based software. We provide for them the support of these products on Windows, Linux/Unix and OS X platforms. Accessible Gecko Gecko is a rendering engine that Firefox, SeaMonkey, Netscape and yelp use. Gecko can render a variety of content, not just HTML and supports key web standards such as Cascading Style Sheets, Javascript and the W3C DOM. Gecko also handles the users keystrokes and mouse clicks. ...
...And 12 more matches
nsIBrowserHistory
toolkit/components/places/public/nsIBrowserHistory.idlScriptable A browser-specific interface to global history. It adds functions used by the basic browser like, marking pages as typed in the URL bar, and removing pages as from the history interface. Inherits from: nsIGlobalHistory2 Last changed in Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19) Implemented by: @mozilla.org/browser/nav-history-service;1. ...
...0 / SeaMonkey 2.19) Implemented by: @mozilla.org/browser/nav-history-service;1. ...
... To use this service, use: var browserHistory = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsIBrowserHistory); Method overview void addPageWithDetails(in nsIURI aURI, in wstring aTitle, in long long aLastVisited); Obsolete since Gecko 15.0 void markPageAsFollowedLink(in nsIURI aURI); Obsolete since Gecko 22.0 void markPageAsTyped(in nsIURI aURI); Obsolete since Gecko 22.0 void registerOpenPage(in nsIURI aURI); Obsolete since Gecko 9.0 void removeAllPages(); void removePage(in nsIURI aURI); void removePages([array, size_is(aLength)] in nsIURI aURIs, in unsigned long aLength, in boolean aDoBatchNotify); void removePagesByTimeframe(in long long...
...And 12 more matches
Component; nsIPrefBranch
Component: nsIPrefBranch modules/libpref/public/nsIPrefBranch.idlScriptable This interface is used to manipulate the preferences data. This object may be obtained from the preferences service (nsIPrefService) and used to get and set default and/or user preferences across the application. Inherits from: nsISupports Last changed in Gecko 58 (Firefox 58 / Thunderbird 58 / SeaMonkey 2.55) This object is created with a "root" value which describes the base point in the preferences "tree" from which this "branch" stems. Preferences are accessed off of this root by using just the final portion of the preference. For example, if this object is created with the root "browser.startup.", the preferences "browser.startup.page", "browser.startup.homepage", and "browser.startup.homepage_over...
...omepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various Get/Set methods. ...
...rious Get/Set methods. ...
...And 12 more matches
nsIContentPolicy - Archive of obsolete content
dom/base/nsIContentPolicy.idlScriptable Interface used to implement a content policy mechanism. Implementations of this interface can be used to control the loading of various types of out-of-line content, or the processing of certain types of inline content. 63 Introduced Gecko 1.0 Inherits from: nsIContentPolicyBase Last changed in Gecko 42 (Firefox 42 / Thunderbird 42 / SeaMonkey 2.39) You can observe content that is being loaded into your browser by implementing nsIContentPolicy. This interface can be very useful if you are developing a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-browsed URLs. Warning: Do not block the caller in your implementations of shouldLoad() or shouldProcess() (for exa...
...elements). TYPE_OBJECT 5 Indicates a generic object (plugin-handled content typically falls under this category). TYPE_DOCUMENT 6 Indicates a DOM document at the top-level (that is, directly within a browser tab). TYPE_SUBDOCUMENT 7 Indicates a document contained within another document (for example, <iframe> and <frame> elements). Note: Gecko uses TYPE_INTERNAL_FRAME and TYPE_INTERNAL_IFRAME in order to discern the difference internally. These types are mapped to TYPE_SUBDOCUMENT before being passed into the implementation of the content policy and should not be used outside Gecko code. TYPE_REFRESH 8 Indicates a timed refresh. shouldLoad() will never get this, because it does not represent content to...
...load an <img> (with the srcset attribute or <picture>. TYPE_WEB_MANIFEST 22 Indicates a request to load a Web manifest. TYPE_INTERNAL_SCRIPT 23 An internal constant used to represent scripts loaded using <script> elements. Important: This type is mapped to TYPE_SCRIPT before being passed to content policy implementations, and should not be used outside Gecko core code. TYPE_INTERNAL_WORKER 24 An internal constant used to represent scripts loaded through a dedicated worker. Important: This type is mapped to TYPE_SCRIPT before being passed to content policy implementations, and should not be used outside Gecko core code. TYPE_INTERNAL_SHARED_WORKER 25 An internal constant used to repre...
...And 11 more matches
Finishing the Component
Using Frozen Interfaces The core functionality of blocking sites is still missing, however. ...
... is publicly available, and interfaces can be used easily enough. Grab the right headers, use the Component or Service Manager to access the interface you want, and the XPCOM object(s) that implement that interface will do your bidding. With this huge amount of flexibility, however, you lose compatibility. If you use "stuff" that isn't frozen, that stuff is subject to change in future versions of Gecko. If you want to be protected against changes in Gecko, you must only use interfaces and APIs that are clearly marked as FROZEN. The marking is made in the comments above the interface declaration. For example, take a look at the nsIServiceManager: /** * The nsIServiceManager manager interface provides a means to obtain * global services in an application. The service manager depends * on the...
...ce manager by calling NS_GetServiceManager. After that, * they can request specific services by calling GetService. * When they are finished they can NS_RELEASE() the service as usual. * * A user of a service may keep references to particular services * indefinitely and only must call Release when it shuts down. * * @status FROZEN */ These frozen interfaces and functions are part of the Gecko SDK. The rule of thumb is that interfaces outside of the SDK are considered "experimental" or unfrozen. See the following sidebar for information about how frozen and unfrozen interfaces can affect your component development, and for technical details about how interface changes beneath your code can cause havoc. The Danger of Using Unfrozen Interfaces Suppose that you need to use the interfac...
...And 11 more matches
nsIEditorIMESupport
editor/idl/nsIEditorIMESupport.idlScriptable Please add a summary to this article. ...
... editor/idl/nsIEditorIMESupport.idlScriptable Please add a summary to this article. ...
... editor/idl/nsIEditorIMESupport.idlScriptable Please add a summary to this article. ...
...And 11 more matches
nsINavBookmarkObserver
toolkit/components/places/nsINavBookmarksService.idlScriptable This interface is an observer for bookmark changes. ...
... toolkit/components/places/nsINavBookmarksService.idlScriptable This interface is an observer for bookmark changes. ...
...This interface is an observer for bookmark changes. ...
...And 11 more matches
Mozilla
trives to make its software accessible; the documents below cover the ways in which we do so. Add-ons Add-ons allow developers to extend and modify the functionality of Firefox. Adding a new CSS property This page describes how to add a new CSS property to the style system. The style system is the part of the code in Gecko that is responsible for producing a computed value for every property for every element. See the Gecko Overview for more information about the style system. Adding a new event This draft document covers how to add a new event to the Mozilla (Firefox) source code. Adding a new word to the en-US dictionary Occasionally...
...perations, 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. Creating a spell check dictionary add-on This page describes how to package a Hunspell sp...
... any given visual effect in a browser. So, if the effect of complex markup is being tested, put that complex markup into a page and create another page that uses simple markup to achieve the same visual effect. Reftest will then compare them and verify whether they produce the same bitmap. Creating Sandboxed HTTP Connections Starting with Gecko 1.8.1 (Firefox 2), it is possible to create sandboxed HTTP connections which don't affect the user's cookies. This article will cover the basics of doing HTTP connections from XPCOM JavaScript, and should easily translate to C++ XPCOM. Debugging Debugging a project as large as Mozilla can be a daunting task. Fortunately, over the years, M...
...And 11 more matches
Mozilla Quirks Mode Behavior
The following is a rough list of the differences that exist between Mozilla's standards mode and quirks mode behavior. Miscellaneous & Style All of the style rules in layout/style/res/quirk.css apply only in quirks mode: Orphaned LI has an inside bullet (bug 1049). Add padding if the very first node in an LI is another UL or OL (bug 98636). Obsolete since Gecko 50 List bullets do not inherit the font size of the list (bug 97351). Removed in Firefox 50 (bug 648331). Don't inherit font properties into tables except for font-family. Make TABLE borders gray rather than using the foreground color. Collapse top margin of BODY and TD and bottom margin of TD. Collapse the bottom or top margins of empty elements (bug 97361). Support <PRE wrap>, <PRE cols>, <PRE wi...
... the CSS parser allows {} around the contents of style attributes (bug 99554). This behavior is being removed in Firefox 27, for interoperability. (bug 915053) An empty string for the background attribute sets the background URL to empty only in quirks mode. The topmargin, bottommargin, leftmargin, and rightmargin attributes on BODY are supported only in quirks mode (bug 9258). Obsolete since Gecko 35 (Firefox 35.0 / Thunderbird 35.0 / SeaMonkey 2.32) (bug 95530) This quirk is now HTML5 conform and has been adopted in standards mode. The scrollLeft, scrollTop, scrollWidth, and scrollHeight properties are relative to BODY in quirks mode (instead of HTML) (bug 211030). HTML (1-7) and CSS (xx-small - xx-large) font sizes are calculated slightly differently (see bug 18136). The :hover and :...
... relative to BODY in quirks mode (instead of HTML) (bug 211030). HTML (1-7) and CSS (xx-small - xx-large) font sizes are calculated slightly differently (see bug 18136). The :hover and :active pseudo-classes will only be applied to links, and only if there is no other pseudo-class in the selector. To match other elements, the selector must include a tag name, id, class or attribute. ...
...And 10 more matches
nsIDocumentLoader
uriloader/base/nsIDocumentLoader.idlScriptable This interface responsible for tracking groups of loads that belong together (images, external scripts, and so on.) and subdocuments (iframe, frame, and so on.). It is also responsible for sending nsIWebProgressListener notifications. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: @mozilla.org/docloaderservice;1. ...
...erits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: @mozilla.org/docloaderservice;1. ...
...0) Implemented by: @mozilla.org/docloaderservice;1. ...
...And 10 more matches
nsIDownloadManager
deprecated as of Firefox 26. Please use Downloads.jsm instead. toolkit/components/downloads/public/nsIDownloadManager.idlScriptable This interface lets applications and extensions communicate with the Download Manager, adding and removing files to be downloaded, fetching information about downloads, and being notified when downloads are completed. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Implemented by: @mozilla.org/download-manager;1. To get the service, use: var downloadManager = Components.classes["@mozilla.org/download-manager;1"] .getService(Components.interfaces.nsIDownloadManager); Method overview nsIDownload addDownload(in short aDownloadType, in nsIURI aSource, in nsIURI aTarget, i...
...DownloadType, in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime aStartTime, in nsILocalFile aTempFile, in nsICancelable aCancelable, in boolean aIsPrivate); void addListener(in nsIDownloadProgressListener aListener); void cancelDownload(in unsigned long aID); void cleanUp(); void endBatchUpdate(); Obsolete since Gecko 1.9.1 void flush(); Obsolete since Gecko 1.8 nsIDownload getDownload(in unsigned long aID); void onClose(); Obsolete since Gecko 1.9.1 void open(in nsIDOMWindow aParent, in nsIDownload aDownload); Obsolete since Gecko 1.9.1 void openProgressDialogFor(in nsIDownload aDownload, in nsIDOMWindow aParent, in boolean aCancelDownloadOnClose); Obsolete since...
...1.9.1 void flush(); Obsolete since Gecko 1.8 nsIDownload getDownload(in unsigned long aID); void onClose(); Obsolete since Gecko 1.9.1 void open(in nsIDOMWindow aParent, in nsIDownload aDownload); Obsolete since Gecko 1.9.1 void openProgressDialogFor(in nsIDownload aDownload, in nsIDOMWindow aParent, in boolean aCancelDownloadOnClose); Obsolete since Gecko 1.9.1 void pauseDownload(in unsigned long aID); void removeDownload(in unsigned long aID); void removeDownloadsByTimeframe(in long long aBeginTime, in long long aEndTime); void removeListener(in nsIDownloadProgressListener aListener); void resumeDownload(in unsigned long aID); void retryDownload(in unsigned long aID); void saveStat...
...And 10 more matches
nsIXPConnect
js/src/xpconnect/idl/nsIXPConnect.idlNot scriptable Provides the XPConnect service. ...
...); Native code only! void flagSystemFilenamePrefix(in string aFilenamePrefix, in PRBool aWantNativeWrappers); void GarbageCollect(); [noscript,notxpcom] void getCaller(out JSContextPtr aJSContext, out JSObjectPtr aObject); JSVal getCOWForObject(in JSContextPtr aJSContext, in JSObjectPtr aParent, in JSObjectPtr aWrappedObj); Native code only! ...
... aScope, in nsISupports aCOMObj, in nsIIDRef aIID); nsIXPConnectJSObjectHolder getWrappedNativePrototype(in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsIClassInfo aClassInfo); JSVal getWrapperForObject(in JSContextPtr aJSContext, in JSObjectPtr aObject, in JSObjectPtr aScope, in nsIPrincipal aPrincipal, in unsigned long aFilenameFlags); Native code only! ...
...And 10 more matches
List of Mozilla-Based Applications - Archive of obsolete content
Firefox Blackbird browser for African American community BlueGriffon wysiwyg editor Next generation version of Composer Buzzbird Twitter client Built on XULRunner Camino browser 2.5m downloads and ~400,000 active users ... ...
... 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 pro...
...aMail email client for Windows platform, based on Mozilla Thunderbird Developed by Moonchild Productions, creator of the Pale Moon web browser Flickr Uploadr image upload tool see Flickr Uploadr: Open Source and Powered by XULRunner Foxkeh Clock clock Frizione JavaScript development, testing and deployment environment Uses Mozilla Rhino GeckoFX embeddable Gecko Gjs Javascript bindings for GNOME GlobalMojo browser that raises money for your favorite causes GLUEscript a JavaScript engine which can be used as a general purpose language Uses Mozilla SpiderMonkey and formerly called wxJavaScript Gnome operating system Gnome 3 will use SpiderMonkey through Gjs Goo...
...And 9 more matches
textbox - Archive of obsolete content
ement will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. focused Type: boolean This attribute is true if the element is focused. emptytext Deprecated since Gecko 2 Type: string A string that appears in the textbox when it has no value. This is superseded by the placeholder attribute in Gecko 2.0. The old name is retained for compatibility, but you should update your code. hidespinbuttons Type: boolean If true, the number box does not have arrow buttons next to it to allow the user to adjust the value. The value may still be adjusted with the key...
...lines replaced with commas replacewithspaces Pastes the text with newlines replaced with spaces strip Pastes the text with the newlines removed stripsurroundingwhitespace Pastes the text with newlines and adjacent whitespace removed onblur Type: script code This event is sent when a textbox loses keyboard focus. Note: The behavior of this event has evolved over time. ...
...ines removed stripsurroundingwhitespace Pastes the text with newlines and adjacent whitespace removed onblur Type: script code This event is sent when a textbox loses keyboard focus. Note: The behavior of this event has evolved over time. Prior to Gecko 1.9 (Firefox 3), the script code would execute in the context of the anonymous HTML <input> element inside the textbox binding. ...
...And 9 more matches
Embedded Dialog API
Posing Gecko dialogs in embedding applications Problem Statement An application embedding Gecko cannot tightly control its own windows and still allow Gecko to be a fully functional web browser. In any single window, Gecko can be expected to play nicely within its given boundaries. But it must be allowed to create additional windows at times perhaps unexpected by the containing appliction. These new windows can be entire new browser windows opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the browser. Part of Gecko's embedding API is callbacks into the embedding application for creating new windows. The complete windowing portion of the API is large and complex, but it need not be entirely implemented. Its sim...
...ws opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the browser. Part of Gecko's embedding API is callbacks into the embedding application for creating new windows. The complete windowing portion of the API is large and complex, but it need not be entirely implemented. Its simplest requirements are that the app must allow Gecko to create new browser windows and new simple, empty windows. Gecko can use the latter to pose dialogs built from XUL. XUL dialogs are part of the Gecko package; they are the default dialog posing mechanism. Many embedding applications will find them entirely sufficient. However while XUL dialogs are very configurable, they will not behave and probably not look precisely like dialogs which the app...
...Applications concerned with presenting a consistent dialog appearance have the option of implementing the complete dialog posing API. ...
...And 9 more matches
Starting WebLock
u've built up so far doesn't do anything. After having its registration procedure called, the component does nothing. In order to be started up or notified when some event happens, the sample component has to hook into Mozilla, which it can do either by overriding an existing component or by registering for some event that will cause it to start up. WebLock does the latter and gets called when a Gecko Profile Startup occurs. When a Gecko application starts up, registered components are created and notified via the general-purpose observer interface nsIObserver. Observersare objects that are notified when various events occur. Using them is a good way for objects to pass messages to each other without the objects having explicit knowledge of one another. Usually, there is one object notifying...
...r remove an observer to a notification topic. But WebLock needs to be instantiated and added to the observer service automatically, which also implies some sort of persistent data (after all, we want to have the component start up every time the application does). This is where a new service that manages sets of related data comes in handy. This service, the nsICategoryService, is what XPCOM and Gecko embedding applications use to persist lists of nsIObserver components that want to have startup notification. The nsICategoryService maintains sets of name-value pairs like the one below. The Category Manager Every category is identified by a string that represents the name of the category. Each category contains a set of name-value pairs. For example, you might have a category named "Import...
... XPCOM starts up. WebLock has already implemented the nsISupports, nsIFactory, nsIModule, and nsIObserver interfaces that handle generic component functionality including being initialized at startup. And it speaks to the Component Manager, Service Manager, Category Manager, and the Component Registrar to register itself properly with XPCOM. The next step is to expose additional functionality to Gecko applications and other clients to query and control the WebLock component. For example, the user interface needs to be able to enable and disable the web locking functionality, see what sites are in the whitelist, and add or remove sites from that list. WebLock needs to provide an API, and it needs to hook into Gecko in order to implement the actual locking functionality. The WebLock User Inter...
...And 9 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size. 36 Boolean Boolean, CodingScripting, Glossary, JavaScript, Programming Languages, data types In computer science, a Boolean is a logical data type that can have only the values true or false. ...
...usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size. 36 Boolean Boolean, CodingScripting, Glossary, JavaScript, Programming Languages, data types In computer science, a Boolean is a logical data type that can have only the values true or false. ...
... cipher should be used to encrypt or decrypt messages that are longer than the block size. 36 Boolean Boolean, CodingScripting, Glossary, JavaScript, Programming Languages, data types In computer science, a Boolean is a logical data type that can have only the values true or false. ...
...And 8 more matches
Obsolete Build Caveats and Tips
Professional From Build_Instructions Those who need to work with the code for Firefox 3/Mozilla 1.9 and earlier can check out the latest source using CVS. In reality, you should probably not need to do this, since that code is very obsolete. This note below seems redundant as this is true by default https://msdn.microsoft.com/en-us/library/dh8che7s%28v=vs.110%29.aspx Note: Starting with Gecko 7.0, you should no longer include "-Zc:wchar_t-" in the command line when building on Windows. If you're using Visual Studio, go to Project Properties > C/C++ > Language > Treat wchar_t as Built-in Type and set it to "yes". From Source_Code/Mercurial mozilla-2.0 (Firefox 4.0) Code for the Firefox 4.0 (Gecko 2.0) release lives in releases/mozilla-2.0. To get this code, do the following: # P...
...rcurial mozilla-2.0 (Firefox 4.0) Code for the Firefox 4.0 (Gecko 2.0) release lives in releases/mozilla-2.0. To get this code, do the following: # Pull the Mozilla source to the folder 20src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-2.0/ 20src cd 20src mozilla-1.9.2 (Firefox 3.6) Code for the Firefox 3.6 (Gecko 1.9.2) release lives in releases/mozilla-1.9.2. To get this code, do the following: # Pull the Mozilla source to the folder 192src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-1.9.2/ 192src cd 192src mozilla-1.9.1 (Firefox 3.5) Code for the Firefox 3.5 (Gecko 1.9.1) release lives in releases/mozilla-1.9.1. To g...
...By default, a similar-to-release build is done. From Windows_SDK_versions Visual C++ 9 (VS2008) Professional/Express Download and install the Windows 7 SDK. Note that you need Service Pack 1--for the Express edition it is a separate download. ...
...And 8 more matches
nsIDocShell
Do not create an instance directly. Instead, retrieve an nsIDocShell from a browser or other document container element. Note that out-of-process browsers do not have an nsIDocShell; instead you can access the nsIDocShell object from a frame script. ...
... void createAboutBlankContentViewer(in nsIPrincipal aPrincipal); void createLoadInfo(out nsIDocShellLoadInfo loadInfo); void DetachEditorFromWindow(); Violates the XPCOM interface guidelines void finishRestore(); void firePageHideNotification(in boolean isUnload); Native code only! void fireUnloadNotification(); Native code only! ...
...unless the only reason for js being disabled in this docshell is a parent docshell having a document that is in design mode. In that case, we explicitly allow scripting on the current docshell. Read only. canvasHasFocus boolean Tells the docshell whether the canvas should have focus. Called by the focus manager when the user tabs to the frame rather than an element. Obsolete since Gecko 1.9.2 channelIsUnsafe boolean Find out if the currently loaded document came from a suspicious channel (such as a JAR channel where the server-returned content type is not a known JAR type). Read only. charset string The converter to use when reading the document's data. In Mozilla code, all text is encoded as Unicode. When reading a document, a converter i...
...And 8 more matches
nsIProcess
xpcom/threads/nsIProcess.idlScriptable This interface represents an executable process. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/process/util;1. ...
...t changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/process/util;1. ...
...cription exitValue long The value returned by the process upon exit. This is only valid after the process has exited. Read only. isRunning boolean true if the process is running, otherwise false. Only accurate if the process was run with blocking disabled. Read only. location nsIFile The location of the executable file on disk. Read only. Gecko 1.9.1 note This attribute is no longer implemented as of Gecko 1.9.1, and is removed entirely in Gecko 1.9.2. pid unsigned long The process ID of the process. This value is only available after the process has started; in addition, some platforms may not offer this value at all. Read only. processName string The name of the process. Read only. Gec...
...And 8 more matches
nsITextInputProcessor
nsIDOMWindowUtils has provided the methods which dispatched keyboard events and composition events almost directly. ...
...nsIDOMWindowUtils has provided the methods which dispatched keyboard events and composition events almost directly. ...
...ts with wrong rules. For solving that issue, methods of this interface have been designed for performing a key operation or representing a change of composition state. For example, the implementation of this interface manages modifier state and composition state, initializes DOM events from minimum information, and doesn't dispatch some events if they are not necessary. This means that even when Gecko changes the DOM event behavior, it may not be necessary that the users of this interface need to be updated, i.e., the implementation of this class can be a cushion from the impact of Gecko's change. You can create an instance of this interface with the following code: var TIP = Components.classes["@mozilla.org/text-input-processor;1"]. createInstance(Components.interfaces.nsITextIn...
...And 8 more matches
CSS <display-xul> component
See this Firefox Site Compatibi...
...See this Firefox Site Compatibi...
...See this Firefox Site Compatibi...
...And 7 more matches
JNI.jsm
lyQualifiedName A sig of a typed array or the name of the class that would be used in a signature, but without the surrounding L and ;. If it is the sig of a typed array such as '[I' then aDeclares must not be declared. See the section "Working with arrays" to see how this is used to create typed arrays. If it is the name of a class, then aDeclares MUST be declared. For example, the class of GeckoAppShell has the fully-qualified class name of org.mozilla.gecko.GeckoAppShell. The signature for this would be Lorg.mozilla.gecko.GeckoAppShell; but we pass here without the L and ;. We can use dot notification here for the parent class. However if it was a subclass such as GeckoInterface (org.mozilla.gecko.GeckoAppShell.GeckoInterface), then this will cause a crash. Therefore, it is always recom...
... aDeclares optional If this is omitted, then aFullyQualifiedName must be an array type. If this is provided, then aFullyQualifiedName must be a class name. ...
... aDeclares optional If this is omitted, then aFullyQualifiedName must be an array type. If this is provided, then aFullyQualifiedName must be a class name. ...
...And 7 more matches
Profiling with the Firefox Profiler
ls have a simplified interface targeted towards web developers, but does not include as much information as the Firefox Profiler web app. It is available from the menu at Tools > Web Developer > Performance. Understanding Profiles The Firefox Profiler has more current documentation available at profiler.firefox.com/docs/. However the following could have some potentially useful information for Gecko-specific problems. You can check out some frequently asked questions about the Firefox Profilers. Reporting a Performance Problem has a step-by-step guide for obtaining a profile when requested by Firefox developers. Interface 1. Timeline The timeline has several rows of tracing markers (colored segments) which indicate interesting events. Hover over them to see more information. Below th...
...lected ranges or the entire profile (denoted as "Full Range"). Tip: While zooming out to a previously-selected range deletes the narrower range, the browser back button can be used to restore the narrower range. Thread Timeline(s) Thread/Process Timelines: Below the tracing markers we have a list of profiled threads. These threads may come from different processes. In this case, we have the 'GeckoMain [default]' process' main thread, a content process' main thread, and the main thread of the compositor process. Each of these timelines is aligned with wall clock time. So, for example, when a thread is blocked, like 'GeckoMain [tab]', on a thread like 'GeckoMain [default]', we can see what's occurring on the latter thread that is preventing it from responding to the former. X (Time) axis: T...
...timeline elements (the selected element gets darker when selected) and the tree view (see below) reflects the selected element. 2. Call Tree The Call Tree shows the samples organized by 'Running Time' which will show the data by wall clock time. There are lighter grey names to the right of tree elements that indicate where the code comes from. Be aware that elements can be from JavaScript, Gecko, or system libraries. Note that if some functions are not yet named properly, symbolication may not yet be finished. Tip: You can right-click on a function name to get an option to copy its name to the clipboard. A significant portion of time can be spent in idle, blocking calls like waiting for events. This is ideal for a responsive application to be ready to service incoming events. There a...
...And 7 more matches
Component Internals
string implementations. The largest and possibly most complex part of a component is the code specific to the component itself. But Where Are the Components? Components reside in modules, and those modules are defined in shared library files that typically sit in the components directory of an XPCOM application. A set of default libraries stored in this components directory makes up a typical Gecko installation, providing functionality that consists of networking, layout, composition, a cross-platform user interface, and others. Another, even more basic view of this relationship of components to the files and interfaces that define them is shown in Onion Peel View of XPCOM Component Creation in the next chapter. The component is an abstraction sitting between the actual module in which it ...
...for use by clients. XPCOM Initialization To understand why and when your component library gets called, it is important to understand the XPCOM initalization process. When an application starts up, that application may initialize XPCOM. The sequence of events that kicks off this XPCOM initialization may be triggered by user action or by the application startup itself. A web browser that embeds Gecko, for example, may initialize XPCOM at startup through the embedding APIs. Another application may delay this startup until XPCOM is needed for the first time. In either case, the initialization sequence within XPCOM is the same. XPCOM starts when the application makes a call to initialize it. Parameters passed to this startup call allow you to configure some aspects of XPCOM, including the custo...
.... XPCOM starts when the application makes a call to initialize it. Parameters passed to this startup call allow you to configure some aspects of XPCOM, including the customization of location of specific directories. The main purpose of the API at this point is to change which components directory XPCOM searches when it looks for XPCOM components. This is how the API is used, for example, in the Gecko Runtime Environment (GRE). XPCOM Startup The six basic steps to XPCOM startup are as follows: Application starts XPCOM. XPCOM sends a notification that it's beginning startup. XPCOM finds and processes the component manifest (see Component Manifests below). XPCOM finds and processes the type library manifest (see Type Library Manifests below). If there are new components, XPCOM register...
...And 7 more matches
nsIAppShell
widget/public/nsIAppShell.idlNot scriptable Interface for the native event system layer. This interface is designed to be used on the main application thread only. ...
... widget/public/nsIAppShell.idlNot scriptable Interface for the native event system layer. This interface is designed to be used on the main application thread only. ...
... Interface for the native event system layer. This interface is designed to be used on the main application thread only. ...
...And 7 more matches
nsIDOMNSHTMLDocument
dom/interfaces/html/nsIDOMNSHTMLDocument.idlScriptable This interface defines methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
... dom/interfaces/html/nsIDOMNSHTMLDocument.idlScriptable This interface defines methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
... that are not part of DOM Level 2. ...
...And 7 more matches
nsIFile
xpcom/io/nsIFile.idlScriptable An instance of this interface is a cross-platform representation of a location in the filesystem. Inherits from: nsISupports Last changed in Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27) nsIFile is the correct platform-agnostic way to specify a file; you should always use this instead of a string to ensure compatibility. With an nsIFile you can navigate to ancestors or descendants without having to deal with the different path separators used on different platforms, query the state of any file or directory at the position represented by the nsIFile and create, move or copy items in the filesystem. An nsIFile can be retrieved by either instantiating an nsILocalFile using a platform specific path string or by using cross-platform locations ...
...not have such a limitation. Therefore, you must not use the native form unless it is guaranteed that the path passed to a native form function is always ASCII. To create an nsIFile from a path you can use FileUtils.jsm: var FileUtils = Cu.import("resource://gre/modules/FileUtils.jsm").FileUtils var nsifile = new FileUtils.File( fileName ) Note: nsILocalFile was merged with this interface in Gecko 14. Much of the documentation has not been updated to reflect this change. Method overview void append(in AString node); void appendNative(in ACString node); Native code only! void appendRelativeNativePath(in ACString relativeFilePath); void appendRelativePath(in AString relativeFilePath); nsIFile clone(); boolean contains(in nsIFile inFile)...
...a 1.7, this attribute is ignored on UNIX systems. lastModifiedTime PRInt64 This attribute exposes the time when the file referenced by this nsIFile was last modified. The value of this attribute is milliseconds since midnight (00:00:00), January 1, 1970 Greenwich Mean Time (GMT). Changing the last modified time of a nsIFile operates on the underlying filesystem. As of Gecko 1.7, changing the last modified time of a non-existent file has undefined behavior. lastModifiedTimeOfLink PRInt64 This attribute exposes the time when the symbolic link referenced by this nsIFile was last modified. Unlike lastModifiedTime, this attribute corresponds to the last modified time of the symbolic link referenced by this nsIFile. If this nsIFile does not refere...
...And 7 more matches
nsIPluginHost
dom/plugins/base/nsIPluginHost.idlScriptable Please add a summary to this article. ...
...ugins/base/nsIPluginHost.idlScriptable Please add a summary to this article. ...
... nsIPluginTag getPluginTagForInstance(in nsIPluginInstance aInstance); Native code only! ...
...And 7 more matches
nsIScrollable
/docshell/base/nsIScrollable.idlScriptable This interface can be implemented by a control that supports scrolling. This is a generic interface without concern for the type of content that may be inside. ...
...hell/base/nsIScrollable.idlScriptable This interface can be implemented by a control that supports scrolling. This is a generic interface without concern for the type of content that may be inside. ...
...9.0 / SeaMonkey 2.26) Method overview long getCurScrollPos(in long scrollOrientation); Obsolete since Gecko 29.0 long getDefaultScrollbarPreferences(in long scrollOrientation); void getScrollbarVisibility(out boolean verticalVisible, out boolean horizontalVisible); void getScrollRange(in long scrollOrientation, out long minPos, out long maxPos); Obsolete since Gecko 29.0 void setCurScrollPos(in long scrollOrientation, in long curPos); Obsolete since Gecko 29.0 void setCurScrollPosEx(in long curHorizontalPos, in long curVerticalPos); Obsolete since Gecko 29.0 void setDefaultScrollbarPreferences(in long scrollOrientation, in long scrollbarPref); void setScrollRange(in long scrollOrientation, in long minPos, in long maxPos); ...
...And 7 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
ers and How Mozilla Does It Contents This document is for developers working to support MSAA in an application in order to make it accessible with 3rd party assistive technologies, as well as for hackers wishing to be involved in Mozilla's MSAA support specifically. If you're implementing controls/widgets, you should also see the Accessible Toolkit Checklist. If you're interested in more about Gecko's MSAA implementation, read Gecko Info for Windows Accessibility Vendors to learn how MSAA clients can utilize Gecko's MSAA support. Intro: What is MSAA? MSAA is the Microsoft Active Accessibility (MSAA) API, used on Windows operating systems to support assistive technologies for users with disabilities. Third party assistive technology, such as screen readers, screen magnifiers and voice inp...
... "right way" for accessibility aids to get information, but sometimes the hacks are more effective. For example, screen readers look for screen draws of a vertical blinking line, to determine the location of the caret. Without doing this, screen readers would not be able to let the user know where there caret has moved to in most programs, because so many applications do not use the system caret (Gecko does not). This 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 C...
...rmation 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 UI objects like checkboxes. To really learn about MSAA, you need to download the entire MSAA SDK. Without downloading the SDK, you won't get the extremely useful tool...
...And 7 more matches
Install Manifests - Archive of obsolete content
ast one of these objects, and may specify more if the add-on targets multiple applications that support the Add-on Manager (e.g. Firefox and Thunderbird). Examples <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!--Firefox--> <em:minVersion>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 ch...
... 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 whether the extension is boot-strappable. At the moment this only works for add-ons with em:type="2". The default value is false. For more information, see Bootstrapped extensions. contrib...
...he icon can be up to 48x48 pixels in size. If this property is not specified, a default icon is used. <em:iconURL>chrome://myext/skin/icon.png</em:iconURL> Note: For the above example to work you will also have to add a skin package line to your chrome.manifest file. See Chrome Registration#skin. Alternatively you can place your icon in the directory specified in your content package line. Gecko 1.9.2 note Starting in Gecko 1.9.2 (Firefox 3.6), you can also simply include your icon, named icon.png, in the base directory of the add-on. This allows your add-on's icon to be displayed even when the add-on is disabled, or if the manifest is missing an iconURL entry. icon64URL A chrome:// URL to a 64x64 pixel icon to display in the add-on's details view . If this property is not specified,...
...And 6 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. XPInstall is a JavaScript-based installer technology that works across all the platforms that Mozilla and Netscape browsers based on Mozilla (such as Netscape 7) are deployed. ...
...etup.exe experience on Windows) or obliging the user to restart their browser. For plugin vendors who have already written a native code (e.g. EXE) installer, XPInstall can wrap this native installer and run it so that the user never has to leave the browsing environment and click on the EXE to run it. This article presents a guideline for improving the plugin installation experience for Netscape Gecko browsers using XPInstall. A Definition of Terms XPInstall is an installer technology, and the name itself stands for "Cross Platform Install" (hence "XP" -- an abbreviation for "Cross Platform"). An XPInstall package is usually called an XPI package for short (and often pronounced "zippy"). This article is about how you can use XPInstall to install plugins to the browsers that support XPInstal...
...la browsers, changing their look and feel. This article focuses on how to install plugins. Which Browsers Support XPInstall? Currently, all Mozilla browsers released by mozilla.org support XPInstall, and a family of browsers based on Mozilla code support XPInstall. In particular, this includes: Recent Netscape browsers such as Netscape 6.2.x and Netscape 7.0, which are both based on Netscape Gecko, which is at the core of the Mozilla browser Recent beta-only versions of the AOL software based on Netscape Gecko, the layout engine of the Mozilla project. Caveats: AOL Time Warner's CompuServe browser, also based on Netscape Gecko, does not support XPInstall. Netscape Communicator 4.x does not support XPInstall. What Does a Plugin Consist Of? Plugins can consist of the following types ...
...And 6 more matches
Chrome registration
What is chrome? Chrome is the set of user interface elements of the application window that are outside the window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome. Mozilla locates and reads the root chrome.manifest file for extensions and themes. Note: With Gecko 1.9.2 and older, Mozilla reads chrome/*.manifest files from applications. Starting with Gecko 2.0, the root chrome.manifest is the only manifest used; you can add manifest commands to that file to load secondary manifests. Chrome providers A supplier of chrome for a given window type (e.g., for the browser window) is called a chrome provider. The providers work together to supply a complete set of chrome for a particular window, ...
...code. The two main types of localizable files are DTD files and Java-style properties files. Skin A skin provider is responsible for providing a complete set of files that describe the visual appearance of the chrome. Typically a skin provider will provide CSS files and images. Note: Scripts (including those found in XBL) loaded from skin packages will not execute. The chrome registry The Gecko runtime maintains a service known as the chrome registry that provides mappings from chrome package names to the physical location of chrome packages on disk. This chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale. This is accomplished through xpinstall and the extension manager. In order to inform the ...
...type/original-uri.whatever new-resolved-URI [flags] Note: overrides are not recursive (so overriding chrome://foo/content/bar/ with file:///home/john/blah/ will not usually do what you want or expect it to do). Also, the path inside overridden files is relative to the overridden path, not the original one (this can be annoying and/or useful in CSS files, for example). Note: There was a bug in Gecko 1.8.1.5 (Firefox 2.0.0.5) and earlier where you could not use a relative URL for the new-resolved-URI parameter. You needed to provide an absolute URL. See bug 323455. resource Aliases can be created using the resource instruction: resource aliasname uri/to/files/ [flags] This will create a mapping for resource://<aliasname>/ URIs to the path given. Note: There are no security restricti...
...And 6 more matches
Preface
Accordingly, the book is arranged so that you can follow along and create your own components or learn about different XPCOM topics individually, as in a reference work. ...
...Accordingly, the book is arranged so that you can follow along and create your own components or learn about different XPCOM topics individually, as in a reference work. ...
...ship between components and modules, of XPCOM interfaces, and of the registration process in general. The top of each chapter provides a list of the major topics covered. Sidebar sections are included to highlight technical details. By the end of the book, if we've done our job, you will have learned how to build a component and you will know something about the framework for these components in Gecko, which is XPCOM. Who Should Read This Book No one. It is badly out of date, and much of what it says is either no longer remotely accurate, or is severely deprecated. If you are a historian, though... Creating XPCOM Components is meant for C++ developers. Though you can create XPCOM components in JavaScript and other languages, and though you might be able to follow along as a C programmer,...
...And 6 more matches
nsIAccessibleTable
accessible/public/nsIAccessibleTable.idlScriptable Please add a summary to this article. ...
... accessible/public/nsIAccessibleTable.idlScriptable Please add a summary to this article. ...
...Table.idlScriptable Please add a summary to this article. ...
...And 6 more matches
nsIDBFolderInfo
nsIDBFolderInfo - careful, pulled from the wrong (cvs) repo! mailnews/db/msgdb/public/nsIDBFolderInfo.idlScriptable ??? Add brief description of Interface ??? Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: ?????????????????????????????????????. To create an instance, use: Implemented by: ????????????????????????????????????? as a service: var dBFolderInfo = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIDBFolderInfo); Method overview long AndFlags(in long flags); void ChangeExpungedBytes(in long delta); void ChangeNumMessages(in long delta); void ChangeNumUnreadMessages(in...
...long delta); void ChangeNumMessages(in long delta); void ChangeNumUnreadMessages(in long delta); boolean getBooleanProperty(in string propertyName, in boolean defaultValue); void getCharacterSet(out ACString charSet, out boolean overriden); void getCharacterSetOverride(out boolean characterSetOverride); Obsolete since Gecko 1.8 string getCharPtrCharacterSet(); string getCharPtrProperty(in string propertyName); void getLocale(in nsString result); Native code only! Obsolete since Gecko 1.8 void getMailboxName(in nsString boxName); Native code only! Obsolete since Gecko 1.8 AString getProperty(in string propertyName); nsIDBF...
...me, in unsigned long defaultValue); void initFromTransferInfo(in nsIDBFolderInfo transferInfo); long OrFlags(in long flags); void setBooleanProperty(in string propertyName, in boolean aPropertyValue); void setCharacterSet(in string charSet); void setCharacterSetOverride(in boolean characterSetOverride); Obsolete since Gecko 1.8 void setCharPtrProperty(in string aPropertyName, in string aPropertyValue); void SetHighWater(in nsMsgKey highwater, in boolean force); void setLocale(in nsString locale); Native code only! Obsolete since Gecko 1.8 void setMailboxName(in nsString newBoxName); Native code only! Obsolete since Gecko 1.8 void setProp...
...And 6 more matches
nsILocalFileMac
xpcom/io/nsILocalFileMac.idlScriptable Please add a summary to this article. ...
.../nsILocalFileMac.idlScriptable Please add a summary to this article. ...
... only! FSRef getFSRef(); Native code only! FSSpec getFSSpec(); Native code only! void initToAppWithCreatorCode(in OSType aAppCreator); Native code only! Obsolete since Gecko 2.0 void initWithCFURL(in CFURLRef aCFURL); Native code only! void initWithFSRef([const] in FSRefPtr aFSRef); Native code only! void initWithFSSpec([const] in FSSpecPtr aFileSpec); Native code only! ...
...And 6 more matches
nsINavHistoryResultObserver
toolkit/components/places/nsINavHistoryService.idlScriptable Lets clients observe changes to a result as the result updates itself according to bookmark and history system events. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), this interface replaced the older nsINavHistoryResultViewer interface, which only allowed one client at a time. ...
...anged in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), this interface replaced the older nsINavHistoryResultViewer interface, which only allowed one client at a time. ...
...fox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), this interface replaced the older nsINavHistoryResultViewer interface, which only allowed one client at a time. ...
...And 6 more matches
nsIZipReader
modules/libjar/nsIZipReader.idlScriptable This interface provides methods for reading compressed (zip) files. Inherits from: nsISupports Last changed in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) Implemented by: @mozilla.org/libjar/zip-reader;1. ...
...ozilla.org/libjar/zip-reader;1"] .createInstance(Components.interfaces.nsIZipReader); About character sets and code pages Note: nsIZipReader has a code page problem; that is, in the ZIP specification, filenames are supposed to use 7-bit ASCII; however, most modern filesystems use 8 bit code pages, such as UTF-8. This can mismatch characters in the nsIZipReader API. Starting in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), the nsIZipReader API supports a limited 8 bit code page usage. All functions now pass the filenames (both in and out) as AUTF8String. So you can now read and extract what you wrote with nsIZipWriter. If you show filenames from the findEntries() result in the user interface, the character matching is only fine on UTF-8 ZIP archives. Metho...
... AUTF8String. So you can now read and extract what you wrote with nsIZipWriter. If you show filenames from the findEntries() result in the user interface, the character matching is only fine on UTF-8 ZIP archives. ...
...And 6 more matches
Browser detection using the user agent - HTTP
are looking for? As there is no uniformity of the different part of the user agent string, this is the tricky part. Browser Name When people say they want "browser detection", often they actually want "rendering engine detection". Do you actually want to detect Firefox, as opposed to SeaMonkey, or Chrome as opposed to Chromium? Or do you actually simply want to see if the browser is using the Gecko or the WebKit rendering engine? If this is what you need, see further down the page. Most browsers set the name and version in the format BrowserName/VersionNumber, with the notable exception of Internet Explorer. But as the name is not the only information in a user agent string that is in that format, you can not discover the name of the browser, you can only check if the name you are looking ...
... Chrome and Safari. So to detect Safari you have to check for the Safari string and the absence of the Chrome string, Chromium often reports itself as Chrome too or Seamonkey sometimes reports itself as Firefox. Also, pay attention not to use a simple regular expression on the BrowserName, user agents also contain strings outside the Keyword/Value syntax. Safari & Chrome contain the string 'like Gecko', for instance. Must contain Must not contain Firefox Firefox/xyz Seamonkey/xyz Seamonkey Seamonkey/xyz Chrome Chrome/xyz Chromium/xyz Chromium Chromium/xyz Safari Safari/xyz Chrome/xyz or Chromium/xyz Safari gives two version numbers: one technical in the Safari/xyz token, and...
...will contain a valid number. Rendering engine As seen earlier, in most cases, looking for the rendering engine is a better way to go. This will help to not exclude lesser known browsers. Browsers sharing a common rendering engine will display a page in the same way: it is often a fair assumption that what will work in one will work in the other. ...
...And 6 more matches
Script security
This page provides an overview of the script security architecture in Gecko. Like any web browser, Gecko can load JavaScript from untrusted and potentially hostile web pages and run it on the user's computer. The security model for web content is based on the same-origin policy, in which code gets full access to objects from its origin but highly restricted access to objects from a different origin. The rules for determining whether an object is same-origin with 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...
...ng 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 chrome code, the script security model in Gecko is intended to provide that help to make writing secure, system-privileged JavaScript a realistic expectation. Security policy Gecko implements the following security policy: Objects that are same-origin are able to access each other freely. For example, the objects associated with a document served from https://example.org/ can access each other, and they can also access objects served from...
... untrusted code. An example of this scope is chrome-privileged JavaScript accessing web content. Objects in a less privileged scope don't get any access to objects in a more privileged scope, unless the more privileged scope explicitly clones those objects. An example of this scope is web content accessing objects in a chrome-privileged scope. Compartments Compartments are the foundation for Gecko's script security architecture. A compartment is a specific, separate area of memory. In Gecko, there's a separate compartment for every global object. This means that each global object and the objects associated with it live in their own region of memory. Normal content windows are globals, of course, but so are chrome windows, sandboxes, workers, the ContentFrameMessageManager in a frame sc...
...And 5 more matches
nsIAccessNode
accessible/public/nsIAccessNode.idlScriptable An interface used by in-process accessibility clients to get style, window, markup and other information about a DOM node. When accessibility is active in Gecko, every DOM node can have one nsIAccessNode. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The nsIAccessNode implementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. ...
....0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The nsIAccessNode implementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. ...
...dinateType, in long aX, in long aY); Attributes Note: Attempting to access the attributes of a node that is unattached from the accessible tree will result in an exception - NS_ERROR_FAILURE. Attribute Type Description document nsIAccessibleDocument The document accessible that this access node resides in. Read only. Note: Renamed from accessibleDocument in Gecko 2.0 DOMNode Node The DOM node this nsIAccessNode is associated with. Read only. firstChildNode nsIAccessNode The first nsIAccessNode child. Read only. Obsolete since Gecko 2.0 innerHTML DOMString The innerHTML for the DOM node This is a text string of all the markup inside the DOM node, not including the start and end tag for the node. Read only. ...
...And 5 more matches
nsIAppStartup
toolkit/components/startup/public/nsIAppStartup.idlScriptable This interface is intended to be used as application startup service. It also helps in quitting applications as well. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/toolkit/app-startup;1. ...
...hunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/toolkit/app-startup;1. ...
...olkit/app-startup;1"] .getService(Components.interfaces.nsIAppStartup); Method overview void createHiddenWindow(); boolean createStartupState(in long aWindowWidth, in long aWindowHeight); Obsolete since Gecko 1.9.1 void destroyHiddenWindow(); void doProfileStartup(in nsICmdLineService aCmdLineService, in boolean canInteract); Obsolete since Gecko 1.9.1 void ensure1Window(in nsICmdLineService aCmdLineService); Obsolete since Gecko 1.9.1 void enterLastWindowClosingSurvivalArea(); void exitLastWindowClosingSurvivalArea(); void getStartupInfo(); void hideSplashScreen(); Obsolete since Gecko 1.9.1 void initialize(in nsISupports nativeAppSupportOrSplashScreen); Obsolete since Gecko 1.9.1 ...
...And 5 more matches
nsIJSON
However, you should use native JSON instead if at all possible. Implemented by: @mozilla.org/dom/json;1. ...
...However, you should use native JSON instead if at all possible. Implemented by: @mozilla.org/dom/json;1. ...
...s["@mozilla.org/dom/json;1"] .createInstance(Components.interfaces.nsIJSON); Method overview Note: The IDL file has portions of the IDL commented out because they represent things that can't actually be properly described by IDL; however, for the purposes of this article, we'll pretend they can be and ignore that issue. ...
...And 5 more matches
nsIPlacesImportExportService
The interface name has been kept for compatibility reasons for code using the export service. ...
...The interface name has been kept for compatibility reasons for code using the export service. ...
... void backupBookmarksFile(); Parameters None. exportHTMLToFile() Saves ...
...And 5 more matches
Adobe Flash - Archive of obsolete content
in plugin functionality for access via JavaScript. It can also access JavaScript methods from within the plugin. This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation. The focus of this article is to present tips on scripting Flash within Gecko(TM)-based web browsers. Detecting the Right Flash Plugin (and browser) Adobe Flash has exposed the scriptability feature in Netscape Gecko browsers since Flash 6r49 and later. Versions of Flash prior to Flash 6r49 (such as Flash 5) are not scriptable in Netscape Gecko browsers. Thus client-side detection for the right version of Flash is an important aspect of creating a scripted Flash experien...
...n (and browser) Adobe Flash has exposed the scriptability feature in Netscape Gecko browsers since Flash 6r49 and later. Versions of Flash prior to Flash 6r49 (such as Flash 5) are not scriptable in Netscape Gecko browsers. Thus client-side detection for the right version of Flash is an important aspect of creating a scripted Flash experience. On Mac OS X, there is an additional caveat: Netscape Gecko browsers such as Camino (formerly Chimera), the latest Mozilla browsers, and future versions of Netscape which are built using the Mach-O binary format won't be able to use Flash's scriptability features. Until Macromedia changes this from within the Flash plugin, scriptability can not be used on Mac OS X browsers based on Gecko. The example below shows a detection heuristic in action. Example 1...
...e Mach-O binary format won't be able to use Flash's scriptability features. Until Macromedia changes this from within the Flash plugin, scriptability can not be used on Mac OS X browsers based on Gecko. The example below shows a detection heuristic in action. Example 1: Verifying the Flash Plugin Version Below, JavaScript identifies the version of Flash, and whether it is scriptable in Netscape Gecko: can we have javascript in a wiki page? <script type="text/javascript">identifyFlash();</script> Typically, JavaScript code that determines what version of the plugin is installed looks at the mimeTypes array that is part of the navigator object. Every plugin exposes a description string that typically includes the plugin's name and version number. The Flash plugin's description string uses a ...
...And 4 more matches
The First Install Problem - Archive of obsolete content
This is an old working document; see en/Gecko_Plugin_API_Reference/Plug-in_Development_Overview for current information. Problem Definition The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser. If this happens, Gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated MIME type is encountered on the Web. ...
.... Problem Definition The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser. If this happens, Gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated MIME type is encountered on the Web. Unless Gecko does a pre-emptive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave DLLs (and XPT files, if applicable) in a location that Gecko can discover at runtime. This document presents a consistent way to do that. Proposed Solution On Mac OS X, the System's Plugins Folder will probabl...
... Proposed Solution On Mac OS X, the System's Plugins Folder will probably suffice as an install location in which browsers installed later can find their plugins. On Linux, a per-profile installation of plugins seems unavoidable. This document presents Windows solutions for plugin vendors. The solution suggests that plugin vendors ought to leave DLLs on a Windows desktop whether or not a Netscape Gecko browser is detected, and then write keys in the Windows registry giving future Netscape Gecko browsers the path where the plugin resides and meta-information about how to load the plugin. This document supplements the key parsing methodology suggested for installers. The solution is to encourage plugin vendors to write registry keys to the Win32 System Registry, like the example application. This...
...And 4 more matches
Building Mozilla XForms - Archive of obsolete content
ensions. 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. ...
...parate 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. ...
... build environment by doing a regular Firefox build. Have a look at the Build Instructions for detailed information for your platform. ...
...And 4 more matches
Following the Android Toasts Tutorial from a JNI Perspective
: [ { name: 'LENGTH_SHORT', sig: SIG.int } ] }); getApplicationContext() Many JNI codes need an entry point, sometimes it is the context, sometimes it is the activity. In our Toasts example, we need the context. Our application is Firefox for Android, so we need to tap into the Firefox classes to get its context. ...
...s it is the context, sometimes it is the activity. In our Toasts example, we need the context. Our application is Firefox for Android, so we need to tap into the Firefox classes to get its context. We search DXR, and we find a getContext static method belonging to the GeckoAppShell class. To figure out the sig for Firefox classes, we have to search on DXR. We find an XML file showing the sig for GeckoAppShell is org.mozilla.gecko.GeckoAppShell. We will add this to our SIG object in slash notation: GeckoAppShell: 'Lorg/mozilla/gecko/GeckoAppShell;' We then instantiate the GeckoAppShell class in JNI and declare the getContext method; DXR showed that this method accepted no arguments and returns a Context, and we already had the sig for Context in our SIG object. var geckoAppShell = JNI.LoadCl...
...ozilla.gecko.GeckoAppShell. We will add this to our SIG object in slash notation: GeckoAppShell: 'Lorg/mozilla/gecko/GeckoAppShell;' We then instantiate the GeckoAppShell class in JNI and declare the getContext method; DXR showed that this method accepted no arguments and returns a Context, and we already had the sig for Context in our SIG object. var geckoAppShell = JNI.LoadClass(my_jenv, SIG.GeckoAppShell.substr(1, SIG.GeckoAppShell.length - 2), { static_methods: [ { name: 'getContext', sig: '()' + SIG.Context } ] }); Porting the Java code Now that all the declarations are complete, we can now side-by-side port the Java code to JNI. // Context context = getApplicationContext(); var context = geckoAppShell.getContext(); // CharSequence text = 'Hello toast!'; var text = '...
...And 4 more matches
Implementation Details
Introduction This article is a reference how Gecko implements AT APIs. ...
... Introduction This article is a reference how Gecko implements AT APIs. ...
... Introduction This article is a reference how Gecko implements AT APIs. ...
...And 4 more matches
Packaging WebLock
n 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. ...
...installation process in Mozilla. The following sections describe the steps you can take to organize the WebLock component for distribution and installation. Note: the emphasis of this tutorial is on the component development itself, so this section on packaging and installing extensions to Gecko is necessarily brief. For more detailed information on packaging and installation of components into Gecko-based applications, see http://www.mozilla.org/projects/xpinstall. Component Installation Overview XPInstall is a set of JavaScript APIs for creating installation scripts. Using XPInstall, you can create web-based installations for Gecko-based applications, Mozilla extensions, or individual components. The installation script for the WebLock component can also be used to register the component...
...ore 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. ...
...And 4 more matches
nsIAccessibleRetrieval
accessible/public/nsIAccessibleRetrieval.idlScriptable An interface for in-process accessibility clients wishing to get an nsIAccessible or nsIAccessNode for a given DOM node. ...
...M node. ...
... overview nsIAccessible getAccessibleFor(in nsIDOMNode aNode); nsIAccessible getAccessibleInShell(in nsIDOMNode aNode, in nsIPresShell aPresShell); nsIAccessible getAccessibleInWeakShell(in nsIDOMNode aNode, in nsIWeakReference aPresShell); Obsolete since Gecko 2.0 nsIAccessible getAccessibleInWindow(in nsIDOMNode aNode, in nsIDOMWindow aDOMWin); Obsolete since Gecko 2.0 nsIAccessible getApplicationAccessible(); nsIAccessible getAttachedAccessibleFor(in nsIDOMNode aNode); nsIAccessible getCachedAccessible(in nsIDOMNode aNode, in nsIWeakReference aShell); Obsolete since Gecko 2.0 nsIAccessNode getCachedAccessNode(in nsIDOMNode aNode, in nsIWeakReference aShell); Obsolete since Gecko 2.0 nsIDOMNode getRelevantConte...
...And 4 more matches
nsIContentViewer
docshell/base/nsIContentViewer.idlScriptable Handles displaying content. Inherits from: nsISupports Last changed in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) Implemented by: ?????????????????????????????????????. To create an instance, use: var contentViewer = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIContentViewer); Method overview void clearHistoryEntry(); void close(in nsISHEntry historyEntry); void destroy(); [noscript,notxpcom,nostdcall] nsIViewPtr findContainerView(); void getBounds(in nsIntRectRef aBounds); Native code only! [noscript,notxpcom] nsIDocumentPtr getDocument(); void hide(); void init(i...
...Can return null. Read only. isTabModalPromptAllowed boolean ...
...tionTimingPtr aTiming); void setPageMode(in boolean aPageMode, in nsIPrintSettings aPrintSettings); void show(); void stop(); void unload(); Obsolete since Gecko 1.8 Attributes Attribute Type Description container nsISupports DOMDocument nsIDOMDocument enableRendering boolean Obsolete since Gecko 2.0 historyEntry nsISHEntry Get the history entry that this viewer will save itself into when destroyed. Can return null. Read only. isTabModalPromptAllowed boolean Read only. ...
...And 4 more matches
nsINavHistoryObserver
toolkit/components/places/nsINavHistoryService.idlScriptable This interface is similar to the nsIRDFObserver class, but is used to observe interactions on the global history. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 21.0 (Firefox 21.0 / Thunderbird 21.0 / SeaMonkey 2.18) Warning: If you are in the middle of a batch transaction, there may be a database transaction active. You can still access the database in this situation but be careful (of what?). ...
... Inherits from: nsISupports Last changed in Gecko 21.0 (Firefox 21.0 / Thunderbird 21.0 / SeaMonkey 2.18) Warning: If you are in the middle of a batch transaction, there may be a database transaction active. You can still access the database in this situation but be careful (of what?). ...
...oid onClearHistory(); void onDeleteURI(in nsIURI aURI, in ACString aGUID); void onDeleteVisits(in nsIURI aURI, in PRTime aVisitTime, in ACString aGUID); void onEndUpdateBatch(); void onPageChanged(in nsIURI aURI, in unsigned long aWhat, in AString aValue); void onPageExpired(in nsIURI aURI, in PRTime aVisitTime, in boolean aWholeEntry); Obsolete since Gecko 2.0 void onTitleChanged(in nsIURI aURI, in AString aPageTitle); void onVisit(in nsIURI aURI, in long long aVisitID, in PRTime aTime, in long long aSessionID, in long long aReferringID, in unsigned long aTransitionType, in ACString aGUID, out unsigned long aAdded); Constants Constant Value Description ATTRIBUTE_FAVICON 3 The page's favicon cha...
...And 4 more matches
Storage
ent("SELECT * FROM table_name WHERE id = :row_id"); statement.params.row_id = 1234; Use :boundParameterName the same way for numeric and non-numeric columns. Do not put the :boundParameterName within apostrophes, because that the binding mechanism does that for you. You can still use this helper object by manually creating the statement wrapper, mozIStorageStatementWrapper, which is provided in Gecko 1.9.1 and later. Using named parameters in C++ is a lot more difficult, so it's generally accepted to use numerical placeholders instead. The example below uses mozIStorageStatement.bindInt32Parameter(). The full list of binding functions can be found with the mozIStorageStatement documentation. C++ example: nsCOMPtr<mozIStorageStatement> statement; rv = mDBConn->CreateStatement(NS_LITERAL_CST...
...ddRefs(statement)); NS_ENSURE_SUCCESS(rv, rv); rv = statement->BindInt32Parameter(0, 1234); NS_ENSURE_SUCCESS(rv, rv); Note: Numerical indexes for parameters are always one less than the number you write in the SQL. The use of numerical indexes for parameters is strongly discouraged in JavaScript where named parameters are much easier to use. Binding Multiple Sets of Parameters Starting in Gecko 1.9.2 (Firefox 3.6), there's a new, more convenient way to bind multiple sets of parameters at once prior to executing your statement asynchronously. This API is only available for asynchronous execution. let stmt = dbConn.createStatement("INSERT INTO table_name (value) VALUES(:value)"); let params = stmt.newBindingParamsArray(); for (let i = 0; i < 10; i++) { let bp = params.newBindingParams(...
.... Once all the parameters are set up, a single call to mozIStorageStatement.bindParameters() will ensure that the parameters are bound before execution. You can then execute the statement asynchronously, and the statement will get each set of bindings bound to it before execution asynchronously. ...
...And 4 more matches
Attr - Web APIs
Web › API › Attr
You should revise your code accordingly. See Deprecated properties and methods for a complete list. Properties name Read only The attribute's name. namespaceURI Read only A DOMString representing the namespace URI of the attribute, or null if there is...
...l if no prefix is specified. ownerElement Read only The element holding the attribute. Note: DOM Level 4 removed this property. The assumption was that since you get an Attr object from an Element, you should already know the associated element. As that doesn't hold true in cases like Attr objects being returned by Document.evaluate, the DOM Living Standard reintroduced the property. Gecko outputs a deprecation note starting from Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4). This note was removed again in Gecko 49.0 (Firefox 49.0 / Thunderbird 49.0 / SeaMonkey 2.46). specified Read only This property always returns true. Originally, it returned true if the attribute was explicitly specified in the source code or by a script, and false if its value came from the ...
...namespaceURI, localName and prefix on the Node interface. In DOM4 they were moved to Attr. This change is implemented in Chrome since version 46.0 and Firefox since version 48.0. Deprecated properties and methods The following properties have been deprecated. Where available, the appropriate replacement is noted. attributes This property now always returns NULL. childNodes Obsolete since Gecko 14 This property now always returns an empty NodeList. firstChild Obsolete since Gecko 14 This property now always returns NULL. isId Read only Indicates whether the attribute is an "ID attribute". An "ID attribute" being an attribute which value is expected to be unique across a DOM Document. In HTML DOM, "id" is the only ID attribute, but XML documents could define others. Whether or not ...
...And 4 more matches
Performance fundamentals - Web Performance
is power usage. Like memory usage, users perceive power usage only indirectly, by how long their devices can maintain all other UPP goals. In service of meeting UPP goals, the system must use only the minimum power required. The remainder of this document will discuss performance in terms of these metrics. Platform performance optimizations This section provides a brief overview of how Firefox/Gecko contributes to performance generally, below the level of all applications. From a developer's or user's perspective, this answers the question, "What does the platform do for you?" Web technologies The Web platform provides many tools, some better suited for particular jobs than others. All application logic is written in JavaScript. To display graphics, developers can use HTML or CSS (i.e. hig...
...l buffer directly for developers to draw on. This gives developers pixel-level control over rendering and precise control of framerate, but now the developers need to deal with multiple resolutions and orientations, right-to-left languages, and so forth. Developers draw to canvases using either a familiar 2D drawing API, or WebGL, a "close to the metal" binding that mostly follows OpenGL ES 2.0. ...
... developers to draw on. This gives developers pixel-level control over rendering and precise control of framerate, but now the developers need to deal with multiple resolutions and orientations, right-to-left languages, and so forth. Developers draw to canvases using either a familiar 2D drawing API, or WebGL, a "close to the metal" binding that mostly follows OpenGL ES 2.0. ...
...And 4 more matches
Appendix D: Loading Scripts - Archive of obsolete content
Most add-ons and XUL Runner applications provide their primary functionality by loading and executing JavaScript code. Because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the Gecko runtime provides a number of means to dynamically load and execute JavaScript files. Each of these means has its own advantages and disadvantages, as well as its own quirks which may trap the unwary. ...
...ntages and disadvantages, as well as its own quirks which may trap the unwary. Below is an overview of the more common means of loading scripts, along with some of their primary advantages, disadvantages, quirks, and use cases. The examples below which make use of the Services global assume that you're previously imported the Services.jsm module. As this module only exists on Firefox 4 and other Gecko 2-based platforms, the services in question will have to be manually loaded on other platforms. <script> tags XUL script tags are traditionally the primary means of loading scripts for extension developers. These tags are generally inserted into XUL overlay files or other XUL documents, after which they are automatically loaded into the context of the XUL window in question and executed imm...
... context of the XUL window in question and executed immediately and synchronously. Advantages Familiarity: These tags are very similar to the HTML script tags familiar to most web developers. Simplicity: The simple, declarative nature of these tags make them easy to find and understand at a glance. Speed: Script tags may or may not be loaded from pre-compiled bytecode in the fastload cache (Gecko 1.x) or startup cache (Gecko 2), which means they don't necessarily need to read as source and compiled with each restart. Flexibility: Script tags provide a means to specify the character set and JavaScript version of the scripts to be loaded, which many other methods do not. Debuggable: development tools support debugging JavaScript loaded by script tags Disadvantages Scoping: Scripts lo...
...And 3 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
ssors for RDF, XML and SQL (mozStorage). The templating system also supports building custom query processors. Custom query processors are XPCOM components, must implement the nsIXULTemplateQueryProcessor interface and follow some conventions for when registering the component. 436 Index Found 1218 pages: 437 International characters in XUL JavaScript Firefox, Gecko, Guide, Internationalization, JavaScript, Mozilla, XPCOM, XUL Gecko 1.8, as used in Firefox 1.5 and other applications, added support for non-ASCII characters in JavaScript files loaded from XUL files. 438 Introduction to XUL Guide, XUL Mozilla has configurable, downloadable chrome, meaning that the arrangement and even presence or absence of controls in the main window...
... 876 uri XUL Properties, XUL Reference No summary! 877 userAction XUL Properties, XUL Reference No summary! 878 value XUL Properties, XUL Reference No summary! 879 valueNumber XUL Properties, XUL Reference No summary! 880 view XUL Properties, XUL Reference No summary! 881 visibleTabs Gecko 2.0, XUL Properties, XUL Reference No summary! 882 webBrowserFind XUL Properties, XUL Reference No summary! 883 webNavigation NeedsHelp, XUL Properties, XUL Reference No summary! 884 webProgress XUL Properties, XUL Reference No summary! 885 width XUL Properties, XUL Reference No summary! 886 wizar...
...bird and Sunbird, see the page: Custom Toolbar Button) 961 Toolbar customization events Toolbars, XUL When toolbars are customized, events are sent to their parent window. You can use window.addEventListener() to listen for these events in order to keep abreast of changes to toolbars. 962 Tree Widget Changes XUL This describes changes in XUL Trees API for Gecko 1.8. 963 Urlbar-icons XUL Reference, XUL_Element The location of UI elements like the bookmarks, feed and go buttons. Create new image or button child elements to add your own items. 964 Using Remote XUL XUL XUL (pronounced like "zool"), which is short for XML-based User Interface Language, is an XML-based language for describing application interfaces. I...
...And 3 more matches
Archived Mozilla and build documentation - Archive of obsolete content
ActiveX Control for Hosting Netscape Plug-ins in IE Microsoft has removed support for Netscape plug-ins from IE 5.5 SP 2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work! ant script to assemble an extension This ant script helps to package an extension Archived SpiderMonkey docs This section contains old SpiderMonkey documentation. Autodial for Windows NT This document is intended to explain how the autodial helper feature implemented for bug 93002 works and why it works that way. ...
...ons. For Thunderbird, you may also find the extension HowTo or FAQ pages helpful. Firefox Sync Sync refers to a family of related components and services which provide synchronization of data between Mozilla application instances. These components and services include: Force RTL (This is a temporary placeholder/stub for the Force RTL page) Gecko Coding Help Wanted Take a look through LXR, and you'll realize that Mozilla's source code is a big place. GRE Hacking wiki To be able to hack the MDC wiki software, you'll need a local webserver install, which can run MediaWiki. Help Viewer Help Viewer: Allows information to be shown to the user inside Mozilla. He...
...an change the skin to "Devmo". This is currently just a preview, but we would appreciate help with testing. Plug-n-Hack 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. Plugin Architecture This page contains some notes on how plugins work internally in Gecko. It is mainly of interest to Gecko developers. Porting NSPR to Unix Platforms Last modified 16 July 1998 Priority Content Update: I've removed documents from this list that have been migrated into the wiki. The list of completed documents is available through the DevEdge page. Prism Prism is a simple XULRunner-based browser that hosts web ...
...And 3 more matches
Mozilla accessibility architecture
ment content and UI controls, as well as important events like changes of focus. Mozilla supports two accessibility APIs: Microsoft Active Accessibility (MSAA) on Windows and Accessibility Tool Kit (ATK) on Linux and Unix. We do not currently support the Carbon accessibility model for Apple's OS X. Please note, the documentation for implementing an MSAA server has moved. You may also wish to read Gecko Info for Windows Accessibility Vendors, a primer for vendors of 3rd party accessibility software, on how MSAA clients can utilize Gecko's support. If you're interested in Linux or UNIX accessibility, check out Mozilla's ATK project page. Readers of this document should be familiar with interfaces, the W3C DOM, XUL and the concept of a layout object tree. 2. Accessible Nodes and Interfaces Every n...
... for leaf and text objects also helps speed up tree construction and traversal. 4. Accessible Events Accessible events are DOM events translated into the event mechanism of the given platform, using the enumerated event numbers listed in nsIAccessibleEventReceiver.idl. The accessibility client can find out what kind of event occurred as well as what accessible node the event occured on. ...
...t what kind of event occurred as well as what accessible node the event occured on. Table of Gecko Event to Accessible Event Translation Accessible documents listen for DOM events on nodes within them, and consequently fire the appropriate accessible event. This happens in the HandleEvent() method. Note: this chart is not complete, consult the HandleEvent() method to see the rest. ...
...And 3 more matches
Performance best practices for Firefox front-end engineers
re we paint things to be composited for the user to see. It is expected that over time, script will update the DOM, requiring us to recalculate styles, and then update layout. Normally, however, the changes to the DOM just result in the standard style calculation that occurs immediately after the JavaScript has finished running during the 16ms window. Interruptible reflow Since the early days, Gecko has had the notion of interruptible reflow. This is a special type of content-only reflow that checks at particular points whether or not it should be interrupted (usually to respond to user events). Because interruptible reflows can only be interrupted when laying out content, and not chrome UI, the rest of this section is offered only as context. When an interruptible reflow is interrupted, w...
...add("foobar"); // Line 3 var height2 = div2.clientHeight; // Line 4 doSomething(height1, height2); // Line 5 At line 1, we're setting some style information on a DOM node that's going to result in a reflow - but (at just line 1) it's okay, because that reflow will happen after the style calculation. Note line 2 though - we're asking for the height of some DOM node. This means that Gecko needs to synchronously calculate layout (and styles) using an uninterruptible reflow in order to answer the question that JavaScript is asking ("What is the clientHeight of div1?"). It's possible for our example to avoid this synchronous, uninterruptible reflow by moving lines 2 and 4 above line 1. Assuming there weren't any style changes requiring size or position recalculation above line 1, th...
...terruptible reflow? Here's a list of things that JavaScript can ask for that can cause uninterruptible reflow, to help you think about the problem. Note that some items in the list may be browser-specific or subject to change, and that an item not occurring explicitly in the list doesn't mean it doesn't cause reflow. For instance, at time of writing accessing event.rangeOffset triggers reflow in Gecko, and does not occur in the earlier link. If you're unsure whether something causes reflow, check! Note how abundant the properties in that first list are. This means that when enumerating properties on DOM objects (e.g. elements/nodes, events, windows, etc.) accessing the value of each enumerated property will almost certainly (accidentally) cause uninterruptible reflow, because a lot of DOM obj...
...And 3 more matches
Roll your own browser: An embedding how-to
re are two functions that are needed: nsresult NS_InitEmbedding(const char *aPath); nsresult NS_TermEmbedding(); Pretty self-explanatory. The aPath parameter will be passed to NS_InitXPCOM. NS_InitEmbedding() must be called from the main thread of your application, otherwise it won't work. Do you have any simple examples of embedding Mozilla? There are many examples of products already using Gecko for embedding. Here's a partial list. The sections marked 'Mozilla Examples' refer to clients and sample code to be found within the Mozilla source tree. Linux External projects SashXB: IBM uses Mozilla to implement part of their Sash development/desktop environment. Part of the GNOME effort. ActiveState's Komodo: Development environment, based on Mozilla's XUL. (Screenshot) Light: Very si...
...rface, familiar Netscape 4.x keyboard shortcuts, context menus, etc. (Screenshot) XParts: KDE extension that allows Mozilla to be embedded into the Konqueror browser. Uses GtkMozEmbed widget, part of the kdebindings module and available from http://websvn.kde.org/trunk/KDE/kdebindings/xparts/. (News release, screenshot) Mozilla Examples GtkMozEmbed widget: Gtk widget wrapper for the Mozilla Gecko Engine. TestGtkEmbed: Basic browser built with the GtkMozEmbed widget. URL location field, menu bar, html area, supports SSL. Windows External projects K-Meleon browser: the Windows answer to Galeon. Fast IE-look-alike browser, uses IE and NS bookmarking system, fast loading time, privacy features, Java support and complete control of the menus and "hotkeys". Implemented with Mozilla embed...
...h the GtkMozEmbed widget. URL location field, menu bar, html area, supports SSL. Windows External projects K-Meleon browser: the Windows answer to Galeon. Fast IE-look-alike browser, uses IE and NS bookmarking system, fast loading time, privacy features, Java support and complete control of the menus and "hotkeys". Implemented with Mozilla embedding APIs. ...
...And 3 more matches
Bundling multiple binary components
Background 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 change between Gecko versions. ...
.... 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). Possible Solutions This article covers two possible ways to make binary components support multiple version of Gecko: Dynamic method loading Stub loader Dynamic method loading The idea with this approach is to figure out all the methods imported from Gecko and dynamically load the methods. Create small wrappers for calling the methods, as you may ...
...This means using something like LoadLibrary / GetProcAddress / FreeLibrary on Windows. Actually, NSPR has portable versions of those features that work across platforms. ...
...And 3 more matches
Creating XPCOM components
Accordingly, the book is arranged so that you can follow along and create your own components or learn about different XPCOM topics individually, as in a reference work. ...
...Accordingly, the book is arranged so that you can follow along and create your own components or learn about different XPCOM topics individually, as in a reference work. ...
...omponents. Add-ons should try to use the new Add-on SDK as much as possible; however, there may be cases when it's unavoidable. Note:This article describes a method that uses xpidl but you should use webidl instead. ...
...And 3 more matches
How to build a binary XPCOM component using Visual Studio
ross platform component object model, similar to Microsoft's COM technology. XPCOM components can be implemented in C, C++, and JavaScript, and can be used from C, C++, and JavaScript. That means you can call JavaScript methods from C++ and vice versa. For more information on the workings of XPCOM look elsewhere. Development Setup The simplest way to get an XPCOM component built is to use the Gecko SDK. On Windows, the SDK is built using a Microsoft compiler, so you need to use one too. This tutorial uses Microsoft's free Visual C++ Express and the sample project in the next paragraph. You could try to use a different vendor's compiler, but you are going to need to build the SDK from source code. Not the simplest thing to do and it may be incompatible with production releases of Firefox, Th...
...orial uses Microsoft's free Visual C++ Express and the sample project in the next paragraph. You could try to use a different vendor's compiler, but you are going to need to build the SDK from source code. Not the simplest thing to do and it may be incompatible with production releases of Firefox, Thunderbird, and XULRunner from Mozilla. For example, XULRunner 1.8.0.4 which has a pre-built SDK at gecko-sdk-win32-msvc-1.8.0.4.zip. Extract the SDK to a folder. The tutorial assumes the folder is called xulrunner-1.8.0.4, but you can call yours whatever you want. You also need a couple of pre-built libraries (glib-1.2.dll & libIDL-0.6.dll) from the wintools.zip archive. Copy glib-1.2.dll & libIDL-0.6.dll into the bin subfolder of gecko-sdk. Note: wintools.zip seems old and lots of newer MDC docume...
... is called xulrunner-1.8.0.4, but you can call yours whatever you want. You also need a couple of pre-built libraries (glib-1.2.dll & libIDL-0.6.dll) from the wintools.zip archive. Copy glib-1.2.dll & libIDL-0.6.dll into the bin subfolder of gecko-sdk. Note: wintools.zip seems old and lots of newer MDC documentation refers to moztools.zip archive, but the version of xpidl.exe that comes with the gecko-sdk crashes with the DLL's from moztools. Recap: Use the right Gecko SDK for your XULRunner release Use a Microsoft compiler Use pre-built glib-1.2.dll & libIDL-0.6.dll libraries from wintools.zip Download the sample project Here is what the folder structure looks like: Create a VC++ Project Visual Studio project and file templates (or wizards) for creating XPCOM modules and components ...
...And 3 more matches
nsIAccessibleDocument
accessible/public/nsIAccessibleDocument.idlScriptable An interface for in-process accessibility clients that wish to retrieve information about a document. When accessibility is turned on in Gecko, there is an nsIAccessibleDocument for each document whether it is XUL, HTML or whatever. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) You can QueryInterface to nsIAccessibleDocument from the nsIAccessible or nsIAccessNode for the root node of a document. ...
... / Thunderbird 3.3 / SeaMonkey 2.1) You can QueryInterface to nsIAccessibleDocument from the nsIAccessible or nsIAccessNode for the root node of a document. ...
...or nsIAccessNode for the root node of a document. You can also get one from nsIAccessNode.GetAccessibleDocument() or nsIAccessibleEvent.GetAccessibleDocument() Method overview nsIAccessible getAccessibleInParentChain(in nsIDOMNode aDOMNode, in boolean aCanCreate); Obsolete since Gecko 2.0 nsIAccessNode getCachedAccessNode(in voidPtr aUniqueID); Native code only! Obsolete since Gecko 2.0 AString getNameSpaceURIForID(in short nameSpaceID); Attributes Attribute Type Description caretAccessible nsIAccessible Read only. Obsolete since Gecko 1.9 docType AString The doc type of the document, as specified in the document. Read only. DOMDocument nsIDOMDocument The nsIDOMDocument interface associated with thi...
...And 3 more matches
nsICompositionStringSynthesizer
You need to use nsITextInputProcessor instead of this. ...
...You need to use nsITextInputProcessor instead of this. ...
...You need to use nsITextInputProcessor instead of this. ...
...And 3 more matches
nsIConsoleService
xpcom/base/nsIConsoleService.idlScriptable The console service is the back-end for the Error Console, bundled with every Mozilla application, and for Firefox's Web Console and Browser Console. It is used to log various messages, warnings, and errors and to obtain the logged messages. ...
...9 (Firefox 19 / Thunderbird 19 / SeaMonkey 2.16) Implemented by: @mozilla.org/consoleservice;1 as a service: var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); Method overview void getMessageArray([array, size_is(count)] out nsIConsoleMessage messages, out uint32_t count);Obsolete since Gecko 19 void getMessageArray([optional] out uint32_t count, [retval, array, size_is(count)] out nsIConsoleMessage messages); void logMessage(in nsIConsoleMessage message); void logStringMessage(in wstring message); void registerListener(in nsIConsoleListener listener); void reset(); void unregisterListener(in nsIConsoleListener listener); Method...
...(count)] out nsIConsoleMessage messages); void logMessage(in nsIConsoleMessage message); void logStringMessage(in wstring message); void registerListener(in nsIConsoleListener listener); void reset(); void unregisterListener(in nsIConsoleListener listener); Methods getMessageArray() To obtain an array of all logged messages. Obsolete since Gecko 19 (Firefox 19 / Thunderbird 19 / SeaMonkey 2.16)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. void getMessageArray( [array, size_is(count)] out nsIConsoleMessage messages, out PRUint32 count ); Parameters messages An array of logged messages. count The number of messages in ...
...And 3 more matches
nsIContentPrefService
Use the asynchronous interface nsIContentPrefService2 instead. Provides a way for extensions and browser code to save preferences for specific websites. Preferences are saved as key/value pairs on a per-website basis. dom/interfaces/base/nsIContentPrefService.idlScriptable Please add a summary to this article. Last changed in Gecko 2 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Inherits from: nsISupports Implemented by: @mozilla.org/content-pref/service;1. To create an instance, use: var contentPrefService = Components.classes["@mozilla.org/content-pref/service;1"] .getService(Components.interfaces.nsIContentPrefService); Method overview void addObserver(in AString aName, in nsIContentPrefObserver aObserver); nsIVariant getPref(in nsIVaria...
...er ); Parameters aName The name of the preference to observe. You may specify null to add a generic observer that is notified of all preference changes. aObserver The name of an object implementing nsIContentPrefObserver that will receive notifications of changes to the preference's value. getPref() Returns the value of a preference saved for a particular site. Note: Prior to Gecko 2.0, the site could only be specified by nsIURI. Now a string can be used as well. nsIVariant getPref( in nsIVariant aGroup, in AString aName, in nsIContentPrefCallback aCallback Optional ); Parameters aGroup The group for which to retrieve a preference; this may be specified as either a URI or as a string; in either case, the group consists of all sites matching the hostname por...
...sult may be null (nsIDataType:VTYPE_EMPTY) if the preference's value is either null, or undefined (nsIDataType:VTYPE_VOID) if there is no saved preference by the specified name. Exceptions thrown NS_ERROR_ILLEGAL_VALUE If aGroup is not a string, nsIURI, or null. Or if aName is null or an empty string getPrefs() Get all preferences and their values for the specified URI. Note: Prior to Gecko 2.0, the site could only be specified by nsIURI. Now a string can be used as well. nsIPropertyBag2 getPrefs( in nsIVariant aGroup ); Parameters aGroup The group whose preferences are to be retrieved; this may be specified as either a URI or as a string; in either case, the group consists of all sites matching the hostname portion of the specified URI. Specify null to get the preferen...
...And 3 more matches
nsIDOMWindow
dom/interfaces/base/nsIDOMWindow.idlScriptable This interface is the primary interface for a window object. It represents a single window object that may contain child windows if the document in the window contains an HTML frameset document, or if the document contains iframe elements. 66 Introduced Gecko 1.0 Deprecated Gecko 44 Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Starting with Firefox 44, this file is empty as its features were either no longer used or are only available from C++ code; see dom/base/nsPIDOMWindow.h for those. While this interface is not officially defined by any standard bodies, it originates from the de-facto DOM Level 0 standard. Starting in Firefox 3, DOM windows...
...features were either no longer used or are only available from C++ code; see dom/base/nsPIDOMWindow.h for those. While this interface is not officially defined by any standard bodies, it originates from the de-facto DOM Level 0 standard. Starting in Firefox 3, DOM windows are actually based on nsIDOMWindow2, which is a subclass of nsIDOMWindow that adds some new features to this interface. In Gecko 7.0 nsIDOMWindow2 has been merged into this interface. In Gecko 8.0 nsIDOMStorageWindow and nsIDOMWindowInternal have been merged into this interface. Method overview nsIDOMCSSStyleDeclaration getComputedStyle(in nsIDOMElement elt, [optional] in DOMString pseudoElt); nsISelection getSelection(); void scrollBy(in long xScrollDif, in long yScrollDif); void sc...
... in long yScrollDif); void scrollByLines(in long numLines); void scrollByPages(in long numPages); void scrollTo(in long xScroll, in long yScroll); void sizeToContent(); Attributes Attribute Type Description applicationCache nsIDOMOfflineResourceList Get the application cache object for this window. Read only. ...
...And 3 more matches
nsIMemoryReporter
Once that has been done, the reporter will be found by any client accessing the enumerator returned by nsIMemoryReporterManager.enumerateReporters(). ...
...Once that has been done, the reporter will be found by any client accessing the enumerator returned by nsIMemoryReporterManager.enumerateReporters(). ...
...s(). This includes the about:memory page. Note: This interface is undergoing heavy development, and is subject to rapid changes. Attributes Attribute Type Description amount PRInt64 The numeric value reported by the memory reporter, specified in the units indicated by the units attribute. Read only. Note: This attribute was called memoryUsed prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), and its type was long long. description AUTF8String A human-readable description of this memory usage report. Read only. kind PRInt32 The memory kind, one of the Memory reporter kind constants below. Read only. path AUTF8String The path that this memory usage should be reported under. Paths are ...
...And 3 more matches
nsIWindowsShellService
browser/components/shell/public/nsIWindowsShellService.idlScriptable Please add a summary to this article. ...
... browser/components/shell/public/nsIWindowsShellService.idlScriptable Please add a summary to this article. ...
...ell/public/nsIWindowsShellService.idlScriptable Please add a summary to this article. ...
...And 3 more matches
nsIXULAppInfo
Implemented by: @mozilla.org/xre/app-info;1. ...
...Implemented by: @mozilla.org/xre/app-info;1. ...
...Implemented by: @mozilla.org/xre/app-info;1. ...
...And 3 more matches
XPCOM
ented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL. XPCOM itself provides a set of core components and classes, e.g. file and memory management, threads, basic data structures (strings, arrays, variants), etc. The majority of XPCOM components are not part of this core set and are provided by other parts of the platform (e.g. Gecko or Necko) or by an application or even by an extension. Accessing the Windows Registry Using XPCOMWhen implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available i...
...ot 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 change between Gecko versions. This can create a difficult ...
.... 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).Creating a Python XPCOM componentCreating Applications 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.Fun With XBL and XPConnectGenerating GUIDsGUIDs are used in Mozilla programming for identifying several types of...
...And 3 more matches
Thunderbird Binaries
so that they don't delay the release and will be picked up in future branches. Distinguishing between different nightly builds The main way you can determine if you are using a trunk or branch build is to click the "Help" menu and choose "About". ...
...y builds The main way you can determine if you are using a trunk or branch build is to click the "Help" menu and choose "About". ...
...h build is to click the "Help" menu and choose "About". You should see a string that looks something like this: comm-central-1.9.2 branch: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2pre) Gecko/20100308 Lanikai/3.1b1pre comm-central-trunk: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20090826 Shredder/3.1a1pre The part that you want to note is the Gecko revision number (rv) and the Thunderbird version string. These correspond to which build you are using. It works something like this: rv:1.7.x and Thunderbird 1.0.x = Gecko 1.7 (Thunderbird 1.0) Branch. rv:1.8.0.x and Thunderbird 1.5.0.x = Gecko 1.8.0 (Thunderbird 1.5) Branch. rv:1.8.1.x and Thunderbird 2.0.0.x = Gecko 1.8.1 (Thunderbird 2) Branch. rv:1.9.1.x and Thunderbird (or Shredder) 3...
...And 3 more matches
Plug-in Development Overview - Plugins
lug-ins". Install the plug-in in the plug-in directory for your operating system. See Installing Plug-ins. Test your plug-in and debug as necessary. Create an HTML page and embed the plug-in object. For information about the HTML elements to use, see Using HTML to Display Plug-ins. To see your plug-in in action, simply display the HTML page that calls it in the browser. Registering Plug-ins Gecko identifies a plug-in by the MIME type it supports. When it needs to display data of a particular MIME type, the browser finds and invokes the plug-in object that supports that type. The data can come from either an object element in an HTML file (where the object or embed element either specifies the MIME type directly or references a file of that type), from a separate non-HTML file of that MIME...
...: "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 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...
...the "|" character, for example: video/quicktime|audio/aiff|image/jpeg The version stamp will be loaded only if it has been created with the language set to "US English" and the character set to "Windows Multilingual" in your development environment. The resource code for this language and character set combination is 040904E4. Unix On Unix, 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 loads each library and calls into the NP_GetMIMEDescription entry point. This exported C function should return a string containing the type, extension list, and type description separated by colons. Each MIME types should be separated by semicolons. For example: image/xbm:xbm:X Bitmap or for 2 ...
...And 3 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
on still accepted] -moz-animation-iteration-count [Prefixed version still accepted] -moz-animation-name [Prefixed version still accepted] -moz-animation-play-state [Prefixed version still accepted] -moz-animation-timing-function [Prefixed version still accepted] -moz-appearance B -moz-backface-visibility [Prefixed version still accepted] -moz-background-clipObsolete since Gecko 2 -moz-background-originObsolete since Gecko 2 -moz-background-inline-policyObsolete since Gecko 32 [Superseded by the standard version box-decoration-break] -moz-background-sizeObsolete since Gecko 2 -moz-border-end [Superseded by the standard version border-inline-end] -moz-border-end-color [Superseded by the standard version border-inline-end-color] -moz-border-end-style [Supersede...
...oz-font-feature-settings [Prefixed version still accepted] -moz-font-language-override [Prefixed version still accepted] -moz-hyphens [Prefixed version still accepted] -moz-margin-end [Superseded by the standard version margin-inline-end] -moz-margin-start [Superseded by the standard version margin-inline-start] mask [Applying to more than SVG] O -moz-opacityObsolete since Gecko 1.9.1 -moz-outlineObsolete since Gecko 1.9.2 -moz-outline-colorObsolete since Gecko 1.9.2 -moz-outline-offsetObsolete since Gecko 1.9.2 -moz-outline-styleObsolete since Gecko 1.9.2 -moz-outline-widthObsolete since Gecko 1.9.2 P -moz-padding-end [Superseded by the standard version padding-inline-start] -moz-padding-start [Superseded by the standard version padding-inline-end] -mo...
...Gecko 1.9.2 P -moz-padding-end [Superseded by the standard version padding-inline-start] -moz-padding-start [Superseded by the standard version padding-inline-end] -moz-perspective [Prefixed version still accepted] -moz-perspective-origin [Prefixed version still accepted] pointer-events [Applying to more than SVG] T-U -moz-tab-size -moz-text-align-lastObsolete since Gecko 53 -moz-text-decoration-colorObsolete since Gecko 39 -moz-text-decoration-lineObsolete since Gecko 39 -moz-text-decoration-styleObsolete since Gecko 39 -moz-text-size-adjust -moz-transform [Prefixed version still accepted] -moz-transform-origin [Prefixed version still accepted] -moz-transform-style [Prefixed version still accepted] -moz-transition [Prefixed version still accepte...
...And 3 more matches
User-Agent - HTTP
mon 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 into 4 components: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion Mozilla/5.0 is the general token that says the browser is Mozilla-compatible. For historical reasons, almost every browser today sends it. platform describes the native platform the br...
...owser is Mozilla-compatible. For historical reasons, almost every browser today sends it. platform describes the native platform the browser is running on (Windows, Mac, Linux, Android, etc.), and if it's a mobile phone. Firefox OS phones simply say Mobile -- the web is the platform. Note that platform can consist of multiple "; "-separated tokens. See below for further details and examples. rv:geckoversion indicates the release version of Gecko (such as "17.0"). In recent browsers, geckoversion is the same as firefoxversion. Gecko/geckotrail indicates that the browser is based on Gecko. (On Desktop, geckotrail is always the fixed string 20100101.) Firefox/firefoxversion indicates the browser is Firefox, and provides the version (such as "17.0"). Examples Mozilla/5.0 (Windows NT 6.1; Win...
...the release version of Gecko (such as "17.0"). In recent browsers, geckoversion is the same as firefoxversion. Gecko/geckotrail indicates that the browser is based on Gecko. (On Desktop, geckotrail is always the fixed string 20100101.) Firefox/firefoxversion indicates the browser is Firefox, and provides the version (such as "17.0"). Examples Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0 Chrome UA string The Chrome (or Chromium/Blink-based engines) user agent string is similar to Firefox's. For compatibility, it adds strings like KHTML, like Gecko and Safari. ...
...And 3 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
ion. If the application has a targetApplication entry but it is for an incompatible version then the application will retrieve updated compatibility information from the add-on's updateURL. If the install.rdf contains any targetPlatform entries then the platform of the currently running application must be listed or the installation will be rejected. Firefox 3 note In applications based on Gecko 1.9 you can also use a targetApplication entry with an id toolkit@mozilla.org and minVersion and maxVersion that match the toolkit version of the running application. This allows you to say that your 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 installin...
...duce the effect you want. Valid Application Versions Automatic Add-on Update Checking Applications will periodically check for updates to installed add-ons by retrieving the updateURL. The information returned can be used to notify the user of an updated version to the add-on as well as inform the application of new application versions that the add-on is compatible with. Note: Starting in Gecko 2.0, the automatic add-on update process properly supports cases in which the add-on's GUID changes by uninstalling the old version and then installing the new one. Previously, it was possible to wind up with two copies of the same add-on installed. Compatibility Updates During the automatic update checks, applications look for both new versions and updated compatibility information about the ...
...ith a hash to verify the file retrieved. It is important to get the initial RDF:Description's about attribute correct. It varies depending on what type of add-on you are providing information for: For an extension or plugin bundle it must be urn:mozilla:extension:<id> For a theme it must be urn:mozilla:theme:<id> For any other type of add-on it must be urn:mozilla:item:<id> Note: Prior to Gecko 2.0 (Firefox 4.0), the ordering of the versions within the <RDF:Seq> is significant. For later versions, the compatible add-on version with the greatest version string will be used by the client for automatic updates. The behavior depends on the version of the client application, of course. <?xml version="1.0" encoding="UTF-8"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"...
...And 2 more matches
Introduction - Archive of obsolete content
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 this project, called XUL School, covers several other technologies such as JavaScript, CSS, XBL and XPCOM. XULRunner XULRunner includes the Gecko rendering engine, the Necko networking library, and several other components that provide OS-independent file management, accessibility, and localization, among others. It is this very powerful platform that has allowed such a fast growth of the development community surrounding Mozilla and Firefox. XULRunner is available in binary form at the XULRunner page, and it is the base for several proje...
...lity, and localization, among others. It is this very powerful platform that has allowed such a fast growth of the development community surrounding Mozilla and Firefox. XULRunner is available in binary form at the XULRunner page, and it is the base for several projects, such as Songbird, Miro and Eudora. There's a very comprehensive list of XULRunner applications in the XULRunner Hall of Fame. ...
...ocalization, among others. It is this very powerful platform that has allowed such a fast growth of the development community surrounding Mozilla and Firefox. XULRunner is available in binary form at the XULRunner page, and it is the base for several projects, such as Songbird, Miro and Eudora. There's a very comprehensive list of XULRunner applications in the XULRunner Hall of Fame. Gecko The Gecko engine is the part of Firefox used to render web pages and its own user interface. You can identify the level of compatibility of web standards in Gecko-based browsers looking at their User Agent string, which should include the Gecko version. Gecko versions are somewhat independent from Firefox versions, and you can see a mapping of Firefox versions and Gecko versions at the Gecko page. The User...
...And 2 more matches
Priority Content - Archive of obsolete content
o add it. Note: Use example at Sample:Original Document Information to credit original authors. DevEdge DevEdge Mirror Note: If you're digging around the mirror and see anything there that you think should be migrated to Devmo that isn't on this list, feel free to add it below. A raw list of everything that has not been migrated at all appears there. ...
...ment Information to credit original authors. DevEdge DevEdge Mirror Note: If you're digging around the mirror and see anything there that you think should be migrated to Devmo that isn't on this list, feel free to add it below. A raw list of everything that has not been migrated at all appears there. ...
...DevEdge DevEdge Mirror Note: If you're digging around the mirror and see anything there that you think should be migrated to Devmo that isn't on this list, feel free to add it below. A raw list of everything that has not been migrated at all appears there. Book Length Works In progress: Netscape Gecko Plugin API Reference 1.0 Original: Netscape Gecko Plugin API Reference 1.0 Wiki Location: Gecko Plugin API Reference Migrators: Started: Core JavaScript Reference 1.5 Original: Core JavaScript Reference 1.5 Wiki Location: Core JavaScript 1.5 Reference Migrators: Deb Richardson In progress: Transforming XML: Netscape and XSLT 1.0 Original: Transforming XML: Netscape and XSLT 1.0 Wiki Location: Transforming XML with XSLT Migrators: Serge K. Keller In progress: Rapid Applicatio...
...And 2 more matches
XML - Archive of obsolete content
"skinning", DOM for the object model and scriptable access, JavaScript for the linking and behavior, RDF for resources, XML for the structure, and HTML for the content and some little extras. In this way, it's more like a developmentplatform or framework than a user interface language, particularly when it's used with related cross-platform technologies like XPCOM, which also went into Mozilla. Gecko Reads XUL and Makes Interfaces Just as our specially created memo is nothing but text unless there is an application for making use of the structure in some way, so too our XUL widgets are just marked-up text unless there is software to interpret the structures and render the XUL as actual widgets. All XML requires a parser or an engine of some kind at the receiving end to make it run. This is,...
...akes Interfaces Just as our specially created memo is nothing but text unless there is an application for making use of the structure in some way, so too our XUL widgets are just marked-up text unless there is software to interpret the structures and render the XUL as actual widgets. All XML requires a parser or an engine of some kind at the receiving end to make it run. ...
...faces Just as our specially created memo is nothing but text unless there is an application for making use of the structure in some way, so too our XUL widgets are just marked-up text unless there is software to interpret the structures and render the XUL as actual widgets. All XML requires a parser or an engine of some kind at the receiving end to make it run. This is, in short, what Gecko is. ...
...And 2 more matches
Overview of Mozilla embedding APIs
ing access to all of the public Mozilla interfaces. The Service Manager exposes all of the available XPCOM services - each service represents a global object which provides some piece of functionality. The Component Manager allows new instances of registered XPCOM components to be instantiated. The embedding layer consists of several components built on top of XPCOM and its services. Much of the Gecko functionality is exposed through a component called the nsWebBrowser. Embedding applications can leverage this component to easily access many of Gecko's features. Each WebBrowser instance represents the "client-area" of a typical browser window. The WebBrowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within this client area. Usi...
...rlying data. See the String Guide for more details. nsWeakPtr This is an nsCOMPtr which encapsulates XPCOM weak reference support. See the nsIWeakReference document for more information. Public Return Codes NS_SUCCEEDED NS_ERROR_FAILURE NS_ERROR_NOT_IMPLEMENTED Public Functions The following functions are available from the XPCOM DLL. NS_InitEmbedding This function initializes the Gecko embedding support. This must be the first function call made into Gecko. NS_TermEmbedding This function shuts down Gecko and cleans up any remaining resources... Currently, once Gecko has been shutdown, it cannot be restarted in the same process space... This should change in the future. nsMemory nsMemory::Alloc nsMemory::Realloc nsMemory::Free This helper c...
...ervice Contract-id: Implemented Interfaces: Document Loader Service (WebProgress) Eventually, this service will be replaced by theWebProgress service... Contract-id: NS_DOCUMENT_LOADER_SERVICE_CONTRACTID Implemented Interfaces: nsIWebProgress nsIDocumentLoader Related Interfaces: nsIWebProgressListener Public Components nsWebBrowser The nsWebBrowser is the main embedding component which Gecko exposes. Conceptually, each nsWebBrowser instance represents a HTML content area. Conceptually, for each document being rendered, Gecko creates a container called a DOMWindow. Each WebBrowser exposes a tree of DOMWindows - representing the frame hierarchy for the current document. As such, access to individual document frames is done via the DOMWindow interfaces. Manipulation of the entire docume...
...And 2 more matches
OS.File for the main thread
ll native name of the file to open. modeOptional The opening mode for the file, as an object that may contain a subset of the following fields: read If true, the file will be opened for reading. Depending on other fields, it may also be opened for writing. write If true, the file will be opened for writing. Depending on other fields, it may also be opened for reading. Prior to Gecko 27, unless create or truncate are set or explicit unixFlags are given, the file will be opened for appending on Unix/Linux. However, the file is not opened for appending on Windows. See bug 924858. Starting with Gecko 27, you may use the append flag instead. For an example using append see here. truncate | trunc If true, the file will be opened for writing. If the file does not exist, i...
...es to An instance of OS.File representing the expected file. Note that the operating system limits the number of files that can be opened simultaneously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process. ...
...S.File representing the expected file. Note that the operating system limits the number of files that can be opened simultaneously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process. When opening files for writing, they will be opened for appending unless you specify append: false in Gecko 27 and later. ...
...And 2 more matches
Fonts for Mozilla 2.0's MathML engine
For the latest version see, this page. Quick Instructions Try this test page to quickly determine whether you need to install additional fonts and to follow the instructions below. You may also want to check out the Mozilla MathML torture test to test your installation against concrete examples. On Windows: Use this MathML fonts installer. On Mac OS X Lion (10.7) and higher versions, STIX fonts are already installed and can be used for MathML. ...
...) and higher versions, STIX fonts are already installed and can be used for MathML. On most Linux distributions and similar open source platforms, you can install math fonts (STIX, Asana or MathJax fonts) from your package manager or get them from this zip archive. On Android, Firefox OS and other platforms where the instructions above do not work: install the MathML-fonts add-on. This requires Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) or higher. Overview Mathematical formulas make use of various symbols represented by specific Unicode characters. Mozilla can display any of these symbols provided suitable Unicode fonts are installed. Furthermore, in accordance with the W3C CSS2 recommendation on fonts, authors can specify an ordered list of particular fonts which they pre...
...re not available on the system then Mozilla tries to stretch symbols using scale transforms, but that may result in a less pleasant rendering. To see MathML as intended, you need sufficient font support, which may mean installing some fonts. Note that some Web sites may provide the required mathematical fonts as Web fonts. In that case, you will see the correct rendering on these pages if you use Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) or greater. Recommended Fonts The STIX Fonts Project has been developing a comprehensive set of fonts that cover all the symbols in MathML and also contains glyphs to stretch mathematical operators. They are available under the SIL Open Font License and should be installed for best MathML rendering. Note that currently, only the fonts in /Fo...
...And 2 more matches
Mozilla Web Developer FAQ
This document answers questions that Web authors ask frequently specifically in connection with Firefox and other Gecko-based browsers. There are links to more general Web authoring FAQs at the end of this document. What are the Quirks mode and the Standards mode? Gecko has two and a half layout modes: Quirks, Almost Standards and Standards. In the Standards mode Gecko aims to treat documents authored in compliance with the applicable Web format specifications. In the Quirks mode--for the purpose of backwards compatibility--Gecko mimics some behaviors of legacy browsers in ways that are spec violations. The Almost Standards mode is like the Standards mode except it addresses the issue of the next question by rendering table cells with images in the traditional way. The mode is picked ...
...t into reverse-engineering and cloning legacy browsers, it makes more sense to focus on implementing standards. Standards (when implemented by others as well) promote interoperability better than cloning legacy software bug by bug. Also, HTML was designed to adapt to different presentation media, so different presentations of the same document are to be expected. According to the Accept header, Gecko accepts both application/xhtml+xml and text/html. Should I serve application/xhtml+xml to Gecko? application/xhtml+xml was added to the Accept header in order to enable the serving of MathML to both Mozilla and IE with Apache without scripting back when the MathPlayer plug-in for IE did not handle application/xhtml+xml. If your document mixes MathML or SVG with XHTML, you should use application...
...d). However, if you are using the usual HTML features (no MathML or SVG) and are serving your content as text/html to other browsers, there is no need to serve application/xhtml+xml to Mozilla. Serving valid HTML as text/html ensures the widest browser and search engine support. There is a fad of serving text/html to IE but serving the same markup with no added value as application/xhtml+xml to Gecko. This is usually done without a mechanism that would ensure the well-formedness of the served documents. Mechanisms that ensure well-formed output include serializing from a document tree object model (eg. DOM) and XSLT transformations that do not disable output escaping. When XHTML output has been retrofitted to a content management system that was not designed for XML from the ground up, the sy...
...And 2 more matches
Web Replay
nd its outputs are recorded in a data stream for the thread performing the call. During execution of the wrapped call/message, recording of any inner calls is suppressed, so that they are performed normally without affecting the recording. The functions which are intercepted are generally at the system call and the system library level. In general, any function which is not compiled as part of Gecko is fair game. Acquisition order of locks is recorded in a data stream for each lock. Some locks which are associated with non-deterministic components are not recorded, such as the JS GC and helper threads locks. Accesses on atomic variables/fields are recorded in a global data stream, as if they were all protected by a global lock. Some atomics are related to non-deterministic components and...
...nt and dirty memory parts of the rewind infrastructure to work, and in handling the different graphics and IPC pathways on different platforms. Comparison with other projects There is lots of existing work in this area. The closest projects are rr, WebKit's replay project, and Microsoft's Time-Travel Debugger. Compared to rr: This should work on all platforms and architectures supported by Gecko, though with substantial port work required. This will be part of Gecko itself, rather than a separate tool, which means both that developers won't need additional software to use it and that this can't be used to debug other software. This can use multiple cores during recording and replay. This does not preserve exact behavior. Context switches can occur at different times and data races can...
...pectrum. Compared to a higher level project, this is able to operate on stable, thoroughly documented library APIs. By focusing on intercepting these APIs, browser instrumentation, recording overhead, and the maintenance burden going forward are all minimized. Compared to a lower level project, this is able to tolerate more non-determinism. All code whose behavior is recorded is compiled into Gecko (rather than being part of immutable, usually closed-source libraries) and can be lightly modified to deal with behaviors that function intercepting cannot handle, such as varying hash table layouts and the ordering of atomic accesses. Appendix: Debugger details Here is some more detailed information about how a recording/replaying process affects the debugger, and options for future improve...
...And 2 more matches
Building the WebLock UI
<< PreviousNext >> Up until now, we've been building a component that can be installed in any Gecko application. The XPCOM interfaces and tools you've used have been general, cross-platform, and available in the Gecko Runtime Environment or in any Gecko-based application after Mozilla 1.2 (when the GRE began to be used). In this chapter, however, we are going to be building a user interface for the WebLock component that's meant to be added to the existing Mozilla browser[other-mozlike-browsers]. It uses XUL, which is an XML language that Gecko knows how to render as user interface, but it also interacts with particular parts of the Mozilla user interface, where it must install itself as an extension to the UI. Specifically, the user interface we create in this chapter will be ...
...hird section, Overlaying New User Interface Into Mozilla, describes how to create an overlay into the browser that will make this dialog accessible from a Mozilla build. The overlay section, where we discuss how to import scripts, images, and other resources from Mozilla into your own UI, is by far the more complicated of the two. If the WebLock component is being installed in Mozilla or another Gecko-based browser, then this third section shows you how to create the entry point in the browser for controlling the web locking. If you are planning on deploying the WebLock component in some other application, you'll have to devise a different means of access (e.g., native widgetry that instantiates and controls the WebLock component). Client Code Overview Before we get started on the actual use...
...L to the XUL file in which the dialog is defined: function loadWebLock() { window.openDialog("chrome://weblock/weblock.xul"); } XUL The entire user interface of the Mozilla browser and all of the applications that go with it, including the mail client, the IRC client, and others, have been defined in an XML language called XUL. Elements in the XUL markup map to widgets in the interface that Gecko renders in a fairly straightforward way - so, for instance, the root element of an application window is the element <window/>, the root element of the dialog we'll be creating here is <dialog/>, and so forth. Within a XUL application file, elements like <button/>, <menu/>, and <checkbox/> can be hooked up to an event model, to scripts, and to the XPCOM interfaces that carry out a lot of the brow...
...And 2 more matches
Resources
<< Previous This last section of the book provides a list of resources referred to in the tutorial and other links that may be useful to the Gecko developer. ...
... << Previous This last section of the book provides a list of resources referred to in the tutorial and other links that may be useful to the Gecko developer. ...
... This last section of the book provides a list of resources referred to in the tutorial and other links that may be useful to the Gecko developer. ...
...And 2 more matches
mozIVisitInfoCallback
void handleError( in nsresult aResultCode, in mozIPlaceInfo aPlaceInfo ); Parameters aResultCode nsresult indicating the reason wh...
...void handleError( in nsresult aResultCode, in mozIPlaceInfo aPlaceInfo ); Parameters aResultCode nsresult indicating the reason wh...
...void handleError( in nsresult aResultCode, in mozIPlaceInfo aPlaceInfo ); Parameters aResultCode nsresult indicating the reason why the change failed. aPlaceInfo The information that was unable to be processed. ...
...And 2 more matches
nsIAlertsService
toolkit/components/alerts/nsIAlertsService.idlScriptable This interface can be used to notify the user of something that does not require an immediate reaction. For example, it can be used to notify the user that their downloads are complete or that they have new mail. ...
... toolkit/components/alerts/nsIAlertsService.idlScriptable This interface can be used to notify the user of something that does not require an immediate reaction. For example, it can be used to notify the user that their downloads are complete or that they have new mail. ...
...ko 1.7 Inherits from: nsISupports Last changed in Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19) By default a message is displayed in a small window that slides up from the bottom of the screen, holds there for a few seconds, then slides down. The specific appearance varies from platform to platform. Note: Prior Firefox 22, the alerts service was only supported on Windows in Gecko 1.7, had no effect on Mac OS X in Gecko 1.8, but was fully supported in Mac OS X in Gecko 1.9. Note: Since Gecko 22, the notifications are provided by Firefox and have become platform-independent. Implemented by: @mozilla.org/alerts-service;1 as a service: var alertsService = Components.classes["@mozilla.org/alerts-service;1"] .getService(Components.interfaces.nsIAlertsSer...
...And 2 more matches
nsIDOMGeoPositionAddress
dom/interfaces/geolocation/nsIDOMGeoPositionAddress.idlScriptable This interface describes the geographical address of a location, including street, city, and country information, for example. This information may or may not be available, depending on the geolocation service being used. ...
... dom/interfaces/geolocation/nsIDOMGeoPositionAddress.idlScriptable This interface describes the geographical address of a location, including street, city, and country information, for example. This information may or may not be available, depending on the geolocation service being used. ...
...ion/nsIDOMGeoPositionAddress.idlScriptable This interface describes the geographical address of a location, including street, city, and country information, for example. This information may or may not be available, depending on the geolocation service being used. ...
...And 2 more matches
nsIDOMWindowInternal
This interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely. Add-ons should be updated to use nsIDOMWindow instead. ...
... This interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely. Add-ons should be updated to use nsIDOMWindow instead. ...
... This interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely. Add-ons should be updated to use nsIDOMWindow instead. ...
...And 2 more matches
nsIDownloadProgressListener
/toolkit/components/downloads/nsIDownloadProgressListener.idlScriptable This interface gives applications and extensions a way to monitor the status of downloads being processed by the Download Manager. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) To use simply implement this interface in your code, then call nsIDownloadManager.addListener() to start listening. When you no longer need to listen to the Download Manager's state, call nsIDownloadManager.removeListener() to stop listening. As the states of downloads change, the methods described here are called by the Download Manager so your code can take whatever steps it needs to. This interface works very similarly to the nsIWebProgress interface. It is important to no...
...rtant to note that there is no service for this listener. Rather, the developer must create an object with the methods provided below to implement it. ...
... Methods onDownloadStateChange() Called when the status of a particular download changes. void onDownloadStateChange( in short aState, in nsIDownload aDownload ); Parameters aState The previous state of the download. S...
...And 2 more matches
nsIEditorSpellCheck
editor/idl/nsIEditorSpellCheck.idlNot scriptable Provides spell checking commands for nsIEditor instances. Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/editor/editorspellchecker;1. To create an instance, use: var editorSpellCheck = Components.classes["@mozilla.org/editor/editorspellchecker;1"] .createInstance(Components.interfaces.nsIEditorSpellCheck); Method overview void AddWordToDictionary(in wstring word); boolean canSpellCheck(); void checkCurrentDictionary(); boolean CheckCurrentWord(in wstring suggestedWord); boolean CheckCurrentWordNoSuggest(in wstring suggestedWord); AString GetCurrentDictionary(); voi...
...void AddWordToDictionary( in wstring word ); Parameters word The word to add to the current p...
...in wstring misspelledWord, in wstring replaceWord, in boolean allOccurrences ); Parameters misspelledWord The word to replace. replaceWord The word with which to replace the misspelledWord. allOccurrences If true, all occurrences of misspelledWord are replaced with replaceWord. If false, only the first occurrence is replaced. saveDefaultDictionary() Obsolete since Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Saves the currently selected dictionary as the default. The function UninitSpellChecker() will also do this, but that function may not be called in some situations. This function allows the ca...
...And 2 more matches
nsIGlobalHistory3
docshell/base/nsIGlobalHistory3.idlScriptable This interface provides information about global history to Gecko. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 9.0 Inherits from: nsIGlobalHistory2 Last changed in Gecko 1.9 (Firefox 3) This interface was originally created as part of nsIGlobalHistory2, but was split off during the transition to Places. ...
...Implementations should generally add the URI for aOldChannel to history for link coloring, but are advised not to expose it in the history user interface. ...
...Implementations should generally add the URI for aOldChannel to history for link coloring, but are advised not to expose it in the history user interface. ...
...And 2 more matches
nsIIOService
netwerk/base/public/nsIIOService.idlScriptable This interface provides a set of URL parsing utility functions. These are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces. Inherits from: nsISupports Last changed in Gecko 1.2 This interface duplicates many of the nsIProtocolHandler methods in a protocol handler independent way (For example newURI() inspects the scheme in order to delegate creation of the new URI to the appropriate protocol handler). Note: nsIIOService may only be used from the main thread. Implemented by @mozilla.org/network/io-service;1 as a service: var iOService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interf...
...es.nsIIOService); Method overview boolean allowPort(in long aPort, in string aScheme); ACString extractScheme(in AUTF8String urlString); unsigned long getProtocolFlags(in string aScheme); nsIProtocolHandler getProtocolHandler(in string aScheme); nsIChannel newChannel(in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Obsolete since Gecko 48 nsIChannel newChannel2(in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI, in nsIDOMNode aLoadingNode, in nsIPrincipal aLoadingPrincipal, in nsIPrincipal aTriggeringPrincipal, in uint32_t aSecurityFlags, in uint32_t aContentPolicyType); nsIChannel newChannelFromURI(in nsIURI aURI); Obsolete since Gecko 48 nsIChannel newChannelFromURI2(in nsIURI aURI,...
...s. Return value The value of the protocolFlags attribute for the corresponding nsIProtocolHandler. getProtocolHandler() Returns a protocol handler for a given URI scheme. nsIProtocolHandler getProtocolHandler( in string aScheme ); Parameters aScheme The URI scheme for which to get a protocol handler. Return value An nsIProtocolHandler for the scheme. newChannel() Obsolete since Gecko 48 A shortcut method to avoid repeated calls of newURI() and newChannelFromURI(). nsIChannel newChannel( in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI ); Parameters aSpec The spec for the desired uri. aOriginCharset The charset for the uri. May be null. aBaseURI The base URI for the spec. May be null. If aSpec is an absolute URL, this parameter is ignored. ...
...And 2 more matches
nsIPrincipal
caps/nsIPrincipal.idlScriptable Provides the interface to a principal, which represents a security context. On the web, for example, a typical principal is comprised of an URL scheme, host, and port. Inherits from: nsISerializable Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) For details on principals, how they work, and how to get the appropriate one, see Security check basics. Method overview short canEnableCapability(in string capability); Native code only! void checkMayLoad(in nsIURI uri, in boolean report); void disableCapability(in string capability, inout voidPtr annotation); Native code only! void enableCapability(in string capability, inout voidPtr annotation); Native code only! boolean equals(in nsI...
...Attribute Type Description certificate nsISupports The certificate associated with this principal, if any. If there isn't one, this will return null. Getting this attribute never throws. Read only. certificateID string The fingerprint ID of this principal's certificate. Throws if there is no certificate associated with this principal. Read only. Obsolete since Gecko 1.8 commonName string The common name for the certificate. This pertains to the certificate authority organization. Throws if there is no certificate associated with this principal. Obsolete since Gecko 1.8 csp nsIContentSecurityPolicy A Content Security Policy associated with this principal. Native code only! domain nsIURI The domain URI to which this...
... own (e.g. it may have a number of different names all concatenated together with some information on what they mean in between). Throws if there is no certificate associated with this principal. Read only. URI nsIURI The codebase URI to which this principal pertains. This is generally the document URI. Read only. Note: This wasn't accessible by scripts prior to Gecko 2.0. Constants Principal capability constants These values indicate the capabilities of a principal. The order is significant; if an operation is performed on a set of capabilities, the minimum is computed. Constant Value Description ENABLE_DENIED 1 ENABLE_UNKNOWN 2 ENABLE_WITH_USER_PERMISSION 3 ENABLE_GRANTED ...
...And 2 more matches
nsIProcess2
Implemented by: @mozilla.org/process/util;1. ...
... Implemented by: @mozilla.org/process/util;1. ...
... Implemented by: @mozilla.org/process/util;1. ...
...And 2 more matches
nsITextInputProcessorNotification
So, nsITextInputProcessorCallback won't be changed for keeping backward compatibility. ...
...So, nsITextInputProcessorCallback won't be changed for keeping backward compatibility. ...
...So, nsITextInputProcessorCallback won't be changed for keeping backward compatibility. ...
...And 2 more matches
nsIURLParser
netwerk/base/public/nsIURLParser.idlScriptable Specifies the interface to an URL parser that attempts to follow the definitions of RFC 2396. ...
... directoryLen basenamePos basenameLen extensionPos extensionLen parsePath() Breaks the path string up into its 4 major components: a file path, a param string, a query string, and a reference string. ...
...nsionPos extensionLen parsePath() Breaks the path string up into its 4 major components: a file path, a param string, a query string, and a reference string. ...
...And 2 more matches
nsIWebContentHandlerRegistrar
xpfe/appshell/public/nsIWebContentHandlerRegistrar.idlScriptable Applications wishing to use web content handlers need to implement this interface. Typically they will prompt the user to confirm adding an entry to the local list. ...
...R_DOM_SYNTAX_ERR will be thrown. This string must also be of either the http or https schemes. title The title of the handler presented to the user as a string. contentWindow The DOM content window from which the method has been called. Note: Script must execute from same domain as uri or else it will throw permission error. Can bypass this by opening about:config and setting preference of gecko.handlerService.allowRegisterFromDifferentHost to true. Examples Register a webmail service as mailto handler The following code aims to add "Outlook.com Live Mail" to list of webservice handlers. In the image below "Gmail" and "Yahoo! Mail" already exist as webservice handlers. Cu.import('resource://gre/modules/Services.jsm'); var nsiwchr = Cc["@mozilla.org/embeddor.implemented/web-conten...
...m/secure/start?action=compose&to=%s as a content or protocol handler'Permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler' when calling method: [nsIWebContentHandlerRegistrar::registerProtocolHandler] If the host names do match then a confirmation like this will be seen: This domain check can be bypassed by setting the preference of gecko.handlerService.allowRegisterFromDifferentHost to true as in this code here: var {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/Services.jsm"); var nsiwchr = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getService(Ci.nsIWebContentHandlerRegistrar); var allowRegisterFromDifferentHost = Services.prefs.getBoolPref...
...And 2 more matches
KeyboardEvent.getModifierState() - Web APIs
ssed or locked), otherwise, false. Syntax var active = event.getModifierState(keyArg); Returns A Boolean Parameters keyArg A modifier key value. The value must be one of the KeyboardEvent.key values which represent modifier keys, or the string "Accel" . This is case-sensitive. Modifier keys on Internet Explorer IE9 uses "Scroll" for "ScrollLock" and "Win" for "OS". ...
...ctive = event.getModifierState(keyArg); Returns A Boolean Parameters keyArg A modifier key value. The value must be one of the KeyboardEvent.key values which represent modifier keys, or the string "Accel" . This is case-sensitive. Modifier keys on Internet Explorer IE9 uses "Scroll" for "ScrollLock" and "Win" for "OS". ...
...lly this isn't supported by platform Not supported While ScrollLock is locked "Shift" ? Shift key pressed "Super" Not supported "Symbol" Not supported "SymbolLock" Not supported On the other platforms, "Alt", "Control" and "Shift" may be supported. All modifiers (except "FnLock", "Hyper", "Super" and "Symbol" which are defined after Gecko implements this) are always supported for untrusted events on Gecko. This doesn't depend on the platform. "Accel" virtual modifier Note: The "Accel" virtual modifier has been effectively deprecated in current drafts of the DOM3 Events specification. getModifierState() also accepts a deprecated virtual modifier named "Accel". event.getModifierState("Accel") returns true when at least one of Ke...
...And 2 more matches
KeyboardEvent - Web APIs
, which applies generally to all of the recipients. keydown A key has been pressed. keyup A key has been released. Obsolete events keypress A key that normally produces a character value has been pressed. This event was highly device-dependent and is obsolete. You should not use it. Usage notes There are three types of keyboard events: keydown, keypress, and keyup. For most keys, Gecko dispatches a sequence of key events like this: When the key is first pressed, the keydown event is sent. If the key is not a modifier key, the keypress event is sent. When the user releases the key, the keyup event is sent. Special cases Some keys toggle the state of an indicator light; these include keys such as Caps Lock, Num Lock, and Scroll Lock. On Windows and Linux, these keys dispa...
...2 and earlier also dispatched the keypress event for these keys. However, a limitation of the macOS event model causes Caps Lock to dispatch only the keydown event. Num Lock was supported on some older laptop models (2007 models and older), but since then, macOS hasn't supported Num Lock even on external keyboards. On older MacBooks with a Num Lock key, that key doesn't generate any key events. Gecko does support the Scroll Lock key if an external keyboard which has an F14 key is connected. In certain older versions of Firefox, this key generated a keypress event; this inconsistent behavior was bug 602812. Auto-repeat handling When a key is pressed and held down, it begins to auto-repeat. This results in a sequence of events similar to the following being dispatched: keydown keypress k...
...eydown keypress keydown keypress <<repeating until the user releases the key>> keyup This is what the DOM Level 3 specification says should happen. There are some caveats, however, as described below. Auto-repeat on some GTK environments such as Ubuntu 9.4 In some GTK-based environments, auto-repeat dispatches a native key-up event automatically during auto-repeat, and there's no way for Gecko to know the difference between a repeated series of keypresses and an auto-repeat. On those platforms, then, an auto-repeat key will generate the following sequence of events: keydown keypress keyup keydown keypress keyup <<repeating until the user releases the key>> keyup In these environments, unfortunately, there's no way for web content to tell the difference between auto-repeatin...
...And 2 more matches
Window.navigator - Web APIs
Web › API › Window › navigator
out the application running the script. Syntax navigatorObject = window.navigator Examples Example #1: Browser detect and return a string var sBrowser, sUsrAg = navigator.userAgent; // The order matters here, and this may report false positives for unlisted browsers. ...
... may report false positives for unlisted browsers. ...
...) > -1) { sBrowser = "Samsung Internet"; // "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G955F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4 Chrome/67.0.3396.87 Mobile Safari/537.36 } else if (sUsrAg.indexOf("Opera") > -1 || sUsrAg.indexOf("OPR") > -1) { sBrowser = "Opera"; // "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106" } else if (sUsrAg.indexOf("Trident") > -1) { sBrowser = "Microsoft Internet Explorer"; // "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Zoom 3.6.0; wbx 1.0.0; rv:11.0) like Gecko" } else if (sUsrAg.indexOf("Edge") > -1) { sBrowser = "Microsoft Edge"; // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/53...
...And 2 more matches
Using URL values for the cursor property - CSS: Cascading Style Sheets
Syntax The basic (CSS 2.1) syntax for this property is: cursor: [ <url> , ]* <keyword> This means that zero or more URLs may be specified (comma-separated), which must be followed by one of the keywords defined in the CSS specification, such as auto or pointer. For example, the following value would be allowed: cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto; This will first try loading foo.cur. If that file does not exist or is not valid for some other reason, bar.gif is tried, and if that can't be used either, auto will be used. ...
... CSS specification, such as auto or pointer. For example, the following value would be allowed: cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto; This will first try loading foo.cur. If that file does not exist or is not valid for some other reason, bar.gif is tried, and if that can't be used either, auto will be used. Support for the CSS 3 syntax for cursor values got added in Gecko 1.8 (Firefox 1.5): cursor: [ <uri> [ <x> <y> ]? , ]* <keyword> It allows specifying the coordinates of the cursor's hotspot, which will be clamped to the boundaries of the cursor image. If none are specified, the coordinates of the hotspot are read from the file itself (for CUR and XBM files) or are set to the top left corner of the image. An example of the CSS3 syntax is: .foo { cursor: a...
...cursor: url(cursor1.png) 4 12, auto; } .bar { cursor: pointer; cursor: url(cursor2.png) 2 2, pointer; } /* Falls back onto 'auto' and 'pointer' in IE, but must be set separately */ The first number is the x-coordinate, and the second number is the y-coordinate. The example will set the hotspot to be the pixel at (4,12) from the top left (0,0). Limitations All image formats supported by Gecko can be used. This means that you can use PNG, GIF, JPG, BMP, CUR, etc. images. ANI is not supported. An animated PNG or GIF will not create an animated cursor. Note: Starting with Gecko 2.0, Gecko also supports the SVG image format for cursors. However, the SVG image must contain a length-valued (not percentage-valued) height and width on its root SVG node. JavaScript, CSS animation, and declar...
...And 2 more matches
Consistent list indentation - CSS: Cascading Style Sheets
One of the most common style changes made to lists is a change in the indentation distance--that is, how far the list items are pushed over to the right. This often leads to frustration, because what works in one browser often doesn't have the same effect in another. For example, if you declare that lists have no left margin, they move over in Internet Explorer, but sit stubbornly in place in Gecko-based browsers.This article will help you understand the problems that can occur and how to avoid them. In order to understand why this is the case, and more importantly how to avoid the problem altogether, it's necessary to examine the details of list construction. Making a List First, we consider a single, pure list item. This list item has no marker (otherwise known as a "bullet") and is not y...
...d this and get some indentation, there are really only three options available to browser implementors. Give each <li> element a left margin. Give the <ul> element a left margin. Give the <ul> element some left padding. As it turns out, nobody seems to have used the first option. The second option was taken by Internet Explorer for Windows and Macintosh, and Opera. ...
... As we can see, the markers remain attached to the <li> elements, no matter where they are. The difference is entirely in how the <ul> is styled. ...
...And 2 more matches
Touch events (Mozilla experimental) - Developer guides
This API allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system. ...
...This API allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system. ...
...This API allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system. ...
...And 2 more matches
HTML5 Parser - Developer guides
Web › Guide › HTML › HTML5 › HTML5 Parser
The HTML parser is one of the most complicated and sensitive pieces of a browser. It controls how your HTML source code is turned into web pages and, as such, changes to it are rare. The new parser is faster, complies with the HTML5 standard, and enables a lot of new functionality as well. The new parser introduces these major improvements: You can now use SVG and MathML inline in HTML5 pages, without XML namespace syntax. Parsing is now done in a separate thread from Firefox's main UI thread, improving overall browser responsiveness. Calls to innerHTML are a lot faster. Dozens of long-standing parser related bugs are now fixed. ...
...ad, improving overall browser responsiveness. Calls to innerHTML are a lot faster. Dozens of long-standing parser related bugs are now fixed. The HTML5 specification provides a more detailed description than previous HTML standards of how to turn a stream of bytes into a DOM tree. This will result in more consistent behavior across browser implementations. In other words, in supporting HTML5, Gecko, WebKit, and Internet Explorer (IE) will behave more consistently with each other. Changed parser behaviors Some changes to the way that the Gecko 2 parser behaves, as compared to earlier versions of Gecko, may affect web developers, depending on how you've written your code in the past and what browsers you've tested it on. Tokenization of left angle-bracket within a tag Given the string <fo...
...the way that the Gecko 2 parser behaves, as compared to earlier versions of Gecko, may affect web developers, depending on how you've written your code in the past and what browsers you've tested it on. Tokenization of left angle-bracket within a tag Given the string <foo<bar>, the new parser reads it as one tag named foo<bar. This behavior is consistent with IE and Opera, and is different from Gecko 1.x and WebKit, which read it as two tags, foo and bar. If you previously tested your code in IE and Opera, then you probably don't have any tags like this. If you tested your site only with Gecko 1.x or WebKit (for example, Firefox-only intranets or WebKit-oriented mobile sites), then you might have tags that match this pattern, and they will behave differently with Gecko 2. Calling document.wr...
...And 2 more matches
Setting up an extension development environment - Archive of obsolete content
, 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 you start any version of Firefox you may choose any profile you like. Development command flags As of Gecko 2 (Firefox 4), JavaScript files are cached ("fastload"). The -purgecaches command-line flag disables this behavior. Alternatively, you can set the MOZ_PURGE_CACHES environment variable. See this bug for more information. Development preferences There is a set of development preferences that, when enabled, allows you to view more information about application activity, thus making debugging easi...
...te problems to the Error Console. (Note that the extension manager automatically restarts the application at startup sometimes, which may mean you won't have time to see the messages logged before the automatic restart happens. To see them, prevent the automatic restart by setting the environment NO_EM_RESTART to 1 before starting the application.) nglayout.debug.disable_xul_fastload = true. For Gecko 2.0+ (Firefox 4.0+). See this bug for more information. Although the bug has been closed, it is believed that this pref is still relevant. You might also want to set dom.report_all_js_exceptions = true. See Exception logging in JavaScript for details. devtools.errorconsole.deprecation_warnings = true. Detect deprecated code use. Warning: Never set nglayout.debug.disable_xul_fastload to true ...
...eptions = true. See Exception logging in JavaScript for details. devtools.errorconsole.deprecation_warnings = true. Detect deprecated code use. Warning: Never set nglayout.debug.disable_xul_fastload to true in a production environment; it exists solely to aid in debugging. In particular, add-ons should never change this preference. Note: The Error Console is disabled by default starting in Gecko 2.0. You can re-enable it by changing the devtools.errorconsole.enabled preference to true and restarting the browser. With this, javascript.options.showInConsole is also set to true by default. Development extensions These extensions may help you with your development. DOM Inspector, used to inspect and edit the live DOM of any web document or XUL application (Firefox and Thunderbird) Ven...
...n's chrome in a JAR or in directories, developing in directories is simpler. If you choose a JARed structure for releasing, you can still develop with a directory structure by editing your chrome.manifest. For example, rather than having content myExtension jar:chrome/myExtension.jar!/content/ use content myExtension chrome/content/ Preventing the first launch extension selector Requires Gecko 8.0(Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Starting in Firefox 8, on the first launch of a new version of Firefox, it presents user interface letting users select which third party add-ons to keep. This lets them weed out add-ons that were installed without their knowledge, or that are no longer needed. However, this interface can be disruptive when debugging add-ons. You can avoid th...
Tabbed browser - Archive of obsolete content
The attributes to which changes result in this event being sent are: label crop busy image...
...ved, false); // When no longer needed container.removeEventListener("TabOpen", exampleTabAdded, false); container.removeEventListener("TabMove", exampleTabMoved, false); container.removeEventListener("TabClose", exampleTabRemoved, false); Note: Starting in Gecko 1.9.1, there's an easy way to listen on progress events on all tabs. Notification when a tab's attributes change Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Starting in Gecko 2.0, you can detect when a tab's attributes change by listening for the TabAttrModified event. The attributes to which changes result in this event being sent are: label crop busy image selected function exampleTabAttrModified(event) { var tab = event.target; // Now you can check what's changed on the tab } // Duri...
...You can detect when a tab becomes pinned or unpinned by watching for the TabPinned and TabUnpinned events. function exampleTabPinned(event) { var browser = gBrowse...
...You can detect when a tab becomes pinned or unpinned by watching for the TabPinned and TabUnpinned events. function exampleTabPinned(event) { var browser = gBrowser.getBrowserForTab(event.target); // browser is the XUL element of ...
Index of archived content - Archive of obsolete content
Repackaging Firefox Style System Overview Using microformats Firefox Sync Code snippets JavaScript Client API Syncing custom preferences Force RTL GRE GRE Registration Gecko Coding Help Wanted HTTP Class Overview Hacking wiki Help Viewer Creating a Help Content Pack Helper Apps (and a bit of Save As) Hidden prefs How to Write and Land Nanojit Patches IO Guide/Directory Keys Introducing the Audio API extension Isp Data ...
... WinReg Object Methods WinRegValue XPJS Components Proposal XRE XTech 2005 Presentations Directions of the Mozilla RDF engine Extending Gecko with XBL and XTF Mozilla E4X Rich Web SVG And Canvas In Mozilla XUL - Mozilla's XML User Interface Language XTech 2006 Presentations XUL Explorer XULRunner Application Update Article ...
... tutorials Creating reusable content with CSS and XBL Underscores in class and ID Names XML data XUL user interfaces Case Sensitivity in class and id Names Creating a dynamic status bar extension Creating a status bar extension Element title Gecko Compatibility Handbook Getting the page URL in NPAPI plugin Index Index of archived content Inner-browsing extending the browser navigation paradigm Install.js JXON List of Former Mozilla-Based Applications List of Mozilla-Based Applications Localizing an extension MMgc Makefile - .mk files M...
...an extension MMgc Makefile - .mk files Misc top level Bypassing Security Restrictions and Signing Code Creating a Web based tone generator Defining Cross-Browser Tooltips Environment variables affecting crash reporting IO Guide Images, Tables, and Mysterious Gaps Installing plugins to Gecko embedding browsers on Windows MCD, Mission Control Desktop, AKA AutoConfig Monitoring WiFi access points No Proxy For configuration Notes on HTML Reflow Same-origin policy for file: URIs Source Navigator Source code directories overview Using XML Data Islands in Mozilla Using content preferences Vi...
Disabling interruptible reflow - Archive of obsolete content
...
... ...
... ...
... ...
jspage - Archive of obsolete content
ySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925)); },trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?((document.querySelectorAll)?6:5):4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419); },gecko:function(){return(!document.getBoxObjectFor&&window.mozInnerScreenX==null)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true; Browser.detect=function(){for(var b in this.Engines){var a=this.Engines[b]();if(a){this.Engine={name:b,version:a};this.Engine[b]=this.Engine[b+a]=true; break;}}return{name:b,version:a};};Browser.detect();Browser.R...
...Offset:a.clientY}; if(j.match(/DOMMouseScroll|mousewheel/)){var h=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3;}var e=(a.which==3)||(a.button==2);var l=null;if(j.match(/over|out/)){switch(j){case"mouseover":l=a.relatedTarget||a.fromElement; break;case"mouseout":l=a.relatedTarget||a.toElement;}if(!(function(){while(l&&l.nodeType==3){l=l.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){l=false; }}}}return $extend(this,{event:a,type:j,page:i,client:c,rightClick:e,wheel:h,relatedTarget:l,target:g,code:b,key:m,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey}); }});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault(); },stopProp...
...e:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1}; (function(){var a=function(b){var c=b.relatedTarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.hasChild(c)); };Element.Events=new Hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}}); })();Element.Properties.styles={set:function(a){this.setStyles(a);}};Element.Properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"; }}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(Browser.Eng...
...ect){var j=this.getBoundingClientRect(),m=document.id(this.getDocument().documentElement),p=m.getScroll(),k=this.getScrolls(),i=this.getScroll(),h=(d(this,"position")=="fixed"); return{x:j.left.toInt()+k.x-i.x+((h)?0:p.x)-m.clientLeft,y:j.top.toInt()+k.y-i.y+((h)?0:p.y)-m.clientTop};}var l=this,n={x:0,y:0};if(b(this)){return n; }while(l&&!b(l)){n.x+=l.offsetLeft;n.y+=l.offsetTop;if(Browser.Engine.gecko){if(!f(l)){n.x+=c(l);n.y+=g(l);}var o=l.parentNode;if(o&&d(o,"overflow")!="visible"){n.x+=c(o); n.y+=g(o);}}else{if(l!=this&&Browser.Engine.webkit){n.x+=c(l);n.y+=g(l);}}l=l.offsetParent;}if(Browser.Engine.gecko&&!f(this)){n.x-=c(this);n.y-=g(this); }return n;},getPosition:function(k){if(b(this)){return{x:0,y:0};}var l=this.getOffsets(),i=this.getScrolls();var h={x:l.x-i.x,y:l.y-i.y};var j=(k&&(k...
The new nsString class implementation (1999) - Archive of obsolete content
erns. Disclaimer: I absolutely hate string classes. No one has ever devised one that more than 2 programmers can agree on. So, why then am I proposing this? Well, nsString has served us well so far, but it's in need of a facelift. And XPCOM has really taken off, so nsString needs to be brought into alignment. Justification The nsString class is a wide character string class used throughout all of Gecko (and other modules) as the default implementation. However, it suffers from a few implementation details which need to be addressed and that are the subject of this document. The deficiencies of the current implementation are: Class based -- making it unsuitable for cross-dll usage due to fragility Little intrinsic i18n support Few efficiencies, notably a lack of support for narrow (1-byte) c...
... static void EnsureCapacity(nsStrImpl& aString,PRUint32 aNewLength); static void GrowCapacity(nsStrImpl& ...
...r overhead. This class fully interoperates with nsString, nsAutoString and nsStrImpl. nsIString Naturally we will need include an nsIString interface onto the nsStrImpl/nsString classes. I won't repeat it's interface here since it is basically a restatement (in XPCOM terms) of the nsString interface. Usage Patterns How To Use These Classes To increase the portability, thread and process safety of Gecko, I suggest the following rules regarding the use of each of our string class derivatives: <center> String Class</center> <center> Where To Use</center> nsStrImpl Use to pass strings between modules who have linked the nsStrImpl function library. nsString Use these locally in objects who span of control is known to live within your ow...
...tely necessary. nsCString Same as nsString, but should be used with caution because of localization concerns. nsIString Use to pass strings between modules that may not use nsStrImpl implementation. This is the most generic approach, but offers reference counted strings. There are implications regarding this implementation, notably dealing with API changes throughout Gecko. Notably, nsStrings in API's will be discouraged in public API's. These API's will need to be rewritten using nsStrImpl references instead. As an alternative, programmers can pass nsIStrings between modules. I18n Issues Another concern (mainly of the i18n team) has to do with the use of a 1-byte (ASCII) nsCString at all. The i18n team correctly points out that that anarchy will prevail ...
Styling a Tree - Archive of obsolete content
et the properties based on values in the datasource. Setting Properties for the Custom View For trees with a custom view script, you can set properties by supplying the functions getRowProperties(), getColumnProperties() and getCellProperties() in the view. These return information about an individual row, column and cell. Arguments to these functions indicate which row and/or column. ...
... getRowProperties : function(row){ return ''} getColumnProperties : function(column,columnElement){ return ''} getCellProperties : function(row,column){ return ''} Let's look at an example of changing a specific cell. Let's make every fourth row have blue text, using the example from a previous section. ...
...: function(row,column){ return ''} Let's look at an example of changing a specific cell. Let's make every fourth row have blue text, using the example from a previous section. We'll need to add code to the getCellProperties() function, to add a property 'makeItBlue' for cells in every fourth row. (We don't use getRowProperties() as the text color will not be inherited into each cell.) Prior to Gecko 22 the properties object that is passed as the last argument to the getCellProperties() is an XPCOM object that implements nsISupportsArray. It is really just an XPCOM version of an array. It contains a function AppendElement() which can be used to add an element to the array. We can use the interface nsIAtomService to construct string atoms for the properties. getCellProperties: function(row,co...
...mService); props.AppendElement(aserv.getAtom("makeItBlue")); } } The properties list requires an array of atom objects, which can be thought of as constant strings. We create them using the XPCOM interface nsIAtomService and add them to the array using the AppendElement() function. Here, we create an atom 'makeItBlue'. You can call AppendElement() again to add additional properties. From Gecko 22 your function should return a string containing the property. getCellProperties: function(row,col){ if ((row %4) == 0){ return "makeItBlue"; } } To support Gecko versions before and after this change use. getCellProperties: function(row,col,props){ if ((row %4) == 0){ if (props) { var aserv=Components.classes["@mozilla.org/atom-service;1"]. getService(Com...
What XULRunner Provides - Archive of obsolete content
The goal of XULRunner is to provide a solution for deploying XUL applications (primarily Firefox and Thunderbird), as well as providing an embedding mechanism. ...
... The goal of XULRunner is to provide a solution for deploying XUL applications (primarily Firefox and Thunderbird), as well as providing an embedding mechanism. ...
...See the wikimo:XUL:Installation Story. Extension Manager File picker (uses native OS filepicker as appro...
... Extension Manager File picker (uses native OS filepicker as appropriate) Find toolbar Helper app dialog/UI Security UI (maintenance of SSL keychains, etc) Embedding APIs The following embedding APIs are provided by XULRunner: Cross-platform embedding (XRE_InitEmbedding) JavaXPCOM embedding gtkmozembed (Linux only) ActiveX control (Windows only) (not yet complete) Obsolete since Gecko 7.0 NSView-based-widget (Mac OS X only) (not yet complete) The "Maybe" List The following features have been discussed and may be included if developer time permits and code size is controlled: LDAP support Spellchecking support (with or without dictionaries provided) see bug 285977 Core support for profile roaming (with application-specific extensibility) PyXPCOM embedding (not yet c...
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
to install a plugin. When this method is used, you can choose to either place the plugin into the plugins directory, or place it into your own directory and modify the Windows registry to let Firefox know where to find the plugin. The downside to this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin. As of Firefox 3 (and any Gecko 1.9 based application) the use of install.js scripts is no longer supported and plugins must either be shipped as an executable installer or in a bundle as described here. Bundle structure Toolkit bundles can 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 plu...
...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) and earlier Prior to Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), it was possible to package multiple plugin libraries for different operating systems into a single xpi bundle. In the XPI you can use the following structure: platform/ Linux_x86-gcc3/ plugins/ libplugin.so Darwin_ppc-gcc3/ plugins/ libplugin.dylib Mor...
...y 2.1), it was possible to package multiple plugin libraries for different operating systems into a single xpi bundle. In the XPI you can use the following structure: platform/ Linux_x86-gcc3/ plugins/ libplugin.so Darwin_ppc-gcc3/ plugins/ libplugin.dylib More specific information can be found in the platform-specific subdirectories documentation. Gecko 2.0 (Firefox 4) and later Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) removed support for platform-specific subdirectories. Instead, you need to place the different plugin libraries into the plugins directory. For example: plugins/ libplugin.so libplugin.dylib Install Manifest The install manifest describes the plugin to the user. For a plugin the manifest only needs to be ve...
...lf-descriptive, it must be a toolkit version format. The target application block says which versions of an application the plugin is compatible with. It includes the application ID and the minimum and maximum version of the application that the plugin works with. There can be multiple targetApplication blocks listed. The unpack property is necessary to tell applications using newer versions of Gecko to unpack the plugin because DLLs can't be loaded from XPI files. Providing updates When plugins are packaged in this way they can make use of the built in add-on update system. This allows a remote update file to be read periodically and an updated version of the plugin offered to the user or to mark the plugin as compatible with a wider range of applications. This is performed by including an ...
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
Fortunately, the behavior can be overcome in all cases with a single CSS2 rule. ...
...quirks mode. In version 4 browsers such as Netscape Navigator 4.x and Internet Explorer 4.x, tables generally "broke" the inheritance of font styling. If the author had set a font size on the body element, for example, the font size of text within a table would match the user's default, not the body style. This led to a number of workarounds which were designed to cater to these bugs, and also to Gecko-based browsers emulating the behavior in some cases. Fortunately, the behavior can be overcome in all cases with a single CSS2 rule. Tables and Inheritance In CSS terms, tables are like any other element when it comes to inheritance. If a CSS property can be inherited, then table elements and their components (tr, td, etc.) should inherit just as any other element would. For example, if an auth...
...s such as body. This represented a violation of CSS inheritance rules, and led many authors to create workarounds such as: <style type="text/css"> body, table, td {font-size: 11px;} </style> Recreating Legacy Behavior To avoid "breaking" older pages that were authored with old-browser behaviors in mind, Mozilla and related browsers will mimic old browsers when in "quirks" mode. To do this, the Gecko rendering engine uses the following rule in the quirk.css user agent file: /* Quirk: cut off all font inheritance in tables and captions except for family. */ table, caption { font-size: -moz-initial; font-weight: -moz-initial; font-style: -moz-initial; font-variant: -moz-initial; } This rule sets all aspects of a table's font, except for the font family, to match the user's preferences...
...* Quirk: cut off all font inheritance in tables and captions except for family. */ table, caption { font-size: -moz-initial; font-weight: -moz-initial; font-style: -moz-initial; font-variant: -moz-initial; } This rule sets all aspects of a table's font, except for the font family, to match the user's preferences setting, thus emulating the behavior of old browsers. This only happens when Gecko is in "quirks" mode; in "standards" mode, all styles are inherited by tables as permitted by the CSS specification. In those cases where it is necessary to author documents in "quirks" mode, but the breaking of table inheritance is not desired, authors can use Gecko's standards support to overcome the table-font rule shown above. The value -moz-initial is a proprietary value used to apply the us...
Properly configuring server MIME types - Learn web development
it has not been significantly updated in many years. Background By default, many web servers are configured to report a MIME type of text/plain or application/octet-stream for unknown content types. As new content types are invented or added to web servers, web administrators may fail to add the new MIME types to their web server's configuration. This is a major source of problems for users of Gecko-based browsers, which respect the MIME types as reported by web servers and web applications. What are MIME types? MIME types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web browser in how the content is to be processed and displayed. Examples of MIME types are: text/html for normal web pages text/plain for...
...ing the correct MIME type can also be important for security reasons; it's possible for malicious content to affect the user's computer by pretending to be a safe type of document when it is in fact not. Note: Historically, Firefox has loaded CSS files even if they had the wrong MIME type, as long as the HTML document that requested them was being processed in quirks mode. ...
...s loaded CSS files even if they had the wrong MIME type, as long as the HTML document that requested them was being processed in quirks mode. For security reasons, Gecko 2.0 will no longer do this for stylesheets loaded from a different origin than the requesting document. If your stylesheet comes from a different origin than the document, you must serve it with the correct MIME type (text/css). Gecko 1.9.1.11 (Firefox 3.5.11) and Gecko 1.9.2.5 (Firefox 3.6.5) also implement this security fix, but to improve compatibility, there was a temporary heuristic that allows the load if the first line in the style sheet appears to be a well-formed CSS construct; the heuristic has been removed in Firefox 4, and you have to properly set the text/css MIME types to have your CSS pages recognized. Why bro...
...u can take to determine the correct MIME type value to be used for your content. If your content was created using a vendor's software application, read the vendor's documentation to see what MIME types should be reported for different media types. Look in the IANA | MIME Media Types registry which contains all registered MIME types. If the media type is displayed using a plug-in in Netscape Gecko, install the plug-in and then look in the Help->About Plug-ins Menu to see what MIME types are associated with the media type. Search for the file extension in FILExt or File extensions reference to see what MIME types are associated with that extension. How to set up your server to send the correct MIME types The fundamental idea is to configure your server to send the correct Content-Type H...
Displaying Places information using views
heet that binds elements with the special type attribute to one of the views. The overlay contains JavaScript required by the views. It also contains the built-in Places context menu and commands, which you may want to take advantage of in your own uses of the views. Connecting a view to its data To hook up a built-in view to its data, use the view's special place attribute. Note: Starting in Gecko 2.0, you can't use the place attribute with menus. See Menu view for details. You may specify the attribute directly in the XUL or set its corresponding property via JavaScript. Its value is the URI of a query, and the data shown in the view are the results of this query. For simple queries whose URIs do not change over the life of the view, you might specify the place attribute directly in the...
... of interface nsINavHistoryResultViewer, which is the point of interaction between a view and its results. Results themselves observe Places changes, and if on a Places change a result determines that its data specifically has changed, it notifies its view by calling an appropriate method of nsINavHistoryResultViewer. Once notified, the view is responsible for updating itself. Note: Starting in Gecko 2.0, nsINavHistoryResultViewer has been replaced by the more powerful nsINavHistoryResultObserver. Tree view Create a built-in tree view by setting the type attribute to "places" on a tree element. The treechildren element should be empty: <tree type="places"> <treecols> <treecol id="title" flex="1" primary="true" /> <treecol id="url" flex="1" /> </treecols> <treechildren /> </t...
...ating the view's place attribute, causing it to fall out of sync with the view's query result. Use the view's load method or place property instead and let it do the work for you. If, on the other hand, you are writing a custom tree view, you will need to write similar code at some point. Menu view You can display Places information in a popup menu. ...
... and earlier Requires Gecko 1.9.2(Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Create a built-in menu view by setting the type attribute to "places" on an empty menupopup element (which would be a child of some parent menu element): <menu> <menupopup type="places" /> </menu> The place attribute or property should be set on the menupopup as well. ...
Embedding Mozilla
Embedding Tips Some frequently asked questions about embedding. Mozilla embedding APIs overview Introduction to the Mozilla embedding APIs. ...
... Embedding Tips Some frequently asked questions about embedding. Mozilla embedding APIs overview Introduction to the Mozilla embedding APIs. ...
...lows third-party developers to use the same technology as found in Mozilla. That means you can embed a web browser inside a third-party application, open channels and streams through the network backend, walk through the DOM and so on. You can even construct whole new applications using chrome. Documentation Gecko Embedding Basics An introduction to embedding the Gecko rendering engine. Embedding Tips Some frequently asked questions about embedding. Mozilla embedding APIs overview Introduction to the Mozilla embedding APIs. Embedding the Editor This document describes the current state of editor embeddability, problems with the existing implementation, some possible embedding scenarios that we need to deal with, and an embedding so...
...entation, some possible embedding scenarios that we need to deal with, and an embedding solution that will fulfil them. Roll your own browser - An embedding HowTo A quick introduction to embedding Mozilla. View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed #embedding IRC channel Related Topics Gecko, XPCOM ...
How to implement a custom autocomplete search component
complete" that implements the necessary interfaces. Note: When copying the examples below, change the UUID that uniquely identifies the component, otherwise you might have problems if your component gets installed along another component derived from those same examples. That can happen! So, get a UUID from http://www.famkruithof.net/uuid/uuidgen, for example, and paste it in. ...
...her component derived from those same examples. That can happen! So, get a UUID from http://www.famkruithof.net/uuid/uuidgen, for example, and paste it in. Basic example for Gecko 2.0 and up (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This example is your first best try because: it has no specific logic (it just returns a dummy array of choices) it doesn't care about compatibility with older Gecko versions First copy the following JavaScript code into a file named basic_autocomplete.js into the components directory (or whatever components folder is appropriate in your case): Warning: The UUID used below in chrome.manifest and assigned to CLASS_ID must be changed before use. const Ci = Components.interfaces; const Cu = Components.utils; Cu.import('resource://gre/modules/XPCOMUtils.j...
... const Ci = Components.interfaces; const CLASS_ID = Components.ID("6224daa1-71x2-4d1a-ad90-01ca1c08e323")...
...s.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; if (aCID.equals(CLASS_ID)) return SimpleAutoCompleteSearchFactory; throw Components.results.NS_ERROR_NO_INTERFACE; }, canUnload: function(aCompMgr) { return true; } }; // Module initialization function NSGetModule(aCompMgr, aFileSpec) { return SimpleAutoCompleteSearchModule; } Starting in Gecko 2.0, component registration has been changed, so you need to make the following changes: Add an NSGetFactory() function: function NSGetFactory(cid) { if (cid.toString().toUpperCase() != CLASS_ID.toString().toUpperCase()) { throw Components.results.NS_ERROR_FACTORY_NOT_REGISTERED; } return SimpleAutoCompleteSearchFactory; } You need to explicitly register ...
Using JavaScript code modules
Modules can also be used to create global JavaScript singletons that previously required using JavaScript XPCOM objects. A JavaScript code module is simply some JavaScript code located in a registered location. The module is loaded into a specific JavaScript scope, such as XUL script or JavaScript XPCOM script, using Components.utils.import() or Components.utils["import"](). ...
...; // displays "foo" Scope 2: Components.utils.import("resource://app/my_module.jsm"); alert(bar); // displays "[object Object]" The main effect of the by-value copy is that global variables of simple types won't be shared across scopes. Always put variables in a wrapper class and export the wrapper (such as bar in the above example). Unloading code modules Requires Gecko 7.0(Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Components.utils.unload() allows you to unload a previously imported code module. 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. Examples A template to download and edit is seen here on GitHub - Gists - _template-BootstrapJSM.x...
...Monkey 2.4) Components.utils.unload() allows you to unload a previously imported code module. 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. Examples A template to download and edit is seen here on GitHub - Gists - _template-BootstrapJSM.xpi Extending resource: URLs Prior to Gecko 2.0, the most common way to load code modules was using resource: URLs. The basic syntax of a resource URL is as follows: resource://<alias>/<relative-path>/<file.js|jsm> The <alias> is an alias to a location, usually a physical location relative to the application or XUL runtime. There are multiple pre-defined aliases set up by the XUL runtime: app - Alias to the location of the XUL applic...
...This means you can't use Components.utils.import() with your own resource URL at the top level in a component source. A possible solution is moving the call to Components.utils.import() into the XPCOM component constructor (discussion). Packaging notes It's important to note that you should not typically put your JavaScript ...
XPCOMUtils.jsm
n", interfaces: [Components.interfaces.nsIObserver, Components.interfaces.nsIMyInterface, "nsIFoo", "nsIBar"], flags: Ci.nsIClassInfo.SINGLETON}), // ...component implementation... }; Note: The ability to register the component in a category only on specific applications by adding the apps field to a category entry was added in Gecko 2. Notice that the QueryInterface() method implemented by the component simply calls the generateQI() method provided by the XPCOMUtils code module. Create an array of component constructors You need to create an array that lists the constructors for each component. This array can of course have just one entry: var components = [MyComponent]; Here, we're calling the array components. Crea...
...ided by the XPCOMUtils code module. Create an array of component constructors You need to create an array that lists the constructors for each component. This array can of course have just one entry: var components = [MyComponent]; Here, we're calling the array components. ...
...mponents = [MyComponent]; Here, we're calling the array components. ...
...tFactory() or NSGetModule() entry point Finally, you need to implement the NSGetModule() entry point so Gecko can start up your component: // "components" is the array created in the previous section if ("generateNSGetFactory" in XPCOMUtils) var NSGetFactory = XPCOMUtils.generateNSGetFactory(components); // Gecko 2.0+ else var NSGetModule = XPCOMUtils.generateNSGetModule(components); // Gecko 1.9.x Method overview function defineLazyGetter(aObject, aName, aLambda); function defineLazyModuleGetter(aObject, aName, aResource, [optional] aSymbol); function defineLazyServiceGetter(aObject, aName, aContract, aInterfaceName); function generateNSGetFactory(componentsArray); function generateCI(classInfo); function generateQI(interfaces)...
Localizing extension descriptions
All of the different descriptions now appear in the install.rdf file using em:localized properties. ...
...All of the different descriptions now appear in the install.rdf file using em:localized properties. ...
...All of the different descriptions now appear in the install.rdf file using em:localized properties. ...
...eneral one (e.g., en in preference to en-GB when searching for en-US). The current app locale will be searched for and then there will be a fallback search for en-US. If a preference isn't set and there isn't a matching em:localized property for the current locale or en-US, then the properties specified directly on the install manifest are used as a last resort, as they were always used before Gecko 1.9. Localizing before Gecko 1.9 Before Gecko 1.9, add-on developers must go through a special process to define localized add-on descriptions for add-ons targeting toolkit-based apps (such as Firefox or Thunderbird). If you do not currently have them, create localized properties files. Make sure to use UTF-8 encoding (without BOM) to ensure foreign characters display correctly. Add the fo...
TimerFirings logging
Set the following environment variable to enable it. NSPR_LOG_MODULES=TimerFirings:4 Output Once enabled, TimerFirings will print one line of logging output per timer fired. It's best to redirect this output to a file. The following sample shows the basics of this output. ...
...Set the following environment variable to enable it. NSPR_LOG_MODULES=TimerFirings:4 Output Once enabled, TimerFirings will print one line of logging output per timer fired. It's best to redirect this output to a file. The following sample shows the basics of this output. ...
...84[7f46c365ec00]: [6775] obs timer (SLACK 1000 ms): 7f46a95a0200 Each line has the following information. The first two values identify the thread. This is not especially useful. The next value is the process ID (pid). This is useful in a multi-process scenario. Next is the timer kind, one of fn (function), iface (interface) or obs (observer), which are the three kinds of timers that Gecko supports. Then comes the function kind, one of ONE_SHOT (a single-use timer), SLACK or PRECISE (repeating timers of differing precision). Then comes the timer period, measured in milliseconds. Finally there is the identifying information for the timer. Function timers have an informative label. Interface and observer timers only have an address, which is less useful, but they are uncommon enou...
... (repeating timers of differing precision). Then comes the timer period, measured in milliseconds. Finally there is the identifying information for the timer. Function timers have an informative label. Interface and observer timers only have an address, which is less useful, but they are uncommon enough that this usually doesn't matter much. The above example shows only timers from C++ within Gecko. There are also timers for setTimer or setInterval calls in JavaScript code, as the following sample shows. -991946880[7f46c365ba00]: [6775] fn timer (ONE_SHOT 0 ms): [content] chrome://browser/content/tabbrowser.xml:1816:0 711637568[7f3219c48000]: [6835] fn timer (ONE_SHOT 100 ms): [content] http://edition.cnn.com/:5:7231 711637568[7f3219c48000]: [6835] fn timer (ONE_SHOT 100 m...
Using the Places history service
each version has implemented the older interfaces, resulting in functionality spread across many interfaces. The places history service ("NavHistory") implements these history interfaces: nsIGlobalHistory2: Basic add page, is visited functionality used by the docshell when visiting and rendering pages. nsIGlobalHistory3: Adds extra functions for dealing with redirects and hints for rendering (gecko flags). nsIBrowserHistory: Adds functions used by the basic browser like marking pages as typed in the URL bar, and removing pages as from the history interface. nsINavHistoryService: Complex query functions, more fine-grained getters and setters. nsIAutoCompleteSearch: URL-bar autocomplete from history From 1.9.1 (Firefox3.1) on, don't use any Places service on (or after) quit-application h...
... database connection will be closed to allow the last sync, and changes will most likely be lost. Use quit-application-granted instead. Differences from previous implementations The previous nsGlobalHistory service stored one entry for each page in history. This entry contained the URL, title, visit count, last visit date, first visit date, host name, last referrer, flags for typed, hidden, and gecko flags (gecko flags is trunk only). The NavHistory service has broken this into two tables (see History Service Design). The main URL table stores the information about the page: URL, host name, title, visit count, hidden, and typed. Stored separately is the information specific to each visit. This information is called a "visit" in this document and in the code. A visit contains a reference to t...
...toryService.addVisit: This is an advanced function that allows the caller to set the exact referring visit, the time, the session, etc. It is designed for people writing synchronizing or backup services that need access to all the flags. Under normal browsing, addURI and addDocumentRedirect will infer this information for you. Modifying pages in history nsIGlobalHistory2.setPageTitle: Called by Gecko when the <title> element is encountered. nsIGlobalHistory3.setGeckoFlags: Called by Gecko to store rendering information about a page. Currently, this is used to store whether there was a scrollbar, which allows more efficient layout if the page is revisited. However, this is not yet supported by the NavHistory implementation. nsIBrowserHistory.removePage: Removes a given URI and all of its vis...
... page, which will override the actual page title when displayed in the UI. This is used for bookmark titles.This function may be removed if the bookmark service is changed. nsINavHistoryService.setPageDetails: Used to set all of the global bits associated with a URL. It is designed for synchronizing or backup services. Basic querying of the history system nsIGlobalHistory2.isVisited: Called by Gecko when rendering links. When isVisited returns true, the link gets the "visited" style. Otherwise, the link is colored as unvisited. nsIGlobalHistory3.getGeckoFlags: Retrieves information previously set using setGeckoFlags. It is not yet implemented in the Places history system. nsIBrowserHistory.lastPageVisited: Contains the URI of the last page visited. This is used when the preference is set t...
XPCOM glue
Mozilla › Tech › XPCOM › Glue
ymbols but can tolerate a load-time dependency on xpcom.dll should link against xpcomglue_s.lib and xpcom.lib. It should not link against xpcom_core.lib. This is the case for XPCOM components, because they are loaded into Mozilla which already has full XPCOM loaded and initialized. Frozen linkage: standalone glue (no DLL dependencies) Note: Support for locating a standalone glue was removed in Gecko 6.0. Use this when you have a custom application where you want to embed Gecko to show webpages in your own window. I.e. this linkage strategy is used when an embedder needs to bootstrap XPCOM by finding a compatible GRE on disk and loading it. In order to use XPCOM, the embedding application first needs to find where the XPCOM runtime is located. This is typically done using GRE_GetGREPathWit...
...code which wishes to use only frozen symbols and cannot tolerate a load-time dependency on xpcom.dll should #define XPCOM_GLUE 1 while compiling, and link against xpcomglue.lib. It should not link against xpcomglue_s.lib or xpcom.lib. Embedders using the standalone glue typically also need to avoid linking against NSPR as well. However, when using threadsafe together with the glue libraries from Gecko 1.8 or later, a special step needs to be taken to use NS_IMPL_THREADSAFE_ISUPPORTSn. This is because it forces a dependency on the NSPR library, which can otherwise be avoided. As described in bug 299664, the preprocessor symbol XPCOM_GLUE_USE_NSPR needs to be defined. Using Mozilla internal linkage Mozilla internal code defines MOZILLA_INTERNAL_API while compiling and links against xpcom.lib a...
....lib at the same time. Never link against xpcomglue.lib and xpcom.lib at the same time. For XULRunner 1.9, on Linux you should use either the .pc files. For example: pkg-config --cflags --libs libxul.pc These instructions are for Mozilla 1.8 and above. When using a SDK from Mozilla 1.7 or earlier, you must define MOZILLA_STRICT_API when using any form of the glue. Linux and Mac: Make sure the Gecko libraries are listed after your object (.o) files on the link line. Linux and Mac: Write the linker options exactly as stated (just replacing the /path/to/sdk/), otherwise you get an undefined symbol: ...NS_TableDrivenQI...QITableEntry... at runtime (not compile time) (in debug builds) or your module just won't load (in optimized builds). In principle, #include "mozilla-config.h" should also wo...
... but possibly earlier versions as well), you need to link against NSS, libnss3/nss3.lib in particular. This is because NSPR is now merged into NSS during the build process. To link against libxpcomglue_s/xpcomglue_s.lib using recent versions of the Firefox SDK (at least version 42, but possibly earlier versions as well), you also need to link against libmozcrt/mozcrt.lib. See Also Using the Gecko SDK Migrating from Internal Linkage to Frozen Linkage ...
How to build an XPCOM component in JavaScript
x-xxxxxxxxxxxx)] interface nsIHelloWorld : nsISupports { string hello(); }; Note that you must generate a new UUID for each XPCOM component that you create. See Generating GUIDs for more information. Compiling the Typelib Your interface definition must be compiled into a binary format (XPT) in order to be registered and used within Mozilla applications. The compilation can be done using the Gecko SDK. You can learn how to get Mac, Linux, and Windows versions of the Gecko SDK by reading the article Gecko SDK. For code outside the tree Note: On Windows if you download the Gecko SDK without the whole build tree, you will be missing some required DLLs for xpidl.exe and it will run with no errors but not do anything. To fix this download the Mozilla build tools for Windows and copy the DLLs ...
... the Gecko SDK by reading the article Gecko SDK. For code outside the tree Note: On Windows if you download the Gecko SDK without the whole build tree, you will be missing some required DLLs for xpidl.exe and it will run with no errors but not do anything. To fix this download the Mozilla build tools for Windows and copy the DLLs from windows\bin\x86 within the zip into the bin directory of the Gecko SDK. Note: The Mac version of the SDK provided for download is PowerPC-only. If you need an Intel version, you'll need to compile it yourself as described on that page. Execute this command to compile the typelib. Here, {sdk_dir} is the directory in which you unpacked the Gecko SDK. {sdk_dir}/bin/xpidl -m typelib -w -v -I {sdk_dir}/idl -e HelloWorld.xpt HelloWorld.idl Note: On Windows you mu...
...file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
...ory" in XPCOMUtils) var NSGetFactory = XPCOMUtils.generateNSGetFactory(components); // Firefox 4.0 and higher else var NSGetModule = XPCOMUtils.generateNSGetModule(components); // Firefox 3.x Note: Starting with Firefox 4.0 you will need to declare your component in chrome.manifest; classDescription and contractID properties on the other hand are no longer required. See XPCOM changes in Gecko 2.0 for more details. Installation For extensions: Copy HelloWorld.js, and HelloWorld.xpt (only if you defined and compiled the IDL) to {extensiondir}/components/. Delete compreg.dat and xpti.dat from your profile directory. Restart application. For Firefox: Copy HelloWorld.js, and HelloWorld.xpt (only if you defined and compiled the IDL) to the {objdir}/dist/bin/components directory,...
An Overview of XPCOM
opment, it also provides much of the functionality that a development platform provides, such as: component management file abstraction object message passing memory management We will discuss the above items in detail in the coming chapters, but for now, it can be useful to think of XPCOM as a platform for component development, in which features such as those listed above are provided. ...
... We will discuss the above items in detail in the coming chapters, but for now, it can be useful to think of XPCOM as a platform for component development, in which features such as those listed above are provided. Gecko Although it is in some ways structurally similar to Microsoft COM, XPCOM is designed to be used principally at the application level. The most important use of XPCOM is within Gecko, an open source, standards compliant, embeddable web browser and toolkit for creating web browsers and other applications. ...
...ich features such as those listed above are provided. Gecko Although it is in some ways structurally similar to Microsoft COM, XPCOM is designed to be used principally at the application level. The most important use of XPCOM is within Gecko, an open source, standards compliant, embeddable web browser and toolkit for creating web browsers and other applications. XPCOM is the means of accessing Gecko library functionality and embedding or extending Gecko. This book focuses on the latter - extending Gecko - but the fundamental ideas in the book will be important to developers embedding Gecko as well. Gecko is used in many internet applications, mostly browsers and most notably Mozilla Firefox. Components XPCOM allows you to break up large software projects into smaller pieces known as compo...
...hat shouldn't be apart. For example, one author's son will not eat a peanut-butter sandwich if there isn't jam on it, because in his world, peanut butter and jam form an indelible union. Some software is the same. In areas of code that are tightly-coupled--in classes that are only used internally, for example--the expensive work to divide things may not be worth the effort. The HTTP component in Gecko doesn't expose private classes it uses as separate components. The "stuff" that's internal to the component stays internal, and isn't exposed to XPCOM. In the haste of early Mozilla development, components were created where they were inappropriate, but there's been an ongoing effort to remove XPCOM from places like this. Interfaces How do you decide when to break apart your code? The basic ide...
Using XPCOM Utilities to Make Things Easier
To begin with, the first section describesC++ macros that can replace a lot of the code in webLock1.cpp. ...
...D (CID) the contract ID (an optional but recommended argument) a constructor for the given object static const nsModuleComponentInfo components[] = { { "Pretty Class Name", CID, CONTRACT_ID, Constructor }, // ... }; The important thing to note in the fictitious listing above is that it can support multiple components in a module. Modules such as the networking libraries in Gecko ("necko") have over 50 components declared in a single nsModuleComponentInfo array like this. The first entry of the nsModuleComponentInfo above is the name of the component. Though it isn't used that much internally at the present time, this name should be something that meaningfully describes the module. The second entry of the nsModuleComponentInfo is the CID. The usual practice is to put th...
... webLock1.cpp using the macros described in this chapter: weblock2.cpp #include "nsIGenericFactory.h" #include "nsISupportsUtils.h" #define SAMPLE_CID \ { 0x777f7150, 0x4a2b, 0x4301, \ { 0xad, 0x10, 0x5e, 0xab, 0x25, 0xb3, 0x22, 0xaa}} class Sample: public nsISupports { public: Sample(); virtual ~Sample(); NS_DECL_ISUPPORTS }; Sample::Sample() { // note: in newer versions of Gecko (1.3 or later) // you don't have to do this: NS_INIT_ISUPPORTS(); } Sample::~Sample() { } NS_IMPL_ISUPPORTS1(Sample, nsISupports); NS_GENERIC_FACTORY_CONSTRUCTOR(Sample); static const nsModuleComponentInfo components[] = { { "Pretty Class Name", SAMPLE_CID, "@company.com/sample", SampleConstructor } }; NS_IMPL_NSGETMODULE(nsSampleModule, components) String Classes in XP...
...of 6 consecutive bytes, where `X' is at byte offset zero and a null character is at byte offset 5. Other kinds of strings like "wide" strings use two bytes to represent each character, and are often used to deal with Unicode strings. The string classes in XPCOM are not just limited to representing a null terminated sequence of characters, however. They are fairly complex because they support the Gecko layout engine and other subsystems that manage large chunks of data. Additionally, in some versions of Mozilla the string classes support sequences of characters broken up into multiple fragments (fragments which may or may not be null terminated)[nulls-in-strings]. All string classes in XPCOM derive from one of two abstract classes[other-string-classes]: nsAString and nsACString. The former han...
Components.utils
seful XPConnect features. Its interface is defined at js/xpconnect/idl/xpccomponents.idl. The object currently has the following members: EDITORS! please keep this list in sync with the Components object page Methods Method Description cloneInto() Create a structured clone of an object in a different JavaScript context. createArrayIn() Removed in Gecko 31 Returns an array created in specified compartment. createObjectIn() Creates a new object, created in the scope of the specified object's compartment. dispatch() Dispatches a runnable to the current/main thread. If the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets called. ...
...ect's compartment. dispatch() Dispatches a runnable to the current/main thread. If the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets called. evalInSandbox() Runs JavaScript code in a sandbox, usually used to run code with restricted privileges. evalInWindow() Removed in Gecko 34. Evaluate JavaScript code in a less-privileged JavaScript context. exportFunction() Export a JavaScript function from a more-privileged to a less-privileged scope, allowing it to be called in the less-privileged scope. forceGC() Forces a garbage collection cycle. forceCC() Forces a cycle collection cycle. forceShrinkingGC() For...
...d aren't cross-compartment wrappers. May only be called from JavaScript code. nondeterministicGetWeakMapKeys() Return the keys in a weak map. This operation is non-deterministic because it is affected by the scheduling of the garbage collector and the cycle collector. This should only be used to write tests of the interaction of the GC and CC with weak maps. ...
...This operation is non-deterministic because it is affected by the scheduling of the garbage collector and the cycle collector. This should only be used to write tests of the interaction of the GC and CC with weak maps. Obsolete since Gecko 45 the function was moved to ThreadSafeChromeUtils nukeSandbox() recomputeWrappers() To be called from JS only. This is for Gecko internal use only, and may disappear at any moment. reportError() Reports a JavaScript Error object to the Error Console. setWantXrays() To be called from JS only. This is for Gecko internal use only, and may disappear at any moment. schedulePreciseGC() Schedules a garbage collection cycle for some time in the future at which no JavaScript code is running. Thi...
imgIEncoder
modules/libpr0n/public/imgIEncoder.idlScriptable Please add a summary to this article. ...
... modules/libpr0n/public/imgIEncoder.idlScriptable Please add a summary to this article. ...
...rits from: nsIAsyncInputStream Last changed in Gecko 1.9 (Firefox 3) Method overview void addImageFrame( [array, size_is(length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 frameFormat, in AString frameOptions); void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile); Obsolete since Gecko 1.9 void endImageEncode(); void initFromData([array, size_is(length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 inputFormat, in AString outputOptions); void startImageEncode(in PRUint32 width, in PRUint32 height, in PRUint32 inputFormat, in AString outputOptions); Constants Possible values for input format (...
... by inputFormat. length Missing Description width Width in pixels. height Height in pixels. stride The number of bytes per row in the image. Normally (width*3) or (width*4), depending on your input format, but some data uses padding at the end of each row, which would be extra. frameFormat Missing Description frameOptions Missing Description encodeClipboardImage() Obsolete since Gecko 1.9 (Firefox 3) void encodeClipboardImage( in nsIClipboardImage aClipboardImage, out nsIFile aImageFile ); Parameters aClipboardImage Missing Description aImageFile Missing Description endImageEncode() void endImageEncode(); Parameters None. initFromData() void initFromData( [array, size_is(length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PR...
mozIStorageConnection
storage/public/mozIStorageConnection.idlScriptable This interface represents a database connection attached to a specific file or an in-memory database. It is the primary interface for interacting with a database, including creating prepared statements, executing SQL, and examining database errors. 1.0 68 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) For a general overview on how to use this interface, see Storage. Method overview void asyncClose([optional] in mozIStorageCompletionCallback aCallback); void beginTransaction(); void beginTransactionAs(in PRInt32 transactionType); mozIStorageStatement clone([optional] in boolean aReadOnly); ...
..., in string aTableSchema); mozIStoragePendingStatement executeAsync([array, size_is(aNumStatements)] in mozIStorageBaseStatement aStatements, in unsigned long aNumStatements, [optional] in mozIStorageStatementCallback aCallback ); void executeSimpleSQL(in AUTF8String aSQLStatement); boolean indexExists(in AUTF8String aIndexName); void preload(); Obsolete since Gecko 1.9 void removeFunction(in AUTF8String aFunctionName); mozIStorageProgressHandler removeProgressHandler(); void rollbackTransaction(); void setGrowthIncrement(in PRInt32 aIncrement, in AUTF8String aDatabaseName); mozIStorageProgressHandler setProgressHandler(in PRInt32 aGranularity, in mozIStorageProgressHandler aHandler); boolean tableExi...
...et individually. mozIStoragePendingStatement executeAsync( [array, size_is(aNumStatements)] in mozIStorageBaseStatement aStatements, in unsigned long aNumStatements, in mozIStorageStatementCallback aCallback Optional ); Parameters aStatements The array of statements to execute asynchronously. They will be executed sequentially, in the order in which they appear in the array. Prior to Gecko 2.0 this was type mozIStorageStatement. aNumStatements The number of statements in aStatements. aCallback Optional A mozIStorageStatementCallback object to receive progress, error, and completion notifications. Return value A mozIStoragePendingStatement object that can be used to cancel the statements' execution. executeSimpleSQL() Executes an SQL expression that has no bound parameters.
...executeSimpleSQL( in AUTF8String aSQLStatement ); Parameters aSQLStatement The SQL statement to execute. indexExists() This method determines whether or not the given index exists. boolean indexExists( in AUTF8String aIndexName ); Parameters aIndexName The index to check. Return value true if the index exists, false otherwise. preload() Obsolete since Gecko 1.9 (Firefox 3) This is used to preload the database cache. It loads pages from the start of the database file until the memory cache (specified by "PRAGMA cache_size=") is full or the entire file is read. The cache MUST be active on the database for this to work. This means that you must have a transaction open on the connection, or have a transaction open on another connection that s...
mozIStorageStatement
storage/public/mozIStorageStatement.idlScriptable This interface lets you create and execute SQL statements on a mozIStorageConnection. Inherits from: mozIStorageValueArray Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) For an introduction on how to use this interface, see the Storage overview document. ...
...lets you create and execute SQL statements on a mozIStorageConnection. Inherits from: mozIStorageValueArray Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) For an introduction on how to use this interface, see the Storage overview document. ...
.... Statement status constants Constant Value Description MOZ_STORAGE_STATEMENT_INVALID 0 The SQL statement is Invalid. MOZ_STORAGE_STATEMENT_READY 1 The SQL statement is ready to be executed. MOZ_STORAGE_STATEMENT_EXECUTING 2 The SQL statement is executing at the moment. Methods initialize() Obsolete since Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: This method has been removed for Gecko 1.9.1. To initialize a statement, consumers should call mozIStorageConnection.createStatement(). This method exists back to Gecko 1.8.0. Initialize this query with the given SQL statement. void initialize( in mozIStorageConnection aDBConnection, in AUTF8String aSQLStatement ); Para...
...ngParamsArray() Creates and returns a new mozIStorageBindingParamsArray object that can be used to bind multiple values to parameters in preparation for calling executeAsync(). mozIStorageBindingParamsArray newBindingParamsArray(); Parameters None. bindParameters() Binds all the parameters in the specified array to the statement in preparation for calling executeAsync(). Note: Starting in Gecko 2.0, this method returns NS_ERROR_UNEXPECTED if the specified mozIStorageBindingParamsArray is empty. void bindParameters( in mozIStorageBindingParamsArray aParameters ); Parameters aParameters The mozIStorageBindingParamsArray object containing one or more mozIStorageBindingParams objects with the parameters to be bound to the statement prior to execution. bindUTF8StringParameter() B...
nsIAccessibleEvent
accessible/public/nsIAccessibleEvent.idlScriptable An interface for accessibility events listened to by in-process accessibility clients, which can be used to find out how to get accessibility and DOM interfaces for the event and its target. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Attributes Attribute Type Description accessible nsIAccessible The nsIAccessible associated with the event. May return null if no accessible is available. Read only. accessibleDocument nsIAccessibleDocument The nsIAccessibleDocument that the event target nsIAccessible resides in. This can be used to get the DOM window, the DOM document and the window handler, among other things. Read only. DOMNode nsIDOMNode The nsIDOMNode associated wi...
...de associated with the event. May return null if accessible for event has been shut down. Read only. eventType unsigned long The type of event, based on the enumerated event values defined in this interface. Read only. isFromUserInput boolean Returns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement. Constants Constant Gecko version Description 1.7 - 1.8.1 1.9 - 1.9.2 2.0 EVENT_SHOW 0x8002 0x0001 An object has been created. EVENT_HIDE 0x8003 0x0002 An object has been destroyed. EVENT_REORDER 0x8004 0x005C 0x0003 An object's children have changed. EVENT_ACTIVE_DECENDENT_CHANGED 0x0007 0x0004 The active descendant of a component has changed. The active descendant is used in objects with transient childr...
...ertext object to another, or focus moved from a non-hypertext object to a hypertext object, or focus moved from a hypertext object to a non-hypertext object. EVENT_HYPERTEXT_NLINKS_CHANGED 0x0058 0x0054 The number of hyperlinks associated with a hypertext object changed. EVENT_OBJECT_ATTRIBUTE_CHANGED 0x0059 0x0055 An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED. Gecko 1.9.2 note This event is never sent in versions of Gecko prior to 1.9.2, even though the constant existed. EVENT_PAGE_CHANGED 0x005A 0x0056 A slide changed in a presentation document or a page boundary was crossed in a word processing document. EVENT_LAST_ENTRY 0x005D 0x0057 Help make sure event map does not get out-of-line. EVENT_CREATE 0x8000 EVENT_DESTROY 0x8001 EVENT_...
...nous. EVENT_ASYNCH_HIDE 0x0005 An object is hidden -- this is a layout occurrence and is thus asynchronous. EVENT_ASYNCH_SIGNIFICANT_CHANGE 0x0006 An object had a significant layout change which could affect the type of accessible object -- this is a layout occurrence and is thus asynchronous. EVENT_DOCUMENT_LOAD_START 0x002A EVENT_INTERNAL_LOAD 0x005B Used internally in Gecko. Example To listen to in-process accessibility invents, make your object an nsIObserver, and listen for accessible-event by using code something like this: nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv); if (NS_SUCCEEDED(rv)) { rv = observerService->AddObserver(this, "accessible-event", PR_TRUE); } ...
nsIAccessibleText
accessible/public/nsIAccessibleText.idlScriptable Please add a summary to this article. ...
... accessible/public/nsIAccessibleText.idlScriptable Please add a summary to this article. ...
... Will be treated as the caret position. Text Boundary Constants Constant Value Description BOUNDARY_CHAR 0 BOUNDARY_WORD_START 1 BOUNDARY_WORD_END 2 BOUNDARY_SENTENCE_START 3 Do not use in new code. BOUNDARY_SENTENCE_END 4 Do not use in new code. BOUNDARY_LINE_START 5 BOUNDARY_LINE_END 6 BOUNDARY_ATTRIBUTE_RANGE 7 Coordinate Type Constants Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Constant Value Description COORD_TYPE_SCREEN 0 COORD_TYPE_WINDOW 1 Methods addSelection() void addSelection( in long startOffset, in long endOffset ); Parameters startOffset endOffset getAttribute...
... obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Constant Value Description COORD_TYPE_SCREEN 0 COORD_TYPE_WINDOW 1 Methods addSelection() void addSelection( in long startOffset, in long endOffset ); Parameters startOffset endOffset getAttributeRange() Obsolete since Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Get the accessible and start/end offsets around the given offset. This accessible get return the DOM node and layout frame with the uniform attributes for this range of text. nsIAccessible getAttributeRange( in long offset, out long rangeStartOffset, out long rangeEndOffset ); Parameters offset rangeStartOffset rangeEndOffse...
nsIBidiKeyboard
yboard.idlScriptable This interface lets the application detect bidirectional writer users, and do some magic for them. A user is a bidirectional writer if they have keyboard layouts in both left-to-right and right-to-left directions (that is users who use Arabic, Iranian (Persian), or Israel (Hebrew) keyboard layout, beside an US (English) layout.) Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Method overview boolean isLangRTL(); void setLangFromBidiLevel(in PRUint8 aLevel); Attributes Attribute Type Description haveBidiKeyboards boolean Indicates whether or not the system has at least one keyboard for each direction (left-to-right and right-to-left) installed. Read only. ...
...m has at least one keyboard for each direction (left-to-right and right-to-left) installed. Read only. Note: This throws NS_ERROR_NOT_IMPLEMENTED if the widget layer doesn't provide this information. Currently, this is only implemented on Windows. Methods isLangRTL() Determines if the current keyboard language is right-to-left. (supported on: win32, mac, gtk2) Note: Prior to Gecko 1.9 this method used a parameter 'out PRBool aIsRTL' to return the value. boolean isLangRTL(); Parameters None. Return value true if the current keyboard is right-to-left, false if it is not. Exceptions thrown NS_ERROR_FAILURE If no right-to-left keyboards are installed. setLangFromBidiLevel() Sets the keyboard language to left-to-right or right-to-left. (supported on: win32) void setL...
... in PRUint8 aLevel ); Parameters aLevel If odd set the keyboard to right-to-left, if even set left-to-right. Exceptions thrown NS_ERROR_FAILURE If no right-to-left keyboards are installed. Remarks Implementation Windows This implementation uses win32 API to get the language of the keyboard layout, and the direction of those languages. Linux This implementation depends on the Gecko and GTK+ version. In the Gecko 1.8 branch, just isLangRTL() had been implemented, and uses GDK's API to check the direction of keyboard layout, which has a problem with Hebrew language. The problem is fixed on GTK+ version 2.10.1 and 2.12. In the Gecko 1.9 branch, we are going to implement all the interface, with XKB functions for xlib and gtk2 backends. On the gtk2 backend, we will have GTK+ ver...
...guage. The problem is fixed on GTK+ version 2.10.1 and 2.12. In the Gecko 1.9 branch, we are going to implement all the interface, with XKB functions for xlib and gtk2 backends. On the gtk2 backend, we will have GTK+ version checking, to use GTK+ implementations, if the problem doesn't exist. Some other part of the code is going to be on GTK+ later, and we will use GTK+ API instead. Both GTK+ and Gecko versions, check keysym's on keyboard layout to detect the direction of the layout. For GTK+ (>=2.10.1, >=2.12.0) and all Gecko versions, we check only the first shift-level of the layout, to fix the problem with Hebrew layouts. More info: bug 348724, bug 348724, and Gnome bug: 116626 Mac Only isLangRTL is supported on this platform. bug 266551 See also Documentation for BiDi Mozilla ...
nsIBlocklistService
xpcom/system/nsIBlocklistService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIBlocklistService.idlScriptable Please add a summary to this article. ...
... application is used. toolkitVersion Optional The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used. Return value The blocklist state of the plugin, one of the Constants. isAddonBlocklisted() Determine if an item is blocklisted. ...
...The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used. Return value The blocklist state of the plugin, one of the Constants. isAddonBlocklisted() Determine if an item is blocklisted. boolean isAddonBlocklisted( in jsval addon, in AString appVersion, Optional from Gecko 1.9.1 in AString toolkitVersion Optional from Gecko 1.9.1 ); Parameters addon The addon object to be checked. appVersion Optional from Gecko 1.9.1 The version of the application we are checking in the blocklist. If this parameter is null, the version of the running application is used. toolkitVersion Optional from Gecko 1.9.1 The version of the toolkit we are checking in the blocklist. If this parameter is null, the versi...
nsICacheService
netwerk/cache/public/nsICacheService.idlScriptable Handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client IDs operations for offline caching. 66 Introduced Gecko 1.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface is no longer supported and planned to be removed soon: use nsICacheStorageService instead. At the time of writing there is no documentation for nsICacheStorageService but comments are available in the source. Note: Starting in Gecko 2.0, cache I/O is handled asynchronously. Method overview nsICacheSession createSession(in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); ...
...is no documentation for nsICacheStorageService but comments are available in the source. Note: Starting in Gecko 2.0, cache I/O is handled asynchronously. Method overview nsICacheSession createSession(in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); ACString createTemporaryClientID(in nsCacheStoragePolicy storagePolicy); Obsolete since Gecko 1.9.2 void evictEntries(in nsCacheStoragePolicy storagePolicy); void init(); Obsolete since Gecko 1.8 void shutdown(); Obsolete since Gecko 1.8 void visitEntries(in nsICacheVisitor visitor); Attributes Attribute Type Description cacheIOTarget nsIEventTarget The event target for cache I/O operation notifications. Read only. ...
...hed when opening entries from the returned session. streamBased Indicates whether or not the data being cached can be represented as a stream. The storagePolicy must be consistent with the value of this field. For example, a non-stream-based cache entry can only have a storage policy of STORE_IN_MEMORY. Return value Returns a new cache session. createTemporaryClientID() Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. This method creates and returns a unique, temporary cache client ID. This is used by the offline cache. The offline cache lets clients accumulate entries in a temporary client and merge them ...
... NS_ERROR_NOT_IMPLEMENTED This method is deprecated. evictEntries() This method evicts all entries in all devices implied by the storage policy. Note: This function may evict some items but will throw if it fails to evict everything. void evictEntries( in nsCacheStoragePolicy storagePolicy ); Parameters storagePolicy The cache storage policy. init() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Initialize the cache service. void init(); Parameters None. Exceptions thrown Missing Exception Missing Description shutdown() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Shutdown() the cache service. void shutdown(); Parameters None. visitEntries() This method vi...
nsIClassInfo
Read only. ...
...t set, then the value of this attribute specifies a ContractID through which this class may be accessed as a service using nsIServiceManager.getServiceByContractID(). Read only. flags PRUint32 Specifies various binary properties of this class. Possible values for this attribute include a bit-wise combination of the constants Read only. implementationLanguage Obsolete since Gecko 40 PRUint32 The language type in which this class is implemented. See nsIProgrammingLanguage.Constants for a list of possible values. Read only. Constants Bitflags for 'flags' attribute. Constant Value Description SINGLETON 1 << 0 The class is a singleton that must be accessed via nsIServiceManager. THREADSAFE 1 << 1 The class may be acc...
...ED 1 << 31 The high order bit is RESERVED for consumers of these flags. No implementor of this interface should ever return flags with this bit set. EAGER_CLASSINFO 1 << 5 This flag is designed for use with nsGenericFactory and can be set in nsModuleComponentInfo::mFlags. It has no meaning when returned from the flags attribute of a nsIClassInfo implementation. Obsolete since Gecko 2.0 Methods getHelperForLanguage() Get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage. For example, if asked for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return an object that can be nsISupports.QueryInterface()'d into the nsIXPCScriptable interface to assist XPConnect in supplying JavaScript specific ...
...rfaces and need not be included. If this method is not supported by an implementation, then it should return 0 for count and null for array. void getInterfaces( out PRUint32 count, [array, size_is(count), retval] out nsIIDPtr array ); Parameters count The length of the resulting array. array The resulting array of nsIIDPtr values. Remarks This interface was finalized (frozen) for Gecko 0.9.6. See bug 99158 for details. From Gecko 2.0 interfaces are no longer frozen. See also Using nsIClassInfo ...
nsIComponentManager
xpcom/components/nsIComponentManager.idlScriptable This interface provides methods to access factory objects and instantiate instances of classes. ...
... xpcom/components/nsIComponentManager.idlScriptable This interface provides methods to access factory objects and instantiate instances of classes. ...
... void removeBootstrappedManifestLocation(in nsILocalFile aLocation); Methods addBootstrappedManifestLocation() Loads a "bootstrapped" chrome.manifest file from the specified directory or XPI file. A "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the Chrome Registration documentation for details. ...
... Methods addBootstrappedManifestLocation() Loads a "bootstrapped" chrome.manifest file from the specified directory or XPI file. A "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the Chrome Registration documentation for details. This method was introduced in Gecko 8 to let bootstrapped add-ons provide content at chrome:// URIs. Until Gecko 10 you had to call this method manually from within the add-on's startup() method (with a matching removeBootstrappedManifestLocation() call in the add-on's shutdown() method). If you're targeting Gecko 10 or higher there should be no need to call this method, since the bootstrapped add-on's chrome.manifest is loaded automatically now. void addBootstrappedManifestLocation( in interface nsILoc...
nsIDNSService
netwerk/dns/nsIDNSService.idlScriptable Provides domain name resolution service. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Implemented by: @mozilla.org/network/dns-service;1. To access the service, use: var dnsService = Components.classes["@mozilla.org/network/dns-service;1"] .createInstance(Components.interfaces.nsIDNSService); Note: Starting in Gecko 7.0, the "happy eyeballs" strategy is used to reduce lengthy timeouts when attempting backup connections during attempts to connect from clients that have broken IPv6 connectivity. This is done by disabling IPv6 on backup connections. Method overview nsICancelable asyncResolve(in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListen...
...d to reduce lengthy timeouts when attempting backup connections during attempts to connect from clients that have broken IPv6 connectivity. This is done by disabling IPv6 on backup connections. Method overview nsICancelable asyncResolve(in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerTarget); void init(); Obsolete since Gecko 1.8 nsIDNSRecord resolve(in AUTF8String aHostName, in unsigned long aFlags); void shutdown(); Obsolete since Gecko 1.8 Attributes Attribute Type Description myHostName AUTF8String Read only. Constants Resolve flag constants Various flags that may be ORed together to form the aFlags parameter passed to asyncResolve() and resolve(). ...
...tenerTarget Optional parameter (may be null). If not null, this parameter specifies the nsIEventTarget of the thread on which the listener's onLookupComplete should be called. If this parameter is null, then onLookupComplete will be called on an unspecified thread (possibly recursively). Return value An object that can be used to cancel the host lookup. init() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Called to initialize the DNS service. void init(); Parameters None. resolve() Called to synchronously resolve a host name. Warning this method may block the calling thread for a long period of time. It is extremely unwise to call this function on the User Interface thread of an application. nsIDNSRecord resolve( in AUTF8String aHostN...
...NSRecord resolve( in AUTF8String aHostName, in unsigned long aFlags ); Parameters aHostName The host name or IP-address-literal to resolve. aFlags A bitwise OR of the Resolve flag constants. Return value DNS record corresponding to the given host name. Exceptions thrown NS_ERROR_UNKNOWN_HOST If host could not be resolved. shutdown() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Called to shutdown the DNS service. Any pending asynchronous requests will be canceled, and the local cache of DNS records will be cleared. Note: The operating system may still have its own cache of DNS records, which would be unaffected by this method. void shutdown(); Parameters None. Example let DnsService = Components.classes["@moz...
nsIDOMStorageItem
Attributes Attribute Type Description secure boolean If true, the item was stored for an HTTPS page. ...
... Attributes Attribute Type Description secure boolean If true, the item was stored for an HTTPS page. ...
... Attributes Attribute Type Description secure boolean If true, the item was stored for an HTTPS page. ...
... Attributes Attribute Type Description secure boolean If true, the item was stored for an HTTPS page. ...
getFile
caller whether or not the returned location is persistent. If true, this lets the Directory Service cache results to improve the performance of directory lookups. If false, then the Directory Service will not cache the results of this method. Symbolic names The list of symbolic names is subject to change, so be sure to take a look at the xpcom/io/nsDirectoryServiceDefs.h file for the version of Gecko you're working with for the latest list. Available on all platforms These symbolic names are available on all platforms (although, of course, they may refer to different physical paths on the storage device). C constant String value Notes NS_OS_HOME_DIR "Home" NS_OS_TEMP_DIR "TmpD" NS_OS_CURRENT_WORKING_DIR "CurWorkD" ...
...'s new Gatekeeper v2 rules; without this change, Firefox would not work on any Mac OS X newer than 10.9.4. NS_GRE_COMPONENT_DIR "GreComsD" Platform-specific locations Some symbolic names represent platform-specific locations. The following sections cover these. Available on both Mac and Unix These locations are available on both Mac OS X and Unix implementations of Gecko. C constant String value Notes NS_OS_SYSTEM_DIR "SysD" Available on Mac OS X only These locations are supported only on Mac OS X versions of Gecko. C constant String value Notes NS_MAC_DESKTOP_DIR NS_OS_DESKTOP_DIR NS_MAC_TRASH_DIR "Trsh" NS_MAC_STARTUP_DIR "Strt" NS_MAC_SHUTDO...
...ER_PREFERENCES_DIR "UsrPrfs" NS_OSX_LOCAL_PREFERENCES_DIR "LocPrfs" NS_OSX_PICTURE_DOCUMENTS_DIR "Pct" NS_OSX_MOVIE_DOCUMENTS_DIR "Mov" NS_OSX_MUSIC_DOCUMENTS_DIR "Music" NS_OSX_INTERNET_SITES_DIR "IntrntSts" Available on Windows only These locations are supported only on Microsoft Windows builds of Gecko. C constant String value Notes NS_WIN_WINDOWS_DIR "WinD" NS_WIN_PROGRAM_FILES_DIR "ProgF" NS_WIN_HOME_DIR NS_OS_HOME_DIR NS_WIN_DESKTOP_DIR "DeskV" virtual folder at the root of the namespace NS_WIN_PROGRAMS_DIR "Progs" User start menu programs directory! NS_WIN_CONTROLS_DIR "Cntls" ...
... "PrntHd" NS_WIN_COOKIES_DIR "CookD" Available on Unix only These locations are supported only on Unix builds of Firefox OS. C constant String value Notes NS_UNIX_LOCAL_DIR "Locl" NS_UNIX_LIB_DIR "LibD" NS_UNIX_HOME_DIR NS_OS_HOME_DIR The following locations are provided only on OS/2 builds of Gecko. Deprecated These locations have been deprecated and should no longer be used. C constant String value Notes NS_OS_DRIVE_DIR "DrvD" ...
nsIDragService
widget/nsIDragService.idlScriptable Implements the Drag Service for handling drag and drop operations. Inherits from: nsISupports Last changed in Gecko 43 (Firefox 43 / Thunderbird 43 / SeaMonkey 2.40) Note: Using this interface directly from add-on code is deprecated. Add-ons should use the standard dataTransfer drag and drop API instead. The only exception is getCurrentSession(), since there's currently no way to check for a drag in progress using standard DOM methods or properties. ...
...Transfer drag and drop API instead. The only exception is getCurrentSession(), since there's currently no way to check for a drag in progress using standard DOM methods or properties. ...
...being dragged. aY The Y coordinate to which to move the popup being dragged. endDragSession() Tells the Drag Service to end a drag session. This is called when an external drag occurs. void endDragSession( in PRBool aDoneDrag ); Parameters aDoneDrag If aDoneDrag is true, the drag has finished, otherwise the drag has just left the window. ...
...g is true, the drag has finished, otherwise the drag has just left the window. fireDragEventAtSource() Obsolete since Gecko 43 (Firefox 43 / Thunderbird 43 / SeaMonkey 2.40)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Fire a drag event at the source of the drag. This was changed in Gecko 43, see the following section. void fireDragEventAtSource( in unsigned long aMsg ); Obsolete since Gecko 43 Parameters aMsg One of the NS_DRAGDROP_* contants which was defined in widget/BasicEvents.h Fire a drag event at the fource of the drag. This is available only from native code since Gecko 43. [noscript] void fireDragEventAtSource( in mozilla::EventMessage aEventMessage ); ...
nsIEditor
<< XPCOM API Reference editor/nsIEditor.idlScriptable Provides methods and attributes used when editing page content. ...
... << XPCOM API Reference editor/nsIEditor.idlScriptable Provides methods and attributes used when editing page content. ...
... are in upper case // application/xhtml+xml format do the same editorAPI.outputToString('text/xml', 2); // the body is not recognized, everything is printed void outputToStream(in nsIOutputStream aStream, in AString formatType, in ACString charsetOverride, in unsigned long flags); Listener Methods void addEditorObserver(in nsIEditorObserver observer);Obsolete since Gecko 18 void setEditorObserver(in EditActionListener observer); void removeEditorObserver(in nsIEditorObserver observer Obsolete since Gecko 18); void addEditActionListener(in nsIEditActionListener listener); void removeEditActionListener(in nsIEditActionListener listener); void addDocumentStateListener(in nsIDocumentStateListener listener); void r...
...on/caret for this editor. In the case of a design mode document, this is the same as the window's selection. selectionController nsISelectionController Read only. The selection controller for the current presentation. Methods Native code only!init Initializes the editor's services. [noscript] void init( in nsIDOMDocument doc, in nsIPresShellPtr shell, Obsolete since Gecko 5 in nsIContent aRoot, in nsISelectionController aSelCon, in unsigned long aFlags ); Parameters doc The document to observe. shell Obsolete since Gecko 5.0 The nsIPresShellPtr representing the presentation shell displaying the document. This parameter was removed in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2). aRoot The root of the editable section of this document; i...
nsIEventTarget
xpcom/threads/nsIEventTarget.idlScriptable A target for events. Events may be sent to this target from any thread by calling the dispatch method. Implement this interface in order to support receiving events from other threads. ...
... xpcom/threads/nsIEventTarget.idlScriptable A target for events. Events may be sent to this target from any thread by calling the dispatch method. Implement this interface in order to support receiving events from other threads. ...
...rder to support receiving events from other threads. 1.0 66 Introduced Gecko 1.6 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void dispatch(in nsIRunnable event, in unsigned long flags); boolean isOnCurrentThread(); void postEvent(in PLEventPtr aEvent); Native code only! Obsolete since Gecko 1.9 Constants Dispatch flags Constant Value Description DISPATCH_NORMAL 0 This flag specifies the default mode of event dispatch, whereby the event is simply queued for later processing. When this flag is specified, dispatch() returns immediately after the event is queued. DISPATCH_SYNC 1 This f...
...ead() Check to see if this event target is associated with the current thread. boolean isOnCurrentThread(); Parameters None. Return value Returns true if events dispatched to this event target will run on the current thread (that is, the thread calling this method). If events dispatched to this target will be processed on another thread, returns false. Native code only!postEvent Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Method for posting an asynchronous event to the event target. If this method succeeds, then the event will be dispatched on the target thread. void postEvent( in PLEventPtr aEvent ); Parameters aEvent The event...
nsIFocusManager
dom/interfaces/base/nsIFocusManager.idlScriptable Please add a summary to this article. ...
... dom/interfaces/base/nsIFocusManager.idlScriptable Please add a summary to this article. ...
.../ SeaMonkey 2.2) Implemented by: @mozilla.org/focus-manager;1 as a service: var focusManager = Components.classes["@mozilla.org/focus-manager;1"] .getService(Components.interfaces.nsIFocusManager); Method overview void clearFocus(in nsIDOMWindow aWindow); void contentRemoved(in nsIDocument aDocument, in nsIContent aElement); Native code only! Obsolete since Gecko 2.0 void fireDelayedEvents(in nsIDocument aDocument); Native code only! void focusPlugin(in nsIContent aPlugin); Native code only! nsIDOMElement getFocusedElementForWindow(in nsIDOMWindow aWindow, in PRBool aDeep, out nsIDOMWindow aFocusedWindow); PRUint32 getLastFocusMethod(in nsIDOMWindow window); void moveCaretToFocus(in nsIDOMWindow aWindow); ...
...over them in caret browsing mode. Methods clearFocus() Clears the focused element within aWindow. If the current focusedWindow is a descendant of aWindow, sets the current focusedWindow to aWindow. void clearFocus( in nsIDOMWindow aWindow ); Parameters aWindow Exceptions thrown NS_ERROR_INVALID_ARG If aWindow is null. Native code only!contentRemoved Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Called when content has been removed. void contentRemoved( in nsIDocument aDocument, in nsIContent aElement ); Parameters aDocument aElement Native code only!fireDelay...
nsIGlobalHistory
void addPage( in string aURL ); Parameters aURL The url to the page. isVisited() Checks to see if the given page is in history. ...
...void addPage( in string aURL ); Parameters aURL The url to the page. isVisited() Checks to see if the given page is in history. ...
...void addPage( in string aURL ); Parameters aURL The url to the page. isVisited() Checks to see if the given page is in history. ...
...void addPage( in string aURL ); Parameters aURL The url to the page. isVisited() Checks to see if the given page is in history. ...
nsIHttpChannel
netwerk/protocol/http/nsIHttpChannel.idlScriptable This interface allows for the modification of HTTP request parameters and the inspection of the resulting HTTP response status and headers when they become available. ...
...d visitOriginalResponseHeaders( in nsIHttpHeaderVisitor aVisitor ); Parameters aVisitor An nsIHttpHeaderVisitor instance allowing to visit all original response headers. visitRequestHeaders() Call this method to visit all request headers. Warning: Calling setRequestHeader(), setReferrerWithPolicy() or setEmptyRequestHeader() while visiting request headers has undefined behavior until Gecko 47 (Firefox 47.0 / Thunderbird 47.0 / SeaMonkey 2.44). Starting from Gecko 48 (Firefox 48.0 / Thunderbird 48.0 / SeaMonkey 2.45) they will return a NS_ERROR_FAILURE. void visitRequestHeaders( in nsIHttpHeaderVisitor aVisitor ); Parameters aVisitor The header visitor instance. visitResponseHeaders() Call this method to visit all response headers. Warning: Calling setResponseHeader()...
... void visitResponseHeaders( in nsIHttpHeaderVisitor aVisitor ); Parameters aVisitor The header visitor instance. ...
...ll return a NS_ERROR_FAILURE. void visitRequestHeaders( in nsIHttpHeaderVisitor aVisitor ); Parameters aVisitor The header visitor instance. visitResponseHeaders() Call this method to visit all response headers. Warning: Calling setResponseHeader() while visiting response headers has undefined behavior until Gecko 48 (Firefox 48.0 / Thunderbird 48.0 / SeaMonkey 2.45). Starting from Gecko 49 (Firefox 49.0 / Thunderbird 49.0 / SeaMonkey 2.46) it will return a NS_ERROR_FAILURE. void visitResponseHeaders( in nsIHttpHeaderVisitor aVisitor ); Parameters aVisitor The header visitor instance. Exceptions thrown NS_ERROR_NOT_AVAILABLE If called before the response has been received (before onStartRequest()). Note: Starting from Firefox 49, empty headers will be returned ...
nsIIdleService
widget/nsIIdleService.idlScriptable The idle service lets you monitor how long the user has been 'idle', that is they have not used their mouse or keyboard. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 16 (Firefox 16 / Thunderbird 16 / SeaMonkey 2.13) You can get the idle time directly, but in most cases you will want to register an observer for a predefined interval. The observer will get an 'idle' notification when the user is idle for that interval (or longer), and receive a 'back' (Gecko 3 to 15) or 'active' (Gecko 16+) notification when the user starts using their computer again. Note: The idle service is for computer-wide idle detection, not just application idle detection. In other words, even if the user is wor...
...unable to poll for idle time manually). Read only. Methods addIdleObserver() Add an observer to be notified when the user idles for some period of time, and when they get back from that. The subject of the notification the observer will get is always the nsIIdleService itself. When the user goes idle, the observer topic is 'idle' and when they get back, the observer topic is 'back' in Gecko 15 and earlier or 'active' in Gecko 16 and later. The data parameter for the notification contains the current user idle time in Gecko 15 and earlier or 0 in Gecko 16 and later. You can add the same observer twice. Most implementations need to poll the OS for idle info themselves, meaning your notifications could arrive with a delay up to the length of the polling interval in that implementatio...
...The data parameter for the notification contains the current user idle time. ...
...The data parameter for the notification contains the current user idle time. void addIdleObserver( in nsIObserver observer, in unsigned long time ); Parameters observer The nsIObserver to be notified. ...
nsIMarkupDocumentViewer
docshell/base/nsIMarkupDocumentViewer.idlScriptable Describes the properties of a content viewer for an HTML or XML markup document. Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Method overview void scrollToNode(in nsIDOMNode node); void sizeToContent(); Attributes Attribute Type Description allowPlugins boolean If true, plugins are allowed within the doc shell. default = true. ...
...r XML markup document. Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Method overview void scrollToNode(in nsIDOMNode node); void sizeToContent(); Attributes Attribute Type Description allowPlugins boolean If true, plugins are allowed within the doc shell. default = true. Obsolete since Gecko 1.8 authorStyleDisabled boolean Disable entire author style level (including HTML presentation hints) bidiCharacterSet octet Whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user. Obsolete since Gecko 6.0 bidiControlsTextMode octet The order of bidirectional text in form controls. 1 -...
... style level (including HTML presentation hints) bidiCharacterSet octet Whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user. Obsolete since Gecko 6.0 bidiControlsTextMode octet The order of bidirectional text in form controls. 1 - logical 2 - visual 3 - like the containing document. Obsolete since Gecko 2.0 bidiNumeral octet The type of numerals to display. 1 - depending on context, default is Arabic numerals 2 - depending on context, default is Hindi numerals 3 - Arabic numerals 4 - Hindi numerals. bidiOptions PRUint32 Use this attribute to access all the Bidi options in one operation. bidiSupport octet Whether to use platform bidi support or Mozilla...
...isual order. defaultCharacterSet ACString forceCharacterSet ACString fullZoom float The amount by which to scale all lengths. Default is 1.0. hintCharacterSet ACString hintCharacterSetSource PRInt32 minFontSize long The minimum font size to allow. Note: This attribute was added late in the Gecko 2.0 development cycle and was implemented by the nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH interface; it was merged into this interface in Gecko 7.0. prevDocCharacterSet ACString textZoom float The amount by which to scale all text. Default is 1.0. Methods scrollToNode() Scroll the make the specified node visible. void scrollToNode( in nsIDOMNode node ...
nsIMicrosummary
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface defines attributes and methods for dealing with microsummaries generated by an nsIMicrosummaryGenerator. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface defines attributes and methods for dealing with microsummaries generated by an nsIMicrosummaryGenerator. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface defines attributes and methods for dealing with microsummaries generated by an nsIMicrosummaryGenerator. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface defines attributes and methods for dealing with microsummaries generated by an nsIMicrosummaryGenerator. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview void addObserver(in nsIMicrosummaryObserver observer); boolean equals(in nsIMicrosummary aOther); void removeObserver(in nsIMicrosummaryObserver observer); void update(); Attributes Attribute Type Description content AString The content of the microsummary. ...
nsIMicrosummaryService
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
... toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
nsIMsgIncomingServer
nsIMsgIncomingServer mailnews/base/public/nsIMsgIncomingServer.idlScriptable ??? Add brief description of Interface ??? ...
...terface ??? ...
...password member variable. Read only. performingBiff boolean port long prettyName AString pretty name - should be "userid on hostname" if the pref is not set. realHostName ACString real hostname of the server (if server name is changed it is stored here) realUsername ACString real username of the server (if username is changed it is stored here) redirectorType string Obsolete since Gecko 1.9 rememberPassword boolean retentionSettings nsIMsgRetentionSettings rootFolder nsIMsgFolder rootMsgFolder nsIMsgFolder Read only. searchScope nsMsgSearchScopeValue Read only. serverBusy boolean serverRequiresPasswordForBiff boolean Read only. serverURI ACString Read only. socketType long spamFilterPlugin nsIMsgFilterPlugin Read only. spamSettings nsISpamSettings ...
...thod creates a filter to do that, and adds it to our filterList if it doesn't exist. If it does, it will enable it. this is not used by news filters (yet). void configureTemporaryFilters( in nsIMsgFilterList filterList ); Parameters filterList Missing Description Exceptions thrown Missing Exception Missing Description configureTemporaryReturnReceiptsFilter() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) If we have set up to filter return receipts into our Sent folder, this utility method creates a filter to do that, and adds it to our filterList if it doesn't exist. If it does, it will enable it. If the user changes their prefs, to leave the return receipt in the inbox, this will disable the existing return receipts filter, if it exist...
nsINavHistoryResultNode
toolkit/components/places/public/nsINavHistoryService.idlScriptable This is the base class for all Places history result nodes, containing the URI, title, and other general information. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Attributes Attribute Type Description accessCount unsigned long Total number of times the URI has been accessed. For hosts, this is the total number of the children under it, rather than the total number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default). Read only. bookmarkIndex long When this item is in a bookmark folder (its p...
...or the page. It is not the actual URI of the favicon, but, rather, is something that will resolve to the actual image. In most cases, this is an annotation URI that will query the favicon service. If the entry doesn't have a favicon, this is the chrome URI of the default favicon. If the favicon originally lived in chrome, this will be the original chrome URI of the icon. Read only. Note: Prior to Gecko 1.9.2, this was an nsIURI. indentLevel long This is the number of levels between this node and the top of the hierarchy. The members of result.children have an indentLevel value of zero, their children have an indentLevel of 1, and so forth. The indent level of the root node is set to -1. Read only. itemId long long If the node is an item (bookmark, folder, or separator), this value is the r...
...nt result node in the result set. The value is null for top level nodes. Read only. parentResult nsINavHistoryResult The history-result to which this node belongs. Read only. propertyBag nsIWritablePropertyBag You can use this to associate temporary information with the result node. This property bag is associated with the result node and is not persisted in any way. Read only. Obsolete since Gecko 2.0 tags AString For uri nodes, this is a sorted list of the tags, delimited with commans, for the uri represented by this node. Otherwise this is an empty string. Read only. time PRTime The time at which the user accessed the page. Read only. For visits, this is the exact time at which the page visit occurred. For URIs, this is the most recent time at which the URI was visited. Even if you a...
...value will be -1. The result implementation treats nodes with this property set to -1 as invisible! View-implementations may use this value to track the node index in the view, for example the tree view uses this value to indicate the row in the tree that this node is at. Other views may choose not to use this, but should inititalize this value to anything but -1 for visible nodes. Obsolete since Gecko 1.9.2 Constants Constant Value Description RESULT_TYPE_URI 0 nsINavHistoryResultNode. RESULT_TYPE_VISIT 1 nsINavHistoryVisitResultNode. RESULT_TYPE_FULL_VISIT 2 nsINavHistoryFullVisitResultNode. RESULT_TYPE_DYNAMIC_CONTAINER 4 nsINavHistoryContainerResultNode. RESULT_TYPE_QUERY 5 nsINavHistoryQueryResultNode. RESULT_TYPE_FOLDER 6 nsINavHistoryQueryResultNode. RESULT_TYPE_SEPAR...
nsIProxyInfo
failoverTimeout unsigned long This attribute specifies the failover timeout in seconds for this proxy. ...
...y. flags unsigned long This attribute specifies flags that modify the proxy type. The value of this attribute is the bit-wise combination of the Proxy Flags defined below. Any undefined bits are reserved for future use. Read only. host AUTF8String This attribute specifies the hostname of the proxy server. Read only. ...
...d only. host AUTF8String This attribute specifies the hostname of the proxy server. Read only. Note: Prior to Gecko 1.8 host was available by the host method. next nsIProxyInfo Proxy info objects may be chained if several proxies could be treated equivalently. This is used to support proxy failover. Read only. Obsolete since Gecko 1.8 port long This attribute specifies the port number of the proxy server. Read only. Note: Prior to Gecko 1.8 port was available by the port method. type ACString This attribute specifies the type of the proxy server as a case insensitive ASCII string. Some special values for this attribute include (but are...
...e (but are not limited to) the following: "http" - HTTP proxy (or SSL CONNECT for HTTPS) "socks" - SOCKS v5 proxy "socks4" - SOCKS v4 proxy "direct" - no proxy "unknown" - unknown proxy (see nsIProtocolProxyService.resolve()) A future version of this interface may define additional types. Read only. Note: Prior to Gecko 1.8 type was available by the type method. Constants The following "Proxy Flags" may be bit-wise combined to construct the flags attribute defined on this interface. All unspecified bits are reserved for future use. Constant Value Description TRANSPARENT_PROXY_RESOLVES_HOST 1 << 0 This flag is set if the proxy is to perform na...
nsISHEntry
docshell/shistory/public/nsISHEntry.idlScriptable Each document or subframe in Session History will have a nsISHEntry associated with it which will hold all information required to recreate the document from history. Inherits from: nsIHistoryEntry Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Implemented by: @mozilla.org/browser/session-history-entry;1. To create an instance, use: var shentry = Components.classes["@mozilla.org/browser/session-history-entry;1"] .createInstance(Components.interfaces.nsISHEntry); Method overview void addChildShell(in nsIDocShellTreeItem shell); nsIDocShellTreeItem childShellAt(in long index); void clearChildShells(); nsISHEntry clone(); void create(in nsIURI URI, in AString title, in...
...o entries attached to the same docshell if and only if the two entries are entries for the same document. In practice, two entries A and B will have the same docIdentifier if we arrived at B by clicking an anchor link in A or if B was created by A's calling history.pushState(). docshellID unsigned long long The history ID of the docshell. document nsIDOMDocument DOM Document. Obsolete since Gecko 1.8 expirationStatus boolean Indicates whether the page is already expired in cache. ID unsigned long An ID to help identify this entry from others during subframe navigation. layoutHistoryState nsILayoutHistoryState LayoutHistoryState for scroll position and form values. loadType unsigned long The loadType for this entry. This is typically loadHistory except when reload is pressed, it ha...
...eIdentifier unsigned long An integer that should be the same for two entries attached to the same docshell only if the two entries are entries for the same page in the sense that one could go from the state represented by one to the state represented by the other simply by scrolling (so the entries are separated by an anchor traversal or a subframe navigation in some other frame). Obsolete since Gecko 6.0 parent nsISHEntry Parent of this entry. postData nsIInputStream Post Data for the document. referrerURI nsIURI Referrer URI. refreshURIList nsISupportsArray Saved refresh URI list for the content viewer. saveLayoutStateFlag boolean Indicate whether layoutHistoryState should be saved. stateData nsIStructuredCloneContainer Get/set data associated with this history state via a pushS...
...nsIInputStream Post Data for the document. referrerURI nsIURI Referrer URI. refreshURIList nsISupportsArray Saved refresh URI list for the content viewer. saveLayoutStateFlag boolean Indicate whether layoutHistoryState should be saved. stateData nsIStructuredCloneContainer Get/set data associated with this history state via a pushState() call, serialized using structured clone. (Prior to Gecko 6.0 returned a JSON encoded string.) sticky boolean Whether the content viewer is marked "sticky" windowState nsISupports Saved state of the global window object. Methods addChildShell() Saved child docshells corresponding to contentViewer. The child shells are restored as children of the parent docshell, in this order, when the parent docshell restores a saved presentation. Append a ch...
nsISelectionController
content/base/public/nsISelectionController.idlScriptable Please add a summary to this article. ...
... void wordMove(in boolean forward, in boolean extend); Attributes Attribute Type Description caretVisible boolean This is true if the caret is enabled, visible, and currently b...
...in boolean forward, in boolean extend); Attributes Attribute Type Description caretVisible boolean This is true if the caret is enabled, visible, and currently blinking. This is still true when the caret is enabled, visible, but in its "off" blink cycle. Read only. ...
...etVisibilityDuringSelection() Show the caret even in selections. By default the caret is hidden unless the selection is collapsed. Use this function to show the caret even in selections. void setCaretVisibilityDuringSelection( in boolean visibility ); Parameters visibility PR_TRUE to show the caret in selections. PR_FALSE to hide. setCaretWidth() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Set the carets width. Can be called any time. void setCaretWidth( in short pixels ); Parameters pixels The width to set the caret to in pixels. setDisplaySelection() Will set the display mode for the selection. void setDisplaySelection( in short toggle ); Parameters toggle OFF, ON, DISABLED. Native ...
nsISocketTransportService
netwerk/base/public/nsISocketTransportService.idlScriptable This interface provides a mapping between a socket type and its associated socket provider instance. One could also use the service manager directly. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/network/socket-transport-service;1. To create an instance, use: var socketTransportService = Components.classes["@mozilla.org/network/socket-transport-service;1"] .getService(Components.interfaces.nsISocketTransportService); Method overview void attachSocket(in PRFileDescPtr aFd, in nsASocketHandlerPtr aHandler); Native code only! nsISocketTransport createTransport(in Array<ACString> aSocketTypes, in AUTF8String aHost, in long aPort,...
...vice;1"] .getService(Components.interfaces.nsISocketTransportService); Method overview void attachSocket(in PRFileDescPtr aFd, in nsASocketHandlerPtr aHandler); Native code only! nsISocketTransport createTransport(in Array<ACString> aSocketTypes, in AUTF8String aHost, in long aPort, in nsIProxyInfo aProxyInfo); void init(); Obsolete since Gecko 1.8 void notifyWhenCanAttachSocket(in nsIRunnable aEvent); Native code only! void shutdown(); Obsolete since Gecko 1.8 Attributes Attribute Type Description autodialEnabled boolean controls whether or not the socket transport service should poke the autodialer on connection failure. Obsolete since Gecko 1.8 Methods Native code only! ...
...is socket. aProxyInfo Specifies the transport-layer proxy type to use. Set to null if no proxy should be used. For more details on communicating information about proxies like SOCKS (which are transparent to upper protocols), see nsIProxiedProtocolHandler , nsIProtocolProxyService or Proxies in Necko. Return value An nsISocketTransport containing the SocketTransport. init() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) void init(); Parameters None. Native code only! notifyWhenCanAttachSocket If the number of sockets reaches the limit, then consumers can be notified when the number of sockets becomes less than the limit. The notification is asynchronous, delivered via the given nsIRunnable instance on the socket transport thread. Note: This function ma...
...han the limit. The notification is asynchronous, delivered via the given nsIRunnable instance on the socket transport thread. Note: This function may only be called from an event dispatch on the socket thread. void notifyWhenCanAttachSocket( in nsIRunnable aEvent ); Parameters aEvent Event that will receive the notification when a new socket can be attached. shutdown() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) void shutdown(); Parameters None. Example // at first, we need a nsISocketTransportService .... var transportService = Components.classes["@mozilla.org/network/socket-transport-service;1"] .getService(Components.interfaces.nsISocketTransportService); // ... then it is time to create the transport. It will connect to ... //...
nsITextInputProcessorCallback
This interface has a "function" attribute. Therefore, JS-IME can implement this as a function. ...
...This interface has a "function" attribute. Therefore, JS-IME can implement this as a function. ...
...This interface has a "function" attribute. Therefore, JS-IME can implement this as a function. ...
...cessor;1"]. createInstance(Components.interfaces.nsITextInputProcessor); } if (!this._TIP.beginInputTransaction(window, this._callback)) { return false; } ... }, } Method overview boolean onNotify(in nsITextInputProcessor aTextInputProcessor, in nsITextInputProcessorNotification aNotification); Methods onNotify() This is called when Gecko requests or notifies something to IME. boolean onNotify(in nsITextInputProcessor aTextInputProcessor, in nsITextInputProcessorNotification aNotification); Parameters aTextInputProcessor The instance which receives the notification. If the handler needs to do something with composition, you can use this. aNotification A notification or request. See the document of nsIText...
nsIWindowWatcher
Clients may expect this property to be always current, so to properly integrate this component the application will need to keep it current by setting the property as the active window changes. This component should not keep a (XPCOM) reference to any windows; the implementation will claim no ownership. ...
... specified resource is loaded into its browsing context.">window.open for details. Can be null. List of Feature Options aArguments Extra argument(s) to be attached to the new window as the window.arguments property. An nsISupportsArray will be unwound into multiple arguments (but not recursively!). Can be null, in which case the window.arguments property will not be set on the new window. As of Gecko 1.9 alpha 1, can also be an nsIArray instead. Return value An nsIDOMWindow for the opened window. Example For example, in a XUL application or Mozilla extension, if the window object is unavailable (for example, when opening a window from XPCOM component code), you might want to use this interface for opening a new window: var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;...
...This was fixed in bug 509124. registerNotification() Clients of this service can register themselves to be notified when a window is opened or closed (added to or removed from this service). This method adds an nsIObserver to the list o...
...This was fixed in bug 509124. registerNotification() Clients of this service can register themselves to be notified when a window is opened or closed (added to or removed from this service). This method adds an nsIObserver to the list of objects to ...
Xray vision
The JavaScript code that along with the C++ core, implements the browser itself is called chrome code and runs using system privileges. If chrome-privileged code is compromised, the attacker can take over the user's computer. JavaScript loaded from normal web pages is called content code. ...
...ted and potentially hostile, both to other websites and to the user. As well as these two levels of privilege, chrome code can create sandboxes. The security principal defined for the sandbox determines its privilege level. If an Expanded Principal is used, the sandbox is granted certain privileges over content code and is protected from direct access by content code. The security machinery in Gecko ensures that there's asymmetric access between code at different privilege levels: so for example, content code can't access objects created by chrome code, but chrome code can access objects created by content. However, even the ability to access content objects can be a security risk for chrome code. JavaScript's a highly malleable language. Scripts running in web pages can add extra propert...
...ent gets you the waived version of document. To undo the waiver again, call Components.utils.unwaiveXrays(waivedObject): var unwaived = Components.utils.unwaiveXrays(waivedWindow); unwaived.confirm("Transfer all my money?"); // calls the native implementation Xrays for DOM objects The primary use of Xray vision is for DOM objects: that is, the objects that represent parts of the web page. In Gecko, DOM objects have a dual representation: the canonical representation is in C++, and this is reflected into JavaScript for the benefit of JavaScript code. Any modifications to these objects, such as adding expandos or redefining standard properties, stays in the JavaScript reflection and does not affect the C++ representation. The dual representation enables an elegant implementation of Xrays: t...
...cript Object or Date as well as a string or a primitive the return value of evalInSandbox() and any properties attached to the Sandbox object may be pure JavaScript objects Also, the WebIDL specifications are starting to use JavaScript types such as Date and Promise: since WebIDL definition is the basis of DOM Xrays, not having Xrays for these JavaScript types starts to seem arbitrary. So, in Gecko 31 and 32 we've added Xray support for most JavaScript built-in objects. Like DOM objects, most JavaScript built-in objects have an underlying C++ state that is separate from their JavaScript representation, so the Xray implementation can go straight to the C++ state and guarantee that the object will behave as its specification defines: // chrome code var sandboxScript = 'Date.prototype.getFu...
WebIDL bindings
All WebIDL files should be placed in dom/webidl and added to the list in the moz.build file in that directory. ...
...via Web IDL. The return value is guaranteed to not depend on the state of the JS heap or other JS engine data structures, and is guaranteed to not change unless some function with [Affects=Everything] is executed. DeviceState The return value depends on the state of the device we're running on (e.g., the system clock). The return value is guaranteed to not be affected by any code running inside Gecko itself, but we might get a new value every time the method or getter is called even if no Gecko code ran between the calls. Nothing The return value is a constant that never changes. This value cannot be used on non-readonly attributes, since having a non-readonly attribute whose value never changes doesn't make sense. Values other than Everything, when used in combination with [Affects=Nothi...
...tribute that, when written, will not have the same-origin constraint tested: it can be written from a context with a different origin. [CrossOriginCallable] Used to flag a method that, when called, will not have the same-origin constraint tested: it can be called from a context with a different origin. [SecureContext] We implement the standard extended attribute with a few details specific to Gecko: System principals are considered secure. An extension poking at non-secured DOM objects will see APIs marked with [SecureContext]. XPConnect sandboxes doesn't see [SecureContext] APIs, but this may change in bug 1273687. [NeedsSubjectPrincipal], [GetterNeedsSubjectPrincipal], [SetterNeedsSubjectPrincipal] Used to flag a method or an attribute that needs to know the subject principal. Thi...
... and addExternalInterface. How to get a JSContext passed to a given method In some rare cases you may need a JSContext* argument to be passed to a C++ method that wouldn't otherwise get such an argument. To see how to achieve this, search for implicitJSContext in dom/bindings/Bindings.conf. Implementing WebIDL using Javascript It is possible to implement WebIDL interfaces in JavaScript within Gecko -- however, this is limited to interfaces that are not exposed in Web Workers. When the binding occurs, two objects are created: Content-exposed object: what gets exposed to the web page. Implementation object: running as a chrome-privileged script. This allows the implementation object to have various APIs that the content-exposed object does not. Because there are two types of objects, yo...
CanvasRenderingContext2D - Web APIs
only CanvasRenderingContext2D.webkitBackingStorePixelRatio The backing store size in relation to the canvas element. See High DPI Canvas. CanvasRenderingContext2D.webkitGetImageDataHD Intended for HD backing stores, but removed from canvas specifications. CanvasRenderingContext2D.webkitPutImageDataHD Intended for HD backing stores, but removed from canvas specifications. Gecko only Prefixed APIs CanvasRenderingContext2D.mozCurrentTransform Sets or gets the current transformation matrix, see CanvasRenderingContext2D.currentTransform. CanvasRenderingContext2D.mozCurrentTransformInverse Sets or gets the current inversed transformation matrix. CanvasRenderingContext2D.mozImageSmoothingEnabled See CanvasRenderingContext2D.imageSmoothingEnabled. CanvasR...
...D.mozCurrentTransform Sets or gets the current transformation matrix, see CanvasRenderingContext2D.currentTransform. CanvasRenderingContext2D.mozCurrentTransformInverse Sets or gets the current inversed transformation matrix. CanvasRenderingContext2D.mozImageSmoothingEnabled See CanvasRenderingContext2D.imageSmoothingEnabled. ...
...rentTransformInverse Sets or gets the current inversed transformation matrix. CanvasRenderingContext2D.mozImageSmoothingEnabled See CanvasRenderingContext2D.imageSmoothingEnabled. CanvasRenderingContext2D.mozTextStyle Introduced in in Gecko 1.9, deprecated in favor of the CanvasRenderingContext2D.font property. CanvasRenderingContext2D.mozDrawText() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. Use CanvasRenderingContext2D.strokeText() or CanvasRenderingContext2D.fillText() instead. CanvasRenderingContext2D.mozMeasureText() This method was introduced in Gecko 1.9 and is unimplemented starting with Gecko 7.0. Use CanvasRenderingContext2D.measureText() instead. CanvasRenderingContext2D.mozPathText() This method was introduced in Geck...
...ecko 7.0. Use CanvasRenderingContext2D.strokeText() or CanvasRenderingContext2D.fillText() instead. CanvasRenderingContext2D.mozMeasureText() This method was introduced in Gecko 1.9 and is unimplemented starting with Gecko 7.0. Use CanvasRenderingContext2D.measureText() instead. CanvasRenderingContext2D.mozPathText() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. CanvasRenderingContext2D.mozTextAlongPath() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. Internal APIs (chrome-context only) CanvasRenderingContext2D.drawWindow() Renders a region of a window into the canvas. The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. CanvasRenderingContext2D.demote() This...
Console.group() - Web APIs
Web › API › Console › group
Creates a new inline group in the Web Console log. This indents following console messages by an additional level, until console.groupEnd() is called. Note: This feature is available in Web Workers. Syntax console.group([label]); Parameters label Label for the group. Optional. (Chrome 59 tested) Does not work with console.groupEnd(). ...
...See bug 1088360. To exit the current group, call console.groupEnd(). ...
...See bug 1088360. To exit the current group, call console.groupEnd(). ...
...See bug 1088360. To exit the current group, call console.groupEnd(). ...
Document - Web APIs
Web › API › Document
hyperlinks in the document. Document.rootElement Like Document.documentElement, but only for <svg> root elements. Use this property instead. Document.vlinkColor Gets/sets the color of visited hyperlinks. Document.width Returns the width of the current document. Document.xmlEncoding Returns the encoding as determined by the XML declaration. Document.xmlStandalone Obsolete since Gecko 10 Returns true if the XML declaration specifies the document to be standalone (e.g., An external part of the DTD affects the document's content), else false. Document.xmlVersion Obsolete since Gecko 10 Returns the version number as specified in the XML declaration or "1.0" if the declaration is absent. Methods This interface also inherits from the Node and EventTarget interfaces. Docume...
...places entities, normalizes text nodes, etc. Document.releaseCapture() Releases the current mouse capture if it's on an element in this document. Document.releaseEvents() See Window.releaseEvents(). Document.requestStorageAccess() Returns a Promise that resolves if the access to first-party storage was granted, and rejects if access was denied. Document.routeEvent() Obsolete since Gecko 24 See Window.routeEvent(). Document.mozSetImageElement() Allows you to change the element being used as the background image for a specified element ID. The Document interface is extended with the ParentNode interface: document.getElementById(String id) Returns an object reference to the identified element. Document.querySelector() Returns the first Element node within the document,...
...ect representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect privileges). Document.popupNode Returns the node upon which a popup was invoked. Document.tooltipNode Returns the node which is the target of the current tooltip. Mozilla also define some non-standard methods: Document.execCommandShowHelp()Obsolete since Gecko 14 This method never did anything and always threw an exception, so it was removed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11). Document.getBoxObjectFor() Use the Element.getBoundingClientRect() method instead. Document.loadOverlay()Obsolete since Gecko 61 Loads a XUL overlay dynamically. This only works in XUL documents. Document.queryCommandText()Obsolete since Geck...
... Internet Explorer notes Microsoft defines some non-standard properties: Document.fileSize* Returns size in bytes of the document. Starting with Internet Explorer 11, that property is no longer supported. See MSDN. ...
KeyboardEvent: code values - Web APIs
yer" ("MediaSelect" prior to Firefox 49) "" 0xE06E ~ 0xE0F0 "Unidentified" "" 0xE0F1 (Hanja key with Korean keyboard layout) "Lang2" "" 0xE0F2 (Han/Yeong key with Korean keyboard layout) "Lang1" "" Code values on Mac On Mac OS X, it's hard to get scancode or something which can distinguish a physical key from a key event. ...
...dentified" "" 0xE0F1 (Hanja key with Korean keyboard layout) "Lang2" "" 0xE0F2 (Han/Yeong key with Korean keyboard layout) "Lang1" "" Code values on Mac On Mac OS X, it's hard to get scancode or something which can distinguish a physical key from a key event. Therefore, Gecko always maps code value from the virtual keycode. ...
...wRight" kVK_DownArrow (0x7D) "ArrowDown" "ArrowDown" kVK_UpArrow (0x7E) "ArrowUp" "ArrowUp" Code values on Linux (X11) (When scancode is available) Note that X has too many keys and some of them are not testable with usual keyboard. So, following table is created from source code which maps from scancode to code value. ...
... "F18" "" 0x00C5 "F19" "" 0x00C6 "F20" "" 0x00C7 "F21" "" 0x00C8 "F22" "" 0x00C9 "F23" "" 0x00CA "F24" "" 0x00CB ~ 0x00E0 "Unidentified" "" 0x00E1 "BrowserSearch" "" Code values on Android and Firefox OS (When scancode is available) scancode Gecko 0x0001 "Escape" 0x0002 "Digit1" 0x0003 "Digit2" 0x0004 "Digit3" 0x0005 "Digit4" 0x0006 "Digit5" 0x0007 "Digit6" 0x0008 "Digit7" 0x0009 "Digit8" 0x000A "Digit9" 0x000B "Digit0" 0x000C "Minus" 0x000D "Equal" 0x000E "Backspace" ...
KeyboardEvent.location - Web APIs
was the right-hand version of the key; for example, the right-hand Control key is pressed on a standard 101 key US keyboard. This value is only used for keys that have more than one possible location on the keyboard. DOM_KEY_LOCATION_NUMPAD 3 The key was on the numeric keypad, or has a virtual key code that corresponds to the numeric keypad. Note: When NumLock is locked, Gecko always returns DOM_KEY_LOCATION_NUMPAD for the keys on the numeric pad. Otherwise, when NumLock is unlocked and the keyboard actually has a numeric keypad, Gecko always returns DOM_KEY_LOCATION_NUMPAD too. On the other hand, if the keyboard doesn't have a keypad, such as on a notebook computer, some keys become Numpad only when NumLock is locked. When such keys fires key events, the location attr...
...ko always returns DOM_KEY_LOCATION_NUMPAD too. On the other hand, if the keyboard doesn't have a keypad, such as on a notebook computer, some keys become Numpad only when NumLock is locked. When such keys fires key events, the location attribute value depends on the key. That is, it must not be DOM_KEY_LOCATION_NUMPAD. ...
...doesn't have a keypad, such as on a notebook computer, some keys become Numpad only when NumLock is locked. When such keys fires key events, the location attribute value depends on the key. That is, it must not be DOM_KEY_LOCATION_NUMPAD. Note: NumLock key's key events indicate DOM_KEY_LOCATION_STANDARD both on Gecko and Internet Explorer. DOM_KEY_LOCATION_MOBILE Obsolete since Gecko 38 4 The key was on a mobile device; this can be on either a physical keypad or a virtual keyboard. Note: Gecko always returns DOM_KEY_LOCATION_MOBILE on Android (Prior to 18) and Maemo. However, at Gecko 38, this is dropped. DOM_KEY_LOCATION_JOYSTICK Obsolete since Gecko 38 5 The key was a button on a game controller or a joystick on a mobile device. ...
...4 The key was on a mobile device; this can be on either a physical keypad or a virtual keyboard. Note: Gecko always returns DOM_KEY_LOCATION_MOBILE on Android (Prior to 18) and Maemo. However, at Gecko 38, this is dropped. DOM_KEY_LOCATION_JOYSTICK Obsolete since Gecko 38 5 The key was a button on a game controller or a joystick on a mobile device. Note: Gecko never fires trusted key events with DOM_KEY_LOCATION_JOYSTICK except on Android. Starting 18, native key events on Android may have this value. However, at Gecko 38, this is dropped. Syntax var location = event.location; Example function keyEvent(event) { console.log("Location of key pressed: " + event.location); } Specifications Specification Status Comment ...
Navigator - Web APIs
Web › API › Navigator
n be used to query and update permission status of APIs covered by the Permissions API. NavigatorID.platform Read only Returns a string representing the platform of the browser. Do not rely on this function to return a significant value. NavigatorPlugins.plugins Read only Returns a PluginArray listing the plugins installed in the browser. NavigatorID.product Read only Always returns 'Gecko', on any browser. This property is kept only for compatibility purpose. Navigator.serviceWorker Read only Returns a ServiceWorkerContainer object, which provides access to registration, removal, upgrade, and communication with the ServiceWorker objects for the associated document. NavigatorStorage.storage Read only Returns the singleton StorageManager object used for managing persistence pe...
...nd user agent (MediaDevices.getSupportedConstraints()), and to request access to media using MediaDevices.getUserMedia(). Navigator.mediaSession Returns MediaSession object which can be used to provide metadata that can be used by the browser to present information about the currently-playing media to the user, such as in a global media controls UI. Navigator.mozNotification Deprecated since Gecko 22 ... Navigator.wakeLock Read only Returns a WakeLock interface you can use to request screen wake locks and prevent screen from dimming, turning off, or showing a screen saver. Navigator.webkitNotification Returns a notification object you can use to deliver notifications to the user from your web application. Navigator.oscpu Returns a string that represents the current operating...
...NavigatorID, NavigatorContentUtils, NavigatorUserMedia, and NavigatorStorageUtils. Standard Navigator.canShare() Returns true if a call to Navigator.share() would succeed. Navigator.getUserMedia() After having prompted the user for permission, returns the audio or video stream associated to a camera or microphone on the local computer. Navigator.registerContentHandler() Obsolete since Gecko 59 Allows web sites to register themselves as a possible handler for a given MIME type. Navigator.registerProtocolHandler() Allows web sites to register themselves as a possible handler for a given protocol. Navigator.requestMediaKeySystemAccess() Returns a Promise for a MediaKeySystemAccess object. Navigator.sendBeacon() Used to asynchronously transfer a small amount of data using HTTP...
...s as a possible handler for a given protocol. Navigator.requestMediaKeySystemAccess() Returns a Promise for a MediaKeySystemAccess object. Navigator.sendBeacon() Used to asynchronously transfer a small amount of data using HTTP from the User Agent to a web server. Navigator.share() Invokes the native sharing mechanism of the current platform. NavigatorID.taintEnabled() Deprecated since Gecko 1.7.8 Obsolete since Gecko 9.0 Returns false. JavaScript taint/untaint functions removed in JavaScript 1.2. Navigator.vibrate() Causes vibration on devices with support for it. Does nothing if vibration support isn't available. Non-standard Navigator.mozIsLocallyAvailable() Lets code check to see if the document at a given URI is available without using the network. Specifications...
Using XMLHttpRequest - Web APIs
) that is set on the XMLHttpRequest.open() method. If this argument is true or not specified, the XMLHttpRequest is processed asynchronously, otherwise the process is handled synchronously. A detailed discussion and demonstrations of these two types of requests can be found on the synchronous and asynchronous requests page. Do not use synchronous requests outside Web Workers. Note: Starting with Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27), synchronous requests on the main thread have been deprecated due to the negative effects to the user experience. Note: The constructor function XMLHttpRequest isn't limited to only XML documents. It starts with "XML" because when it was created the main format that was originally used for Asynchronous Data Exchange were XML Handling respo...
...Request.upload object, as shown below: var oReq = new XMLHttpRequest(); oReq.upload.addEventListener("progress", updateProgress); oReq.upload.addEventListener("load", transferComplete); oReq.upload.addEventListener("error", transferFailed); oReq.upload.addEventListener("abort", transferCanceled); oReq.open(); Note: Progress events are not available for the file: protocol. Note: Starting in Gecko 9.0, progress events can now be relied upon to come in for every chunk of data received, including the last chunk in cases in which the last packet is received and the connection closed before the progress event is fired. In this case, the progress event is automatically fired when the load event occurs for that packet. This lets you now reliably monitor progress by only watching the "progress" e...
... can now be relied upon to come in for every chunk of data received, including the last chunk in cases in which the last packet is received and the connection closed before the progress event is fired. In this case, the progress event is automatically fired when the load event occurs for that packet. This lets you now reliably monitor progress by only watching the "progress" event. Note: As of Gecko 12.0, if your progress event is called with a responseType of "moz-blob", the value of response is a Blob containing the data received so far. One can also detect all three load-ending conditions (abort, load, or error) using the loadend event: req.addEventListener("loadend", loadEnd); function loadEnd(e) { console.log("The transfer finished (although we don't know if it succeeded or not)."...
...ipt is to work with a stringifiable raw data, we used the sendAsBinary() method in conjunction with the readAsBinaryString() method of the FileReader API. As such, the above script makes sense only when you are dealing with small files. If you do not intend to upload binary content, consider instead using the FormData API. Note: The non-standard sendAsBinary method is considered deprecated as of Gecko 31 (Firefox 31 / Thunderbird 31 / SeaMonkey 2.28) and will be removed soon. The standard send(Blob data) method can be used instead. Using FormData objects The FormData constructor lets you compile a set of key/value pairs to send using XMLHttpRequest. Its primary use is in sending form data, but can also be used independently from a form in order to transmit user keyed data. The transmitted da...
Audio and Video Delivery - Developer guides
video should play from the beginning through 10.5 seconds. http://example.com/video.ogv#t=,02:00:00 Specifies that the video should play from the beginning through two hours. http://example.com/video.ogv#t=60 Specifies that the video should start playing at 60 seconds and play through the end of the video. ...
...inning through two hours. http://example.com/video.ogv#t=60 Specifies that the video should start playing at 60 seconds and play through the end of the video. Note: The playback range portion of the media element URI specification was added to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6). At this time, this is the only part of the Media Fragments URI specification implemented by Gecko, and it can only be used when specifying the source for media elements, and not in the address bar. Error handling Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), error handling has been revised to match the latest version of the HTML5 specification. Instead of the error event being dispatched to the media element itself, it now gets delivered to the child <source> element...
...ree transcoding and storage Detecting when no sources have loaded To detect that all child <source> elements have failed to load, check the value of the media element's networkState attribute. If this is HTMLMediaElement.NETWORK_NO_SOURCE, you know that all the sources failed to load. If at that point you add another source, by inserting a new <source> element as a child of the media element, Gecko attempts to load the specified resource. Showing fallback content when no source could be decoded Another way to show the fallback content of a video, when none of the sources could be decoded in the current browser, is to add an error handler on the last source element. Then you can replace the video with its fallback content: <video controls> <source src="dynamicsearch.mp4" type="video/mp4...
...ormat in Firefox/Firefox OS, including code examples, tips and tricks. Easy audio capture with the MediaRecorder API Explains the basics of using the MediaRecorder API to directly record a media stream. Note: Firefox OS versions 1.3 and above support the RTSP protocol for streaming video delivery. A fallback solution for older versions would be to use <video> along with a suitable format for Gecko (such as WebM) to serve fallback content. More information will be published on this in good time. References The video element Media events API HTMLVideoElement API MediaSource API Web Audio API MediaRecorder API getUserMedia ...
Event developer guide - Developer guides
Web › Guide › Events
The Web platform provides several ways to get notified of DOM events. Two common styles are: the generalized addEventListener() and a set of specific on-event handlers.Media eventsVarious events are sent when handling media that are embedded in HTML documents using the <audio> and <video> elements; this section lists them and provides some helpful information about using them.Mouse gesture eventsGecko 1.9.1 added support for several Mozilla-specific DOM events used to handle mouse gestures. These are special movements that can be made with a mouse or trackpad and can be interpreted to perform specific tasks.Mutation eventsMutation events provide a mechanism for a web page or an extension to get notified about changes made to the DOM. Use Mutation Observers instead if possible. Orientation ...
... ...
... ...
...b page, relating to the device on which the browser is running, and from many other causes such as media stream playback or animation timing.Touch events (Mozilla experimental)The experimental touch events API described on this page was available from Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) to Gecko/Firefox 17. You should instead use the standard touch events API, supported since Gecko/Firefox 6 with multi-touch support added in Gecko/Firefox 12.Using device orientation with 3D transformsThis article provides tips on how to use device orientation information in tandem with CSS 3D transforms. ...
Cross-Origin Resource Sharing (CORS) - HTTP
Web › HTTP › CORS
HTTP/1.1 200 OK Date: Mon, 01 Dec 2008 00:23:53 GMT Server: Apache/2 Access-Control...
...request is preflighted. Note: As described below, the actual POST request does not include the Access-Control-Request-* headers; they are needed only for the OPTIONS request. Let's look at the full exchange between client and server. ...
...o.example Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Allow-Headers: X-PINGOTHER, Content-Type Access-Control-Max-Age: 86400 Vary: Accept-Encoding, Origin Keep-Alive: timeout=2, max=100 Connection: Keep-Alive Once the preflight request is complete, the real request is sent: POST /doc HTTP/1.1 Host: bar.other User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Connection: keep-alive X-PINGOTHER: pingpong Content-Type: text/xml; charset=UTF-8 Referer: https://foo.example/examples/preflightInvocation.html Content-Length: 55 Origin: https://foo.example Pragma: no-cache Cache-Control: no-cache <person>...
...e GET request, it is not preflighted, but the browser will reject any response that does not have the Access-Control-Allow-Credentials: true header, and not make the response available to the invoking web content. ...
Finding window handles - Archive of obsolete content
Web content windows (in tabs) do not have their own HWNDs. Typically the top level browser window HWND has no children, although if there are windowed plugins (such as Flash) visible in the window, they will have HWNDs whose parent is the top level browser window HWND. ...
...Web content windows (in tabs) do not have their own HWNDs. Typically the top level browser window HWND has no children, although if there are windowed plugins (such as Flash) visible in the window, they will have HWNDs whose parent is the top level browser window HWND. Here is some simple code that can get access to Mozilla window handles. ...
... (parent window handle) This method is for people who want to get the top level window HWND from the window object in javascript. Comparing to the method above, by using this method, you don't have to compile your component with nsIWidget.h and other bunchs of h files that should not be exposed to outside, and could change every time Firefox updates, all you need is nsIBaseWindow.idl(It's not in gecko_sdk, get this from the latest Firefox source, or http://mxr.mozilla.org/mozilla/sourc...BaseWindow.idl), and use xpidl to compile it to .h file, although that's stll a unfrozen interface, but it should be a lot better. Notice that by using only the C++ part of this code will get the the parent window handle of the nsIBaseWindow you give as a param. That means if you use the top level nsIBaseWind...
Preferences - Archive of obsolete content
can set an observer on any preference or branch. When a change is made to the preferences, you can take the appropriate action (such as reinitializing variables or toggling display properties in XUL components). This technique will work no matter how or where the preferences are changed: in another browser window, directly in the about:config interface, or even by another extension. Note: During Gecko 13 development, nsIPrefBranch2 was deprecated, and its methods moved to nsIPrefBranch. Calling .QueryInterface(Components.interfaces.nsIPrefBranch2) is no longer required, although it still works. Here is a straightforward example: var myPrefObserver = { register: function() { // First we'll need the preference services to look for preferences. var prefService = Components.classes["@m...
...mponents.interfaces.nsIPrefService); // For this.branch we ask for the preferences for extensions.myextension. and children this.branch = prefService.getBranch("extensions.myextension."); // Now we queue the interface called nsIPrefBranch2. This interface is described as: // "nsIPrefBranch2 allows clients to observe changes to pref values." // This is only necessary prior to Gecko 13 if (!("addObserver" in this.branch)) this.branch.QueryInterface(Components.interfaces.nsIPrefBranch2); // Finally add the observer. this.branch.addObserver("", this, false); }, unregister: function() { this.branch.removeObserver("", this); }, observe: function(aSubject, aTopic, aData) { // aSubject is the nsIPrefBranch we're observing (after appropriate Q...
... branch.setCharPref etc. ...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
vide additional functionality. 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). Note: With the modern JIT Javascript Engine in Gecko and js-ctypes more extension code can be written only in JavaScript than ever before. Please consider all of your options carefully before deciding to use native code (C++) in your extension. In addition, binary components need to be recompiled for every major Firefox release, which can be frustrating. This article describes how to set up the development environment for a large, complex F...
...overkill, and you might want to take a look at this guide instead. On the other hand, if you are an experienced developer or team, and you know that you are going to build a large, complex extension, you would do well to consider the approach described in this article. One final note: I've only tried these techniques inside Firefox, but they'll probably work more or less unchanged on other Gecko-based platforms like Thunderbird or Seamonkey. If someone can confirm this and/or provide guidelines for what's different, I'll update the article to incorporate this information. Bambi Meets Mozilla None of this is for the faint of heart. In particular, the initial step involves building Mozilla, which is a huge - nay, gargantuan! - project. Many intelligent developers have been dr...
...DSO_LDOPTS += \ $(MOZ_COMPONENT_LIBS) \ $(NSPR_LIBS) \ $(NULL) In this example, the first two files contain the implementation of the extension's two components. The final file, myExtension.cpp, contains the code necessary to register these components, as described in the next section. Registering Your Components This article explains how to register XPCOM components in Gecko 2.0 and later. Building It As mentioned above, you'll probably want to build your extension immediately after creating your IDL files in order to generate the C++ stubs for your component implementations. I'm assuming that you've already built Firefox successfully. If not, return immediately to the beginning of this article and don't come back til you have a functioning firefox.exe.
How to convert an overlay extension to restartless - Archive of obsolete content
talking about here? Well, XUL overlays and windows, JSM files, chrome & resource mappings with localization, default preferences, but no XPCOM components of your own. Some of that will have to be replaced and the rest will need to be loaded differently. Next, what's the minimum version of Firefox we should require (preferably an ESR)? This guide targets Firefox 17 ESR or later (or anything else Gecko 17+, such as SeaMonkey 2.14+). This is two ESRs back (as of this writing), which should be plenty. Using the current Firefox ESR, stable version, or Nightly is generally a better idea if given the option, but some users take forever to upgrade. There will be no usage of the Add-on SDK or any other external libraries here. Everything will use APIs available in Firefox 17+ or code provided here. ...
...probably consider switching to be extractionless when you go restartless. An old-style add-on installer is packaged something like this: myAddon.xpi file (glorified ZIP) +- chrome.manifest +- install.rdf +- chrome folder +- myAddon folder +- content.jar file +- content folder (most files go here) +- locale folder (your locale files go here) In versions of Firefox prior to 4.0 (Gecko 2.0), the XPI would be extracted into a folder in your profile's extensions folder. In current versions it stays unextracted as an XPI. If you were using input streams you already had to deal with this because they weren't an option without extraction. Opting-out to extractionlessness is done via the "unpack" flag in install.rdf. Why the internal JAR? Well, two reasons: Prior to extractionles...
...UL overlay. Your localization handling should be unaffected by your transition to a restartless/extractionless add-on so long as you properly clear the chrome cache on add-on shutdown and load your properties files using the method listed above. Your property files and DTD files loaded from chrome:// URIs should work just as before. This is all assuming a minimum version of Firefox 17+ (or other Gecko 17+ application) which you should remember to state explicitly in your install.rdf. Just remember that whatever you start you also need to have the ability to undo. In order for your add-on to reliably update without a restart it needs to be able to shutdown/disable cleanly. Also note that once you do get this all up and running, your users will still have to restart Firefox once to install you...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
ode 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 !. XUL display methods XUL is used almost exclusively in Mozilla applications like Firefox 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 thi...
...ight-click on systems set up as left-handed) on the mouse or selection by the Enter key. Listing 10 shows an example of the oncommand event handler in use. Apart from menuitem elements, it can be used with buttons and other input controls. <menuitem label="Open project page" oncommand="loadURI(this.value)" value="http://mozilla.org/"/> Listing 10: The oncommand event handler Because the Gecko engine implements DOM Level 2 event handlers, you can define dynamic event listeners such as the one in Listing 11. var item = document.getElementById('menu-item-custom'); function handleCommandEvent(aEvent) { alert('OK'); item.removeEventListener('command', handleCommandEvent, false); item.parentNode.removeChild(item); } item.addEventListener('command', handleCommandEvent, false); List...
...The ones shown in Table A below correspond to the common attributes in XUL. In fact, those XUL attributes operate through these CSS properties. The values declared for these CSS properties are the same integers or k...
List of Former Mozilla-Based Applications - Archive of obsolete content
being actively maintained. A list of actively maintained Mozilla-based applications is also available. ...
... Tools for Startups, VCs, and Angel Investors Switched from XULRunner-based client to a web application Autodesk Maya 3d modeling tool Switched off of Gecko for help browser in version 8.5 Blam Feed reader Switched to WebKit in version 1.8.6 Boxee Media center software Switched to WebKit in version 1.0 Epiphany Browser Switched from Gecko to Webkit Flock Social browsing Flock switched from being Firefox-based to Chromium-based when it released a new beta on June 16, 2010 Jolicloud web operating system As of March 2010, RW/W reports Jolicloud is on Chrome/Chrome OS Joost TV over Internet Switched from XULRunner-based client to a web application Liferea News aggregator Swit...
... Liferea News aggregator Switched to WebKit in version 1.6 ManyOne Browser Browser Originally Mozilla-based but now I believe the have a web-based tool (need reference for that) Miro (formerly Democracy Player) Video Switched from XULRunner to WebKit in version 3.0.2 Moblin Browser Browser When Moblin became Meego it switched from a custom Gecko-based browser to Chrome Nautilus File manager Hasn't used Mozilla code since version 2.0 Raptr client Gaming client Was a XULRunner app initially but now uses Adobe AIR Rift Technologies Software installation over Internet No longer using Mozilla technology -- need confirmation and details Second Life Virtual world desktop client Switche...
Structure of an installable bundle - Archive of obsolete content
*.xml MozSearch and OpenSearch plugins Firefox 2 and greater /dictionaries/*.{aff|dic} Myspell dictionaries Firefox 2 and greater Of course, an extension need not (and normally won't) have all of these directories. Themes are limited for security reasons, and can normally only provide a chrome.manifest which registers the theme and a JAR file. Platform-specific files Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) removed support for platform-specific subdirectories, described below. Instead, you need to use manifest flags, such as the OS and ABI flags, in your chrome manifest to specify components that should be loaded for specific platforms. For example: binary-component components/windows/mycomponent.dll ABI=WINNT_x86-msvc binary-component components/m...
...onent components/windows/mycomponent.dll ABI=WINNT_x86-msvc binary-component components/mac/mycomponent.dylib ABI=Darwin_x86-gcc3 binary-component components/mac/mycomponent64.dylib ABI=Darwin_x86_64-gcc3 binary-component components/linux/mycomponent.so ABI=Linux_x86-gcc3 This also means you can no longer have platform-specific preference files in your bundle. Platform-specific subdirectories: Gecko 1.9.2.x and earlier Note: Platform-specific subdirectory support was removed in Gecko 2.0. See the section Platform-specific files to learn how to use platform-specific files. In some cases a single extension or application may wish to include binary component or plugins for multiple platforms, or theme authors might want to include multiple platform-specific JAR files. To facilitate the firs...
...ic files to learn how to use platform-specific files. In some cases a single extension or application may wish to include binary component or plugins for multiple platforms, or theme authors might want to include multiple platform-specific JAR files. To facilitate the first case, the extension/app loader has special sub-directories specifically for platform-specific files (starting with Toolkit/Gecko 1.8, Firefox/Thunderbird 1.5). The platform string is defined during the toolkit build process to a value unique for the combination of operating system, processor architecture and compiler. The format of the platform string is: {OS_TARGET}_{TARGET_XPCOM_ABI} All of the files which are loaded from the main extension directory are loaded from the subdirectory /platform/{platform string} if i...
Reading textual data - Archive of obsolete content
This article describes how to read textual data from streams, files and sockets. In order to read textual data, you need to know which character encoding the data is in. Files and network sockets contain bytes, not characters - to give these bytes a meaning, you need to know the character encoding. XXX: Document nsIUnicharStreamListener (gecko 1.8) XXX: Also document nsIStreamListener here? Determining the character encoding of data If you have a network channel (nsIChannel), you can try the contentCharset property of it. Note that not all channels know the character encoding of the data. You can fallback to the default character encoding stored in preferences (intl.charset.default, a localized pref value) When reading from a file, the question is harder to answer. Using the system...
...u read data from nsIScriptableInputStream as described on the file I/O code snippets page, you can convert it to UTF-8 // sstream is nsIScriptableInputStream var str = sstream.read(4096); var utf8Converter = Components.classes["@mozilla.org/intl/utf8converterservice;1"]. getService(Components.interfaces.nsIUTF8ConverterService); var data = utf8Converter.convertURISpecToUTF8 (str, "UTF-8"); Gecko 1.8 and newer Reading strings Starting with Gecko 1.8 (SeaMonkey 1.0, Firefox 1.5), you can use nsIConverterInputStream to read strings from a stream (nsIInputStream). This work was done in bug 295047. Usage: var charset = /* Need to find out what the character encoding is. Using UTF-8 for this example: */ "UTF-8"; const replacementChar = Components.interfaces.nsIConverterInputStream.DEFAULT_...
...utStream); if (is instanceof Components.interfaces.nsIUnicharLineInputStream) { var line = {}; var cont; do { cont = is.readLine(line); // Now you can do something with line.value } while (cont); } The above example reads an entire stream until EOF. See nsIConverterInputStream for nsIConverterInputStream.init() arguments. Earlier versions Reading strings Earlier versions of gecko do not provide easy ways to read unicode data from a stream. You will have to manually read a block of data and convert it using nsIScriptableUnicodeConverter. For example: // First, get and initialize the converter var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); co...
Safely loading URIs - Archive of obsolete content
can hang the browser or even crash the operating system in some cases. Some other schemes are used internally by Mozilla modules to communicate with each other. Finally, some URIs (e.g. chrome: give the loaded page expanded privileges. If a web page gets access to a window with such expanded privileges, it may be able to abuse it to gain access to those privileges itself. To solve this problem, Gecko provides methods that allow the caller to check whether it's safe to load a particular URI. These methods are exposed on the nsIScriptSecurityManager interface and are called checkLoadURI, checkLoadURIWithPrincipal, and checkLoadURIStr. All three methods take three arguments: the first argument identifies the source of the URI, the second argument is the URI that one plans to load, and the third ...
...ou're implementing a context menu and you add a "View Image" option, the source of the image URI would be the page the image is in, not the chrome document the context menu code is in. Differences between the methods The three methods differ from each other in how the source of the URI is identified and in what is known about the URI to be loaded. In general, the following guidelines apply for Gecko 1.8: If you plan pass a URI string to nsIWebNavigation.loadURI (which can happen indirectly, e.g. by passing the string to something that loads it in a <browser> or <iframe>), you must call checkLoadURIStr to be secure. There's no way to do this completely securely in Gecko versions prior to 1.8.0.4. If you're doing anything else (passing a URI string to some other API like window.open or <im...
... (passing a URI 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. ...
Writing textual data - Archive of obsolete content
. Some character encodings (UTF-8, UTF-16, UTF-32) can represent "all" characters (the full repertoire of Unicode) while others can only represent a subset of the full repertoire. When the file is to be read only by the application/extension itself, using UTF-8 is often the best choice -- it can represent all characters, and ASCII characters are represented efficiently. ...
....init(fos, charset, 0, "?".charCodeAt(0)); You can, of course, replace the "?" in that example with any other character. You can also specify any unicode character U+ABCD directly as 0xABCD. Note: If the replacement character is not a supported character in the chosen character encoding, attempts to write unsupported characters will fail with NS_ERROR_LOSS_OF_SIGNIFICANT_DATA. Versions before Gecko 1.8 Firefox 1.0.x, Mozilla 1.7.x and older versions do not support nsIConverterOutputStream. Alternative ways usable from JavaScript do not support character encodings that use embedded nulls (such as UTF-16 and UTF-32). They work by manually converting the string you want to write to a byte sequence using nsIScriptableUnicodeConverter, and writing that to the stream. Here's an example: // Fi...
... the stream. Note that not many character encodings need it, but for those that do calling this is important for proper output. var fin = converter.Finish(); if (fin.length > 0) os.write(fin, fin.length); os.close(); Converting a string into a stream Sometimes, it is useful to convert a string into a stream, for example for uploading it using nsIUploadChannel. The example here requires Gecko 1.8 (Firefox 1.5, SeaMonkey 1.0). nsIScriptableUnicodeConverter has a simple method to do that: // First, get and initialize the converter var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); converter.charset = /* The charset you want to use. Using UTF-8 in this example...
Install script template - Archive of obsolete content
e the web page which invoked the plugin to // reload. You can also simply call refreshPlugins() } else cancelInstall(errBlock1); // PLID solution -- write keys to the registry /** * Function for secondary installation of plugin (FirstInstall). * You should not stop the install process because the function failed, * you still have a chance to install the plugin for the already * installed gecko browsers. * * @param empty param list **/ function createSecondaryInstall() { // Use getFolder in such a way that it creates C:\WINNT\System32\MyPlugin secondaryFolder = getFolder("Win System", COMPANY_NAME); // if secondaryFolder is NULL, then there has been an error if(!secondaryFolder) return noSecondaryInstall; else { // we have admin privileges to write to the Win System d...
..., status "+HKLM_status); if (HKCU_status != 0) { logComment("Could not write to the registry. Errorcode="+HKCU_status); return HKCU_status; } } return 0; } /** * Function for preinstallation of plugin (FirstInstall). * You should not stop the install process because the function failed, * you still have a chance to install the plugin for the already * installed gecko browsers. * * @param dirPath directory path from getFolder * @param spaceRequired required space in kilobytes * **/ function verifyDiskSpace(dirPath, spaceRequired) { var spaceAvailable; // Get the available disk space on the given path spaceAvailable = fileGetDiskSpaceAvailable(dirPath); // Convert the available disk space into kilobytes spaceAvailable = parseInt(spaceAvai...
...t("Insufficient disk space: " + dirPath); logComment(" required : " + spaceRequired + " K"); logComment(" available: " + spaceAvailable + " K"); return(false); } return(true); } /** * Function for writing keys to the Win32 System Registry. * You should not stop the install process because the function failed. * You still have a chance to install the plugin for the * current Gecko browser. * * @param rootKey must be one of these two string values HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER * @param plidID PLID for Plugins * @param dllAbsolutePath the fully qualified path to the DLL * @param xptAbsolutePath the fully qualified path to the XPT * @param pluginDescription a String describing the plugin * @param vendor a String describing the vendor * @par...
confirm - Archive of obsolete content
See the notes at the end of this document for a safe way to implement a fallback. aText The string to be displayed in the confirmation dialog. This string is typically in the form of a prompt for the user (e.g.
...irm( String aText, String aDialogTitle, Number aButtonFlags, String aButton0Title, String aButton1Title, String aButton2Title, String aCheckMsg, Object aCheckState ); Parameters The second, extended confirm() method is supported starting with Gecko 1.8. It accepts any number of parameters up to 8. Previous Gecko versions only support the first, one-parameter method and will throw an error on occuring the extended form. See the notes at the end of this document for a safe way to implement a fallback. aText The string to be displayed in the confirmation dialog. This string is typically in the form of a prompt for the user (e.g., "Are you sure you want to delete the selected file(s)?"). ...
...hich button the user selected: Value Button 0 'Cancel' or button 1. Also: user closed the dialog window 1 'OK' or button 0 2 The third button Previous versions of the XPInstall API stated the return value of confirm() to be a Boolean. That is incorrect, confirm() always returned a plain integer (in pre-Gecko-1.8 versions either 0 or 1). Notes The preferred method for detecting support for custom dialog boxes is querying the existence of the button constants. Other approaches (e.g. buildID comparisons) are not recommended. if ("BUTTON_POS_0" in Install) { // Use extended confirm() method } else { // Use classic confirm() method } ...
searchSessions - Archive of obsolete content
<< XUL Reference home searchSessions Obsolete since Gecko 26 Type: space-separated list of session names Set to a keyword indicating what type of data to look up for autocomplete. You may set multiple types by separating their names by spaces. The following values are possible, although custom components may be installed which add others. history: The user's URL history is searched. Obsolete since Gecko 3 addrbook: The user's address book is searched. ...
...rated list of session names Set to a keyword indicating what type of data to look up for autocomplete. You may set multiple types by separating their names by spaces. ...
...ta to look up for autocomplete. You may set multiple types by separating their names by spaces. ...
2006-11-24 - Archive of obsolete content
he gets an error. Vin is asking for help on how to solve the error. Announcements SVG build dependency on cairo gfx on 11/22 November 21st: T Rowley announced that: he will be landing his patch that starts the process of switching SVG over to thebes (bug 354866). If you build dependencies with non-default toolkit or on a non tier-1 platform you'll need to disable SVG in your mozconfig. ...
... Meetings There were no meetings this week. ...
... Meetings There were no meetings this week. Summarized By: Vanessa Miranda & Mohammad Tirtashi ...
Plugins - Archive of obsolete content
braries that users can install to display content that the browser can't display natively. For example, the Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page. Plugins are written using NPAPI, the cross-browser API for plugins. The main source of documentation for NPAPI is the Gecko Plugin API Reference. To make 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. ...
... 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 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 refer...
...plains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation. Plugins: The First Install Problem The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser. Plugins: Samples and Test Cases NPAPI plugin samples and test cases. External Resources for Plugin Creation External projects, frameworks, and blog posts that may be useful. XEmbed Extension for Mozilla Plugins Recent versions of Mozilla on *nix-based systems include an extension for writing plugins that use XEmbed instead of using the old Xt-based main loop that most p...
ECMAScript 5 support in Mozilla - Archive of obsolete content
5.1, an older version of the standard upon which JavaScript is based, was approved in June 2011. The JavaScript runtime used in the latest versions of Mozilla projects including both Firefox and Thunderbird has full support for ECMAScript 5.1 features. This article covers the features supported by different versions of Mozilla's JavaScript runtime. ...
...ng both Firefox and Thunderbird has full support for ECMAScript 5.1 features. This article covers the features supported by different versions of Mozilla's JavaScript runtime. Supported features Added in JavaScript 1.8.5 (Gecko 2, Firefox 4 and later) Firefox 4 has full ECMAScript 5 support including the Object.* methods and strict mode. See New in JavaScript 1.8.5. Added in JavaScript 1.8.1 (Gecko 1.9.1, Firefox 3.5) Native JSON support Object.getPrototypeOf() method. String.trim() method, which trims whitespace from both ends of the string. Gecko 1.9.1.4 updated the implementation of JSON.stringify() to be compliant with ECMAScript 5. Improvements laid out by ECMAScript 5 have been made in the parsing algorithm that prevents evaluating XHTML as JavaScript code in certain circumsta...
...SON support Object.getPrototypeOf() method. String.trim() method, which trims whitespace from both ends of the string. Gecko 1.9.1.4 updated the implementation of JSON.stringify() to be compliant with ECMAScript 5. Improvements laid out by ECMAScript 5 have been made in the parsing algorithm that prevents evaluating XHTML as JavaScript code in certain circumstances. Added in JavaScript 1.6 (Gecko 1.8, Firefox 1.5) New Array methods offering several improved methods for manipulating arrays -- have been part of JavaScript since JavaScript 1.6. Now they've been standardized as part of ECMAScript 5. ...
Archive of obsolete content
gn clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from Web pages. API Archived documentation about obsolete web standards APIs. Archived Mozilla and build documentation These articles are archived, obsolete documents about Mozilla, Gecko, and the process of building Mozilla projects. Archived open Web documentation The documentation listed below is archived, obsolete material about open Web topics. Beginner tutorials This page includes archived beginners tutorials, from various places around MDN. Case Sensitivity in class and id Names Creating a dynamic status bar extension...
...f long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible box or grid layouts. Element Events Archived event pages Firefox Developer Tools These are articles related to the Firefox Developer Tools, which are no longer current. Gecko Compatibility Handbook ** Notes ** - The Solution Quick Reference needs more attention. - I'm also looking for a way to organize all that information. - Some inline examples were removed because of technical limitations. They are actually replaced by ''-(EXAMPLE REMOVED)-'' The goal of this handbook is to help you update websites to work w...
... ** Notes ** - The Solution Quick Reference needs more attention. - I'm also looking for a way to organize all that information. - Some inline examples were removed because of technical limitations. They are actually replaced by ''-(EXAMPLE REMOVED)-'' The goal of this handbook is to help you update websites to work with standards-based browsers and properly detect Gecko. Getting the page URL in NPAPI plugin Sometimes, you want to restrict an NPAPI plugin to be loadable only from a certain URL or domain or scheme. Or whenever you make network requests yourself, you almost always need to enforce same-origin policy. Index of archived content Inner-browsing extending the browser navigation paradigm...
Multiprocess on Windows
t, readers of this document should have a solid understanding of what apartments are. Unfortunately this topic is often poorly explained. One of the better pieces of documentation is a two-part series written by Jeff Prosise: Understanding COM Apartments, Part I Understanding COM Apartments, Part II For the purposes of this document, "COM" will refer to Microsoft COM (as opposed to XPCOM). Gecko and apartments Most code that runs on Gecko's main thread is not thread safe. Since Gecko's main thread uses COM, and COM requires threads to declare their threading model, the main thread must initialize itself to live inside its own single threaded apartment (STA). This is true for both chrome and content processes. As you should already know from the prerequisite reading, single threaded apa...
...int, this is less than ideal. The Windows message queue carries a lot of baggage for the purposes of maintaining backward compatibility. On the other hand, COM's multithreaded apartment (MTA) uses a much faster IPC mechanism that does not suffer from the same problems as the message queue. Ideally, we would like to receive RPCs via threads in the MTA, and then forward them in a thread-safe way to Gecko's main thread. Unfortunately, crossing apartment boundaries using COM incurs the exact same problem as crossing process boundaries: if we directly use COM's built in marshaling capabilities to forward an RPC from the MTA to the main thread STA, COM will still use the STA's message queue, thus defeating the purpose of using the MTA in the first place! Enter the interceptor To achieve the best of...
... in AccessibleMarshal.dll and IA2Marshal.dll. Use their moz.build and .rc files as examples. Ensuring typelib registration For interceptors to be able to use the typelibs, they must be registered. Any typelibs that are already registered in the system registry will automatically be available for use by the interceptor. This is great for system interfaces, but for interfaces that are specific to Gecko, it is better to register them at runtime. The mscom library provides an API for doing this: the RegisterProxy and RegisterTypelib functions in mozilla/mscom/Registration.h. Both of these functions return unique pointers and should be treated as opaque by the caller. Save them to a location where they will be able to exist for the lifetime of the process. If your typelib is embedded in a proxy's...
Accessibility and Mozilla
imistic that JAWS support will catch up this year. In recent articles from both AFB's Access World and NFB's Voice of the Nation's Blind, reviewers found no significant roadblocks in moving to Firefox from Internet Explorer for screen reader users. In fact, the same keyboard commands are still available, so users can become comfortable and productive right away.Accessibility Information for Core Gecko DevelopersBoth end users and developers are invited for discussion on the live IRC channel at irc.mozilla.org/#accessibility. Since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.Accessibility information for UI designers and developersWhen you design user interfaces with accessibility in mind, they will work for more people. This page d...
...C World Product of the Year, Firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software. Websites such as online magazines with sophisticated audiences are now reporting upwards of 25% Firefox usage.Embedding API for AccessibilityEvent Process ProcedureThis diagram outlines how events are processed within Gecko. Gecko info for Windows accessibility vendorsPlease contact the Mozilla Accessibility Community.Information for Assistive Technology VendorsBoth end users and developers are invited for discussion on the live IRC channel at irc.mozilla.org/#accessibility. Since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.Information for External D...
...lease check the Accessibility help topic for more information.Links and ResourcesHere are some useful links for those interested in web accessibility as well as open source accessibility.Mozilla accessibility architectureThis page is maintained by Aaron Leventhal and by the Mozilla Accessibility Community. Feedback and constructive suggestions are encouraged.Mozilla Plugin AccessibilityPlugins in Gecko-based browsers have a lot of accessibility issues. Here is a rundown of problems and the planned solutions:Mozilla's Section 508 ComplianceMozilla's UAAG evaluation reportThe UAAG document contains a very rich set of accessibility guidelines, that broadly define how accessibility should be implemented by any user agent, i.e. software that renders web content. The UAAG is not the basis for any gov...
Adding a new CSS property
This document assumes that you have a specifcation for the property available. Issues about how to write such a specification (including things such as whether it is appropriate to use prefixes or when properties should be inherited by default) are not covered here. ...
...at the top of the file and the other entries for examples. This will cause tests of your new property to be added to many of the mochitests in layout/style/test, which can be run with the command "./mach mochitest -f plain layout/style/". Then, unless you're implementing a shorthand property, you need to decide which style struct the computed value of the property should go in. (Again, see the Gecko Overview for more information.) It should generally be grouped with related properties. Remember that each style struct contains only properties that inherit by default or only properties that do not. (Which set the property is in is given in the specification, which says "Inherited: yes" or "Inherited: no" in the property's definition.) Also note that some of the style structs intentionally ...
...onghand property, you also need to implement the computed style side of things. (None of this applies to shorthand properties.) Start by reading and understanding the "Computed Value:" line in the specification's definition of the property, and any associated prose. This line describes the conceptual representation (but not syntax) of the computed value of the property. The data structures in Gecko that store the computed value must correspond to this concept, or inheritance won't work as described by the specification. So first, you need to add a member variable (or variables) to the chosen style struct in nsStyleStruct.h and fix the default constructor and the copy constructor of that struct in nsStyleStruct.cpp. If this variable needs to be a tagged union, use nsStyleCoord. But don't ...
Creating a Firefox sidebar
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. ...
...ompletely 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 SDK. A sample extension to add a Web panel is available as a starter.Obsolete since Gecko 57 If you'd like to have a deeper integration with the browser to offer more complex features, a traditional overlay extension can be an option. The document might be obsolete, though.Obsolete since Gecko 57 The Social API Obsolete since Gecko 57 (Firefox 57 / Thunderbird 57 / SeaMonkey 2.54)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since ...
...Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. As of Firefox 23, the addPanel and addPersistentPanel functions have been removed from the deprecated, Netscape-derived window.sidebar object. ...
Creating a spell check dictionary add-on
n version numbers, and if you update an existing dictionary add-on, the new version number must be greater than the old one. Don't change em:type or em:unpack, and don't add a em:bootstrap element. Type = 64 indicates that the add-on is in the restartless format, and unpack is required for Hunspell to read the dictionary. ...
...onary add-on, the new version number must be greater than the old one. Don't change em:type or em:unpack, and don't add a em:bootstrap element. Type = 64 indicates that the add-on is in the restartless format, and unpack is required for Hunspell to read the dictionary. Although the restartless format for dictionary add-ons were introduced in Gecko 10, dictionary updates only works starting from Gecko 18. ...
...ement. Type = 64 indicates that the add-on is in the restartless format, and unpack is required for Hunspell to read the dictionary. Although the restartless format for dictionary add-ons were introduced in Gecko 10, dictionary updates only works starting from Gecko 18. The em:minVersion should therefore be the same as in the example above (or greater). If you set em:minVersion to a lower value, Gecko 10-17 will not be able to update your dictionary add-on once the restartless dictionary is installed (bug 782118), and Gecko 10-16 may warn the user that your dictionary is not compatible, when users try to update to a newer version of Firefox/Thunderbird (bug 782115). Update the em:maxVersion to the greatest versions available. Once you have added these files to your ZIP file and renamed the ...
Debugging Frame Reflow
s displayed : reflow metric (desired) width, height max. element width maximum width frame status overflow area Getting the log Make sure that your build is a debug build (in short you need ac_add_options --enable-debug in your .mozconfig file). Create a text file (for instance reflow_rules.txt). Enter this line in the text file * 1 This should look like: point the GECKO_DISPLAY_REFLOW_RULES_FILE environment variable to the path of the reflow_rules.txt file. Run the debug build, saving stdout to a file. On Mac this is accomplished with: $ env DYLD_LIBRARY_PATH="`pwd`/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS" \ ./obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/firefox-bin > logfile.txt After loading your testcase, t...
...bleOuter rowG tableRowGroup row tableRow textCtl textInput text text VP viewport Once the problem is reduced to a single frame level, placing a breakpoint at DisplayReflowEnterPrint in nsFrame.cpp is a very efficient way to step through the reflow tree. Other reflow debug options GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS Setting this option via set GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS = 1 enables a verification for each coordinate value that the coordinates are aligned at pixel boundaries. row 0268A594 r=0 a=UC,UC c=UC,20 cnt=870 VALUE 20 is not a whole pixel cell 0268A6C0 r=0 a=UC,UC c=UC,15 cnt=871 block 0268A764 r=0 a=UC,UC c=UC,UC...
...8A6C0 d=0,0 me=0 row 0268A594 d=UC,20 VALUE 20 is not a whole pixel rowG 0268A02C d=UC,695 VALUE 695 is not a whole pixel While unaligned values at the entrance of a frame reflow can be ignored, when they appear at the exit of a routine this can cause display errors like stray lines. OS2 is very vulnerable to pixel alignment errors as text is drawn on pixel boundaries. GECKO_DISPLAY_REFLOW_INDENT_UNDISPLAYED_FRAMES Setting this option via set GECKO_DISPLAY_REFLOW_INDENT_UNDISPLAYED_FRAMES = 1 will cause an advance of the indent even for frames which are blocked via the reflow rules file. Original Document Information Author(s): Bernd Mielke Last Updated Date: December 4, 2004 Copyright Information: Portions of this content are (C) 1998-2007 by indiv...
Debugging
is a memory debugger for Mac and Linux. It is slow, but good for tracking down difficult memory safety bugs. Replay debugging Firefox with VMWare Workstation How to setup record and replay debugging on Firefox, to help debug intermittent mochitest failures. Detecting defects in Firefox with Coverity Coverity is a static analysis system that can detect defects in Firefox. ...
...efox. Gecko Logging Using old-school logging to try to track down what's going on. Debugging specific parts of the Mozilla codebase Debugging OpenGL If you're working on code that involves OpenGL calls, and need to debug it, you can turn on a special OpenGL debugging mode. Debugging frame reflow and Debugging table reflow Notes on debugging issues in Gecko's layout engine. Miscellaneous Debugging Safari Some tips for debugging Safari Debugging Chrome Some tips for debugging Chrome Debugging Internet Explorer Some tips for debugging Internet Explorer Providing useful information to the Mozilla developers How to get a stacktrace for a bug report Useful information you can ...
...e tips for debugging Safari Debugging Chrome Some tips for debugging Chrome Debugging Internet Explorer Some tips for debugging Internet Explorer Providing useful information to the Mozilla developers How to get a stacktrace for a bug report Useful information you can provide about a crash. Reporting a Performance Problem ...using the Gecko Profiler extension. Debugging a hang on OS X Collecting "samples" to attach to a bug. Remote debugging Core dumps and examples of remote debugging. Useful if a developer can't reproduce your crash. HTTP logging How to log HTTP network traffic for debugging purposes. Debugging tools Tools Assorted tools that will help you debug your code or w...
The Firefox codebase: CSS Guidelines
pecially useful in conjunction with icons using -moz-context-properties: fill; where the icon can adjust to the right platform color automatically from the text color. It is also possible to use currentcolor with other properties like opacity or fill-opacity to have different opacities of the platform color. High contrast mode Content area On Windows high contrast mode, in the content area, Gecko does some automatic color adjustments regarding page colors. Part of those adjustments include making all box-shadow invisible, so this is something to be aware of if you create a focus ring or a border using the box-shadow property: consider using a border or an outline if you want the border/focus ring to stay visible in high-contrast mode. An example of such bug is bug 1516767. Another adjust...
...djustments regarding page colors. Part of those adjustments include making all box-shadow invisible, so this is something to be aware of if you create a focus ring or a border using the box-shadow property: consider using a border or an outline if you want the border/focus ring to stay visible in high-contrast mode. An example of such bug is bug 1516767. Another adjustment to be aware of is that Gecko removes all the background-image when high contrast mode is enabled. Consider using an actual <img> tag (for HTML documents) or list-style-image (for XUL documents) if rendering the image is important. If you are not using Windows, one way to test against those adjustments on other platforms is: Going to about:preferences Clicking on the "Colors..." button in the "Fonts & Colors" sub-section...
...xt. ThreeDShadow: Used as border on elements. ThreeDLightShadow: Used as light border on elements. Using the background/text pairs is especially important to ensure the contrast is respected in all situations. Never mix custom text colors with a system background color and vice-versa. Note that using system colors is only useful for the chrome area, since content area colors are overriden by Gecko anyway. Writing media queries Boolean media queries Do this: @media (-moz-mac-yosemite-theme: 0) { Not this: @media not all and (-moz-mac-yosemite-theme) { Privilege CSS for most common configuration It is better to put the most common configuration (latest version of an OS, or default theme for example) outside of the media query. In the following example, -moz-mac-yosemite-theme targe...
Embedding Tips
Normally it provide some functionality that is required from lots of places such as looking up preference settings, creating new windows, locating files, displaying prompt or password dialog boxes and so on. Embedders may wish to override some of the default service implementations with their own. For example, the default prompt service uses XUL to render prompt dialogs and embedders may wish to render them in a way more appropriate for their application and platform.. ...
...you wish to preview the page with. The nsIWebBrowserPrint::PrintPreviewNavigate() method can be used to step through the pages. When finished with preview mode, call nsIWebBrowserPrint::ExitPrintPreview(). How do I get popup windows working? Implement and register a nsIWindowCreator object with the window watcher service. The nsIWindowCreator::CreateChromeWindow method will be called whenever Gecko needs to open a new window. This method should create the new browser window in the specified style and hand back the nsIWebBrowserChrome interface to it. nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); if (wwatch) { wwatch->SetWindowCreator(myWindowCreator); } I need the JavaScript inside the browser window to talk to my embedding client. How do I do it? At s...
... PR_TRUE, PR_TRUE, getter_Copies(previous)); That way you will be able to do: var my_comp = new my_prop_name(); This was taken from WeirdAl's excellent "Burning Chrome" article. How do I specify alternate locations for profiles? Specify a profile directory in your implementation of nsIDirectoryServiceProvider passed to XRE_InitEmbedding. Use XRE_NotifyProfile to make gecko actually use a profile location. How do I change the user agent string? The default useragent is set using the value from your application.ini/nsXREAppData. You can override this default using the "general.useragent.override" preference. How do I display my own message, alert and prompt boxes? You need to implement and register your own prompt service. How do I get the DOM document from the ...
DeferredTask.jsm
if you write data to a file and you expect that you may have to rewrite data very soon afterwards. With DeferredTask, the task is delayed by a few milliseconds and, should a new change to the data occur during this period, only the final version of the data is actually written; a further grace delay is added to take into account other changes. ...
... constructor Requires Gecko 18.0(Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15) If you have a function call you want to defer for two seconds, you can do so using the DeferredTask constructor, like this: var task = new DeferredTask(myFunction, 2000); You can also pass a generator function as the first argument of constructor. Method overview bool isPending();Obsolete since Gecko 28 void start();Obsolete since Gecko 28 void flush();Obsolete since Gecko 28 void cancel();Obsolete since Gecko 28 void arm(); void disarm(); Promise finalize(); Attributes isArmed boolean Indicates whether the task is currently requested to start again later, regardless of whether it is currently running. isRun...
...r the task is currently requested to start again later, regardless of whether it is currently running. isRunning boolean Indicates whether the task is currently running. This is always true when read from code inside the task function, but can also be true when read from external code, in case the task is an asynchronous generator function. Methods isPending Obsolete since Gecko 28 Check the current task state. bool isPending(); Return value Returns true if pending, false otherwise. start Obsolete since Gecko 28 Start (or postpone) task. void start(); flush Obsolete since Gecko 28 Perform any postponed task immediately. void flush(); cancel Obsolete since Gecko 28 Cancel any pending task. void cancel(); arm Request the execution of the task after ...
FileUtils.jsm
modeFlags ); Parameters file The file to write to. modeFlags Optional File open flags (see constants above) Return value Returns nsIFileOutputStream (the non-safe variant) to write to. openAtomicFileOutputStream() Opens an atomic file output stream for writing. Note: 'safe' and 'atomic' file output streams will never append; they will always overwrite an existing file. Starting in Gecko 38.0, passing MODE_APPEND without MODE_TRUNCATE will throw an exception. nsIFileOutputStream openAtomicFileOutputStream( nsIFile file, int modeFlags ); Parameters file The file to write to. modeFlags Optional File open flags (see constants above) Return value Returns nsIFileOutputStream (the safe variant) to write to. Note: openAtomicFileOutputStream() is generally better than o...
...ost of the issues. closeAtomicFileOutputStream() Closes an atomic file output stream. void closeAtomicFileOutputStream( nsIFileOutputStream stream ); Parameters stream The stream to close. openSafeFileOutputStream() Opens a safe file output stream for writing. Note: 'safe' and 'atomic' file output streams will never append; they will always overwrite an existing file. ...
... closeSafeFileOutputStream() Closes a safe file output stream. void closeSafeFileOutputStream( nsIFileOutputStream stream ); Parameters stream The stream to close. ...
Promise.jsm
The Promise.jsm JavaScript code module implements the Promises/A+ proposal as known in April 2013. This module was used before DOM Promises were made globally available in Gecko 29. Its usage is not suggested for new code. If you just need a Promise, consider using a DOM Promise instead. If you need a Deferred, because you want to create a Promise and manually resolve or reject it, consider using PromiseUtils.jsm instead. ...
...romise, consider using a DOM Promise instead. If you need a Deferred, because you want to create a Promise and manually resolve or reject it, consider using PromiseUtils.jsm instead. To use it, you first need to import the code module into your JavaScript scope: Components.utils.import("resource://gre/modules/Promise.jsm"); Note: A preliminary promise module is also available starting from Gecko 17, though it didn't conform to the Promises/A+ proposal until Gecko 25: Components.utils.import("resource://gre/modules/commonjs/promise/core.js"); // Gecko 17 to 20 Components.utils.import("resource://gre/modules/commonjs/sdk/core/promise.js"); // Gecko 21 to 24 This implementation also includes helper functions that are specific to the Add-on SDK. While you may still import this module ...
...d depending on the state of the original promise and on the behavior of the callbacks. For example, unhandled exceptions in the callbacks cause the new promise to be rejected, even if the original promise is fulfilled. See the documentation of the then method for details. Promises may also be created using the new Promise() constructor. Method overview Deferred defer(); Obsolete since Gecko 30 Promise resolve([optional] aValue); Promise reject([optional] aReason); Methods defer() Creates a new pending promise and provides methods to resolve or reject it. Deferred defer(); Obsolete since Gecko 30 Parameters None. Return value A new object, containing the new promise in the promise property, and the methods to change its state in the resolve and reject...
Reporting a Performance Problem
Enabling the Profiler toolbar button These steps only work in Firefox 75+. Visit https://profiler.firefox.com/ Click on "Enable Profiler Menu Button" The profiler toolbar button will show up in the top right of the URL bar as a small stopwatch icon You can right-click on the button and remove it from the toolbar when you're done with it. Using the Profiler When enabled, the profiler toolbar button is not recording by default. Recording can be done by clicking on the toolbar icon to open its panel. ...
...ble data. Once uploaded, copy permalink URL to your clipboard by right clicking and add the profile URL to a bug for your performance problem and/or send it to the appropriate person. Try to give some context about what you were doing when the performance problem arose such as the URL you were viewing and what actions were you doing (ex. scrolling on gmail.com). Viewing addon performance in GeckoView Sometimes an addon or more are slowing down Firefox. These addons might be using the extension API in ways that were not meant to. You can see which of these addons are causing problems by adding the "moz-extension" filter. Make sure you are selecting the process that is using up the CPU since all of the processes are shown. You might have a content process using up the CPU and not the ma...
...hatever it is that slows down Firefox while recording the profile. For example you might have one addon that slows down page load and another one that slows down tab switch. Your first reflex once you find what addon is slowing down the profile might be to disable it and search for alternatives. Before you do this, please share the performance profile with the addon authors through a bug report. Gecko profiler allows you to share a link with the profile. ...
GCIntegration - SpiderMonkey Redirect 1
At a high level, there are three issues to be aware of: Interactions between the garbage collector and the cycle collector Incremental garbage collection Moving garbage collection The APIs for GC/CC interaction and incremental GC are already in place. Development of moving GC (both generational and compacting) is under way, but only in the JavaScript shell so far. ...
...hat any destroyed pointer was pointing to an object that was part of the initial snapshot. Consequently, more objects may be marked than necessary, but those objects will be collected in the next GC if they're unreachable. SpiderMonkey implements the write barrier internally. Any time a property is updated in the VM or the JIT, a write barrier is invoked. The troublesome spots are the pointers in Gecko that SpiderMonkey doesn't know about. To understand the problem more, let's consider some reasons why barriers are not needed in common areas of Firefox: If a pointer is never changed after it's initialized, then there's no need for a write barrier. Initializing a pointer never requires a write barrier because there was nothing being destroyed that might have part of the initial snapshot. If...
...ial snapshot only contains objects reachable via traced pointers, so there's no danger that overwriting an untraced pointer will disrupt the snapshot. Some pointers are guaranteed to be marked in the first slice of the GC. Therefore, it's not possible for code to modify them between when the initial snapshot is taken and when the pointer is marked, so no write barrier is needed. Many pointers in Gecko are traced via NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS and its related macros. These pointers are always traced in the first slice, and so they don't need a write barrier. Many other XPConnect pointers are also traced in this way. See XPCJSRuntime::TraceBlackJS and XPCJSRuntime::TraceGrayJS. If a pointer doesn't fit one of these categories, then it probably requires a write barrier. Before...
AT Development
Introduction Software Accessibility: Where are we today? ...
... Introduction Software Accessibility: Where are we today? ...
...t Gecko-based applications like Firefox, Thunderbird and so on. Accessibility Architecture How the accessibility hierarchy is implemented in Mozilla (some issues aren't addressed by previous guide). Building XULRunner with Python How to build XULRunner with Python on Windows. Then comtypes gives access to MSAA and IAccessible2. References AT APIs Implementation References Shows how Gecko handles ATK, IAccessible2, MSAA and Universal Access API Accessible Web Specifications References Provides the map of reflecting web specification to AT APIs. This page includes: ARIA References - W3C specification reflecting ARIA mapping into AT APIs. XForms References - Gecko documentation showing how XForms controls are mapped to AT APIs. ...
Places Developer Guide
Id) - Returns the type of an item (bookmark, folder, separator) PRTime getItemDateAdded(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...
...le. setItemIndex(aItemId, aIndex) - Changes an item's position. NOTE: This does not re-index 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. Deletin...
...r Firefox, not other toolkit-based applications. Importing: importHTMLFromFile (nsILocalFile aFile, boolean aIsInitialImport) - This imports all the bookmarks in the specified file into the current bookmarks collection. If aIsInitialImport is true, all pre-existing bookmarks in the toolbar and menu folders will be deleted. Note: The method importHTMLFromFileToFolder() method was removed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11). Exporting: exportHTMLToFile (nsILocalFile aFile) - This exports all bookmarks in the toolbar, menu and unfiled bookmarks folders into the specified file. Backup/Restore The new bookmarks system uses the JSON format for storing backups of users' bookmarks. The APIs are available via the PlacesUtils API in the utils.js Javascript module. ...
XPCOM array guide
Mozilla › Tech › XPCOM › Guide › Arrays
y using unsigned indices. nsCOMArray<T> - a C++ class which provides a typesafe, reference-counted container for pointers to a single type of COM object. nsAutoTArray<T, N> - a version of nsTArray which includes N entries of internal storage for the array data. nsTPtrArray<T> and nsAutoTPtrArray<T> - similar to using T* with the above arrays, but also provides a SafeElementAt() accessor. As of Gecko 8, SafeElementAt() is now directly available on nsTArray for arrays instantiated with pointer types. Some other arrays: FallibleTArray, AutoFallibleTArray, InfallibleTArray, AutoInfallibleTArray, nsTObserverArray, nsAutoTObserverArray. This handy chart may make it easier to understand the different arrays: Class Data Type Scriptable? Typesafe? Can be modified? Built in...
...s created, it takes a snapshot of the elements in the array, so that the enumerator can outlive the array. To create the enumerator, use NS_NewArrayEnumerator(nsISimpleEnumerator**, const nsCOMArray<T>&). For example: // mElements is an nsCOMArray<nsIElement> nsFoo::GetElements(nsISimpleEnumerator** aResult) { return NS_NewArrayEnumerator(aResult, mElements); } Deleting objects Requires Gecko 6.0(Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) introduces the RemoveObjectsAt() method to nsCOMArray<T>. This lets you delete multiple objects from the array at once by specifying the index to the first item to delete as well as the number of items to delete. For example, to remove three objects, starting at the third object in the...
...in an nsTArray<T> using the SafeElementAt() method. This method is bounds-safe; that is, if you attempt to access an element outside the range of the array, a specified "safe" value is returned. For example: var value = myArray.SafeElementAt(idx, defaultValue); if (value == defaultValue) { /* the index idx was out of bounds, or the value at that index was the default value */ } Note: As of Gecko 8.0, if the element type is a pointer type, you can use the SafeElementAt() method without providing a default value. It returns a null pointer if the index is out of bounds. Note: As of Gecko 10.0, if the element type is a smart pointer type, you can use the SafeElementAt() method without providing a default value. It returns the underlying pointer type or the null pointer if the index is out...
Creating the Component Code
k User Interface shows the icon that is used to activate the web lock mode (leftmost in the status bar) once you have installed the WebLock component and the extra user interface. Web Lock User Interface Most of the actual work in the WebLock component is preparing the component itself, finding the XPCOM interfaces the component needs to use, and hooking into existing functionality within the Gecko Browser. Component Registration All XPCOM components - whether they're stored in shared libraries (DLLs, DSOs, dylibs), JavaScript files, or otherwise - need to be registered before they can be used. Registration is a process that happens in all XPCOM applications, whether they're embedded Gecko clients, Mozilla, Netscape 7, Compuserve, or any other software that uses XPCOM. Registration provid...
...pe client, you copy your component into the components directory in the client's installation folder. When it is copied there, run regxpcom from the command line to register that component and all the others in that directory. Several new options have been added to regxpcom in versions 1.4 and later. You can run regxpcom with the -h option to see full usage options. Registration Alternatives A Gecko embedding application may provide other ways to register XPCOM components. XPInstall, the cross-platform installation technology that Mozilla uses to install the browser and other components, is one such alternative. It is described further in Packaging WebLock. You should consult with the authors of the application you wish to extend to see if there are other supported ways. Overview of the Web...
...hree main parts to every XPCOM component. From the innermost and moving outward, the first object is the XPCOM object. This is the object that contains the business logic, that implements functionality such as starting a network download, implementing interfaces that listen to the download progress, or providing a new content type handler. In Weblock, this is the part that brings together various Gecko services and prevents users from leaving the list of acceptable domains. In a way, the factory and module layers are glue to plug the XPCOM object into the larger XPCOM system. One layer above the object itself is the nsIFactory object. This object provides basic abstraction of the XPCOM object itself. As you can see in Onion Peel View of XPCOM Component Creation, the main accessor for the XPCOM...
Using XPCOM Components
ses JavaScript that has been given access to XPCOM components in the application core with a technology called XPConnect. XPConnect allows interface methods defined via XPIDL to be called from JavaScript, as part of JavaScript objects that represent instances of components like the CookieManager. XPConnect is what binds the application code to the user interface of the Mozilla browser, to other Gecko-based XUL, and to JavaScript environments like xpcshell, which is a command-line JavaScript interpreter and XPCOM tool is built with Mozilla. See http://www.mozilla.org/scriptable/ for more information about XPConnect and JavaScript. This isn't quite all there is to it, of course, but this shows an important aspect of XPCOM. The contractual arrangements that XPCOM enforces open up the way to b...
...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 findNext ...
...main ways that clients typically access XPCOM components: Finding Mozilla Components This book attempts to provide reference information for XPCOM components and their interfaces that are frozen as of the time of this writing. The Mozilla embedding project tracks the currently frozen interfaces. Mozilla also has some tools that can find and display information about the interfaces available in Gecko such as the XPCOM Component Viewer, described below, and MXR, which is a web-based source code viewing tool. The challenge to making good information about XPCOM components available to prospective clients, however, is that the process of freezing the interfaces that are implemented by these components is still ongoing. The Component Viewer does not distinguish between components that are frozen...
XPCOM guide
Mozilla › Tech › XPCOM › Guide
ks in JavaScript XPCOM componentsProgrammers writing and reviewing JavaScript code in Mozilla should understand how code using XPCOM in JavaScript can leak so that they can avoid leaks. ...
...iting and reviewing JavaScript code in Mozilla should understand how code using XPCOM in JavaScript can leak so that they can avoid leaks. ...
... start new services at appropriate times, for example.XPCOM array guideMozilla has many array classes because each array is optimized for a particular usage pattern. This guide describes the available arrays as well as the enumerator classes that can be used to get to them. In this document the term Array refers to a container for multiple objects with a numeric, zero-based index.XPCOM changes in Gecko 2.0Several changes that affect XPCOM component compatibility are taking place in Gecko 2. This article details those changes, and provides suggestions for how to update your code.XPCOM hashtable guideA hashtable is a data construct that stores a set of items. Each item has a key that identifies the item. Items are found, added, and removed from the hashtable by using the key. Hashtables may seem ...
Observer Notifications
Starting in Firefox 3.5 components can simply register for the profile-after-change notification in nsICategoryManager. Topic Description * Everything. [nsObserverService.cpp] Topic Description xpcom-startup Note: An extension can no longer be registered to receive this notification in Firefox 4 and later. See XPCOM changes in Gecko 2.0 for details. Called when xpcom is initialized. Many things are not available for use at this point. To receive this notification you have to register with nsICategoryManager. The registered component is always retrieved as a singleton (That is getService() will be used to instantiate it). app-startup Note: An extension can no longer be registered to receive this noti...
...d. Many things are not available for use at this point. To receive this notification you have to register with nsICategoryManager. The registered component is always retrieved as a singleton (That is getService() will be used to instantiate it). app-startup Note: An extension can no longer be registered to receive this notification in Firefox 4 and later. See XPCOM changes in Gecko 2.0 for details. General event for application startup. To receive this notification you have to register with nsICategoryManager. Prepend "service," to the contract ID in the category registration to be invoked via getService() instead of createInstance(). profile-do-change This is fired after the profile has been selected. You will not be able to access user preferences, bo...
...rowsing mode. download-manager-remove-download Called when a download of the list is removed or all the list is cleared. The subject will be the download id wrapped in nsISupportsPRUint32, for one download removed, or null for multi download remove, for example when the download list is cleared. Extension Manager Note: These notifications are no longer available starting with Gecko 2.0, instead use AddonManager.addAddonListener() to receive similar events. This topic indicates when the extension manager performs some action. Note that any action will be taken the next time the application starts. See nsIExtensionManager for details. Topic Data Description em-action-requested item-installed A new extension has been installed. em-acti...
amIWebInstallListener
toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable Starts all installs. The registered amIWebInstallListener is used to notify about new installs triggered by websites. The default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
...er.idlScriptable Starts all installs. The registered amIWebInstallListener is used to notify about new installs triggered by websites. The default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
... Methods onWebInstallBlocked() Called when the website is not allowed to directly prompt the user to install add-ons. boolean onWebInstallBlocked( in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, in PRUint32 aCount Optional ); Parameters aWindow The win...
amIWebInstallPrompt
Methods confirm() Gets a confirmation that the user wants to start the installs. ...
... Methods confirm() Gets a confirmation that the user wants to start the installs. ...
... 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. ...
... toolkit/mozapps/extensions/amIWebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. ...
... Methods installAddonsFromWebpage() Installs an array of add-ons at the request of a webpage. 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...
mozIJSSubScriptLoader
js/xpconnect/idl/mozIJSSubScriptLoader.idlScriptable This interface can be used from privileged JavaScript to load and run JavaScript code from the given URL at runtime. 66 Introduced Gecko 1.0 Inherits from: nsISupports Last changed in Gecko 28 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3) Implemented by: @mozilla.org/moz/jssubscript-loader;1. To get this service, use: var mozIJSSubScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); Note: See Components.utils.import for another way to import JavaScript code. Method overview jsval loadSubScript(in string url, in Object targetObj Optional, in string charset Optional); ...
...ubScriptLoader); Note: See Components.utils.import for another way to import JavaScript code. Method overview jsval loadSubScript(in string url, in Object targetObj Optional, in string charset Optional); jsval loadSubScriptWithOptions(in string url, in Object options); Methods loadSubScript() Synchronously loads and executes the script from the specified URL. As of Gecko 8.0, scripts are loaded from the startup cache where possible. The loaded script is executed with the principal associated with the target object. Any top-level functions or variables created by the loaded script via var are created as properties of the targetObj target object (but things declared via let and const are NOT). Additionally, properties of the targetObj target object can be referre...
...l, in string charset Optional, ); Example let context = {}; Services.scriptloader.loadSubScript("chrome://my-package/content/foo-script.js", context, "UTF-8" /* The script's encoding */); Parameters url The URL pointing to the script to load. It must be a local chrome:, resource: or file: URL (see bug 307686 and bug 418356). Note: In versions of Gecko prior to Gecko 1.9, you could use data: URLs as well, but this introduced security concerns, and is no longer permitted. targetObj The object to use as the scope object for the script being executed. This is where var declarations in the script will be placed. It defaults to the global object of the caller. Note that let and const declarations in the script will be placed on a syntactic s...
mozIStorageFunction
hat must be implemented by consumers. It allows consumers to add functions that are available to SQL queries and triggers. There are a number of already defined functions provided by SQLite. Objects implementing this interface can be registered with mozIStorageConnection.createFunction(). storage/public/mozIStorageFunction.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1.4 (Firefox 3.5.4) Inherits from: nsISupports Method overview nsIVariant onFunctionCall(in mozIStorageValueArray aFunctionArguments); Methods onFunctionCall() The implementation of the function. This is called by the database engine when the function registered with mozIStorageConnection.createFunction() is used in an executing SQL statement or trigger. Note This cal...
...nsIVariant onFunctionCall( in mozIStorageValueArray aFunctionArguments ); Parameters aFunctionArguments A mozIStorageValueArray holding the arguments passed in to the function. Return value An nsIVariant this is the return value of the function. Sample Code Both of the following code samples assume that the variable dbConn is an opened mozIStorageConnection. JavaScript Starting in Gecko 1.9.1.4 (Firefox 3.0.15), you can directly pass your function into the mozIStorageConnection method mozIStorageConnection, like this: dbConn.createFunction("square", 1, function(aArguments) { let value = aArguments.getInt32(0); return value * value; }); // Run some query that uses the function. let stmt = dbConn.createStatement("SELECT square(value) FROM some_table"); try { while (stm...
...IStorageConnection, like this: dbConn.createFunction("square", 1, function(aArguments) { let value = aArguments.getInt32(0); return value * value; }); // Run some query that uses the function. let stmt = dbConn.createStatement("SELECT square(value) FROM some_table"); try { while (stmt.executeStep()) { // handle the results } } finally { stmt.reset(); } In earlier versions of Gecko, however, you'll need to actually create an object containing the onFunctionCall method. This still works in Gecko 1.9.1.4 and later, so you may wish to do it this way for compatibility for the time being. // First, create our object that will represent our function. var squareFunction = { onFunctionCall: function(aArguments) { let value = aArguments.getInt32(0); return value * value; ...
nsIAccessibleCoordinateType
Constants Constant Value Description COORDTYPE_SCREEN_RELATIVE 0x00 The coordinates are relative to the screen. COORDTYPE_WINDOW_RELATIVE 0x01 The coordinates are relative to the window. ...
...Constants Constant Value Description COORDTYPE_SCREEN_RELATIVE 0x00 The coordinates are relative to the screen. COORDTYPE_WINDOW_RELATIVE 0x01 The coordinates are relative to the window. ...
...Constants Constant Value Description COORDTYPE_SCREEN_RELATIVE 0x00 The coordinates are relative to the screen. COORDTYPE_WINDOW_RELATIVE 0x01 The coordinates are relative to the window. ...
nsIAccessibleHyperLink
accessible/public/nsIAccessibleHyperLink.idlScriptable A cross-platform interface that supports hyperlink-specific properties and methods. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview nsIAccessible getAnchor(in long index); Note: Renamed from getObject in Gecko 1.9 nsIURI getURI(in long index); boolean isSelected(); Obsolete since Gecko 1.9 boolean isValid(); Obsolete since Gecko 1.9 Attributes Attribute Type Description anchorCount long The number of anchors within this Hyperlink. Is normally 1 for anchors. This anchor is, for example, the visible output of the html:a tag. With an Image Map, reflects the actual areas within the map. Read only. Note: Renamed from a...
... endIndex long The end offset of the hyperlink accessible within the parent accessible. ...
...RI at the given index. Note: ARIA hyperlinks do not have an URI to point to, since clicks are processed via JavaScript. Therefore this property does not work on ARIA links. nsIURI getURI( in long index ); Parameters index The 0-based index of the URI to be returned. Return value The nsIURI object containing the specifications for the URI. isSelected() Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the selected attribute. boolean isSelected(); Parameters None. Return value true if the element currently has the focus. isValid() Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the valid attribute. boolean isValid(); Parameters None. Return value true if the hyperlink is valid. Remarks ...
nsIAccessibleHyperText
accessible/public/nsIAccessibleHyperText.idlScriptable This interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents. A typical implementation is to implement this interface on the small text object such as a paragraph of text. ...
...hat are used to reference other documents. A typical implementation is to implement this interface on the small text object such as a paragraph of text. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview nsIAccessibleHyperLink getLink(in long linkIndex); long getLinkIndex(in long charIndex); long getSelectedLinkIndex(); Obsolete since Gecko 1.9 Attributes Attribute Type Description linkCount long The number of links contained within this hypertext object. Read only. Note: Renamed from links in Gecko 1.9 Methods getLink() Retrieves the nsIAccessibleHyperLink object at the given link index. nsIAccessibleHyperLink getLink( in long linkIndex ); Parameters linkIndex 0-based index ...
...e given offset (character index). long getLinkIndex( in long charIndex ); Parameters charIndex The 0-based character index. Return value The index of the link if it's presented on the given character index, otherwise -1. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. getSelectedLinkIndex() Obsolete since Gecko 1.9 (Firefox 3) long getSelectedLinkIndex(); Parameters None. Return value Missing Description Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. See also nsIAccessibleHyperLink ...
nsIAccessibleRelation
Method overview nsIAccessible getTarget(in unsigned long index); nsIArray getTargets(); Attributes Attribute Type Description relationType unsigned long Returns the type of the relation. ...
... accessible/public/nsIAccessibleRelation.idlScriptable This interface gives access to an accessibles set of relations. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Note: Be carefull, do not change constants until ATK has a structure to map gecko constants into ATK constants. Method overview nsIAccessible getTarget(in unsigned long index); nsIArray getTargets(); Attributes Attribute Type Description relationType unsigned long Returns the type of the relation. Read only. targetsCount unsigned long Returns the number of targets for this relation. Read only. Constants Con...
... RELATION_EMBEDS 0x0a This object embeds a target object. This relation can be used on the OBJID_CLIENT accessible for a top level window to show where the content areas are. It points to the accessible object corresponding to the root of content in that window. This relation is very useful for finding the content quickly, and is the proper method for finding content in Gecko 1.9 and beyond. RELATION_EMBEDDED_BY 0x0b This object is embedded by a target object. RELATION_POPUP_FOR 0x0c This object is a transient component related to the target object. When this object is activated the target object doesn't lose focus. RELATION_PARENT_WINDOW_OF 0x0d This object is a parent window of the t...
nsIAccessibleStates
Constants State constants MSAA State flags - used for bitfield. More than 1 allowed. Constant Value Description STATE_UNAVAILABLE 0x00000001 The object is unavailable, that is disabled. ...
...Constants State constants MSAA State flags - used for bitfield. More than 1 allowed. Constant Value Description STATE_UNAVAILABLE 0x00000001 The object is unavailable, that is disabled. ...
...Constants State constants MSAA State flags - used for bitfield. More than 1 allowed. Constant Value Description STATE_UNAVAILABLE 0x00000001 The object is unavailable, that is disabled. ...
nsIAccessibleValue
That is if the value is within the range of minimumValue - maximumValue. ...
...That is if the value is within the range of minimumValue - maximumValue. ...
...That is if the value is within the range of minimumValue - maximumValue. boolean setCurrentValue( in double value ); Parameters value New value for current value. ...
nsIApplicationUpdateService
toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes a global application service that handles performing background update checks. It also provides utilities for selecting and downloading update patches. ...
... toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes a global application service that handles performing background update checks. It also provides utilities for selecting and downloading update patches. ...
...boolean true if the Update Service can check for updates. Application updates might be disabled by the application and the platform the application is running on. Read only. canUpdate boolean true if the update service is able to download and install updates. This depends on whether or not the current user has the necessary access privileges for the install directory. Read only. Obsolete since Gecko 1.9.1.7pre isDownloading boolean true if a download is in progress, otherwise false. Read only. Methods addDownloadListener() Adds a listener that receives progress and state information about the update that is currently being downloaded. This information is most commonly used to update a user interface that informs the user as to the status of an update. void addDownloadListener( in nsIR...
nsIBoxObject
layout/xul/base/public/nsIBoxObject.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) To get an instance, use the boxObject property. Where possible, element.getClientRects and element.getBoundingClientRect should be used instead. Method overview wstring getLookAndFeelMetric(in wstring propertyName); Obsolete since Gecko 1.9 wstring getProperty(in wstring propertyName); nsISupports getPropertyAsSupports(in wstring propertyName); void removeProperty(in wstring propertyName); void setProperty(in wstring propertyName, in wstring propertyValue); void setPropertyAsSupports(in wstring propertyName, in nsISupports value); Attributes Attribute Type Description element nsIDOMElement Read only. firstC...
... nsISupports value); Attributes Attribute Type Description element nsIDOMElement Read only. firstChild nsIDOMElement The first child of the box, in box-ordinal-group order. Read only. height long The height of the box, in CSS pixels. Read only. lastChild nsIDOMElement The last child of the box, in box-ordinal-group order. Read only. layoutManager nsIBoxLayoutManager Obsolete since Gecko 1.9 nextSibling nsIDOMElement The next sibling of the box, in box-ordinal-group order. Read only. paintManager nsIBoxPaintManager Obsolete since Gecko 1.9 parentBox nsIDOMElement The parent of the box, in box-ordinal-group order. Read only. previousSibling nsIDOMElement The previous sibling of the box, in box-ordinal-group order. Read only. screenX long The x coordinate of the box relat...
...reen origin, in device pixels. Read only. screenY long The y coordinate of the box relative to the screen origin, in device pixels. Read only. width long The width of the box, in CSS pixels. Read only. x long The x coordinate of the box, in CSS pixels. Read only. y long The y coordinate of the box, in CSS pixels. Read only. ...
nsICachingChannel
netwerk/base/public/nsICachingChannel.idlScriptable Please add a summary to this article. Inherits from: nsICacheInfoChannel Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface provides: Support for "stream as file" semantics (for JAR and plugins). Support for "pinning" cached data in the cache (for printing and save-as). Support for uniquely identifying cached data in cases when the URL is insufficient. For example a HTTP form submission. A channel may optionally implement this interface to allow clients to affect its behavior with respect to how it uses the cache service. ...
...plugins). Support for "pinning" cached data in the cache (for printing and save-as). Support for uniquely identifying cached data in cases when the URL is insufficient. For example a HTTP form submission. A channel may optionally implement this interface to allow clients to affect its behavior with respect to how it uses the cache service. Method overview boolean isFromCache(); Obsolete since Gecko 2.0 Attributes Attribute Type Description cacheAsFile boolean Specifies whether or not the data should be cached to a file. This may fail if the disk cache is not present. The value of this attribute is usually only settable during the processing of a channel's OnStartRequest. The default value of this attribute depends on the particular implementation of nsICachingChannel. cacheFile ns...
...ll not be loaded from the cache. A stream listener can check isFromCache() to determine if the AsyncOpen will actually result in data being streamed. If this flag has been set, and the request can be satisfied via the cache, then the OnDataAvailable events will be skipped. The listener will only see OnStartRequest followed by OnStopRequest. Methods isFromCache() Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This method finds out whether or not this channel's data is being loaded from the cache. boolean isFromCache(); Parameters None. Return value Returns true if this channel's data is being loaded from the cache, otherwise returns false. This value is undefined before the channel fires its OnStartRequest notification and after the channel f...
nsIChannelEventSink
netwerk/base/public/nsIChannelEventSink.idlScriptable Implement this interface to gain control over various channel events, such as redirects. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Channels will try to get this interface from a channel's notificationCallbacks or, if not available there, from the loadGroup's notificationCallbacks. These methods are called before onStartRequest. Note: Prior to Gecko 2.0, redirect handling was synchronous, using the onChannelRedirect() method. Starting in Gecko 2.0, that method no longer exists, and instead the asyncOnChannelRedirect() method is called; this uses a callback to handle redirects asynchronously. Method overview ...
...asyncOnChannelRedirect() method is called; this uses a callback to handle redirects asynchronously. Method overview void asyncOnChannelRedirect(in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags, in nsIAsyncVerifyRedirectCallback callback); void onChannelRedirect(in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags); Obsolete since Gecko 2.0 Constants Constant Value Description REDIRECT_TEMPORARY 1 << 0 This is a temporary redirect. New requests for this resource should continue to use the URI of the old channel. The new URI may be identical to the old one. REDIRECT_PERMANENT 1 << 1 This is a permanent redirect. New requests for this resource should use the URI of t...
...from above. One of REDIRECT_TEMPORARY and REDIRECT_PERMANENT will always be set. callback Object to inform about the async result of this method. Exceptions thrown This method can throw any exception; if an exception occurs, the load will be canceled, and no network requests will occur for the new channel. The redirect will be canceled. onChannelRedirect() Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Called when a redirect occurs. This may happen due to an HTTP 3xx status code. void onChannelRedirect( in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags ); Parameters oldChannel The channel that's being redirected. newChannel The new channel. This channel is not opened yet. flags ...
nsIClipboard
widget/nsIClipboard.idlScriptable This interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data. ...
...riptable This interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data. ...
...board for find strings. Methods emptyClipboard() This method empties the clipboard and notifies the clipboard owner. It empties the "logical" clipboard. It does not clear the native clipboard. void emptyClipboard( in long aWhichClipboard ); Parameters aWhichClipboard Specifies the clipboard to which this operation applies. forceDataToClipboard() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Some platforms support deferred notification for putting data on the clipboard This method forces the data onto the clipboard in its various formats This may be used if the application going away. void forceDataToClipboard( in long aWhichClipboard ); Parameters aWhichClipboard Specifies the clipboard to which this operation ap...
nsICookieManager2
The nsICookieManager2 interface contains additional methods that expand upon the nsICookieManager interface. netwerk/cookie/nsICookieManager2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsICookieManager This interface is included in The Services.jsm JavaScript code module. To create an object implementing this interface: Components.utils.import("resource://gre/modules/Services.jsm"); var cookieService = Services.cookies; Method overview void add(in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in PRInt64 aExpiry); boolean cookieExists(in nsICookie2 aCookie...
...nsICookieService is the normal way to do this. This method is something of a back door. void add( in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsH...
...her.yahoo.com" would not. unsigned long countCookiesFromHost( in AUTF8String aHost ); Parameters aHost The host string to look for, such as "google.com". This should consist only of the host portion of the URI and should not contain a leading dot, port number, or other information. Return value The number of matching cookies found. findMatchingCookie() Obsolete since Gecko 1.9 (Firefox 3) Find whether a matching cookie already exists, and how many cookies a given host has already set. This is useful when e.g. prompting the user whether to accept a given cookie. boolean findMatchingCookie( in nsICookie2 aCookie, out unsigned long aCountFromHost ); Parameters aCookie The cookie to look for. aCountFromHost The number of cookies found whose hosts...
nsIDOMChromeWindow
dom/interfaces/base/nsIDOMChromeWindow.idlScriptable This interface is implemented on the window object in chrome. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void beginWindowMove(in nsIDOMEvent mouseDownEvent); void getAttention(); void getAttentionWithCycleCount(in long aCycleCount); void maximize(); void minimize(); void notifyDefaultButtonLoaded(in nsIDOMElement defaultButton); void restore(); void setCursor(in DOMString cursor); Attributes Attribute Type Description browserDOMWindow nsIBrowserDOMWindow The related nsIBrowserDOMWindow instance which provides access to yet another layer of utility functions by chrome script. It will be null for DOMWindows not corresponding to brow...
... void setCursor(in DOMString cursor); Attributes Attribute Type Description browserDOMWindow nsIBrowserDOMWindow The related nsIBrowserDOMWindow instance which provides access to yet another layer of utility functions by chrome script. It will be null for DOMWindows not corresponding to browsers. messageManager nsIChromeFrameMessageManager Read only. title DOMString Obsolete since Gecko 1.9.1 windowState unsigned short Returns current window state, the value is one of STATE_* constants. Read only. Constants Constant Value Description STATE_MAXIMIZED 1 The window is maximized. STATE_MINIMIZED 2 The window is minimized. STATE_NORMAL 3 The window is normal. STATE_FULLSCREEN 4 The window is in full screen mode. Methods beginWindowMove() On some operating systems,...
... into the foreground. This behavior is same as getAttention method. maximize() Maximizes the window. void maximize(); Parameters None. minimize() Minimizes the window. void minimize(); Parameters None. notifyDefaultButtonLoaded() When a document has been loaded, the document can notify the default button of the document to the window by using this method. When this method is called on Windows, Gecko moves the mouse cursor to center of the button if the auto cursor snap setting is enabled on the system. However, when the window isn't active at that time, the cursor isn't moved. On other systems, this method doesn't have any reaction currently. This method is called automatically on dialog element or wizard element of XUL. If some XUL applications create a dialog like window which has a defaul...
nsIDOMEvent
dom/interfaces/events/nsIDOMEvent.idlScriptable This interface is the primary data type for all events in the Document Object Model. Inherits from: nsISupports Last changed in Gecko 16.0 (Firefox 16.0 / Thunderbird 16.0 / SeaMonkey 2.13) Note: As of Gecko 16.0, the nsIPrivateDOMEvent interface was merged into this interface. Everything marked as Gecko 16.0 was previously available in that interface. See bug 761613. ...
...cko 16.0 was previously available in that interface. See bug 761613. ...
...(); Native code only! nsEventPtr GetInternalNSEvent(); Violates the XPCOM interface guidelines boolean getPreventDefault(); Deprecated since Gecko 16.0 void initEvent(in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg); boolean IsDispatchStopped(); Violates the XPCOM interface guidelines void preventBubble(); Obsolete since Gecko 24 void preventCapture(); Obsolete since Gecko 24 void preventDefault(); void Serialize(in IPCMessagePtr aMsg, in boolean aSerializeInterfaceType); Violates the XPCOM interface guidelines void setTarget(in nsIDOMEventTarget aTarget); Native code only! void SetTrusted(in boolean aTrusted); Native code only! void stopImmediatePropagation(); ...
nsIDOMProgressEvent
dom/interfaces/events/nsIDOMProgressEvent.idlScriptable This interface represents the events sent with progress information while uploading data using the XMLHttpRequest object. 1.0 66 Introduced Gecko 1.9.1 Deprecated Gecko 22 Inherits from: nsIDOMEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) The nsIDOMProgressEvent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download. This implementation is a placeholder until the specification is complete, and is compatible with the WebKit ProgressEvent. Method overview void initProgressEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsign...
...of the progress of the media download. This implementation is a placeholder until the specification is complete, and is compatible with the WebKit ProgressEvent. Method overview void initProgressEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsigned long long loadedArg, in unsigned long long totalArg); Deprecated since Gecko 22.0 Attributes Attribute Type Description lengthComputable boolean Specifies whether or not the total size of the transfer is known. Read only. loaded unsigned long long The number of bytes transferred since the beginning of the operation. This doesn't include headers and other overhead, but only the content itself. Read only. total ...
... The number of bytes transferred since the beginning of the operation. This doesn't include headers and other overhead, but only the content itself. Read only. total unsigned long long The total number of bytes of content that will be transferred during the operation. If the total size is unknown, this value is zero. Read only. Methods initProgressEvent() Deprecated since Gecko 22.0 This method has been removed from use in JavaScript in Gecko 22.0. Use the regular constructor to construct a synthetic ProgressEvent. It still is usable from native C++ code. Initializes the progress event object. void initProgressEvent( in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsigned long long loadedArg, ...
nsIDOMXULElement
dom/interfaces/xul/nsIDOMXULElement.idlScriptable Represents a XUL element within the DOM. 66 Introduced Gecko 1.0 Inherits from: nsIDOMElement Last changed in Gecko 1.9 (Firefox 3) Method overview void blur(); void click(); void doCommand(); void focus(); nsIDOMNodeList getElementsByAttribute(in DOMString name, in DOMString value); nsIDOMNodeList getElementsByAttributeNS(in DOMString namespaceURI, in DOMString name, in DOMString value); Attributes Attribute Type Description align DOMString Gets/sets the value of the element's align attribute. allowEvents boolean true if the element's allowevents attribute is the string "true", otherwise false. Removes the attribute if you set it to false. boxObject nsIBoxObject Read only. Gets or creat...
...DOMString Gets/sets the value of the element's persist attribute. ref DOMString Gets/sets the value of the element's ref attribute. resource nsIRDFResource Read only. Returns the nsIRDFResource corresponding to the element's ref or id attribute, if any. statusText DOMString Gets/sets the value of the element's statustext attribute. style nsIDOMCSSStyleDeclaration Read only. Obsolete since Gecko 1.9 Returns an object that may be used to read or write individual CSS style properties for the element. tooltip DOMString Gets/sets the value of the element's tooltip attribute. tooltipText DOMString Gets/sets the value of the element's tooltiptext attribute. top DOMString Gets/sets the value of the element's top attribute. width DOMString Gets/sets the value of the element's width attri...
...h the given attribute that are not in a namespace. nsIDOMNodeList getElementsByAttribute( in DOMString name, in DOMString value ); Parameters name The name of the attribute to search for. value The value of the attribute to search for, or "*" to search for the attribute without regard to the value. Return value A list of elements with matching attributes that have no namespace. Starting in Gecko 1.8 this is a live list of elements rather than a snapshot. getElementsByAttributeNS() Searches the DOM subtree for elements with the given attribute in the given namespace. nsIDOMNodeList getElementsByAttributeNS( in DOMString namespaceURI, in DOMString name, in DOMString value ); Parameters namespaceURI The namespace of the attribute to search for, or "*" to search attributes in all nam...
nsIDictionary
See bug 668424 for further information. ...
...See bug 668424 for further information. ...
...See bug 668424 for further information. ...
nsIFactory
xpcom/components/nsIFactory.idlScriptable This interface is a class factory that allows for the creation of nsISupports derived classes without specifying a concrete class type. Inherits from: nsISupports Last changed in Gecko 0.9.5 Method overview void createInstance(in nsISupports aOuter, in nsIIDRef iid, [retval, iid_is(iid)] out nsQIResult result); void lockFactory(in PRBool lock); Methods createInstance() Creates an instance of the class associated with this factory. Unlike getService, this returns a new instance each time it is called. (See also nsIComponentManager.createInstance.) void createInstance( in nsISupports aOuter, in nsIIDRef iid, [retval, iid_is(iid)] out nsQIResult result ); Parameters aOuter Pointer to a component tha...
...mponent which is being currently created. result Pointer to the newly created instance, if successful. Exceptions thrown NS_ERROR_NO_INTERFACE Indicates that the requested interface is not supported. NS_ERROR_NO_AGGREGATION Indicates that aggregation is not supported. lockFactory() This method provides the client a way to keep the component in memory until it is finished with it. Gecko 1.7 note As of Gecko 1.7, this method is unused. Most implementations do nothing interesting with this method. It exists primarily for binary compatibility with Microsoft COM's IClassFactory interface. void lockFactory( in PRBool lock ); Parameters lock true to lock the factory, and false to unlock the factory. Remarks On WIN32 systems, nsIFactory is ABI-compatible with Microsoft C...
...ementations do nothing interesting with this method. It exists primarily for binary compatibility with Microsoft COM's IClassFactory interface. void lockFactory( in PRBool lock ); Parameters lock true to lock the factory, and false to unlock the factory. Remarks On WIN32 systems, nsIFactory is ABI-compatible with Microsoft COM's IClassFactory interface. This interface was frozen for Gecko 0.9.5. See bug 99144 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsISupports ...
nsIFilePicker
widget/nsIFilePicker.idlScriptable The file picker component is used to display standard user interface for selecting files and directories, as well as for selecting destinations for, and naming, new files. Inherits from: nsISupports Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14) Implemented by: @mozilla.org/filepicker;1. To create an instance, use: var filePicker = Components.classes["@mozilla.org/filepicker;1"] .createInstance(Components.interfaces.nsIFilePicker); Method overview void appendFilter(in AString title, in AString filter); void appendFilters(in long filterMask); void init(in nsIDOMWindow parent, in AString title, in short mode); void open(in nsIFilePickerShownCallback aFilePicke...
...This attribute has no effect if private browsing mode is in effect. defaultExtension AString The e...
... One of the mode constants, indicating the type of picker to create. open() Opens the file dialog asynchrounously. The passed in object's done method will be called upon completion. void open( in nsIFilePickerShownCallback aFilePickerShownCallback ); Parameters aFilePickerShownCallback The nsIFilePickerShownCallback to be called on completion. show() Obsolete since Gecko 57.0 (Firefox 57.0 / Thunderbird 57.0 / SeaMonkey 2.54) Displays the file picker dialog. The dialog is displayed modally. short show(); Parameters None. Return value One of the return constants. Example Here's an example: const nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"] .createInstance(nsIFilePicker...
nsIFrameMessageManager
You should use nsIMessageListenerManager or nsIMessageSender instead. ...
...You should use nsIMessageListenerManager or nsIMessageSender instead. ...
...You should use nsIMessageListenerManager or nsIMessageSender instead. ...
nsIGeolocationProvider
After startup() is called, any geo location change should call callback.update(). ...
...After startup() is called, any geo location change should call callback.update(). ...
...ionUpdate. After the provider has been initialized, any changes to location should call callback.onRequest(). You may find the WiFi access point monitoring service useful if you wish to implement support for WiFi-based location services. See dom/src/geolocation/NetworkGeolocationProvider.js for an example of how to write a geolocation provider. Method overview boolean isReady(); Obsolete since Gecko 1.9.2 void shutdown(); void startup(); void watch(in nsIGeolocationUpdate callback); Methods isReady() Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Reports whether or not the device is ready and has a position. boolean isReady(); Parameters None. Return value true if the device is ready and has a position available to return; otherwis...
nsIHttpChannelInternal
netwerk/protocol/http/nsIHttpChannelInternal.idlScriptable An internal interface for HTTP channels. Using features exposed by this interface is not recommended, as it will change in unpredictable ways. ...
... netwerk/protocol/http/nsIHttpChannelInternal.idlScriptable An internal interface for HTTP channels. Using features exposed by this interface is not recommended, as it will change in unpredictable ways. ...
... localPort PRInt32 The local port number to which the channel is bound. This may throw an NS_ERROR_NOT_AVAILABLE exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsIHttpActivityObserver.isActive attribute is false. See bug 534698 and bug 526207. Read only. proxyInfo nsIProxyInfo Get the proxy info in use by the channel. Read only. Obsolete since Gecko 1.9 remoteAddress AUTF8String The IP address of the remote host to which this channel is bound, in the same format produced by PR_NetAddrToString(). This may throw an NS_ERROR_NOT_AVAILABLE exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsIHttpActivityObserver.isActive attribute is false. See bug 534698 and bug 526207. Read only. remotePort P...
nsIInputStream
A blocking input stream may suspend the calling thread in order to satisfy a call to close(), available(), read(), or readSegments(). A non-blocking input stream, on the other hand, must not block the calling thread of execution. Note: Blocking input streams are often read on a background thread to avoid locking up the main application thread. ...
... input stream, on the other hand, must not block the calling thread of execution. Note: Blocking input streams are often read on a background thread to avoid locking up the main application thread. For this reason, it is generally the case that a blocking input stream should be implemented using thread-safe AddRef and Release. ...
...NS_OK; } // Copy the contents of aStream into aResultBuf as one contiguous // buffer. Use ReadSegments to avoid an intermediate buffer copy. nsresult CopyStream(nsIInputStream* aStream, nsACString& aResultBuf) { uint32_t numRead; return aStream->ReadSegments(AppendSegment, (void*) &aResultBuf, PR_UINT32_MAX, &numRead); } Remarks This interface was frozen for Gecko 1.0. See bug 124465 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsIWriteSegmentFun nsIScriptableInputStream - If you need to read a stream from JavaScript. ...
nsILivemarkService
Implemented by: @mozilla.org/browser/livemark-service;2. ...
... Implemented by: @mozilla.org/browser/livemark-service;2. ...
... Implemented by: @mozilla.org/browser/livemark-service;2. ...
nsILocaleService
intl/locale/idl/nsILocaleService.idlScriptable The Locale service interface. 1.0 66 Introduced Gecko 1.6 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/intl/nslocaleservice;1. To use this service, use: var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"] .getService(Components.interfaces.nsILocaleService); Method overview nsILocale getApplicationLocale(); AString getLocaleComponentForUserAgent(); nsILocale getLocaleFromAcceptLanguage(in string acceptLanguage); nsILocale getSystemLocale(); nsILocale newLocale(in AString aLocale); nsILocale newLocaleObject(in nsILocaleDefinition localeDefinition); Obso...
...Note: This has nothing to do with the locale used for localization of the application (UI text strings and so on.). This method returns something similar to getSystemLocale. nsILocale getApplicationLocale(); Parameters None. Return value The user's OS setting for preferred locale. getLocaleCom...
...perating system. nsILocale getSystemLocale(); Parameters None. Return value The user's OS setting for preferred locale. newLocale() Create a new nsILocale from a locale string. nsILocale newLocale( in AString aLocale ); Parameters aLocale A locale code as described in nsILocale. Return value A nsILocale representing the given locale. newLocaleObject() Obsolete since Gecko 1.9 (Firefox 3) nsILocale newLocaleObject( in nsILocaleDefinition localeDefinition ); Parameters localeDefinition A locale definition as described in nsILocaleDefinition. Return value A nsILocale representing the given locale. Calls to its getCategory method return the values originally passed to the locale definition's addCategory method. ...
nsILoginManager
Implemented by: @mozilla.org/login-manager;1. ...
... Implemented by: @mozilla.org/login-manager;1. ...
... Implemented by: @mozilla.org/login-manager;1. ...
nsILoginManagerStorage
toolkit/components/passwordmgr/public/nsILoginManagerStorage.idlScriptable This interface is implemented by modules that wish to provide storage mechanisms for the Login Manager. 1.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 nsILoginManangerS...
...void searchLogins(out unsigned long count, in nsIPropertyBag matchData, [retval, array, size_is(count)] out nsILoginInfo logins); void setLoginSavingEnabled(in AString aHost, in boolean isEnabled); Attributes Attribute Type Description uiBusy boolean true when a master password prompt is being shown. Read only. Methods addLogin() Called by the Login Manager to store a new login. Gecko 1.9.1 note Default values for the nsILoginMetaInfo properties are created if the specified login doesn't explicitly specify them. void addLogin( in nsILoginInfo aLogin ); Parameters aLogin The login to add to the login storage. countLogins() Implement this method to return the number of logins matching the specified criteria. This method is called, for example, to check to see if there is...
...browser sanitization feature when the user asks to clear all stored passwords. The user interface allows this to be done without getting each login first (which might require knowing the master password). No password should be required in order to remove all logins. void removeAllLogins(); Parameters None. removeLogin() Implement this method to remove the specified login from the login store. Gecko 1.9.1 note The values of any nsILoginMetaInfo properties are ignored. void removeLogin( in nsILoginInfo aLogin ); Parameters aLogin The login to remove from the login store. A login must match completely (except for its nsILoginMetaInfo data) to be removed. searchLogins() Implement this to search for logins in the login manager's data store, returning an array of matching logins. If there...
nsIMemory
xpcom/base/nsIMemory.idlScriptable This interface represents a generic memory allocator. Inherits from: nsISupports Last changed in Gecko 0.9.6 nsIMemory is used to allocate and deallocate memory segments from a heap. The implementation is free to define the heap. NS_GetMemoryManager returns the global nsIMemory instance. Method overview voidPtr alloc(in size_t size); Violates the XPCOM interface guidelines void free(in voidPtr ptr); Violates the XPCOM interface guidelines void heapMinimize(in boolean immediate); boolean isLowMemory(); Deprecated since Gecko 2.0 voidPtr realloc(in voidPtr ptr, in size_t newSize); Violates the XPCOM interface guidelines Methods alloc Allocates a block of memory of a particular size. voidPt...
... Parameters immediate If true, heap minimization will occur immediately if the call was made on the main thread. If false, the flush will be scheduled to happen when the app is idle. isLowMemory Determine if we are in a low-memory situation (what constitutes low-memory is platform dependent). This can be used to trigger the memory pressure observers. Note: This method was deprecated in Gecko 2.0. If you need to monitor low memory conditions, you should watch for the Low memory notifications "memory-pressure" notifications instead. boolean isLowMemory(); Parameters None. Return value true if we are in a low-memory situation. Otherwise false. Note: From Gecko 2.0 always returns false. See bug 592308. realloc() Reallocates a block of memory to a new size. voidPtr realloc( ...
...s the value of aData when an out-of-memory condition occurs. When a nsIMemory instance notifies memory pressure observers, it passes itself as the aSubject parameter in the call to nsIObserverService.notifyObservers(). This allows nsIObserver implementations to observe multiple nsIMemory instances and determine the source of memory pressure notifications. Remarks This interface was frozen for Gecko 0.9.6. See bug 99151 for details. From Gecko 2.0 interfaces are no longer frozen. See also NS_GetMemoryManager nsIObserverService.notifyObservers() nsIObserver nsIObserverService ...
nsIModule
xpcom/components/nsIModule.idlScriptable This interface must be implemented by each XPCOM component. It is the main entry point by which the system accesses an XPCOM component. ...
... only willingness of the module to be unloaded. It is very important to ensure that no outstanding references to the module's code/data exist before returning true. Returning false guaratees that the module will not be unloaded. If the component module is native (that is, as part of a DLL), then this method may be called to determine whether or not the DLL may be unloaded from memory. Note: As of Gecko 1.7, native component modules are never unloaded. getClassObject() Obtains a Class Object from a nsIModule for a given CID and IID pair. This class object can either be query to a nsIFactory or a may be query to a nsIClassInfo. void getClassObject( in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [retval, iid_is(aIID)] out nsQIResult aResult ); Parameters aComp...
...ed, this method will be called so that any unregistration can be preformed. void unregisterSelf( in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr ); Parameters aCompMgr The global component manager. aLocation The location of the nsIModule on disk. aLoaderStr Opaque loader specific string. Remarks This interface was finalized (frozen) for Gecko 0.9.9. See bug 99154 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsIMsgHeaderParser
nsIMsgHeaderParser Defined in comm-central/ mailnews/ mime/ public/ nsIMsgHeaderParser.idl mailnews/mime/public/nsIMsgHeaderParser.idlScriptable ??? Add brief description of Interface ??? ...
... line); void extractHeaderAddressName(in string line, out string name); void extractHeaderAddressNames(in string line, out string userNames); AString makeFullAddress(in AString aName, in AString aAddress); string makeFullAddressString(in string aName, in string aAddress); wstring makeFullAddressWString(in wstring name, in wstring addr); Obsolete since Gecko 1.9 void parseHeaderAddresses(in string line, out string names, out string addresses, out PRUint32 numAddresses); void parseHeadersWithArray(in wstring aLine, [array, size_is(count)] out wstring aEmailAddresses, [array, size_is(count)] out wstring aNames, [array, size_is(count)] out wstring aFullNames, [retval] out unsigned long count); void reformatHeaderAddresses(in s...
...t char* version). string makeFullAddressString( in string aName, in string aAddress ); Parameters aName The name of the sender. This should be in UTF-8. aAddress The address of the sender. This should be in UTF-8. Return value A string of the form name <address>. Exceptions thrown Missing Exception Missing Description makeFullAddressWString() Obsolete since Gecko 1.9 (Firefox 3) wstring makeFullAddressWString( in wstring name, in wstring addr ); Parameters name The name of the sender. This should be in UTF-8. addr The address of the sender. This should be in UTF-8. Return value A string of the form name <address>. Exceptions thrown Missing Exception Missing Description Native code only!parseHeaderAddresses Given a string w...
nsINavHistoryContainerResultNode
toolkit/components/places/public/nsINavHistoryService.idlScriptable A foundation for the interfaces that provide a description of a query result on the Places service that describes a container (which is any kind of grouping, including bookmark folders). ...
... toolkit/components/places/public/nsINavHistoryService.idlScriptable A foundation for the interfaces that provide a description of a query result on the Places service that describes a container (which is any kind of grouping, including bookmark folders). ...
...an be populated easily (for example, for bookmark folders). If it can't be populated easily (for complex history queries, for example), the result is always true. When the container is open, the result is always accurate. This value is intended to be used to see if the "+" should be drawn next to a tree item, indicating that the item can be opened. Read-only. remoteContainerType Obsolete since Gecko 1.9 AUTF8String A string representing the remote container service API that is responsible for this container. If there is no such API, this value is an empty string. Read only. The container may be a RESULT_TYPE_REMOTE_CONTAINER node that has been dynamically generated by the remote container API, or a bookmark folder (RESULT_TYPE_FOLDER) for which some service (such as livemarks) has registered...
nsINavHistoryQuery
This was designed so that most queries can be done in only one SQL query. ...
...This was designed so that most queries can be done in only one SQL query. ...
...ICROseconds since 1 Jan 1970. JavaScript date objects are expressed in MILLIseconds since 1 Jan 1970. Methods getFolders() This method retrieves all the folders with the folder count. void getFolders( [optional] out unsigned long count, [retval,array,size_is(count)] out long long folders ); Parameters count Optional The count of the folders. This optional parameter was required prior to Gecko 2.0. folders The retrieved folders. setFolders() This method sets the folders with the given folder count. void setFolders( [const,array, size_is(folderCount)] in long long folders, in unsigned long folderCount ); Parameters count The count of the folders. folders The folders to be set. clone() This method creates a new query item with the same parameters of this one. nsINavHistoryQu...
nsINavHistoryResult
Result objects represent the model in which the data is stored. External components provide the view and controller pieces of the puzzle; they define how the data looks and how the data is interacted with. ...
...Result objects represent the model in which the data is stored. External components provide the view and controller pieces of the puzzle; they define how the data looks and how the data is interacted with. ...
... boolean If true, notifications are suppressed. This is used to prevent rapid flickering of changes when performing batch or temporary operations on the result structure. viewer nsINavHistoryResultViewer The viewer for this result. The viewer is responsible for actually updating the view object itself, as well as for handling events on the view. Obsolete since Gecko 2.0 Methods addObserver() Adds an observer for changes that occur on the result. void addObserver( in nsINavHistoryResultObserver aObserver, in boolean aOwnsWeak ); Parameters aObserver An object that implements the nsINavHistoryResultObserver interface, which will receive notifications of changes on the result. aOwnsWeak If false, the result will keep a...
nsINavHistoryResultTreeViewer
toolkit/components/places/public/nsINavHistoryService.idlScriptable This interface provides a predefined view adaptor for interfacing Places query results with a tree. 1.0 66 Introduced Gecko 1.8 Inherits from: nsINavHistoryResultObserver Last changed in Gecko 1.9 (Firefox 3) This object removes itself from the associated result when the tree is detached; this prevents circular references. It's important to be aware of this--if you want to reuse the same viewer, you need to keep your own reference to it, then reinitialize it when the tree changes. If you use this object and attach it to a result without attaching it to a tree, then forget about it, it will leak. Method overview nsINavHistoryResultNode nodeForTreeIndex(in unsigned long aIndex); unsign...
...et visits. When you sort by date, the multiple entries will then appear because they will be separated (unless you clicked reload a bunch of times in a row). If you know you'll only ever want one entry per site, you should ask for URIs back instead of visits so it will be more efficient. Default = true. Changing this value is somewhat heavyweight since it will force a tree refresh. ...
...Also returned if there is no tree attached. Methods nodeForTreeIndex() Returns the node for a given row index. This is only valid when a tree is attached. ...
nsINavHistoryService
toolkit/components/places/nsINavHistoryService.idlScriptable This interface provides complex query functions, more fine-grained getters and setters. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19) Implemented by: "@mozilla.org/browser/nav-history-service;1". To use this service, use: var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsINavHistoryService); Method overview AString getPageTitle(in nsIURI aURI); void markPageAsFollowedBookmark(in nsIURI aURI); void markPageAsFollowedLink(in nsIURI aURI); void markPageAsTyped(in nsIURI aURI);...
...e(in nsIURI aURI); void markPageAsFollowedBookmark(in nsIURI aURI); void markPageAsFollowedLink(in nsIURI aURI); void markPageAsTyped(in nsIURI aURI); boolean canAddURI(in nsIURI aURI); long long addVisit(in nsIURI aURI, in PRTime aTime, in nsIURI aReferringURI, in long aTransitionType, in boolean aIsRedirect, in long long aSessionID); Obsolete since Gecko 22.0 nsINavHistoryQuery getNewQuery(); nsINavHistoryQueryOptions getNewQueryOptions(); nsINavHistoryResult executeQuery(in nsINavHistoryQuery aQuery, in nsINavHistoryQueryOptions options); nsINavHistoryResult executeQueries([array,size_is(aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options); ...
...ng the page. This function is public because some components may want to check if this page would go in the history (That is for annotations). boolean canAddURI( in nsIURI aURI ); Parameters aURI The URI that needs to be added to the history system. Return value Returns true if this URI would be added to the history, otherwise returns false. addVisit() Obsolete since Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19) Note: This method was removed in Gecko 22.0. You should use the new async API mozIAsyncHistory.updatePlaces() instead. See this code for how a function to add visits and handle errors using the new API could look like. This method adds a visit for a specific page. This will probably not be commonly used other than for backup/res...
nsIParserUtils
parser/html/nsIParserUtils.idlScriptable Provides non-Web HTML parsing functionality to Firefox extensions and XULRunner applications. 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. Implemented by: @mozilla.org/parserutils;1 as a service: var parserUtils = Components.classes["@mozilla.org/parserutils;1"] .getService(Components.interfaces.nsIParserUtils); Method overview AString convertToPlainText(in AString src, in unsigned long flags, in unsigned long wrapCol); nsIDOMDocumentFragment parseFragment(in AString fragment, in...
...r forms are not removed. To remove these, use SanitizerDropNonCSSPresentation and/or SanitizerDropForms. By default, comments and CSS is removed. To preserve comments, use SanitizerAllowComments. To preserve <style> elements and style attributes on other elements, use SanitizerAllowStyle. -moz-binding is removed from <style> elements and style attributes if present. ...
...on other elements, use SanitizerAllowStyle. -moz-binding is removed from <style> elements and style attributes if present. In this case, properties that Gecko doesn't recognize can get removed as a side effect. Note: If -moz-binding is not present, <style> elements and style attributes, and if SanitizerAllowStyle is specified, the sanitized content may still be XSS dangerous if loaded into a non-Gecko Web engine! AString sanitize( in AString src, in unsigned long flags ); Parameters src The HTML source to parse (C++ callers are allowed but not required to use the same string for the return value). flags Sanitization option flags defined above. Return value The resulting text. ...
nsIPasswordManager
Implemented by: @mozilla.org/passwordmanager;1. ...
...Implemented by: @mozilla.org/passwordmanager;1. ...
...Implemented by: @mozilla.org/passwordmanager;1. ...
nsIPropertyBag
Read only. Methods getProperty() Get a property value for the given name. nsIVariant getProperty( in AString name ); Parameters name The name to return the matching property. Return value The property matching the given name. ...
...Services.appinfo.OS simply tells us WINNT only, this is not helpful to differentiate between Windows XP, Vista, 7, etc. To do this use nsIPropertyBag: Services.sysinfo.getProperty("versi...
...Services.appinfo.OS simply tells us WINNT only, this is not helpful to differentiate between Windows XP, Vista, 7, etc. To do this use nsIPropertyBag: Services.sysinfo.getProperty("version"); //output 5.1 Services.sysinfo.getProperty("name"); //output Windows_NT S...
nsIProtocolProxyService
netwerk/base/public/nsIProtocolProxyService.idlScriptable This interface provides methods to access information about various network proxies. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/network/protocol-proxy-service;1. ...
...to access information about various network proxies. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/network/protocol-proxy-service;1. ...
...locking up the calling thread for a lengthy period of time. By passing this flag to resolve, one can failover to asyncResolve to avoid locking up the calling thread if a PAC query is required. When this flag is passed to resolve, resolve may throw the exception NS_BASE_STREAM_WOULD_BLOCK to indicate that it failed due to this flag being present. Methods resolve() Deprecated since Gecko 18 This method has been removed in Firefox 18. Use resolveAsync instead Previous doc This method returns a nsIProxyInfo instance that identifies a proxy to be used for loading the given URI. Otherwise, this method returns null indicating that a direct connection should be used. If this proxy is unavailable, getFailoverForProxy() may be called to determine the correct secondary proxy to be use...
nsIRadioInterfaceLayer
dom/system/gonk/nsIRadioInterfaceLayer.idlScriptable Used to implement the interface between the Telephony API and the radio hardware in a telephone. 1.0 66 Introduced Gecko 12.0 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Implemented by: @mozilla.org/telephony/system-worker-manager;1. To create an instance, use: var radioInterfaceLayer = Components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getService(Components.interfaces.nsIInterfaceRequestor) .createInstance(Components.interfaces.nsIRadioInterfaceLayer); Method overview void answerCall(in unsigned long callIndex); void deactivateDataCall(in DOMString cid, in DOMString ...
...(in long radioTech, in DOMString apn, in DOMString user, in DOMString passwd, in long chappap, in DOMString pdptype); void startTone(in DOMString dtmfChar); void stopTone(); void unregisterCallback(in nsIRILTelephonyCallback callback); void unregisterDataCallCallback(in nsIRILDataCallback callback); Attributes Attribute Type Description currentState jsval Read only. Obsolete since Gecko 13.0 microphoneMuted bool radioState jsval Read only. speakerEnabled bool Constants Call state constants Constant Value Description CALL_STATE_UNKNOWN 0 CALL_STATE_DIALING 1 CALL_STATE_ALERTING 2 CALL_STATE_BUSY 3 CALL_STATE_CONNECTING 4 CALL_STATE_CONNECTED 5 CALL_STATE_HOLDING 6 CALL_STATE_HELD 7 CALL_STATE_RESUMING 8 CALL_STATE_DISCONNECTIN...
...NECTING 4 CALL_STATE_CONNECTED 5 CALL_STATE_HOLDING 6 CALL_STATE_HELD 7 CALL_STATE_RESUMING 8 CALL_STATE_DISCONNECTING 9 CALL_STATE_DISCONNECTED 10 CALL_STATE_INCOMING 11 DATACALL_STATE_UNKNOWN 0 DATACALL_STATE_CONNECTING 1 DATACALL_STATE_CONNECTED 2 DATACALL_STATE_DISCONNECTING 3 DATACALL_STATE_DISCONNECTED 4 CALL_STATE_RINGING 2 Obsolete since Gecko 14.0 Methods answerCall() void answerCall( in unsigned long callIndex ); Parameters callIndex Missing Description Exceptions thrown Missing Exception Missing Description deactivateDataCall() void deactivateDataCall( in DOMString cid, in DOMString reason ); Parameters cid Missing Description reason Missing Description Exceptions thrown Missing Exception Missing Description dial(...
nsIScreen
widget/nsIScreen.idlScriptable This interface provides information about a display screen. Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Use nsIScreenManager to obtain references to screens. Implemented by: @mozilla.org/gfx/screenmanager;1 as a service: var screen = Components.classes["@mozilla.org/gfx/screenmanager;1"] .getService(Components.interfaces.nsIScreen); Method overview void GetAvailRect(out long left, out long top, out long width, out long height); void GetRect(out long left, out long top, out long width, out long height); void lockMinimumBrightness(in unsigned long brightness); void unlockMinimumBrightness(in unsigned long brightness); Attributes ...
...mber of bits used to represent a color. Read only. pixelDepth long The screen's pixel depth; this is the number of bits used to represent a pixel. Read only. rotation unsigned long The screen's current rotation; you may set this to any of the values listed in Screen rotation constants. This will only have an effect on platforms that support screen rotation. Gecko 1.9.2 note Starting in Gecko 1.9.2, Gecko running on Microsoft Windows reports 24 bits per pixel instead of 32 bits per pixel on 8-bits per color component displays, since this is typically what the caller is actually looking for. Constants Screen brightness constants Constant Value Description BRIGHTNESS_DIM 0 The screen is fully dimmed (that is, off). B...
...pically what the caller is actually looking for. Constants Screen brightness constants Constant Value Description BRIGHTNESS_DIM 0 The screen is fully dimmed (that is, off). BRIGHTNESS_FULL 1 The screen is at full brightness. BRIGHTNESS_LEVELS 2 The number of different brightness levels. Screen rotation constants Requires Gecko 13.0(Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Constant Value Description ROTATION_0_DEG 0 0? of rotation (that is, no rotation, or default orientation). ROTATION_90_DEG 1 90? of rotation. ROTATION_180_DEG 2 180? of rotation. ROTATION_270_DEG 3 270? of rotation. Methods GetAvailRect() Returns a rectangle ind...
nsISelection3
Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. ...
... Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. ...
... Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. ...
nsISelectionPrivate
This page wasn't updated since the initial import in 2011. See the idl file linked above for up-to-date information. ...
...tRangesForIntervalArray(in nsINode beginNode, in PRInt32 beginoffset, in nsINode endNode, in PRInt32 endOffset, in boolean allowAdjacent, in RangeArray results); Native code only! void GetRangesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeArray results); Native code only! Obsolete since Gecko 12.0 long getTableSelectionType(in nsIDOMRange range); void removeSelectionListener(in nsISelectionListener listenerToRemove); void scrollIntoView(in short aRegion, in boolean aIsSynchronous, in short aVPercent, in short aHPercent); void setAncestorLimiter(in nsIContent aContent); Native code only! void setPresShell(in nsIPresShell aPresShell); Nativ...
...represent the range to compare against the selection. allowAdjacent Specifies whether the returned ranges are allowed to touch the input range rather than merely overlapping it. resultCount Returns the number of ranges that overlap (or touch) the input range. results Returns the ranges that overlap (or touch) the input range. Native code only!GetRangesForIntervalCOMArray Obsolete since Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. This method became obsolete in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9). Use GetRangesForIntervalArray() instead. void GetRangesForIntervalCOMArray( in nsIDOMNode be...
nsISmsRequestManager
nsISmsRequestManager dom/sms/interfaces/nsISmsRequestManager.idlScriptable Used to manage SMS related requests and notifications for the WebSMS API 1.0 66 Introduced Gecko 13.0 Inherits from: nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsrequestmanager;1. To create an instance, use: var smsRequestManager = Components.classes["@mozilla.org/sms/smsrequestmanager;1"] .createInstance(Components.interfaces.nsISmsRequestManager); Method overview long addRequest(in nsIDOMMozSmsRequest aRequest); long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest); void notifyCreateMessageList(in long aRequestId, in long aListId, in nsI...
...GotNextMessage( in long aRequestId, in nsIDOMMozSmsMessage aMessage ); Parameters aRequestId A number representing the id of the request. aMessage An SmsMessage. notifyGotSms() void notifyGotSms( in long aRequestId, in nsIDOMMozSmsMessage aMessage ); Parameters aRequestId A number representing the id of the request. aMessage An SmsMessage. ...
...aError A number with an error code. See constants. ...
nsIUpdate
lected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch. This object also contains information about the update that the front end and other application services can use to learn more about what is going on. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsIUpdatePatch getPatchAt(in unsigned long index); nsIDOMElement serialize(in nsIDOMDocument updates); Attributes Attribute Type Description appVersion AString The Application version of this update. billboardURL AString The URL to a page that is typica...
...ror occurred while parsing the patch. READ_ERROR (6) An error occurred while reading the patch. WRITE_ERROR (7) An error occurred while writing the patched application. UNEXPECTED_ERROR (8) An unanticipate type of error occurred. extensionVersion AString The add-on version of this update. Used by the extension system to track compatibility of installed add-ons with this update. Obsolete since Gecko 2.0 installDate long long The date and time at which the update was installed. isCompleteUpdate boolean true if the update is a complete replacement of the existing installation; false if the update is a patch representing the difference between the new version and the existing version. isSecurityUpdate boolean true if the update is a security update. If the update is a security update, a m...
...ad-failed" The update failed to be downloaded. "failed" Installing the update failed. Read only. statusText AString An optional message associated with the update. type AString The type of patch represented by the object: "major" A major new version of the application. "minor" A minor update, such as a security update. version AString The application version of the update.Obsolete since Gecko 2.0 Methods getPatchAt() Retrieves a patch. nsIUpdatePatch getPatchAt( in unsigned long index ); Parameters index The index of the patch to retrieve. Return value An nsIUpdatePatch object describing the specified patch. serialize() Serializes the update object into a DOM element. nsIDOMElement serialize( in nsIDOMDocument updates ); Parameters updates The DOM document into which to se...
nsIWebNavigationInfo
docshell/base/nsIWebNavigationInfo.idlScriptable Exposes a way to get information on the capabilities of Gecko web navigation objects. ...
... docshell/base/nsIWebNavigationInfo.idlScriptable Exposes a way to get information on the capabilities of Gecko web navigation objects. ...
... docshell/base/nsIWebNavigationInfo.idlScriptable Exposes a way to get information on the capabilities of Gecko web navigation objects. ...
nsIWinAppHelper
toolkit/xre/nsIWinAppHelper.idlScriptable Used on Windows only to do some work from a special process that gets created with elevated privileges. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Implemented by: @mozilla.org/xre/app-info;1. To create an instance, use: var xulAppInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIWinAppHelper); The nsIXULAppInfo and nsIXULRuntime interfaces are also implemented by "xre/app-info". ...
...o 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Implemented by: @mozilla.org/xre/app-info;1. To create an instance, use: var xulAppInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIWinAppHelper); The nsIXULAppInfo and nsIXULRuntime interfaces are also implemented by "xre/app-info". Method overview void fixReg(); Obsolete since Gecko 1.9 void postUpdate(in nsILocalFile logFile); Obsolete since Gecko 1.9.2 Attributes Attribute Type Description userCanElevate boolean Read only. Returns true only if all the following conditions are all true at once: The operating system is at least Windows Vista User Account Control is enabled The user is an Administrator The application is not already running with elevated permissi...
...tes Attribute Type Description userCanElevate boolean Read only. Returns true only if all the following conditions are all true at once: The operating system is at least Windows Vista User Account Control is enabled The user is an Administrator The application is not already running with elevated permissions Otherwise it returns false. Methods fixReg() Obsolete since Gecko 1.9 (Firefox 3) Invokes helper.exe with the /fixreg parameter. Note that this parameter was never actually supported. void fixReg(); Parameters None. postUpdate() Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Invokes helper.exe with the /postupdate parameter. This updates the uninstallation log so that the application can be uninstalle...
nsIWindowMediator
xpfe/appshell/public/nsIWindowMediator.idlScriptable The window mediator is a Mozilla component that keeps track of open windows. Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) The two most common uses of nsIWindowMediator are, enumerating all windows of a given type and getting the most recent / any window of a given type. Implemented by: @mozilla.org/appshell/window-mediator;1 as a service: var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); Method overview void addListener(in nsIWindowMediatorListener aListener); boolean calculateZPosition(in nsIXULWindow inWindow, in unsigned long inPosition, in...
...RecentWindow() This is a shortcut for simply fetching the first window in front to back order. nsIDOMWindow getMostRecentWindow( in wstring aWindowType ); Parameters aWindowType Return the topmost window of this type. ("type" is the |windowtype| attribute of the XML <window> element.) If null, return the topmost window of any type. Return value The topmost window. Note: Starting in Gecko 8.0, the returned value is an nsIDOMWindow; previously, it was an nsIDOMWindowInternal. You may need to update your code or recompile binary components, if they use this method. getOuterWindowWithId() Return the outer window with the given ID, if any. nsIDOMWindow getOuterWindowWithId( in unsigned long long aOuterWindowID ); Parameters aOuterWindowID The id of the outer window, e.g., ...
... nsIDOMWindow getOuterWindowWithId( in unsigned long long aOuterWindowID ); Parameters aOuterWindowID The id of the outer window, e.g., as obtained by nsIDOMWindowUtils.outerWindowID. Return value The DOM window with the given ID. If no window with the ID exists, or the window exists but it is an inner window, null is returned instead. See also: Inner and outer windows. Note: Before Gecko 23.0, use nsIDOMWindowUtils.getOuterWindowWithId. windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); if (!windowMediator.getOuterWindowWithId) { windowMediator.getOuterWindowWithId = function (aOuterWindowID) { let win = this.getMostRecentWindow(); let winUtil = win.QueryInterface(Components.inte...
nsIWindowsRegKey
This interface is highly Win32 specific. ...
...This interface is highly Win32 specific. ...
...amed value as a Unicode string. AString readStringValue( in AString name ); Parameters name The name of the value to query. This parameter can be the empty string to request the key's default value. Return value The string contents of the named value as a Unicode string. Note: Unlike writeStringValue(), readStringValue() will work with REG_MULTI_SZ and REG_EXPAND_SZ types. Note: In Gecko 2.0, readStringValue() calls ExpandEnvironmentStrings() on a REG_EXPAND_SZ type. removeChild() This method removes a child key and all of its values. This method will fail if the key has any children of its own. void removeChild( in AString relPath ); Parameters relPath The relative path from this key to the key to be removed. removeValue() This method removes the value with the giv...
nsIWorkerFactory
You don't need to use it anymore to create workers from chrome. Instead, you can just do new Worker or new ChromeWorker. Implemented by: threads/workerfactory;1. ...
...You don't need to use it anymore to create workers from chrome. Instead, you can just do new Worker or new ChromeWorker. Implemented by: threads/workerfactory;1. ...
...You don't need to use it anymore to create workers from chrome. Instead, you can just do new Worker or new ChromeWorker. Implemented by: threads/workerfactory;1. ...
Index
he same way as with a browser. For example, invoking Thunderbird's Help | What's New menu option opens a tab that displays web content. The Thunderbird team can update this content via the website at any time. 18 Cookies In Thunderbird Cookies, Guide, thunderbird In versions of Thunderbird prior to 3 the cookie policy was very restrictive (to RSS only). Thunderbird 3 uses the Gecko cookie policy with some changes. 19 Creating a gloda message query Thunderbird 3, thunderbird This page describes how to programmatically create a message query using gloda, Thunderbird's global database. See the gloda page for background on the component. See Gloda examples for more code samples. 20 DB Views (message lists) MailNews, thunderbird The thre...
... 20 DB Views (message lists) MailNews, thunderbird The thread pane (aka message list) is driven by classes that implement nsIMsgDBView and inherit from nsMsgDBView. These are the main view classes: 24 Events There are a lot of events that can be fired in Mail code. Some of these are standard events, such as those created by the DOM. Others are internal to Gecko or other parts of Mozilla application code. This reference will help you track those events down and learn how to use them. 25 Filelink Providers thunderbird Filelink is a Thunderbird feature that makes it easy for users to upload large attachments to web-based storage services such as Hightail. 26 nsIMsgCloudFileProvider nsIMsgCloudFileProvider is the i...
...of technologies that can seem daunting to new developers. However, in many cases you only need to learn a few concepts to write an extension. 74 Building a Thunderbird extension 1: introduction Add-ons, Extensions, thunderbird Thunderbird is a community managed open-source email application. It shares many of the technologies used by Mozilla Firefox, including JavaScript, the Gecko layout engine, the XUL XML User Interface Language and the XPCOM Cross-Platform Component Object Model. Similar to Firefox, Thunderbird functionality can be enhanced and customized via extensions. 75 Building a Thunderbird extension 2: extension file layout Extensions, thunderbird Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (...
URLs - Plugins
r, uploading files to an FTP server, and sending mail. Uniform resource locator (URL) protocols provide a means for locating and accessing resources that are available on the Internet and on intranets. Plug-ins can request and receive the data associated with URLs of any type that the browser can handle, including HTTP, FTP, news, mailto, and gopher. The table below summarizes URLs supported by Gecko. In addition, Gecko may support URLs not listed on this table. URL Scheme Description about Locates browser information or "fun" pages. file (Host-specific filenames) Locates files on a specific host computer rather than an Internet resource. ftp (File Transfer Protocol) Locates files and directories on Internet hosts for file download. go...
... Description about Locates browser information or "fun" pages. file (Host-specific filenames) Locates files on a specific host computer rather than an Internet resource. ftp (File Transfer Protocol) Locates files and directories on Internet hosts for file download. gopher (Gopher protocol) Locates specified items on a Gopher server. Obsolete since Gecko 2.0 http (Hypertext Transfer Protocol) Locates resources on the Internet. javascript Executes JavaScript code that follows the URL. Netscape-specific. mailto (Electronic mail address) Locates the Internet mailing address of an individual or service. nethelp Displays a NetHelp topic in a NetHelp window. Browser-specific. news (USENET news...
... the URL request was completed and the reason for completion. void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); The instance and url parameters have the same definitions as those of NPN_GetURL. The notifyData parameter contains the private plug-in data passed to the corresponding call to NPN_GetURLNotify and NPN_PostURLNotify. Warning: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), NPN_GetURLNotify() does not notify the plug-in if notifyData is NULL. See bug 638367 for details. Getting the URL and Displaying the Page To retrieve a URL and display it on a specified target page, you use the NPN_GetURL and NPN_GetURLNotify functions. The URL can be displayed in the same window or frame, a new window, or a different window or...
Debugger-API - Firefox Developer Tools
er looked into the language's implementation. It is for use by JavaScript code. JavaScript is both the debuggee language and the tool implementation language, so the qualities that make JavaScript effective on the web can be brought to bear in crafting tools for developers. As is expected of JavaScript APIs, Debugger is a sound interface: using (or even misusing) Debugger should never cause Gecko to crash. Errors throw proper JavaScript exceptions. It is an intra-thread debugging API. Both the debuggee and the code using Debugger to observe it must run in the same thread. Cross-thread, cross-process, and cross-device tools must use Debugger to observe the debuggee from within the same thread, and then handle any needed communication themselves. (Firefox's builtin tools have a protoc...
...ript exceptions. It is an intra-thread debugging API. Both the debuggee and the code using Debugger to observe it must run in the same thread. Cross-thread, cross-process, and cross-device tools must use Debugger to observe the debuggee from within the same thread, and then handle any needed communication themselves. (Firefox's builtin tools have a protocol defined for this purpose.) In Gecko, the Debugger API is available to chrome code only. By design, it ought not to introduce security holes, so in principle it could be made available to content as well; but it is hard to justify the security risks of the additional attack surface. The Debugger API cannot currently observe self-hosted JavaScript. This is not inherent in the API's design, but simply that the self-hosting infrastruc...
... can do so without worrying about interfering with other tools that use their own Debugger instances. Examples Here are some things you can try out yourself that show off some of Debugger's features: Setting a breakpoint in a page, running a handler function when it is hit that evaluates an expression in the page's context. Showing how many objects different call paths allocate. Gecko-specific features While the Debugger core API deals only with concepts common to any JavaScript implementation, it also includes some Gecko-specific features: [Global tracking][global] supports debugging all the code running in a Gecko instance at once--the 'chrome debugging' model. [Object wrapper][wrapper] functions help manipulate object references that cross privilege boundaries. Sourc...
Call Tree - Firefox Developer Tools
Let's expand that: This result is telling us that 614 ...
...Let's expand that: This result is telling us that 614 of those samples, or about 20% of the total cost, are coming from our sort() call. ...
...ould be fairly obvious that the high platform data cost is coming from repeated calls to console.log(): function sort(unsorted) { console.log(bubbleSort(unsorted)); console.log(selectionSort(unsorted)); console.log(quickSort(unsorted)); } It would certainly be worthwhile considering more efficient ways of implementing this. One thing to be aware of here is that idle time is classified as Gecko, so parts of your profile where your JavaScript isn't running will contribute Gecko samples. These aren't relevant to the performance of your site. By default, the Call Tree doesn't split platform data out into separate functions, because they add a great deal of noise, and the details are not likely to be useful to people not working on Firefox. If you want to see the details, check "Show Geck...
DataTransfer - Web APIs
. DataTransfer.files Contains a list of all the local files available on the data transfer. If the drag operation doesn't involve dragging files, this property is an empty list. DataTransfer.items Read only Gives a DataTransferItemList object which is a list of all of the drag data. DataTransfer.types Read only An array of strings giving the formats that were set in the dragstart event. Gecko properties Note: All of the properties in this section are Gecko-specific. DataTransfer.mozCursor Gives the drag cursor's state. This is primarily used to control the cursor during tab drags. DataTransfer.mozSourceNode Read only The Node over which the mouse cursor was located when the button was pressed to initiate the drag operation. This value is null for external drags or if the ca...
...ta transfer contains no data. DataTransfer.setData() Set the data for a given type. If data for the type does not exist, it is added at the end, such that the last item in the types list will be the new format. If data for the type already exists, the existing data is replaced in the same position. DataTransfer.setDragImage() Set the image to be used for dragging if a custom one is desired. Gecko methods Note: All of the methods in this section are Gecko-specific. DataTransfer.addElement() Sets the drag source to the given element. Deprecated methods DataTransfer.mozClearDataAt() Removes the data associated with the given format for an item at the specified index. The index is in the range from zero to the number of items minus one. Removed in Firefox 71. DataTransfer.moz...
...ence page either directly includes an example of the interface or has a link to an example. Specifications Specification Status Comment HTML Living StandardThe definition of 'DataTransfer' in that specification. Living Standard mozCursor, mozItemCount, mozSourceNode, mozUserCancelled, addElement(), mozClearDataAt(), mozGetDataAt(), mozSetDataAt() and mozTypesAt are Gecko specific. HTML 5.1The definition of 'DataTransfer' in that specification. Recommendation Not included in W3C HTML5 Recommendation ...
Guide to the Fullscreen API - Web APIs
.webm"></source> <source src="somevideo.mp4"></source> </video> We can put that video into full-screen mode as follows: var elem = document.getElementById("myvideo"); if (elem.requestFullscreen) { elem.requestFullscreen(); } This code checks for the existence of the requestFullscreen() method before calling it. Presentation differences It's worth noting a key difference here between the Gecko and WebKit implementations at this time: Gecko automatically adds CSS rules to the element to stretch it to fill the screen: "width: 100%; height: 100%". WebKit doesn't do this; instead, it centers the fullscreen element at the same size in a screen that's otherwise black. To get the same fullscreen behavior in WebKit, you need to add your own "width: 100%; height: 100%;" CSS rules to the element...
...: 100%". WebKit doesn't do this; instead, it centers the fullscreen element at the same size in a screen that's otherwise black. To get the same fullscreen behavior in WebKit, you need to add your own "width: 100%; height: 100%;" CSS rules to the element yourself: #myvideo:-webkit-full-screen { width: 100%; height: 100%; } On the other hand, if you're trying to emulate WebKit's behavior on Gecko, you need to place the element you want to present inside another element, which you'll make fullscreen instead, and use CSS rules to adjust the inner element to match the appearance you want. Notification When fullscreen mode is successfully engaged, the document which contains the element receives a fullscreenchange event. When fullscreen mode is exited, the document again receives a fullscr...
...en(). Prefixing Note: Currently, only Firefox 64 and Chrome 71 supports this unprefixed. For the moment not all browsers are implementing the unprefixed version of the API (for vendor agnostic access to the Fullscreen API you can use Fscreen). ...
NameList - Web APIs
Web › API › NameList
Items can be accessed by a 0-based index. The DOM spec does not specify how the collection is to be implemented. Properties NameList.length Read only Methods NameList.contains() Returns a Boolean. NameList.containsNS() Returns a Boolean. ...
...Items can be accessed by a 0-based index. The DOM spec does not specify how the collection is to be implemented. Properties NameList.length Read only Methods NameList.contains() Returns a Boolean. NameList.containsNS() Returns a Boolean. ...
...Items can be accessed by a 0-based index. The DOM spec does not specify how the collection is to be implemented. Properties NameList.length Read only Methods NameList.contains() Returns a Boolean. NameList.containsNS() Returns a Boolean. ...
XMLHttpRequest.multipart - Web APIs
Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. ...
...Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. ...
...Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. ...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
Note that Firefox and Edge also support -webkit-appearance, for compatibility reasons. The source for this interactive example is stored in a GitHub repository. ...
... 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. The -moz-appearance property was used in XUL stylesheets to design custom widgets with platform-appropriate styling. It was also used in the XBL implementations of the widgets that ship with the Mozilla platform. Starting with Gecko/Firefox 80, these uses were changed to -moz-default-appearance, which should never be used outside of internal stylesheets. Compatibility note: If you wish to use this property on websites, you should test it very carefully. Although it is supported in most modern browsers, its implementation varies widely. In older browsers, even the keyword none does not have the same effect on all form eleme...
...ce: textfield; /* "Compat-auto" values, which have the same effect as 'auto' */ appearance: button; appearance: searchfield; appearance: textarea; appearance: push-button; appearance: slider-horizontal; appearance: checkbox; appearance: radio; appearance: square-button; appearance: menulist; appearance: listbox; appearance: meter; appearance: progress-bar; /* Partial list of available values in Gecko */ -moz-appearance: scrollbarbutton-up; -moz-appearance: button-bevel; /* Partial list of available values in WebKit/Blink (as well as Gecko and Edge) */ -webkit-appearance: media-mute-button; -webkit-appearance: caret; Values Standard keywords Value Demo Browser Description none div{ color: black; -moz-appearance:none; -webkit-appearance:none; appear...
<color> - CSS: Cascading Style Sheets
use -moz-FieldText instead. -moz-Dialog Background color for dialog boxes. Should be used with the -moz-DialogText foreground color. -moz-DialogText Text color for dialog boxes. Should be used with the -moz-Dialog background color. -moz-dragtargetzone -moz-EvenTreeRow Background color for even-numbered rows in a tree. Should be used with the -moz-FieldText foreground color. In Gecko versions prior to 1.9, use -moz-Field. See also -moz-OddTreeRow. -moz-html-CellHighlight Background color for highlighted item in HTML <select>s. Should be used with the -moz-html-CellHighlightText foreground color. Prior to Gecko 1.9, use -moz-CellHighlight. -moz-html-CellHighlightText Text color for highlighted items in HTML <select>s. Should be used with the -moz-html-CellHighlig...
...oz-Field. See also -moz-OddTreeRow. -moz-html-CellHighlight Background color for highlighted item in HTML <select>s. Should be used with the -moz-html-CellHighlightText foreground color. Prior to Gecko 1.9, use -moz-CellHighlight. -moz-html-CellHighlightText Text color for highlighted items in HTML <select>s. Should be used with the -moz-html-CellHighlight background color. Prior to Gecko 1.9, use -moz-CellHighlightText. -moz-mac-accentdarkestshadow -moz-mac-accentdarkshadow -moz-mac-accentface -moz-mac-accentlightesthighlight -moz-mac-accentlightshadow -moz-mac-accentregularhighlight -moz-mac-accentregularshadow -moz-mac-chrome-active -moz-mac-chrome-inactive -moz-mac-focusring -moz-mac-menuselect -moz-mac-menushadow -moz-mac-menutextselect -moz-MenuHove...
...ext. Should be used on top of Menu background. -moz-MenuBarHoverText Color for hovered text in menu bars. Often similar to -moz-MenuHoverText. Should be used on top of -moz-MenuHover background. -moz-nativehyperlinktext Default platform hyperlink color. -moz-OddTreeRow Background color for odd-numbered rows in a tree. Should be used with the -moz-FieldText foreground color. In Gecko versions prior to 1.9, use -moz-Field. See also -moz-EvenTreeRow. -moz-win-communicationstext Should be used for text in objects with -moz-appearance: -moz-win-communications-toolbox;. -moz-win-mediatext Should be used 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 ...
Configuring servers for Ogg media - HTTP
bout possible media file types and the codecs used within them in our comprehensive guide to media types and formats on the web. In particular, the article on media container formats will be especially helpful when configuring serers to host media properly. Handle HTTP 1.1 byte range requests correctly In order to support seeking and playing back regions of the media that aren't yet downloaded, Gecko uses HTTP 1.1 byte-range requests to retrieve the media from the seek target position. In addition, Gecko uses byte-range requests to seek to the end of the media (assuming you serve the Content-Length header) in order to determine the duration of the media. Your server should accept the Accept-Ranges: bytes HTTP header if it can accept byte-range requests. It must return 206: Partial content to...
... page is loaded, under the assumption that the user will play it. Configuration for older Firefox versions Serve X-Content-Duration headers Note: As of Firefox 41, the X-Content-Duration header is no longer supported. See bug 1160695 for more details. The Ogg format doesn't encapsulate the duration of media, so for the progress bar on the video controls to display the duration of the video, Gecko needs to determine the length of the media using other means. There are two ways Gecko can do this. The best way is to offer an X-Content-Duration header when serving Ogg media files. This header provides the duration of the video in seconds (not in HH:MM:SS format) as a floating-point value. For example, if the video is 1 minute and 32.6 seconds long, this header would be: X-Content-Duration:...
...ko can do this. The best way is to offer an X-Content-Duration header when serving Ogg media files. This header provides the duration of the video in seconds (not in HH:MM:SS format) as a floating-point value. For example, if the video is 1 minute and 32.6 seconds long, this header would be: X-Content-Duration: 92.6 If your server provides the X-Content-Duration header when serving Ogg media, Gecko doesn't have to do any extra HTTP requests to seek to the end of the file to calculate its duration. This makes the entire process much more efficient as well as more accurate. As an inferior alternative, Gecko can estimate the video length based on the Content-Length. See next point. Don't use HTTP compression for media files One common way to reduce the load on a web server is to use gzip or...
HTTP Index - HTTP
Web › HTTP › Index
ve. 191 User-Agent HTTP, HTTP Header, Reference, User-agent The User-Agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. 192 Firefox user agent string reference Compatibility, Firefox, Firefox 4, Gecko, Gecko 2.0, Guide This document describes the user agent string used in Firefox 4 and later and applications based on Gecko 2.0 and later. For a breakdown of changes to the string in Gecko 2.0, see Final User Agent string for Firefox 4 (blog post). See also this document on user agent sniffing and this Hacks blog post. 193 Vary HTTP, Reference, Response, Response Header, head...
...col (HTTP or HTTPS) that a client used to connect to your proxy or load balancer. Your server access logs contain the protocol used between the server and the load balancer, but not the protocol used between the client and the load balancer. To determine the protocol used between the client and the load balancer, the X-Forwarded-Proto request header can be used. 203 X-Frame-Options Gecko, HAProxy, HTTP, Response Header, Security, nginx The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites. 204 X-XSS-Protection HTTP, Reference, Securi...
...code may be given in the context of the Web Distributed Authoring and Versioning (WebDAV) protocol. 270 511 Network Authentication Required HTTP, HTTP Status Code, Reference, Server error, Status code The HTTP 511 Network Authentication Required response status code indicates that the client needs to authenticate to gain network access. 271 Link prefetching FAQ Gecko, HTML, HTTP, Link, Necko, Performance, Prefetch, Web Development Link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future. A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stor...
Authoring MathML - MathML
box; div.innerHTML = "<math><mspace height='23px' width='77px'/></math>"; document.body.appendChild(div); box = div.firstChild.firstChild.getBoundingClientRect(); document.body.removeChild(div); return Math.abs(box.height - 23) <= 1 && Math.abs(box.width - 77) <= 1; } Alternatively, the following UA string sniffing will allow to detect the rendering engines with native MathML support (Gecko and WebKit). Note that UA string sniffing is not the most reliable method and might break from version to version: var ua = navigator.userAgent; var isGecko = ua.indexOf("Gecko") > -1 && ua.indexOf("KHTML") === -1 && ua.indexOf('Trident') === -1; var isWebKit = ua.indexOf('AppleWebKit') > -1 && ua.indexOf('Chrome') === -1; Mathematical fonts In order to get a good layout or to allow different...
...bKit') > -1 && ua.indexOf('Chrome') === -1; Mathematical fonts In order to get a good layout or to allow different style, it's important to have mathematical fonts available. It's always good to provide a link to MDN's Font Instructions, so that your visitors can verify whether they have appropriate fonts installed on their system. It's also good to provide a fallback with Web fonts. Prior to Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), it was a bit tedious to setup math fonts, see the font instructions for Mozilla 2.0. For Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), this is much simpler and is compatible with any Web rendering engine with MathML support. For example, here is a minimal stylesheet to use Latin Modern for the text and Latin Modern Math for...
...hML expressions using the AsciiMath input syntax. Moreover, a LaTeX-to-MathML input box has also been integrated into SeaMonkey since version 2.28 and into Thunderbird since version 31. Again, the way MathML is handled and the quality of the MathML rendering depends on the mail client. Even if your browser supports MathML, your Webmail may prevent you to send or receive mails with MathML inside. Gecko-based instant messaging clients can integrate a Javascript-based text-to-MathML converter (mentioned below) and then render the MathML expressions generated from the (plaintext) instant messages. For example, there is an Instantbird add-on that handles LaTeX expressions. Conversion from a Simple Syntax There are many simple notations (e.g. wiki or markdown syntaxes) to generate HTML pages. The ...
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
he tag: 6 Namespaces crash course SVG, XML As an XML dialect, SVG is namespaced. It is important to understand the concept of namespaces and how they are used if you plan to author SVG content. Versions of SVG viewers prior to the release of Firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-XML dialect supporting user agents such as Gecko-based browsers which must be very strict. Take some time to understand namespaces now and it will save you all sorts of headaches in the future. 7 Example SVG, XML In this example, we use 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...
...The latter may be described in a later section of the tutorial, while we will focus completely on the first part: Bringing text into an SVG image. 289 Tools for SVG Intermediate, NeedsUpdate, SVG, Tools Now that we covered the basics of the SVG internals, we will take a look at some tools to work with SVG files. 290 SVG animation with SMIL Animation, Firefox 4, Gecko 2.0, SVG, SVG Animation Firefox 4 introduced support for animating SVG using Synchronized Multimedia Integration Language (SMIL). SMIL allows you to: 291 SVG as an Image Images, NeedsContent, SVG SVG images can be used as an image format, in a number of contexts. Many browsers support SVG images in: 292 SVG documentation index SVG Found 383 pages: ...
...0.0", ""). Note the existence of all three arguments setting properties. 380 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. ...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
See SVG animation with SMIL for a brief overview. Full documentation for SVG is forthcoming. Someday. There is also a description of the Mozilla support of the changes in SVG 2. Element implementation status A quick overview of the SVG 1.1 elements and the current status of the native support. Element Notes Structure Module svg Implemented. currentScale and currentTranslate DOM attributes are implemented, but there is no pan and zoom user interface. ...
...tributes: textLength, lengthAdjust tref This feature, present in early draft of the spec, has been removed from it and is therefor not implemented (bug 273171). textPath Implemented. Recently implemented bindings: selectSubString altGlyph Implemented as tspans, no font features as of Gecko 2.0 (bug 456286, bug 571808). altGlyphDef Not implemented. altGlyphItem Not implemented. glyphRef Not implemented. Marker Module marker Implemented. Color Profile Module color-profile Not implemented (bug 427713). ...
... feFuncB Implemented. feFuncA Implemented. Cursor Module cursor Not implemented (bug 177193). Hyperlinking Module a Only xlink:href, xlink:show, xlink:target and xlink:title attributes implemented. View Module view Implemented in Gecko 15.0 (bug 512525). . Scripting Module script Implemented. Animation Module animate Implemented set Implemented animateMotion Implemented animateTransform Implemented animateColor Not implem...
SVG as an Image - SVG: Scalable Vector Graphics
External resources (e.g. ...
... External resources (e.g. ...
... External resources (e.g. images, stylesheets) cannot be loaded, though they can be used if inlined through data: URIs. :visited-link styles aren't rendered. ...
JavaScript Debugger Service - Archive of obsolete content
However, JSD has been removed in favor of the Debugger API. See the tracking bug bug 800200 for more details. Snippets Acquiring the service We acquire the service by calling the XPCOM object. ...
...However, JSD has been removed in favor of the Debugger API. See the tracking bug bug 800200 for more details. Snippets Acquiring the service We acquire the service by calling the XPCOM object. ...
LookupNamespaceURI - Archive of obsolete content
However, due to bug 312019, this method does not work with dynamically assigned namespaces (e.g., those set with Node.prefix). ...
...However, due to bug 312019, this method does not work with dynamically assigned namespaces (e.g., those set with Node.prefix). ...
Windows - Archive of obsolete content
You can get a DOM window's ID using the nsIDOMWindowUtils attribute outerWindowID. Each time a new window is created, it gets assigned an ID one greater than the last created window. This can be used in cases in which you need to uniquely identify a DOM window during the duration of the ap...
... .getWindowEnumerator(); var index = 1; var windowName = "yourWindowName"; while (wenum.hasMoreElements()) { var win = wenum.getNext(); if (win.name == windowName) { win.focus(); return; } index++ } window.open("chrome://to/your/window.xul", windowName, "features"); Uniquely identifying DOM windows Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko, each DOM window has a unique 64-bit ID number. You can get a DOM window's ID using the nsIDOMWindowUtils attribute outerWindowID. Each time a new window is created, it gets assigned an ID one greater than the last created window. This can be used in cases in which you need to uniquely identify a DOM window during the duration of the application's lifespan: var util = win.QueryInterface(Componen...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
ed up in XML and HTML. As shown in Listing 1, it has an extremely simple syntax. By separating the structure of the data, expressed through HTML or XML, and the display style, indicated by CSS, data can be reused better than it is when structural and stylistic markup are both embedded in HTML. There are three CSS specifications (Level 1 through Level 3), with progressively powerful features. The Gecko rendering engine handles nearly all of CSS Level 2 and some of CSS Level 3. Listing 2: CSS code sample body { color: black; background-color: white; } p { margin-bottom: 1em; text-indent: 1em; } JavaScript: The world's most misunderstood language JavaScript is a scripting language first developed in the 1990s, at which time it was created as a way to add dynamic features to web pages...
...tents of the HTML document by manipulating strings, but using the DOM makes it possible to manipulate XML documents in a way that better matches JavaScript's object-oriented nature. In addition, XUL lacks any equivalent for the innerHTML property, so if it weren't for the DOM, dynamic processing would be impossible. There are a number of levels to the DOM with different levels of functionality. Gecko supports nearly all of DOM Level 2 and some of DOM Level 3. With the DOM, the contents of an XML document are handled as a "DOM tree," a collection of element nodes and other nodes. Listing 4 shows an example that deletes the second child element of the element with the "toolbar" id, adds a new button element as a substitute, and sets a label attribute. We do not go into the details of the vari...
Setting Up a Development Environment - Archive of obsolete content
s 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 attributes and methods in one or more interfaces. These IDL files are compiled into binary form and included in the extension as XPT files. To compile an IDL file to XPT, you need a command line tool called xpidl. This tool is included in the Mozilla Gecko SDK. If you need to compile IDLs, go to the SDK page and download a compiled version for your system. Also note any prerequisites you may need. If your system is not listed in the supported builds, you'll have to build the SDK yourself from the Mozilla source. Good luck with that. You should also set up your environment so that xpidl.exe (or just xpidl on other systems) is in the default executa...
...the SDK page and download a compiled version for your system. Also note any prerequisites you may need. If your system is not listed in the supported builds, you'll have to build the SDK yourself from the Mozilla source. Good luck with that. You should also set up your environment so that xpidl.exe (or just xpidl on other systems) is in the default executable path, and also add a variable called GECKO_SDK, that points to your SDK build: export GECKO_SDK=/path/to/your/sdk Our build system should pick it up from there. To make it work in Komodo in Unix-based systems, we add the command to the .bash_login file in the home directory, and we modify the commands to this: bash -c ". ~/.bash_login; make" An example project with XPCOM components is included in the XPCOM section. There is al...
MozOrientation - Archive of obsolete content
You should use that API instead. An event that is repeatedly fired on the window as accelerator data is provided to the browser. Note: This below describes how these values worked for the now obsolete MozOrientation. The X axis represents the amount of right-to-left tilt. This value is 0 if the device is level along the X axis, and approaches 1 as the device is tilted toward the left, and -1 as the device is tilted toward the right. The Y axis represents the amount of front-to-back tilt. ...
...not moving. Moving the device upward causes the value to increase. The value is 0 if the device is being thrust upward. In free fall (weightless or falling as a result of a drop), the value remains -1. In weightlessness, all values would be zero when the device is not moving, regardless of orientation, and would only change when being accelerated. In Firefox versions 3.6, 4, and 5 Gecko utilized MozOrientation which was also built to support orientation data but with different APIs from the specified DeviceOrientationEvent. To normalize between the two you can do something like this: function orientationhandler(evt){ // For FF3.6+ if (!evt.gamma && !evt.beta) { evt.gamma = -(evt.x * (180 / Math.PI)); evt.beta = -(evt.y * (180 / Math.PI)); } // u...
Defining Cross-Browser Tooltips - Archive of obsolete content
ip&quot; above images, but that's not how it was meant to be used. Learn how to define &quot;tooltips&quot; in a cross-browser, standards-friendly way. Authors are used to using the alt attribute to create "tooltips" in Web browsers. The classic example is a "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt attribute are displayed as a "tooltip." Gecko-based browsers such as Mozilla, Netscape 6+, and Compuserve 7 do not support this behavior. See bug 25537 for a lengthy, sometimes passionate discussion of Gecko's behavior in this regard. The Problem According to the HTML 4.01 definition of the alt attribute: alt = text CS For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language o...
...ly clear that the proper method for defining a "tooltip" for an image (or, indeed, for any element) is to use the title attribute. The Solution The most obvious solution is to use the alt and title attributes for their intended purposes, instead of adhering to their historical misuses. A quick check of various user agents showed that title attribute contents were displayed as a "tooltip" in: Gecko-based browsers (Mozilla Firefox, Netscape 6+, etc.) Internet Explorer 5.5+/Win Internet Explorer 5.x/Mac Safari Opera 6.x+ Of these, only IE/Win treated alt text as a "tooltip"; the other browsers did not reproduce this behavior. Authors who are faced with the prospect of editing a large collection of legacy documents should be able to convert their documents using a batch find-and-replace ...
Source code directories overview - Archive of obsolete content
ment for a new Mozilla developer to start learning about the Mozilla code base. This document contains material for SeaMonkey, Firefox, and Toolkit. It is a living document which is (supposed to be) updated monthly according to changes in the Mozilla source tree. See also similar information in Mozilla Source Code Directory Structure, and also see the more detailed overview of how the parts of Gecko fit together. Introduction: Common Subdirectories A common naming scheme is used throughout the Mozilla source trees. At the top level is the name of the product (e.g. seamonkey). At the second level is the name of the module (e.g. the editor directory in seamonkey). The third level is where the common naming scheme usually takes over. Many third level directories contain the base, the public a...
...indow real estate" among all the pieces of content. It resizes and aligns pieces of content according to the CSS1 and CSS2 (cascading style sheets), alignment styles and the content itself. It does not actually render the content; it just assigns different pieces of the window to various content items. This is known as "reflowing" the content. This code is also known by the names, "NGLayout" and "Gecko." lib contains C code used for reference by developers in programming the Mac. It is not used. It shows how to embed the Mozilla browser in a Mac application as well as some sample file-handling code from Apple. mailnews contains C interfaces and code for the mail and news component (i.e. Messenger in Mozilla Classic). It includes all the code for managing mail, reading newsgroup messages, impo...
Using content preferences - Archive of obsolete content
owser.download.lastDir The last directory for any site Use DownloadLastDir.jsm for access to these preferences. browser.upload.lastDir Path of a filesystem directory This preference is stored and retrieved automatically by file upload controls. spellcheck.lang Language code (e.g., "en-US") Private browsing Requires Gecko 9.0(Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), the content preference service always stores preferences on disk. Because of this, in private browsing mode, use of the content preference service needed to be avoided while in private browsing mode; instead, information needed to be stored in memory or preferences had to be avo...
... Thunderbird 9.0 / SeaMonkey 2.6) Prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), the content preference service always stores preferences on disk. Because of this, in private browsing mode, use of the content preference service needed to be avoided while in private browsing mode; instead, information needed to be stored in memory or preferences had to be avoided. Starting in Gecko 9.0, when in private browsing mode, the content preference service stores preferences in memory instead of on disk, and automatically forgets them when leaving private browsing mode. See also nsIContentPrefService nsIContentPrefObserver toSource() (potentially useful for serializing objects for later use with eval()) ...
Download Manager preferences - Archive of obsolete content
A boolean value that indicates whether the anti virus software should try to clean a downloaded file when a virus is detected. Default value is false. browser.download.manager.addToRecentDocs A boolean value that indicates whether or not new downloads should be added to the recent documents list. Default value is true. ...
...ager.showAlertOnComplete A boolean value that indicates whether or not an alert should be shown when downloads complete. Default value is true. browser.download.manager.showWhenStarting A boolean value that indicates whether or not to show the Downloads window when a download begins. The default value is true. browser.download.manager.useWindow Note: in Gecko 1.9.1 in bug 439495 A boolean value indicating whether or not to use the Downloads window (true) or display download status in the status bar (false) in the browser window. Default value is true. browser.download.useDownloadDir A boolean value that indicates whether or not the user's preference is to automatically save files into the download directory. If this value is fal...
GRE - Archive of obsolete content
This document describes how embedders should dynamically link to a GRE. To understand how GREs are registered, see GRE Registration. The XRE project, which means "XUL Runtime Environment", has been replaced by XULRunner. Mozilla Suite: the old GRE There are two different forms for the GRE: the "old" GRE was part of the Mozilla application suite. It was installed with the Windows installer of Mozilla 1.4 through 1.7.x. ...
...ation wishes to use the GRE, it must take careful steps to ensure that it links against the proper libraries. If you link directly against xpcom.dll/libxpcom.so (xpcom.lib import lib), your application will not launch unless xpcom.dll is in your PATH. This prevents dynamically finding a compatible GRE at runtime. Find a compatible GRE Note: Support for locating a standalone glue was removed in Gecko 6.0. To find a compatible GRE, you should use the function GRE_GetGREPathWithProperties() (declared in xpcom/glue/standalone/nsXPCOMGlue.h). This allows the embedder to specify what version(s) of GRE are appropriate, and to specify any special features the GRE must have (currently there are no special features defined). Statically link to xpcomglue.lib (the "standalone glue") The solution is ...
Introducing the Audio API extension - Archive of obsolete content
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. Obsolete since Gecko 28 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Deprecated since Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19)This feature has been 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 t...
...andards. 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. Please note that this document describes a non-standard experimental API. This API has been deprecated since Gecko 22, disabled since Gecko 28, and removed from Gecko 31. You should use the Web Audio API instead. Reading audio streams The loadedmetadata event When the metadata of the media element is available, it triggers a loadedmetadata event. This event has the following attributes: mozChannels: Number of channels mozSampleRate: Sample rate per second mozFrameBufferLength: Number of samples collec...
FAQ - Archive of obsolete content
Archive › Mozilla › Prism › FAQ
he divide in the user experience between web applications and desktop apps. Prism is the codename for the project, and if the functionality provided by Prism becomes a product or is integrated into other products (like Firefox), then it won't necessarily continue to be called by this codename. Is Prism a platform? No, Prism is not a platform. Prism is built on top of the Mozilla platform and its Gecko rendering engine, just like Mozilla Firefox, so it provides the same capabilities to web applications that Firefox provides, including support for HTML, JavaScript, CSS, and <canvas>. At the same time, we're also working to increase the capabilities of those apps by adding features to the Web itself, like support for offline data storage and access to 3D graphics hardware, that will be available ...
...ures to the Web itself, like support for offline data storage and access to 3D graphics hardware, that will be available to web applications in both Prism and Firefox. How is Prism different from XULRunner? Prism is built on top of XULRUnner. Prism is a simple XULRunner application with the main portion of the UI consisting of a XUL <browser> element. How does Prism render web pages? Prism uses Gecko, the same browser rendering system found in Firefox. What operating systems does Prism support? Microsoft Windows 2000 XP Vista Mac OS X 10.3.9+ (Panther) 10.4 (Tiger) 10.5 (Leopard) Linux kernel 2.2.14+ with glibc 2.3.2, XFree86-3.3.6, gtk+2.0, fontconfig/xft, and libstdc++5 ...
XML in Mozilla - Archive of obsolete content
g XML documents with scripts through DOM Serializing XML DOM trees to Javascript Object trees (JXON) Other Supported XML W3C Recommendations Specification or Technology Documentation XHTML W3C Recommendation XML Base W3C Recommendation XLink (simple XLinks only) Obsolete since Gecko 2.0 W3C Recommendation FIXptr Obsolete since Gecko 1.9.1 W3C "proposal" XPointer Framework Obsolete since Gecko 1.9.1 W3C Recommendation XPointer element() scheme Obsolete since Gecko 1.9.1 W3C Recommendation XPointer xmlns() scheme Obsolete since Gecko 1.9.1 W3C Recommendation XPointer f...
... FIXptr Obsolete since Gecko 1.9.1 W3C "proposal" XPointer Framework Obsolete since Gecko 1.9.1 W3C Recommendation XPointer element() scheme Obsolete since Gecko 1.9.1 W3C Recommendation XPointer xmlns() scheme Obsolete since Gecko 1.9.1 W3C Recommendation XPointer fixptr() scheme Obsolete since Gecko 1.9.1 This scheme is simply a wrapper for FIXptr XPointer xpath1() scheme Obsolete since Gecko 1.9.1 Internet-Draft document.load(), document.async Part of DOM Level 3 Load & Save module, a W3C Working Draft XHTML We have reasonable XHTML support, most things should work. We treat XHTML documents differently depending on the mime type (or...
Properties - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Properties archive Full local path of the archive after it is downloaded to the platform specific temp folder. (e.g. C:\TEMP\argstest.xpi) arguments args can be passed in through the triggering APIs by attaching a ? and then the rg string to the xpi URL: (e.g. ...
...eUpdate("http://webserver/argstest.xpi?ARGUMENT_STRING") will result in the value of Install.arguments being ARGUMENT_STRING #). Note that spaces in the arg string are legal. Everything after the question mark is treated as one string which becomes the Install.arguments property. buildID The application build ID in the form 20041231. Note that due to branching (different versions of Gecko with different feature sets might be built on the same day), using this property to "detect" the application version may produce false results. Additionally, the build ID can be 0 for custom builds. jarfile Alias for archive platform Contains information about the platform XPInstall was compiled for/runs on. For example, the value could begin with "Windows", "Macintosh...
A XUL Bestiary - Archive of obsolete content
chrome as an integrated, dynamic thing in some way divorced from the "appcore" is realized in the use of the chrome URL to point to chunks of XUL and their related files. The chrome URL, which appears in place of the HTTP URL in pointers like the following global skin processing instruction: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> Specifies a chrome to be loaded by the Gecko rendering engine. In the example above, the chrome is simply a skin file to be loaded into the XUL file, but the chrome can also be used to load whole chromes, as when a <menuitem> in one window brings up a new chrome: <menuitem value="Mozilla Help" oncommand="window.openDialog('chrome://help/content/help.xul', '_blank', 'chrome,a...
...anges to the overall look of an application. Though this is not yet in the browser, very soon it will be possible to change the look of a whole application dynamically, but only to the extent that the skin is actually defined in the main global.css, or global skin. When you create styles in <style> tags, as style attributes for individual elements, or in custom CSS files, you break the ability of Gecko to skin the application to which your XUL belongs. Widgets Widgets are the pieces that you assemble to make an interface. Menus, toolbars, buttons, and scrollbars are widgets, and so are such general purpose pieces as boxes and springs. These widgets can be created and placed within a XUL file as simple elements: <menu>, <toolbar>, and so on. The syntax for these elements is based for the most ...
International characters in XUL JavaScript - Archive of obsolete content
Gecko 1.8, as used in Firefox 1.5 and other applications, added support for non-ASCII characters in JavaScript files loaded from XUL files. This means that such script files can use any character from virtually any language of the world. For example, they can contain a line: var text = "Ein schones Beispiel eines mehrsprachigen Textes: ???"; This mixes German and Japanese characters. Earlier versions always interpreted JS files loaded from XUL as ISO-8859-1 (Latin-1), in both local and remote cases. Unicode escapes, as discussed below, have always worked. How the character encoding is determined in Gecko 1.8 and later When the JavaScript file is loaded from a chrome:// URL, a Byte Order Mark (FIXME: )(BOM) is used to determine the character encoding of the script. Otherwise, the ...
... can represent virtually all characters in the world. If the script file is loaded via HTTP, the HTTP header can contain a character encoding declaration as part of the Content-Type header, for example: Content-Type: application/javascript; charset=UTF-8 If no charset parameter is specified, the same rules as above apply. Cross-version compatibility If you want the same code to work in both Gecko 1.8 and earlier versions, you must limit yourself to ASCII. However, you can use unicode escapes - the earlier example rewritten using them would be: var text = "Ein sch\u00F6nes Beispiel eines mehrsprachigen Textes: \u65E5\u672C\u8A9E"; An alternative might be to use property files via nsIStringBundle or the XUL <stringbundle> element; this would allow for localization of the XUL. This can no...
appendNotification - Archive of obsolete content
<< XUL Reference home appendNotification( label , value , image , priority , buttons, eventCallback ) Return type: element Create a new notification and display it. If another notification is already present with a higher priority, the new notification will be added behind it. label - label to appear on the notification. This should be either a string, or, from Gecko 37 onwards, you can pass a DocumentFragment with rich content as well. Keep in mind that this is all XUL so using HTML elements for styling might still need additional CSS in order to work as you might expect. value - value used to identify the notification image - URL of image to appear on the notification. If "" then an icon appropriate for the priority level is used. priority - notification priority; see Prio...
... property must also be set to "menu", or "menu-button". isDefault - if True, this is the default button. There can be only one default button. If no button has this set, the first button in the array is the default. type - a string. Valid values are "menu-button" and "menu" which must be set if the button is to provide a popup via the popup property. Notification box events Requires Gecko 9.0(Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) If you specify the eventCallback parameter, it should be a JavaScript function that gets called when interesting things happen related to the notification box. This function receives as its only parameter a string indicating what event occurred. At this time, there's just one event type: "removed". This indicates that the notification box has b...
Using nsIXULAppInfo - Archive of obsolete content
This is useful, for example, for extensions that support several Mozilla-based applications or several versions of a single application. 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. The following sections provide a few examples of using nsIXULAppInfo from JavaScript. ...
...rvice(Components.interfaces.nsIXULAppInfo); if(appInfo.appBuildID >= "2005093006") { // running on a build after 2005093006 } You shouldn't rely on build IDs for releases, as build ID might be different for custom build or a localized version of an application. Platform version nsIXULAppInfo provides version information about both the XUL application (such as Firefox) and the platform (i.e. Gecko or XULRunner). For example, in Firefox 1.5 beta 2 application version is 1.4.1 and platform version is 1.8b5. Be careful to use the information you need, especially when dealing with XULRunner-based applications. Obtaining platform version information is done like this: var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIX...
tabbrowser - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | 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, documen...
...pe: TODO Use the contentWindow.wrappedJSObject to obtain a DOM(html) window object currentURI Type: nsIURI This read-only property contains the currently loaded URL. To change the URL, use the loadURI method. docShell Type: nsIDocShell This read-only property contains the nsIDocShell object for the document. documentCharsetInfo Obsolete since Gecko 12.0 Type: nsIDocumentCharsetInfo This read-only property contains the nsIDocumentCharsetInfo object for the document which is used to handle which character set should be used to display the document. The properties of the nsIDocumentCharsetInfo object were merged into the docshell in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9). homePage Type: strin...
toolbar - Archive of obsolete content
These are toolbars that are not children of a toolbox element. ...
... toolbar flag when opening the window with the window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.">window.open() method. More information 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 ...
Debugging a XULRunner Application - Archive of obsolete content
le, use dump("my text here\n");. This will only work if the pref pref("browser.dom.window.dump.enabled", true) is enabled. To output dump calls instead to a file, set browser.dom.window.dump.file to the file destination where the log should be created and restart the application. If you would like the console messages to appear in the console you used to launch the application, you can use the Gecko Console Redirector. Precompiled binaries are available in the zipped archive https://github.com/matthewkastor/Redirector/archive/master.zip under Redirector-master\Gecko\Console Redirector\bin\Release Copy all the dll's and the exe to wherever you want. Then run Console Redirector.exe /? JavaScript Console To enable the JS console, start XULRunner with the -jsconsole argument. Note: If you ar...
...(function defined below) will output str as a "message" with a speech bubble icon next to it: function jsdump(str) { Components.classes['@mozilla.org/consoleservice;1'] .getService(Components.interfaces.nsIConsoleService) .logStringMessage(str); } For more information about the error console see the Error Console and Browser Console article. Browser Debugger As of Gecko 44, it is no longer possible to start the DevTools server from XUL apps. See bug 1244163. Starting with XULRunner 24, you should use the Firefox Browser Debugger to debug your XULRunner apps. Add the following code to your XUL app: Components.utils.import('resource://gre/modules/devtools/dbg-server.jsm'); if (!DebuggerServer.initialized) { DebuggerServer.init(); // Don't specify a window t...
XULRunner Hall of Fame - Archive of obsolete content
Version updates match the rapid release cycle. Now available with XULRunner 30 with I18N support. MathML support is significant. Includes SMIL audio overlays and IDPF Fixed Layout. celtx All-in-one media pre-production software. ...
...bedded to provide automatic search against journal archives, automatic acquisition of BibTeX information, and automatic downloading of PDFs. SlimerJs SlimerJS is a XulRunner application that can be launched with Firefox, allowing to execute an external javascript script which can manipulate web content. Its goal is to provide a tool like PhantomJs, with the same API, except that it runs Gecko instead of Webkit, and it is not headless (but you can still use xvfb to have a headless SlimerJS). SQLite Manager Manage all your sqlite databases using this lightweight extension for firefox, thunderbird, seamonkey, songbird, komodo etc. SQLite Manager is also available as a XULRunner application. Surebo Browselorer A new, simple yet highly functional and customizable web brow...
2006-09-22 - Archive of obsolete content
ble on Sept. 22nd Internal RC1 testing complete Firefox 2 internal RC1 testing concluded on Sept. 25th. ...
... RC1 testing concluded on Sept. 25th. Areas tested and results available at the above link. ...
2006-12-01 - Archive of obsolete content
tael calls for help getting the next update ff 1.5.x and 2.x. He requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be ready to check their patches in as soon as they are approved. Automatic configure updated back Preed announces that the machine that does the automatic autoconf/configure generation (egg.build.mozilla.org) is back up. Gecko 1.9a1 Triage Meetings Vlad announced that the Gecko devs will be taking over the ff2 triage meetings until Gecko 1.9a1 ships (Nov 28th). Watch #grandparadiso for updates. Discussion November 29th Gecko 1.9/Gran Paradiso Status Meeting Other than annoucing the meeting, this thread discusses where else can info about what happens at the meetings be found (since the agenda often seems bare). m.d...
... November 27 Weekly Project Status Meeting: (agenda) ...
2006-09-06 - Archive of obsolete content
Threading in XPCOM Rules on threading in XPCOM or to Firefox extensions. ...
... Threading in XPCOM Rules on threading in XPCOM or to Firefox extensions. ...
NPN_GetURLNotify - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. url Pointer to the URL of the request. Can be of any type, such as HTTP, FTP, news, or mailto. target Name of the target window or frame, or one of several special target names. For values, see NPN_GetURL(). ...
...browser calls NPP_URLNotify() after it has finished loading the URL. If the target is null, the browser calls NPP_URLNotify() after closing the stream by calling NPN_DestroyStream(). If this function is called with a target parameter value of _self or a parent to _self, this function should return NPERR_INVALID_PARAM. This is the only way to notify the plug-in once it is deleted. Warning: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), NPN_GetURLNotify() does not notify the plug-in if notifyData is NULL. See bug 638367 for details. See also NPN_GetURL() NPN_PostURL() NPN_PostURLNotify() NPP_URLNotify() NPP ...
NPN_GetValue - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value); Parameters This function has the following parameters: instance Pointer to the current plug-in instance. variable Information the call gets. ...
...rigin converted to NFKC-encoded (normalized) UTF-8. Memory for this string must be freed by the plugin via NPN_MemFree(). For more information, see the document origin specification. NPNVpluginDrawingModel: (Mac only) NPNVsupportsQuickDrawBool : (Mac only) NPNVsupportsCoreGraphicsBool : (Mac only) value Function returns the name of the plug-in in the value parameter. Gecko 1.9.2 note Starting with Gecko 1.9.2 (Firefox 3.6), the variables NPNVserviceManager, NPNVDOMElement, and NPNVDomWindow are no longer supported. Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes. Description NPN_GetValue returns the browser information set with ...
NPN_ReloadPlugins - Archive of obsolete content
NPN_ReloadPlugins() lets you install a new plug-in and load it, or to remove a plug-in, without having to restart the browser. ...
...unction has the following parameter: reloadPages Whether to reload pages. If true, all pages are reloaded once the plugins are reloaded; otherwise, they aren't. Description NPN_ReloadPlugins() reads the Plugins directory for the current platform and reinstalls all of the plug-ins it finds there. Normally, if you add or remove any plug-ins, the browser does not see them until you restart Gecko. NPN_ReloadPlugins() lets you install a new plug-in and load it, or to remove a plug-in, without having to restart the browser. You could use this function as part of the plug-in's installation process. See also NPN_Version() ...
NPN_UserAgent - Archive of obsolete content
This can be used to handle variations in different browsers (or versions thereof) when implementing your plug-in. Syntax #include <npapi.h> const char* NPN_UserAgent(NPP instance); Parameters The function has the following parameter: instance Pointer to the current plug-in instance. Returns A pointer to a buffer that contains the user agent field of the browser. Description The user agent is the part of the HTTP header that identifies the browser during transfers. You can use this information to verify that the expected browser is in use, or you can use it in combination with NPN_Version() to supply different code for different versions of the same browser. ...
... buffer that contains the user agent field of the browser. ...
NPP - Archive of obsolete content
You specify one of these to any NPAPI function that needs to know which plug-in to work with. Syntax typedef struct _NPP { void* pdata; /* plug-in private data */ void* ndata; /* Mozilla private data */ } NPP_t; typedef NPP_t* NPP; Fields The data structure has the following fields: pdata A value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser. ...
...lds: pdata A value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser. ndata A private value, owned by the browser, which is used to store data associated with the instance; this value should not be modified by the plug-in. Description Gecko creates an NPP structure for each plug-in instance and passes a pointer to it to NPP_New(). This pointer--which is an opaque instance handle of a plug-in--identifies the instance on which API calls should operate. NPP contains private instance data for both the plug-in and the browser. The NPP_Destroy() function informs the plug-in when the NPP instance is about to be deleted; after this call ret...
Making sure your theme works with RTL locales - Archive of obsolete content
ll have a right margin instead (or -moz-margin-start), arrows that pointed right will have to point left and vice versa, and so on. A screenshot of Firefox 2 in Hebrew What you need to do At this stage you might ask yourself, "How would I know what language is my theme installed on? Should I make a special theme for these locales?" Don't despair: making a theme RTL-compatible is fairly easy! Gecko 1.9.2 and later Gecko 1.9.2 introduced the :-moz-locale-dir CSS pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right. :-moz-locale-dir(rtl) matches if the user interface is being rendered right to left. Example toolbar[iconsize="large"][mode="icon...
...Example toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 396px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button:-moz-locale-dir(rtl) { -moz-image-region: rect(0px 516px 34px 480px); } This specifies the default, left-to-right version of the button, then offers an override if the user's interface is being rendered in right-to-left mode. Gecko 1.9.1 (Firefox 3.5) and earlier The chromedir attribute Firefox, Thunderbird and SeaMonkey expose an attribute named chromedir on certain elements. All you have to do is add CSS rules to your theme that test for the value of this attribute, and use that to apply any RTL-specific rules that you may have. That's how the default theme works, so you can use it as an example. toolbar[iconsize="larg...
Browser Feature Detection - Archive of obsolete content
ent() true true true Document.createTextNode() true true true Document.createComment() true true true Document.createCDATASection() true false true Document.createProcessingInstruction() true false true Document.createAttribute() true true true Document.createEntityReference()Obsolete since Gecko 7 (method present but only returns null: bug 9850) false false Document.getElementsByTagName() true true true DOM Core Level 2 Support for properties/methods in document name Firefox 1.5 IE 6 & 7 Opera 8.54 - 9.01 Document.doctype true true true Document.implementation true true true Document.docume...
...ent() true true true Document.createTextNode() true true true Document.createComment() true true true Document.createCDATASection() true false true Document.createProcessingInstruction() true false true Document.createAttribute() true true true Document.createEntityReference()Obsolete since Gecko 7 true false false Document.getElementsByTagName() true true true Document.importNode() true false true Document.createElementNS() true false true Document.createAttributeNS() true false true Document.getElementsByTagNameNS() true false true Document.getElementById() true true true...
Packages - Archive of obsolete content
Created by The Packages object is a top-level, predefined JavaScript object. You can automatically access it without using a constructor or calling a method. Description The Packages object lets you access the public methods and fields of an arbitrary Java class from within JavaScript. ...
... Created by The Packages object is a top-level, predefined JavaScript object. You can automatically access it without using a constructor or calling a method. Description The Packages object lets you access the public methods and fields of an arbitrary Java class from within JavaScript. ...
background-size - Archive of obsolete content
Should not the "Browser compatibility" table also list Google Chrome and Konqueror? Chome is not mentioned at all, but is becoming increasingly popular. Konqueror is listed below the table, which seems inconsistent. Znerd 04 August 2009 Chrome, Iron, Icab4, OmniWeb etc. are based on WebKit, like Netscape 6-8, SeaMonkey, Camino, Flock, Fennec, Blackbird etc. are based on Gecko. Both layout engines are mentioned in the table. People should refer to the WebKit and Gecko version to get the info they need. Agreed; we should definitely encourage people to look stuff up by engine rather than browser. These tables should be revised over time to list Gecko, WebKit, Internet Explorer, and Opera, with perhaps a tooltip on each that provides details on which browsers are encompassed by each. I'm go...
...nd all CSS property pages ; ) Start with -webkit-background-size and investigate support of contain and cover keywords and "omitted second value" behavior. [I assume it's the same as Safari, since they just backported a WebKit patch into KHTML. But we need facts, rather than assumptions.] Btw, some time ago I'v listed Opera in the property template table and removed Netscape because Netscape is Gecko based and Opera has a global market share of > 2% (> 40% in some European countries). User:Jurgen Jeka 2009-08-04 <hr> Is there anyway to have the -moz-border-image only apply if -moz-background-size is not supported? I'm guessing not, just asking because having both rules in for 3.6 creates a strange effect: -moz-border-image gets inherited by every element on the page User:robertc 2009-08-08 ...
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
Shortly before Mozilla 0.9.4 was finished, a bug was introduced that affects the sizing of list item markers (such as the numbers in an ordered list). While this bug was corrected shortly after 0.9.4 was finished, the bug still affects all Netscape 6.2.x versions, as well as Compuserve 7.0. The Problem In affected browsers, list item markers will very often appear to be too big compared to the text in the list item itself. ...
...s will not use the font size of the list item text, but will instead stay the same as the user's default font size. See bug 97351 for more details. The Solution Fortunately, there are Mozilla-specific CSS-like rules that can be used to correct both problems. The following rule is derived from Mozilla's html.css file: *|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;} This rule tells Gecko-based browsers to use the computed value of font-size for the marker's parent, which is the list item itself. Thus the font sizes of the marker and the content will be the same. Since this rule is not valid CSS, it will prevent the validation of any stylesheet that contains it. One solution is to move the rule into its own stylesheet, and accept that the stylesheet in question will never validat...
The Business Benefits of Web Standards - Archive of obsolete content
cantly reduces rendering differences in various browsers. Using validation tools such as the W3C Validator helps by spotting coding errors and making sure HTML code is well-formed, which eliminates ambiguity in parsing by browsers. ...
...tools such as the W3C Validator helps by spotting coding errors and making sure HTML code is well-formed, which eliminates ambiguity in parsing by browsers. Standards Embrace New Browsers More and more browsers, other than Internet Explorer for Windows, are used to surf the web: Windows: MSIE, browsers using Mozilla's Gecko rendering engine, Opera Mac: MS-Tasman (IE/Mac's rendering engine), Gecko-based browsers, Safari, Opera Linux: Gecko-based browsers, KHTML-based browsers, Opera Overall, 5 different rendering engines are used to surf the web using dozens of browsers on 3 platforms. According to many sources, Gecko-based browsers are now much more common than Netscape 4.x and MSIE 4 browsers, and it is increasing significantly with time. Firefox alone has been downloaded more than 5...
Index - Game development
Vertex Shaders transform shape positions into 3D drawing coordinates. Fragment Shaders compute the renderings of a shape's colors and other attributes. 25 Async scripts for asm.js Games, JavaScript, asm.js, async Every medium or large game should compile asm.js code as part of an async script to give the browser the maximum flexibility to optimize the compilation process. In Gecko, async compilation allows the JavaScript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in Firefox 28). To see the difference, toggle javascript.options.parallel_parsing in about:config. 26 Audio for Web games Audio, Games, Web Audio API, audio ...
... Games, NeedsContent, Network, P2P, WebRTC, data channels The WebRTC (Web Real-Time Communications) API is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels. This article explains more about this, and shows you how to use libraries to implement data channels in your game. 39 Tools for game development Games, Gecko, Guide, JavaScript On this page you can find links to our game development tools articles, which eventually aims to cover frameworks, compilers, and debugging tools. 40 asm.js Deprecated, JavaScript, asm.js Asm.js is a specification defining a subset of JavaScript that is highly optimizable. This article looks at exactly what is permitted in the asm.js subset, what impr...
Rendering engine - MDN Web Docs Glossary: Definitions of Web-related terms
A rendering engine is software that draws text and images on the screen. ...
... A rendering engine is software that draws text and images on the screen. ...
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
called request headers in such a context. In addition, CORS defines a subset of request headers as simple headers, request headers that are always considered authorized and are not explicitly listed in responses to preflight requests. ...
...Insecure-Requests: 1 If-Modified-Since: Mon, 18 Jul 2016 02:36:04 GMT If-None-Match: "c561c68d0ba92bbeb8b0fff2a9199f722e3a621a" Cache-Control: max-age=0 Strictly speaking, the Content-Length header in this example is not a request header like the others, but an entity header: POST /myform.html HTTP/1.1 Host: developer.mozilla.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 Content-Length: 128 Learn more Technical knowledge List of all HTTP headers ...
MDN Web Docs Glossary: Definitions of Web-related terms
ARPA Arpanet Array ASCII Asynchronous ATAG Attribute B Bandwidth Base64 Baseline beacon Bezier curve BiDi BigInt Blink Block Block (CSS) Block (scripting) Block cipher mode of operation Boolean Boot2Gecko Bootstrap Bounding Box Breadcrumb Brotli Browser Browsing context buffer C Cache Cacheable CalDAV Call stack Callback function Canonical order Canvas Card sorting CardDAV caret CDN Certificate authority ...
...Paint First paint First-class Function Flex Flex Container Flex Item Flexbox Forbidden header name Forbidden response header name Fork Fragmentainer frame rate (FPS) FTP FTU Function Fuzz testing G Gaia Garbage collection Gecko General header GIF GIJ Git Global object Global scope Global variable Glyph Gonk Google Chrome GPL GPU Graceful degradation Grid Grid Areas Grid Axis Grid Cell Grid Column Grid container Grid Lines Grid Row ...
Client-Server Overview - Learn web development
but not the actual content itself, which is in the body): GET https://developer.mozilla.org/search?q=client+server+overview&topic=apps&topic=html&topic=css&topic=js&topic=api&topic=webdev HTTP/1.1 Host: developer.mozilla.org Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Referer: https://developer.mozilla.org/ Accept-Encoding: gzip, deflate, sdch, br Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7 Accept-Language: en-US,en;q=0.8,es;q=0.6 Cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; csrftoken=zIPUJsAZv6pcgCBJSCj1zU6pQZbfMUAT; dwf_section_edi...
...eviously, though the first line identifies this request as a POST. ...
Android-specific test suites
ither a full build or an artifact build. All of the suites are configured by and invoked using Gradle. Android-test Runs Android-specific local unit tests. These tests are local -- they run on your development machine and do not require an Android device or Android emulator. Local unit tests are the fastest to develop and execute, but they can only test Java code; there's no connection to the Gecko rendering engine. Use these to test Java data structures and logic, and to ensure that basic Android integration works. They should always be preferred to on-device Robocop tests. See https://developer.android.com/training/testing/unit-testing/local-unit-tests.html for more details. Running android-test To run android-test, first build Firefox for Android with your changes; then run ./mach an...
... produce an HTML report. While developing, you can launch these tests from within Android Studio, which is the fastest way to iterate on code and tests. Disabling one failing test There is no manifest listing the Android local unit tests. To disable a single test, edit the source code and insert JUnit's @Ignore annotation before the existing @Test annotation. For example, to disable org.mozilla.gecko.permissions.testSuccessRunnableIsExecutedIfPermissionsAreGranted, add @Ignore as follows: ... @RunWith(TestRunner.class) public class TestPermissions { @Ignore @Test public void testSuccessRunnableIsExecutedIfPermissionsAreGranted() { ... Contact information android-test is currently owned by :sebastian and :nalexander. File tickets in the Firefox for Android product in Bugzilla.
A bird's-eye view of the Mozilla framework
cuses on the architecture of the overall framework supporting the Mozilla application suite, not the architecture of the individual applications themselves. Prerequisites This 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), an...
... 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 is loaded, the NGLayout engine (also known as Gecko) parses the contents into a DOM tree, and handles the layout and rendering of the document pages. The NGLayout engine also parses XUL UI controls into a DOM tree and handles rendering of the UI. Core Services Modules such as the NGLayout engine comprise the core application services available to other core modules, and XUL packages Core application modules are implemented as a set of one ...
Command line options
ly. seamonkey -edit www.mozilla.org -inspector URL Start with the DOM Inspector, if installed, and inspect the given URL (where URL is optional). -jsdebugger Start application with browser toolbox (formerly browser debugger). That is different to Venkman debugger (see option -venkman). -jsconsole Start application with the error console, or, in Firefox, the browser console. -purgecaches Gecko (layout engine) has a JavaScript cache, which is not reset on startup, this clears it. -start-debugger-server port Firefox only. Start the debugger server on port. This will enable another instance of Firefox to connect the Firefox developer tools to this Firefox instance. See the article on remotely debugging Firefox desktop. The port argument is optional, and if it is omitted, the server wil...
... be run as admin / root. --register-user Registers XULRunner for a single user. --unregister-global Unregisters XULRunner for all users. --unregister-user Unregisters XULRunner for a single user. Chrome -chrome chrome_URL Load the specified chrome. firefox -chrome chrome://inspector/content -register chrome_URL Register the specified chrome, but do not start application. Add-ons Gecko 1.9.2 note -install-global-extension and -install-global-theme have been removed from Gecko 1.9.2 and upwards. -install-global-extension /path/to/extension Installs the extension into the application directory. The parameter is the path to the extension. You must have administrative privileges. -install-global-theme /path/to/theme Same as above, but for themes. You must have administrative...
Simple Firefox for Android build
...
... ...
CSS -moz-bool-pref() @supports function
HTML <div id="pref-test"> This will have a green background if the <code>test</code> preference is enabled. ...
... HTML <div id="pref-test"> This will have a green background if the <code>test</code> preference is enabled. ...
Chrome-only CSS reference
Mozilla › Gecko › Chrome › CSS
UA stylesheets.) Note: Most of the CSS properties exposed to the Web in general are also usable in Chrome stylesheets: see the CSS documentation for a list of these. -moz-window-draggingThe -moz-window-dragging CSS property specifies whether a window is draggable or not. ...
...It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties.ov...
HTML parser threading
anning the tail of document.write() data when the parser blocks without parsing the document.write() data to completion. nsHtml5StreamParser has one tokenizer/tree builder pair for parsing data from the network. Additionally, each nsHtml5Parser has an associated nsHtml5TreeOpExecutor that turns the output (tree operations; discussed later) of the portable parser core into actions performed on the Gecko DOM. Initialization An nsHtml5Parser is constructed without an nsHtml5StreamParser due to legacy code structure around parser creation. If the parser is not script-created, nsHtml5Parser::MarkAsNotScriptCreated() is called to create an nsHtml5StreamParser for the nsHtml5Parser. Due to legacy interface design oddities, an nsHtml5Parser is initialized by calling nsHtml5Parser::Parse(nsIURI*, nsIReq...
... on a per-tree op basis.) If the executor isn't reading from a stage, it calls nsHtml5Parser::ParseUntilBlocked() to parse potential document.write()-generated data into tree ops. The outer loop then has an inner loop that iterates over the tree ops in the executor's queue and calls Perform on each one. Parser termination is checked before each tree op for an early return, because, unfortunately, Gecko expects parsers to be able to terminate immediately. After each tree op except the last one in the queue, the clock time is checked to see if RunFlushLoop() has spent too much time without returning to the event loop. If too much time has been spent, a runnable for calling RunFlushLoop() again is dispatched and an early return made before all tree ops have been executed. (Only the already execute...
Extending a Protocol
otocol PWindowGlobal { // stuff... manages PEcho; child: // stuff... parent: async PEcho(); // more stuff... } If the above additions are unclear, please see the final implementation of PEcho as a diff in Phabricator - search for "PWindowGlobal.ipdl". Congrats! We've now set up the bi-directional relationship between PWindowGlobal and PEcho at the protocol level. We've told Gecko who manages who, and what messages we want to send. Now we actually need to implement the "EchoChild" and "EchoParent" actors to handle sending and receiving messages. And we also need to implement the actual management of these objects by dom/ipc/WindowGlobalChild.{h|cpp} and dom/ipc/WindowGlobalParent.{h|cpp}. If we now do ./mach build, it complains that "fatal error: 'mozilla/dom/EchoChild.
...v); // other stuff already in the file... scroll to the end and add private member: RefPtr<EchoChild> mEchoChild; } // namespace dom } // namespace mozilla Navigator.cpp - GetEchoChild() Now, add the following includes at the top of the file: #include "mozilla/dom/EchoChild.h" #include "mozilla/dom/WindowGlobalChild.h" To the "NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Navigator)" we can now tell Gecko that mEchoChild can participate, so let's add: NS_IMPL_CYCLE_COLLECTION_UNLINK(mEchoChild) Now, the GetEchoChild() private method will do the intial setup for us. EchoChild* Navigator::GetEchoChild(ErrorResult& aRv) { if (!mEchoChild) { if (!mWindow) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } auto windowGlobalChild = mWindow->GetWindowGlobalChild(); // L...
PBackground
This article outlines what PBackground is, and how it works. IPDL recap IPDL is a language used to define "protocols" -- essentially formalized versions of how two things can communicate. It is similar in some respects to IDL and WebIDL. At build time the IPDL compiler automatically generates a large amount of C++ glue code from the IPDL files. ...
...ocesses A lot of code "just works" in the content process. But some things, such as APIs that need to manipulate files or device settings (e.g. geolocation) cannot run in the content process because it has restricted privileges. Instead, these APIs must ask the chrome process to do something on their behalf via an IPDL protocol. This has lead to a rather awkward pattern seen in some parts of the Gecko codebase, looking something like this (try searching for GeckoProcessType_Default in DXR): if (XRE_GetProcessType() == GeckoProcessType_Default) { DoTheThing(arguments); } else { mIPDLProtocol->SendDoTheThing(arguments); } This can get unwieldy very quickly, so a better solution was needed. PBackground PBackground exists to solve such problems. It connects a designated "background" thread...
NetUtil.jsm
gth); NetUtil.asyncCopy(istream, ostream, function(aResult) { if (!Components.isSuccessCode(aResult)) { // an error occurred! } }) asyncFetch() The asyncFetch() method opens an input source, asynchronously, and gives an nsIInputStream containing the data obtained to the callback provided. The callback may then consume data from the input stream passed to the callback. Note: Prior to Gecko 2, the input source was required to be specified as an nsIChannel. Note: Support for specifying an nsIInputStream as the input source was added in Gecko 5. asyncFetch( aSource, aCallback ); Parameters aSource The source to open asynchronously. This may be specified as an nsIURI, nsIFile, nsIChannel, nsIInputStream or as a string specifying the URL to open. aCallback A function th...
...ta. aOriginCharset The optional character set to use when interpreting aWhatToLoad as a string; this is ignored if aWhatToLoad is not a string. Defaults to UTF-8 if not provided. aBaseURI The base URI for the spec, specified as an nsIURI. Only used if aWhatToLoad is a string. newURI() The newURI() method creates a new nsIURI. This method wraps the nsIIOService.newURI(). Note: Starting in Gecko 2, this method supports specifying an nsIFile as the target of the URI. In previous versions of Gecko, you must use a string to specify the URI. nsIURI newURI( aTarget, [optional] aOriginCharset, [optional] aBaseURI ); Parameters aTarget Specifies the target of the URI as either a URI string or (starting in Gecko 2) as an nsIFile. aOriginCharset The optional character set for the ...
Uplifting a localization from Central to Aurora
file changes added 22 changesets with 23 changes to 46 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) OK, let's make sure we're not talking relbranches: hg heads --template '{node} {branches}\n' This is printing something like 5131e147fa50c28ec858c7d9fd1ba201ea2a433b 4da525ed77699794c56081791bd46cc85983f6f8 9bc7e6c58fc091c8cd0e8d9e1dbc7e6f592772a7 GECKO20b12_2011022218_RELBRANCH 230e99fada602842d9630e673077ef9f1ab34247 GECKO20b12pre_20110216_RELBRANCH 41a4357884d7bcc50e69c71014124d3af2482afe COMM20b11_20110203_RELBRANCH 2ec6ad14e7168ebeb999b1e8ae10632ae4c9df23 GECKO20b11_2011020209_RELBRANCH d68e647ac3c0fee709c13abb0f03fac24a1a5d29 GECKO20b11pre_20110126_RELBRANCH 7ff37dc6837669363a51ad3fd2874ac845d312d5 GECKO20b10_2011012115_RELBRANCH...
...So yes, you need to merge those two. hg merge If this just passes, you want to commit, and you probably want to use a commit message like "merging central and aurora". You can safely push this to l10n-central already, in particular if you don't plan to do further updates on aurora. ...
Fonts for Mozilla's MathML engine
iate glyphs for the Arabic Mathematical Alphabetic Symbols. If you are likely to need these characters, we recommend to install the XITS or Amiri fonts. Installation without Administrator Privilege If you need to install fonts on a system without adminstrator privilege, the easiest option is to use math font the MathML-fonts add-on. Note that using the add-on is not optimal since it forces your Gecko browser to load a CSS stylesheet on each page you visit as well as Web math fonts on all pages with MathML content. A better alternative on UNIX systems is to install the OTF files for Latin Modern Math and STIX into some local font folder and (if necessary) to run fc-cache on it. On OS X and Linux, the standard paths are ~/Library/Fonts/ and ~/.fonts. Fonts with a MATH table You can actually r...
...See the Authoring MathML page for details and try the MathML Torture Test. You can use FontForge and FontTools to edit the MATH table and create your own mathematical fonts. ...
MathML Accessibility in Mozilla
This table below provides a list of MathML constructions and how they are read in Mozilla applications for various platforms: Windows: MathML support is provided by NVDA, which actually delegates math reading to the proprietary MathPlayer plugin. ...
...efox 27.0 / Thunderbird 27.0 / SeaMonkey 2.24). Mozilla and NVDA developers essentially do not have control on how mathematical formulas are read, please contact Design Science for any inquiries. Mac: MathML support is provided by VoiceOver. In bug 1175269 and bug 1001641, we relied on the WebKit's NSAccessibility MathML tree to expose the main constructions. Hence basic support is available in Gecko 41.0 (Firefox 41.0 / Thunderbird 41.0 / SeaMonkey 2.38) and we are still trying to keep in sync with WebKit/VoiceOver. Note that VoiceOver is proprietary so we do not have control on Improvements to MathML accessibility in VoiceOver. Linux: MathML support is provided by the development version of Orca. We try to keep in sync with WebKit/ATK/Orca developments. At the moment, it is recommended to ...
Power profiling overview
d blocked I/O system calls receiving data. Maintaining C-state residency is crucial to keep power consumption low, and so reducing wakeup frequency is one of the best ways to reduce power consumption. One consequence of the existence of C-states is that observations made during power profiling -- even more than with other kinds of profiling -- can disturb what is being observed. For example, the Gecko Profiler takes samples at 1000Hz using a timer. Each of these samples can trigger a wakeup, which consumes power and obscures Firefox's natural wakeup patterns. For this reason, integrating power measurements into the Gecko Profiler is unlikely to be useful, and other power profiling tools typically use much lower sampling rates (e.g. 1Hz.) P-states Intel processors also support multiple P-stat...
...Many power problems are caused by either high CPU usage or high wakeup frequency. Use one of the low-context tools to determine if this is the case (e.g. on Mac use powermetrics.) If so, follow that up by using a tool that gives high-context measurements, which hopefully will identify the cause of the problem. For high CPU usage, many profilers can be used: Firefox's dev tools profiler, the Gecko Profiler, or generic performance profilers. For high wakeup counts, use dtrace or perf or TimerFirings logging. On Mac workloads that use graphics, Activity Monitor's "Energy" tab can tell you if the high-performance GPU is being used, which uses more power than the integrated GPU. If neither CPU usage nor wakeup frequency identifies the problem, more ingenuity may be needed. Looking at...
Localization Use Cases
naturally-sounding message, we must know the gender of the subject. Solution In L20n, the localizer can define the gender (or, in fact, any arbitrary trait) as an attribute of the entity. ...
...First, there is DeviceStorageHelper.showFormatedSize (sic): function showFormatedSize(element, l10nId, size) { if (size === undefined || isNaN(size)) { element.textContent = ''; return; } // KB - 3 KB (nearest ones), MB, GB - 1.2 MB (nearest tenth) var fixedDigits = (size < 1024 * 1024) ? 0 : 1; var s...
Midas
Once Midas is invoked, a few more methods of the document object become available. You can try demo of this here. ...
... built-in rich text editor. Midas can be enabled via JavaScript on an HTML document. When Midas is enabled, the document becomes editable by the user. Scripting for Midas is based on the DHTML commands supported by Internet Explorer. Internet Explorer supports the ability to make an entire document editable by setting the designMode property of the document object; this is how Midas is invoked in Gecko. Internet Explorer also supports the ability to edit specific elements using the contentEditable attribute; Starting with Firefox 3, Gecko also supports contentEditable. Once Midas is invoked, a few more methods of the document object become available. You can try demo of this here. Properties document.designMode By setting this property to "on", the document becomes editable. Notes Sinc...
Multithreading in Necko
multithreaded image decoding). However, most Necko protocols utilize background threads. ...
...multithreaded image decoding). However, most Necko protocols utilize background threads. ...
Getting SpiderMonkey source code
including Windows, as long as on Windows you are using the MozillaBuild bash shell. Getting the latest SpiderMonkey source code from Mercurial The Mercurial repository at https://hg.mozilla.org/mozilla-central/ hosts the latest SpiderMonkey sources. Mercurial is also known as hg. The following command line downloads the entire Mozilla repository, including the full change history and a lot of Gecko and Firefox source code that isn't part of SpiderMonkey. It also changes to the SpiderMonkey directory (js/src). hg clone https://hg.mozilla.org/mozilla-central/ cd js/src To avoid getting the full change history, click the zip or gz links at https://hg.mozilla.org/index.cgi/mozilla-central/file/tip. This fetches a snapshot of the current Mozilla tree. If you have problems with the instructio...
...ou have problems with the instructions above, you can read the full details of using Mercurial to get Mozilla code here. That page also contains links to several bundles, which can be useful if you have a poor network connection. Getting the latest SpiderMonkey source code from Git The following command line downloads the entire Mozilla repository, including the full change history and a lot of Gecko and Firefox source code that isn't part of SpiderMonkey. It also changes to the SpiderMonkey directory (js/src). git clone https://github.com/mozilla/gecko-dev.git cd gecko-dev/js/src If you want a faster (about 5 times as of January 2015) download, try doing a shallow clone (no version control history). git clone --depth 1 https://github.com/mozilla/gecko-dev.git If you have any problems c...
Garbage collection
is gray during the mark phase if it has been queued for marking. In SpiderMonkey, an object is queued for marking if it is on the mark stack and is not black. Thus, the gray objects from CS literature are not represented explicitly. See also: gray, below. gray SpiderMonkey instead uses "gray" to refer to objects that are not black, but are reachable from "gray roots". Gray roots are used by the Gecko cycle collector to find cycles that pass through the JS heap. Handle In our GC, a Handle is a pointer that has elsewhere been registered by a root. In other words, it is an updatable pointer to a GC thing (it is essentially a Cell** that the GC knows about.) root A starting point to the GC graph traversal, a root is known to be alive for some external reason (one other than being reachable by ...
...A starting point to the GC graph traversal, a root is known to be alive for some external reason (one other than being reachable by some other part of the GC heap.) weak pointer In common CS terminology, a weak pointer is one that doesn't keep the pointed-to value live for GC purposes. Typically, a weak pointer value has a get() method that returns a null pointer if the object has been GC'd. In Gecko/SpiderMonkey, a weak pointer is a pointer to an object that can be GC'd that is not marked through. Thus, there is no get() method and no protection against the pointed-to value getting GC'd--the programmer must ensure that the lifetime of the pointed-to object contains the lifetime of the weak pointer. TODO make sure this is correct. white In common CS terminology, an object is white during th...
Mozilla Projects
mportant that the update information retrieved has not been tampered with since being written by the add-on author. Specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels. Midas Midas is the code name for Gecko's built-in rich text editor. Midas can be enabled via JavaScript on an HTML document. When Midas is enabled, the document becomes editable by the user. Scripting for Midas is based on the DHTML commands supported by Internet Explorer. Internet Explorer supports the ability to make an entire document editable by setting the designMode property of the document object; this i...
...or. Midas can be enabled via JavaScript on an HTML document. When Midas is enabled, the document becomes editable by the user. Scripting for Midas is based on the DHTML commands supported by Internet Explorer. Internet Explorer supports the ability to make an entire document editable by setting the designMode property of the document object; this is how Midas is invoked in Gecko. Internet Explorer also supports the ability to edit specific elements using the contentEditable attribute; Starting with Firefox 3, Gecko also supports contentEditable. Once Midas is invoked, a few more methods of the document object become available. Mozinfo Throughout mozmill and other Mozilla python code, checking the unde...
Task graph
How does this work? A "decision task" is created to decide what to do with the push. The decision task creates a lot of additional tasks. These tasks include build and test tasks, along with lots of other kinds of tasks to build docker images, build toolchains, perform analyses, check syntax, and so on. These tasks are arranged in a "task graph", with some tasks (e.g., tests) depending on others (builds). Once its prerequisite tasks complete, a dependent task begins. The result of each task is sent to TreeHerder where developers and sheriffs can track the status of the push. ...
... on others (builds). Once its prerequisite tasks complete, a dependent task begins. The result of each task is sent to TreeHerder where developers and sheriffs can track the status of the push. The outputs from each task, log files, Firefox installers, and so on, appear attached to each task when it completes. These are viewable in the Task Inspector. All of this is controlled from within the Gecko source code, through a process called task-graph generation. This means it's easy to add a new job or tweak the parameters of a job in a try push, eventually landing that change on an integration branch. The details of task-graph generation are documented in the source code itself, including a some quick recipes for common changes. ...
Accessibility API Implementation Details
These pages contain documentation on Mozilla specific implementation details of Assistive Technology APIs. AT APIs SupportThis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support Gecko-based software. ...
...ecko-based software. We provide for them the support of these products on Windows, Linux/Unix and OS X platforms.AT DevelopmentThe accessibility of computer software has seen drastic improvements over the past two decades. This article (from 2007) reviews the progress and technology as it has developed. XForms AccessibilityThis article provides a quick guide to how accessibility is handled in Gecko for XForms.XUL AccessibilityThis article shows how XUL control elements are mapped to accessibility API. It is much in progress. ...
Mozilla internal string guide
y prefers UTF-8. If your C++ code is interacting with Rust code, using UTF-8 in nsACString and merely validating it when converting to Rust strings is more efficient than using nsAString on the C++ side. Networking code prefers 8-bit strings. Networking code tends to use 8-bit strings: either with UTF-8 or Latin1 (byte value is the Unicode scalar value) semantics. JS and DOM prefer UTF-16. Most Gecko code uses UTF-16 for compatibility with JS strings and DOM string which are potentially-invalid UTF-16. However, both DOM text nodes and JS strings store strings that only contain code points below U+0100 as Latin1 (byte value is the Unicode scalar value). Windows and Cocoa use UTF-16. Windows system APIs take UTF-16. Cocoa NSString is UTF-16. Gtk uses UTF-8. Gtk APIs take UTF-8 for non-file pa...
...TF-16 for compatibility with JS strings and DOM string which are potentially-invalid UTF-16. However, both DOM text nodes and JS strings store strings that only contain code points below U+0100 as Latin1 (byte value is the Unicode scalar value). Windows and Cocoa use UTF-16. Windows system APIs take UTF-16. Cocoa NSString is UTF-16. Gtk uses UTF-8. Gtk APIs take UTF-8 for non-file paths. In the Gecko case, we support only UTF-8 file paths outside Windows, so all Gtk strings are UTF-8 for our purposes though file paths received from Gtk may not be valid UTF-8. To assist with ASCII, Latin1, UTF-8, and UTF-16 conversions, there are some helper methods and classes. Some of these classes look like functions, because they are most often used as temporary objects on the stack. Short zero-terminat...
Receiving startup notifications
See The startup process for details on how this now works, if you're interested in specifics. ...
...pplication 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, the component will receive these startup notifications, including: xpcom-startup Sent when XPCOM finishes starting up. Most application features are not yet available at this point, but XPCOM itself is. app-startup Sent when the application has finishe...
Components.utils.Sandbox
eaned up at the same time as the content itself. sandboxName A string value which identifies the sandbox in about:memory (and possibly other places in the future). This property is optional, but very useful for tracking memory usage of add-ons and other JavaScript compartments. A recommended value for this property is an absolute path to the script responsible for creating the sandbox. As of Gecko 13 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10), if you don't specify a sandbox name it will default to the caller's filename. sandboxPrototype A prototype object for the sandbox. The sandbox will inherit the contents of this object if it's provided. Passing a content window object, setting wantXrays:true (default) and using an extended principal provides a clean, isolated execution...
...Use wantGlobalProperties instead. wantXrays A Boolean value indicating whether the sandbox wants Xray vision with respect to same-origin objects outside the sandbox. Default: true. "Xray vision" is exactly the same Xray behavior that script always gets, by default, when working with DOM objects across origin boundaries. This is primarily visible for chrome code accessing content...
Components.utils.import
Components.utils.import was introduced in Firefox 3 and is used for sharing code between different scopes easily. For example, you can import XPCOMUtils.jsm to avoid copy/pasting long XPCOM component registration boilerplate in your component files. See Using JavaScript code modules for more details. Note: Prior to Gecko 2.0, JavaScript code modules could only be loaded using file: or resource: URLs. Gecko 2.0 adds support for loading modules from chrome: URLs, even those inside JAR archives. Syntax Components.utils.import(url [, scope]); // Or, if you use a tool such as jslint which reports compiler errors for the above, Components.utils["import"](url [, scope]); Parameters url A string of the URL of the script to be loaded. The URL must point to a file on the disk, possibly in a...
...tax Components.utils.import(url [, scope]); // Or, if you use a tool such as jslint which reports compiler errors for the above, Components.utils["import"](url [, scope]); Parameters url A string of the URL of the script to be loaded. The URL must point to a file on the disk, possibly in a JAR. scope An optional object to import onto; if omitted, the global object is used. Under Boot2Gecko, the scope is not optional. If your code is meant to work on all platforms, you should always provide a scope. In case of doubt, this is generally a good scope. return value the module's global object. use of the return value is discouraged since it grants access to the module's internal properties which are not part of its public API. import throws if it encounters an error (like a synt...
JavaXPCOM
JavaXPCOM is very similar to XPConnect (JavaScript-XPCOM bridge), and uses XPIDL. Note: JavaXPCOM was included in XULRunner up through version 1.9.2. ...
...luded in XULRunner up through version 1.9.2. It has been removed in XULRunner 2, and is not actively maintained. Documentation JavaXPCOM Development How to get and build the source, as well as how to view and report bugs. Sample code There are several Java test applications checked in to the tree that give examples on how to embed Gecko or init XPCOM from within Java. Embedding Mozilla in a Java Application using JavaXPCOM XULRunner ships with the JavaXPCOM component, which allows Java code to interact with XPCOM objects. As you will see in this article, working with XPCOM objects in Java is not that much different than doing so in C++. View All... Community View Mozilla Emb...
IAccessible2
other-licenses/ia2/Accessible2.idlNot scriptable Please add a summary to this article. ...
... other-licenses/ia2/Accessible2.idlNot scriptable Please add a summary to this article. ...
IAccessibleComponent
Coordinates used by the functions of this interface are specified in different coordinate systems. Their scale is the same and is equal to that of the screen coordinate system. ...
...Coordinates used by the functions of this interface are specified in different coordinate systems. Their scale is the same and is equal to that of the screen coordinate system. ...
IAccessibleEditableText
Note that even a read only text object can support the copy capability so this interface is not limited to editable objects. ...
...Note that even a read only text object can support the copy capability so this interface is not limited to editable objects. ...
IAccessibleHypertext
A typical implementation is to implement this interface on the smallest text object such as a paragraph of text. ...
...A typical implementation is to implement this interface on the smallest text object such as a paragraph of text. ...
IAccessibleTable
In this case IAccessible2.indexInParent() will return the child index which then can be used when calling rowIndex() and columnIndex(). However, in some cases that kind of implementation will not be possible. ...
...In this case IAccessible2.indexInParent() will return the child index which then can be used when calling rowIndex() and columnIndex(). However, in some cases that kind of implementation will not be possible. ...
IAccessibleTable2
If you want to support older applications you should also support the IAccessibleTable interface. ...
...If you want to support older applications you should also support the IAccessibleTable interface. ...
IAccessibleTableCell
other-licenses/ia2/AccessibleTableCell.idlNot scriptable This interface gives access to the cells of a two-dimensional table. ...
... other-licenses/ia2/AccessibleTableCell.idlNot scriptable This interface gives access to the cells of a two-dimensional table. ...
IAccessibleText
IA2_TEXT_BOUNDARY_SENTENCE is optional. When a method doesn't implement this method it must return S_FALSE. Typically this feature would not be implemented by an application. ...
...IA2_TEXT_BOUNDARY_SENTENCE is optional. When a method doesn't implement this method it must return S_FALSE. Typically this feature would not be implemented by an application. ...
IAccessibleValue
This interface lets you access the value and its upper and lower bounds. ...
...This interface lets you access the value and its upper and lower bounds. ...
amIWebInstallInfo
toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable This interface is used by the default implementation of amIWebInstallListener to communicate with the running application and allow it to warn the user about blocked installs and start the installs running. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void install(); Attributes Attribute Type Description installs nsIVariant An array of AddonInstall objects. Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. originatingWindow nsIDOMWindow ...
...Attributes Attribute Type Description installs nsIVariant An array of AddonInstall objects. Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. originatingWindow nsIDOMWindow The window that started the installs. Read only. Note: Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), this was an nsIDOMWindowInternal. Methods install() Starts all installs. void install(); Parameters None. ...
imgIContainerObserver
image/public/imgIContainerObserver.idlScriptable An interface to implement to listen to activities on an imgIContainer object. 1.0 66 Introduced Gecko 1.7 Inherits from: nsISupports Last changed in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9) If you wish to listen for activities on an imgIContainer, you should implement the frameChanged() method. Method overview void frameChanged(in imgIRequest aRequest, in imgIContainer aContainer, [const] in nsIntRect aDirtyRect); Native code only! Methods Native code only!frameChanged Called when the frame for an image container has changed. void frameChanged( in imgIRequest aRequest, in imgIContainer aContainer, [const] in nsIntRect aDirtyRect ); Parameters aRequest The ...
...ed. void frameChanged( in imgIRequest aRequest, in imgIContainer aContainer, [const] in nsIntRect aDirtyRect ); Parameters aRequest The image request for which the change occurred. aContainer The image container that changed. aDirtyRect A rectangle indicating the portion of the image container that changed. Notes The aRequest parameter was added to this method in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9). See also imgIDecoderObserver imgIContainer ...
imgIDecoderObserver
Load notifications are fired as the image is loaded from the network or filesystem. Decode notifications are fired as the image is decoded. ...
...Load notifications are fired as the image is loaded from the network or filesystem. Decode notifications are fired as the image is decoded. ...
jsdIStackFrame
Warnings reported as errors. Makes eval() use the last object on its 'obj' param's scope chain as the ECMA 'variables object'. Private data for this object is an nsISupports object. Attempting to alter this bit will result in an NS_ERROR_ILLEGAL_VALUE. OPT_* values above, OR'd together. Last version set on this context. Scripts typically select this with the "language" attribute. See the VERSION_* consts on jsdIDebuggerService. ...
...n context. Read only. functionName AUTF8String Function name executing in this stack frame. Read only. isConstructing boolean True if stack frame is constructing a new object. Read only. isDebugger boolean True if stack frame represents a frame created as a result of a debugger evaluation. Read only. isNative boolean True if stack frame represents a native frame. Read only. Obsolete since Gecko 2.0 JSDContext JSDContext Internal use only. Read only. Native code only! JSDStackFrameInfo JSDStackFrameInfo Internal use only. Read only. Native code only! JSDThreadState JSDThreadState Internal use only. Read only. Native code only! line unsigned long Current line number (using the script's pc to line map.) Read only. pc unsigned long Current program counter in this stack frame. Read...
mozIAsyncFavicons
Simply QueryInterface() the nsIFaviconService to this interface. As an alternative, you can just use PlacesUtils.favicons from JavaScript. ...
...Simply QueryInterface() the nsIFaviconService to this interface. As an alternative, you can just use PlacesUtils.favicons from JavaScript. ...
mozIAsyncHistory
toolkit/components/places/mozIAsyncHistory.idlScriptable This interface allows you to add multiple visits to a single URL in a batch. ...
... toolkit/components/places/mozIAsyncHistory.idlScriptable This interface allows you to add multiple visits to a single URL in a batch. ...
mozIColorAnalyzer
Preference is given to colors that are more interesting. ...
...Preference is given to colors that are more interesting. ...
mozIPlaceInfo
guid String Read only: The globally unique id of the place. placeId long Read only: The machine-local (internal) id of the place. title String Read only: The title associated with the place. uri nsIURI Read only: The URI of the place. ...
... guid String Read only: The globally unique id of the place. placeId long Read only: The machine-local (internal) id of the place. title String Read only: The title associated with the place. uri nsIURI Read only: The URI of the place. ...
mozIRepresentativeColorCallback
void onComplete( in boolean success, [optional] in unsigned long color ); Parameters success True if analysis was successful, false otherwise. ...
...void onComplete( in boolean success, [optional] in unsigned long color ); Parameters success True if analysis was successful, false otherwise. ...
mozIStoragePendingStatement
The mozIStoragePendingStatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement. storage/public/mozIStoragePendingStatement.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports Method overview void cancel(); Methods cancel() Cancels the pending statement. ...
...underbird 3.1 / Fennec 1.0) Inherits from: nsISupports Method overview void cancel(); Methods cancel() Cancels the pending statement. Fails only if you attempt to cancel the operation more than once. Note: For read statements, such as SELECT, once you cancel the statement, you will receive no further notifications about results. void cancel(); Parameters None. Return value In versions of Gecko prior to Gecko 1.9.2, this returned a boolean value that was true if the query was canceled successfully or false if not. Starting with Gecko 1.9.2, this information is no longer provided and the method doesn't return a value. See also Storage mozIStorageConnection mozIStorageStatement ...
mozIStorageService
storage/public/mozIStorageService.idlScriptable This interface lets you open a mozIStorageConnection to a database file, as well as create backups of an unopened database file. This is the only way to open a database connection. ...
... storage/public/mozIStorageService.idlScriptable This interface lets you open a mozIStorageConnection to a database file, as well as create backups of an unopened database file. This is the only way to open a database connection. ...
mozIStorageVacuumParticipant
Add more details here. ...
...Add more details here. ...
nsIAccessible
<< Gecko AT Interfaces Page Summary The nsIAccessible interface is a cross-platform interface that supports platform-specific accessibility APIs like MSAA and ATK. Contains the sum of what's needed to support IAccessible as well as ATK's generic accessibility objects. Can also be used by in-process accessibility clients to get information about objects in the accessible tree. The accessible tree is a subset of nodes in the DOM tree -- such as documents, focusable elements and text. Mozilla creates the implementations of nsIAccessible on demand. [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)] interface nsIAccessible : nsISupports { ... }; accessible/public/nsIAccessible.idlScriptable Please add a summary to this article. ...
...sible tree. The accessible tree is a subset of nodes in the DOM tree -- such as documents, focusable elements and text. Mozilla creates the implementations of nsIAccessible on demand. [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)] interface nsIAccessible : nsISupports { ... }; accessible/public/nsIAccessible.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Overview This section provides short overview of methods and attributes of this interface. All methods and attributes are grouped by categories. Role, states and name These includes main properties used to describe the accessible. nsIAccessible.role to get the role of the accessible nsIAccessible.getState() to get states of the accessibe ...
nsIAccessibleImage
This method is the same as nsIAccessible.getBounds() excepting coordinate origin parameter. ...
...This method is the same as nsIAccessible.getBounds() excepting coordinate origin parameter. ...
nsIAccessibleProvider
See constants for details. Read only. ...
...See constants for details. Read only. ...
nsIAccessibleScrollType
SCROLL_TYPE_BOTTOM_RIGHT 0x01 Scroll the bottom right of the object or substring to the bottom right of the window (or as close as possible). ...
... SCROLL_TYPE_BOTTOM_RIGHT 0x01 Scroll the bottom right of the object or substring to the bottom right of the window (or as close as possible). ...
nsIAccessibleStateChangeEvent
Read only. Methods isEnabled() boolean isEnabled(); Parameters None. Return value Returns true if the state is turned on. ...
...Read only. Methods isEnabled() boolean isEnabled(); Parameters None. Return value Returns true if the state is turned on. ...
nsIAccessibleTextChangeEvent
Read only. modifiedText DOMString The inserted or removed text. Read only. start long Returns offset of changed text in accessible. Read only. ...
...Read only. modifiedText DOMString The inserted or removed text. Read only. start long Returns offset of changed text in accessible. Read only. ...
nsIAccessibleTreeCache
Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. A private interface to operate with tree accessible. accessible/public/nsIAccessibleTreeCache.idlNot scriptable Please add a summary to this article. ...
...bsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. A private interface to operate with tree accessible. accessible/public/nsIAccessibleTreeCache.idlNot scriptable Please add a summary to this article. ...
nsIApplicationCache
Each entry in the cache can be marked with a set of types, specified in the Constants section. All application caches with the same group ID belong to a cache group. ...
...Each entry in the cache can be marked with a set of types, specified in the Constants section. All application caches with the same group ID belong to a cache group. ...
nsIApplicationCacheNamespace
If a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match. ...
...If a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match. ...
nsIApplicationCacheService
netwerk/base/public/nsIApplicationCacheService.idlScriptable This interface manages the set of application cache groups that manage offline resources for web applications. ...
... netwerk/base/public/nsIApplicationCacheService.idlScriptable This interface manages the set of application cache groups that manage offline resources for web applications. ...
nsIAuthInformation
After the user entered the authentication information, it should set the attributes of this object to indicate to the caller what was entered by the user. ...
...After the user entered the authentication information, it should set the attributes of this object to indicate to the caller what was entered by the user. ...
nsIAuthPrompt2
It can be used to prompt users for authentication information, either synchronously or asynchronously. This interface is implemented by @mozilla.org/login-manager/prompter;1. ...
...It can be used to prompt users for authentication information, either synchronously or asynchronously. This interface is implemented by @mozilla.org/login-manager/prompter;1. ...
nsIAuthPromptCallback
They must not call any method on this interface before nsIAuthPrompt2.asyncPromptAuth() returns. ...
...They must not call any method on this interface before nsIAuthPrompt2.asyncPromptAuth() returns. ...
nsICategoryManager
xpcom/components/nsICategoryManager.idlScriptable This interface provides access to a data structure that holds a list of name-value pairs, called categories, where each value is a list of strings. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/categorymanager;1. To use this service, use: var categoryManager = Components.classes["@mozilla.org/categorymanager;1"] .getService(Components.interfaces.nsICategoryManager); Method overview string addCategoryEntry(in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace); void deleteCategory(in string aCategory); void deleteCategoryEntry(in string aCategory, in stri...
...portion of this snippet disables plugins from loading in the future, it does not user the category manager but it is included for completness of the example. var CONTENT_TYPE = 'application/pdf'; // Update the category manager in case the plugins are already loaded. ...
nsIChannel
Then, the URI can be fetched by calling open() or asyncOpen(). ...
...set before the channel has been opened provides a hint to the channel on what the charset should be. The behavior is similar to contentType. The value of the contentCharset attribute is a mixed case string. contentLength int64_t The length of the data associated with the channel if available. A value of -1 indicates that the content length is unknown. Note: As of Gecko 19.0, this parameter changed from long to int64_t. In earlier versions callers could get the "content-length" property as 64-bit value by QueryInterfacing the channel to nsIPropertyBag2, if that interface is exposed by the channel. contentType ACString The MIME type of the channel's content if available. Note: The content type can often be wrongly specified (For ...
nsIChannelPolicy
Channels can be created with this interface placed in the property bag and upon redirect, the interface can be transferred from the old channel to the new channel. ...
...Channels can be created with this interface placed in the property bag and upon redirect, the interface can be transferred from the old channel to the new channel. ...
nsIChromeRegistry
chrome/public/nsIChromeRegistry.idlScriptable Provides access to the chrome registry; you can use this to get information about chrome documents that have been registered. ...
...erits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Implemented by: @mozilla.org/chrome/chrome-registry;1 as a service: var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"] .getService(Components.interfaces.nsIChromeRegistry); Method overview void canonify(in nsIURI aChromeURL); Obsolete since Gecko 1.8 void checkForNewChrome(); nsIURI convertChromeURL(in nsIURI aChromeURL); boolean wrappersEnabled(in nsIURI aURI); Violates the XPCOM interface guidelines Constants Constant Value Description NONE 0 PARTIAL 1 FULL 2 Methods canonify() Obsolete since Gecko 1.8 (Firefox 1.5 ...
nsIClipboardDragDropHooks
widget/public/nsIClipboardDragDropHooks.idlScriptable Interfaces for overriding the built-in drag, drop, copy, and paste implementations in the content area and editors. Use this to do things such as prevent a drag from starting, adding or removing data and flavors, or preventing the drop. ...
...occur. AllowDrop() will be called MANY times during drag so ensure that it is efficient. Method overview boolean allowDrop(in nsIDOMEvent event, in nsIDragSession session); boolean allowStartDrag(in nsIDOMEvent event); boolean onCopyOrDrag(in nsIDOMEvent aEvent, in nsITransferable trans); boolean onPasteOrDrop(in nsIDOMEvent event, in nsITransferable trans); Methods allowDrop() Tells gecko whether a drop is allowed on this content area. boolean allowDrop( in nsIDOMEvent event, in nsIDragSession session ); Parameters event The DOM event (drag gesture). session The drag session from which client can get the flavors present or the actual data. Return value true indicates to the Operating System that if a drop does happen on this browser, it will be accepted. Otherwise, false to...
nsICommandLineHandler
The entries in this category are read in alphabetical order, and each category value is treated as a service contract ID implementing this interface. By convention, handlers with ordinary priority should begin with "m". ...
...The entries in this category are read in alphabetical order, and each category value is treated as a service contract ID implementing this interface. By convention, handlers with ordinary priority should begin with "m". ...
nsIComponentRegistrar
xpcom/components/nsIComponentRegistrar.idlScriptable This interface provides methods to access and modify the XPCOM component registry. ...
...ance of the class being unregistered. unregisterFactoryLocation() Unregisters the factory associated with a given ClassID and component file location. void unregisterFactoryLocation( in nsCIDRef aClass, in nsIFile aFile ); Parameters aClass The ClassID that was previously registered. aFile The component file that was previously registered. Remarks This interface was finalized (frozen) for Gecko 1.0. See bug 115853 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsIContainerBoxObject
Attributes Attribute Type Description docShell nsIDocShell Read only. The nsIDocShell object that manages the contained document. ...
...Attributes Attribute Type Description docShell nsIDocShell Read only. The nsIDocShell object that manages the contained document. ...
nsIContentPref
name AString Read only. ...
... name AString Read only. ...
nsIContentPrefService2
Specifically, a content preference is a structure with three values: a domain with which the preference is associated, a name that identifies the preference within its domain, and a value. ...
...Specifically, a content preference is a structure with three values: a domain with which the preference is associated, a name that identifies the preference within its domain, and a value. ...
nsIContentSecurityPolicy
content/base/public/nsIContentSecurityPolicy.idlScriptable Describes an XPCOM component used to model and enforce Content Security Policies. ...
... content/base/public/nsIContentSecurityPolicy.idlScriptable Describes an XPCOM component used to model and enforce Content Security Policies. ...
nsIContentView
Note: Currently, only <frame> and <iframe> elements are handled as content views. ...
... Note: Currently, only <frame> and <iframe> elements are handled as content views. ...
nsIControllers
Windows and text inputs have default controllers that allow commands such as cmd_copy to act on the focused element or window. XUL elements can also have controllers, although they do not have any default controllers. Implemented by: @mozilla.org/xul/xul-controllers;1. ...
...void appendController( in nsIController controller ); Parameters controller A controller to be added to the list of controllers. Exceptions thrown NS_ERROR_OUT_OF_MEMORY getControllerAt() Returns the controller instance at the given position. nsIController getControllerAt( in unsigned long index ); Parameters i...
nsICookiePermission
The nsICookiePermission interface is used to test for cookie permissions netwerk/cookie/nsICookiePermission.idlScriptable Please add a summary to this article. ...
...ch are not directly used by any methods on this interface, but are nevertheless convenient to define here. These may be relocated somewhere else if we ever consider freezing this interface. Methods canAccess() Tests whether or not the given URI/channel may access the cookie database, either to set or get cookies. nsCookieAccess canAccess( in nsIURI aURI, in nsIURI aFirstURI, Obsolete since Gecko 1.9 in nsIChannel aChannel ); Parameters aURI The URI trying to access cookies. aFirstURI The URI initiated by the user that resulted in aURI being loaded. aChannel The channel corresponding to aURI. Return value One of the nsCookieAccess values: ACCESS_DEFAULT, ACCESS_ALLOW, or ACCESS_DENY. canSetCookie() Tests whether or not the given URI/channel may set a specific cookie. This method is a...
nsICryptoHash
netwerk/base/public/nsICryptoHash.idlScriptable This interface can be used to compute a cryptographic hash function of some data. You can, for example, calculate the SHA256 hash of a file to determine if it contains the data you think it does. The hash algorithms supported are MD2, MD5, SHA-1, SHA-256, SHA-384, and SHA-512. ...
...sICryptoHash.idlScriptable This interface can be used to compute a cryptographic hash function of some data. You can, for example, calculate the SHA256 hash of a file to determine if it contains the data you think it does. The hash algorithms supported are MD2, MD5, SHA-1, SHA-256, SHA-384, and SHA-512. ...
nsIDOMFile
rom a file submitted to a form using the input type "file". This allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the Internet connection is restored. This is also used by the DataTransfer object to describe files dragged into a web application using drag and drop. ...
...g drag and drop. Note that in Gecko, this interface currently inherits from nsISupports, but in the File API specification, it should be a Blob. This will likely change in the future, so avoid using any non-standard methods offered by this interface in order to ensure future compatibility. content/base/public/nsIDOMFile.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports This interface implements the DOM File object; for complete documentation, read up on that. See also nsIDOMFileList nsIDOMFileException DataTransfer Drag and drop ...
nsIDOMFontFaceList
Read only. Methods item() Returns the nsIDOMFontFace object at the specified index into the list. ...
...Read only. Methods item() Returns the nsIDOMFontFace object at the specified index into the list. ...
nsIDOMGeoGeolocation
Summary The nsIDOMGeoGeolocation interface provides access to geolocation information. You can request a single notification of the user's current position, or you can monitor the position over time. dom/interfaces/geolocation/nsIDOMGeoGeolocation.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Implemented by: @mozilla.org/geolocation;1. ...
...tion information. You can request a single notification of the user's current position, or you can monitor the position over time. dom/interfaces/geolocation/nsIDOMGeoGeolocation.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Implemented by: @mozilla.org/geolocation;1. ...
nsIDOMGeoPosition
Read only. ...
...Read only. ...
nsIDOMGlobalPropertyInitializer
See Custom window properties are a snap in Firefox blog post for details. ...
...See Custom window properties are a snap in Firefox blog post for details. ...
nsIDOMSimpleGestureEvent
The following events are generated: MozSwipeGesture - Generated when the user completes a swipe across across the input device. ...
... The following events are generated: MozSwipeGesture - Generated when the user completes a swipe across across the input device. ...
nsIDOMStorageList
nsIDOMStorage namedItem( in DOMString domain ); Parameters domain The name of the domain for whom to return the storage object. ...
...nsIDOMStorage namedItem( in DOMString domain ); Parameters domain The name of the domain for whom to return the storage object. ...
nsIDOMUserDataHandler
NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. ...
... NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. ...
nsIDOMXPathEvaluator
dom/interfaces/xpath/nsIDOMXPathEvaluator.idlScriptable This interface is used to evaluate XPath expressions against a DOM node. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/dom/xpath-evaluator;1. To create an instance, use: var domXPathEvaluator = Components.classes["@mozilla.org/dom/xpath-evaluator;1"] .createInstance(Components.interfaces.nsIDOMXPathEvaluator); Method overview nsIDOMXPathExpression createExpression(in DOMString expression, in nsIDOMXPathNSResolver resolver) nsIDOMXPathNSResolver createNSResolver(in nsIDOMNode nodeResolver); nsISupports evaluate(in DOMString expression, in nsIDOMNode contextNode, in nsIDOMXPathNSResolver resolver, in unsigned short type, in nsISupports res...
...PathNSResolver resolver) nsIDOMXPathNSResolver createNSResolver(in nsIDOMNode nodeResolver); nsISupports evaluate(in DOMString expression, in nsIDOMNode contextNode, in nsIDOMXPathNSResolver resolver, in unsigned short type, in nsISupports result) Methods createExpression() Creates an nsIDOMXPathExpression which can then be used for (repeated) evaluations. Note: Prior to Gecko 1.9, you could call this method on documents other than the one you planned to run the XPath against; starting with Gecko 1.9, however, you must call it on the same document. nsIDOMXPathExpression createExpression( in DOMString expression, in nsIDOMXPathNSResolver resolver ); Parameters expression A string representing the XPath to be created. resolver A name space reso...
nsIDebug2
This is normally zero in release builds, but does include calls to nsIDebug.assertion(). Read only. ...
...This is normally zero in release builds, but does include calls to nsIDebug.assertion(). Read only. ...
nsIDeviceMotionData
Attributes Attribute Type Description type unsigned long The type of motion data reported by this object; see Motion type constants for possible values. Read only. x double The amount of tilt along the X axis. Read only. ...
...Attributes Attribute Type Description type unsigned long The type of motion data reported by this object; see Motion type constants for possible values. Read only. x double The amount of tilt along the X axis. Read only. ...
nsIDialogCreator
embedding/base/nsIDialogCreator.idlScriptable Please add a summary to this article. ...
... embedding/base/nsIDialogCreator.idlScriptable Please add a summary to this article. ...
nsIDownload
nterface is deprecated as of Firefox 26. Please use Downloads.jsm instead. toolkit/components/downloads/public/nsIDownload.idlScriptable This interface describes a download object. Download objects are used by the Download Manager (see nsIDownloadManager to manage files that are queued to download, being downloaded, and finished being downloaded.) Inherits from: nsITransfer Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: Once the download is completed, the Download Manager stops updating the nsIDownload object. Completed states are nsIDownloadManager::DOWNLOAD_FINISHED, nsIDownloadManager::DOWNLOAD_FAILED, and nsIDownloadManager::DOWNLOAD_CANCELED. Attributes Attribute Type Description amountTransferred long long The num...
...unsigned long The ID by which the download is identified uniquely in the database - not globally unique. For example, a private download and a public one might have identical ids. Can only be safely used for direct database manipulation in the database that contains this download. Use the guid property instead for safe, database-agnostic searching and manipulation. Read only. Deprecated since Gecko 19.0 guid AString The guid of the download that is stored in the database. Has the form of twelve alphanumeric characters. Read only. MIMEInfo nsIMIMEInfo Provides the targets relevant MIME information, including its MIME type, helper application, and whether or not the helper should be executed automatically once the download is complete. Read only. Optional ...
nsIDroppedLinkItem
name DOMString Name of the dropped link. ...
... name DOMString Name of the dropped link. ...
nsIDynamicContainer
It can use the property bag on every result node to store data associated with each item, such as a full path on disk. ...
...It can use the property bag on every result node to store data associated with each item, such as a full path on disk. ...
nsIEffectiveTLDService
netwerk/dns/nsIEffectiveTLDService.idlScriptable This is an interface that examines a hostname and determines the longest portion that should be treated as though it were a top-level domain (TLD). It can also determine the base domain of a URI. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/network/effective-tld-service;1. To use this service, use: var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"] .getService(Components.interfaces.nsIEffectiveTLDService); The name "Effective TLD Service" is a historical one; today, the items this interface manipulates are called Public Suffixes, and the list of them is the Public Suffix List, or PS...
... Normalize() method in nsIIDNService and is thrown when aHost contains characters disallowed in URIs. NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS This exception is thrown if there were insufficient subdomain levels in the hostname to satisfy the requested aAdditionalParts value. NS_ERROR_HOST_IS_IP_ADDRESS This exception is thrown if aHost is a numeric IPv4 or IPv6 address. Remarks Note: Prior to Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), this method worked if you passed host strings starting with a period ("."). That is no longer the case, since these are not valid host names. You should strip leading periods off host names before passing them to this method. getPublicSuffix() Returns the public suffix of a URI. A public suffix is the highest-level domain under which individua...
nsIEventListenerService
content/events/public/nsIEventListenerService.idlScriptable A service that can be used to get a list of listeners observing events; this is primarily useful for debuggers. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Implemented by: @mozilla.org/eventlistenerservice;1. To create an instance, use: var eventListenerService = Components.classes["@mozilla.org/eventlistenerservice;1"] .getService(Components.interfaces.nsIEventListenerService); UniversalXPConnect privileges are required to use this service. Method overview void getEventTargetChainFor(in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, arra...
... nsIDOMEventListener listener, in boolean useCapture); void removeSystemEventListener(in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); Attributes Attribute Type Description systemEventGroup nsIDOMEventGroup Returns system event group. Read only. Obsolete since Gecko 7.0 Methods getEventTargetChainFor() Returns an array of event targets indicating all the targets that will receive the same events that are delivered to the specified target. aEventTarget will be at index 0. The objects are the ones that would be used as event.currentTarget while dispatching an event to aEventTarget. Note: Some events, especially 'load', may actually have a shorter even...
nsIEventSource
...
... ...
nsIFaviconDataCallback
It's up to the invoking method to state if the callback is always invoked, or called on success only. ...
...It's up to the invoking method to state if the callback is always invoked, or called on success only. ...
nsIFeedEntry
This comes from the atom:content and/or content:encoded fields. ...
...This comes from the atom:content and/or content:encoded fields. ...
nsIFeedPerson
name AString The name of the person. ...
... name AString The name of the person. ...
nsIFeedProgressListener
toolkit/components/feeds/public/nsIFeedListener.idlScriptable This interface defines callbacks used during the processing of an RSS or Atom feed. Programs using the feed content access API do not have to implement any of these callbacks; they are optional, but allow you to provide feedback during the parsing process. ...
.../public/nsIFeedListener.idlScriptable This interface defines callbacks used during the processing of an RSS or Atom feed. Programs using the feed content access API do not have to implement any of these callbacks; they are optional, but allow you to provide feedback during the parsing process. ...
nsIFrameLoaderOwner
Read only. Methods getFrameLoader() Returns the frame loader object owned by this object. ...
...Read only. Methods getFrameLoader() Returns the frame loader object owned by this object. ...
nsIGSettingsCollection
xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
nsIGSettingsService
xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
nsIGeolocationUpdate
Method overview void update(in nsIDOMGeoPosition position); Methods update() Notify the geolocation service that a new geolocation has been discovered. ...
...Method overview void update(in nsIDOMGeoPosition position); Methods update() Notify the geolocation service that a new geolocation has been discovered. ...
nsIHapticFeedback
xpcom/system/nsIHapticFeedback.idlScriptable Implemented to provide support for haptic feedback (that is, vibration support). ...
... xpcom/system/nsIHapticFeedback.idlScriptable Implemented to provide support for haptic feedback (that is, vibration support). ...
nsIHttpActivityDistributor
netwerk/protocol/http/nsIHttpActivityObserver.idlScriptable This interface is used to register and unregister clients that wish to observe HTTP transport activity. This is primarily useful for debuggers and other traffic monitoring tasks. ...
... netwerk/protocol/http/nsIHttpActivityObserver.idlScriptable This interface is used to register and unregister clients that wish to observe HTTP transport activity. This is primarily useful for debuggers and other traffic monitoring tasks. ...
nsIINIParserFactory
Method overview nsIINIParser createINIParser(in nsILocalFile aINIFile); Methods createINIParser() Creates an INI parser, returning the nsIINIParser object that you can use to parse it. ...
...Method overview nsIINIParser createINIParser(in nsILocalFile aINIFile); Methods createINIParser() Creates an INI parser, returning the nsIINIParser object that you can use to parse it. ...
nsIINIParserWriter
INI files contain zero or more sections, denoted by a name in square brackets, followed by zero or more lines of text with a property name on the left, then an equals sign ("="), then the value of the property. ...
...INI files contain zero or more sections, denoted by a name in square brackets, followed by zero or more lines of text with a property name on the left, then an equals sign ("="), then the value of the property. ...
nsIJSID
An unnamed JSID also results when you implement a function that is passed an nsIIDRef parameter, such as QueryInterface(). ...
...uch as QueryInterface(). Note that for these cases of JSID the specified class or interface must exist and be scriptable. Method overview boolean equals(in nsIJSID other); const nsID* getID(); Violates the XPCOM interface guidelines void initialize(in string idString); string toString(); Attributes Attribute Type Description id nsIDPtr Read only. Native code only! Obsolete since Gecko 1.9 The internal nsID. name string Read only. The name of the JSID, if it was set. number string Read only. The string representation of the internal nsID. valid boolean Read only. Returns true if the JSID has been initialised. Methods equals() This method determines if this nsIJSID has the same nsID as another nsIJSID. boolean equals( in nsIJSID other ); Parameters other The other n...
nsIJumpListItem
To add types, create the specific interface here, add an implementation class to WinJumpListItem, and add support to addListBuild and removed items processing. ...
...To add types, create the specific interface here, add an implementation class to WinJumpListItem, and add support to addListBuild and removed items processing. ...
nsILoginManagerCrypto
If the user is not logged in, performing a crypto operation will result in a master password prompt. Read only. ...
...If the user is not logged in, performing a crypto operation will result in a master password prompt. Read only. ...
nsIMemoryMultiReporterCallback
Implement this method to handle the report information. ...
...Implement this method to handle the report information. ...
nsIMenuBoxObject
layout/xul/base/public/nsIMenuBoxObject.idlScriptable Represents the box object for a XUL menu. ...
...verview boolean handleKeyPress(in nsIDOMKeyEvent keyEvent); void openMenu(in boolean openFlag); Attributes Attribute Type Description activeChild nsIDOMElement The currently active menu or menuitem child of the menu box. openedWithKey boolean true if the menubar was opened using the keyboard; otherwise false. Note: For Gecko 2.0, the openedWithKey attribute exists on the nsIMenuBoxObject_MOZILLA_2_0_BRANCH interface. Subsequent Gecko versions will have the attribute on the nsIMenuBoxObject interface. Methods handleKeyPress() boolean handleKeyPress( in nsIDOMKeyEvent keyEvent ); Parameters keyEvent The key event to handle for the menu. Return value true if the event was handled, false if not. openMenu() v...
nsINavHistoryBatchCallback
toolkit/components/places/public/nsINavHistoryService.idlScriptable Please add a summary to this article. ...
... toolkit/components/places/public/nsINavHistoryService.idlScriptable Please add a summary to this article. ...
nsINavHistoryQueryOptions
toolkit/components/places/nsINavHistoryService.idlScriptable Represents the global options for executing a query. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Method overview nsINavHistoryQueryOptions clone(); Attributes Attribute Type Description applyOptionsToContainers boolean If true, the query options are only applied to the containers. asyncEnabled boolean When true, the root container node generated by these options and all of its descendant containers are opened asynchronously if they support doing so. By default, this is false. ...
... asyncEnabled boolean When true, the root container node generated by these options and all of its descendant containers are opened asynchronously if they support doing so. By default, this is false. Note: Currently, only bookmark folder containers support being opened asynchronously. excludeItemIfParentHasAnnotation Obsolete since Gecko 13.0 AUTF8String This option excludes items from a bookmarks query if the parent of the item has this annotation. An example is to exclude livemark items (parent folders have the "livemark/feedURI" annotation). Ignored for queries over history. excludeItems boolean This option excludes all URIs and separators from a bookmarks query. This would be used if yo...
nsINavHistoryQueryResultNode
toolkit/components/places/nsINavHistoryService.idlScriptable Used for Places queries and as a base class for bookmark folders. 1.0 66 Introduced Gecko 1.8 Inherits from: nsINavHistoryContainerResultNode Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: If you request that places not be expanded in the options that generated the node, the node will report that it has no children and will never try to populate itself. Method overview void getQueries([optional] out unsigned long queryCount, [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries); Attributes Attribute Type Description folderItemId long long For both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemId of the fo...
...set to the concrete itemId of the folder. Otherwise, this is set to -1. Read only. queryOptions nsINavHistoryQueryOptions The options that group the node's children; only valid for RESULT_TYPE_QUERY nodes. Read only. Methods getQueries() Returns the queries that build the node's children; only valid for RESULT_TYPE_QUERY nodes. void getQueries( out unsigned long queryCount, Optional from Gecko 2.0 [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries ); Parameters queryCount Optional from Gecko 2.0 The number of queries in the queries array. queries An array of nsINavHistoryQuery objects describing the set of queries that build the node's children. There are queryCount elements in the array. See also nsINavHistoryContainerResultNode nsINavHistoryQuery ...
nsINavHistoryResultViewer
toolkit/components/places/public/nsINavHistoryService.idlScriptable Lets nsINavHistoryResult instances notify Places views of changes in the results. Removed in Gecko 2.0 and replaced with the nsINavHistoryResultObserver interface, which is similar but allows multiple clients to observe the result at once. 1.0 66 Introduced Gecko 1.9 Obsolete Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. ...
... 2.0 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Note: Most methods in this interface were renamed in Gecko 1.9.2, and others have slightly different parameter lists. Method overview void containerClosed(in nsINavHistoryContainerResultNode aContainerNode); void containerOpened(in nsINavHistoryContainerResultNode aContainerNode); void invalidateContainer(in nsINavHistoryContainerResultNode aContainerNode); void nodeAnnotationChanged(in nsINavHistoryResultNode aNode...
nsINetworkLinkService
netwerk/base/public/nsINetworkLinkService.idlScriptable Network link status monitoring service. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by: @mozilla.org/network/network-link-service;1 as a service: var networkLinkService = Components.classes["@mozilla.org/network/network-link-service;1"] .getService(Components.interfaces.nsINetworkLinkService); Attributes Attribute Type Description isLinkUp boolean This is set to true when the system is believed to have a usable network connection. The link is only up when network connections can be established. For example, the link is down during DHCP confi...
...s there is another usable interface already configured). If the link status is not currently known, we generally assume that it is up. Read only. linkStatusKnown boolean This is set to true when we believe that isLinkUp is accurate. Read only. linkType unsigned long The type of network connection, one of the LINK_TYPE_* constants. Read only. Note: As of Gecko 8.0, all Operating Systems currently return LINK_TYPE_UNKNOWN. Android support was backed out due to perceived security concerns, see bug 691054. As of Gecko 28.0 Android support is available again, see bug 939680. Constants Constant Value Description LINK_TYPE_UNKNOWN 0 We were unable to determine the network connection type. LINK_TYPE_...
nsIOutputStream
A blocking output stream may suspend the calling thread in order to satisfy a call to Close(), Flush(), write(), writeFrom(), or writeSegments(). A non-blocking output stream, on the other hand, must not block the calling thread of execution. Note: Blocking output streams are often written to on a background thread to avoid locking up the main application thread. ...
...nt = len; return NS_OK; } // Write the contents of aSource into aStream, using WriteSegments // to avoid intermediate buffer copies. nsresult WriteStream(const nsACString& aSource, nsIInputStream* aStream) { PRUint32 num; return aStream->WriteSegments(CopySegment, (void*) &aSource, aSource.Length(), &num); } Remarks This interface was frozen for Gecko 1.0. See bug 124465 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsIInputStream nsReadSegmentFun ...
nsIPrefBranch2
Method overview void addObserver(in string aDomain, in nsIObserver aObserver, in boolean aHoldWeak); void removeObserver(in string aDomain, in nsIObserver aObserver); Methods addObserver() Add a preference change observer. On preference changes, the following arguments will be passed to nsIObserver.observe(): aSubject - The nsIPrefBranch object (this). aTopic - The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID aData - The name of the preference which has changed, relative to the "root" of the aSubject branch. aSubject.get*Pref(aData) will get the new value of the modified preference. ...
...nged during the dispatch of nsPref:changed notification. However, the observers are not guaranteed to be notified in any particular order, so you can't be sure whether the added/removed observer will be called during the notification when it is added/removed. It is possible to change preferences during the notification. It is not safe to change observers during this callback in releases before Gecko 1.9. If you want a safe way to remove a preference observer, please use an nsITimer. ...
nsIPrinterEnumerator
widget/nsIPrintOptions.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings); void enumeratePrinters(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult); Obsolete since Gecko 1.9 void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings); Attributes Attribute Type Description defaultPrinterName wstring The name of the system default printer. This name should also be present in printerNameList. This is not necessarily gecko's default printer; see nsIPrintS...
...vice.defaultPrinterName for that. Read only. printerNameList nsIStringEnumerator The list of printer names. Read only. Methods displayPropertiesDlg() void displayPropertiesDlg( in wstring aPrinter, in nsIPrintSettings aPrintSettings ); Parameters aPrinter aPrintSettings enumeratePrinters() Obsolete since Gecko 1.9 (Firefox 3) Returns an array of the names of all installed printers. void enumeratePrinters( out PRUint32 aCount, [retval, array, size_is(aCount)] out wstring aResult ); Parameters aCount Returns number of printers returned. aResult Returns array of names. initPrintSettingsFromPrinter() Initializes certain settings from the native printer into the P...
nsIPrivateBrowsingService
The nsIPrivateBrowsingService interface provides access to information about the state of the private browsing feature offered in Firefox 3.5 and later. ...
... The nsIPrivateBrowsingService interface provides access to information about the state of the private browsing feature offered in Firefox 3.5 and later. ...
nsIProperties
xpcom/ds/nsIProperties.idlScriptable This interface provides methods to access a map of named XPCOM object values. Inherits from: nsISupports Last changed in Gecko 1.2 Implemented by: @mozilla.org/file/directory_service;1. To get an instance, use: var properties = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); Method overview void get(in string prop, in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result); void getKeys(out PRUint32 count, [array, size_is(count), retval] out string keys); boolean has(in string prop); void set(in string prop, in nsISupports value); void undefine(in string prop); Methods get() Gets the XPCOM object associated with a particular name. void get( in st...
...y exists, false if the property does not exist. set() Sets the XPCOM object associated with a particular name. void set( in string prop, in nsISupports value ); Parameters prop The property name. value The XPCOM object value to associate with prop. undefine() Undefines a property. void undefine( in string prop ); Parameters prop The property name. Remarks This interface was frozen for Gecko 1.2. See bug 162114 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsIProtocolProxyFilter
Use nsIProtocolProxyService.registerFilter() to hook up instances of this interface. ...
...Use nsIProtocolProxyService.registerFilter() to hook up instances of this interface. ...
nsIResumableChannel
netwerk/base/public/nsIResumableChannel.idlScriptable This interface is meant to be implemented by the channels that support resuming broken downloads (for example Necko's HTML and FTP channels). Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void asyncOpenAt(in nsIStreamListener listener, in nsISupports ctxt, in unsigned long startPos, in nsIResumableEntityID entityID); Obsolete since Gecko 1.8 void resumeAt(in unsigned long long startPos, in ACString entityID); Attributes Attribute Type Description entityID ACString The entity id for this URI. Available after OnStartRequest. Read only. Exceptions thrown NS_ERROR_NOT_RESUMABLE If this load is not resumable. Methods asyncOpenAt() ...
...The request given to the nsIStreamListener will be QIable to nsIResumableInfo. ...
nsISSLErrorListener
Method overview boolean notifySSLError(in nsIInterfaceRequestor socketInfo, in PRInt32 error, in AUTF8String targetSite); Methods notifySSLError() Called in case of an SSL error. ...
...Method overview boolean notifySSLError(in nsIInterfaceRequestor socketInfo, in PRInt32 error, in AUTF8String targetSite); Methods notifySSLError() Called in case of an SSL error. ...
nsISSLSocketControl
void proxyStartSSL(); Parameters None. ...
...void proxyStartSSL(); Parameters None. ...
nsIScriptError
js/xpconnect/idl/nsIScriptError.idlScriptable Represents JavaScript errors and warnings for use by the console service. 66 Introduced Gecko 1.0 Inherits from: nsIConsoleMessage Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/scripterror;1. To create an instance, use: var scriptError = Components.classes["@mozilla.org/scripterror;1"] .createInstance(Components.interfaces.nsIScriptError); Note: The nsIScriptError2 interface was merged into this interface in Gecko 12.0. Prior to that release, if you wanted to associate an outer window with a script error, you had to use nsIScriptError2 instead. That subclass offered the nsIScriptError.initWithWindowID() method for that purpose; that method is now available in this interface...
...aw an arrow pointing to the problem character. flags One of flags listed in Flag constants. category A string indicating what kind of code caused the message. There are quite a few category strings and they don't seem to be listed in a single place. See Categories for a partial list. initWithWindowID() Initializes the nsIScriptError object with the given inner window's ID. Note: Prior to Gecko 12.0, this method was provided by the nsIScriptError2 interface, which has now been merged into this one. void initWithWindowID( in wstring message, in wstring sourceName, in wstring sourceLine, in PRUint32 lineNumber, in PRUint32 columnNumber, in PRUint32 flags, in string category, in unsigned long long innerWindowID ); Parameters message The text of the message to add to...
nsIScriptError2
js/src/xpconnect/idl/nsIScriptError.idlScriptable Represents JavaScript errors and warnings for use by the console service; augments nsIScriptError by adding a way to initialize the error with the window ID of the outer window with which the error is associated. 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 12.0 Inherits from: nsIScriptError Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) In Gecko 12.0 this Interface was merged into the nsIScriptError interface. Method overview void initWithWindowID(in wstring message, in wstring sourceName, in wstring sourceLine, in PRUint32 lineNumber, in PRUint32 columnNumber, in PRUint32 flags, in string category, in unsigned long long innerWindowID); Attribu...
...r occurred. This is used to draw an arrow pointing to the problem character. flags One of the script error flag constants. category A string indicating what kind of code caused the message. There are quite a few category strings and they don't seem to be listed in a single place. See Categories for a partial list. innerWindowID The ID of the inner window associated with the error. Prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), this was the outer window ID. ...
nsIScriptableInputStream
xpcom/io/nsIScriptableInputStream.idlScriptable This interface provides scriptable access to a nsIInputStream instance. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview unsigned long available(); void close(); void init(in nsIInputStream aInputStream); string read(in unsigned long aCount); ACString readBytes(in unsigned long aCount); Methods available() Return the number of bytes currently available in the stream. Note: This method should not be used to determine the total size of a stream, even if the stream corresponds to a local file. Moreover, since a stream may make available more than 2^32 bytes of data, this method is incapable of expressing the entire size of...
...ad aCount amount of data. NS_BASE_STREAM_WOULD_BLOCK If reading from the input stream would block the calling thread (non-blocking mode only). Remarks This interface provides JavaScript with a way to read ASCII text from a nsIInputStream. However, it does not address the problem of reading arbitrary binary data from a stream. For binary input see nsIBinaryInputStream. Note: Starting in Gecko 2.0, you can use the NetUtils.jsm JavaScript code module and its readInputStreamToString() method to read arbitrary binary data into a JavaScript string. The nsScriptableInputStream component implements this interface. This interface was frozen for Gecko 1.2. From Gecko 2.0 interfaces are no longer frozen. Examples List contents of XPI and read file contents This example here uses the read funct...
nsISecurityCheckedComponent
Two examples: Code that has the "UniversalXPConnect" capability is allowed to access all of XPCOM. This includes creating instances of arbitrary XPCOM objects and calling methods and setting properties on them. ...
... Two examples: Code that has the "UniversalXPConnect" capability is allowed to access all of XPCOM. This includes creating instances of arbitrary XPCOM objects and calling methods and setting properties on them. ...
nsIServiceManager
xpcom/components/nsIServiceManager.idlScriptable This interface provides a means to obtain global services in an application. The service manager depends on the repository to find and instantiate factories to obtain services. ...
...ld call nsISupports.release() on the service as they would with any interface pointer. In some language bindings, such as JavaScript, this step is unnecessary. And, moreover such languages typically offer more convenient mechanisms to acquire references to XPCOM services and components. A user of a service may keep references to services until application shutdown. This interface was frozen for Gecko 1.0. See bug 99147 for details. From Gecko 2.0 interfaces are no longer frozen. See also NS_GetServiceManager do_GetService mozilla::services C++ namespace Services.jsm nsISupports.release() ...
nsISessionStartup
browser/components/sessionstore/nsISessionStartup.idlScriptable Handles the session restore process. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by: @mozilla.org/browser/sessionstartup;1. ...
....org/browser/sessionstartup;1"] .getService(Components.interfaces.nsISessionStartup); Method overview boolean doRestore(); Attributes Attribute Type Description sessionType unsigned long The type of session being restored; this will be one of the Session type constants. Read only. state jsval The session state, as a JavaScript object. Read only. Note: Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), this was a string. It was changed in order to improve performance, which was suffering due to the need to parse and stringify the data. Constants Session type constants Constant Value Description NO_SESSION 0 There's no data available from the previous session. RECOVER_SESSION 1 The last session crashed. It will either be restored o...
nsISessionStore
browser/components/sessionstore/nsISessionStore.idlScriptable Provides a means for extensions and other code to store data in association with browser sessions, tabs, and windows. 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. Method overview void deleteTabValue(in nsIDOMNode aTab, in AString aKey); void deleteWindowValue(in nsIDOMWindow aWindow, in AString aKey); ...
... in unsigned long aIndex ); Parameters aWindow The browser window in which to reopen a closed tab. aIndex The index number of the closed tab to restore. This should be a value from 0 to one less than the value returned by getClosedTabCount(). The list of closed tabs is stored in last in/first out (LIFO) order, so the tab at index 0 is the last one that was closed. Return value Prior to Gecko 1.9.1, this method did not return anything. Starting with Gecko 1.9.1, it returns a reference to the reopened tab as an nsIDOMNode object. undoCloseWindow() Reopens a closed window. nsIDOMWindow undoCloseWindow( in unsigned long aIndex ); Parameters aIndex The index of the window to be restored. This should be a value from 0 to one less than that returned by getClosedWindowCount(). The...
nsISimpleEnumerator
The "next" element is the first element upon the first call. Must be preceded by a call to hasMoreElements() which returns PR_TRUE. ...
... determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getNext() calls. Does not affect internal state of enumerator. boolean hasMoreElements(); Parameters None. Return value PR_TRUE if there are remaining elements in the enumerator. PR_FALSE if there are no more elements in the enumerator. Remarks This interface was frozen for Gecko 0.9.6. See bug 154047 for details. From Gecko 2.0 interfaces are no longer frozen. See also Code example of nsISimpleEnumerator ...
nsISmsDatabaseService
nsISmsDatabaseService dom/sms/interfaces/nsISmsDatabaseService.idlScriptable Used to store and manage SMS text messages for the WebSMS API 1.0 66 Introduced Gecko 13.0 Inherits from: nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsdatabaseservice;1. To create an instance, use: var smsService = Components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createInstance(Components.interfaces.nsISmsDatabaseService); Method overview long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate); long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate); void getMessage(in long messageId, in...
... in unsigned long long processId ); Parameters listId A number representing the id of the message list. requestId A number representing the id of the request. processId Optional A number representing the id of the process. clearMessageList() void getNextMessageInList( in long listId, ); Parameters listId A number representing the id of the message list. markMessageRead() Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) void markMessageRead( in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId ); Parameters messageId A number representing the id of the message. value A Boolean indicating whether a message is read or unread. requestId A number representing the id of the request. processId Optional A num...
nsISound
Please use the HTML 5 <audio> tag instead. Note that nsISound instances may play the sounds using another thread; however, this is not controlled by the caller. Implemented by: @mozilla.org/sound;1. ...
... "SystemExclamation", you can play the Windows alert sound, but it's played only on Windows. Similarly, if you specify "Blow", you can play the Mac OS X "Blow" system sound, but, similarly, it's played only on the Macintosh. If you wish to use this method for playing sounds, you should check the platform before you call playSystemSound(). Note: This second usage is obsolete starting in Gecko 1.9.2. You should instead use playEventSound() instead. Typically, it will be more useful to request that appropriate sounds be played based on which event you wish to represent by the sound effect. Various event names are provided, which will result in playing the corresponding sound effect on the platform the user is running on: _moz_mailbeep The system so...
nsIStandardURL
netwerk/base/public/nsIStandardURL.idlScriptable This interface defines the interface to an URL with the standard file path format common to protocols like http, ftp, and file. It supports initialization from a relative path and provides some customization on how URLs are normalized. Inherits from: nsIMutable Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/network/standard-url;1. To create an instance, use: var standardURL = Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIStandardURL); Method overview void init(in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Attributes Attribute Type Description mutable boolean C...
...IStandardURL); Method overview void init(in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Attributes Attribute Type Description mutable boolean Control whether or not this URL can be modified. Protocol handlers can set this flag before handing out an URL to ensure that it is not inadvertently modified. Obsolete since Gecko 1.9 Constants These constants describe how to normalize an URL. Constant Value Description URLTYPE_STANDARD 1 blah:foo/bar => blah://foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar URLTYPE_AUTHORITY 2 blah:foo/bar => blah://foo/bar blah:/foo/bar => blah://foo/bar blah://foo/bar => blah://foo/bar blah:///foo/ba...
nsIStructuredCloneContainer
it is an error to initialize an nsIStructuredCloneContainer more than once. ...
...it is an error to initialize an nsIStructuredCloneContainer more than once. ...
nsISupportsPrimitive
Constants Constant Value Description TYPE_ID 1 Corresponding to nsISupportsID. TYPE_CSTRING 2 Corresponding to nsISupportsCString. TYPE_STRING 3 Corresponding to nsISupportsString. TYPE_PRBOOL 4 Corresponding to nsISupportsPRBool. ...
...o nsISupportsPRInt16. TYPE_PRINT32 12 Corresponding to nsISupportsPRInt32. TYPE_PRINT64 13 Corresponding to nsISupportsPRInt64. TYPE_FLOAT 14 Corresponding to nsISupportsFloat. TYPE_DOUBLE 15 Corresponding to nsISupportsDouble. TYPE_VOID 16 Corresponding to nsISupportsVoid. TYPE_INTERFACE_POINTER 17 Corresponding to nsISupportsInterfacePointer. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsISupportsCString nsISupportsChar nsISupportsDouble nsISupportsFloat nsISupportsID nsISupportsInterfacePointer nsISupportsPRBool nsISupportsPRInt16 nsISupportsPRInt32 nsISupportsPRInt64 nsISupportsPRTime nsISupportsPRUint16 nsISupportsPRUint32 nsISupportsPRUint64 nsISupportsPRUint8 nsISupportsString nsISup...
nsISupportsWeakReference
xpcom/base/nsIWeakReference.idlScriptable This interface is a factory interface, which produces appropriate instances of nsIWeakReference. Weak references in this scheme can only be produced for objects that implement this interface. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsIWeakReference GetWeakReference(); Methods GetWeakReference() Produces an appropriate instance of nsIWeakReference. nsIWeakReference GetWeakReference(); Parameters None. ...
... nsIWeakReference GetWeakReference(); Methods GetWeakReference() Produces an appropriate instance of nsIWeakReference. nsIWeakReference GetWeakReference(); Parameters None. Return value The resulting nsIWeakReference instance. Remarks The XPCOM glue library provides nsSupportsWeakReference, a canonical implementation of nsISupportsWeakReference. This interface was frozen for Gecko 0.9.9. See bug 48726 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsIWeakReference nsSupportsWeakReference ...
nsISyncJPAKE
services/crypto/component/nsISyncJPAKE.idlScriptable Please add a summary to this article. ...
... services/crypto/component/nsISyncJPAKE.idlScriptable Please add a summary to this article. ...
nsITaggingService
toolkit/components/places/public/nsITaggingService.idlScriptable Provides methods to tag/untag a URI, to retrieve URIs for a given tag, and to retrieve all tags for a URI. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/browser/tagging-service;1. To use this service, use: var taggingSvc = Components.classes["@mozilla.org/browser/tagging-service;1"] .getService(Components.interfaces.nsITaggingService); Method overview void tagURI(in nsIURI aURI, in nsIVariant aTags); void untagURI(in nsIURI aURI, in nsIVariant aTags); nsIVariant getURIsForTag(in AString aTag); ...
...() This method retrieves all tags set for the given URI. nsIVariant getTagsForURI( in nsIURI aURI, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring aTags ); Parameters aURI The URI for which to return the tags. length Optional On return, contains the number of tags returned in aTags. This optional parameter was required prior to Gecko 2.0. aTags On return, contains an array of tags for the specified URI. Return value Returns array of tags (sorted by name). See also Places Using the Places tagging service ...
nsITaskbarPreview
Instead, you use nsITaskbarTabPreview or nsITaskbarWindowPreview as appropriate. ...
...Instead, you use nsITaskbarTabPreview or nsITaskbarWindowPreview as appropriate. ...
nsITaskbarPreviewButton
Instead, you use the nsITaskbarWindowPreview.getButton() to get the objects representing the buttons. ...
...Instead, you use the nsITaskbarWindowPreview.getButton() to get the objects representing the buttons. ...
nsITaskbarWindowPreview
widget/public/nsITaskbarWindowPreview.idlScriptable This interface is used on Microsoft Windows to represent the preview for a window in the taskbar. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsITaskbarPreview Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) You can't directly instantiate this interface; instead, call nsIWinTaskbar.getTaskbarWindowPreview() to get the taskbar preview for a specific window. Window preview behavior By default, Windows implements much of the behavior for applications in a standard way. This interface's primary purpose is to let Gecko applications take control over parts of the preview; however, certain parts of the preview are not controlled using this interface. For example, the title and icon for each ...
...ttribute. Note that even while the preview is hidden, its thumbnails and/or previews may still be requested by other parts of the operating system through the nsITaskbarWindowPreview's controller. Note: This interface will never invoke the controller's nsITaskbarPreviewController.onClose() or nsITaskbarPreviewController.onActivate() methods, since handling them may conflict with other internal Gecko state management. There is existing infrastructure in place to let clients handle those events. Window preview toolbars Window previews may have a toolbar with up to seven buttons. The array of buttons may be accessed by calling getButton(); each button is an nsITaskbarPreviewButton object. You may customize these buttons using the attributes on that interface. User clicks on the toolbar buttons...
nsITelemetry
toolkit/components/telemetry/nsITelemetry.idlScriptable A service to gather performance data that can be tracked over time to allow generating histograms. ...
... toolkit/components/telemetry/nsITelemetry.idlScriptable A service to gather performance data that can be tracked over time to allow generating histograms. ...
nsIThreadPool
When you send events to the thread pool, the pool creates a new thread to process the event, up to the number of threads specified by the threadLimit attribute. ...
...When you send events to the thread pool, the pool creates a new thread to process the event, up to the number of threads specified by the threadLimit attribute. ...
nsIToolkitProfile
Method overview nsIProfileLock lock(out nsIProfileUnlocker aUnlocker); void remove(in boolean removeFiles); Attributes Attribute Type Description localDir nsILocalFile The location of the profile local directory, which may be the same as the root directory. ...
...Methods lock() Locks the profile using platform-specific locking methods. nsIProfileLock lock( out nsIProfileUnlocker aUnlocker ); Parameters aUnlocker On error, contains an nsIProfileUnlocker object you can use to unlock the profile. Note: The unlocker object cannot be returned to JavaScript as the error causes an exception to be thrown. The unlocker object is only available in Gecko 34 or later when running on Windows Vista or later. Return value An nsIProfileLock object which holds a profile lock as long as you hold a reference to it. Example: var profile = profileList.getNext().QueryInterface(Ci.nsIToolkitProfile); var locker = profile.lock({}); remove() Removes the profile from the registry of profiles. void remove( in boolean removeFiles ); Parameters remove...
nsIToolkitProfileService
toolkit/profile/public/nsIToolkitProfileService.idlScriptable The Profile Service manages user profiles. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: Starting in Gecko 1.9.1, this service is implemented by @mozilla.org/toolkit/profile-service;1. To access the service, you can use the following code: var toolkitProfileService = Components.classes["@mozilla.org/toolkit/profile-service;1"] .createInstance(Components.interfaces.nsIToolkitProfileService); Prior to Gecko 1.9.1 only the built-in profile manager was able to access the toolkit profile service. To access the built-in profile manager in versions of Firefox up to 4.0 and Thunderbird up to 3.3 you can launch with the -profilemanag...
...To access the built-in profile manager in versions of Firefox up to 4.0 and Thunderbird up to 3.3 you can launch with the -profilemanager command line flag. Future versions will require the separate Profile Manager application. Warning: This service is synchronous so it is recommended that you use OS.File to find the profile directory via OS.Constants.Path.profileDir. OS.File is available from Gecko 18 (Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15). Method overview nsIToolkitProfile createProfile(in nsILocalFile aRootDir, in AUTF8String aName); void flush(); nsIToolkitProfile getProfileByName(in AUTF8String aName); nsIProfileLock lockProfilePath(in nsILocalFile aDirectory, in nsILocalFile aTempDirectory); Attributes Attribute Typ...
nsITransferable
widget/nsITransferable.idlScriptable A container for typed data that can be transferred from one place or owner to another, possibly involving format conversion. These objects are used during drag-and-drop operations. Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Implemented by: @mozilla.org/widget/transferable;1. To create an instance, use: var transferable = Components.classes["@mozilla.org/widget/transferable;1"] .createInstance(Components.interfaces.nsITransferable); It's important to note that a flavor, which specifies a type of data the transferable supports, is represented by a null-terminated string indicating the MIME type of the format supported by the flavor. Method overview vo...
...e (\n), then the title of the page. kURLDataMime text/x-moz-url-data A string containing only a URL. kURLDescriptionMime text/x-moz-url-desc A string containing only a description. kURLPrivateMime text/x-moz-url-priv The same as kURLDataMIme, except intended for private use only. kNativeImageMime application/x-moz-nativeimage An image in Gecko's native internal image storage format. kNativeHTMLMime application/x-moz-nativehtml HTML in Gecko's native internal storage format. kHTMLContext text/_moz_htmlcontext Along with kHTMLInfo, this is used to provide the context for a fragment of HTML source. Contains the serialized ancestor elements. kHTMLInfo text/_moz_htmlinfo Along with kHTMLContext, ...
nsITreeBoxObject
The nsITreeBoxObject interface contains information about the size and layout of a tree. Further information about trees is given in the XUL Tutorial. /layout/xul/base/src/tree/public/nsITreeBoxObject.idlScriptable Please add a summary to this article. ...
...st be followed by calling endUpdateBatch(), otherwise the tree will get out of sync. ...
nsIURL
netwerk/base/public/nsIURL.idlScriptable This interface provides convenience methods that further break down the path portion of nsIURI. ...
...y on this to be a definite file. Some characters may be escaped. filePath AUTF8String Path including the directory and file portions of a URL. For example, the filePath of "http://host/foo/bar.html#baz" is "/foo/bar.html". Some characters may be escaped. param AUTF8String Parameters specified after the ; in the URL. Some characters may be escaped. Obsolete since Gecko 9.0 Note: This was removed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) because the semicolon is not actually valid for this purpose and should not have been specially handled. query AUTF8String Query portion (the part after the "?") of the URL. If there isn't one, an empty string is returned. Some characters may be escaped. ref AUTF8String...
nsIUpdateItem
toolkit/mozapps/extensions/public/nsIExtensionManager.idlScriptable Describes an item managed by the extension system, providing metadata describing the item. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface is obsolete; instead of using the Extension Manager, you should use the Addon Manager. Method overview void init(in AString id, in AString version, in AString installLocationKey, in AString minAppVersion, in AString maxAppVersion, in AString name, in AString downloadURL, in AString xpiHash, in AString iconURL, in AString updateURL, in AString updateKey, in long type, in AString targetAppID); Attributes ...
...InstallManager.initManagerWithHashes(). Read only. xpiURL AString The URL of the XPI where this item can be downloaded. Read only. Constants Item type constants Constants representing types of update checks. Constants that callers can use to indicate the reason for an add-on update check. Internal code uses other constants in nsExtensionManager.js.in. ...
nsIUpdatePrompt
toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes an object that can be used to show various update-related notifications to the user. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void checkForUpdates(); void showUpdateAvailable(in nsIUpdate update); void showUpdateDownloaded(in nsIUpdate update, [optional] in boolean background); void showUpdateError(in nsIUpdate update); void showUpdateHistory(in nsIDOMWindow parent); void showUpdateInstalled(); Methods checkForUpdates() Presents a user interface that checks for and displays the available updates. void checkForUpdates(); Parameters None. showUpdateAvailable() Shows ...
...rent window to which to anchor the update list window. This can be null. showUpdateInstalled() Shows a message detailing the update that was just installed successfully. If the app.update.silent preference is true, the app.update.showInstalledUI preference is false, or the user interface is already displayed the call will be a no-op. void showUpdateInstalled( in nsIUpdate update Obsolete since Gecko 1.9.1 ); Parameters update Obsolete since Gecko 1.9.1 An nsIUpdate describing the update that was installed. See also nsIUpdate nsIUpdateCheckListener nsIUpdateChecker nsIUpdatePatch nsIApplicationUpdateService nsIUpdateManager nsIUpdateTimerManager ...
nsIUrlListManagerCallback
toolkit/components/url-classifier/public/nsIUrlListManager.idlScriptable Interface for a class that manages updates of the url classifier database. ...
... toolkit/components/url-classifier/public/nsIUrlListManager.idlScriptable Interface for a class that manages updates of the url classifier database. ...
nsIWeakReference
Clients own the nsIWeakReference instance. ...
...g nsIWeakReference in the first place. void QueryReferent( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result ); Parameters uuid The UUID of the requested interface. result The resulting interface pointer. Exceptions thrown NS_ERROR_NULL_POINTER The referent no longer exists. NS_ERROR_NO_INTERFACE The requested interface is not available. Remarks This interface was frozen for Gecko 0.9.9. See bug 48726 for details. From Gecko 2.0 interfaces are no longer frozen. See also nsISupports.QueryInterface() nsISupportsWeakReference ...
nsIWebBrowserChrome2
This method may be called instead of nsIWebBrowserChrome.SetStatus(). An implementor of this method, should still implement nsIWebBrowserChrome.SetStatus(). ...
...This method may be called instead of nsIWebBrowserChrome.SetStatus(). An implementor of this method, should still implement nsIWebBrowserChrome.SetStatus(). ...
nsIWebProgress
but the relationship may exist in some implementations. A nsIWebProgressListener instance receives notifications for the nsIWebProgress instance to which it added itself, and it may also receive notifications from any nsIWebProgress instances that are children of that nsIWebProgress instance. uriloader/base/nsIWebProgress.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8.0 Inherits from: nsISupports Method overview void addProgressListener(in nsIWebProgressListener aListener, in unsigned long aNotifyMask); void removeProgressListener(in nsIWebProgressListener aListener); Attributes Attribute Type Description DOMWindow nsIDOMWindow The DOM window associated with this nsIWebProgress instance. Read only. Exceptions thrown NS_ERROR_FAILURE Indicat...
...x00000020 Receive nsIWebProgressListener.onStatusChange() events. NOTIFY_SECURITY 0x00000040 Receive nsIWebProgressListener.onSecurityChange() events. NOTIFY_LOCATION 0x00000080 Receive nsIWebProgressListener.onLocationChange() events. NOTIFY_REFRESH 0x00000100 Receive nsIWebProgressListener2.onRefreshAttempted() events. This is defined on nsIWebProgressListener2. NOTIFY_ALL 0x000000ff <= Gecko 1.8.1 0x000001ff > Gecko 1.8.1 This flag enables all notifications. Methods addProgressListener() Registers a listener to receive web progress events. void addProgressListener( in nsIWebProgressListener aListener, in unsigned long aNotifyMask ); Parameters aListener The listener interface to be called when a progress event occurs. This object must also implement nsISupportsWeakReference.
nsIWebProgressListener
uriloader/base/nsIWebProgressListener.idlScriptable This interface is implemented by clients wishing to listen in on the progress associated with the loading of asynchronous requests in the context of a nsIWebProgress instance as well as any child nsIWebProgress instances. Inherits from: nsISupports Last changed in Gecko 15 (Firefox 15 / Thunderbird 15 / SeaMonkey 2.12) nsIWebProgress describes the parent-child relationship of nsIWebProgress instances. Method overview void onLocationChange(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation, [optional] in unsigned long aFlags); void onProgressChange(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in lon...
...aRequest, in nsIURI aLocation, [optional] in unsigned long aFlags ); Parameters aWebProgress The nsIWebProgress instance that fired the notification. aRequest The associated nsIRequest. This may be null in some cases. aLocation The URI of the location that is being loaded. aFlags This is a value which explains the situation or the reason why the location has changed. Optional from Gecko 11 onProgressChange() Notification that the progress has changed for one of the requests associated with aWebProgress. Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onStateChange() being called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW flags). Note: If any progress value is unknown, or if its value would exceed the maximum v...
nsIWebSocketListener
netwerk/protocol/websocket/nsIWebSocketListener.idlScriptable Implement this interface to receive WebSocket traffic events asynchronously after calling nsIWebSocketChannel.asyncOpen(). ...
... netwerk/protocol/websocket/nsIWebSocketListener.idlScriptable Implement this interface to receive WebSocket traffic events asynchronously after calling nsIWebSocketChannel.asyncOpen(). ...
nsIWifiAccessPoint
This string is in the format "XX-XX-XX-XX-XX-XX". Read only. rawSSID ACString The public name of the wireless network, as an ASCII string. This string is null if not available. Read only. ...
...This string is in the format "XX-XX-XX-XX-XX-XX". Read only. rawSSID ACString The public name of the wireless network, as an ASCII string. This string is null if not available. Read only. ...
nsIWinAccessNode
accessible/public/msaa/nsIWinAccessNode.idlNot scriptable Please add a summary to this article. ...
... accessible/public/msaa/nsIWinAccessNode.idlNot scriptable Please add a summary to this article. ...
nsIWinTaskbar
By default, there is a single taskbar preview per top level window (excluding pop-ups). This preview is represented by an nsITaskbarWindowPreview object. An application can register its own "tab" previews. ...
...By default, there is a single taskbar preview per top level window (excluding pop-ups). This preview is represented by an nsITaskbarWindowPreview object. An application can register its own "tab" previews. ...
nsIWorkerMessageEvent
Read only. ...
...Read only. ...
nsIWritablePropertyBag2
xpcom/ds/nsIWritablePropertyBag2.idlScriptable This interface extends nsIPropertyBag2 with methods for setting properties. ...
... xpcom/ds/nsIWritablePropertyBag2.idlScriptable This interface extends nsIPropertyBag2 with methods for setting properties. ...
nsIXMLHttpRequestUpload
content/base/public/nsIXMLHttpRequest.idlScriptable This interface provides access to the features needed when uploading data using nsIXMLHttpRequest. ...
... content/base/public/nsIXMLHttpRequest.idlScriptable This interface provides access to the features needed when uploading data using nsIXMLHttpRequest. ...
nsIXmlRpcFault
faultString string Read only. ...
...efox 3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. extensions/xml-rpc/idl/nsIXmlRpcClient.idlScriptable An XML-RPC exception. XML-RPC server fault codes are returned wrapped in this; access it using nsIXPConnect.GetPendingException->data. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void init(in PRInt32 faultCode, in string faultSring); string toString(); Attributes Attribute Type Description faultCode PRInt32 Read only. faultString string Read only. Methods init() void getData( in PRInt32 faultCode, in string faultString ); Par...
nsIZipEntry
The possible values and their meanings are defined in the zip file specification at ZIP Application Note Support. Read only. CRC32 unsigned long The CRC-32 hash of the file in the entry. Read only. isDirectory boolean True if the name of the entry ends with '/' and false otherwise. Read only. ...
...a zip containing exactly one entry for foo/bar.txt is synthetic. If the zip file contains an actual entry for a directory, this attribute will be false for the nsIZipEntry for that directory. It is impossible for a file to be synthetic. Read only. lastModifiedTime PRTime The time at which this item was last modified. Read only. name string Read only. Obsolete since Gecko 1.9 realSize unsigned long The uncompressed size of the data in the item. Read only. size unsigned long The compressed size of the data in the item. Read only. See also nsIZipReader ...
nsIZipReaderCache
modules/libjar/nsIZipReader.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) Implemented by: @mozilla.org/libjar/zip-reader-cache;1. ...
...libjar/zip-reader-cache;1. To create an instance, use: var zipReaderCache = Components.classes["@mozilla.org/libjar/zip-reader-cache;1"] .createInstance(Components.interfaces.nsIZipReaderCache); Method overview nsIZipReader getInnerZip(in nsIFile zipFile, in AUTF8String zipEntry); nsIZipReader getInnerZip(in nsIFile zipFile, in string zipEntry); Obsolete since Gecko 10 nsIZipReader getZip(in nsIFile zipFile); void init(in unsigned long cacheSize); Methods getInnerZip() Returns a (possibly shared) cached nsIZipReader for a zip inside another zip. nsIZipReader getInnerZip( in nsIFile zipFile, in AUTF8String zipEntry ); Parameters zipFile The zip file. zipEntry The zip entry. Return value The nsIZipReader for...
nsPIPromptService
This interface defines the meaning of each indexes of GetInt(), SetInt(), GetString() and SetString() of the nsIDialogParamBlock interface but they are defined on in C++. The indexes for GetString() and SetString() are: eMsg The value is 0. This is the message text of the dialog. ...
...s 8. This is the label of the first button on the dialog. eButton1Text The value is 9. This is the label of the second button on the dialog. eButton2Text The value is 10. This is the label of the third button on the dialog. eButton3Text The value is 11. This is the label of the forth button on the dialog. eDialogTitle The value is 12. This is the title of the dialog. eOpeningSound Obsolete since Gecko 1.9.2 The value is 13. This is the system sound name which should be played when the dialog is shown. See also nsISound.playSystemSound(). This is obsolete on Gecko 1.9.2 and later. You should use eSoundEventId instead. The indexes for GetInt() and SetInt() are: eButtonPressed The value is 0. This is used for the result of the dialog. The pressed button number will be returned. eCheckboxState T...
Troubleshooting XPCOM components registration
ws! set NSPR_LOG_MODULES=nsNativeModuleLoader:5 set NSPR_LOG_FILE=C:\Path\to\logfile "C:\Program Files\Mozilla Firefox\firefox.exe" Examining this log for warning and errors may provide valuable clues why the component failed to load. If using Firefox 4 / XULRunner 2.0, make sure that your extension is unpacked and you declared the binary component in your chrome.manifest. See XPCOM changes in Gecko 2.0 Parsing Errors in JavaScript Components The most common reason for components written in JavaScript to fail is that there are parsing errors. These parsing errors should show up in the Error Console if chrome errors are enabled. To learn more about enabling chrome errors, see "How can I see errors in my code" in the Extension FAQs. Registration Failure If the module is loading correctly b...
...ninstalled/installed your extension via the Extension Manager. When adding a component to a XULRunner application, change the BuildID in application.ini. If your component requires any external libraries, you may need to read Using Dependent Libraries In Extension Components Make sure you are compiling against the right version. If you are testing with a release from mozilla.org, use the Gecko SDK (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. $prof...
Mozilla technologies
ty Stream generated by a user's application usage. The publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using. It is not meant as a general application messaging system. Toolkit APIThe Mozilla Toolkit is a set of programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. These services include:Viewing and searching Mozilla source code onlineSource code for all Mozilla projects hosted in the Mercurial repositories can be searched and viewed online using Searchfox, a fast indexed search engine that runs on AWS.XML ExtrasThe XML Extras module contains several features that allow developers to treat XML as data i.e...
...d is included in the browser installers so it is available in the nightly builds.XPCOMXPCOM is a cross platform component object model, similar to Microsoft COM. ...
Mail client architecture overview
Warning: The content of this article may be out of date. It was imported from mozilla.org and last updated in 2002. All of the links seem to be broken. The mail reader Gecko (XUL and HTML rendering) RDF (dynamic widgets) JS (menus, events) libmime Mail Datasources Mail JavaScript Folder/Message management msgdb IMAP/NNTP/POP3 Necko (networking) Sections in grey refer to modules outside of mail/news The base Module The base module provides a generic interface to a set of protocol-independant messaging services. This includes management of accounts, folders and messages. The base...
...nd moving messages, and displaying messages from a remote server, the URL system interacts with necko and reflects it's state to the mail window. There are also a number of protocol independant subsystems that have a symbiotic relationship with base: libMIME - for dealing with RFC822 messages and their MIME parts. This library has the cabability to stream messages to an HTML renderer such as Gecko, manage individual parts of messages, and so forth. msgdb - A message database for a given folder is a summary of some of the key attributes in a folder such as the Author and Subject. Finally, there are larger modules outside of the mail client that are mail-oriented. Most of these modules have little dependancy on the mail reader itself: Compose - The mail compose module is responsible fo...
Using tab-modal prompts
Only the window.alert() method gets this by default; you get this by default. Tab-modal alert. ...
...Only the window.alert() method gets this by default; you get this by default. Tab-modal alert. ...
Accessibility Inspector - Firefox Developer Tools
its parent. If the item is the first item inside its parent, it has a value of 0. If it is the second, it has a value of 1. And so on. states -- a list of the different accessibility-relevant states that can apply to the current item. For example, one of the links in one demo has states of focusable, linked, selectable text, opaque, enabled, and sensitive. For a full list of internal states, see Gecko states. relations -- a list of the accessiblity-relevant relationships between this item and other items. For example, in a form, an entry item could have a "labelled by" relation with a label item, which in turn has a "label for" relation to the entry item. attributes -- a list of all the accessibility-relevant attributes that are applied to the item. This can include style-related attributes ...
...abel for" relation to the entry item. attributes -- a list of all the accessibility-relevant attributes that are applied to the item. This can include style-related attributes such as margin-left and text-indent, and other useful states for accessibility information, such as draggable and level (e.g., what heading level is it, in the case of headings). For a full list of possible attributes, see Gecko object attributes. Note: The exposed information is the same across all platforms -- the inspector exposes Gecko's accessibility tree, rather than information from the platform accessibility layer. Keyboard controls The Accessibility tab is fully keyboard-accessible: You can tab between the Turn Off Accessibility Features button and left and right panels. When one of the panels is focus...
Web Console Helpers - Firefox Developer Tools
he console command line remembers the commands you've typed. Use this function to clear the console's command history. copy() Copies the argument to the clipboard. If the argument is a string, it's copied as-is. If the argument is a DOM node, its outerHTML is copied. Otherwise, JSON.stringify will be called on the argument, and the result will be copied to the clipboard. help()Deprecated since Gecko 62 :help Displays help text. Actually, in a delightful example of recursion, it brings you to this page. inspect() Given an object, generates rich output for that object. Once you select the object in the output area, you can use the arrow keys to navigate the object. keys() Given an object, returns a list of the keys (or property names) on that object. This is a shortcut for Object.keys. ...
...p text. Actually, in a delightful example of recursion, it brings you to this page. inspect() Given an object, generates rich output for that object. Once you select the object in the output area, you can use the arrow keys to navigate the object. keys() Given an object, returns a list of the keys (or property names) on that object. This is a shortcut for Object.keys. pprint() Obsolete since Gecko 74 Formats the specified value in a readable way; this is useful for dumping the contents of objects and arrays. :screenshot Creates a screenshot of the current page with the supplied filename. If you don't supply a filename, the image file will be named with the following format: Screen Shot yyy-mm-dd at hh.mm.ss.png The command has the following optional parameters: Com...
Document.createEntityReference() - Web APIs
The only workaround is to create a text node, CDATA section, attribute node value, etc. which has the value referred to by the entity, using Unicode escape sequences or fromCharCode() as necessary. ...
...The only workaround is to create a text node, CDATA section, attribute node value, etc. which has the value referred to by the entity, using Unicode escape sequences or fromCharCode() as necessary. ...
Document.createEvent() - Web APIs
build', function (e) { // e.target matches elem }, false); // Target can be any Element or other EventTarget. elem.dispatchEvent(event); Notes Event type strings suitable for passing to createEvent() are listed in the DOM standard -- see the table in step 2. Bear in mind that most event objects now have constructors, which are the modern recommended way to create event object instances. ...
...t(event); Notes Event type strings suitable for passing to createEvent() are listed in the DOM standard -- see the table in step 2. Bear in mind that most event objects now have constructors, which are the modern recommended way to create event object instances. Gecko supports some non-standard event object aliases, which are listed below. Event Module Standard event object Gecko also supports Text event module TextEvent TextEvents Keyboard event module KeyboardEvent KeyEvents Basic events module Event Events Specifications Specification Status Comment DOMThe definition of 'document.createEvent' in that specification. Living Standard ...
Document.xmlEncoding - Web APIs
If the XML Declaration states: <?xml version="1.0" encoding="UTF-16"?> ...the result should be "UTF-16". ...
...0.0 / SeaMonkey 2.7)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Returns the encoding as determined by the XML declaration. Should be null if unspecified or unknown. Warning: Do not use this attribute; it has been removed from the DOM Level 4 specification and is no longer supported in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7). If the XML Declaration states: <?xml version="1.0" encoding="UTF-16"?> ...the result should be "UTF-16". However, Firefox 3.0 includes information on endianness (e.g., UTF-16BE for big endian encoding), and while this extra information is removed as of Firefox 3.1b3, Firefox 3.1b3 is still consulting the file's encoding, rather than the...
EventTarget.addEventListener() - Web APIs
HttpRequest). addEventListener() works by adding a function or an object that implements EventListener to the list of event listeners for the specified event type on the EventTarget on which it's called. Syntax target.addEventListener(type, listener [, options]); target.addEventListener(type, listener [, useCapture]); target.addEventListener(type, listener [, useCapture, wantsUntrusted ]); // Gecko/Mozilla only Parameters type A case-sensitive string representing the event type to listen for. listener The object that receives a notification (an object that implements the Event interface) when an event of the specified type occurs. This must be an object implementing the EventListener interface, or a JavaScript function. See The event listener callback for details on the callback itse...
...he event target, the event is in the target phase, rather than the capturing and bubbling phases. Events in the target phase will trigger all listeners on an element in the order they were registered, regardless of the useCapture parameter. Note: useCapture has not always been optional. Ideally, you should include it for the widest possible browser compatibility. wantsUntrusted A Firefox (Gecko)-specific parameter. If true, the listener receives synthetic events dispatched by web content (the default is false for browser chrome and true for regular web pages). This parameter is useful for code found in add-ons, as well as the browser itself. Return value undefined Usage notes The event listener callback The event listener can be specified as either a callback function or an object...
HTML Drag and Drop API - Web APIs
include the drag 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 ...
...the former uses the synchronous getData() method to access a drag item's data, but the latter instead uses the asynchronous getAsString() method. Note: DragEvent and DataTransfer are broadly supported on desktop browsers. However, the DataTransferItem and DataTransferItemList interfaces have limited browser support. See Interoperability for more information about drag-and-drop interoperability. Gecko-specific interfaces Mozilla and Firefox support some features not in the standard drag-and-drop model. These are convenience functions to help with dragging multiple items or non-string data (such as files). For more information, see Dragging and Dropping Multiple Items. Additionally, see the DataTransfer reference page for all of the Gecko-specific properties and Gecko-specific methods. The ba...
Working with the History API - Web APIs
might attempt to load the URL later, for instance after the user restarts the browser. The new URL does not need to be absolute; if it's relative, it's resolved relative to the current URL. The new URL must be of the same origin as the current URL; otherwise, pushState() will throw an exception. This parameter is optional; if it isn't specified, it's set to the document's current URL. Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) through Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), the passed object is serialized using JSON. Starting in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the object is serialized using the structured clone algorithm. This allows a wider variety of objects to be safely passed. In a sense, calling pushState() is similar ...
...replaceState() operates exactly like history.pushState(), except that replaceState() modifies the current history entry instead of creating a new one. Note that this doesn't prevent the creation of a new entry in the global browser history. replaceState() is particularly useful when you want to update the state object or URL of the current history entry in response to some user action. Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) through Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), the passed object is serialized using JSON. Starting in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the object is serialized using the structured clone algorithm. This allows a wider variety of objects to be safely passed. Example of replaceState() method Suppose h...
KeyboardEvent.initKeyEvent() - Web APIs
"KeyboardEvent"). Events initialized in this way must have been created with the document.createEvent("KeyboardEvent") method. initKeyEvent() must be called to set the event before it is dispatched. Do not use this method anymore, use the KeyboardEvent() constructor instead. This method is based on early drafts of Document Object Model (DOM) Level 2 Events Specification and is implemented in Gecko-based browsers; other browsers implemented KeyboardEvent.initKeyboardEvent based on early drafts of Document Object Model (DOM) Level 3 Events Specification. Favor the modern constructor structure as the only cross-browser way of building events. Syntax event.initKeyEvent (type, bubbles, cancelable, viewArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, ...
... false, // metaKeyArg, 9, // keyCodeArg, 0); // charCodeArg); document.getElementById('blah').dispatchEvent(event); Specification This implementation of keyboard events is based on the key events spec in the early versions of DOM 2 Events, later removed from that spec. ...
NavigatorID.userAgent - Web APIs
erAgent; Value A DOMString specifying the complete user agent string the browser provides both in HTTP headers and in response to this and other related methods on the Navigator object. The user agent string is built on a formal structure which can be decomposed into several pieces of info. Each of these pieces of info comes from other navigator properties which are also settable by the user. ...
...r properties which are also settable by the user. Gecko-based browsers comply with the following general structure: userAgent = appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version Example alert(window.navigator.userAgent) // alerts "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape6/6.1" Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID.userAgent' in that specification. Living Standard Initial definition ...
Node.cloneNode() - Web APIs
Web › API › Node › cloneNode
deep Optional* If true, then node and its whole subtree--including text that may be in child Text nodes--is also copied. If false, only node will be cloned. Any text that node contains is not cloned, either (since text is contained by one or more child Text nodes). deep has no effect on empty elements (such as the <img> and <input> elements). ...
...(such as the <img> and <input> elements). *Note: In the DOM4 specification (since Gecko 13.0 (Firefox 13 / Thunderbird 13 / SeaMonkey 2.10)), the optional deep argument defaults to true. This behavior has been changed in the latest spec! Although deep it still optional, it now defaults to false. You should always provide an explicit value for backward and forward compatibility. With Gecko 28.0 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3)), the console warned developers not to omit the argument. Starting with Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)), a shallow clone is defaulted instead of a deep clone. Example let p = document.getElementById("para1") let p_prime = p.cloneNode(true) Notes Cloning a node copies all of its attributes...
Range.compareNode() - Web APIs
Web › API › Range › compareNode
Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The Range.compareNode() returns a constant indicating the position of the Node. The possible values are: NODE_BEFORE (0) Node starts before the Range NODE_AFTER (1) Node ends after the Range NODE_BEFORE_AND_AFTER (2) Node starts before and ends after the Range NODE_INSIDE (3) Node starts after and ends before the Range, i.e. the Node is completely selected by the Range. ...
...s a constant indicating the position of the Node. The possible values are: NODE_BEFORE (0) Node starts before the Range NODE_AFTER (1) Node ends after the Range NODE_BEFORE_AND_AFTER (2) Node starts before and ends after the Range NODE_INSIDE (3) Node starts after and ends before the Range, i.e. the Node is completely selected by the Range. Warning: This method has been removed from Gecko 1.9 (Firefox 3) and will not exist in future versions of Firefox, which was the only browser implementing it; you should switch to Range.compareBoundaryPoints() as soon as possible. The following function can be used as replacement: function rangeCompareNode(range, node) { var nodeRange = node.ownerDocument.createRange(); try { nodeRange.selectNode(node); } catch (e) { nodeRang...
Selection.rangeCount - Web APIs
rangeCount read-only property returns the number of ranges in the selection. Before the user has clicked a freshly loaded page, the rangeCount is 0. After the user clicks on the page, rangeCount is 1, even if no selection is visible. A user can normally only select one range at a time, so the rangeCount will usually be 1. Scripting can be used to make the selection contain more than one range. Gecko browsers allow multiple selections across table cells. Firefox allows to select multiple ranges in the document by using Ctrl+click (unless the click within an element with display: table-cell). Syntax value = sel.rangeCount Example The following example will show the rangeCount every second. Select text in the browser to see it change. HTML <table> <tr><td>a.1<td>a.2 <tr><td>b.1<td>b.
...value = sel.rangeCount Example The following example will show the rangeCount every second. Select text in the browser to see it change. HTML <table> <tr><td>a.1<td>a.2 <tr><td>b.1<td>b.2 <tr><td>c.1<td>c.2 JavaScript window.setInterval(function () { console.log(window.getSelection().rangeCount); }, 1000); Result Open your console to see how many ranges are in the selection. In Gecko browsers, you can select multiple ranges across table cells by holding down Ctrl while dragging with the mouse. Specifications Specification Status Comment Selection APIThe definition of 'Selection.rangeCount' in that specification. Working Draft Current ...
Using textures in WebGL - Web APIs
that you'll need a secure web server to test and deploy your code. For local testing, see our guide How do you set up a local testing server? for help. See this hacks.mozilla.org article for an explanation of how to use CORS-approved images as WebGL textures, with a self-contained example. Note: CORS support for WebGL textures and the crossOrigin attribute for image elements is implemented in Gecko 8.0. Tainted (write-only) 2D canvases can't be used as WebGL textures. A 2D <canvas> becomes tainted, for example, when a cross-domain image is drawn on it. Note: CORS support for Canvas 2D drawImage is implemented in Gecko 9.0. This means that using a cross-domain image with CORS approval does no longer taint the 2D canvas, so the 2D canvas remains usable as the source of a WebGL texture. ...
...ple, when a cross-domain image is drawn on it. Note: CORS support for Canvas 2D drawImage is implemented in Gecko 9.0. This means that using a cross-domain image with CORS approval does no longer taint the 2D canvas, so the 2D canvas remains usable as the source of a WebGL texture. Note: CORS support for cross-domain videos and the crossorigin attribute for <video> elements is implemented in Gecko 12.0. << PreviousNext >> ...
window.dump() - Web APIs
Web › API › Window › dump
reference mentioned below -- it will always be shown. It is therefore advisable to either check this preference yourself or use a debugging preference of your own to make sure you don't send lots of debugging content to a user's console when they might not be interested in it at all. Note that dump output from XPCOM components goes to stderr, while dump called elsewhere will output to stdout. In Gecko dump() is disabled by default - it doesn't do anything but doesn't raise an error either. To see the dump output you have to enable it by setting the preference browser.dom.window.dump.enabled to true. You can set the preference in about:config or in a user.js file. Note: this preference is not listed in about:config by default, you may need to create it (right-click the content area -> New -> Bo...
...he existing console. On other operating systems, it's enough to launch the application from a terminal. To redirect the console output to a file, run firefox without the -console option and use the syntax to redirect stderr and stdout to a file, i.e.: firefox > console.txt 2>&1 If you would like the console messages to appear in the console you used to launch the application, you can use the Gecko Console Redirector. Precompiled binaries are available in the zipped archive https://github.com/matthewkastor/Redirector/archive/master.zip under Redirector-master\Gecko\Console Redirector\bin\Release Copy all the dll's and the exe to wherever you want. Then run Console Redirector.exe /? Specification This is not part of any specification ...
Obsolete features - Web APIs
fullscreen This feature no longer works in MSIE 6 SP2 the way it worked in MSIE 5.x. The Windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in MSIE 5.x. fullscreen always upsets users with large monitor screen or with dual monitor screen. ...
...are not visible, nor accessible when fullscreen is enabled in MSIE 5.x. fullscreen always upsets users with large monitor screen or with dual monitor screen. Forcing fullscreen onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users. fullscreen does not really work in MSIE 6 SP2. personalbar Obsolete since Gecko 76 If this feature is on, then the new secondary window renders the Personal Toolbar in Netscape 6.x, Netscape 7.x and Mozilla browser. It renders the Bookmarks Toolbar in Firefox. In addition to the Personal Toolbar, Mozilla browser will render the Site Navigation Bar if such toolbar is visible, present in the parent window. Mozilla and Firefox users can force new windows to always render the ...
Window.pkcs11 - Web APIs
Web › API › Window › pkcs11
For more information on installing PKCS11 modules, see installing PKCS11 modules. See bug 326628 for details on why the property was removed. ...
...Monkey 2.26)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary Returns the pkcs11 object, which is used to install drivers and other software associated with the pkcs11 protocol. If pkcs11 isn't supported, this property returns null. Note: This property has been returned null since Gecko 1.9.0.14 (Firefox 3.0.14) and removed in Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)) for security reasons. For more information on installing PKCS11 modules, see installing PKCS11 modules. See bug 326628 for details on why the property was removed. Syntax objRef = window.pkcs11 Example window.pkcs11.addModule(sMod, secPath, 0, 0); Notes See nsIDOMPkcs11 for more informati...
WorkerGlobalScope.navigator - Web APIs
navigator); inside a worker (which would basically be the equivalent of self.console.log(self.navigator);, as these are being called on the worker scope, which can be referenced with WorkerGlobalScope.self), you will get a WorkerNavigator object written to the console -- something like the following: Object {onLine: true, userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) Ap...ML, like Gecko) Chrome/40.0.2214.93 Safari/537.36", product: "Gecko", platform: "MacIntel", appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKi...ML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"...} appCodeName: "Mozilla" appName: "Netscape" appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" hardwareConcurr...
...: "MacIntel", appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKi...ML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"...} appCodeName: "Mozilla" appName: "Netscape" appVersion: "5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" hardwareConcurrency: 4 onLine: true platform: "MacIntel" product: "Gecko" userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" __proto__: Object You could use this navigator object to return more information about the runtime envinronment, as you might do with a normal Navigator object. Specifications Specification Status Comment HTML Living StandardThe ...
Sending and Receiving Binary Data - Web APIs
nt8Array(myArray); // generate some data for (var i=0; i< longInt8View.length; i++) { longInt8View[i] = i % 256; } var xhr = new XMLHttpRequest; xhr.open("POST", url, false); xhr.send(myArray); This is building a 512-byte array of 8-bit integers and sending it; you can use any binary data you'd like, of course. Note: Support for sending ArrayBuffer objects using XMLHttpRequest was added to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6). Add information about other browsers' support here. Submitting forms and uploading files Please, read this paragraph. Firefox-specific examples This example transmits binary content asynchronously, using the POST method, and Firefox's non-standard sendAsBinary(). var req = new XMLHttpRequest(); req.open("POST", url, true); // set headers a...
...riately req.setRequestHeader("Content-Length", 741); req.sendAsBinary(aBody); Line 4 sets the Content-Length header to 741, indicating that the data is 741 bytes long. Obviously you need to change this value based on the actual size of the data being sent. Line 5 uses the sendAsBinary() method to initiate the request. Note: This non-standard sendAsBinary method is considered deprecated as of Gecko 31 (Firefox 31 / Thunderbird 31 / SeaMonkey 2.28) and will be removed soon. The standard send(Blob data) method can be used instead as explained above. You can also send binary content by passing an instance of the nsIFileInputStream to send(). In that case, you don't have to set the Content-Length header yourself, as the information is fetched from the stream automatically: // Make a stream fr...
-moz-device-pixel-ratio - CSS: Cascading Style Sheets
Syntax <number> The number of device pixels per CSS pixel. ...
... Syntax <number> The number of device pixels per CSS pixel. ...
At-rules - CSS: Cascading Style Sheets
Web › CSS › At-rule
ont to be downloaded. @keyframes -- Describes the aspect of intermediate steps in a CSS animation sequence. @viewport -- Describes the aspects of the viewport for small screen devices. (currently at the Working Draft stage) @counter-style -- Defines specific counter styles that are not part of the predefined set of styles. ...
...Nevertheless, several of them can be grouped into a special category named conditional group rules. ...
WebKit CSS extensions - CSS: Cascading Style Sheets
t-autofill-strong-password :-webkit-drag :-webkit-full-page-media :-webkit-full-screen* :-webkit-full-screen-ancestor :-webkit-full-screen-document :-webkit-full-screen-controls-hidden * Now standard. Note: If there is an invalid pseudo-class within in a chain or group of selectors, the whole selector list is invalid. Pseudo-elements For web-compatibility reasons, Blink, WebKit, and Gecko browsers treat all pseudo-elements starting with ::-webkit- as valid. ::-webkit-file-upload-button ::-webkit-inner-spin-button ::-webkit-input-placeholder ::-webkit-media-controls ::-webkit-media-controls-current-time-display ::-webkit-media-controls-enclosure ::-webkit-media-controls-fullscreen-button ::-webkit-media-controls-mute-button ::-webkit-media-controls-overlay-enclosure ::...
... Media features -webkit-animation -webkit-device-pixel-ratio -webkit-transform-2d -webkit-transform-3d -webkit-transition ...
background-size - CSS: Cascading Style Sheets
and vertical intrinsic dimensions, it also has intrinsic proportions. If it has no dimensions or only one dimension, it may or may not have proportions. CSS <gradient>s have no intrinsic dimensions or intrinsic proportions. Background images created with the element() function use the intrinsic dimensions and proportions of the generating element. ...
...ackground images created with the element() function use the intrinsic dimensions and proportions of the generating element. Note: The behavior of <gradient>s changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5). Before this, they were treated as images with no intrinsic dimensions, but with intrinsic proportions identical to that of the background positioning area. Note: In Gecko, background images created using the element() function are currently treated as images with the dimensions of the element, or of the background positioning area if the element is SVG, with the corresponding intrinsic proportion. This is non-standard behavior. Based on the intrinsic dimensions and proportions, the rendered size of the background image is computed as follows: If both componen...
border-collapse - CSS: Cascading Style Sheets
eseparateApplies totable and inline-table elementsInheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax collapse | separate Examples A colorful table of browser engines HTML <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>Browser</th> <th>Layout Engine</th></tr> <tr><td class="fx">Firefox</td> <td class="gk">Gecko</td></tr> <tr><td class="ed">Edge</td> <td class="tr">EdgeHTML</td></tr> <tr><td class="sa">Safari</td> <td class="wk">Webkit</td></tr> <tr><td class="ch">Chrome</td> <td class="bk">Blink</td></tr> <tr><td class="op">Opera</td> <td class="bk">Blink</td></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><...
...="sa">Safari</td> <td class="wk">Webkit</td></tr> <tr><td class="ch">Chrome</td> <td class="bk">Blink</td></tr> <tr><td class="op">Opera</td> <td class="bk">Blink</td></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><th>Browser</th> <th>Layout Engine</th></tr> <tr><td class="fx">Firefox</td> <td class="gk">Gecko</td></tr> <tr><td class="ed">Edge</td> <td class="tr">EdgeHTML</td></tr> <tr><td class="sa">Safari</td> <td class="wk">Webkit</td></tr> <tr><td class="ch">Chrome</td> <td class="bk">Blink</td></tr> <tr><td class="op">Opera</td> <td class="bk">Blink</td></tr> </tbody> </table> CSS .collapse { border-collapse: collapse; } .separate { border-collapse: separate; } table { ...
image-orientation - CSS: Cascading Style Sheets
s on the <img> and/or <picture> elements, with the possible exception of from-image. The flip and <angle> values were made obsolete in Firefox 63. /* keyword values */ image-orientation: none; image-orientation: from-image; /* Use EXIF data from the image */ /* Global values */ image-orientation: inherit; image-orientation: initial; image-orientation: unset; /* Obsolete Values. Obsolete since Gecko 63 */ image-orientation: 90deg; /* Rotate 90deg */ image-orientation: 90deg flip; /* Rotate 90deg, and flip it horizontally */ image-orientation: flip; /* No rotation, only applies a horizontal flip */ Syntax Values none Default initial value. Will not apply any additional image rotation; the image is oriented as encoded or as other CSS property values dictate. from-image The EXIF inform...
...d flip it horizontally */ image-orientation: flip; /* No rotation, only applies a horizontal flip */ Syntax Values none Default initial value. Will not apply any additional image rotation; the image is oriented as encoded or as other CSS property values dictate. from-image The EXIF information contained in the image will be used to rotate the image appropriately. <angle> Obsolete since Gecko 63 The <angle> of rotation to apply to the image. It is rounded to the nearest 90deg (0.25turn). flip Obsolete since Gecko 63 The image is flipped horizontally (i.e., reflected) after the rotation given by the <angle> value is applied. If no <angle> is given, 0deg is used. Description This property is intended only to be used for the purpose of correcting the orientation of images which w...
text-rendering - CSS: Cascading Style Sheets
fs among speed, legibility, and geometric precision. /* Keyword values */ text-rendering: auto; text-rendering: optimizeSpeed; text-rendering: optimizeLegibility; text-rendering: geometricPrecision; /* Global values */ text-rendering: inherit; text-rendering: initial; text-rendering: unset; Note: The text-rendering property is an SVG property that is not defined in any CSS standard. However, Gecko and WebKit browsers let you apply this property to HTML and XML content on Windows, macOS, and Linux. One very visible effect is optimizeLegibility, which enables ligatures (ff, fi, fl, etc.) in text smaller than 20px for some fonts (for example, Microsoft's Calibri, Candara, Constantia, and Corbel, or the DejaVu font family). Syntax Values auto The browser makes educated guesses about wh...
...tep scaling of text. But the geometricPrecision property -- when fully supported by the rendering engine -- lets you scale your text fluidly. For large scale factors, you might see less-than-beautiful text rendering, but the size is what you would expect--neither rounded up nor down to the nearest font size supported by Windows or Linux. Note: WebKit precisely applies the specified value, but Gecko treats the value the same as optimizeLegibility. Formal definition Initial valueautoApplies totext elementsInheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax auto | optimizeSpeed | optimizeLegibility | geometricPrecision Examples Automatic application of optimizeLegibility This demonstrates how optimizeLegibility is used by browsers automatically when the font-si...
Index - Developer guides
Web › Guide › Index
ts. Two common approaches are addEventListener() and the specific onevent handlers. 20 Media events Intermediate, Media Various events are sent when handling media that are embedded in HTML documents using the <audio> and <video> elements; this section lists them and provides some helpful information about using them. 21 Mouse gesture events Advanced, DOM Gecko 1.9.1 added support for several Mozilla-specific DOM events used to handle mouse gestures. These are special movements that can be made with a mouse or trackpad and can be interpreted to perform specific tasks. 22 Mutation events Advanced, DOM, Guide Mutation events provide a mechanism for a web page or an extension to get notified about changes made to the DOM. Use Mutation ...
...pdate, NeedsUpdate, events This overview of events and event handling explains the code design pattern used to react to incidents occurring when a browser accesses a web page, and it summarizes the types of such incidents modern web browsers can handle. 25 Touch events (Mozilla experimental) DOM The experimental touch events API described on this page was available from Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) to Gecko/Firefox 17. You should instead use the standard touch events API, supported since Gecko/Firefox 6 with multi-touch support added in Gecko/Firefox 12. 26 Using device orientation with 3D transforms Advanced, CSS, DOM, NeedsUpdate, Orientation, Transforms This article provides tips on how to use device orientation infor...
Evolution of HTTP - HTTP
er to agree on the most adequate content to exchange. Thanks to the Host header, the ability to host different domains at the same IP address now allows server colocation. ...
...t=utf-8 Date: Wed, 20 Jul 2016 10:55:30 GMT Etag: "547fa7e369ef56031dd3bff2ace9fc0832eb251a" Keep-Alive: timeout=5, max=1000 Last-Modified: Tue, 19 Jul 2016 00:59:33 GMT Server: Apache Transfer-Encoding: chunked Vary: Cookie, Accept-Encoding (content) GET /static/img/header-background.png HTTP/1.1 Host: developer.cdn.mozilla.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Referer: 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 (ima...
Index - HTTP
Web › HTTP › Headers › Index
uests CSP directive. 110 User-Agent HTTP, Reference, header The User-Agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. 111 Firefox user agent string reference Compatibility, Firefox, Firefox 4, Gecko, Gecko 2.0, Guide This document describes the user agent string used in Firefox 4 and later and applications based on Gecko 2.0 and later. For a breakdown of changes to the string in Gecko 2.0, see Final User Agent string for Firefox 4 (blog post). See also this document on user agent sniffing and this Hacks blog post. 112 Vary HTTP, Reference, Response, Response Header, head...
...col (HTTP or HTTPS) that a client used to connect to your proxy or load balancer. Your server access logs contain the protocol used between the server and the load balancer, but not the protocol used between the client and the load balancer. To determine the protocol used between the client and the load balancer, the X-Forwarded-Proto request header can be used. 121 X-Frame-Options Gecko, HAProxy, HTTP, Response Header, Security, nginx The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object> . Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites. 122 X-XSS-Protection HTTP, Reference, Secur...
Link prefetching FAQ - HTTP
that the user might visit in the near future. A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache. When the user visits one of the prefetched documents, it can be served up quickly out of the browser's cache. Does prefetching work with HTTPS? Starting in Gecko 1.9.1 (Firefox 3.5), HTTPS content can be prefetched. What are the prefetching hints? The browser looks for either an HTML <link> or an HTTP Link: header with a relation type of either next or prefetch. An example using the link tag follows: <link rel="prefetch" href="/images/big.jpeg"> The same prefetching hint using an HTTP Link: header: Link: </images/big.jpeg>; rel=prefetch The format...
...egin until all of the tabs finish loading. If you are using another application which uses the network, link prefetching in Mozilla may compete for bandwidth with the other application. This is a problem that we hope to address in the future by leveraging operating system services to monitor network idle time. Are there any restrictions on what is prefetched? Yes, only http:// (and, starting in Gecko 1.9.1 https://) URLs can be prefetched. Other protocols (such as FTP) do not provide rich enough support for client side caching. Will Mozilla prefetch documents from a different host? Yes. There is no same-origin restriction for link prefetching. Limiting prefetching to only URLs from the the same server would not offer any increased browser security. Do prefetched requests contain a Referer:...
Values - MathML
3333333em veryverythickmathspace => 0.3888888888888889em Constant Value veryverythinmathspace 1/18em verythinmathspace 2/18em thinmathspace 3/18em mediummathspace 4/18em thickmathspace 5/18em verythickmathspace 6/18em veryverythickmathspace 7/18em Negative contstants are introduced in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) (bug 650530) negativeveryverythinmathspace -1/18em negativeverythinmathspace -2/18em negativethinmathspace -3/18em negativemediummathspace -4/18em negativethickmathspace -5/18em negativeverythickmathspace -6/18em negativeveryverythickmathspace -7/18em ...
... ...
Media container formats (file types) - Web media technologies
onfiguration specifics. Video codecs supported by 3GP Codec Browser support Chrome Edge Firefox Safari AVC (H.264) Yes1,2 H.263 Yes1 MPEG-4 Part 2 (MP4v-es) Yes1 VP8 Yes1 [1] Firefox only supports 3GP on OpenMAX-based devices, which currently means the Boot to Gecko (B2G) platform. [2] Firefox support for H.264 relies upon the operating system's media infrastructure, so it is available as long as the OS supports it. Audio codecs supported by 3GP Codec Browser support Chrome Edge Firefox Safari AMR-NB Yes1 AMR-WB Yes1 AMR-WB+ Yes1 AAC-LC ...
... [2] Firefox support for AAC relies upon the operating system's media infrastructure, so it is available as long as the OS supports it. ADTS Audio Data Transport Stream (ADTS) is a container format specified by MPEG-4 Part 3 for audio data, intended to be used for streamed audio, such as for Internet radio. It is, essentially, an almost bare stream of AAC audio data, comprised o...
Index - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Index
send both the source and the stylesheet with a XML mime type, text/xml or application/xml. To find out the current type, load the file in Mozilla and look at the page info. Or use a download tool, those usually tell the mime type. 3 Index Index, Reference, XSLT Found 54 pages: 4 PI Parameters XSLT No summary! 5 The XSLT/JavaScript Interface in Gecko XSLT No summary! 6 Advanced Example XSLT This advanced example sorts several divs based on their content. The example allows sorting the content multiple times, alternating between ascending and descending order. The JavaScript loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file. Using the XSLTProc...
...t defaults to ascending if the parameter is empty (the first time the sorting happens, as there is no value for it in the XSLT file). The sorting value is set using XSLTProcessor.setParameter(). 7 Basic Example XSLT The basic example will load an XML file and apply a XSL transformation on it. These are the same files used in the Generating HTML example in the XSLT in Netscape Gecko article. The XML file describes an article and the XSL file formats the information for display. 8 Interface List NeedsContent, Reference See XSLTProcessor in the Web API documentation section. 9 Introduction Gecko, Intro, JavaScript, XSLT With modern browsers supporting XSLT, developers can now use JavaScript to access the power that XSLT provides. JavaS...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
t is an ideal mechanism for delivering such presentation versions of XML content. Built from the ground up utilizing a wide variety of XML technologies, Firefox incorporates within itself all of the mechanisms needed to process both original XML documents and the specialized stylesheets used to style and lay them out for HTML display, reducing server load with client-side processing. ...
...efox incorporates within itself all of the mechanisms needed to process both original XML documents and the specialized stylesheets used to style and lay them out for HTML display, reducing server load with client-side processing. At present, Gecko (the layout engine behind Firefox) supports two forms of XML stylesheets. For basic control of appearance -- fonts, colors, position, and so forth -- Gecko uses CSS. CSS1 and CSS2 are well supported and support for the emerging CSS3 standard is under development. For further information about CSS, see Eric Meyer's CSS pages. Our focus here is on the second type of stylesheet that Gecko supports: the XSLT stylesheet. XSLT stands for eXtensible Stylesheet Language/Transform and the name is apt. XSLT allows a stylesheet author to transform a primary X...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
pected though. Setting parameters You can control parameters for the stylesheet using the XSLTProcessor.setParameter(), XSLTProcessor.getParameter(), and XSLTProcessor.removeParameter() methods. These all take a namespace URI and a local name as the first two parameters, with XSLTProcessor.setParameter() taking a third - the value of the parameter to be set. See The XSLT/JavaScript Interface in Gecko for an example. Resetting The XSLTProcessor object also implements a XSLTProcessor.reset() method, which can be used to remove all stylesheets and parameters then put the processor back into its initial state. This method is implemented in Mozilla 1.3 and later. Resources The following reflect the interface of the XSLTProcessor object: nsIXSLTProcessor.idl XSLTProcessor.webidl Using XSL...
...SLTProcessor from an XPCOM component requires a different syntax as the constructor is not defined inside components. ...
Navigator.mozNotification - Archive of obsolete content
Currently, these are only supported on Firefox Mobile and Firefox OS. See Displaying notifications for an example. The support for this property as been dropped in favor of the standard Notification constructor. Method overview notification createNotification(in DOMString title, in DOMString description, in DOMString iconURL Optional); Methods createNotification() Creates and returns a notification object that can be used to display the specified message with an optional URL. ...
Getting Started - Archive of obsolete content
Learn how to contribute to the Add-on SDK. This page is now maintained alongside the SDK code itself: https://github.com/mozilla/gecko-dev/blob/master/addon-sdk/source/CONTRIBUTING.md. ...
system/xul-app - Archive of obsolete content
therwise. Properties ID The GUID of the host application. For example, for Firefox this value is "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}". name The host application name. The possible values here are: "Firefox" "Fennec" "Mozilla" "SeaMonkey" "Sunbird" "Thunderbird" "Firefox"and"Fennec"` are the most commonly used values. version The host application version. platformVersion The Gecko/XULRunner platform version. ids A mapping of application names to their IDs. For example, ids["Firefox"] == "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}". ...
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...
IsDefaultNamespace - Archive of obsolete content
The following is a snippet to get isDefaultNamespace() supported across other browsers. Note that all Gecko-based browsers (including Firefox) support Node.isDefaultNamespace. This function is not necessary for Gecko-based browsers (though the function will quickly return the standard value for Mozilla browsers). // http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace // http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#isDefaultNamespaceAlgo function isDefaultNamespace(node, namespaceURI) { if (node.isDefaultNamespace) { return node.isDefaultNamespace(namespaceURI); } switch (node.nodeType) { case 1: // ELEMENT_NODE if (!node.prefix) { return (node.namespaceURI === namespaceURI); } ...
LookupPrefix - Archive of obsolete content
Here is an implementation of lookupPrefix which should work cross-browser. Note that all Gecko-based browsers (including Firefox) support Node.lookupPrefix. This function is not necessary for Gecko-based browsers when used in XHTML. function lookupPrefix (node, namespaceURI) { var htmlMode = document.contentType; // Mozilla only // Depends on private function _lookupNamespacePrefix() below and on https://developer.mozilla.org/En/Code_snippets/LookupNamespaceURI // http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix // http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo // (The above had a few apparent 'bugs' in the pseudo-code which were corrected here) if (node.lookupPrefix && htmlMode !== 'text/html') { // Shouldn't use t...
Miscellaneous - Archive of obsolete content
l events. 3 Change text size. If set, you will not receive DOMMouseScroll events. You can listen to mouse wheel click events just like normal click events (via mousedown and mouseup events). When the mouse wheel is clicked, event.button will be equal to 1. ...
Post data to window - Archive of obsolete content
re passing the data to one of the methods. Here is an example: var dataString = "name1=data1&name2=data2"; // POST method requests must wrap the encoded text in a MIME // stream const Cc = Components.classes; const Ci = Components.interfaces; var stringStream = Cc["@mozilla.org/io/string-input-stream;1"]. createInstance(Ci.nsIStringInputStream); if ("data" in stringStream) // Gecko 1.9 or newer stringStream.data = dataString; else // 1.8 or older stringStream.setData(dataString, dataString.length); var postData = Cc["@mozilla.org/network/mime-input-stream;1"]. createInstance(Ci.nsIMIMEInputStream); postData.addHeader("Content-Type", "application/x-www-form-urlencoded"); postData.addContentLength = true; postData.setData(stringStream); // postData is rea...
Progress Listeners - Archive of obsolete content
p an external reference to your object to ensure that it stays in memory. When used with a tabbrowser, you cannot choose which types of events that will be received. Instead, you receive those events that the tabbrowser is interested in, except that the onLinkIconAvailable and onRefreshAttempted notifications are optional. The tabbrowser uses a strong reference to your listener object. Gecko 2.0 note Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), all events are optional. The tabbrowser only notifies you of the events for which you provide a callback. Remember to change myListener to a unique identifier. Example: Notification when the value in Address Bar changes A commonly asked question is how to get notified whenever the URL in the address bar (also...
Tabbox - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. ...
getAttributeNS - Archive of obsolete content
As some browsers do not support getAttributeNS, the following might be used to work on them as well. While namespaced attributes are less common than namespaced elements, some standards such as XLink depend on them. Note that all Gecko-based browsers (including Firefox) support DOM:element.getAttributeNS. This function is not necessary for Gecko-based browsers. function getAttributeNSWrapper (thisitem, ns, nsatt) { if (thisitem === null) { return false; } if (thisitem.getAttributeNS) { return thisitem.getAttributeNS(ns, nsatt); } else if (ns === null) { return thisitem.getAttribute(nsatt); } else if (ns === 'http://www.w3.org/XML/1998/namespace') { // This is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem.
Extension Packaging - Archive of obsolete content
ersion, author, and compatibility information. After the extension files and install.rdf have been prepared, there are several ways to prepare an extension for installation: ZIP the extension directory into a user-installable XPI (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the Windows registry. Note: Starting in Gecko 2.0, XPI files are no longer unpacked when extensions are installed. Instead, 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 f...
Inline options - Archive of obsolete content
control.value = "test"; } } }; Services.obs.addObserver(observer, "addon-options-displayed", false); // Don't forget to remove your observer when your add-on is shut down. This code should be in bootstrap.js (within the startup() function) for restartless extensions or in an XPCOM component or a JavaScript code module (not an overlay!) for traditional extensions. Note: Starting in Gecko 13.0, you can also listen for the addon-options-hidden notification, which has the same subject and data as above, to find out when the UI is about to be removed. Use this notification to remove event listeners, or any other references that might otherwise be leaked. Locating the options file There are two ways to let the Add-on Manager find your options file: Method 1 Name the file options...
Interaction between privileged and non-privileged pages - Archive of obsolete content
return setTimeout(function() { callback({quux: 4}); }, 3000); } if (request.mozilla) { return alert("alert in chrome"); } return callback(null); } } something.listen_request(something.callback); Message Passing in Chromium Sending structured data The above mechanisms use element attributes and are thus only strings. You may want to transfer objects. Gecko prevents chrome to access custom object properties added by the content, because that can create security holes. A workaround is to treat the communication between webpage and chrome as a normal network protocol and use XML. With element attributes and E4X, this is fairly easy. You do need to convert your data to/from E4X objects, though. And your chrome needs to carefully check every value pass...
Listening to events in Firefox extensions - Archive of obsolete content
There are several different categories of events; this article will help you learn about them and direct you to more specific documentation covering each of them. It also provides some use cases that may be of specific interest. Types of events There are multiple types of events that application and extension authors can use to receive notifications from <xul:browser> and <xul:tabbrowser> elements to hear about changes relating to loads of the content contained within them. Simple DOM events Registering for a DOM event is done using with code such as the following: function callback(evt) { // Do your processing here. ...
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
In order to use this interface in your code, you will need to get the IDL files from the source (via CVS, from a tarball, or using LXR). The following functions, however, are implemented in the glue library and can be used from frozen-linkage code: NS_NewArrayEnumerator (excluding deprecated nsISupportsArray version) NS_NewEmptyEnumerator NS_NewUnionEnumerator nsCR...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
let { Cc, Ci } = require("chrome"); /** * Safely parse an HTML fragment, removing any executable * JavaScript, and return a document fragment. * * @param {Document} doc The document in which to create the * returned DOM tree. * @param {string} html The HTML fragment to parse. * @param {boolean} allowStyle If true, allow <style> nodes and * style attributes in the parsed fragment. Gecko 14+ only. * @param {nsIURI} baseURI The base URI relative to which resource * URLs should be processed. Note that this will not work for * XML fragments. * @param {boolean} isXML If true, parse the fragment as XML. */ function parseHTML(doc, html, allowStyle, baseURI, isXML) { let PARSER_UTILS = "@mozilla.org/parserutils;1"; // User the newer nsIParserUtils on versions that ...
Local Storage - Archive of obsolete content
an 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 in the install.rdf file. It is being phased out, with SQLite taking its place in most cases. The RDF API may be removed at some point in the future because it require...
Overlay extensions - Archive of obsolete content
This page contains links to documentation for the approach to developing extensions for Gecko-based applications which uses: XUL overlays to specify the interface APIs available to privileged code, such as tabbrowser and JavaScript modules, to interact with the application and content. Prior to Firefox 4, and the Gecko 2 engine that powers it, this was the only way to develop extensions. This methodology has largely been superseded by restartless extensions, and the Add-on SDK, which is built on top of them. 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. More resources ...
Add-ons - Archive of obsolete content
re we call the event MyExtensionEvent. Legacy Add-ons This section contains links to documentation for legacy technology for add-on development, including: Legacy extensions for Firefox for Android Add-ons that work with desktop Firefox do not automatically work in Firefox for Android: Overlay extensions This page contains links to documentation for the approach to developing extensions for Gecko-based applications which uses: Performance best practices in extensions One of Firefox's great advantages is its extreme extensibility. Extensions can do almost anything. There is a down side to this: poorly written extensions can have a severe impact on the browsing experience, including on the overall performance of Firefox itself. This article offers some best practices and suggestions that ...
Adding preferences to an extension - Archive of obsolete content
irst is a label describing the textbox. The second is the textbox itself, in which the user enters the symbol. The preference property ties the textbox to the "pref_symbol" <preference> element and to the "extensions.stockwatcher2.symbol" preference. This lets the preference value automatically be updated to reflect the content of the textbox. Alternative method: Inline Options Requires Gecko 7(Firefox 7 / Thunderbird 7 / SeaMonkey 2.4) You could use Inline Options for this preference. You must set em:optionsType to 2 in your install.rdf. Your options.xul file would look like this: <?xml version="1.0" ?> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting pref="extensions.stockwatcher2.symbol" type="string" title="Stock to watch" /> </vbox> Ad...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
s. XMLHTTPRequest interface returns the DOM for the document that was passed. var x = new XMLRemoteRequest(); doc=x.getRemoteDocument(loaddata); Note: the above code snippet shows an object being instanciated based on a class named XMLRemoteRequest. This class is just an abstraction layer that encapsulates the XMLHTTPRequest interface, and provides cross-browser support for recent IE versions and Gecko-based browsers. The following XML datasources are used in this sample: http://web.archive.org/web/20090624020048/http://devedge-temp.mozilla.org/central/dom/catalog-new_en.xml http://web.archive.org/web/20090218052509/http://devedge-temp.mozilla.org/central/xml/catalog-new_en.xml http://web.archive.org/web/20100913225355/http://devedge-temp.mozilla.org/central/css/catalog-new_en.xml http://web.ar...
Install.js - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. To make your extension install in Mozilla Suite, SeaMonkey, Mozilla Firefox pre-0.9 and Mozilla Thunderbird pre-0.7, you need to have an install.js file in the root of your XPI file. ...
Images, Tables, and Mysterious Gaps - Archive of obsolete content
e of approaches and a reduction of single-pixel image tricks-- which, in a CSS-capable browser, are unnecessary anyway-- it is quite possible to sidestep this strange effect of standards support. The best solution may be to ensure that images are always in a cell by themselves, thus allowing authors to make them block-level, but as always this will depend on the author's design. Related Links Gecko's Almost Standards Mode Mozilla's Quirks Mode Original Document Information Author(s): Eric A. Meyer Last Updated Date: March 21st, 2003 Copyright (C) 2001-2003 Netscape. ...
Notes on HTML Reflow - Archive of obsolete content
ow reaches its target frame , described below. Reflow Metrics The reflow metrics object, nsHTMLReflowMetrics, is used to propagate information from child frames back to the parent. For example, the dimensions of each child frame of an unconstrained <div> would be passed back to the <div>'s frame via the nsHTMLReflowMetrics object. Incremental Reflow Although all of the reflow in Gecko attempts to re-use as much existing state as possible (and is in therefore some sense "incremental") an Incremental reflow corresponds to a reflow that is specifically targeted at an individual frame in the frame hierarchy. A frame requests a Incremental reflow (or one is requested on a frame's behalf) when something about the frame itself has changed. Scheduling. To request (or schedule ...
Same-origin policy for file: URIs - Archive of obsolete content
Specifically, a file can read another file only if the parent directory of the originating file is an ancestor directory of the target file. Directories cannot be loaded this way, however. For example, if you have a file foo.html which accesses another file bar.html and you have navigated to it from the file index.html, the load will succeed only if bar.html is either in the same directory as index.html or in a directory contained within the same directory as index.html. ...
Misc top level - Archive of obsolete content
principles (and perils) remain largely the same. Back in the early days, this approach worked, because browsers would usually make a table cell exactly as wide and tall as an image it contained.No Proxy For configurationThis document provides a comprehensive discussion of the manual proxy feature "No Proxy for:", including configuration issues, testing and bugs.Same-origin policy for file: URIsIn Gecko 1.8 or earlier, any two file: URIs are considered to be same-origin. In other words, any HTML file on your local disk can read any other file on your local disk. ...
Creating a Microsummary - Archive of obsolete content
Web pages can reference generators via <link rel="microsummary"> elements in their <head> elements. Generators can also be independently downloaded and installed by users if they include a list of pages to which they apply. In this tutorial we're going to create a microsummary generator for the Spread Firefox home page that displays the current Firefox download count along with the label Fx downloads; for example: 174475447 Fx downloads. ...
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
e classic.jar found in the Firefox installation directory. A .jar file is in reality a renamed zip archive. Opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive. However, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction. Note: Starting in Gecko 2.0, the new omni.jar file contains the skin, among other resources. See Theme changes in Firefox 4 for details on how to extract skin files from Firefox 4 or later. Classic.jar locations Linux: /usr/lib/MozillaFirefox/chrome/classic.jar or /usr/lib/firefox-*.*.*/chrome/classic.jar Windows: \Program Files\Mozilla Firefox\chrome\classic.jar For Mac OS X: Go to your applications folder Con...
Creating regular expressions for a microsummary generator - Archive of obsolete content
a sequence of characters) that matches patterns of characters in other strings. Microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' URLs. In this tutorial, we'll explain how to make regular expressions that match the URLs for eBay auction item pages. By the end of the tutorial, you should know some basics about regular expressions and understand how to create expressions that match URLs. For detailed documentation about regular expressions, see Core_JavaScript_1.5_Reference:Global_Objects:RegExp. ...
DTrace - Archive of obsolete content
amic tracing framework that allows developers to instrument a program with probes that have little to no effect on performance when not in use and very little when active. Probe data can be collected with scripts written in D (no, not that one). Mozilla DTrace support has been added by the Sun DTrace team and can be used on Solaris 10 and Mac OS X 10.5. DTrace has been largely supplanted by the Gecko Profiler and other tools, so this documentation has been archived. If you find that there are still use cases of consequence, you're welcome to file a documentation bug. The DTrace probes currently built into the codebase may be enabled by default in the future, but for now you'll need to create a build with --enable-dtrace (on Mac OS X you also have to use at least the 10.5 SDK for --with-maco...
Drag and Drop Example - Archive of obsolete content
An example of implementing drag and drop will be implemented in this section. Dragging Elements Around Here, we'll create a simple board where items from a palette can be dragged onto the board. The user can click on one of several XUL elements on the palette and drag it onto a stack element to create an element of a particular type. First, we'll add the wrapper scripts: <script src="chrome://global/content/nsDragAndDrop.js"/> <script src="chrome://global/content/nsTransferable.js"/> <script src="dragboard.js"/> An additional script file dragboard.js is included which will contain the code we will write ourselves. The board will be created using a stack element. ...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
This section describes how to use the JavaScript wrapper for drag and drop. The JavaScript Drag and Drop Wrapper The JavaScript wrapper to drag and drop simplifies the process by handling all of the XPCOM interfaces for you. It works by providing an object which implements the event handlers. All you have to do is write some simpler functions which work with the data being dragged. This drag and drop interface is stored in the global package, in the file chrome://global/content/nsDragAndDrop.js. You can include this file in your XUL file with the script tag in the same way you would include your own scripts. ...
Drag and Drop - Archive of obsolete content
This section describes how to implement objects that can be dragged around and dropped onto other objects. The Drag and Drop Interface Many user interfaces allow one to drag particular objects around within the interface. For example, dragging files to other directories, or dragging an icon to another window to open the document it refers to. Mozilla and XUL provide a number of events that can handle when the user attempts to drag objects around. A user can start dragging by holding down the mouse button and moving the mouse. The drag stops when the user releases the mouse. ...
Editor Embedding Guide - Archive of obsolete content
lue GetISupportsValue All of these take pointers to values except for GetStringValue which demands a reference to an nsAString. commandParam->GetBooleanValue("state_enabled",&boolval); Original Document Information Authors: Michael Judge (mjudge@netscape.com) Contributor: Kathleen Brade (brade@netscape.com) Last Updated Date: March 27, 2003 Original Document: A Guide to Embedding The Gecko Editor ...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Warning: This technology is obsolete. No active maintainer has stepped forward, and the code broke in Firefox 4. The code has been removed from the Mozilla source tree. XULRunner ships with the JavaXPCOM component, which allows Java code to interact with XPCOM objects. As you will see in this article, working with XPCOM objects in Java is not that much different than doing so in C++. ...
Error Console - Archive of obsolete content
ools 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. Manipulating data displayed in Error C...
Content states and the style system - Archive of obsolete content
We will focus on describing how changes in content state are handled. Generally, whenever a node's content state changes, style has to be reresolved (recomputed) for that node and all of its descendants. This is an expensive operation, however, so the style system tries to minimize the number of style reresolves it does. To this end, when a <code>ContentStatesChanged</code> notification is dispatched for a content node the first thing that's done is to is to check whether the content state change something could affect any styles. ...
Downloading Nightly or Trunk Builds - Archive of obsolete content
usage may change. Cutting edge Firefox downloads. As a development organization, the Mozilla community tends to describe things from the bottom up. So to figure out how to download a cutting edge or bleeding edge or 'beta' version of Firefox, you need to look for a "build" (which is developer-speak for the packaged files you can download) of 1.9.1 (the number of the underlying 'platform' called 'Gecko' or 'mozilla' that Firefox uses). As it turns out there is a platform number for every Firefox number, but they are not the same number. Firefox 3.0 corresponds to mozilla 1.9.0; Firefox 3.5 corresponds to mozilla 1.9.1; Firefox 3.6 corresponds to mozilla 1.9.2. However, the numbers are not used all of the time. Sometimes the Firefox releases are described by a code name. For example "Shiretoko...
Java in Firefox Extensions - Archive of obsolete content
You should still be able to use the Java plugin's scripting functionality, see LiveConnect for the pointers. Note bug 834918 about click-to-play effect on Java plugins in chrome and bug 775301. If you are in need of calling Java code from within a Firefox extension, you can make use of LiveConnect. ...
Microsummary XML grammar reference - Archive of obsolete content
A microsummary generator is an XML document that describes how to pull specific information from a web page to be presented in summary form as a bookmark whose title changes based on the content of the page it targets. Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) This article provides detailed information about the XML grammar used to build microsummary generators, describing each element and their attributes. For an introduction to how to create a microsummary, read the article Creating a Microsummary. Example The microsummary generator created in the Creating a Microsummary tutorial: <?xml version="1.0" encoding="UTF-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="Firefox Download Count"> <template>...
Microsummary topics - Archive of obsolete content
Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Programmatically installing a microsummary generator To programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsIMicrosummaryService interface implemented by the nsIMicrosummaryService component, then call its installGenerator() method, passing it an XML document containing the generator. For example, the following code snippet installs the microsummary generator from the Creating a Microsummary tutorial: var generatorText = ' \ <?xml version="1.0" encoding="UTF-8"?> \ <generator xmlns="http://www.mozilla.org/microsummaries/0.1" \ name="Firefox Do...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
sIE5) element = document.getElementById(aID); else if (isNetscape4) element = document.layers[aID]; else if (isIE4) element = document.all[aID]; return element; } The above code still has the issue of browser sniffing, or detecting which browser the user is using. Browser sniffing is usually done through the useragent, such as: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016 While using the useragent to sniff the browser provides detailed information on the browser in use, code that handles useragents often can make mistakes when new browser versions arrive, thus requiring code changes. It is much better and more reliable to sniff by browser capability or object feature support. You can usually do this by testing the required functionality in JavaScript. ...
Mozilla Application Framework - Archive of obsolete content
comprehensive framework that does much of the work for you, tools to help you develop your apps, and a community of people to help. Framework XUL A comprehensive, cross-platform UI toolkit with an easy-to-learn XML language for defining UI structure, a schema for localization, and support for both native and cross-platform (using CSS) look and feel to make writing UIs quick and painless. Gecko A performant web content rendering/editing engine with world-leading support for standards that you can drop into your application with a single line of XUL. Necko A wicked-fast, extensible networking library with built-in support for many common protocols and a well-defined plug-in interface for custom protocol handling so you can add the protocols you need. XPCOM A simple, cross-plat...
How to Write and Land Nanojit Patches - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Nanojit was removed during the development of (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8), so this information is relevant to earlier versions of the codebase. Adobe and Mozilla share a copy of Nanojit. This means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit. ...
Plugin Architecture - Archive of obsolete content
No released product uses this specific architecture. Note: This document describes how things are, not necessarily how things should be. It is not set in stone. Do not use this document for deciding what plugins can rely on. The described sequences are subject to change at any time. Classes There are some classes involved in plugins: nsObjectLoadingContent embed, object and applet nodes inherit from that class, which provides services for loading various kinds of objects. ...
Remote XUL - Archive of obsolete content
This also means you can't load XUL using file:// URLs unless you set the preference dom.allow_XUL_XBL_for_file to true. However, there is a whitelist that lets you specify sites that can still use remote XUL. ...
Space Manager Detailed Design - Archive of obsolete content
See the High Level Design document for an overview of the Space Manager, and as an introduction to the classes, structures and algorithms container in this, the Detailed Design Document. nsSpaceManager The Space Manager is the central class is a group of classes that manage the occupied and available space that exists in horizontal bands across a canvas. The primary goal of the Space Manager is to provide information about those bands of space to support the CSS notion of floated elements. ...
Supporting private browsing mode - Archive of obsolete content
ed; 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 mode, you can look at the privatebrowsingmode attribute on the document root. Its value is "permanent" if private browsing is permanently enabled for th...
Tuning Pageload - Archive of obsolete content
Mozilla Products/Projects which do page-loading) ship with what are considered the "best" settings for the most cases. This document explains which preferences to tweak to affect your pageload time. You use the URL about:config or the file prefs.js in your profile to change these. To best understand what the following preferences affect, there are a few things you should know. The data flows in Gecko as follows: network -> necko -> parser -> content sink -> content model -> rendering model -> layout -> painting. nglayout.initialpaint.delay This is a preference that specifies a delay, in milliseconds, after the data from the server has started coming in. During this delay, the page that's coming in is not painted, unless it ends up fully loaded before the delay expires. The idea here is tw...
URIScheme - Archive of obsolete content
URI Schemes http:// by default, port 80 https:// by default, port 443 (SSL) ftp:// by default, port 21 file:// : file:///etc/hosts on Unix/Linux, file:///c:/some/file.txt on Windows. moz-icon://.ext?size=32 : you can replace ext by your some file extension like js, css, xul, xml, etc. and the size number by 1 to 127 mailto:emailaddress@domain.com about: chrome:// ... Preferences See gecko.handlerService.schemes.* Scripting Interface See nsIProtocolHandler to create a new protocol/scheme. about: about: about:config about:crashes about:mozilla about:plugins about:robots ... ...
Venkman Introduction - Archive of obsolete content
e JavaScript debugger compares favorably with Visual Interdev and other large web development tools. On other platforms, including Mac OS and Unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. Starting the Debugger The JavaScript Debugger is automatically pre-installed in Mozilla 1.x but must be installed separately in Firefox and other Gecko-based products, such as Thunderbird and Netscape 7.x. Fortunately, the XPInstall technology makes it possible to install new application modules in Firefox by just clicking a hyperlink. If you don't already have Venkman or would like to upgrade, you can easily get the latest version from Firefox Add-ons. The installation process is two steps. First, from within the browser you want to host the d...
Venkman - Archive of obsolete content
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 - Archive of obsolete content
elp 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. (as QuickTime; 198 MB) Laying out and drawing documents (slides) This presentation describes how a document is laid out and painted to the display by the Gecko engine. (as QuickTime; 282 MB) Community These presentations provide insight into the Mozilla community and how the project works. The Mozilla Community (Part 1, Part 2) This presentation talks about the Mozilla community and how you can get involved smoothly. (as QuickTime; 170 MB and 80 MB) Mozilla-Seneca Projects Q&A with Mike Shaver (Part 1, Part 2) Mike Shaver answers questions abou...
Elements - Archive of obsolete content
The field tag must be inside the implementation tag. id - The id attribute is a document-unique identifier. name - The name of the field. This is the name used to refer to the field on the bound element. readonly - If true, this field is read-only. If this attribute is omitted, the field will be readable and writable. Note: The readonly attribute did not work correctly on XBL fields until Gecko 2.0. Note: In Firefox 3, fields are now evaluated the first time they're accessed instead of at binding attachment time. This shouldn't cause any problems in typical use cases, but there are cases in which this will impact the behavior of your code. See bug 372769 for details. Here are some examples of cases in which the behavior of your code may change due to this change in Firefox 3: If y...
XBL 1.0 Reference - Archive of obsolete content
Extensible Binding Language is a XML-based markup language to implement reusable components (bindings) that can be bound to elements in other documents. The element with a binding specified, called the bound element, acquires the new behavior specified by the binding. Bindings can be bound to elements using Cascading Style Sheets (CSS) or DOM. One element can be bound to several bindings at once. Functionally bindings should be correlated with Behaviors and Viewlink but being implemented as one integrated XML solution. ...
XBL - Archive of obsolete content
some features of XBL, such as bindings inheritance and defining methods/properties on bound elements. XBL 2.0 (W3C Candidate Recommendation) was developed to address problems found in XBL 1.0 and to allow for implementations in a broader range of Web browsers. In 2009 Mozilla announced plans to implement XBL2 in future versions of Gecko. Some differences between sXBL and XBL2 are listed in an article by Anne van Ke ( seesteren (November, 2005). An overview of differences between Mozilla XBL and XBL2 is in a newsgroup posting by Jonas Sicking (April, 2007). Still living "Shadow DOM" related specs ...
Methods - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods dirCreate Creates a new directory. dirGetParent Returns an object representing the parent directory. dirRemove Removes a directory. dirRename Renames the specified directory. copy Makes a copy of the specified file. diskSpaceAvailable Returns the amount of disk space available in bytes. ...
File Object - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. File Use the File object to manipulate local files and directories during the installation process. ...
InstallVersion Object - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. InstallVersion You use InstallVersion objects to contain version information for software. Overview This object and its methods are used both when triggering a download, to see whether a particular version needs to be installed, and when installing the software. ...
Methods - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods addDirectory Unpacks an entire subdirectory. addFile Unpacks a single file. alert Displays an Alert dialog box with a message and an OK button. cancelInstall Aborts the installation of the software. ...
Install Object - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Install Use the Install object to manage the downloading and installation of software with the XPI Installation Manager. Overview The Install object is used primarily in installation scripts. ...
Methods - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
WinProfile Object - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. WinProfile (Windows only) Windows developers use this object to manipulate the content of a Windows .ini file. Overview This object does not have a public constructor. Instead, you construct an instance of this object by calling the getWinProfile method of the Install object. ...
Methods - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. Methods createKey Adds a key. deleteKey Removes a key. deleteValue Removes the value of an arbitrary key. enumKeys Retrieves the registry subkeys for the given key. enumValueNames Retrieves the value of a given subkey. ...
WinReg Object - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. WinReg (Windows only) Windows developers use this object to manipulate the content of the Windows registry. Overview This object does not have a public constructor. Instead, you construct an instance of this object by calling the getWinRegistry method of the Install object. ...
XPInstall API reference - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. This article uses the installer script from browser.xpi install package as the basis for discussing XPI installations in general. ...
XPInstall - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. ...
XTech 2005 Presentations - Archive of obsolete content
will meet this challenge with two major new features to be delivered in Firefox 1.1: integrated SVG and a new canvas HTML element. Work is also 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
ications. Future browser graphics capabilities, both 2D and 3D, are also discussed. Converging Rich-Client and Web Application Development with Mozilla XULRunner (Open Office format) - Benjamin Smedberg This presentation 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. ...
alternatingbackground - Archive of obsolete content
<< XUL Reference home alternatingbackground Obsolete since Gecko 2.0 Type: boolean If true, the background of the tree's rows will alternate between two colors. You can use the :-moz-tree-row CSS style to do this instead. ...
alwaysopenpopup - Archive of obsolete content
<< XUL Reference home alwaysopenpopup Obsolete since Gecko 1.9.1 Type: boolean Note: Applies to: Thunderbird and SeaMonkeyIf true, the autocomplete popup will be displayed even when there are no matches. If false, the default value, the popup will be hidden. This attribute is obsolete as of Gecko 1.9.1; to control the display of the popup, use the minresultsforpopup attribute instead. ...
autoFillAfterMatch - Archive of obsolete content
<< XUL Reference home autoFillAfterMatch Obsolete since Gecko 1.9.1 Type: boolean If set to true, the entire text of the best match will be displayed at the end of the input. If false, only the text that hasn't been entered yet will be filled in. The textbox.autoFill attribute must be set to true to use this feature. As of Gecko 1.9.1, this attribute is superseded by the completedefaultindex attribute. ...
closebutton - Archive of obsolete content
This feature is used by the tabbrowser to provide the facilities for adding and closing tabs. ...
emptytext - Archive of obsolete content
<< XUL Reference home emptytext Deprecated since Gecko 2 Type: string A string that appears in the textbox when it has no value. This is superseded by the placeholder attribute in Gecko 2.0. The old name is retained for compatibility, but you should update your code. ...
ontextcommand - Archive of obsolete content
<< XUL Reference home ontextcommand Obsolete since Gecko 1.9.1 Type: script code Note: Applies to: Thunderbird, SeaMonkeyThis event handler is called when a result is selected for the textbox. As of Gecko 1.9.1, this attribute is superseded by the ontextentered attribute. ...
ontextrevert - Archive of obsolete content
<< XUL Reference home ontextrevert Obsolete since Gecko 1.9.1 Type: script code Note: Applies to: Thunderbird, SeaMonkey This event handler is called when the user presses Escape to revert the textbox to its original uncompleted value. As of Gecko 1.9.1, this attribute is superseded by the ontextreverted attribute. ...
sizemode - Archive of obsolete content
persisted sizemode attribute wouldn't be minimized. Setting this attribute does not change the window state. Use window.maximize(), window.restore(), or window.minimize() to change the window state. To get the window state from JavaScript code, use window.windowState. Listen to the sizemodechange event dispatched to the DOM window to get notified when the window state changes. Note: Prior to Gecko 13.0, this did not work on Mac OS X. Note: Prior to Gecko 1.9.2, this was not always reliable. Issues with this attribute (at least on Firefox 3): sizemode is only updated when the value of the persist attribute on the root element (such as <window>) contains sizemode. ...
substate - Archive of obsolete content
<< XUL Reference home substate Type: one of the values below On splitters which have state="collapsed" and collapse="both", determines which direction the splitter is actually collapsed in. Since collapse="both" is a Gecko 1.9+ feature, this will have no effect on earlier versions. before The element immediately before the splitter is collapsed. after The element immediately after the splitter is collapsed. ...
textbox.autoFill - Archive of obsolete content
<< XUL Reference home autoFill Obsolete since Gecko 1.9.1 Type: boolean Note: Applies to: Thunderbird and SeaMonkeyIf set to true, the best match will be filled into the textbox as the user types. If false, the default, the value will not be filled in until the user selects an item. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.disableAutocomplete - Archive of obsolete content
<< XUL Reference home disableAutocomplete Obsolete since Gecko 1.9.1 Type: boolean If true, the autocomplete behavior will be disabled. You might use a script to change this attribute. If false, the default, autocomplete is enabled. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.disablehistory - Archive of obsolete content
<< XUL Reference home disablehistory Obsolete since Gecko 2.0 Type: boolean Note: Applies to: Thunderbird and SeaMonkeyIf false, an arrow button will appear on the end of the textbox which will open a dropdown menu of all available results. The default value is true, hiding the dropdown button. This attribute only works correctly in SeaMonkey 1.x; for Thunderbird and SeaMonkey 2.0 you should also set the enablehistory attribute; as of Gecko 2.0 this attribute is completely superseded by it. ...
textbox.forceComplete - Archive of obsolete content
<< XUL Reference home forceComplete Obsolete since Gecko 1.9.1 Type: boolean If true, the textbox will be filled in with the best match when it loses the focus. If false, it will only be filled in when the user selects an item. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.ignoreBlurWhileSearching - Archive of obsolete content
<< XUL Reference home ignoreBlurWhileSearching Obsolete since Gecko 1.9.1 Type: boolean If true, blur events are ignored while searching, which means that the autocomplete popup will not disappear. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.minResultsForPopup - Archive of obsolete content
<< XUL Reference home minResultsForPopup Obsolete since Gecko 1.9.1 Type: integer The minimum number of results that must be returned for the popup to be displayed. The default value is 1. A zero value will always open the popup unless the textbox is empty. This can be used to display additional items that are not autocomplete results. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.onblur - Archive of obsolete content
<< XUL Reference home onblur Type: script code This event is sent when a textbox loses keyboard focus. Note: The behavior of this event has evolved over time. Prior to Gecko 1.9 (Firefox 3), the script code would execute in the context of the anonymous HTML <input> element inside the textbox binding. From Gecko 1.9 to Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9), the script code would actually execute twice, once in the context of the anonymous HTML <input> element and once in the context of the <textbox> element itself. As of Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10), the script code only runs in the context of the <textbox> element, matching the behavior of all other event handlers. ...
textbox.onfocus - Archive of obsolete content
<< XUL Reference home onfocus Type: script code This event is sent when a textbox receives keyboard focus. Note: The behavior of this event has evolved over time. Prior to Gecko 1.9 (Firefox 3), the script code would execute in the context of the anonymous HTML <input> element inside the textbox binding. From Gecko 1.9 to Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9), the script code would actually execute twice, once in the context of the anonymous HTML <input> element and once in the context of the <textbox> element itself. As of Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10), the script code only runs in the context of the <textbox> element, matching the behavior of all other event handlers. ...
textbox.showCommentColumn - Archive of obsolete content
<< XUL Reference home showCommentColumn Obsolete since Gecko 1.9.1 Type: boolean If true, a comment column appears in the popup. For the URL history, the comment column will contain the page titles associated with each URL. If this attribute is not specified, the comment column doesn't appear. As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.tabScrolling - Archive of obsolete content
<< XUL Reference home tabScrolling Obsolete since Gecko 1.9.1 Type: boolean If true, the user may cycle through the results list by pressing the Tab key. If false, the default, the Tab key moves the focus to the next element.As of Gecko 1.9.1, this attribute is now always specified in lower case. ...
textbox.type - Archive of obsolete content
search box is empty using the emptytext attribute, and a timeout may be set for the command event using the timeout attribute (defaults to 500). timed This textbox will fire a command event after the user types characters and a certain time has passed. The delay is set with the timeout attribute. The command event will fire if the user presses the Enter key. The timed type is deprecated in Gecko 1.9.1 and the search textbox may be used instead. XBL-specific note Beware that if you create an XBL binding for a textbox, you need to use the appropriate extends attribute and changing type attribute on the tree won't have effect. E.g. if you have <binding id="input" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete" >, then the textbox will have autocomplete type,...
treecol.width - Archive of obsolete content
<< XUL Reference home width Type: string (representing an integer) The preferred width of the tree column. The value should not include a unit as all values are in pixels. Specifying widths for your columns causes Gecko to allow the tree to be scrolled horizontally if it is wider than the available space. ...
Attribute (XUL) - Archive of obsolete content
tenttooltip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultButton defaultset description dir disableAutocomplete disableautoselect disableclose disabled disablehistory disableKeyNavigation disablesecurity dlgtype dragging editable editortype element empty emptytext Deprecated since Gecko 2 enableColumnDrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forceComplete grippyhidden grippytooltiptext group handleCtrlTab height helpURI hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreBlurWhileSearching ignorecase ignorei...
Dynamically modifying XUL-based user interface - Archive of obsolete content
ic manipulations on a document, and then demonstrates working with anonymous XBL content using Mozilla-specific methods. It is written for beginner to intermediate XUL developers. We assume that the reader has basic knowledge of both XUL and JavaScript. You may also want to read some introductory documents about DOM, like the About the Document Object Model article or the Introduction page of the Gecko DOM Reference. Introduction As you know, XUL is an XML language used in various Mozilla-based applications, such as Firefox and Thunderbird, to describe the user interface. In XUL applications JavaScript defines the behavior, using DOM APIs to access the XUL document. So what are the Document Object Model APIs? They are the interfaces that are used in any interaction of a script and a document. ...
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. ...
Introduction to XUL - Archive of obsolete content
lications like browsers and mail clients from a set of tools designed for that purpose. The intention is not to implement a generic cross-platform application framework. That's been done, and is a great deal of work. We intend to provide a subset of cross-platform functionality suitable for building network applications like browsers, leveraging the cross-platform functionality already built into Gecko, Mozilla's HTML layout engine. The term "cross-platform UI" is somewhat misleading. UI designers will be able to create UI descriptions which will work on multiple platforms. But proper UI descriptions which take into account various platforms' differing ideas about proper placement of such things as dialog buttons will require some platform-specific work. A single XUL specification can only cro...
addSession - Archive of obsolete content
This can be used to create a customized autocomplete results list. The argument should be an object which implements the nsIAutoCompleteSession interface. ...
getResultAt - Archive of obsolete content
<< XUL Reference home getResultAt( index ) Obsolete since Gecko 26 Return type: nsIAutoCompleteItem Returns the result item at the specified index. The item will be a value of type nsIAutoCompleteItem. ...
getSession - Archive of obsolete content
<< XUL Reference home getSession( index ) Obsolete since Gecko 26 Return type: nsIAutoCompleteSession Returns the session object with the given index. This will return an object of type nsIAutoCompleteSession. ...
getSessionByName - Archive of obsolete content
<< XUL Reference home getSessionByName( name ) Obsolete since Gecko 26 Return type: nsIAutoCompleteSession Returns the session object with the given name. This will return an object of type nsIAutoCompleteSession. ...
getSessionResultAt - Archive of obsolete content
...
getSessionStatusAt - Archive of obsolete content
...
removeSession - Archive of obsolete content
<< XUL Reference home removeSession( session ) Obsolete since Gecko 26 Return type: void Removes a session object from the autocomplete widget. The argument should be an object which implements the nsIAutoCompleteSession interface. ...
reset - Archive of obsolete content
Archive › Mozilla › XUL › Method › reset
...
showPopup - Archive of obsolete content
There are two ways of specifying where the popup appears, either at a specific screen position, or relative to some element in the window. If either x or y are set to values, the popup will appear at the screen coordinate (x,y). If x and y are -1, the popup will be positioned relative to the element specified as the first argument. This is what you might do to show a popup below a button, for example. ...
syncSessions - Archive of obsolete content
...
Other Resources - Archive of obsolete content
Links Creating Applications with Mozilla XUL Periodic Table Online example of nearly every XUL element. Demostrates flexing, layouts, set up of trees and such. Very useful. (zipped version) Gecko DOM Reference ...
Panels - Archive of obsolete content
er to prevent the previously focused element from being refocused. Normally, only the latter would be set if needed. This process of removing the focus when opening and closing a popup occurs after the popupshowing event or popuphiding event is fired, which means that if those events are cancelled, the focus is not adjusted. Letting panels be dragged by grabbing the background Requires Gecko 7.0(Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Starting in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), you can use the backdrag attribute to create panels that the user can drag by clicking and dragging anywhere on their backgrounds. This is a simple, Boolean attribute, so you can enable this feature like this: <panel backdrag="true"> ...
alwaysOpenPopup - Archive of obsolete content
...
appLocale - Archive of obsolete content
<< XUL Reference appLocale Obsolete since Gecko 1.9.1 Type: nsILocale Returns the XPCOM object which holds information about the user's locale. This is an object which implements nsILocale. Gecko 1.9.1 note This property was removed in Gecko 1.9.1. ...
autoFillAfterMatch - Archive of obsolete content
...
boxObject - Archive of obsolete content
<< XUL Reference boxObject Type: nsIBoxObject This property is available for elements that are derived from boxes, which is most displayable XUL elements. Prior to Gecko 1.9.1, you can retrieve the boxObject for non-XUL elements using the document.getBoxObjectFor method; the method was removed in Gecko 1.9.1 because it was non-standard. It is covered further in the tutorial. ...
documentCharsetInfo - Archive of obsolete content
<< XUL Reference documentCharsetInfo Obsolete since Gecko 12.0 Type: nsIDocumentCharsetInfo This read-only property contains the nsIDocumentCharsetInfo object for the document which is used to handle which character set should be used to display the document. The properties of the nsIDocumentCharsetInfo object were merged into the docshell in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9). ...
emptyText - Archive of obsolete content
<< XUL Reference emptyText Deprecated since Gecko 2 Type: string Gets and sets a string that appears in the textbox when it has no value. This is superseded by the placeholder property in Gecko 2.0. The old name is retained for compatibility, but you should update your code. ...
maxWidth - Archive of obsolete content
<< XUL Reference maxWidth Type: integer Gets and sets the value of the maxwidth attribute. Note: Prior to Gecko 6.0, you could use this on <input> elements; this was never intended, was a violation of the HTML specification, and has been fixed. Use the size to set the maximum width of input fields. ...
searchSessions - Archive of obsolete content
...
Property - Archive of obsolete content
ount database datasources date dateLeadingZero dateValue decimalPlaces decimalSymbol defaultButton defaultValue description dir disableAutocomplete disableAutoComplete disableautoselect disabled disableKeyNavigation dlgType docShell documentCharsetInfo editable editingColumn editingRow editingSession editor editortype emptyText Deprecated since Gecko 2 enableColumnDrag eventNode firstOrdinalColumn firstPermanentChild flex focused focusedItem forceComplete group handleCtrlPageUpDown handleCtrlTab hasUserValue height hidden hideSeconds highlightNonMatches homePage hour hourLeadingZero id ignoreBlurWhileSearching image increment inputField inverted is24HourClock isPM isSearching isWaitin...
Building Trees - Archive of obsolete content
change the syntax to refer to a specific treechildren element rather than all of them. Once the row height is changed, we can see the full photos. Note: If you want to have the state of the disclosure triangles ("twisties") be persistent, be sure to give each node a unique "id" attribute. These are used to track the current state of the disclosure triangles. Support for this was introduced in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4). Using Tree Properties Since we need to use special CSS for trees, the properties attribute on a cell becomes extremely useful. It can be used to define extra properties for reference later in a stylesheet. For example, if the properties attribute was set to the value "?creator", you could style the photos created by different people differentl...
XML Templates - Archive of obsolete content
="*" querytype="xml"> <template> ... </template> <listbox> The URL in the datasources attribute may be a relative URL or an absolute URL. Note: If you want to have the state of the disclosure triangles ("twisties") be persistent, be sure to give each node a unique "id" attribute. These are used to track the current state of the disclosure triangles. Support for this was introduced in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4). For this and the following examples, we are going to use the following XML document containing a list of people: <people> <person name="Napoleon Bonaparte" gender="male"/> <person name="Cleopatra" gender="female"/> <person name="Julius Caesar" gender="male"/> <person name="Ferdinand Magellan" gender="male"/> <person name="Laura Seco...
textbox (Toolkit autocomplete) - Archive of obsolete content
search box is empty using the emptytext attribute, and a timeout may be set for the command event using the timeout attribute (defaults to 500). timed This textbox will fire a command event after the user types characters and a certain time has passed. The delay is set with the timeout attribute. The command event will fire if the user presses the Enter key. The timed type is deprecated in Gecko 1.9.1 and the search textbox may be used instead. value Type: string The string attribute allows you to associate a data value with an element. It is not used for any specific purpose, but you can access it with a script for your own use. Be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you...
Things I've tried to do with XUL - Archive of obsolete content
es though, since the actual height of the container isn't known, and 30% of an unknown number is still an unknown number. Vlad: sure; the snippets assume that there's some enclosing structure that will provide the actual height. Wrap the whole thing in a <vbox height="300"> or something. :) Silver: if you set height="0" and include "overflow: hidden" on each box that is sharing the space, current Gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired. From my reading of the code, just height="0" should work, but it doesn't seem to. This trick doesn't work in 1.4, but works in 1.7 and current versions. Obtaining the rect of an element You can't obtain the actual visible rect of an element. HTML elements have the non-standard clientWidth/c...
Tree Widget Changes - Archive of obsolete content
There are no changes to XUL tree tags, however the id attribute is no longer required on treecol elements just to get them to work. That means that the ids can be left out, although it's probably a good idea to use them anyway. Instead of identifying columns by id, a new column object is used. This object implements the nsITreeColumn interface and holds information about a single column in the tree. A tree will have one of these objects for each column (each treecol element) in the tree. The columns are grouped into a list which implements the nsITreeColumns interface. ...
Adding HTML Elements - Archive of obsolete content
e seen in the image, the text inside the div tag was displayed but the other text (Expense Report 1 and What I Did Last Summer) was not. This is because there is no HTML or XUL element capable of displaying text enclosing it. To have this text appear, you would need to put it inside the div tag, or enclose the text in a description tag. Note: Due to bug 554290, this text actually does render in Gecko 1.9.2 and later. Invalid HTML elements <html:po>Case 1</html:po> <div>Case 2</div> <html:description value="Case 3"/> All three of the cases above will not display, each for a different reason. Case 1 po is not a valid HTML tag and Mozilla has no idea what to do with it. Case 2 div is valid but only in HTML. To get it to work, you will need to add the html: qualifier. Case 3...
Adding Properties to XBL-defined Elements - Archive of obsolete content
alue of the property is stored in the number attribute. You can use either syntax for creating get and set handlers. Readonly Attribute You can make a field or property read-only by adding a readonly attribute to the field tag or property tag and setting it to true. Attempting to set the value of a read-only property will fail. Note: The readonly attribute did not work correctly on fields until Gecko 2.0. The next section shows how to add methods to XBL-defined elements. << PreviousNext >> ...
Creating an Installer - Archive of obsolete content
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. << PreviousNext >> This section will describe packaging a XUL application into an installer. XPInstall Packages Mozilla provides a mechanism which can be used to package XUL windows, scripts, skins and other files into single file installers. ...
Cross Package Overlays - Archive of obsolete content
Overlays have another very useful feature. In the examples in the previous section, the overlays were imported by the window. You can also go the other way and have the overlays specify which windows that they apply to. You specify this by modifying the contents.rdf file for your package. ...
Custom Tree Views - Archive of obsolete content
r instance, 5000 rows of treeitems would load too slowly. You might also implement a custom view when you want to perform computations on the data to be displayed. Since the view can store and retrieve the data in the most suitable manner for the kind of data used, the tree can be used even when there are hundreds of thousands of rows to be displayed. Note: The tree-related interfaces changed in Gecko 1.8. See Tree Widget Changes for details. To implement a custom view, you will need to create an object which implements the nsITreeView interface. You can create these objects in JavaScript, but you will need a separate object for each tree. Naturally, since a custom tree view is being used, the content tree view will not be used, so the treeitem, treerow, and treecell elements will have no pur...
Features of a Window - Archive of obsolete content
ever elements were added to a window, the window's width expanded to fit the new elements. The window is really just a box which is flexible and defaults to vertical orientation. You can also specify the width and height directly on the window tag. This, of course, causes the window to be displayed in a specific size. If you leave it out, the size is determined by the elements that are in it. Gecko 1.9.2 note Starting in Gecko 1.9.2 (Firefox 3.6), overriding the position of a window using window features will not change the persisted values saved by the session store feature. That means the next time the window is opened, it will still open in the saved location. <window id="findfile-window" title="Find Files" width="400" height="450" xmlns="http://www.mozilla.org/keymaster/g...
Introduction - Archive of obsolete content
e values in XUL must be placed inside quotes, even if they are numbers. XUL files are usually split into four files, one each for the layout and elements, for style declarations, for entity declarations (used for localization) and for scripts. In addition, you may have extra files for images or for platform specific data. XUL is supported in Mozilla and browsers that are also based upon on the Gecko engine, such as Netscape 6 or later and Mozilla Firefox. Due to various changes in XUL syntax over time, you will want to get the latest version for the examples to work properly. XUL is fairly similar in Firefox and to other browsers, although it has some specific differences such as support for customizable toolbars. This tutorial attempts to cover much of XUL's functionality, however, not all...
Manifest Files - Archive of obsolete content
Mozilla application starts up to see what packages are installed. That means that all you need to do to install a new package is add a new manifest file either into the application chrome directory or the user specific chrome directory. This latter chrome directory is normally the one used since the application directory might not have sufficient permissions to write into it. Note: Starting in Gecko 2.0, only the file named chrome.manifest is read automatically; if you need to read multiple manifest files, use the manifest command in that file to import additional manifests. Use manifest flags to configure the scenarios in which the secondary manifest is imported. If you just want to try testing privileged XUL code in the Firefox browser, you can do this easily by just using a manifest with...
Property Files - Archive of obsolete content
entage character in it (to get something like "50% Off" returned), escape the percentage character with another percentage character, like this: my.percentage.string = %S%% Off Not escaping the percentage character will generate an incorrect string that strips the space character between the percentage character and the next word of the string ("50%Off"). Non-ASCII Characters, UTF-8 and escaping Gecko 1.8.x (or later) supports property files encoded in UTF-8. You can and should write non-ASCII characters directly without escape sequences, and save the file as UTF-8 without BOM. Double-check the save options of your text editor, because many don't do this by default. See Localizing extension descriptions for more details. In some cases, it may be useful or needed to use escape sequences to expr...
Tree View Details - Archive of obsolete content
hat the user may open and close the row to see child items. Empty containers will not have a twisty, but will still be treated like a container. When the user clicks the twisty to open a row, the tree will call the view's toggleOpenState method. The view should then perform any necessary operations to retrieve the child rows and then update the tree with the new rows. Note: As of this writing (Gecko 2.0), custom nsITreeView implementations must be prepared to handle a call to toggleOpenState for any row index which returns true for a call to isContainer, regardless of whether the container is empty. Review of the Methods Here is a review of the methods needed to implement hierarchical views: getLevel(row) hasNextSibling(row, afterIndex) getParentIndex(row) isContainer(row) isContainerEmp...
Using Remote XUL - Archive of obsolete content
This also means you can't load XUL using file:// URLs unless you set the preference dom.allow_XUL_XBL_for_file to true. However, there is a whitelist that lets you specify sites that can still use remote XUL. ...
Using the Editor from XUL - Archive of obsolete content
r) nsTextEditorCompositionListener (as a nsIDOMCompositionListener) nsTextEditorDragListener (as a nsIDOMDragListener) In nsEditorShell::PrepareDocumentForEditing(), we install a mouse listener. This only happens for situations where the nsEditorShell is used (i.e. not for text widgets): nsEditorShellMouseListener (as a nsIDOMMouseListener) Note: Starting in Gecko 12, the editor refuses any events sent by unprivileged content. nsTextEditorKeyListener This event listener handles key presses for typing, and other editing operations (backspace, delete, enter/return). Cases that it does not handle explicitly it passes on to nsHTMLEditor::EditorKeyPress(), which is where normal typing keys end up. Note that it only responds to the KeyPress event; KeyDown and...
XUL Changes for Firefox 1.5 - Archive of obsolete content
For other changes you should be aware of, see Adapting XUL Applications for Firefox 1.5. <scrollcorner> A <scrollcorner> element is added which is used to create the small box in the intersection of the horizontal and vertical scrollbars. <richlistbox> and <richlistitem> The <richlistbox> and <richlistitem> elements are used for creating lists containing arbitrary content. This element works similarly to the <listbox> which is designed primarily for lists of textual items. The <richlistbox> supports much of the same API as the <listbox> and single items, created with the <richlistitem> element may be selected. ...
XUL Questions and Answers - Archive of obsolete content
ed from the rdf datasource Create the element, set the datasources attribute then add the element to the document. This should then create the database. XULRunner questions These don't really belong on this page. Is there a way to check what directory "application.ini" is in? Use directory service The key to the folder where application.ini resides is "resource:app". I get the error: Gecko MinVersion requirement not met. Visit http://developer.mozilla.org/en/docs...pplication.ini to find out how to properly set up the application.ini file. How can i use other fonts on XULRunner applications which are not installed on the current machine? In order to do this, you must first attach the font file as a bundle with the XULRunner application as a bundle. You also have to write CSS c...
XUL Reference - Archive of obsolete content
erlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (Firefox-only starting with Firefox 3/Gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (Firefox autocomplete) textbox (Mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox ...
The Implementation of the Application Object Model - Archive of obsolete content
you've read this far, you should now have a general idea of what the architecture is like, as well as the motivations for choosing such an architecture. Now it's time to fill in some of the details by mentioning XUL and RDF specifically. A picture (provided by Chris Waterson) of the XUL/RDF architecture is shown below. Let's start over on the left side of the picture. A XUL document is read into Gecko's parser, and a specialized content sink, known as the XUL content sink, is responsible for constructing the in-memory RDF graph representation of the XUL. The RDF graph represented by the XUL is then aggregated with the contents of other RDF stores (like bookmarks or history) to construct a composite data source, which is aggregated data still in an RDF graph form. The resultant aggregated graph...
XUL controls - Archive of obsolete content
Reference <textbox type="password"> A textbox that hides the characters typed, used for entering passwords. <textbox type="password"/> Textbox Reference <textbox type="search"> A textbox for searching. <textbox type="search"/> Textbox Reference <textbox type="timed"> Deprecated in Gecko 1.9.1 A textbox for responding to user input. The command event is fired after the user stops typing, or if the user tabs away or hits Enter. <textbox type="timed"/> Textbox Reference <timepicker> A timepicker displays a set of textboxes for entering a time. <timepicker value="12:05"/> Timepicker Reference ...
browser - Archive of obsolete content
TODO Use the contentWindow.wrappedJSObject to obtain a DOM(html) window object currentURI Type: nsIURI This read-only property contains the currently loaded URL. To change the URL, use the loadURI method. docShell Type: nsIDocShell This read-only property contains the nsIDocShell object for the document. documentCharsetInfo Obsolete since Gecko 12.0 Type: nsIDocumentCharsetInfo This read-only property contains the nsIDocumentCharsetInfo object for the document which is used to handle which character set should be used to display the document. The properties of the nsIDocumentCharsetInfo object were merged into the docshell in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9). homePage Type: stri...
editor - Archive of obsolete content
ocument loaded in the editor. To edit a new document, set the src attribute to about:blank. To access most of the functionality of the editor, your application must be part of an extension or part of the chrome. XUL applications loaded via a URL from a web server will not be able to access most of the features of the editor. See the Rich text editing and Midas pages for more information about Gecko's built-in rich text editor. Attributes editortype, src, type Properties accessibleType, commandManager, contentDocument, contentWindow, docShell, editingSession, editortype, webBrowserFind, webNavigation Methods getEditor, getHTMLEditor, makeEditable Examples This example shows how to made the editor editable by setting the designMode property of the loaded HTML document: <scri...
image - Archive of obsolete content
Archive › Mozilla › XUL › image
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] Summary An element that displays an image, much like the HTML img element. The src attribute can be used to specify the URL of the image. More information is available in the XUL tutorial. Note: Prior to Gecko 8.0, images did not shrink down with the same ratio in both directions when specifying maximum sizes using maxheight or maxwidth. The new behavior aligns more with the HTML <img> element and shrinks both the width and height down proportionally. Attributes onerror, onload, src, validate Properties accessibleType, src Style classes alert-icon, error-icon, message-icon, question-icon Examples <image src='Firefoxlogo.png' width='135' height='130'/> Attributes ...
label - Archive of obsolete content
Archive › Mozilla › XUL › label
argin. text-link Labels with this class may be focused and the click handler run or the address in the href attribute opened on a mouse click or Enter key press. Labels will appear like a link (blue and underlined). Related Elements description Attributes label Interfaces nsIAccessibleProvider, nsIDOMXULLabelElement Notes Labels are not focusable Note: Starting in Gecko 2.0, labels are properly not focusable. They used to incorrectly inherit from nsIDOMXULControlElement. The caption is in the "value" attribute Remember that the label element has a "value" attribute, unlike value in HTML whereas buttons, checkboxes use label="foo" as the attribute <label label="A Caption"/> <!-- wrong --> <label value="A Caption"/> <label value="Click the button"/> <button labe...
menupopup - Archive of obsolete content
something to open the popup). openPopupAtScreen( x, y, isContextMenu ) Return type: no return value Open the popup at a specific screen position specified by x and y. This position may be adjusted if it would cause the popup to be off of the screen. The x and y coordinates are measured in CSS pixels. showPopup( element, x, y, popupType, anchor, align ) Deprecated since Gecko 1.9 Return type: no return value Deprecated in favor of openPopup and openPopupAtScreen Opens a popup element. There are two ways of specifying where the popup appears, either at a specific screen position, or relative to some element in the window. If either x or y are set to values, the popup will appear at the screen coordinate (x,y). If x and y are -1, the popup will be positioned relative...
notificationbox - Archive of obsolete content
ibuteNodeNS(), setAttributeNS(), setUserData appendNotification( label , value , image , priority , buttons, eventCallback ) Return type: element Create a new notification and display it. If another notification is already present with a higher priority, the new notification will be added behind it. label - label to appear on the notification. This should be either a string, or, from Gecko 37 onwards, you can pass a DocumentFragment with rich content as well. Keep in mind that this is all XUL so using HTML elements for styling might still need additional CSS in order to work as you might expect. value - value used to identify the notification image - URL of image to appear on the notification. If "" then an icon appropriate for the priority level is used. priority - notification...
preference - Archive of obsolete content
om the defaultValue property. valueFromPreferences Gets and sets the value stored in the user preference, specified in name. (This always accesses the nsIPrefBranch APIs regardless of the instantApply mode in effect). Methods reset() Return type: no return value Resets the preference to its default value. For a textbox it also clears the undo transaction list (Gecko 1.9). type getElementValue(in DOMElement element); Retrieves the value that should be written to preferences based on the current state of the supplied element. This function calls onsynctopreference. boolean isElementEditable(in DOMElement element) Returns true, if the given element is "editable" (see below). void setElementValue(in DOMElement element); Initializes the supplied element ...
resizer - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] An element used for window resizing. If you place a custom resizing button inside the resizer, the user will be able to resize the window by dragging it. The resizer will send a command event after the resize is complete. Note: Starting in Gecko 2.0, you can also specify a target element using the element attribute, to use the resizer to resize the specified element instead of the window. Attributes dir, element, type Examples Resizing a window <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul" hidechrome="true" windowtype="main" orient="vertical" sizemode="normal" width="400" height="300" persist="screenX screenY width height"> <hbox flex="1"> <vbox width=...
scrollbox - Archive of obsolete content
that this example doesn't use a scrollbox tag; you only need that tag if you want to programmatically scroll in addition to the automatic scroll bars. Note: avoid nested scroll boxes; it's maddening for the experienced user and confusing for the less experienced user. Instead, figure out some other way to lay things out. Scrolling a child element into view See element.scrollIntoView. Prior to Gecko 19, scrollIntoView() didn't exist in XUL. Do this instead: var xpcomInterface =scrollbox_element.boxObject.QueryInterface( Components.interfaces.nsIScrollBoxObject); xpcomInterface.ensureElementIsVisible(child_element_to_make_visible); See the nsIScrollBoxObject API for other scroll-related methods. Attributes Inherited from XUL element align, allowevents, allownegativea...
splitter - Archive of obsolete content
content either before or after the splitter is collapsed and is not visible. dragging The user is current adjusting the position of the splitter, typically by dragging it with the mouse. substate Type: one of the values below On splitters which have state="collapsed" and collapse="both", determines which direction the splitter is actually collapsed in. Since collapse="both" is a Gecko 1.9+ feature, this will have no effect on earlier versions. before The element immediately before the splitter is collapsed. after The element immediately after the splitter is collapsed. Properties Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hi...
stringbundle - Archive of obsolete content
This is an object which implements nsILocale. src Type: URL Gets and sets the value of the src attribute. stringBundle Type: nsIStringBundle Returns the XPCOM string bundle object which implements nsIStringBundle. strings Type: nsISimpleEnumerator An enumeration of a...
tab - Archive of obsolete content
Archive › Mozilla › XUL › tab
Also, "unhiding" a tab leads to unpredictable ordering of the tabs. See bug 307088 and bug 261826. Use collapsed instead of hidden. Related Elements tabbox, tabs, tabpanels, tabpanel. Interfaces nsIAccessibleProvider, nsIDOMXULSelectControlItemElement ...
tabs - Archive of obsolete content
Archive › Mozilla › XUL › tabs
This feature is used by the tabbrowser to provide the facilities for adding and closing tabs. You can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively. disableclose Ty...
toolbox - Archive of obsolete content
ars. It is a type of box but defaults to vertical orientation. If a toolbar is placed inside a toolbox, a grippy is displayed on its left or upper edge. The user may click the grippy to collapse the toolbar. If multiple toolbars are placed in the same toolbox, they will all collapse into the same row. The Firefox browser does not have grippies so toolbars cannot be collapsed and expanded. Note: Gecko 2.0 adds support for external toolbars. These are toolbars that are not children of a toolbox. You can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. The external toolbars associated with a toolbox are listed in the array of elements provided by the toolbox's externalToolbars property. More information is ...
tooltip - Archive of obsolete content
ed something to open the popup). openPopupAtScreen( x, y, isContextMenu ) Return type: no return value Open the popup at a specific screen position specified by x and y. This position may be adjusted if it would cause the popup to be off of the screen. The x and y coordinates are measured in CSS pixels. showPopup( element, x, y, popupType, anchor, align ) Deprecated since Gecko 1.9 Return type: no return value Deprecated in favor of openPopup and openPopupAtScreen Opens a popup element. There are two ways of specifying where the popup appears, either at a specific screen position, or relative to some element in the window. If either x or y are set to values, the popup will appear at the screen coordinate (x,y). If x and y are -1, the popup will be positioned relative...
treechildren - Archive of obsolete content
erence home [ Examples | Attributes | Properties | Methods | Related ] This element is the body of the tree. For content trees, the content will be placed inside this element. This element is also used to define container rows in the tree. More information is available in the XUL tutorial. Attributes alternatingbackground Attributes alternatingbackground Obsolete since Gecko 2.0 Type: boolean If true, the background of the tree's rows will alternate between two colors. You can use the :-moz-tree-row CSS style to do this instead. Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden...
treecol - Archive of obsolete content
f the columns are checkboxes. progressmeter The content of the columns are a progress meters. This is used in Mozilla's download manager window. text The content of the columns is text. width Type: string (representing an integer) The preferred width of the tree column. The value should not include a unit as all values are in pixels. Specifying widths for your columns causes Gecko to allow the tree to be scrolled horizontally if it is wider than the available space. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, heigh...
window - Archive of obsolete content
indowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window. Without including the css file at "chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when a window is activated or deactivated by watching for the "activate" and "deactivate" events. See Window activation events. More information is available in the XUL tutorial. Attributes accelerated, chromemargin, disablechrome, disablefastfind, drawintitlebar, fullscreenbutton, height, hidechrome, id, lightweightthemes, lightweightthemesfooter, screenX, screenY, si...
XUL - Archive of obsolete content
a powerful mechanism for extending and customizing existing XUL applications. XUL Periodic Table This collection of XUL demos used to be available as a web page, but can no longer be viewed in Firefox since support for Remote XUL was disabled. There is a XULRunner application containing the XUL Periodic Table which can be opened with Gecko based browsers. You can get it here. See: Using Firefox 3 to run XULRunner applications for instructions on running XULRunner apps in Firefox. View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed ...
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
XULRunner 1.8.0.4 is a stable developer preview of the Mozilla XULRunner application framework. It replaces version 1.8.0.1; all users should upgrade. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. As of December 2008,XULRunner 1.9.0.4 is available in the "Gecko 1.9.0" branch upon which Firefox 3 is based. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Li...
XULRunner 2.0 Release Notes - Archive of obsolete content
atures for installing and deploying XULRunner and applications based on XULRunner will be available in future releases. I'm writing a XUL application, how can I deploy that application to my users? Right now Mozilla recommends that XULRunner should be deployed privately with each application. See Deploying XULRunner for more information. Where is the source code? Here. Where is the SDK? Here. See Gecko SDK for information about the SDK. I think I've found a bug, how do I report it? bugzilla.mozilla.org is used to track bugs in all Mozilla products. Please search to make sure that your bug has not already been reported. How can I help? If you want to help with XULRunner but don't know where to start, visit the XULRunner:Community page and ask questions on the newsgroups or the IRC channel. ...
Application Update - Archive of obsolete content
local source of XulRunner) common.sh make_full_update.sh You will need mar / mar.exe to build a complete update patch. You will need to compile a unix/linux executable mar from mozilla/modules/libmar. As far as I can tell enabling the options --enable-updater and --enable-update-packaging on your configure will build you mar. Compiled versions of mar are available in the Gecko SDK under the folder /host/bin for your OS. In order to generate SHA1 hashes I installed shash. Application Settings You will need to configure the following settings in your application: Branding The update process uses branding information, setup branding for your application as described here: XulRunner Tips Icons The updater process for Linux systems requires updater.png to be in...
Building XULRunner - Archive of obsolete content
_3_RELEASE To find out how those Firefox tags and XULRunner version maps, check out the file mozilla/config/milestone.txt . You can also check the User Agent string in Firefox Help/About menu to get the mapping from a certain binary Firefox version to the corresponding XULRunner version. For instance, in Firefox 2.0.0.9 you will get : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9 Therefore the XULRunner version for this Firefox version is : 1.8.1.9 Fetching Sources from Mercurial As with all other Mozilla products, one would fetch recent sources from Mercurial. For example, to build XULRunner with the top of the tree: hg clone http://hg.mozilla.org/mozilla-central/ src cd src echo ". \$topsrcdir/xulrunner/config/mozconfig" > .mozconfig make -...
CommandLine - Archive of obsolete content
fy observers that the updated arguments are available. A similar and better way to implement this solution is by defining argument specific handlers with registering and unregistering functions in your command line handler service. This has the advantage to accumulate unhandled arguments until a specific handler is added. This approach has been used in Songbird. Example Notice the changes since Gecko 2.0 (Component registration has moved into the manifest file). Define your own Command Line Handler Component: components/clh.js const nsISupports = Components.interfaces.nsISupports; const nsICategoryManager = Components.interfaces.nsICategoryManager; const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar; const nsICommandLine = Components.in...
Deploying XULRunner - Archive of obsolete content
on ... additional application files such as icons, etc MacOS/ xulrunner (This is the "stub executable"... you should copy this file from /Library/Frameworks/XUL.framework/Versions/1.8/xulrunner.) libmozglue.dylib (the main XUL library) ... other executables and libraries The core changes to XUL and Gecko that require this new file layout were implemented in Gecko 34, except that the XULRunner application was not updated to know about the change, so it will report an error: "Unable to load XPCOM." XULRunner was fixed in Gecko 39. See this blog post for additional background about this change. XULRunner 38 and earlier In XULRunner 38 and earlier, XULRunner is provided in a Mac OS X Framework bun...
Getting started with XULRunner - Archive of obsolete content
is what this tutorial will do. Step 4: Set up application.ini The application.ini file acts as the XULRunner entry point for your application. It specifies how your application intends to use the XULRunner platform as well as configure some information that XULRunner uses to run your application. Here is mine: [App] Vendor=XULTest Name=myapp Version=1.0 BuildID=20100901 ID=xulapp@xultest.org [Gecko] MinVersion=1.8 MaxVersion=200.* Note: The MinVersion and MaxVersion fields indicate the range of Gecko versions your application is compatible with; make sure that you set them so that the version of XULRunner you're using is in that range, or your application won't work. Note: Make sure your application name is lowercase and longer than 3 characters Step 5: Set up the chrome manifest The c...
XULRunner tips - Archive of obsolete content
pref("general.skins.selectedSkin", "classic/1.0"); // NB these point at AMO pref("extensions.update.url", "chrome://mozapps/locale/extensions/extensions.properties"); pref("extensions.getMoreExtensionsURL", "chrome://mozapps/locale/extensions/extensions.properties"); pref("extensions.getMoreThemesURL", "chrome://mozapps/locale/extensions/extensions.properties"); If your application is based on Gecko 2.0, you need to register a component through the new component registration because the extension manager uses FUEL, namely Application.restart(), to restart your xulrunner-based application after any change (installation, removal, enabling, disabling) in the extensions' list: copy files fuelApplication.js and fuelApplication.manifest from browser/fuel/src for instance into your components/ d...
Using SOAP in XULRunner 1.9 - Archive of obsolete content
After some experimentation, the following seems to be the best way to speak SOAP in XULRunner. Several alternatives were considered: soapclient 2.4 - This library contains a few JavaScript mistakes but nevertheless seems (fairly) widely used, mature and tested. It requires servers to support WSDL which took it out of the running. XULRunner 1.8.* - Using an old XULRunner is certainly an option but brings up a host of speed, stability and memory issues. Manual implementation - The author doesn't know enough about SOAP to implement a robust client in an afternoon. The best solution proved to be jqSOAPClient. ...
XUL Application Packaging - Archive of obsolete content
-1234-1234-123456789abc}. The email format is recommended for newly developed applications. Example: ID=TestApplication@example.tld Vendor Specifies the application vendor OPTIONAL Example: Vendor=Grinch Productions Profile Specifies the path to use for the application's profile, based within the user's application data directory OPTIONAL Example: Profile=MyAppData The [Gecko] section The Gecko section specifies what version of XULRunner is required by the application. MinVersion Specifies the minimum XULRunner version needed by this application. If there are binary components, MinVersion must equal the version of the libxul SDK which is used to build the application. REQUIRED Example: MinVersion=1.8 MaxVersion Specify the maximum XULRunner versio...
xulauncher - Archive of obsolete content
REFS="$WD/$XULNAME/defaults/preferences/prefs.js" # make minimal directory structure ############################################################################## mkdir -p $XULDIR mkdir -p $XULPREFDIR # create application.ini file ############################################################################## echo " [App] Vendor=xulauncher.sh Name=$XULNAME Version=0.0.1 BuildID=`date +%Y%m%d` [Gecko] MinVersion=1.8 MaxVersion=1.9 ">$XULAPPINI # create chrome.manifest file ############################################################################## echo " content $XULNAME file:$XULNAME/ ">$XULMANIFEST # create prefs.js file ############################################################################## echo " pref(\"toolkit.defaultChromeURI\", \"chrome://$XULNAME/content/$XULFILE\"); /* de...
calICalendarView - Archive of obsolete content
. This allows lack of required predictability allows calICalendarView implementations to be re-used in a variety of sitatuations. It also fueled the development, however, of the more predictable, but less flexible calIDecoratedView, which usually contains an embedded calICalendarView. calendar/base/public/calICalendarView.idlScriptable Please add a summary to this article. ...
calICalendarViewController - Archive of obsolete content
ndarViewController provides a way for a calICalendarView to create, modify, and delete items. Implementing a calICalendarViewController allows for these actions to be performed in a manner consistent with the rest of the application in which the calICalendarView is included. calendar/base/public/calICalendarViewController.idlScriptable Please add a summary to this article. ...
xbDesignMode.js - Archive of obsolete content
g") && (document.getElementById(aIFrame).tagName.toLowerCase()=="iframe") ){ this.mIFrameElement = document.getElementById(aIFrame); } else if( (typeof(aIFrame)=="object") && (aIFrame.tagName.toLowerCase() == "iframe") ){ this.mIFrameElement = aIFrame; } else { throw "Argument isn't an id of an iframe or an iframe reference"; } if (this.mIFrameElement.contentDocument){ // Gecko this.mEditorDocument = this.mIFrameElement.contentDocument; this.mEditorDocument.designMode = "On"; } else { // IE this.mEditorDocument = this.mIFrameElement.contentWindow.document; this.mEditorDocument.designMode = "On"; // IE needs to reget the document element after designMode was set this.mEditorDocument = this.mIFrameElement.contentWindow.document; } } xbDes...
Mozilla release FAQ - Archive of obsolete content
FTP See the Mozilla FTP Mirror section for FTP sites Under which license terms was Mozilla released? Mozilla is released under the NPL/MPL (Netscape/Mozilla Public Licenses) which are in some ways similar to the GNU GPL, and in some ways similar to a BSD-style license. Take a look at mozilla.org's NPL area for details. What are all of the codenames given to various Netscape/Mozilla projects? Gecko (formerly Raptor) is the new HTML rendering engine in Mozilla. It features speed improvements, a more modular nature, and significantly less platform-dependant code. It is more suitable for being embedded in other applications than the previous rendering engine. Gemini was a previous rendering engine project, renamed NGLayout Aurora is the Navigation Center in Mozilla and Navigator5 SeaMon...
Format - Archive of obsolete content
Criteria are included in the linked post. Firefox 1.5.0.5 planned release - 2006/07/26 Discussions Firefox survey feedback requested Rachel Werner (Mozilla Corp marketing intern) requested feedback on a proposed user survey. The survey questions and feedback are included in the thread. ...
2006-10-26 - Archive of obsolete content
nd - perhaps a version error instead? There should be a 'changes' FAQ A user suggests that a FAQ page be made for changes, since the same two questions keep coming up. nsIAlertsService under Linux An inqury about why nsIAlertsService is not a service found in firefox 2. Is this a bug in Firefox? An inqury about inaccurate layout for firefox being a bug - shaver suggests its a bug with Gecko instead. error building firefox-2.0rc3 on uclinux An error was found about building on uclinux, user googgled the error and suggests that the error found in older versions. No replies yet. Ubuntu Firefox UA string A user questions Ubuntu 6.10 and their Firefox's UA string, the zeros seem to be wrong. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) ...
2006-10-27 - Archive of obsolete content
nd - perhaps a version error instead? There should be a 'changes' FAQ A user suggests that a FAQ page be made for changes, since the same two questions keep coming up. nsIAlertsService under Linux An inqury about why nsIAlertsService is not a service found in firefox 2. Is this a bug in Firefox? An inqury about inaccurate layout for firefox being a bug - shaver suggests its a bug with Gecko instead. error building firefox-2.0rc3 on uclinux An error was found about building on uclinux, user googgled the error and suggests that the error found in older versions. No replies yet. Ubuntu Firefox UA string A user questions Ubuntu 6.10 and their Firefox's UA string, the zeros seem to be wrong. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) ...
Extentsions FAQ - Archive of obsolete content
_preferences BTW: Resetting prefences to default will clear them in case no default prefence is (still) available. Those will be completely removed upon next application launch. Is it possible to create a sidebar on the top of the page? Not unless you make it a separate window. There's a bug in bugzilla about stacking other widgets on top of browser/iframe, which hopefully will be fixed for Gecko 1.9. Could someone write an extension that zaps the Google Analytics cookie, the Urchin cookie, switches Gmail and Google Calender to HTTPS? CustomizeGoogle extension already has support for switching Gmail to HTTPS (and calendar possibly, too). Does anyone know how write a bounce email extension? Are you aware of the "mailredirect" extension? It allows bouncing to arbitrary addresses. It...
2006-07-17 - Archive of obsolete content
Criteria are included in the linked post. Firefox 1.5.0.5 planned release - 2006/07/26 Discussions Firefox survey feedback requested Rachel Werner (Mozilla Corp marketing intern) requested feedback on a proposed user survey. The survey questions and feedback are included in the thread. Deadline for feedback has passed. Dropping bugs from blocking1.8.1+ David Baron suggested a list of bugs that could be dropped from the blocking list. View bugzilla list. ...
2006-10-06 - Archive of obsolete content
of talkbacks received ( bug 354835 is suspected). pal-moz offers a solution to bug 354835. dbaron then follows up that bug 354835 is solved so there is no need to close the tree waiting for it. Thunderbird 2 - Beta/RC? Johannes Koch asks where is the thunderbird roadmap? Ziga Sancin replies with a link and regrets about it being a bit out of date. Firefox 1.5.0.8 Andrew Schultz asks about the Gecko 1.8.0.8 schedule. dbaron and Chris Ilias respond with relative dates but still no schedule. RC2 Status Schrep asks for any final things standing in the way of RC2. RC2 starts spinning and en-US builds are annoucned. Beltzner says that (as per Bon Echo Status Meeting) that RC2 is going to be re-spun to fix some final bugs that were regressed and patches that were just landed. Reminder - FF2 RC2...
2006-10-13 - Archive of obsolete content
11 Discussions Release process discussion Discussion from last week regarding speeding up and automation of the release process continued. Firefox feature brainstorming You can help suggest features for Firefox 3 here Meetings Project Meeting A project meeting was held on Oct. 9. (meeting notes) Bon Echo Status Meeting A Bon Echo status meeting was held on Oct. 10 (meeting notes) Gecko 1.9/Gran Paradiso Status Meeting A Gecko 1.9/Gran Paradiso status meeting was held on Oct. 11 (notes) ...
2006-10-20 - Archive of obsolete content
et rid of Sparky (a linux build box) and wants to know if there are reasons wy not to do it. Feature Brainstorming + Firefox 3 Dria posted a link to the Firefox Feature Brainstorming List (open to everyone). Discussion of what is the best format for the list and how to use it best. Meetings Bon Echo Status Meeting Bon Echo Status Meeting: October 17th, 2006 **at noon PDT**. Meeting Notes Gecko Status Meeting October 19 (*THURSDAY*) Gecko 1.9 status meeting. Agenda Project Status Meeting Project Meeting was held on Oct 16 2006. Meeting Notes ...
2006-10-27 - Archive of obsolete content
Announcements Firefox 2.0 available Firefox 2.0 is now available for download. Visit http://www.getfirefox.com/ Discussions Firefox 3 Feature Prioritizing Rudi Gens pointed out that hundreds of edits have been done to the Firefox 3 feature brainstorming page. He suggests that some prioritizing be done. Meetings Gecko 1.9/Gran Paradiso Status Meeting Gecko 1.9/Gran Paradiso Status Meeting: October 25th, 2006 - 11am PDT. Meeting Notes Gecko 1.9 Bug Triage Meeting Gecko 1.9 Bug Triage Meeting - 3pm PDT Final Bon Echo Status Meeting The final Bon Echo status meeting happened on October 24th, 2006. Meeting Notes ...
2006-11-03 - Archive of obsolete content
vements Simon Paquet points out how much easier it is to install an extension in firefox than it in any other product. A discussion of how to get firefox to be able to install extensions for other products (e.g. Thunderbird, sunbird). button in the upper right hand corner the removal of the firefox home page button was purposeful, you can add that function by installing this. Meetings Nov 1 Gecko 1.9/Gran Paradiso status meeting: get agenda here. Bon Echo Status Meeting: October 31st, 2006: (possibly final meeting) get notes here Weekly Project Status Meeting Monday Oct 30 1PM *PST*: get notes here ...
2006-11-10 - Archive of obsolete content
s due on November 10. ...
2006-11-24 - Archive of obsolete content
S commit access changes A large discussion went on about changes to policies surrounding CVS commit access Project drivers and technical oversight Mike Connor suggested ways to better organize project management, policy making, and technical oversight. Others gave input on this as well Meetings Because of the Firefox Summit last week there is no project status meeting this week November 22 Gecko 1.9/Gran Paradiso status meeting: (agenda) ...
2006-12-01 - Archive of obsolete content
Authors Mark D'Souza (mdsouza) Mohamed Attar (mojo) ...
2006-10-27 - Archive of obsolete content
yout - October 21 - October 27, 2006 Announcements None this week. Discussions Removal of the NN4.6 table border color quirk Discussion on removing the NN 4.6 table boarder color quirk, which currently causes a specific markup to produce a green boarder instead of a gray one. Help for getting HTML element width info Discussion on retrieving width information on HTML elements when using the Gecko engine. It was determined that the offsetWidth property can be used to get this value. Multiple presshells Discussion on why current interfaces allow for multiple presshells and how the relationships work for the following objects: docshell, presshell, prescontext, document, domwindow, widget, docshell and contentviewer. Boris Zbarsky explains in detail the relationships between these objects. T...
2006-11-17 - Archive of obsolete content
not loading with seamonkey A user built seamonkey in debug mode and is currently receiving a "BAD REQUEST" error on some websites. Reflow branch testing wanted L. David Baron would like users to test the reflow branch as it is coming close to being merged with the trunk. Nightly builds, instructions and the current list of known regressions on the branch can be found at: http://wiki.mozilla.org/Gecko:Reflow...ng#Quick_Links. Users are asked to file bugs on encountered problems that are not present on the current trunk builds. If bugs are filed, "[reflow branch]" should be placed at the beginning of the summary. Parsing HTML into a document object in Fx3 Discussion if Gecko 1.9 will support parsing HTML into a document object. The possibility of turning the MicrosummaryResource object into a ...
NPAPI plugin developer guide - Archive of obsolete content
se use cases possible. Plugins are written using NPAPI, the cross-browser API for plugins. The main source of documentation for NPAPI is the NPAPI plugin API reference. To make your plugin scriptable from web pages, use npruntime. ...
NPAnyCallbackStruct - Archive of obsolete content
Contains information required during embedded mode printing. Syntax typedef struct { int32 type; } NPAnyCallbackStruct; Fields The data structure has the following field: type Always contains NP_PRINT. Description Callback structures are used to pass platform-specific information. The NPAnyCallbackStruct structure contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode printing. During printing in embedded mode, the platformPrint field of the NPEmbedPrint structure points to an NPAnyCallbackStruct. This structure contains the file pointer to which the plug-in should write its PostScript data. ...
NPByteRange - Archive of obsolete content
Syntax typedef struct _NPByteRange { int32 offset; /* negative offset = from the end */ uint32 length; struct _NPByteRange* next; } NPByteRange; Fields The data structure has the following fields: offset Offset in bytes to the start of the requested range. This value may be either positive or negative: Positive value: Offset from the beginning of the stream. Negative value: Offset from the end of the stream. length Number of bytes to fetch from the specified offset. next Points to the next NPByteRange request in the list of requests, or null if this is the last request. ...
NPClass - Archive of obsolete content
an NPObject). Syntax struct NPClass { uint32_t structVersion; NPAllocateFunctionPtr allocate; NPDeallocateFunctionPtr deallocate; NPInvalidateFunctionPtr invalidate; NPHasMethodFunctionPtr hasMethod; NPInvokeFunctionPtr invoke; NPInvokeDefaultFunctionPtr invokeDefault; NPHasPropertyFunctionPtr hasProperty; NPGetPropertyFunctionPtr getProperty; NPSetPropertyFunctionPtr setProperty; NPRemovePropertyFunctionPtr removeProperty; NPEnumerationFunctionPtr enumerate; NPConstructFunctionPtr construct; }; Warning: Don't call these routines directly. ...
NPEmbedPrint - Archive of obsolete content
Syntax typedef struct _NPEmbedPrint { NPWindow window; void* platformPrint; /* Platform-specific */ } NPEmbedPrint; Fields The data structure has the following fields: window The NPWindow the plug-in should use for printing. platformPrint Additional platform-specific printing information. Mac OS: THPrint Unix: Pointer to a NPPrintCallbackStruct. Description The NPP_Print function passes a pointer to an NPPrint object (previously allocated by the browser) to the plug-in. The NPEmbedPrint structure is used when the mode field of NPPrint is set to NP_EMBED. ...
NPEvent - Archive of obsolete content
<< Gecko Plugin API Reference << Plug-in Side Plug-in API Summary Represents an event passed by NPP_HandleEvent() to a windowless plug-in. Syntax Microsoft Windows typedef struct _NPEvent { uint16 event; uint32 wParam; uint32 lParam; } NPEvent; Mac OS typedef EventRecord NPEvent; TYPE EventRecord = RECORD { what: Integer; message: LongInt; when: LongInt; where: Point; modifiers: Integer; END; XWindows typedef XEvent NPEvent; Fields NPEvent on Microsoft Windows The data structure has the following fields: event One of the following event types: WM_PAINT WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDBLCLK WM_RBUTTONDOWN WM_RBUTTONUP WM_RBUTTONDBLCLK WM_MBUTTONDOWN WM_MBUTTONUP WM_MBUTTONDBLCLK WM_MOUSEMOVE ...
NPFullPrint - Archive of obsolete content
Syntax typedef struct _NPFullPrint { NPBool pluginPrinted; /* true: print fullscreen */ NPBool printOne; /* true: print one copy */ /* to default printer */ void* platformPrint; /* Platform-specific */ } NPFullPrint; Fields The data structure has the following fields: pluginPrinted Determines whether the plug-in prints in full-page mode. Values: true: Plug-in takes complete control of the printing process and prints full-page. false: (Default) Plug-in renders its area of the page only (for embedded plug-in). printOne Not currently in use. ...
NPIdentifier - Archive of obsolete content
NPIdentifiers are unique, in that for any given string or integer, there is only one NPIdentifier. The lifetime of NPIdentifiers is controlled by the browser. ...
NPNVariable - Archive of obsolete content
<< Gecko Plugin API Reference << Browser Side Plug-in API See NPN_GetValue. Note: NPNVariable != NPPVariable ...
NPN_CreateObject - Archive of obsolete content
Syntax #include <npruntime.h> NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); Parameters The function has the following parameters: <tt>npp</tt> The NPP indicating which plugin wants to instantiate the object. <tt>aClass</tt> The class to instantiate an object of. Returns The newly-allocated NPObject. Description If the given NPClass provides an allocate function it is used to allocate the storage for the object and the NPP argument passed to NPN_CreateObject() is passed along to that function. If no allocate function is provided, malloc() is called to allocate enough memory to hold an NPObject. ...
NPN_DestroyStream - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason); Parameters The function has the following parameters: instance Pointer to current plug-in instance. stream Pointer to current stream, initiated by either the browser or the plug-in. reason Reason the stream was stopped so the application can give the user appropriate feedback. Values: NPRES_DONE (most common): Stream completed normally; all data was sent by the plug-in to the browser. NPRES_USER_BREAK: Plug-in is terminating the stream due to a user request. ...
NPN_Enumerate - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifiers, uint32_t *identifierCount); Parameters The function has the following parameters: npp The NPP indicating which plugin instance is making the request. npobj The object of which the properties and methods are to be retrieved. identifiers A pointer to receive a pointer to the start of an array of string identifiers of the names of the properties and methods of npobj. identifierCount A pointer to receive the number of identifiers in identifiers. ...
NPN_Evaluate - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result); Parameters The function has the following parameters: npp The NPP indicating which plugin instance's window to evaluate the script in. npobj The scope object. script The script to evaluate. result On return, contains the value returned by the script. Can't be NULL. Returns true if the script was evaluated successfully, otherwise false. ...
NPN_ForceRedraw - Archive of obsolete content
Note: As of Firefox 4, this function no longer has any effect when running with separate plugin processes. Syntax #include <npapi.h> void NPN_ForceRedraw(NPP instance); Parameters The function has the following parameters: instance Plug-in instance for which the function forces redrawing. Description Once a region of a windowless plugin has been invalidated with NPN_InvalidateRect() or NPN_InvalidateRegion(), a plug-in can call NPN_ForceRedraw() to force a paint message. This causes a synchronous update event or paint message for the plug-in. Browsers may ignore this request. ...
NPN_GetAuthenticationInfo - Archive of obsolete content
<< Gecko Plugin API Reference << Browser Side Plug-in API Summary The function is called by plugins to get HTTP authentication information from the browser. Syntax #include <npapi.h> NPError NPN_GetAuthenticationInfo(NPP instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); Parameters This function has the following parameters: instance Pointer to the current plug-in instance...
NPN_GetIntIdentifier - Archive of obsolete content
Syntax #include <npruntime.h> NPIdentifier NPN_GetIntIdentifier(int32_t intid); Parameters The function has the following parameter: <tt>intid</tt> The integer for which an opaque identifier should be returned. Returns An NPIdentifier identifying the integer. Description All calls for the same integer are guaranteed to return the same exact identifier. ...
NPN_GetProperty - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result); Parameters The function has the following parameters: <tt>npp</tt> The NPP indicating which plugin instance's is making the request. <tt>npobj</tt> The object from which a value is to be retrieved. <tt>propertyName</tt> A string identifier indicating the name of the property whose value is to be retrieved. <tt>result</tt> On return, contains the value of the specified property. Returns true if the value was retrieved successfully, otherwise false. ...
NPN_GetStringIdentifier - Archive of obsolete content
Syntax #include <npruntime.h> NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); Parameters The function has the following parameters: <tt>name</tt> The string for which an opaque identifier should be returned. Returns An NPIdentifier identifying the string. Description All calls for the same string are guaranteed to return the same exact identifier. ...
NPN_GetStringIdentifiers - Archive of obsolete content
Syntax #include <npruntime.h> void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers); Parameters The function has the following parameters: names An array of strings for which opaque identifiers should be returned. nameCount The number of strings in the names array. identifiers A pointer to the first element of an array to fill with the identifiers for the strings specified by names. Returns On return, the identifiers array is filled out with the identifiers for each of the strings in the names array. ...
NPN_GetURL - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_GetURL(NPP instance, const char* url, const char* target); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. url Pointer to the URL of the request. Can be of any type, such as HTTP, FTP, news, or mailto. target Name of the target window or frame, or one of the following special target names. Values: _blank or _new: Load the link in a new blank unnamed window. Safest target, even though, when used with a mailto or news URL, this creates an extra blank the browser instance. ...
NPN_GetValueForURL - Archive of obsolete content
Syntax #include <npapi.h> typedef enum { NPNURLVCookie = 501, NPNURLVProxy } NPNURLVariable; NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char *url, char **value, uint32_t *len); Parameters This function has the following parameters: instance Pointer to the current plug-in instance. variable Selects the type of information to be retrieved (NPNURLVCookie or NPNURLVProxy) url The URL for which to fetch information. value Out parameter. ...
NPN_HasMethod - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); Parameters The function has the following parameters: npp The NPP indicating which plugin instance is making the request. npobj The object on which to look for the method. methodName A string identifier indicating the name of the method to look for. Returns true if the method exists on the specified object, otherwise false. ...
NPN_HasProperty - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); Parameters The function has the following parameters: <tt>npp</tt> The NPP indicating which plugin instance is making the request. <tt>npobj</tt> The object on which to look for the property. <tt>propertyName</tt> A string identifier indicating the name of the property to look for. Returns true if the property exists on the specified object, otherwise false. ...
NPN_IdentifierIsString - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_IdentifierIsString(NPIdentifier identifier); Parameters The function has the following parameter: <tt>identifier</tt> The identifier whose type is to be examined. Returns true if the identifier is a string identifier, or false otherwise. ...
NPN_IntFromIdentifier - Archive of obsolete content
Syntax #include <npruntime.h> int32_t NPN_IntFromIdentifier(NPIdentifier identifier); Parameters The function has the following parameter: <tt>identifier</tt> The integer identifier whose corresponding integer value should be returned. Returns An integer corresponding to the specified <tt>identifier</tt>. Note: The behavior of this function is undefined if <tt>identifier</tt> isn't an integer identifier. ...
NPN_InvalidateRect - Archive of obsolete content
Syntax #include <npapi.h> void NPN_InvalidateRect(NPP instance, NPRect *invalidRect); Parameters The function has the following parameters: instance Pointer to the plug-in instance to invalidate a portion of. invalidRect The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in's content area. Description Before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either NPN_InvalidateRect() or NPN_InvalidateRegion(). ...
NPN_InvalidateRegion - Archive of obsolete content
Syntax #include <npapi.h> void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. invalidRegion The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in. Description Before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either NPN_InvalidateRect() or NPN_InvalidateRegion(). ...
NPN_Invoke - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); Parameters The function has the following parameters: npp The NPP indicating which plugin wants to call the method on the object. npobj The object on which to invoke a method. methodName A string identifier indicating the name of the method to invoke. args An array of arguments to pass to the method. argCount The number of arguments in the args array. result A pointer to an NPVariant to receive the result returned by the method. Returns true if the method was successfully invoked, otherwise false. ...
NPN_InvokeDefault - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); Parameters The function has the following parameters: npp The NPP indicating which plugin wants to call the default method on the object. npobj The object on which to invoke the default method. args An array of arguments to pass to the default method. argCount The number of arguments in the args array. result A pointer to an NPVariant to receive the result returned by the default method. ...
NPN_MemAlloc - Archive of obsolete content
Syntax #include <npapi.h> void *NPN_MemAlloc (uint32 size); Parameters The function has the following parameters: size Size of memory, in bytes, to allocate in the browser's memory space. Returns If successful, the function returns a pointer to the allocated memory, in bytes. If insufficient memory is available, the plug-in returns null. Description The plug-in calls NPN_MemAlloc to allocate a specified amount of memory in the browser's memory space. If you allocate saved instance data with NPP_Destroy, be sure to use NPN_MemAlloc to allocate memory. ...
NPN_MemFlush - Archive of obsolete content
Requests that the browser free a specified amount of memory. Syntax #include <npapi.h> uint32 NPN_MemFlush(uint32 size); Parameters The function has the following parameters: size Size of memory, in bytes, to free in the browser's memory space. Returns If successful, the function returns the amount of freed memory, in bytes. If no memory can be freed, the browser returns 0. Description The plug-in calls NPN_MemFlush() when it is not possible to call NPN_MemAlloc(), for example, when calling system APIs that indirectly allocate memory. ...
NPN_MemFree - Archive of obsolete content
Syntax #include <npapi.h> void NPN_MemFree (void* ptr); Parameters The function has the following parameters: ptr Block of memory previously allocated using NPN_MemAlloc. Description NPN_MemFree deallocates a block of memory that was allocated using NPN_MemAlloc only. NPN_MemFree does not free memory allocated by any other means. ...
NPN_PluginThreadAsyncCall - Archive of obsolete content
Syntax #include <npapi.h> void NPN_PluginThreadAsyncCall(NPP plugin, void (*func)(void *), void *userData); Parameters The function has the following parameters: plugin Pointer to the current plug-in instance. func Pointer to the function to call on the correct thread. userData Pointer to the data to pass to the function func once called. Returns Nothing. ...
NPN_PostURL - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_PostURL(NPP instance, const char *url, const char *target, uint32 len, const char *buf, NPBool file); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. url URL of the request, specified by the plug-in. target Display target, specified by the plug-in. If null, pass the new stream back to the current plug-in instance regardless of MIME type. For values, see NPN_GetURL. len Length of the buffer buf. buf Path to local temporary file or data buffer that contains the data to post. ...
NPN_PostURLNotify - Archive of obsolete content
Syntax #include <npapi.h> NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData); Parameters The function has the following parameters: instance Current plug-in instance, specified by the plug-in. url URL of the POST request, specified by the plug-in. target Target window, specified by the plug-in. For values, see NPN_GetURL. ...
NPN_ReleaseObject - Archive of obsolete content
If the reference count reaches 0, the NPObject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used. Syntax #include <npruntime.h> void NPN_ReleaseObject(NPObject *npobj); Parameters The function has the following parameter: <tt>npobj</tt> The NPObject whose reference count should be decremented. Returns Nothing. ...
NPN_ReleaseVariantValue - Archive of obsolete content
Syntax #include <npruntime.h> void NPN_ReleaseVariantValue(NPVariant *variant); Parameters The function has the following parameters: <tt>variant</tt> The variant whose value is to be released. Returns Nothing. Description NPN_ReleaseVariantValue() releases the value in the given variant. This must always be called on result variants and such in this API, i.e. any NPVariant whose value comes from a call that passes back an NPVariant must be released using this function. Access to the value in an NPVariant that has been released will result in undefined behavior. ...
NPN_RemoveProperty - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); Parameters The function has the following parameters: npp The NPP indicating which plugin instance is making the request. npobj The object on which a property is to be deleted. propertyName A string identifier indicating the name of the property to remove. Returns true if the property was removed successfully, otherwise false. ...
NPN_RequestRead - Archive of obsolete content
This initiates a read operation; the actual data is received through subsequent calls to NPP_WriteReady() and NPP_Write(). Syntax #include <npapi.h> NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); Parameters The function has the following parameters: stream Stream of type NP_SEEK from which to read bytes. rangeList Range of bytes in the form of a linked list of NPByteRange objects, each of which specifies a request for a range of bytes. Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the function returns an error code. For possible values, see Error Codes. ...
NPN_RetainObject - Archive of obsolete content
Syntax #include <npruntime.h> NPObject *NPN_RetainObject(NPObject *npobj); Parameters The function has the following parameter: npobj The NPObject to retain. Returns A pointer back to the same object. ...
NPN_SetException - Archive of obsolete content
Syntax #include <npruntime.h> void NPN_SetException(NPObject *npobj, const NPUTF8 *message); Parameters The function has the following parameters: <tt>npobj</tt> The object on which the exception occurred. <tt>message</tt> A UTF-8 string describing the error that occurred. Returns Nothing. ...
NPN_SetProperty - Archive of obsolete content
Syntax #include <npruntime.h> bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value); Parameters The function has the following parameters: <tt>npp</tt> The NPP indicating which plugin instance's is making the request. <tt>npobj</tt> The object on which a value is to be set. <tt>propertyName</tt> A string identifier indicating the name of the property whose value is to be set. <tt>value</tt> The value to store in the specified property. Returns true if the value was set successfully, otherwise false. ...
NPN_SetValue - Archive of obsolete content
This call is used to inform the browser of variable information controlled by the plugin. Syntax #include <npapi.h> NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value); Parameters The function has the following parameters: instance Pointer to the plugin instance setting the variable. ...
NPN_SetValueForURL - Archive of obsolete content
(While the API theoretically allows the preferred proxy for a given URL to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) Syntax #include <npapi.h> typedef enum { NPNURLVCookie = 501, NPNURLVProxy } NPNURLVariable; NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char *url, const char *value, uint32_t len); Parameters This function has the following parameters: instance Pointer to the current plug-in instance. ...
NPN_Status - Archive of obsolete content
Syntax #include <npapi.h> void NPN_Status(NPP instance, const char* message); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. message Pointer the buffer that contains the status message string to display. Description You can use this function to make your plug-in display status information in the browser window, in the same place the browser does. If your plug-in has a button or other object that acts as a link when clicked, you can call NPN_Status() to display a description or URL when the user moves the cursor over it. ...
NPN_UTF8FromIdentifier - Archive of obsolete content
Syntax #include <npruntime.h> NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); Parameters The function has the following parameter: <tt>identifier</tt> The string identifier whose corresponding string should be returned. Returns A UTF-8 string as a sequence of NPUTF8 bytes, or NULL if the specified <tt>identifier</tt> isn't a string identifier. Description Once the caller is done with the returned string, the caller is responsible for deallocating the memory used by the string by calling NPN_MemFree(). ...
NPN_Version - Archive of obsolete content
Syntax #include <npapi.h> void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); Parameters The function has the following parameters: plugin_major Pointer to a plug-in's major version number; changes with major code release number. plugin_minor Pointer to a plug-in's minor version number; changes with point release number. netscape_major Pointer to the browser's major version; changes with major code release number. ...
NPN_Write - Archive of obsolete content
Syntax #include <npapi.h> int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buf); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. stream Pointer to the stream into which to push the data. len Length in bytes of the data specified by buf. buf A pointer to a buffer of data to deliver to the stream. Returns If successful, the function returns a positive integer representing the number of bytes written (consumed by the browser). ...
NPObject - Archive of obsolete content
plugin specific, or browser specific) members. NPObject is the type used to express objects exposed by either the plugin or by the browser through this API. The browsers are expected to expose their window objects and everything reachable from it through this API. NPObjects are reference counted objects, so callers need to be careful to properly release acquired references to them. ...
NPPVariable - Archive of obsolete content
<< Gecko Plugin API Reference << Browser Side Plug-in API See NPN_SetValue. Note: NPPVariable != NPNVariable ...
NPP_Destroy - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_Destroy(NPP instance, NPSavedData **save); Parameters The function has the following parameters: instance Pointer to the plug-in instance to delete. **save State or other information to save for reuse by a new instance of this plug-in at the same URL. Passed to NPP_New. Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes. Description NPP_Destroy releases the instance data and resources associated with a plug-in. ...
NPP_DestroyStream - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); Parameters The function has the following parameters: instance Pointer to current plug-in instance. stream Pointer to current stream. reason Reason the stream was destroyed. Values: NPRES_DONE (Most common): Completed normally; all data was sent to the instance. NPRES_USER_BREAK: User canceled stream directly by clicking the Stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations. ...
NPP_GetValue - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_GetValue(void *instance, NPPVariable variable, void *value); Parameters The function has the following parameters: instance Pointer to the plugin instance from which the value should come. variable Variable for which the browser (caller) would like a value. The full list is in the NPAPI headers. value Value for the requested variable. Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the function returns an error code. For possible values, see Error Codes. Description NPP_GetValue retrieves instance variables. ...
NPP_HandleEvent - Archive of obsolete content
For Windowed Plug-ins: Currently used only on Mac OS. For Windowless Plug-ins: All platforms. Syntax #include <npapi.h> int16 NPP_HandleEvent(NPP instance, void* event); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. event Platform-specific value representing the event handled by the function. Values: MS Windows: Pointer to NPEvent structure Mac OS: Pointer to a standard Mac OS EventRecord Unix/X11: Pointer to a standard Xlib XEvent For a list of possible events, see NPEvent. Returns If the plug-in handles the event, the function should return true. ...
NPP_New - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved); Parameters The function has the following parameters: pluginType Pointer to the MIME type for new plug-in instance. instance Contains instance-specific private data for the plug-in and the browser. This data is stored in instance->pdata. mode Display mode of plug-in. Values: NP_EMBED: (1) Instance was created by an EMBED tag and shares the browser window with other content. ...
NPP_NewStream - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); Parameters The function has the following parameters: instance Pointer to current plug-in instance. type Pointer to MIME type of the stream. stream Pointer to new stream. seekable Boolean indicating whether the stream is seekable: true: Seekable. Stream supports random access through calls to NPN_RequestRead (for example, local files or HTTP servers that support byte-range requests). false: Not seekable. ...
NPP_Print - Archive of obsolete content
Syntax #include <npapi.h> void NPP_Print(NPP instance, NPPrint* PrintInfo); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. Must be embedded or full-screen. printInfo Pointer to NPPrint structure. Description NPP_Print is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page). It uses the print mode set in the NPPrint structure in its printInfo parameter to determine whether the plug-in should print as an embedded plug-in or as a full-page plug-in. ...
NPP_SetValue - Archive of obsolete content
This call is used to inform plugins of variable information controlled by the browser. Syntax #include <npapi.h> NPError NPP_SetValue(void *instance, NPNVariable variable, void *value); Parameters The function has the following parameters: instance Pointer to plugin instance on which to set the variable. variable The variable being set. value Value for the variable being set. Returns If successful, the function should return NPERR_NO_ERROR. If unsuccessful, the function should return the most relevant NPAPI error code. For possible values, see Error Codes. ...
NPP_SetWindow - Archive of obsolete content
Syntax #include <npapi.h> NPError NPP_SetWindow(NPP instance, NPWindow *window); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. Must be embedded or full-screen. window Pointer to the window into which the instance draws. The window structure contains a window handle and values for top left corner, width, height, and clipping rectangle (see note on Unix below). Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes. ...
NPP_StreamAsFile - Archive of obsolete content
Syntax #include <npapi.h> void NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); Parameters The function has the following parameters: instance Pointer to current plug-in instance. stream Pointer to current stream. fname Pointer to full path to a local file. If an error occurs while retrieving the data or writing the file, fname may be null. Description When the stream is complete, the browser calls NPP_StreamAsFile to provide the instance with a full path name for a local file for the stream. ...
NPP_URLNotify - Archive of obsolete content
Syntax #include <npapi.h> void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. url URL of the NPN_GetURLNotify() or NPN_PostURLNotify() request that has completed. reason Reason code for completion of request. Values: NPRES_DONE (most common): Completed normally. ...
NPP_Write - Archive of obsolete content
(Remark: Hence the name "NPP_Write" is misleading - just think of:"Data_Arrived") Syntax #include <npapi.h> int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buf); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. stream Pointer to the current stream. offset Offset in bytes of buf from the beginning of the data in the stream. Can be used to check stream progress or by range requests from NPN_RequestRead. len Length in bytes of buf; number of bytes accepted. ...
NPP_WriteReady - Archive of obsolete content
Syntax #include <npapi.h> int32 NPP_WriteReady(NPP instance, NPStream* stream); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. stream Pointer to the current stream. Returns Returns the maximum number of bytes that an instance is prepared to accept from the stream. Description The browser calls NPP_WriteReady before each call to NPP_Write to determine whether a plug-in can receive data and how many bytes it can receive. ...
NPPrint - Archive of obsolete content
Syntax typedef struct _NPPrint { uint16 mode; /* NP_FULL or NP_EMBED */ union { NPFullPrint fullPrint; /* if mode is NP_FULL */ NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ } print; } NPPrint; Fields The data structure has the following fields: mode Determines whether plug-in prints in full-page or embedded mode. Values: NP_FULL: Pointer to NPFullPrint structure. Plug-in can optionally print in full-page mode. The fullPrint field of the union is valid. See NPFullPrint and NPP_Print. NP_EMBED: Pointer to NPEmbedPrint structure. Plug-in should print in embedded mode. ...
NPPrintCallbackStruct - Archive of obsolete content
This structure is only used on Unix. Syntax typedef struct { int32 type; FILE* fp; } NPPrintCallbackStruct; Fields The data structure has the following fields: type Always contains NP_PRINT. fp Pointer to the file to which the plug-in should write its PostScript data. Description Callback structures are used to pass platform-specific information. The NPPrintCallbackStruct structure contains the file pointer to which the plug-in should write its PostScript data. ...
NPRect - Archive of obsolete content
Syntax typedef struct _NPRect { uint16 top; uint16 left; uint16 bottom; uint16 right; } NPRect; Fields The data structure has the following fields: top, left, bottom, right The top, left, bottom, and right sides of the rectangle. Description NPRect defines the bounding box of the area of the plug-in window to be updated, painted, invalidated, or clipped to. ...
NPRegion - Archive of obsolete content
Syntax Windows: typedef HRGN NPRegion; Mac OS X: typedef RgnHandle NPRegion; Note: This may need to be updated for the Cocoa event model. XWindows: typedef Region NPRegion; Description NPRegion defines the region of the plug-in window to be updated, painted, invalidated, or clipped to. For information about the region type definition used by your platform, see your platform documentation. ...
NPSavedData - Archive of obsolete content
Syntax typedef struct _NPSavedData { int32 len; void* buf; } NPSavedData; Fields The data structure has the following fields: len Length in bytes of the buffer pointed to by buf; set by the plug-in. buf Pointer to a memory buffer allocated by the plug-in with NPN_MemAlloc(). Can be any reasonable size; its contents are private to the plug-in and are not modified by the browser. Description The NPSavedData object contains a block of per-instance information that the browser saves after the instance is deleted. ...
NPSetWindowCallbackStruct - Archive of obsolete content
Contains information about the plug-in's Unix window environment. Syntax typedef struct { int32 type; Display* display; Visual* visual; Colormap colormap; unsigned int depth; } NPSetWindowCallbackStruct; Fields The data structure has the following fields: type Always contains NP_SetWindow. display Standard X Toolkit attribute. Pointer to the Display structure that represents the browser-server connection. visual Standard X Toolkit attribute. X Visual for the plug-in window or drawable. colormap Standard X Toolkit attribute. Colormap for the plug-in window or drawable. ...
NPStream - Archive of obsolete content
Syntax typedef struct _NPStream { void* pdata; /* plug-in private data */ void* ndata; /* Netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifyData; const char *headers; } NPStream; Fields The data structure has the following fields: Plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser. ...
NPString - Archive of obsolete content
Note: Whenever an NPString owns its string data and the data may be released through a call to NPN_ReleaseVariantValue(), the string data must be allocated using NPN_MemAlloc(). Syntax typedef struct _NPString { const NPUTF8 *UTF8Characters; uint32_t UTF8Length; } NPString; Fields The data structure has the following fields: UTF8Characters An array of the UTF-8 characters comprising the string. UTF8Length The number of bytes in the UTF-8 string (not the number of characters). ...
NPUTF8 - Archive of obsolete content
This is not the same thing as an entire UTF-8 character, which may be comprised of multiple NPUTF8 bytes. Syntax typedef char NPUTF8; Description The NPUTF8 type is used in constructing UTF-8 strings for use by the plugin scripting API extension. ...
NPVariant - Archive of obsolete content
The value is held in a union, and the type is one of types defined in the NPVariantType enumeration. Syntax typedef struct _NPVariant { NPVariantType type; union { bool boolValue; int32_t intValue; double_t doubleValue; NPString stringValue; NPObject *objectValue; } value; } NPVariant; Fields The data structure has the following fields: type A member of the NPVariantType enumeration specifying the data type contained in the NPVariant. value The value contained in the NPVariant structure. It may be a boolean, integer, double, string, or object, depending on the variant type. ...
NPVariantType - Archive of obsolete content
Syntax typedef enum { NPVariantType_Void, NPVariantType_Null, NPVariantType_Bool, NPVariantType_Int32, NPVariantType_Double, NPVariantType_String, NPVariantType_Object } NPVariantType; Description Each type is self-explanatory. ...
NPWindow - Archive of obsolete content
<< Gecko Plugin API Reference << Plug-in Side Plug-in API Summary Contains information about the target into which the plug-in instance can draw. Syntax typedef struct _NPWindow { void* window; /* Platform specific handle */ uint32_t x; /* Coordinates of top left corner */ uint32_t y; /* relative to a Netscape page */ uint32_t width; /* Maximum window size */ uint32_t height; NPRect clipRect; /* Clipping rectangle coordinates */ #ifdef XP_UNIX void * ws_info; /* Platform-dependent additional data */ #endif /* XP_UNIX */ NPWindowType type; /* Window or drawable target */ } NPWindow; Fields The data structure has the following fields: window Platform-specific handle to a native window element in the Nets...
NP_GetValue - Archive of obsolete content
Syntax #include <npapi.h> NPError NP_GetValue(void *instance, NPPVariable variable, void *value); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. instance parameter is NULL because no instance has been created. variable Plug-in information the call gets. Values: NPPVpluginNameString: Gets the name of the plug-in NPPVpluginDescriptionString: Gets the description string of the plug-in value Plug-in name, returned by the function. Returns If successful, the function returns NPERR_NO_ERROR. ...
NP_Initialize - Archive of obsolete content
Syntax Windows #include <npapi.h> NPError WINAPI NP_Initialize(NPNetscapeFuncs *aNPNFuncs) Unix #include <npapi.h> NPError NP_Initialize(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs) Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes. Description The browser calls this function only once: when a plug-in is loaded, before the first instance is created. This is the first function that the browser calls. NP_Initialize tells the plug-in that the browser has loaded it and provides global initialization. ...
NP_Port - Archive of obsolete content
Syntax typedef struct NP_Port { CGrafPtr port; /* Grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } NP_Port; Fields The data structure has the following fields: port Standard Mac OS port into which the plug-in should draw. portx, porty Top-left corner of the plug-in rectangle in port coordinates (taking the scroll position into account). Description On Mac OS, the window field of an NPWindow structure points to an NP_Port object, which is allocated by the browser. ...
NP_Shutdown - Archive of obsolete content
Syntax #include <npapi.h> void NP_Shutdown(void); Windows #include <npapi.h> void WINAPI NP_Shutdown(void); Description The browser calls this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself. Use NP_Shutdown to delete any data allocated in NP_Initialize to be shared by all instances of a plug-in. If you have defined a Java class for your plug-in, be sure to release it at this time so that Java can unload it and free up memory. NOTE: If enough memory is available, the browser can keep the plug-in library loaded if it expects to create more instances in the near future. ...
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
e very few modern applications that want to take advantage of the capabilities of newer toolkits use Xt. Also, when included with builds of Mozilla that are based on Gtk 1.2 or Gtk 2.x, the Xt code that hosts the plugins is at best hacky and has been the source for many minor problems including inconsistent focus behavior as well as occasional crashes. It's recommended that you have a look at the Gecko Plugin API Reference since this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the APIs. Key Differences All of the interfaces that you would normally expect to exist in the plugins will still exist when using XEmbed plugins. There are only two key differences: In the NPP_SetWindow call, the window parameter ...
Using workers in extensions - Archive of obsolete content
b is to update the ticker information that's currently displayed in the status bar, as well as to update the tooltip that appears while the mouse cursor is hovering over the ticker. This code is essentially identical to what's done in the previous version, except that it's done in response to an event instead of within the refreshInformation() method. A note about ChromeWorkers Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Gecko 2.0 added the new ChromeWorker object, which provides a special chrome-only worker that can be used by applications and extensions. This worker object has access to js-ctypes, which standard workers do not have. ...
-moz-stack-sizing - Archive of obsolete content
*/ -moz-stack-sizing: inherit; -moz-stack-sizing: initial; -moz-stack-sizing: unset; If you wish to prevent the stack from resizing automatically to accommodate its children, you can set -moz-stack-sizing to ignore on the child element. The property is set not on the stack itself, but on the stack's children. This lets you ignore certain children, but not others. Note: In previous versions of Gecko it was possible to work around the problem by setting very large negative bottom and right margins on the stack element and equally large positive bottom and right margins on the children whose size you didn't want to ignore. (The problem does not affect children moved above or to the left of the stack.) Initial valuestretch-to-fitApplies toall elementsInheritedyesComputed valueas specifiedAnima...
-moz-mac-graphite-theme - Archive of obsolete content
Note: Since Firefox 58, this media feature is no longer available to web content -- it is only available internally (e.g. to XUL / chrome code). See bug 1396066 for more details. The -moz-mac-graphite-theme Gecko-only CSS media feature can be used to apply styles based on whether the user has the Mac OS X "Graphite" theme enabled. Syntax <integer> If the user has configured their device to use the "Graphite" appearance on Mac OS X, this is 1. If the user is using the standard blue appearance, or is not on Mac OS X, this is 0. Media: media/visual Accepts min/max prefixes: no ...
-moz-maemo-classic - Archive of obsolete content
Syntax <integer> If the user agent is using Maemo with the original theme, this is 1. If it's using the newer Fremantle theme, this is 0. ...
-moz-os-version - Archive of obsolete content
This can be useful for adapting application skins and other chrome code depending on the user's operating system version. ...
-moz-windows-accent-color-in-titlebar - Archive of obsolete content
Syntax <integer> In recent Windows versions (e.g., 10), if accent colors are enabled in window titlebars, this is 1. ...
-moz-windows-theme - Archive of obsolete content
Note: Since Firefox 58, this media feature is no longer available to web content -- it is only available internally (e.g. to XUL / chrome code). See bug 1396066 for more details. The -moz-windows-theme Gecko-only CSS media feature is useful for customizing application skins and other chrome code to work well with the user's Windows theme. Syntax The -moz-windows-theme feature is specified as a keyword value that Indicates which Windows theme is currently being used. Values aero luna-blue luna-olive luna-silver royale generic zune Media: media/visual Accepts min/max prefixes: no ...
Displaying notifications (deprecated) - Archive of obsolete content
This non standard API has been dropped in Firefox 22 in favor of the standard API. To see how to use the standard API, please read: Using Web Notifications Mobile Only in Gecko 2.0 Available only in Firefox Mobile as of Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the operating system. For example, on Android, notifications appear in the bar at the top of the screen, and in the panel that appears when you drag that bar downward. Creating a notification The first thing you need to do is create the notification object by...
E4X - Archive of obsolete content
Archive › Web › E4X
ment in a form that feels natural for ECMAScript programmers. The goal is to provide an alternative, simpler syntax for accessing XML documents than via DOM interfaces. A valid alternative to E4X is a non-native JXON algorithm. E4X is standardized by Ecma International in ECMA-357 standard (currently in its second edition, December 2005). E4X is implemented (at least partially) in SpiderMonkey (Gecko's JavaScript engine) and in Rhino (JavaScript engine written in Java). Note: In Gecko 1.8 based browsers such as Firefox 1.5, E4X is already partially enabled for web page authors. To fully enable E4X, the <script> element needs to have the MIME type "text/javascript;e4x=1" (i.e., have an attribute of the form type="text/javascript;e4x=1"). The difference between the two modes is that without th...
Array comprehensions - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. ...
New in JavaScript 1.6 - Archive of obsolete content
The corresponding ECMA standard is ECMA-262 Edition 3 and ECMAScript for XML (E4X) with some additional features. Several new features were introduced: E4X, several new Array methods, and Array and String generics. New features in JavaScript 1.6 Support for ECMAScript for XML (E4X) for creating and processing XML content within JavaScript has been added. See for details. ...
New in JavaScript 1.7 - Archive of obsolete content
in JavaScript 1.7 The following features added with JavaScript 1.7 were not part of an ECMA-262 standard at the time. In more recent Firefox versions, the implementation is updated to work with semantics as specified in ECMAScript Edition 6. Please see the reference pages for differences. Iterators and generators Array comprehensions let statement (support for let expression was dropped in Gecko 41, see bug 1023609). const statement Destructuring assignment (support for JS1.7 style destructuring for-in was dropped in Gecko 40, see bug 1083498). ...
New in JavaScript 1.8 - Archive of obsolete content
See bug 380236 for a tracking development bug for JavaScript 1.8. Using JavaScript 1.8 In order to use some of the new features of JavaScript 1.8 in HTML, use: <script type="application/javascript;version=1.8"> ... your code ... </script> Another way (not recommended) to do this is to use the deprecated <script> language attribute and define it as "JavaScript1.8". When using the JavaScript shell, JavaScript XPCOM components, or XUL <script> elements, the latest JS version (JS1.8 in Mozilla 1.9) is used automatically (bug 381031, bug 385159). ...
Object.prototype.__count__ - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The __count__ property used to store the count of enumerable properties on the object, but it has been removed. ...
Object.prototype.__noSuchMethod__ - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The __noSuchMethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available. While __noSuchMethod__ has been dropped, the ECMAScript 2015 specification has the Proxy object, with which you can achieve the below (and more). Syntax obj.__noSuchMethod__ = fun Parameters fun A function that takes the form function (id, args) { . . . ...
Object.prototype.__parent__ - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The __parent__ property used to point to an object's context, but it has been removed. Syntax obj.__parent__ Description For top-level objects, this is the e.g. window. ...
String.prototype.quote() - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes ("). Syntax str.quote() Return value A new string representing the original string wrapped in double-quotes, with any special characters escaped. Examples Using quote In the table below the quote() method replaces any special characters and wraps the strings in double-quotes. ...
LiveConnect Overview - Archive of obsolete content
); Handling Java Exceptions in JavaScript When Java code fails at run time, it throws an exception. If your JavaScript code accesses a Java data member or method and fails, the Java exception is passed on to JavaScript for you to handle. Beginning with JavaScript 1.4, you can catch this exception in a try...catch statement. (Although this functionality (along with some others) had been broken in Gecko 1.9 (see bug 391642) as the Mozilla-specific LiveConnect code had not been maintained inside Mozilla, with Java 6 update 11 and 12 building support for reliance on Mozilla's implementation of the generic (and cross-browser) NPAPI plugin code, this has again been fixed.) For example, suppose you are using the Java forName method to assign the name of a Java class to a variable called theClass. The...
LiveConnect - Archive of obsolete content
Documentation Java plugin - LiveConnect documentation This is likely the most up-to-date documentation of LiveConnect. ...
java - Archive of obsolete content
Created by The java object is a top-level, predefined JavaScript object. You can automatically access it without using a constructor or calling a method. ...
Reference - Archive of obsolete content
m" are synonymous. So are "current object" and "context object". We could also put in layman definitions there for JS constructs like functions and variables. --Maian 01:43, 30 September 2005 (PDT) We should define the terms we are using. In particular this means we should define activation object somewhere (and link to it whenever we mention it). --Nickolay 18:40, 16 July 2006 (PDT) JS 1.2 and Gecko 1.8 Per the fix for bug 255895, "JavaScript1.2" values for the script's language attribute no longer work, e.g. <script language="JavaScript1.2"> will execute the script in the latest JS version rather than JS 1.2. So how should this be documented? In Fx 1.0, JS 1.2 is available, but not in the upcoming Fx 1.5. There are 5 cases where "JavaScript1.2" is mentioned in this reference: Special:Searc...
forEach - Archive of obsolete content
be kValue = O[ k ]; <hr> This page has been the target of a revert war, and so write access to it has been restricted. If you wish to make changes, and especially if you wish to revert another user's changes, please either add a comment here, or post to dev-mdc@lists.mozila.org, explaining the change you desire. jswisher 15 Aug 2011 <hr> Is this a from _core_ of JavaScript 1.5? If so, is JS 1.5 Gecko only? Those extra features like forEach are Gecko only, and it should be mentioned that they should *_not_* be used on web pages. --Gandalf 07:18, 31 May 2005 (PDT) Is there a way to make forEach make use of break? [1].forEach(function(value, index, array){ print(value); //break? if (value>1){ return false;//we could have some way to break when we return false } }); //woulld print 1 2 --P...
Requests For Enhancement - Archive of obsolete content
Archive › Web › XForms › RFE
they are brainwashed into believing that the only way to build cool web apps is to do DOM surgery with Javascript! Dan McCreary. One of the outstanding features of XForms is that it can work with any XML host language. Natively, the Mozilla XForms implementation supports XForms elements being hosted in XHTML and XUL documents. But a form author is not restricted to only those XML languages that Gecko knows. A lot of the XForms capabilities are reachable by using our Custom Controls interfaces. Our Custom Control interfaces allows for the exchange of data between any XML element and and an XForms model. This means that an author can write powerful Mozilla-based applications by using XForms. If previously you was forced to use AJAX for this then now XForms makes this for you automatically. Cu...
Mozilla XForms User Interface - Archive of obsolete content
icker depending on whether it is bound to a xsd:string type or a xsd:date type. When a xf:output binds to a node that has a type of xsd:date, we output the date value as plain text. An output bound to a date and also having @appearance='full' will display as a calendar. This article uses several notations. If you see Fx 3.0 only, that means that the control will only be available for Firefox 3.0 (Gecko 1.9). There are several possible reasons for this restriction. The first is that the changes required for such controls could not be safely made to Firefox 1.5 or Firefox 2.0. The second is that the control is introduced in XForms 1.1 and we don't feel adding the enhancement would be prudent until the 1.1 spec is more stable. For instance, when the spec reaches 'recommendation'-level status. If y...
XForms - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Note: Support for XForms was removed from Firefox in Firefox 19. See the HTML Forms Guide for approaches to creating forms in HTML5. XForms Essentials An online book giving you a guided tour of XForms. XForms were envisioned as the future of online forms as envisioned by the W3C. Drawing on other W3C standards like XML Schema, XPath, and XML Events, XForms tried to address some of the limitations of the current HTML forms model. However, XForms never gained traction and is now considered obsolete. ...
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
ss="nav"> <a href="one.html" class="nav">one</a> | <a href="two.html" class="nav">two</a> | <a href="thr.html" class="nav">three</a> | <a href="fou.html" class="nav">four</a> </td> Because the enclosing table cell has a class of nav, the vertical-bar characters will turn red when the user moves the mouse pointer anywhere within the table cell. The links will also turn red when they are hovered. Gecko Behavior In browsers based on Netscape Gecko builds later than 20020410 (Netscape 6.1+), :hover styles can be applied to any element in a document. Thus authors who have used bare pseudo-classes, or bare class-pseudo-class combinations, are at risk of seeing hover styles applied to more than just their links. The most reliable fix is to add the anchor element to the selectors, like this: a:hove...
Mozilla's DOCTYPE sniffing - Archive of obsolete content
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. This page describes behavior of the old HTML parser in Firefox 3.6 and older. It has been replaced by a new HTML 5 parser in Firefox 4 and newer. This document describes how Mozilla uses the DOCTYPE declaration to determine strict mode vs. quirks mode. The code that makes this determination is currently in DetermineParseMode() in nsParser.cpp. See bug 1312 and bug 55264 for some of the history of the mode determination. See bug 153032 for the creation of the Almost-Standards mode around Mozilla 1.0. ...
Web Standards - Archive of obsolete content
forums... Mailing list Newsgroup RSS feed The Web Standards Project WebDev FeedHouse Other community links... ...
Using the DOM File API in chrome code - Extensions
...
Async scripts for asm.js - Game development
To see the difference, toggle javascript.options.parallel_parsing in about:config. ...
Tools for game development - Game development
is is, of course, great for games. Emscripten An LLVM to JavaScript compiler; with Emscripten, you can compile C++ and other languages that can compile to LLVM bytecode into high-performance JavaScript. This is a great tool for porting applications to the Web! There is a useful Emscripten tutorial available on the wiki. Note that we are aiming to cover Emscripten in its own section of MDN. Gecko profiler The Gecko profiler extension lets you profile your code to help figure out where your performance issues are so that you can make your game run at top speed. Shumway Shumway is a renderer for Adobe Flash built entirely in JavaScript, WebGL, etc., bridging the gap between Flash and web standards. This article shows how to make use of Shumway, and how to contribute fixes and bugs to the...
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
ntities headers. Even if they are neither request, nor response headers, entity headers are often included in such terms. ...
FTU - MDN Web Docs Glossary: Definitions of Web-related terms
You can use FTU to set many important options (e.g. ...
Firefox OS - MDN Web Docs Glossary: Definitions of Web-related terms
Firefox OS is Mozilla's mobile operating system, based on Linux and Firefox's powerful Gecko rendering engine. Firefox OS consists mainly of Gaia, Gecko, and Gonk. Learn more General knowledge Firefox OS on Wikipedia ...
Gaia - MDN Web Docs Glossary: Definitions of Web-related terms
The user interface and default application suite of the Firefox OS platform. Once Firefox OS starts, anything drawn to screen is a product of the Gaia layer (e.g., the lock screen, home screen, standard apps). Gaia is implemented entirely with HTML, CSS, and JavaScript, and its only interfaces to the underlying operating system are through open Web APIs, which the Gecko layer implements. You can install third-party apps alongside Gaia. Learn more Technical reference Gaia platform guide Gaia development/hacking guide ...
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
sists of a Linux kernel (based on the Android Open Source Project (AOSP)) and userspace hardware abstraction layer (HAL). The kernel and several of the userspace libraries are common open-source projects: Linux, libusb, bluez, and so forth. Some other parts of the HAL are shared with AOSP: GPS, camera, and others. You could call Gonk a very simple Linux distribution. Gonk is a porting target of Gecko (just as Gecko has been ported to OS X, Windows, and Android). Since Firefox OS has full control over Gonk, we can expose interfaces to Gecko that aren't accessible on other operating systems, for example the full telephony stack and display frame buffer. Learn more Gonk page on the Firefox OS zone ...
Mozilla Firefox - MDN Web Docs Glossary: Definitions of Web-related terms
Mozilla Firefox is a free open-source browser whose development is overseen by the Mozilla Corporation. Firefox runs on Windows, OS X, Linux, and Android. First released in November 2004, Firefox is completely customizable with themes, plug-ins, and add-ons. Firefox uses Gecko to render webpages, and implements both current and upcoming Web standards. Learn more General knowledge Mozilla Firefox official website Technical reference Firefox developer documentations on MDN ...
SOAP - MDN Web Docs Glossary: Definitions of Web-related terms
SOAP (Simple Object Access Protocol) is a protocol for transmitting data in XML format. Firefox removed support for SOAP in 2008. Learn more General knowledge SOAP on Wikipedia SOAP in Gecko-based Browsers Technical reference Specification ...
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
d its host operating system. Spam bots, download managers, and some browsers often send a fake UA string to announce themselves as a different client. This is known as user agent spoofing. The user agent string can be accessed with JavaScript on the client side using the navigator.userAgent property. A typical user agent string looks like this: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0". Learn more General knowledge User agent on Wikipedia Technical reference navigator.userAgent Browser detection using the user agent RFC 2616: 14.43: The User-Agent header ...
CSS FAQ - Learn web development
Learn › CSS › Howto › CSS FAQ
th an incomplete, incorrect, or missing DOCTYPE declaration or a known DOCTYPE declaration in common use before 2001 will be rendered in Quirks Mode. Standards Mode: the browser attempts to follow the W3C standards strictly. New HTML pages are expected to be designed for standards-compliant browsers, and as a result, pages with a modern DOCTYPE declaration will be rendered with Standards Mode. Gecko-based browsers, have a third Almost Standards Mode that has only a few minor quirks. This is a list of the most commonly used DOCTYPE declarations that will trigger Standards or Almost Standards mode: <!DOCTYPE html> /* This is the HTML5 doctype. Given that each modern browser uses an HTML5 parser, this is the recommended doctype */ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.
Index - Learn web development
218 Properly configuring server MIME types HTTP By default, many web servers are configured to report a MIME type of text/plain or application/octet-stream for unknown content types. As new content types are invented or added to web servers, web administrators may fail to add the new MIME types to their web server's configuration. This is a major source of problems for users of Gecko-based browsers, which respect the MIME types as reported by web servers and web applications. 219 Server-side website programming first steps Beginner, CodingScripting, Guide, Intro, Landing, Learn, Server-side programming we answer a few fundamental questions about server-side programming -- "What is it?", "How does it differ from client-side programming?", and "Why is it so...
Setting up your own test automation environment - Learn web development
e. Next, you need to download the relevant drivers to allow WebDriver to control the browsers you want to test. You can find details of where to get them from on the selenium-webdriver page (see the table in the first section.) Obviously, some of the browsers are OS-specific, but we're going to stick with Firefox and Chrome, as they are available across all the main OSes. Download the latest GeckoDriver (for Firefox) and ChromeDriver drivers. Unpack them into somewhere fairly easy to navigate to, like the root of your home user directory. Add the chromedriver and geckodriver driver's location to your system PATH variable. This should be an absolute path from the root of your hard disk, to the directory containing the drivers. For example, if we were using a Mac OS X machine, our user nam...
Accessibility/LiveRegionDevGuide
at assistive technology (AT) developers can use in developing live region support. This guide was written from an ATK/AT-SPI point of view as part of the Orca Live Region Support project. However, many of the concepts were also used during the development of FireVox, an AT using IAccessible2. Sometimes the very best guide for some developers is the code itself. Please refer to the liveregions and Gecko Python modules in Orca for a real world example. For more information about Live Regions, please read the ARIA properties spec or the live region report to learn about ARIA Live Region markup and the Live Region API Support document for the latest Firefox API with regards to Live Regions. As always, we're open to questions and suggestions for changes in community forums. Priority Queue The he...
Event Process Procedure
...
Information for Assistive Technology Vendors
Information for Assistive Technology Vendors Accessibility Features in Mozilla & Call for Testers! Mozilla now has enough accessibility support that we're reading for early adopters and testers to start giving it a try. Please read this page if you're interested in an alternative accessible browser. Keyboard documentation This lists Mozilla's keyboard docs in a single long document. Gecko Info for Windows Accessibility Vendors Mozilla supports MSAA (Microsoft Active Accessibility) in HTML and in our user interface (based on XUL technology). This makes it possible for the vendors of Windows accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for Mozilla. In addition, we provide some simple interfaces via which we expos...
Mozilla Plugin Accessibility
Here is a rundown of problems and the planned solutions: New! See the plugin keyboard navigation proposal to see how the largest problems can be solved. Problem Planned solution Owner Targeted completion 1. All browser keys unavailable when plugin has focus Focused plugins currently have no choice but to consume all keyboard events. The new plugin API will allow plugins to bubble unused keypresses to the browser. This will allow keyboard users to still access menus, close the current page, scroll, move back and forward in history, etc. If the plugin needs those keystrokes, the can consume them and not pass them on. ...
Add-ons
ons.mozilla.org or distribute it yourself How to manage your published extension An enterprise guide for developing and using extensions How to develop themes for Firefox Firefox developer communities Extensions for Firefox for Android In 2020, Mozilla will release a new Firefox for Android experience. 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 WebExtensions API on GeckoView. Migrate an existing extension If you maintain a legacy extension, such as an XUL overlay, bootstrapped, or Add-on SDK-based extension, you can still port it to use WebExtension APIs. There are some porting resources on Firefox Extension Workshop, our site for Firefox-specific develop...
Benchmarking
fox reduces the precision of the Performance APIs and other clock and timer APIs accessible to Web Content. They are currently reduce to a multiple of 2ms; which is controlled by the privacy.reduceTimerPrecision about:config flag. The exact value of the precision is controlled by the privacy.resistFingerprinting.reduceTimerPrecision.microseconds about:config flag. Profiling tools Currently the Gecko Profiler has limitations in the UI for inverted call stack top function analysis which is very useful for finding heavy functions that call into a whole bunch of code. Currently such functions may be easy to miss looking at a profile, so feel free to also use your favorite native profiler. It also lacks features such as instruction level profiling which can be helpful in low level profiling, or...
What to do and what not to do in Bugzilla
ce. If the bug is long, when enough info is provided a new bug should be filed and the original bug marked as a duplicate of it. Resolving bugs as INVALID You should resolve a bug as INVALID if the issue described in the bug is clearly not a Mozilla bug or if the issue is intended behavior. The exceptions are bugs in other software which we have to work around and bugs that involve certain core Gecko modules. Bugs covered by this exception should not be INVALIDated by anyone other than the module owner or module peer; for bugs involving modules like Layout or Content, attach a test case to the bug and then CC one of the owners or peers. Reports of problems with specific websites that result from bad coding practices already determined to be "tech evangelism" cases by the module owner or peer,...
Choosing the right memory allocator
PR_sprintf_append(), PR_vsmprintf() and PR_vsprintf_append() must be freed with PR_smprintf_free() PL_strdup(), PL_strndup() must be freed with PL_strfree() nsCRT::strdup/nsCRT::strndup must be freed with nsCRT::free Allocating memory within plugins There are special memory allocation routines specifically intended for use from plugins, which must not be used from within Mozilla itself. See Gecko Plugin API Reference:Memory. NPN_MemAlloc NPN_MemFree NPN_MemFlush JavaScript API memory allocators There are also routines intended for use within the JavaScript runtime engine (SpiderMonkey). This is the /js/ subtree of the source code. Also, all consumers of the JSAPI must use these routines for allocating memory they plan to pass to the JavaScript runtime. See JSAPI Reference for furt...
Creating a Language Pack
Linux or mac/xpi on Mac. Open the XPI file contained in this directory with Firefox to see your work. You have to set your selected language still. You can either use the Locale Switcher extension, or set it in about:config. Add the preference intl.locale.requested and set it to your language code, in this case, x-testing, or add it in front of the current setting, seperated with a comma. Before Gecko 59 you had to set the preference general.useragent.locale to your language code. L10n binary repack For apps currently in development, you need to get the right strings for the build you use. Best is to create an installer there. First, we get the en-US builds. There is a target to get those, too, Another way to test it to repack the en-US binary. From the obj-firefox-build/browser/locales di...
Creating a Login Manager storage module
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. ...
Creating Sandboxed HTTP Connections
This article will cover the basics of doing HTTP connections from XPCOM JavaScript, and should easily translate to C++ XPCOM. Setting up an HTTP connection The first step in setting up an HTTP connection from an URL (stored in a string) is to create an nsIURI out of it. nsIURI is an XPCOM representation of an URI, with useful methods to query and manipulate the URI. ...
Debugging OpenGL
OpenGL debug mode When running a debug build, you can enable the OpenGL debug mode by defining the environment variable MOZ_GL_DEBUG. If you start up Firefox with this variable defined, the following behavior changes occur: Each time you issue an OpenGL call, a check is performed to ensure that the GL context is current, using a thread-local static variable to keep track of this. If the context isn't current, the call aborts. ...
Debugging Table Reflow
Reflow The most efficient tool to claim that html-table code is the victim and not the source of layout bugs is a frame reflow debug log. Look there especially how the maxElementsize (MES) and desired size are propagated. Block Reflow Another way to debug the reflow process is implemented inside nsBlockFrame.cpp. ...
Debugging on Windows
h e10s enabled one can run ./mach run ... 2>&1 | tee It may also be necessary to disable the content sandbox (MOZ_DISABLE_CONTENT_SANDBOX=1 ./mach run ...). Running two instances of Mozilla simultaneously You can run two instances of Mozilla (e.g. debug and optimized) simultaneously by setting the environment variable MOZ_NO_REMOTE: set MOZ_NO_REMOTE=1 Or, starting with Firefox 2 and other Gecko 1.8.1-based applications, you can use the -no-remote command-line switch instead (implemented in bug 325509). You can also specify the profile to use with the -P profile_name command-line argument. Debugging JavaScript Use Venkman, the JavaScript Debugger for Mozilla. You can use helper functions from nsXPConnect.cpp to inspect and modify the state of JavaScript code from the MSVS debugger. ...
Adding APIs to the navigator object
Simply add an entry to the "JavaScript-navigator-property" category. The object must be implemented as an XPCOM component. Each method below of adding new objects to the navigator object requires that the new object is a registered XPCOM component. You can read about creating and registering XPCOM components in JavaScript. ...
How Mozilla's build system works
le in the root directory and then recursively descends into child directories until it's done. But there's more to the process than that. The recursive make backend divides the source tree into tiers. A tier is a grouping of related directories containing makefiles of their own. For example, there is a tier for the Netscape Portable Runtime (nspr), one for the JavaScript engine, one for the core Gecko platform, one for the XUL app being built, and so on. The main moz.build file defines the tiers and directories in the tiers. In reality, the main moz.build files include other moz.build files, such as /toolkit/toolkit.mozbuild, which define the tiers. They do this via the add_tier_dir() function. At build time, the tiers are traversed in the order they are defined. Typically, the traversal ord...
Creating Custom Events That Can Pass Data
aScript. (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 events, but that's it. The trunk You needed to download (or check out) the trunk source because you will have to modify it in order to implement your event. Be aware that this means your stuff won't work with everyone else's ver...
ESLint
305023, node_modules is now located in the top-level directory, and should need no special set-up. Understanding Rules and Errors Not all files are linted Currently ESLint runs on: .js .jsx .jsm .xml .html .xhtml Additionally, some directories and files are ignored, see the .eslintignore file Handling Errors If your code fails an ESLint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined. no-undef (eslint) If you don't understand a rule, you can look it up on eslint.org for more information about it. Mozilla Specific Rules There are some rules that are specific for the Mozilla code-base. These have the prefix mozilla/. More information: Outline details of the rules Rule Source Code ...
Listening to events on all tabs
owser representing the tab whose location changed. aWebProgress The progress instance responsible for handling the events. aRequest The nsIRequest object representing the associated request. aLocation An nsIURI object indicating the tab's new URI. aFlags Optional: This is a value which explains the situation or the reason why the location has changed. Optional from Gecko 10 onProgressChange Called when updated progress information for the download of a document is available. void onProgressChange( nsIDOMXULElement aBrowser, nsIWebProgress aWebProgress, nsIRequest aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress ); Parameters aBrowser The browser representing the tab for whi...
Reviewer Checklist
reaking auto-updates. Android APIs added since Froyo should be guarded by a version check. Preffability If the feature being worked on is covered by prefs, make sure they are hooked up. If working on a new feature, consider adding prefs to control the behavior. Consider adding prefs to disable the feature entirely in case bugs are found later in the release cycle. [Fennec: "Prefs" can be Gecko prefs, SharedPreferences values, or build-time flags. Which one you choose depends on how the feature is implemented: a pure Java service can't easily check Gecko prefs, for example.] Strings There should be no string changes in patches that will be uplifted (including string removals). Rev entity names for string changes. When making UI changes, be aware of the fact that strings will be d...
SVG Guidelines
es are easier to spot, since they usually come with styles making them invisible. They must meet two conditions: they must be devoid of any fill (or a transparent one) or stroke. Unused attributes on root <svg> element The root <svg> element can also host many useless attributes. ...
Index
Found 172 pages: # Page Tags and summary 1 Firefox Firefox, Landing, Mozilla Here you can learn about how to contribute to the Firefox project and you will also find links to information about the construction of Firefox add-ons, using the developer tools in Firefox, and other topics. 3 Building Firefox with Rust code Build documentation, Gecko, build, rust In May 2015 the Rust programming language reached its 1.0 stability milestone, and various experiments with writing parts of Gecko in Rust began. Rust code first shipped in August 2016 with the release of Firefox 48. It became a requirement for building Gecko in February 2017 with Firefox 54. 8 Experimental features in Firefox Experimental, Firefox, Preferences, featur...
HTMLIFrameElement.getScreenshot()
eenshot() method of the HTMLIFrameElement lets you request a screenshot of a content <iframe>, scaled to fit within a specified maximum width and height. The image will be cropped if necessary but will not be distorted vertically or horizontally. Note: getScreenshot() waits for the event loop to go idle before it takes the screenshot. It won't wait more than 2000ms (this delay is defined by the Gecko dom.browserElement.maxScreenshotDelayMS preference). Syntax var instanceOfDOMRequest = instanceOfHTMLIframeElement.getScreenshot(maxWidth, maxHeight, mimeType); Returns A DOMRequest for handling the screenshot request. Its request.onsuccess handler handles the success case (the screenshot is contained in request.result as a Blob object), and its request.onerror handler handles the failure ca...
Chrome-only API reference
Mozilla › Gecko › Chrome › API
Note: Most of the APIs exposed to the Web in general are also usable in Chrome code: see Web APIs for a list of these. Browser APIThe HTML Browser API is an extension of the HTML <iframe> element that allows web apps to implement browsers or browser-like applications. It currently works in (privileged) chrome code on Firefox desktop (version 47 and above).ChromeWorkerIf you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using ChromeWorker instead of the standard Worker object. ...
overflow-clip-box-block
The overflow-clip-box-block CSS property specifies relative to which box the clipping happens when there is an overflow -- in the block direction. /* Keyword values */ overflow-clip-box-block: padding-box; overflow-clip-box-block: content-box; /* Global values */ overflow-clip-box-block: inherited; overflow-clip-box-block: initial; overflow-clip-box-block: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Note that this property is activated by default only in the UA stylesheet and chrome contexts. Value not found in DB! Syntax Values padding-box This keyword makes the clipping be related to the padding box. content-box This keyword makes the clipping be related to the content box. Formal sy...
overflow-clip-box-inline
The overflow-clip-box-inline CSS property specifies relative to which box the clipping happens when there is an overflow -- in the inline direction. /* Keyword values */ overflow-clip-box-inline: padding-box; overflow-clip-box-inline: content-box; /* Global values */ overflow-clip-box-inline: inherited; overflow-clip-box-inline: initial; overflow-clip-box-inline: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Note that this property is activated by default only in the UA stylesheet and chrome contexts. Value not found in DB! Syntax Values padding-box This keyword makes the clipping be related to the padding box. content-box This keyword makes the clipping be related to the content box. Fo...
overflow-clip-box
w. It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties. /* Keyword values */ overflow-clip-box: padding-box; overflow-clip-box: content-box; /* Two values */ overflow-clip-box: padding-box content-box; overflow-clip-box: content-box content-box; /* Global values */ overflow-clip-box: inherit; overflow-clip-box: initial; overflow-clip-box: unset; Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Prior to Firefox 29, this behavior was hardcoded; since then it uses this property that can be used elsewhere too. Note that this property is activated by default only in the UA stylesheet and chrome contexts. Initial valuepadding-boxApplies toall elementsInheritednoMediavisualComputed va...
MozBeforePaint
Usage outline In order to time your animation, the first thing you need to know is the time base; that is, the time at which your animation sequence started. You can determine this value by looking at window.mozAnimationStartTime. This new property indicates the time, in milliseconds since epoch, at which all animations started in the specified window during the current refresh interval should be considered to have started running. With that value in hand, you can then schedule all your subsequent animation frames. ...
MozScrolledAreaChanged
The MozScrolledAreaChanged event is fired when the document view has been scrolled or resized. Note: While you can poll the values of document.scrollWidth and document.scrollHeight to watch for changes to the document size, reading these properties can trigger document reflow, which can make them computationally expensive. This event, introduced in Gecko 1.9.2, is fired whenever either or both of these values change. Specification Mozilla specific Interface UIEvent Bubbles Yes Cancelable Yes Target DefaultView, Document Default Action None Properties Property Type Description targetRead only EventTarget The event target (the topmost target in the DOM tree). typeRead o...
Chrome-only Events reference
This page lists events that are only available in Gecko Chrome code (and sometimes in other privileged circumstances, eg. UA widgets). MozBeforePaintGecko 2.0 adds a new method for performing JavaScript controlled animations that synchronize not only with one another, but also with CSS transitions and SMIL animations being performed within the same window.MozScrolledAreaChangedThe MozScrolledAreaChanged event is fired when the document view has been scrolled or resized. smartcard-insertThe smartcard-insert event is fired when the insertion of a smart card has been detectedsmartcard-removeThe smartcard-remove event is fired when the removal of a smart card has been detected. ...
Getting from Content to Layout
Changes to a document originate in the content tree (from DOM modification by scripting, insertion of elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/RealityRipple/UXP/blob/master/layout/base/nsCSSFrameConstructor.cpp The frame constructor implements nsIMutationObserver which allows it to "watch" the content tree. nsCSSFrameConstructor gets notified from the document's PresShell (which implements nsIDocumentObserver and observes the document) about all nodes in the document. ...
Implementing Download Resuming
Introduction Various protocols support getting partial files. This means that if a download was interrupted, it can be resumed from that point on, rather than regetting the whole file. The Necko implementations of HTTP 1.1 (RFC 2616) as well as FTP support this feature. Not only is the ability to specify a start position important, but it's also important to have some assurance that the file did not change since the initial download attempt. ...
Addon
add-ons, for example, it tests whether the named file was included in the package. boolean hasResource( in string path ) Parameters path A "/" separated path for the resource. getResourceURI() Gets an nsIURI to the file resource for this add-on. nsIURI getResourceURI( in string path ) Parameters path A "/" separated path for the resource. getDataDirectory() Requires Gecko 32.0(Firefox 32.0 / Thunderbird 32.0 / SeaMonkey 2.29) Returns the path of the preferred directory, within the current profile, where an add-on should store data files. If the directory does not already exist, it will be created. void getDataDirectory( in DataDirectoryCallback callback ) ...
Add-on Manager
all installs using the addInstallListener() method. Finding updates Add-ons can be checked for updates using the findUpdates() method. It must be passed an UpdateListener to receive information about compatibility information and new update information. Any available update is returned as an AddonInstall which is ready to be downloaded and installed. Detecting add-on changes Requires Gecko 7.0(Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) You can also get lists of add-ons that, at startup, were changed in various ways. The getStartupChanges() method lets you find out which add-ons were installed, removed, updated, enabled, or disabled at application startup. For example, to take a look at the add-ons that were disabled at startup: Components.utils.import("resource://gre/module...
DownloadLastDir.jsm
DownloadLastDir.file; DownloadLastDir.file = file; You can also set and retrieve this information on a site-by-site basis. To set the path, use setFile: // file is an nsIFile DownloadLastDir.setFile(uri, file); To retrieve the path in Firefox 26 or later, use getFileAsync: DownloadLastDir.getFileAsync(uri, function (file) { // file is an nsIFile console.log(file); }); Deprecated since Gecko 26.0 To retrieve the path in Firefox 25 or earlier, use getFile: // file is an nsIFile var file = gDownloadLastDir.getFile(uri); console.log(file); Private browsing mode When browsing normally, the browser uses the browser.download.lastDir preference to store the last download directory path. However, when private browsing mode is enabled, the last download directory path is instead maintaine...
Deferred
Use the new Promise() constructor instead (or use the above backwards/forwards compatible Deferred function given below). ...
PromiseUtils.jsm
ise. To use it, you first need to import the code module into your JavaScript scope: Components.utils.import("resource://gre/modules/PromiseUtils.jsm"); Method overview Deferred defer(); Methods defer() Creates a new pending Promise and provides methods to resolve or reject this Promise. This method was previously implemented as Promise.defer(), which is obsolete since Gecko 30. And PromiseUtils.defer uses DOM Promise instead of Promise.jsm's Promise. Deferred defer(); Parameters None. Return value A new object, containing the new promise in the promise property, and the methods to change its state in the resolve and reject properties. See the Deferred documentation for details. ...
Sqlite.jsm
s are what you will interface most with in Sqlite.jsm. The following sections detail the API of an opened connection instance. Connection Management These APIs are used to manage and inspect the state of the connection. close() Close this database connection. This must be called on every opened connection or else application shutdown will fail due to waiting on the opened connection to close (Gecko doesn't force close connections because it doesn't know that you are really done with them). This function returns a promise that will be resolved when the database has closed. If a transaction is in progress at the time this function is called, the transaction will be forcibly rolled back. If statements are in progress at the time this function is called, they will be cancelled. Callers shou...
Using workers in JavaScript code modules
You can do so by using ChromeWorker instead of the standard Worker object. It works exactly like a standard Worker, except that it has access to js-ctypes via a global ctypes object available in the global scope of the worker Obsolete since Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Note: As of Gecko 8.0, the nsIWorkerFactory interface has been removed Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), you can use workers in JavaScript code modules (JSMs). This lets you run code in a separate thread from your JSM. To create a ChromeWorker for this purpose, you need to use the nsIWorkerFactory in...
WebRequest.jsm
User Agent header so the browser identifies itself as IE 11, but only when visiting pages under "http://useragentstring.com/": let {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {}); Cu.import("resource://gre/modules/MatchPattern.jsm"); let pattern = new MatchPattern("http://useragentstring.com/*"); let ua = "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"; WebRequest.onBeforeSendHeaders.addListener(changeUserAgent, { urls: pattern }, ["blocking", "requestHeaders"]); function changeUserAgent(e) { for (let header of e.requestHeaders) { if (header.name == "User-Agent") {...
source-editor.jsm
mode String A string indicating the default syntax highlighting mode; by default, the content is assumed to be plain text. See Editor mode constants for permitted values. placeholderText String The default initial text to be in the editor when it's created; by default, an empty string. This is deprecated starting in Firefox 13; use initialText instead. Deprecated since Gecko 13.0 readOnly Boolean A Boolean value indicating whether or not the source editor should be read only. showAnnotationRuler Boolean A Boolean value indicating whether or not to display the annotations gutter/ruler. See XXXXX for details. showLineNumbers Boolean A Boolean value indicating whether or not the line numbers gutter should be displayed. ...
Bootstrapping a new locale
the directory before beginning.) In the terminal, type the following command: $ hg clone http://hg.mozilla.org/releases/mozilla-x.x.x/ Where "x.x.x" is the existing release branch version. For instance, for Firefox 3.6, we use mozilla-1.9.2. Refer to L10n:Branches for the list of all branches. If you are interested in localizing Thunderbird 3, SeaMonkey 2 or other Mozilla projects based on Gecko 1.9.1 you'll need to follow the instructions on getting the source-code of the comm-central repository. Create a bare-bones localization Next, create a base localization. This is done by cloning the en-US (United States English) files into your localization. First, you should specify your locale's language identifier in ab-CD format, where "ab" is the ISO 639 language code, and CD is the ISO ...
Localization content best practices
pen the page? > Yes/No dialog works in English, but in Gaelic/Irish/Welsh and several other languages the equivalent answer is Want/Not want. W3C has a good guide on the length ratios a developer should be prepared for. Test localizability As a developer, you should always test your patches not just for code errors, but also for localizability issues in case they involve string or UI changes. Gecko and mozilla-central First, make sure that there are no hard-coded strings, and all strings are available in localization files (.dtd, .properties). One possible way to test a patch for localizability issues is to alter the en-US localization files, adding extraneous characters to the original strings: this can help to identify both hard-coded strings and "flexibility issues" in the UI. Changing...
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...
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(). ...
MathML3Testsuite
ce the tests are considered passed if there is no fatal error (crash, etc). This exception also holds for obsolete features (such as macro, mode etc) or for other undefined behaviors (attribute href for example). Note that in general, comparing with the "Sample Rendering" is not enough to conclude on the success/failure of the test. So please do not edit these pages if you are not able to explain Gecko's rendering. However, any report is welcome on the Tracking bug for the MathML testsuite. Characters Blocks Symbols Variants EntityNames NumericRefs UTF8 General Clipboard GenAttribs Math Presentation CSS DynamicExpressions GeneralLayout ScriptsAndLimits TablesAndMatrices TokenElements Topics Accents BiDI ElementaryMathExamples EmbellishedOp LargeOp LineBreak Nesting Stretchy...
MathML Torture Test
book and equivalent MathML representations. It compares the rendering by the XeTeX engine using the default Latin Modern Math font against the MathML rendering by your browser using the default math font, or an alternative OpenType MATH fonts. To get the best rendering, be sure to have appropriate mathematical fonts installed on your system and to use a browser with OpenType MATH support such as Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28) or higher. You may also try this test page for Mathematical OpenType Fonts which instead relies on Web fonts. Finally, you may want to check this table comparing how the tests are read by various screen readers for Mozilla browsers. Link to test: MathML Torture Test demo ...
MathML In Action
that you wish could be done just a little better? Or what about those things that were working before and are not working anymore (a.k.a. regressions)? In either case, head over to Bugzilla to report the discrepancies. Bugzilla has a big memory for these things, and besides, how would your problems be fixed if they are not reported?! Getting involved is part of your contribution towards enriching Gecko with an elegant standards-compliant MathML renderer. Your feedback can be manifested by putting MathML content on the web, reporting bugs in Bugzilla, and, if you can help with code, inspecting/improving the current code, and/or picking up an item in the ToDo list. ...
Updates
2010 New Web pages for the Mozilla MathML Project! Documentation is now available on MDC and wiki.mozilla.org. Feel free to complete and improve it! May 8, 2007 Mozilla CEO speaks out on the future of Firefox: the complete 8,000 word interview. Interview to the APC Magazine where Mitchell Baker mentions Roger Sidje's work on MathML. June 5, 2002 Mozilla 1.0 Released "By virtue of embedding Gecko, Mozilla 1.0 and products based on Mozilla code support more web standards, more deeply, more consistently across more platforms than any others. Mozilla 1.0 features full support for HTML 4.0, XML 1.0, Resource Description Framework (RDF), Cascading Style Sheets level 1 (CSS1), and the W3C Document Object Model level 1 (DOM1) [...] as well as support for display of mathematical equations using M...
Mozilla Development Tools
This page lists the various development tools that we operate and/or maintain here at mozilla.org. Naturally, source code for all of these tools is also available. The tools needed to build Mozilla are described on the build page for your platform. Mozilla Source Code (Mercurial and CVS) "Trunk" development for Gecko 1.9.1/Firefox 3.5 and beyond uses the Mercurial source code version control system. Earlier releases and other products use the CVS version control system. If you are doing active development, checking out source code from one of these is preferable to downloading an archived snapshot, as you get up-to-the-minute changes. MXR You can browse the up-to-the-minute latest version of the source code online through a massively-hyperlinked source code browser (based on LX...
Mozilla projects on GitHub
An intelligent tool for browsing source code. emscripten The Emscripten LLVM-to-JavaScript compiler. fxdt-adapters The Firefox Developer Tools Adapter that lets you debug various remote targets from the Firefox Developer Tools. firefox-dev.tools A Web page to help new Mozilla contributors find bugs to work on that relate to the Firefox Developer Tools. gecko-dev A read-only mirror of the Mercurial repositories used for Mozilla private code. kitsune Kitsune is the platform that drives the Mozilla support web site, SUMO. kuma The Django project that powers this site (MDN). mdn Code samples for the MDN Web site. mozbrick The Mozilla Brick project. mozilla-B2G The Firefox OS project. ...
DMD
.mozilla.fennec_$USERNAME app will use the wrapper script. Launch Launch Fennec either by tapping on the icon as usual, or from the command line (as before, be sure to replace org.mozilla.fennec_$USERNAME with the app identifier as appropriate). adb shell am start -n org.mozilla.fennec_$USERNAME/.App Trigger Use the existing memory-report dumping hook: adb shell am broadcast -a org.mozilla.gecko.MEMORY_DUMP In logcat, you should see output similar to this: I/DMD (20731): opened /storage/emulated/0/Download/memory-reports/dmd-default-20731.json.gz for writing ... I/GeckoConsole(20731): nsIMemoryInfoDumper dumped reports to /storage/emulated/0/Download/memory-reports/unified-memory-report-default-20731.json.gz The path is where the memory reports and DMD reports get dumped to. You...
Intel Power Gadget
een used in energia, Roberto Vitillo's tool for systematically measuring differential power usage between different browsers. (An energia dashboard can be seen here; please note that the data has not been updated since early 2014.) Version 3.0 (available on Mac and Windows, but not on Linux) also exposes an API from which the same measurements can be extracted programmatically. At one point the Gecko Profiler used this API on Windows to implement experimental package power estimates. Unfortunately, the Gecko profiler takes 1000 samples per second on desktop and is CPU intensive and so is likely to skew the RAPL estimates significantly, so the API integration was removed. The API is otherwise unlikely to be of interest to Mozilla developers. ...
Leak Gauge
Getting a log file To get a log file, run the browser with the following environment variables set. NSPR_LOG_MODULES=DOMLeak:5,DocumentLeak:5,nsDocShellLeak:5,NodeInfoManagerLeak:5 NSPR_LOG_FILE=nspr.log # or any other filename of your choice This will overwrite any existing file called nspr.log. The browser will run with negligible slowdown. ...
Performance
tools Apple provides some tools for Mac OS X that report similar problems to those reported by LSAN and Valgrind. The "leaks" tool is not recommended for use with SpiderMonkey or Firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see bug 390944). Leak Gauge Leak Gauge is a tool that can be used to detect certain kinds of leaks in Gecko, including those involving documents, window objects, and docshells. LogAlloc LogAlloc is a tool that dumps a log of memory allocations in Gecko. That log can then be replayed against Firefox's default memory allocator independently or through another replace-malloc library, allowing the testing of other allocators under the exact same workload. Memory Profiler The memory prof...
accessibility.tabfocus
The preference accessibility.tabfocus controls what elements receive focus when the user presses the Tab key. Note: On Mac OS X, if this preference is not set, the Full Keyboard Access setting in System Preferences > Keyboard is honored. Type:integer Default value: 7 (Windows and Linux); 2 (Mac OS X) Exists by default: no Application support:Gecko 1.7 Status: Active Introduction: Bugs: bug 140612 Values 1 Give focus only to text fields (default on Mac OSX) 2 Give focus to all form elements except text fields. 4 Give focus only to links and linked images. Other You can add these values to combine their functionality. The value 7 (give focus to all elements) is the default on Windows and Linux. ...
browser.dom.window.dump.file
browser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if browser.dom.window.dump.enabled is set to true. Changes require an application restart. Type:string Default value:none Exists by default: no Application support: Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Status: Active; last updated 2012-03-18 Introduction: Pushed to Nightly on 2009-04-24 Bugs: bug 489938 Values The value holds the file system path for the file in which the content of the window.dump() calls get written, e.g. C:\dump.txt . It will be created if it doesn't exist yet. The line breaks have to be in the argument of the dump function, else successive dump calls will get logged into the same line. Related browser.d...
dom.event.clipboardevents.enabled
dom.event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected. The emitting of the oncopy, oncut and onpaste events are controlled by this preference. Type:boolean Default value:true Exists by default: no Application support: Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Status: Active; last updated 2012-02-15 Introduction: Pushed to Nightly on 2012-02-14 Bugs: bug 542938 Values true (default) The oncopy, oncut and onpaste events are enabled for web content. false The oncopy, oncut and onpaste events are disabled for web content. ...
javascript.options.showInConsole
...
ui.SpellCheckerUnderline
ui.SpellCheckerUnderline holds the colour which is used to underline words not recognized by the spellchecker. Type:string Default value:#ff0000 Exists by default: no Application support: Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Status: Active; last updated 2012-02-21 Introduction: Pushed to Nightly on 2009-04-03 Bugs: bug 338209 Values A color code like #ff0000 for red. ...
ui.SpellCheckerUnderlineStyle
ui.SpellCheckerUnderlineStyle holds the style which is used to underline words not recognized by the spellchecker. Type:integer Default value:5 Exists by default: no Application support: Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Status: Active; last updated 2012-02-22 Introduction: Pushed to Nightly on 2009-04-03 Bugs: bug 338209 Values The values are defined in nsStyleConsts.h. 0 no underlining 1 dotted 2 dashed 3 single solid line 4 two solid lines 5 (default) wavy ...
ui.alertNotificationOrigin
ui.alertNotificationOrigin controls the position and direction from which popup notifications invoked by nsIAlertsService are sliding in. ...
ui.textSelectBackground
ui.textSelectBackground saves the color in which the background of a text selection in the user interface or in content will be styled. ...
ui.textSelectForeground
ui.textSelectForeground saves the color in which the text of a text selection in the user interface or the content will be styled. ...
ui.tooltipDelay
ui.tooltipDelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip. Type:integer Default value:500 Exists by default: no Application support: Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Status: Active; last updated 2012-02-21 Introduction: Pushed to Nightly on 2011-12-15 Bugs: bug 204786 Values integer (milliseconds, default: 500) The time for delay between the mouse stopping over the element and the tooltip appearing is stored in milliseconds and the default value is 500ms. ...
Preferences
A brief guide to Mozilla preferences An introductory guide to where preferences are stored and other useful information about the core preference system. Using preferences from application code Firefox 6 introduced static functions for accessing preferences efficiently from within application code. This API is not available for add-ons, but if you're working on a Gecko application, this API is the preferred way to access preferences. Mozilla networking preferences A guide to key networking-related preferences. Mozilla preferences for uber-geeks A guide to preferences that only truly elite geeks should play with. Examples Code snippets Preference-related code snip...
Debugging out-of-memory problems
tered. For more information, see bug 969415. Out-of-memory crashes In some cases, running out of memory causes the browser to crash. Ideally, memory.dump_reports_on_oom would generate an about:memory dump, but it does not currently. Firefox Android On Firefox Android, an about:memory dump may be triggered from a connect desktop machine with the command: adb shell am broadcast -a org.mozilla.gecko.MEMORY_DUMP The location of the dump file will be printed to the Android log (viewed with adb logcat | grep GeckoConsole) and can be retrieved via adb pull. Note: replace "/storage/emulated/0/Download/" in the reported file path with the device's download path (e.g. "/sdcard/download/") when calling adb pull. ...
Programs Using NSPR
Most of these are derived from Netscape servers. ...
PRUint64
Guaranteed to be an unsigned 64-bit integer on all platforms. Syntax #include <prtypes.h> typedef definition PRUint64; Description May be defined in several different ways, depending on the platform. For syntax details for each platform, see prtypes.h. Notes Note: Prior to Gecko 12.0, PRUint64 was actually treated as a signed 64-bit integer by XPConnect. This has been fixed. ...
Index
324 NSS_3.12_release_notes.html Newsgroup: mozilla.dev.tech.crypto 325 New NSS Samples Example This collection of sample code demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc. It also demonstrates some best practices in the application of cryptography. 326 Notes on TLS - SSL 3.0 Intolerant Servers Gecko, NSS, Security No summary! 327 Older NSS release notes This page lists release notes for older versions of NSS. See Release notes for recent versions of NSS for recent release notes. The links below are provided for historical information. 328 NSS_3.12.3_release_notes.html Newsgroup: mozilla.dev.tech.crypto 329 Overview of NSS NSS ...
Necko FAQ
That's all! Any resemblance in flavor to the Necco candy is purely coincidental. What do I need to build this library? See the code section on the main page. Currently you'd need to get the mozilla tree and at least build NSPR, and XPCOM. ...
Necko Interfaces Overview
c download nsIStreamListener::OnDataAvailable - notifies presence of downloaded data nsIRequestObserver::OnStopRequest - notifies completion of async download, possibly w/ error nsILoadGroup : nsIRequest attribute of a nsIRequest channel impl adds itself to its load group during invocation of AsyncOpen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a particular page (until the channels complete) all channels owned by a load group can be canceled at once via the load group's nsIRequest::Cancel method nsITransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous I/O methods: OpenInput...
Proxies in Necko
protocol. Therefore, nsISocketTransportService supports creating socket transports using an nsIProxyInfo. This proxy info will only be used if it specifies a SOCKS proxy, through which the connection is then made. Note that SOCKS is implemented as an nsISocketProvider, and the socket transport service will therefore use it as as the downmost socket type. Proxies and local hosts Requires Gecko 9.0(Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Starting with Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), proxy servers are not used when accessing hosts with no dots in their names, if manual proxy configuration is used and "<local>" is added to the "No proxy for:" text field field. To be written XXX missing paragraphs are about PAC, and more details about HTTP proxying, and m...
GC Rooting Guide
the template parameter is the type of the GC thing it contains. From the user perspective, a JS::Rooted<T> instance behaves exactly as if it were the underlying pointer. JS::Rooted must be constructed with a JSContext*, and optionally an initial value. There are typedefs available for the main types. ...
Hacking Tips
ted by other companies and are used as a metric to evaluate how fast JavaScript engines. This tool is maintained by the JavaScript Team, to find regressions and to compare SpiderMonkey with other JavaScript engines when possible. To run these benchmarks localy, you can clone AreWeFastYet sources and look inside the benchmarks directory to run individual benchmarks with your JS shell. Using the Gecko Profiler (browser / xpcshell) see the section dedicated to profiling with the gecko profiler. This method of profiling has the advantage of mixing the JavaScript stack with the C++ stack, which is useful to analyze library function issues. One tip is to start looking at a script with an inverted JS stack to locate the most expensive JS function, then to focus on the frame of this JS function, a...
Index
6 GC Rooting Guide SpiderMonkey No summary! 7 GCIntegration Developing Mozilla, Firefox, Garbage collection, Intermediate, Intro, JSAPI, NeedsUpdate, SpiderMonkey, Tools, memory The SpiderMonkey garbage collector (GC) will be changing a lot in the future. This page is intended to explain the changes that are happening, with a focus on how they will affect Gecko code that uses JSAPI. At a high level, there are three issues to be aware of: 8 Getting SpiderMonkey source code Guide, SpiderMonkey You can get the SpiderMonkey source code in gzipped form or directly from the Mercurial repository. 9 Hacking Tips SpiderMonkey This page list a few tips to help you investigate issues related to SpiderMonkey. All tips liste...
SpiderMonkey Internals: Thread Safety
You must only use it from one thread. This page describes implementation details of the SpiderMonkey JavaScript engine. It is mainly of interest to people working on SpiderMonkey itself. See JS_THREADSAFE for a gentler introduction to using SpiderMonkey in a multi-threaded application. General background SpiderMonkey has a top-level struct, JSRuntime, that acts as a container for everything else. A program typically has only one JSRuntime, even if it has many threads. Each runtime has one or more JSCompartments. The JSCompartment is the universe in which JS objects live. They can't travel to other JSCompartments. Crucially, any given compartment may only be accessed by one thread at a time. ...
SpiderMonkey Internals
me functions. These interfaces are named in a way that makes local vs. universal time confusion likely. Caveat emptor, and we're working on it. To make matters worse, Java (and therefore JavaScript) uses "local" time numbers (offsets from the epoch) in its Date class. jsfile.cpp, jsfile.h, jsfile.msg Obsolete. Do not use these files. Makefile.in, build.mk Mozilla makefiles. If you're building Gecko or Firefox, the larger build system will use these files. They are also used for current standalone builds. Makefile.ref, rules.mk, config.mk, config/* Obsolete SpiderMonkey standalone makefiles from 1.8 and earlier. See SpiderMonkey Build Documentation. See also jsd ...
JS_NewObject
se it returns NULL. Added in SpiderMonkey 1.8 JS_NewObjectWithGivenProto creates a new object with the specified prototype. If NULL is passed as proto, the new object will have a prototype with the JS value of null. To create a new object as a property of an existing object, use JS_DefineObject, a convenience function that combines JS_NewObject and JS_DefineProperty. Obsolete ? Starting with Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), you can create a new object in a specific compartment using the Components.utils.createObjectIn() method. Choosing a default prototype Like many JSAPI functions, JS_NewObject selects an appropriate prototype for the newly created object if you don't supply one yourself. If the new object's class (here, clasp) is a built-in class, then its a...
JS_SetGCZeal
and debug (they happen sooner, closer to the source of the bug). The drawback is that GC zeal can cause JavaScript code to run extremely slowly. Regularly running your test suite with GC zeal enabled at level 2 is a good practice. ...
jsdouble
You should be able to just replace every usage of jsdouble with double in your code. jsdouble is a C floating-point number type. It is defined to be a 64-bit, IEEE 754 compliant type. See ECMA 262-3 ?8.5. Arithmetic on jsdouble values in C should behave exactly like the floating-point arithmetic in JavaScript, except that C and JavaScript may treat not-a-number values differently. Implementation note: SpiderMonkey has had several bugs involving details of floating-point arithmetic on various platforms. Controlling the behavior of floating-point arithmetic is very architecture- and system-specific, and can be hard to get right. ...
Parser API
" } A logical operator token. enum AssignmentOperator { "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" } An assignment operator token. enum UpdateOperator { "++" | "--" } An update (increment or decrement) operator token. E4X This section describes node types that are provided for E4X support. E4X has since been removed as of Gecko 21. Note: E4X is not part of the ECMAScript standard (ECMA-262), but is a separate standard of its own (ECMA-357). Declarations interface XMLDefaultDeclaration <: Declaration { type: "XMLDefaultDeclaration"; namespace: Expression; } A default xml namespace declaration. Expressions interface XMLAnyName <: Expression { type: "XMLAnyName"; } The special E4X wildcard pseudo-id...
SpiderMonkey releases
ndalone SpiderMonkey is not an official product. Our continuous integration system does produce a tarball that is built into a binary that runs our smoke tests, but we do not maintain it nor actively test its suitability for general embedding. We have periodically created "releases", but they are best-effort and incomplete. We do happily accept patches, and make some effort to keep the tip of the Gecko tree minimally working as an embeddable source package. We are very limited in our ability to support older versions, including those labeled as "releases" on this page. The easiest way to fetch the version corresponding to the current Firefox release is to visit the treeherder page for the release repository and click on the first SM(pkg) link you see. That will open a small window in the bott...
Shell global objects
unt() Returns the number of helper threads available for off-main-thread tasks. reportOutOfMemory() Report OOM, then clear the exception and return undefined. For crash testing. throwOutOfMemory() Throw out of memory exception, for OOM handling testing. reportLargeAllocationFailure() Call the large allocation failure callback, as though a large malloc call failed, then return undefined. In Gecko, this sends a memory pressure notification, which can free up some memory. findPath(start, target) Return an array describing one of the shortest paths of GC heap edges from start to target, or undefined if target is unreachable from start. Each element of the array is either of the form: { node: {object or string}, edge: {string describing edge from node} } , if the node is a JavaScript object...
Split object
rties is fast. The outer window object is the object returned by window.open. It represents the window or tab itself and survives as the user navigates in that window or tab. The window object's JSClass.resolve hook ensures that properties of the inner object are visible via the outer object, if the running code has the right principals to access them. This privilege check may be slow. See wikimo:Gecko:SplitWindow and bug 296639 for more discussion. See also http://groups.google.com/group/mozil...81825b338fb84f Details This section describes split objects as a feature of the JSAPI. It catalogues (and tries to explain) the subtle ways in which split objects affect SpiderMonkey's behavior. Split objects are only useful for implementing objects that will be on the scope chain of functions. SpiderM...
SpiderMonkey: The Mozilla JavaScript runtime
y How to configure Eclipse to work on the SpiderMonkey code. Running Automated JavaScript Tests How to run the JavaScript test suites. Creating JavaScript tests How to add tests to the JavaScript test suites. Reference JSAPI Reference SpiderMonkey API reference. JS Debugger API Reference API reference for the Debugger object introduced in SpiderMonkey 1.8.6, which corresponds to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5). Bytecode descriptions Listing of SpiderMonkey's bytecodes. Parser API Reflection of the SpiderMonkey parser, made available as a JavaScript API. Tips, tricks and philosophy Future Directions Future directions for functionality, design, and coding practices. SpiderMonkey Internals A design overview and a file-by-file walkthrough of t...
TPS Tests
very likely to fail, since it expects a clean start). Note: Be prepared not to use your computer for 15 or so minutes after starting a full run of TPS, as it will open and close a fairly large number of Firefox windows. ...
compare-locales
entral/mail/locales/l10n.toml ./l10n/ zh-TW If you're working on multiple projects in parallel, you can also pass all the toml files to compare-locales at once. To get a single result across the projects, specify the --unified flag: $ compare-locales --unified browser/locales/l10n.toml mobile/android/locales/l10n.toml ./l10n/ de Cross-channel and compare-locales If you're working against the gecko-strings cross-channel repository, the toml configuration files are in the _configs subdirectory, browser.toml, mobile_android.toml, mail.toml and calendar.toml, and suite.toml. Options To get a brief list of available options, use the --help flag: $ compare-locales --help The output The output of compare-locales shows the missing and obsolete strings in a pseudo-diff format. ab-CD browse...
Security and the jar protocol
oncerned, it was a Zip archive. This ordinarily isn't a big deal, since site developers wouldn't put up dangerous files and set them up to download like Zip archives. However, if a site allows file uploads, Zip files are typically treated as relatively innocuous by web sites in that situation, since they're not executable. Unless, of course, the browser thinks it's a JAR file. So starting with Gecko 1.8.0.15 and 1.8.1.10, the jar: protocol is only allowed if the MIME type of the file is application/java-archive. A site that serves a file with that type is essentially promising that it has vetted the content and that it is in fact safe to download and execute. Any other file type results in an "Unsafe file type" error. ...
Animated PNG graphics
Mozilla › Tech › APNG
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 ...
ROLE_ALERT
Assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising this role. Should be used for warning dialogs, etc. Mapped to AT-SPI: ROLE_ALERT ATK: ATK_ROLE_ALERT MSAA/IA2: ROLE_SYSTEM_ALERT UA: NSAccessibilityWindowRole Events EVENT_ALERT - fires when the widget is shown. ...
ROLE_CELL
Also, see ROLE_TABLE. ...
ROLE_COLUMNHEADER
Also refer to ROLE_TABLE. ...
ROLE_GRAPHIC
<< Gecko Roles Page Represents a picture. Interfaces nsIAccessible nsIAccessNode nsIAccessibleImage nsIAccessibleHyperLink Mapped to AT-SPI: ATK: ATK_ROLE_IMAGE UA: NSAccessibilityImageRole MSAA/IA2: ROLE_SYSTEM_GRAPHIC Used by ARIA: img XUL: <image/> HTML: <img> ...
ROLE_MENUITEM
Interfaces nsIAccessNode nsIAccessible Children No children. ...
ROLE_OUTLINEITEM
<< Gecko Roles Page Represents an item in an outline or tree structure. Interfaces nsIAccessibleTreeCache nsIAccessible nsIAccessibleSelectable nsIAccessNode Mapped to AT-SPI: ROLE_LIST_ITEM ATK: ATK_ROLE_LIST_ITEM UA: NSAccessibilityRowRole (use OutlineRow as subrole) MSAA/IA2: ROLE_SYSTEM_OUTLINEITEM Used by ARIA: treeitem HTML: ?? XUL: <treeitem/> ...
ROLE_ROW
Also, see ROLE_TABLE. ...
ROLE_TABLE
Also refer to the following roles: ROLE_COLUMNHEADER, ROLE_ROWHEADER, ROLE_COLUMN, ROLE_ROW, ROLE_CELL. ...
XForms Accessibility
Implementation of accessible objects for XForms elements is based on top of the existing object hierarchy introduced in the Mozilla accessibility module. XForms elements behavior is implemented in accordance with accessible toolkit checklist. In general, when elements are similar to HTML elements, they are exposed to MSAA/ATK in a similar way. Get Build Subsections below explain how you can obtain accessible XForms-enabled build. These are either downloading latest build of firefox or building it yourself. ...
Places utilities for JavaScript
n nodeIsQuery(nsINavHistoryResultNode aNode); boolean nodeIsReadOnly(nsINavHistoryResultNode aNode); boolean nodeIsHost(nsINavHistoryResultNode aNode); boolean nodeIsContainer(nsINavHistoryResultNode aNode); boolean nodeIsDynamicContainer(nsINavHistoryResultNode aNode); boolean nodeIsLivemarkContainer(nsINavHistoryResultNode aNode); Obsolete since Gecko 21 boolean nodeIsLivemarkItem(nsINavHistoryResultNode aNode); Obsolete since Gecko 21 boolean isReadonlyFolder(nsINavHistoryResultNode aNode); int getIndexOfNode(nsINavHistoryResultNode aNode); string wrapNode(nsINavHistoryResultNode aNode, string aType, nsIURI aOverrideURI); array unwrapNodes(string blob, string aType); nsITransaction mak...
extIApplication
ute AString The name of the application. version readonly attribute AString The version number of the application. console readonly attribute extIConsole The console object for the application. extensions readonly attribute extIExtensions The extensions object for the application. Contains a list of all installed extensions. Not available anymore on Gecko 2.0 (see [1]), use getExtensions() instead Obsolete since Gecko 2.0 prefs readonly attribute extIPreferenceBranch The preferences object for the application. Defaults to an empty root branch. storage readonly attribute extISessionStorage The storage object for the application. events readonly attribute extIEvents The events object for the applicat...
Toolkit API
The Mozilla Toolkit is a set of programming interfaces (APIs) built on top of Gecko which provide advanced services to XUL applications. These services 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 XU...
XML Extras
ers. The XML Extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds. Feature Status Feature Status XMLSerializer Available XMLHttpRequest Available DOMParser (string and stream input source) Available Web Services with SOAP and WSDL No longer available from Gecko 1.9/Firefox 3. XML Persistence FIXptr and XPointer Available since 1.4alpha in the core Mozilla. Moved to XML 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 ca...
Components.isSuccessCode
the complex task, you would call Components.isSuccessCode() upon the status code included in the notification. Examples Checking whether copying a stream's data succeeded The following example demonstrates copying data from a buffered nsIInputStream to an nsIOutputStream, checking for whether the copy succeeded using Components.isSuccessCode(). Note: nsIAsyncStreamCopier.init() has changed in Gecko 1.9.2, omit last 2 boolean parameters if you're using Gecko 1.9.1 and earlier. const Cc = Components.classes; const Ci = Components.interfaces; const Cr = Components.results; // global flags polled externally var copyFailed = false; var copyInProgress = false; function copyBufferedStream(inStream, outStream) { var copyObserver = { onStartRequest: function(request, context) { ...
Components.utils.getWeakReference
ition, just because get() succeeds doesn't mean your object is valid. It might simply not have been garbage collected yet. You might have to check other aspects of the object (like Node.parentNode() on a DOM node) to verify the object is truly what you want. Syntax weakRef = Components.utils.getWeakReference(obj); Parameters obj The object for which to obtain a weak reference. Note: In Gecko 11.0, this method was changed to throw an exception if obj is null. In Gecko 12.0, the previous behavior of silently failing has been restored. Example In this example here, a weak reference to a window is held. And then later on it is matched in the array and used. var arr = []; arr.push(Cu.getWeakReference(window)); //now lets say this code runs in another block: for (var i=0; i<arr.lengt...
Components.utils.importGlobalProperties
of an object to import, and will be defined on the importing scope's global. The following strings are supported: String/Object XPCOM Component atob Blob btoa crypto CSS fetch File nsIDOMFile indexedDB NodeFilter Firefox 60 nsIDOMNodeFilter Obsolete since Gecko 60 rtcIdentityProvider TextDecoder TextEncoder URL URLSearchParams XMLHttpRequest nsIXMLHttpRequest Obsolete since Gecko 60 For string/object in table without a minimum firefox version, it is not exactly known since when it was available, however it is guranteed available from Firefox 28 and up. Syntax ...
Components.utils.isXrayWrapper
For example, privileged code using an Xray to a DOM object sees only the original, native version of the DOM object. Any expando properties are not visible, and if any native properties have been redefined, this has no effect. Use this function to determine whether a given object is an Xray or not. Syntax boolean Components.utils.isXrayWrapper(obj); Parameters obj The object to check. Returns true if the object is an Xray: false otherwise. ...
Components.utils.waiveXrays
For example, privileged code using an Xray to a DOM object sees only the original, native version of the DOM object. Any expando properties are not visible, and if any native properties have been redefined, this has no effect. ...
Components object
utils.lookupMethod Looks up a native (i.e. declared in the interface) method or property of an XPCOM object. Serves the same purpose as XPCNativeWrapper. utils.makeObjectPropsNormal Ensures that all functions come from the specified object's scope, and aren't cross-compartment wrappers. May only be called from JavaScript code. utils.methodjit Obsolete since Gecko 24.0 Provides access to the value of the methodjit property in the JavaScript environment. utils.methodjit_always Obsolete since Gecko 24.0 Provides access to the value of the methodjit_always property in the JavaScript environment. utils.relimit Provides access to the value of the relimit property in the JavaScript environment. u...
Examples
There are several Java test applications checked in to the tree that give examples on how to embed Gecko or init XPCOM from within Java. The test apps can be found at mozilla/extensions/java/xpcom/tests. ...
PyXPCOM
PyXPCOM allows for communication between Python and XPCOM, such that a Python application can access XPCOM objects, and XPCOM can access any Python class that implements an XPCOM interface. PyXPCOM is actively used in ActiveState Komodo products, for example. With PyXPCOM, a developer can talk to XPCOM or embed Gecko from a Python application. PyXPCOM is similar to JavaXPCOM (Java-XPCOM bridge) or XPConnect (JavaScript-XPCOM bridge). Mozilla defines many external interfaces available to embeddors and component developers. PyXPCOM provides access to these interfaces as Python interfaces. PyXPCOM also contains several classes that provide access to functions for initializing and shutting down XPCOM and Gecko from Python, as well as some XPCOM helper functions. Documentation ...
XPConnect wrappers
another wrapper object. This case is where a JS object was passed in via some IDL-declared interface, creating an XPCWrappedJS, and is now being returned to JavaScript via some other interface. In order to preserve API compatibility, an XPCWrappedNative is created around the XPCWrappedJS. Security wrappers exposed to chrome To learn about security wrappers, see the article on script security in Gecko. Note that a previous version of the current page recommended using __exposedProps__ to expose objects from chrome to content. This is now deprecated and we are in the process of removing support for it. If you need to make objects or functions defined in chrome code accessible to content, use Components.utils.cloneInto or Components.utils.exportFunction. ...
XPCShell Reference
n specifies a script file to execute. xpcshell terminates upon script completion. You can specify multiple JS files to execute by using multiple -f arguments, and the scripts will be executed in the order encountered. Furthermore, XPCShell looks for xpcshell.js in the current directory. If that file is found, it is executed before any other JS files specified. -g This option specifies which Gecko Runtime Environment directory (greDir) to use for XPCOM. -i This option turns on the "interactive" mode -s This option toggles the JavaScript strict option on and off. By default it is off. -v version This allows you to specify a specific version of JS to use, and should be set to an integral value specified by the JSVersion enumerated type. For instance, specifying -v 180 will set th...
Language bindings
s.importComponents.utils.import was introduced in Firefox 3 and is used for sharing code between different scopes easily. For example, you can import XPCOMUtils.jsm to avoid copy/pasting long XPCOM component registration boilerplate in your component files.Components.utils.importGlobalPropertiesImports various objects into a system scope.Components.utils.isXrayWrapperWhen privileged JavaScript in Gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "Xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways. For example, privileged code using an Xray to a DOM object sees only the original, native version of the DOM object. Any expando properties are not visible, a...
Monitoring HTTP activity
Creating an HTTP activity observer To observe HTTP activity, you need to implement the nsIHttpActivityObserver interface within your code. This is very simple, requiring you to implement a single method, nsIHttpActivityObserver.observeActivity(), which gets called each time an action of interest takes place on the HTTP channel. ...
nsresult
a strongly-typed enum used to represent a value returned by an XPCOM function; these are typically error or status codes. For a list of defined result values, see Error codes returned by Mozilla APIs. Note: On compilers that do not support strongly-typed enums (that is, compilers that don't support this feature of C++11), it falls back to being an unsigned 32-bit integer, as in past versions of Gecko. Note: Prior to Gecko 19.0, nsresult was not strongly typed. As a result, it was possible for code to misuse it, such as returning an nsresult value from a function whose signature indicates it returns a boolean. Because nsresult is strongly typed, code like the following will result in an error at compile time: bool foo() { ... if (something) { return NS_ERROR_FAILURE; } ... } Se...
NS_OVERRIDE
It was introduced in bug 500870. ...
nsDependentCString
sCString_internal& str The existing flat string. PRUint32 startPos The position within the existing string at which the dependent string should start. This is similar to using Substring(str, startPos), except that the resulting string is flat. void nsDependentCString() - source Constructs an nsDependentString to be rebound later. nsDependentCString(const nsACString_internal&) - source Obsolete in Gecko 9. This constructor should not be used. Parameters nsACString_internal& str AssertValid void AssertValid() - source verify restrictions Rebind void Rebind(const char*) - source allow this class to be bound to a different string... Parameters char* data void Rebind(const char*, PRUint32) - source Parameters char* data PRUint32 length void Rebind(const char*, const char*) ...
nsEmbedString
}; Typedefs self_type [nsEmbedString] An alias for the type of this class. abstract_string_type [nsAString] An alias for the abstract string type this class specializes. Methods nsEmbedString Constructors for nsEmbedString. ...
Alloc
tes a block of memory of a particular size. static void* Alloc( size_t aSize ); Parameters aSize [in] Specifies the size in bytes of the block of memory to allocate. Return Values This function is Infallible, therefore guaranteed to return a pointer to the newly allocated buffer. The result must be freed with a call to nsMemory::Free() when it is no longer needed. Note: Prior to Gecko 13.0, this function returned nsnull if memory allocation failed. See also nsMemory::Free() ...
IAccessibleAction
other-licenses/ia2/AccessibleAction.idlNot scriptable This interface gives access to actions that can be executed for accessible objects. 1.0 66 Introduced Gecko 1.9 Inherits from: IUnknown Last changed in Gecko 1.9 (Firefox 3) Every accessible object that can be manipulated via the native GUI beyond the methods available either in the MSAA IAccessible interface or in the set of IAccessible2 interfaces (other than this IAccessibleAction interface) should support the IAccessibleAction interface in order to provide Assistive Technology access to all the actions that can be performed by the object. Each action can be performed or queried for a name, description or associated key bindings. Actions are needed more for ATs that assist the mobility impaired, such as o...
IAccessibleApplication
other-licenses/ia2/AccessibleApplication.idlNot scriptable This interface gives access to the application's name and version information. 1.0 66 Introduced Gecko 1.9 Inherits from: IUnknown Last changed in Gecko 1.9 (Firefox 3) This interface provides the AT with the information it needs to differentiate this application from other applications, from other versions of this application, or from other versions of this application running on different versions of an accessibility bridge or accessibility toolkit. Servers implementing IAccessible2 should provide access to the IAccessibleApplication interface via QueryService from any object so that ATs can easily determine specific information about the application such as its name or version. Method overview [pr...
IAccessibleHyperlink
Non-text objects can have either a single link or a collection of links such as when the non-text object is an image map. Linked objects and anchors are implementation dependent. This interface is derived from IAccessibleAction. ...
IAccessibleImage
IAccessibleImage only needs to be implemented in certain situations. Some examples are: The accessible name and description() are not enough to fully describe the image, for example when the accessible description() is used to define the behavior of an actionable image and the image itself conveys semantically significant information. ...
IAccessibleRelation
other-licenses/ia2/AccessibleRelation.idlNot scriptable This interface gives access to an object's set of relations. 1.0 66 Introduced Gecko 1.9 Inherits from: IUnknown Last changed in Gecko 1.9 (Firefox 3) Method overview [propget] HRESULT localizedRelationType([out] BSTR localizedRelationType ); [propget] HRESULT nTargets([out] long nTargets ); [propget] HRESULT relationType([out] BSTR relationType ); [propget] HRESULT target([in] long targetIndex, [out] IUnknown target ); [propget] HRESULT targets([in] long maxTargets, [out, size_is(maxTargets), length_is( nTargets)] IUnknown targets, [out] long nTargets ); Methods localizedRelationType() Returns a localized version of the relation type. [propget] HRESULT localizedRelationType( [out] BSTR loc...
IDispatch
js/src/xpconnect/idl/XPCIDispatch.idlScriptable This interface is not to be used directly, it is to be used internally for XPConnect's IDispatch support. Inherits from: nsISupports Last changed in Gecko 1.7 ...
IJSDebugger
js/ductwork/debugger/IJSDebugger.idlScriptable Provides the JavaScript Debugger service. You should usually interface with this using the JavaScript code module instead of directly. See the JavaScript Debugger API Guide for details. 1.0 66 Introduced Gecko 9.0 Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/jsdebugger;1 as a service: var jsDebugger = Components.classes["@mozilla.org/jsdebugger;1"] .createInstance(Components.interfaces.IJSDebugger); Note: You should almost never directly use this service; instead, you should use the JavaScript code module that does this for you. The only time you should directly use this interface to create the Debugger object ...
amIInstallCallback
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable A callback function that web pages can implement to be notified when triggered installs complete. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void onInstallEnded(in AString aUrl, in PRInt32 aStatus); Methods onInstallEnded() Called when an install completes or fails. void onInstallEnded( in AString aUrl, in PRInt32 aStatus ); Parameters aUrl The url of the add-on being installed. aStatus 0 if the install was successful or negative if not. ...
amIInstallTrigger
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean enabled(); boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback); boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0 boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0 boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 ...
imgICache
That means that using getService in order to obtain it will yield incorrect results. ...
imgIDecoder
Method overview void close(); void flush(); void init(in imgILoad aLoad); unsigned long writeFrom(in nsIInputStream inStr, in unsigned long count); Methods close() Closes the stream. void close(); Parameters None. flush() Flushes the stream. ...
imgILoader
modules/libpr0n/public/imgILoader.idlScriptable Please add a summary to this article. ...
imgIRequest
Read only. ...
inIDOMUtils
layout/inspector/inIDOMUtils.idlScriptable DOM utility functions. ...
mozIPersonalDictionary
extensions/spellcheck/idl/mozIPersonalDictionary.idlScriptable This interface represents a personal dictionary. 1.0 66 Introduced Gecko 1.4.1 Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/spellchecker/personaldictionary;1. To access this service, use var personalDictionary = Components.classes["@mozilla.org/spellchecker/personaldictionary;1"] .getService(Components.interfaces.mozIPersonalDictionary); Method overview void addCorrection(in wstring word,in wstring correction, in wstring lang); void addWord(in wstring word, in wstring lang); boolean check(in wstring word, in wstring lang); void endSession(); void getCorrection(in wstring word, [array, size_is(count)] out wstr...
mozIPlacesAutoComplete
toolkit/components/places/public/mozIPlacesAutoComplete.idlScriptable This interface provides some constants used by the Places AutoComplete search provider as well as methods to track opened pages for AutoComplete purposes. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void registerOpenPage(in nsIURI aURI); void unregisterOpenPage(in nsIURI aURI); Constants Constant Value Description MATCH_ANYWHERE 0 Match anywhere in each searchable term. MATCH_BOUNDARY_ANYWHERE 1 Match first on word boundaries, and if we do not get enough results, then match anywhere in each searchable term. MATCH_BOUNDARY 2 Match on word boundaries in each searchable t...
mozISpellCheckingEngine
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. ...
mozIStorageAggregateFunction
ggers. An aggregate function is a function that returns one value from a series of values. There are a number of already defined aggregate functions provided by SQLite. Objects implementing this interface can be registered with mozIStorageConnection.createAggregateFunction(). storage/public/mozIStorageAggregateFunction.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview void onStep(in mozIStorageValueArray aFunctionArguments); nsIVariant onFinal(); Methods onStep() This is called for each row of results returned by the query. The implementation should store or perform some work to prepare to return a value. Note This callback is executed on the thread that the statemen...
mozIStorageBindingParams
The mozIStorageBindingParams interface is used to bind values to parameters prior to calling mozIStorageStatement.executeAsync(). storage/public/mozIStorageBindingParams.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports You can only create mozIStorageBindingParams objects by calling the mozIStorageBindingParamsArray.newBindingParams(). Method overview void bindByIndex(in unsigned long aIndex, in nsIVariant aValue); void bindBlobByIndex(in unsigned long aIndex, [array, const, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize); void bindDoubleByIndex(in unsigned long aIndex, in double aValue); Native code only! void bindInt32ByInd...
mozIStorageBindingParamsArray
The mozIStorageBindingParamsArray interface is a container for mozIStorageBindingParams objects, and is used to store sets of bound parameters that will be used by the mozIStorageStatement.executeAsync(). storage/public/mozIStorageBindingParamsArray.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports You can only create these objects by calling the mozIStorageStatement.newBindingParamsArray(). Method overview void addParams(in mozIStorageBindingParams aParameters); mozIStorageBindingParams newBindingParams(); Attributes Attribute Type Description length unsigned long The number of mozIStorageBindingParams objects in the arra...
mozIStorageCompletionCallback
This interface should be implemented to handle callbacks from asynchronous Storage API routines. storage/public/mozIStorageCompletionCallback.idlScriptable Please add a summary to this article. Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Inherits from: nsISupports Method overview void complete(); Methods complete() Called when an asynchronous storage routine has completed. void complete(); Parameters None. ...
mozIStorageError
The mozIStorageError interface represents errors returned by the Storage API, offering attributes to obtain the error code as well as a human-readable error message corresponding to the error that occurred. storage/public/mozIStorageError.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Attributes Attribute Type Description message AUTF8String A human readable error string with details; this may be null if no details are available. Read only. result long One of the error code values listed under Constants on this page. Constants Constant Value Desc...
mozIStorageProgressHandler
The mozIStorageProgressHandler interface lets storage consumers receive callbacks during the execution of sqlite requests. storage/public/mozIStorageProgressHandler.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 boolean onProgress(in mozIStorageConnection aConnection); Methods onProgress() The onProgress() method is called periodically while an sqlite operation is ongoing. This allows you to monitor the progress and possibly display status information to the user. boolean onProgress( in mozIStorageConnection aConnection ); Parameters <tt>aConnection</tt> A mozIStorageConnection connection indicating the connection for which the callback was...
mozIStorageResultSet
mozIStorageRow getNextRow(); Parameters None. ...
mozIStorageRow
The mozIStorageRow interface represents a row in the result set from a storage database query. storage/public/mozIStorageRow.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: mozIStorageValueArray Method overview nsIVariant getResultByIndex(in unsigned long aIndex); nsIVariant getResultByName(in AUTF8String aName); Methods getResultByIndex() Returns the value from a specific column in the row, using a zero-based index to identify the column. nsIVariant getResultByIndex( in unsigned long aIndex ); Parameters aIndex The zero-based index of the column number whose value is to be returned. Return value An nsIVariant object containing...
mozIStorageStatementCallback
The mozIStorageStatementCallback interface represents a callback handler that the Storage API calls with result, error, and completion notifications while handling asynchronous database queries. storage/public/mozIStorageStatementCallback.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Method overview void handleCompletion(in unsigned short aReason); void handleError(in mozIStorageError aError); void handleResult(in mozIStorageResultSet aResultSet); Constants Constant Value Description REASON_FINISHED 0 The statement has finished executing normally. REASON_CANCELED 1 The statement stopped executing bec...
mozIStorageStatementWrapper
iptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc. Firefox 3.5 note Firefox 3.5 adds support for these features directly into the mozIStorageStatement interface, so this interface is essentially deprecated. storage/public/mozIStorageStatementWrapper.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 initialize(in mozIStorageStatement aStatement); void reset(); boolean step(); void execute(); Attributes Attribute Type Description statement mozIStorageStatement The statement that is wrapped. row mozIStorageState...
mozIStorageValueArray
The mozIStorageValueArray interface obtains provides methods to obtain data from a given result. For an introduction on how to use this interface, see the Storage overview document. storage/public/mozIStorageValueArray.idlScriptable Please add a summary to this article. ...
mozITXTToHTMLConv
The mozITXTToHTMLConv interface is used to convert text into HTML format. Its primary use is in converting user-entered text into properly-formatted HTML. netwerk/streamconv/public/mozITXTToHTMLConv.idlScriptable Please add a summary to this article. ...
mozIThirdPartyUtil
netwerk/base/public/mozIThirdPartyUtil.idlScriptable Utility functions for determining whether a given URI, channel, or window hierarchy is third party with respect to a known URI. 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 isThirdPartyChannel(in nsIChannel aChannel, [optional] in nsIURI aURI); boolean isThirdPartyURI(in nsIURI aFirstURI, in nsIURI aSecondURI); boolean isThirdPartyWindow(in nsIDOMWindow aWindow, [optional] in nsIURI aURI); Methods isThirdPartyChannel() Determine whether the given channel and its content window hierarchy is third party. This is done as follows: If aChannel is an nsIHttpChannel and has the 'forceAllowThirdPartyC...
mozIVisitInfo
This may be null. sessionId long Read only: The sessionId of this visit. transitionType long Read only: The transition type used to get to this visit. One of the nsINavBookmarksService.Constants on nsINavHistory. ...
mozIVisitStatusCallback
toolkit/components/places/mozIAsyncHistory.idlScriptable This interface provides callback handling functionality for mozIAsyncHistory.isURIVisited 1.0 66 Introduced Gecko 11.0 Inherits from: nsISupports Last changed in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Method overview void isVisited(in nsIURI aURI, in boolean aVisitedStatus); Methods isVisited() Called when the mozIAsyncHistory.isURIVisited() method's check to determine whether a given URI has been visited has completed. Implement this method to determine the results of the request. void isVisited( in nsIURI aURI, in boolean aVisitedStatus ); Parameters aURI The URI that was checked to see if it's been visited. aVisitedStatus true if the specified ...
nsIAboutModule
netwerk/protocol/about/nsIAboutModule.idlScriptable This interface is implemented to add an 'about:' page. The contract id ends with a parameter that corresponds to the name of the about page. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview unsigned long getURIFlags(in nsIURI aURI); nsIChannel newChannel(in nsIURI aURI); Constants Constant Value Description URI_SAFE_FOR_UNTRUSTED_CONTENT (1 << 0) A flag that indicates whether a URI is safe for untrusted content. If it is, web pages and so forth will be allowed to link to this about: URI. Otherwise, only chrome will be able to link to it. ALLOW_SCRIPT (1 << 1) A flag that indicates whether scri...
nsIAbstractWorker
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface is an abstract interface used to implement the web workers architecture. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMEventTarget Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Attributes Attribute Type Description onerror nsIDOMEventListener The error listener for the worker. See also Using web workers nsIWorkerMessagePort nsIWorkerMessageEvent nsIWorkerScope nsIWorkerGlobalScope nsIWorker ...
nsIAccelerometerUpdate
xpcom/system/nsIAccelerometer.idlNot scriptable Replaced by nsIDeviceMotionUpdate 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 6.0 Inherits from: nsIAccelerometer Last changed in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2) This method is only used in content tabs to receive nsIAcceleration data from the chrome process. Method overview void accelerationChanged(in double x, in double y, in double z); Methods accelerationChanged() void accelerationChanged( in double x, in double y, in double z ); Parameters x y z The coordinates of the nsIAcceleration data. ...
nsIAccessibilityService
accessible/public/nsIAccessibilityService.idlScriptable Please add a summary to this article. ...
nsIAccessibleCaretMoveEvent
accessible/public/nsIAccessibleEvent.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Attributes Attribute Type Description caretOffset long Return caret offset. Read only. ...
nsIAccessibleEditableText
ble An interface for editing text of an accessible object. The operations it supports includes setting text attributes and text contents while also replacing old text of an object with new text. It also includes and support basic operations such as, inserting text, copying text, cutting text, pasting text and deleting text at the specified position. ...
nsIAccessibleRole
ROLE_TITLEBAR 1 Represents a title or caption bar for a window. It is used by MSAA only, supported automatically by MS Windows. ROLE_MENUBAR 2 Represents the menu bar (positioned beneath the title bar of a window) from which menus are selected by the user. The role is used by xul:menubar or role="menubar". ...
nsIAccessibleSelectable
accessible/public/nsIAccessibleSelectable.idlScriptable An interface for the accessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void addChildToSelection(in long index); void clearSelection(); nsIArray GetSelectedChildren(); boolean isChildSelected(in long index); nsIAccessible refSelection(in long index); void removeChildFromSelection(in long index); boolean selectAllSelection(); Attributes Attribute Type Description selectionCount long The number of accessible children currently selected. Read only. Constants Constant Value Description eSelection_Add 0 eSelection_Remove 1 eSelection_GetState ...
nsIAccessibleTableCell
The result differs from 1 if the specified cell spans multiple columns. Read only. columnHeaderCells nsIArray Return an array of column header cells for this cell. Read only. columnIndex long Return column index of this cell. Read only. ...
nsIAccessibleTableChangeEvent
accessible/public/nsIAccessibleEvent.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Attributes Attribute Type Description numRowsOrCols long Return the number of rows or cols. Read only. rowOrColIndex long Return the row or column index. Read only. ...
nsIAccessibleWin32Object
accessible/public/msaa/nsIAccessibleWin32Object.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Attributes Attribute Type Description hwnd voidPtr Handle to the external window implementing IAccessible. Read only. Native code only! ...
nsIAnnotationObserver
toolkit/components/places/public/nsIAnnotationService.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void onItemAnnotationRemoved(in long long aItemId, in AUTF8String aName); void onItemAnnotationSet(in long long aItemId, in AUTF8String aName); void onPageAnnotationRemoved(in nsIURI aURI, in AUTF8String aName); void onPageAnnotationSet(in nsIURI aPage, in AUTF8String aName); Methods onItemAnnotationRemoved() This method is called when an annotation is deleted for an item. If aName is empty, then ALL annotations for the given item have been deleted. This is not called when annotations are expired (normally happens when the applicati...
nsIAnnotationService
toolkit/components/places/public/nsIAnnotationService.idlScriptable Stores arbitrary data about a web page. Supported for use from trusted code, such as extensions, but not from web content. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: "@mozilla.org/browser/annotation-service;1". To use this service, use: var annotationService = Components.classes["@mozilla.org/browser/annotation-service;1"] .getService(Components.interfaces.nsIAnnotationService); Note: The annotation service is not thread-safe. You should only use it from the main thread. Method overview void setPageAnnotation(in nsIURI aURI, in AUTF8String aName, in ...
nsIAppStartup_MOZILLA_2_0
toolkit/components/startup/public/nsIAppStartup.idlScriptable This lets you get information about the times at which key application startup events occurred. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 4.0 this Interface was merged into the nsIAppStartup interface. ...
nsIApplicationCacheChannel
netwerk/base/public/nsIApplicationCacheChannel.idlScriptable This interface is implemented by communication channels that support application caches. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIApplicationCacheContainer Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void markOfflineCacheEntryAsForeign(); Attributes Attribute Type Description chooseApplicationCache boolean When true, the channel will choose an application cache if one was not explicitly provided and none is available from the notification callbacks. The default value is false. This attribute will not be transferred through a redirect. Exceptions thrown NS_ERROR_ALREADY_OPENED If set after calling AsyncOpen() on the channel. inh...
nsIApplicationCacheContainer
netwerk/base/public/nsIApplicationCacheContainer.idlScriptable This interface is used by objects that can be associated with an application cache. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Attributes Attribute Type Description applicationCache nsIApplicationCache The application cache with which the object is associated. See also Offline resources in Firefox nsIApplicationCache nsIApplicationCacheChannel nsIApplicationCacheService nsIApplicationCacheNamespace nsIDOMOfflineResourceList ...
nsIArray
Provides basic functionality for retrieving elements at a specific position, searching for elements. Indexes are zero-based, such that the last element in the array is stored at the index length-1. For an array which can be modified, see nsIMutableArray. Neither interface makes any attempt to protect the individual elements from modification. The convention is that the elements of the array should not be modified. ...
nsIAsyncInputStream
The caller must then wait for the stream to have some data to read. If the stream implements nsIAsyncInputStream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the AsyncWait() method). While this interface is almost exclusively used with non-blocking streams, it is not necessary that nsIInputStream.isNonBlocking() return true. ...
nsIAsyncOutputStream
The caller must then wait for the stream to become writable. If the stream implements nsIAsyncOutputStream, then the caller can use this interface to request an asynchronous notification when the stream becomes writable or closed (via the AsyncWait() method). While this interface is almost exclusively used with non-blocking streams, it is not necessary that nsIOutputStream.isNonBlocking() return true. ...
nsIAsyncStreamCopier
netwerk/base/public/nsIAsyncStreamCopier.idlScriptable This interface is used to copy the contents of one stream to another. Inherits from: nsIRequest Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void asyncCopy(in nsIRequestObserver aObserver, in nsISupports aObserverContext); void init(in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in boolean aSourceBuffered, in boolean aSinkBuffered, in unsigned long aChunkSize, in boolean aCloseSource, in boolean aCloseSink); Methods asyncCopy() Starts the copy operation. The specified observer is notified when the copy completes. void asyncCopy( in nsIRequestObserver aObserver, in nsISupports aObserverContext ); Parameters aObserver Receives notificatio...
nsIAsyncVerifyRedirectCallback
netwerk/base/public/nsIAsyncVerifyRedirectCallback.idlScriptable Implement this interface to receive a callback that lets you know whether an asynchronous redirect was verified or vetoed. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface implements the callbacks passed to the nsIChannelEventSink.asyncOnChannelRedirect() method. Method overview void onRedirectVerifyCallback(in nsresult result); Methods onRedirectVerifyCallback() Implements the asynchronous callback passed to nsIChannelEventSink.asyncOnChannelRedirect(). The result of the redirect decision is passed through this callback. void onRedirectVerifyCallback( in nsresult result ); Parame...
nsIAuthModule
netwerk/base/public/nsIAuthModule.idlScriptable This interface is intended to be used as server and client authentication service. ...
nsIAuthPrompt
netwerk/base/public/nsIAuthPrompt.idlScriptable This interface allows the networking layer to pose a user/password prompt to obtain the values needed for authentication. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is implemented by @mozilla.org/login-manager/prompter;1. To create an instance, use: var authPrompt = Components.classes["@mozilla.org/login-manager/prompter;1"] .createInstance(Components.interfaces.nsIAuthPrompt); Method overview boolean prompt(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, in wstring defaultText, out wstring result); boolean promptPassword(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, ...
nsIAuthPromptAdapterFactory
netwerk/base/public/nsIAuthPromptAdapterFactory.idlScriptable An interface for wrapping nsIAuthPrompt interfaces to make them usable via an nsIAuthPrompt2 interface. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview nsIAuthPrompt2 createAdapter(in nsIAuthPrompt aPrompt); Methods createAdapter() Wrap an object implementing nsIAuthPrompt so that it's usable via nsIAuthPrompt2. nsIAuthPrompt2 createAdapter( in nsIAuthPrompt aPrompt ); Parameters aPrompt The nsIAuthPrompt to wrap. Return value An nsIAuthPrompt2. See also nsIAuthPrompt nsIAuthPrompt2 ...
nsIAuthPromptProvider
PROMPT_PROXY 1 Proxy authentication request. Methods getAuthPrompt() This method requests a prompt interface for the given prompt reason. ...
nsIAuthPromptWrapper
The nsIAuthPromptWrapper interface is an override of nsIAuthPrompt which performs some action on the data going through nsIAuthPrompt methods. Persisting data from the prompts and using it to pre-fill subsequent prompts would be one such action. embedding/components/windowwatcher/public/nsIAuthPromptWrapper.idlScriptable Please add a summary to this article. Last changed in Gecko 1.7 Inherits from: nsIAuthPrompt Method overview void setPromptDialogs(in nsIPrompt dialogs); Methods setPromptDialogs() This method sets a prompt dialog using the given dialog implementation which will be used to display the prompts. void setPromptDialogs( in nsIPrompt dialogs ); Parameters dialogs The dialog implementation which will be used to display the prompts. See also nsIPrompt nsI...
nsIAutoCompleteInput
toolkit/components/autocomplete/public/nsIAutoCompleteInput.idlScriptable This interface monitors the input in a text field and displays an autocomplete panel at the appropriate time. ...
nsIAutoCompleteItem
comment wstring An extra comment that will be displayed next to the value but that will not be part of the value itself. ...
nsIAutoCompleteListener
xpfe/components/autocomplete/public/nsIAutoCompleteListener.idlScriptable This interface is deprecated. It only exists for legacy LDAP autocomplete session support. New code should use toolkit autocomplete interfaces. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void onAutoComplete(in nsIAutoCompleteResults result, in AutoCompleteStatus status); void onStatus(in wstring statusText); Attributes Attribute Type Description param nsISupports Private parameter used by the autocomplete widget. Methods onAutoComplete() Called by the autocomplete session when the search is done or over. As of Gecko 1.9.1, can also be called with partial results, in a similar manner to the toolkit autocomplete interface. void onAutoComplete( in nsIAutoCompleteRes...
nsIAutoCompleteObserver
toolkit/components/autocomplete/public/nsIAutoCompleteSearch.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void onSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result); void onUpdateSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result); Methods onSearchResult() Called when a search is complete and the results are ready. void onSearchResult( in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result ); Parameters search The search object that processed this search. result The search result object. onUpdateSearchResult() Called to update with new results. void onUpdateSearchResult( in nsIAu...
nsIAutoCompleteResult
toolkit/components/autocomplete/nsIAutoCompleteResult.idlScriptable This interface is implemented by results of autocomplete search. Inherits from: nsISupports Last changed in Gecko 1.7 See nsIAutoCompleteSearch ...
nsIAutoCompleteSearch
Results can be sent to the listener either synchronously or asynchronously, depending on the implementation. ...
nsIBadCertListener2
security/manager/ssl/public/nsIBadCertListener2.idlScriptable This interface is used to is report a broken SSL status. It can also be used to obtain the SSL handshake status of a connection that will be canceled because of improper certificate status. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Replaces the obsolete nsIBadCertListener interface. Method overview boolean notifyCertProblem(in nsIInterfaceRequestor socketInfo, in nsISSLStatus status, in AUTF8String targetSite); Methods notifyCertProblem() Called in case of a broken ssl status. boolean notifyCertProblem( in nsIInterfaceRequestor socketInfo, in nsISSLStatus status, in AUTF8String targetSite ); Parameters socketInfo A network communication...
nsIBinaryInputStream
ve data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsIBinaryOutputStream. This might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms. ...
nsIBinaryOutputStream
nary, untagged, fixed-endianness format. This might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. Output is written in big-endian order (high-order byte first), as this is traditional network order. ...
nsIBlocklistPrompt
xpcom/system/nsIBlocklistService.idlScriptable This interface is used, if available, by the default implementation of nsIBlocklistService to display a confirmation user interface to the user before blocking extensions or plugins. 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 prompt([array, size_is(aCount)] in nsIVariant aAddons, [optional] in PRUint32 aCount); Methods prompt() Prompt the user about newly blocked addons. The prompt is then responsible for soft-blocking any addons that need to be afterwards. void prompt( [array, size_is(aCount)] in nsIVariant aAddons, in PRUint32 aCount Optional ); Parameters aAddons An array of addon...
nsIBrowserBoxObject
layout/xul/base/public/nsIBrowserBoxObject.idlScriptable Please add a summary to this article. Inherits from: nsIContainerBoxObject Last changed in Gecko 1.9 (Firefox 3) The boxObject belonging to a XUL browser element implements this interface. Note: Please consider using nsIContainerBoxObject instead. Attributes Attribute Type Description docShell nsIDocShell Read only. Obsolete since Gecko 1.9 The nsIDocShell object that manages the contained document. The browser.xml binding uses this property to gain access to the webNavigation, contentDocument, contentWindow, webBrowserFind, webProgress and sessionHistory properties. ...
nsIBrowserSearchService
netwerk/base/public/nsIBrowserSearchService.idlScriptable Please add a summary to this article. 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/browser/search-service;1. To access this service, use: var browserSearchService = Components.classes["@mozilla.org/browser/search-service;1"] .getService(Components.interfaces.nsIBrowserSearchService); Attempting to use any method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization. This is not an issue if your code is executed in reaction to a user interaction, as initialization is complete by ...
nsICRLInfo
Read only. lastUpdate PRTime The time this CRL was created at. Read only. lastUpdateLocale AString lastUpdate formatted as a human readable string formatted according to the environment locale. Read only. nameInDb AString The key identifying the CRL in the database. Read only. ...
nsICRLManager
security/manager/ssl/public/nsICRLManager.idlScriptable Please add a summary to this article. ...
nsICache
ACCESS_READ 1 ACCESS REQUESTED - I only want to READ, if there isn't an entry just fail. ACCESS GRANTED - You can READ from this descriptor. ...
nsICacheDeviceInfo
Read only. entryCount unsigned long Get the number of stored cache entries. Read only. maximumSize unsigned long Get the upper limit of the size of the data the cache can store. Read only. totalSize unsigned long Get the total size of the stored cache entries. Read only. ...
nsICacheEntryDescriptor
netwerk/cache/nsICacheEntryDescriptor.idlScriptable This interface provides a cache entry descriptor. ...
nsICacheEntryInfo
Read only. dataSize unsigned long Get the cache entry data size. Read only. deviceID string Get the id for the device that stores this cache entry. Read only. expirationTime PRUint32 Get the expiration time of the cache entry (in seconds since the Epoch). Read only. ...
nsICacheListener
The status parameter equals NS_OK on success. See nsICacheService for accessGranted values. ...
nsICacheMetaDataVisitor
boolean visitMetaDataElement( in string key, in string value ); Parameters key The key for visiting the meta data for a cache entry. ...
nsICacheSession
netwerk/cache/public/nsICacheSession.idlScriptable Handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies. ...
nsICacheVisitor
boolean visitDevice( in string deviceID, in nsICacheDeviceInfo deviceInfo ); Parameters deviceID Specifies the device being visited. deviceInfo Specifies information about this device. ...
nsICancelable
netwerk/base/public/nsICancelable.idlScriptable This interface provides a means to cancel an operation that is in progress. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void cancel(in nsresult aReason); Methods cancel() Call this method to request that this object abort whatever operation it may be performing. void cancel( in nsresult aReason ); Parameters aReason A failure code indicating why the operation is being canceled. It is an error to pass a success code. ...
nsICharsetResolver
void notifyResolvedCharset( in ACString charset, in nsISupports closure ); Parameters charset The detected charset. ...
nsIChromeFrameMessageManager
content/base/public/nsIMessageManager.idlScriptable Handles loading of content in a remote chrome frame. 1.0 66 Introduced Gecko 2.0 Inherits from: nsIFrameMessageManager Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void loadFrameScript(in AString aURL, in boolean aAllowDelayedLoad); void removeDelayedFrameScript(in AString aURL); Methods loadFrameScript() Loads a script into the remote frame. void loadFrameScript( in AString aURL, in boolean aAllowDelayedLoad ); Parameters aURL The URL of the script to load into the frame; this must be an absolute URL, but data: URLs are supported. aAllowDelayedLoad If true, the script will be loaded when the r...
nsIClipboardCommands
webshell/public/nsIClipboardCommands.idlScriptable An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface. ...
nsIClipboardDragDropHookList
widget/public/nsIClipboardDragDropHookList.idlScriptable This interface is an internal Gecko component. It provides basic operations such as adding, removing and enumerating clipboard hooks for the nsIClipboardDragDropHooks interface. Inherits from: nsISupports Last changed in Gecko 1.7 Note: This interface is not intended for direct use by embedders; it is an implementation detail. You should access these capabilities indirectly by sending commands using the nsIClipboardDragDropHooks interface. Within Gecko, this interface is used by calling get_Interface on a docshell. Method overview void addClipboardDragDropHooks(in nsIClipboardDragDropHooks aHooks); nsISimpleEnumerator getHookEnumerator(); void removeClipboardDragDropHooks(in nsIClipboardDragDro...
nsIClipboardHelper
void copyString( in AString aString ); Parameters aString The string to copy to the clipboard. ...
nsIClipboardOwner
The nsIClipboardOwner interface notifies the clipboard owner about the current status of ownership of the clipboard transferable at given situation and time. widget/public/nsIClipboardOwner.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 LosingOwnership(in nsITransferable aTransferable); Methods LosingOwnership() This method notifies the owner of the clipboard transferable that the transferable is being removed from the clipboard. It results into a NS_Ok if there are no errors. void LosingOwnership( in nsITransferable aTransferable ); Parameters aTransferable The transferable. See also nsIClipboard nsITransferable ...
nsICollection
xpcom/ds/nsICollection.idlScriptable This interface represents a list of nsISupports items. It provides basic operations on those items like: getting, setting, appending, removing, and so on. Inherits from: nsISerializable Last changed in Gecko 1.7 Method overview void AppendElement(in nsISupports item); void Clear(); PRUint32 Count(); nsIEnumerator Enumerate(); nsISupports GetElementAt(in PRUint32 index); void QueryElementAt(in PRUint32 index, in nsIIDRef uuid, [iid_is(uuid),retval] out nsQIResult result); void RemoveElement(in nsISupports item); void SetElementAt(in PRUint32 index, in nsISupports item); Methods AppendElement() Appends a new item to the collection. void AppendElement( in nsISupports...
nsICommandController
content/xul/document/public/nsIController.idlScriptable An enhanced controller interface that supports passing parameters to commands. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/embedcomp/base-command-controller;1. To create an instance, use: var commandController = Components.classes["@mozilla.org/embedcomp/base-command-controller;1"] .createInstance(Components.interfaces.nsICommandController); Method overview void doCommandWithParams(in string command, in nsICommandParams aCommandParams); void getCommandStateWithParams( in string command, in nsICommandParams aCommandParams); Methods doCommandWithParams() Executes the specified command with a set of parameters contained in an nsICo...
nsICommandLine
toolkit/components/commandlines/public/nsICommandLine.idlScriptable Represents the command line used to invoke a XUL application. This may be the original command line of this instance or a command line provided remotely by another instance of the application. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Components may implement the nsICommandLineHandler interface to add custom command line handling behavior. Definitions arguments Any values found on the command line. switches Flags. In normalized form, these are preceded by a single dash. Some flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". Method overview long findFlag(in AString aFlag, i...
nsICommandLineRunner
The nsICommandLineRunner is an extension of nsICommandLine used to initialize command lines and run them by processing the comand line handlers. toolkit/components/commandlines/public/nsICommandLineRunner.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: nsICommandLine Method overview void init(in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state); void run(); void setWindowContext(in nsIDOMWindow aWindow); Attributes Attribute Type Description helpText AUTF8String Process and combine the help text provided by each command-line handler. Read only. Methods init() Called with the argc/argv combination passed to main. It assumes a native character se...
nsIConsoleListener
xpcom/base/nsIConsoleListener.idlScriptable This interface allows you to listen for messages sent to the console. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void observe(in nsIConsoleMessage aMessage); Methods observe() Called by the nsIConsoleService when a message is posted to the console. Listeners must first be attached to the service using nsIConsoleService.registerListener() void observe( in nsIConsoleMessage aMessage ); Parameters aMessage The nsIConsoleMessage being posted. ...
nsIConsoleMessage
See nsIScriptError for an example. ...
nsIContentPrefCallback2
dom/interfaces/base/nsIContentPrefService2.idlScriptable Callback used by nsIContentPrefService2 methods 1.0 66 Introduced Gecko 20.0 Inherits from: nsISupports Last changed in Gecko 20.0 (Firefox 20.0 / Thunderbird 20.0 / SeaMonkey 2.17) Method overview void handleCompletion(in unsigned short reason); void handleError(in nsresult error); void handleResult(in nsIContentPref pref); Constants Constant Value Description COMPLETE_OK 0 COMPLETE_ERROR 1 Methods handleCompletion() Called when the method finishes. This will be called exactly once for each method invocation, and afterward no other callback methods will be called. void handleCompletion( in unsigned short reason ); ...
nsIContentPrefObserver
dom/interfaces/base/nsIContentPrefService.idlScriptable This interface allows code to easily watch for changes to the values of content preferences. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void onContentPrefRemoved(in AString aGroup, in AString aName); void onContentPrefSet(in AString aGroup, in AString aName, in nsIVariant aValue); Methods onContentPrefRemoved() Called when a content preference is removed. void onContentPrefRemoved( in AString aGroup, in AString aName ); Parameters aGroup The group to which the removed preference belonged; this may be the URI of a web site. This value is null if the preference was global, applying to all web sites. aNa...
nsIContentSniffer
See netwerk/build/nsNetCID.h about NS_CONTENT_SNIFFER_CATEGORY. ...
nsIContentViewManager
See Getting access to content views for details. Once you have the view manager, you can call getContentViewsIn() to get a list of the content views for a given portion of the browser display, then use those nsIContentView objects to manipulate the content views. ...
nsIController
void doCommand( in string command ); Parameters command The name of the command to execute. ...
nsIConverterInputStream
xpcom/io/nsIConverterInputStream.idlScriptable A unichar input stream that wraps an input stream. This allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding. 1.0 66 Introduced Gecko 1.8 Inherits from: nsIUnicharInputStream Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: @mozilla.org/intl/converter-input-stream;1. To create an instance, use: var converterInputStream = Components.classes["@mozilla.org/intl/converter-input-stream;1"] .createInstance(Components.interfaces.nsIConverterInputStream); Method overview void init(in nsIInputStream aStream, in string aCharset, in long aBufferSize, in PRUnichar aReplacementChar); Constant...
nsIConverterOutputStream
xpcom/io/nsIConverterOutputStream.idlScriptable This interface allows writing strings to a stream, doing automatic character encoding conversion. 1.0 66 Introduced Gecko 1.8 Inherits from: nsIUnicharOutputStream Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: @mozilla.org/intl/converter-output-stream;1. To create an instance, use: var converterOutputStream = Components.classes["@mozilla.org/intl/converter-output-stream;1"] .createInstance(Components.interfaces.nsIConverterOutputStream); Method overview void init(in nsIOutputStream aOutStream, in string aCharset, in unsigned long aBufferSize, in PRUnichar aReplacementCharacter); Methods init() Initialize this stream. Must be called befo...
nsICookie
expires = 0 represents a session cookie. expires = 1 represents an expiration time earlier than Jan 1, 1970. Read only. host AUTF8String The host (possibly fully qualified) of the cookie. Read only. ...
nsICookie2
Read only. expiry PRInt64 The actual expiry time of the cookie, in seconds since midnight (00:00:00), January 1, 1970 UTC. ...
nsICookieAcceptDialog
REMEMBER_DECISION 1 Value for remembering a decision. ...
nsICookieConsent
the policy for the given URI and channel is also returned. nsCookieStatus getConsent( in nsIURI uri, in nsIHttpChannel httpChannel, in boolean isForeign, out nsCookiePolicy policy ); Parameters uri The URI to find the policy for. httpChannel The channel to extract the p3p headers from. ...
nsICookieManager
An optional interface for accessing or removing the cookies that are in the cookie list. netwerk/cookie/nsICookieManager.idlScriptable Please add a summary to this article. Last changed in Gecko 1.7 Inherits from: nsISupports This interface is intended to be used as a service. It is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via Services.cookies Method overview void remove(in AUTF8String aHost, in ACString aName, in AUTF8String aPath, in boolean aBlocked, in jsval aOriginAttributes); void removeAll(); Attributes Attribute Type Description enumerator nsISimpleEnumerator Called to enumerate through each cookie in the cookie list. The objects enumerated over are of type...
nsICookiePromptService
The nsICookiePromptService interface is to open a dialog to ask to permission to accept the cookie. extensions/cookie/nsICookiePromptService.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview long cookieDialog(in nsIDOMWindow parent, in nsICookie cookie, in ACString hostname, in long cookiesFromHost, in boolean changingCookie, out boolean rememberDecision); Constants Constant Value Description DENY_COOKIE 0 Holds the value for a denying the cookie. ACCEPT_COOKIE 1 Holds the value for accepting the cookie. ACCEPT_SESSION_COOKIE 2 Holds the value for accepting the session cookie. Methods cookieDialog() Opens a dialog that asks for permission to accept a cookie. long cookieDialog( ...
nsICookieService
This separation of interface is mainly historical. ...
nsICookieStorage
Obsolete since Gecko 2 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. This interface represents the storage repository for cookies. modules/plugin/base/public/nsICookieStorage.idlNot scriptable Please add a summary to this article. Last changed in Gecko 1.7 Inherits from: nsISupports Method overview void getCookie(in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); void setCookie(in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); Methods getCookie() Retrieves a cookie from the browser's persistent cookie store. void getCookie( in string aCookieURL, in...
nsICrashReporter
xpcom/system/nsICrashReporter.idlScriptable Provides access to crash reporting functionality. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void annotateCrashReport(in ACString key, in ACString data); void appendAppNotesToCrashReport(in ACString data); void appendObjCExceptionInfoToAppNotes(in voidPtr aException); Native code only! void writeMinidumpForException(in voidPtr aExceptionInfo); Native code only! Attributes Attribute Type Description enabled boolean Enable or disable the crashreporter at runtime. minidumpPath nsILocalFile Get or set the path on the local system to which minidumps will be written when a crash happens. Exception...
nsICryptoHMAC
netwerk/base/public/nsICryptoHMAC.idlScriptable This interface provides HMAC signature algorithms. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview ACString finish(in PRBool aASCII); void init(in unsigned long aAlgorithm, in nsIKeyObject aKeyObject); void reset(); void update([const, array, size_is(aLen)] in octet aData, in unsigned long aLen); void updateFromStream(in nsIInputStream aStream, in unsigned long aLen); Constants Hashing Algorithms. These values are to be used by the init() method to indicate which hashing function to use. These values map onto the values defined in mozilla/security/nss/lib/softoken/pkcs11t.h and are switched to CKM_*_HMAC...
nsICurrentCharsetListener
intl/uconv/idl/nsICurrentCharsetListener.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/intl/currentcharsetlistener;1. To create an instance, use: var currentCharsetListener = Components.classes["@mozilla.org/intl/currentcharsetlistener;1"] .createInstance(Components.interfaces.nsICurrentCharsetListener); Method overview void SetCurrentCharset(in wstring charset); void SetCurrentComposerCharset(in wstring charset); void SetCurrentMailCharset(in wstring charset); Methods SetCurrentCharset() void SetCurrentCharset( in wstring charset ); Parameters charset SetCurrentComposerCharset() void SetCurrentComposerCharset( in wstring charset ); Parameters ...
nsICycleCollectorListener
xpcom/base/nsICycleCollectorListener.idlScriptable Interface to pass to the cycle collector to get information about the cycle collector graph while it is being built. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The order of calls will be call to begin(); then for every node in the graph a call to noteObject() and calls to noteEdge() for every edge starting at that node; then a call to beginDescriptions(); then for every black node in the cycle collector graph a call to either describeRefcountedObject() or to describeGCedObject(); and then a call to end(). If begin() returns an error none of the other functions will be called. Method overview void begin(); void beginDescript...
nsIDNSListener
void onLookupComplete( in nsICancelable aRequest, in nsIDNSRecord aRecord, in nsresult aStatus ); Parameters aRequest The value returned from asyncResolve. aRecord The DNS record corresponding to the hostname that was resolved. ...
nsIDNSRecord
netwerk/dns/nsIDNSRecord.idlScriptable This interface represents the result of a DNS lookup. Since a DNS query may return more than one resolved IP address, the record acts like an enumerator, allowing the caller to easily step through the list of IP addresses. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview PRNetAddr getNextAddr(in PRUint16 aPort); Native code only! ACString getNextAddrAsString(); boolean hasMore(); void rewind(); Attributes Attribute Type Description canonicalName ACString for example, www.mozilla.org --> rheet.mozilla.org. Read only. Methods Native code only!getNextAddr This function copies the value of the next IP address into the given PRNetAddr struct and increments the internal address iterator. PRNetAddr getNextAd...
nsIDNSRequest
netwerk/dns/nsIDNSRequest.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void cancel(); Methods cancel() Called to cancel a pending asynchronous DNS request. The listener will passed to asyncResolve will be notified immediately with a status code of NS_ERROR_ABORT. void cancel(); Parameters None. ...
nsIDOMClientRect
dom/interfaces/base/nsIDOMClientRect.idlScriptable Represents a rectangular box. The type of box is specified by the method that returns such an object. It is returned by functions like element.getBoundingClientRect. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Attributes Attribute Type Description bottom float Y-coordinate, relative to the viewport origin, of the bottom of the rectangle box. Read only. height float Height of the rectangle box (This is identical to bottom minus top). Read only. left float X-coordinate, relative to the viewport origin, of the left of the rectangle box. Read only. right ...
nsIDOMElement
dom/interfaces/core/nsIDOMElement.idlScriptable This interface represents an element in an HTML or XML document. ...
nsIDOMEventGroup
dom/interfaces/events/nsIDOMEventGroup.idlScriptable This interface is the interface implemented by all event targets in the Document Object Model. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview boolean isSameEventGroup(in nsIDOMEventGroup other); Methods isSameEventGroup() Reports whether or not another event group is the same as this one. boolean isSameEventGroup( in nsIDOMEventGroup other ); Parameters other Instance of nsIDOMEventGroup object to compare against. Return value Returns true if the two objects are the same, otherwise false. See also Document Object Model (DOM) Level 3 Events Specification ...
nsIDOMEventTarget
...
nsIDOMFileError
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The nsIDOMFileError interface describes errors that occur while using the DOM File API. ...
nsIDOMFileException
The nsIDOMFileException interface represents exceptions that can be raised by calls to the methods in the nsIDOMFile interface. Note: Gecko's implementation of this interface presently differs from the working draft of the File API specification. content/base/public/nsIDOMFileException.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Attributes Attribute Type Description code unsigned short The error code describing the error condition that took place; see the constants list for details. Constants Constant Value Description NOT_FOUND_ERR 0 The specified file wasn't found. NOT_READABLE_ERR 1 The specified file wasn't readable. See also nsIDOM...
nsIDOMFileList
The nsIDOMFileList interface contains a list of nsIDOMFile objects describing the files selected by the user for a "file" input field on a web form. Gecko 1.9.2 note Starting in Gecko 1.9.2, this is also used by the DataTransfer object to support dragging and dropping files into web applications. This interface implements the DOM FileList object. Please see that documentation for details. See also FileList DataTransfer Drag and Drop ...
nsIDOMFileReader
The nsIDOMFileReader interface provides a way to read data from a file specified by an nsIDOMFile. content/base/public/nsIDOMFileReader.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports Implemented by: @mozilla.org/files/filereader;1. To create an instance, use: var FileReader = Components.classes["@mozilla.org/files/filereader;1"].createInstance(Components.interfaces.nsIDOMFileReader); This interface implements the DOM FileReader object; see that documentation for details. Examples OS.File for the main thread - Example - Save Canvas to Disk See also File API Specification Working Draft nsIDOMFile nsIDOMFileList nsIDOMFileException ...
nsIDOMFontFace
It's returned in a list you can get using inIDOMUtils.getUsedFontFaces(). Attributes Font source attributes These attributes indicate how the font was found during the font matching process. Note: The same physical font may have been found in multiple ways within a range. Attribute Type Description fromFontGroup boolean Indicates whether or not the font was located in a font group. ...
nsIDOMGeoPositionCallback
The nsIDOMGeoPositionCallback interface is called when updated position information is available. You need to implement this interface to accept callbacks after using nsIDOMGeolocation.watchPosition(). dom/interfaces/geolocation/NsIDOMGeoPositionCallback.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void handleEvent(in nsIDOMGeoPosition position); Methods handleEvent() Called when new position information is available. void handleEvent( in nsIDOMGeoPosition position ); Parameters position An nsIDOMGeoPosition object indicating the updated location information. ...
nsIDOMGeoPositionCoords
Read only. longitude double The user's current longitude, in degrees. Read only. altitude double The user's current altitude, in meters. ...
nsIDOMGeoPositionError
The nsIDOMGeoPositionError interface represents an error that occurred while performing geolocation operations. dom/interfaces/geolocation/nsIDOMGeoPositionError.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports Attributes Attribute Type Description code short Numerical error code; see Error constants for a complete list. Read only. message DOMString Human readable error message. Read only. Gecko 1.9.2 note The message attribute was removed in Gecko 1.9.2 (Firefox 3.6). Error constants Constant Value Description PERMISSION_DENIED 1 The user denied permission to retrieve location data. POS...
nsIDOMGeoPositionErrorCallback
The nsIDOMGeoPositionErrorCallback interface is used to represent an object that receives callback notifications when geolocation errors occur. dom/interfaces/geolocation/nsIDOMGeoPositionErrorCallback.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void handleEvent(in nsIDOMGeoPositionError position); Methods handleEvent() Called to handle a geolocation error. void handleEvent( in nsIDOMGeoPosition position ); Parameters position The error that occurred, as an nsIDOMGeoPositionError object. ...
nsIDOMGeoPositionOptions
The nsIDOMGeoPositionOptions interface is used to specify options for geolocation operations. dom/interfaces/geolocation/nsIDOMGeoPositionOptions.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Attributes Attribute Type Description enableHighAccuracy boolean If true, high accuracy mode is used. timeout unsigned long Maximum time in milliseconds before giving up on an attempt to retrieve location information. ...
nsIDOMHTMLAudioElement
The nsIDOMHTMLAudioElement interface is used to implement the HTML5 <audio> element. dom/interfaces/html/nsIDOMHTMLAudioElement.idlScriptable Please add a summary to this article. Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Inherits from: nsIDOMHTMLMediaElement Method overview unsigned long long mozCurrentSampleOffset(); void mozSetup(in PRUint32 channels, in PRUint32 rate); [implicit_jscontext] unsigned long mozWriteAudio(in jsval data); Methods mozCurrentSampleOffset() 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 th...
nsIDOMHTMLMediaElement
dom/interfaces/html/nsIDOMHTMLMediaElement.idlScriptable The basis for the nsIDOMHTMLAudioElement and nsIDOMHTMLVideoElement interfaces, which in turn implement the <audio> and <video> HTML5 elements. 1.0 67 Introduced Gecko 1.9.1 Inherits from: nsIDOMHTMLElement Last changed in Gecko 1.1 The nsIDOMHTMLMediaElement interface implements the DOM HTMLMediaElement interface. See that page for details. ...
nsIDOMHTMLSourceElement
It does not specify anything on its own. ...
nsIDOMHTMLTimeRanges
nt interface, and implements the DOM TimeRanges interface. Each time range represented by an nsIDOMHTMLTimeRanges object has an index number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index number of the range to look up. dom/interfaces/html/nsIDOMHTMLTimeRanges.idlScriptable Please add a summary to this article. Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Inherits from: nsISupports Method overview float start(in unsigned long index); float end(in unsigned long index); Attributes Attribute Type Description length unsigned long The number of ranges represented by the nsIDOMHTMLTimeRanges object. Read only. Methods end() Returns the time offset to the end of the specified time ran...
nsIDOMMouseScrollEvent
dom/interfaces/events/nsIDOMMouseScrollEvent.idlScriptable This interface represents a mouse scroll wheel event. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMMouseEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note Prior to Gecko 1.9.2, this inherited from nsISupports instead of from nsIDOMMouseEvent. Method overview void initMouseScrollEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget related...
nsIDOMMozNetworkStats
To create an instance, use: var networkStatsManager = Components.classes["@mozilla.org/networkStats;1"] .createInstance(Components.interfaces.nsIDOMNetworkStats); Attributes Attribute Type Description connectionType DOMString Connection type of the stats. Read only. data nsIDOMMozNetworkStatsData array Stats samples. ...
nsIDOMMozNetworkStatsData
dom/network/interfaces/nsIDOMNetworkStats.idlScriptable Represents a single record in the network statistics database, as reported using the nsIDOMMozNetworkStatsManager interface. 1.0 66 Introduced Gecko 18.0 Inherits from: nsISupports Last changed in Gecko 18.0 (Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15) Attributes Attribute Type Description rxBytes unsigned long The number of bytes received on the connection. Read only. txBytes unsigned long The number of bytes transmitted on the connection. Read only. date Date The date of the sample. Read only. ...
nsIDOMMozNetworkStatsManager
To create an instance, use: var networkStatsManager = Components.classes["@mozilla.org/networkStatsManager;1"] .createInstance(Components.interfaces.nsIDOMNetworkStatsManager); Furthermore, the NetworkStatsManager is published through a mozNetworkStats child object within the navigator object. ...
nsIDOMMozTouchEvent
a raw touch event. This provides a mechanism for working with events from touch screens. This differs from tracking mouse events in that touch events can be generated independently for each finger touching the screen. This lets you process multi-finger touch gestures and actions. dom/interfaces/events/nsIDOMMozTouchEvent.idlScriptable Please add a summary to this article. ...
nsIDOMNavigatorDesktopNotification
dom/interfaces/notification/nsIDOMNavigatorDesktopNotification.idlScriptable Property that extends the navigator object. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Property that extends the navigator object. Attributes Attribute Type Description mozNotification nsIDOMDesktopNotificationCenter Read only. See also nsIDOMDesktopNotificationCenter ...
nsIDOMNode
dom/interfaces/core/nsIDOMNode.idlScriptable This interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview nsIDOMNode appendChild(in nsIDOMNode newChild) nsIDOMNode cloneNode(in boolean deep); boolean hasAttributes(); boolean hasChildNodes(); nsIDOMNode insertBefore(in nsIDOMNode newChild, in nsIDOMNode refChild) boolean isSupported(in DOMString feature, in DOMString version); void normalize(); nsIDOMNode removeChild(in nsIDOMNode oldChild) nsIDOMNode replaceChild(in nsIDOMNode newChild, in nsIDOMNode oldChild) Attributes Attribute Type Description attributes nsIDOMNamedNodeMap Read only. childNodes nsIDOMNodeList Re...
nsIDOMOfflineResourceList
ace provides access to the application cache that allows web content's resources to be cached locally for use while offline. It includes methods for adding resources to and removing resources from the cache, as well as for enumerating the dynamically managed resource list. dom/interfaces/offline/nsIDOMOfflineResourceList.idlScriptable Please add a summary to this article. ...
nsIDOMOrientationEvent
The nsIDOMOrientationEvent interface describes the event that can be delivered to DOM windows, providing information from the device's accelerometer, allowing code to determine the orientation of the device. dom/interfaces/events/nsIDOMOrientationEvent.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsIDOMEvent Method overview void initOrientationEvent(in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg, in double x, in double y, in double z); Attributes Attribute Type Description x double The amount of tilt along the X axis. Read only. y double The amount of tilt along the Y axis. Read only. z double The amount of tilt along...
nsIDOMParser
(This section is only relevant to Firefox extensions--not to Web content.) To create a document, the parser needs to specify a principal (see Security check basics), a base URI (see document.baseURIObject), and a documentURI. These values are automatically determined as defined below, but if you work with DOMParser from privileged code, you can override the defaults by providing arguments to...
nsIDOMSerializer
content/base/public/nsIDOMSerializer.idlScriptable This interface is really a placeholder till the W3C DOM Working Group defines a mechanism for serializing DOM nodes. An instance of this interface can be used to serialize a DOM document or any DOM subtree. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/xmlextras/xmlserializer;1. To create an instance, use: var domSerializer = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"] .createInstance(Components.interfaces.nsIDOMSerializer); Method overview void serializeToStream(in nsIDOMNode root, in nsIOutputStream stream, in AUTF8String charset); AString serializeToString(in nsIDOMNode root); Methods serializeToStream() The subtree rooted by the specified eleme...
nsIDOMStorage
dom/interfaces/storage/nsIDOMStorage.idlScriptable This interface represents the storage space used for session storage in the DOM. Items stored in session storage may be accessed by any interested party in the same browsing context. 1.0 66 Introduced Gecko 1.8.1 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) A DOM window's session storage object can be retrieved from the window's sessionStorage attribute. A storage object stores an arbitrary set of key-value pairs, which may be retrieved, modified and removed as needed. A key may only exist once within a storage object, and only one value may be associated with a particular key. Keys are stored in a particular order with the condition that this order n...
nsIDOMStorage2
e2 interface represents the storage space used for local storage in the DOM. Items stored in local storage may only be accessed by the same origin that created the items in the first place. A DOM window's local storage object can be retrieved from the window's localStorage attribute. dom/public/idl/storage/nsIDOMStorage2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Method overview void clear(); DOMString getItem(in DOMString key); DOMString key(in unsigned long index); void removeItem(in DOMString key); void setItem(in DOMString key, in DOMString data); Attributes Attribute Type Description length unsigned long The number of keys stored in local storage. ...
nsIDOMStorageEventObsolete
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. dom/interfaces/storage/nsIDOMStorageEventObsolete.idlScriptable This interface represents an event that occurs to notify interested parties about changes to the contents of a DOM storage space; it is used for both session storage and local storage. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 2.0 Inherits from: nsIDOMEvent Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) When a DOM storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed. If the...
nsIDOMStorageManager
dom/interfaces/storage/nsIDOMStorageManager.idlScriptable This interface provides methods for managing data stored in the offline apps cache. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by @mozilla.org/dom/storagemanager;1 as a service: var domStorageManager = Components.classes["@mozilla.org/dom/storagemanager;1"] .getService(Components.interfaces.nsIDOMStorageManager); Method overview void clearOfflineApps(); nsIDOMStorage getLocalStorageForPrincipal(in nsIPrincipal aPrincipal, in DOMString aDocumentURI); long getUsage(in AString aOwnerDomain); Methods clearOfflineApps() Clears keys owned by offline applications. All data ow...
nsIDOMStorageWindow
dom/interfaces/storage/nsIDOMStorageWindow.idlScriptable This interface provides access to a DOM window's client side storage objects. All DOM windows inherit from this interface. 1.0 66 Introduced Gecko 1.8.1 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 8.0 this interface has been merged into nsIDOMWindow, and this interface has been removed. Attributes Attribute Type Description globalStorage nsIDOMStorageList Global storage, accessible by domain. Read only. localStorage nsIDOMStorage Local storage for the current browsing context. Data stored in local storage may only be accessed from the same origin that inserte...
nsIDOMWindow2
dom/interfaces/base/nsIDOMWindow2.idlScriptable This interface is the primary interface for a DOM window object. It represents a single window object that may contain child windows if the document in the window contains an HTML frameset document, or if the document contains <iframe> elements. Inherits from: nsIDOMWindow Last changed in Gecko 1.9 (Firefox 3) Because nsIDOMWindow is frozen, this interface was introduced in Firefox 3 (Gecko 1.9) to allow DOM windows to take on new features. DOM windows implement nsIDOMWindow2, which is a subclass of nsIDOMWindow. In Gecko 7.0 this interface has been merged into nsIDOMWindow. Attributes Attribute Type Description applicationCache nsIDOMOfflineResourceList The application cache object for this window. ...
nsIDOMXPathException
Constants Error codes Constant Value Description INVALID_EXPRESSION_ERR 51 An invalid XPath expression was used. TYPE_ERR 52 An attempt was made to reference an unavailable type. ...
nsIDOMXPathExpression
dom/interfaces/xpath/nsIDOMXPathExpression.idlScriptable Represents a compiled XPath query returned from nsIDOMXPathEvaluator.createExpression or document.createExpression Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsISupports evaluate(in nsIDOMNode contextNode, in unsigned short type, in nsISupports result) Methods evaluate() Evaluate the XPath expression. nsISupports evaluate( in nsIDOMNode contextNode, in unsigned short type, in nsISupports result ); Parameters contextNode A DOM node to evaluate the XPath expression against. To evaluate against a whole document, use the document.documentElement method to get the node to evaluate against. type A number that corresponds to one of the type constants of nsIDOMXPathR...
nsIDOMXPathResult
Read only. invalidIteratorState boolean true if the iterator state has become invalid. ...
nsIDOMXULControlElement
dom/interfaces/xul/nsIDOMXULControlElement.idlScriptable Provides additional attributes specific to control elements. 66 Introduced Gecko 1.0 Inherits from: nsIDOMXULElement Last changed in Gecko 1.0 Attributes Attribute Type Description disabled boolean Indicates whether the element is disabled or not. tabIndex long The tab order of the element. ...
nsIDOMXULLabeledControlElement
This should be one of the characters that appears in the label for the element. When the user presses the appropriate modifier and the access key, the element will be focused and/or activated from anywhere in the window. ...
nsIDOMXULSelectControlElement
dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idlScriptable Please add a summary to this article. Inherits from: nsIDOMXULControlElement Last changed in Gecko 1.9 (Firefox 3) Method overview nsIDOMXULSelectControlItemElement appendItem(in DOMString label, in DOMString value); long getIndexOfItem(in nsIDOMXULSelectControlItemElement item); nsIDOMXULSelectControlItemElement getItemAtIndex(in long index); nsIDOMXULSelectControlItemElement insertItemAt(in long index, in DOMString label, in DOMString value); nsIDOMXULSelectControlItemElement removeItemAt(in long index); Attributes Attribute Type Description itemCount unsigned long Read only. selectedIndex long selectedItem nsIDOMXULSelectControlItemElement value DOMString Methods appendItem() nsIDOMXUL...
nsIDOMXULSelectControlItemElement
dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idlScriptable Please add a summary to this article. Inherits from: nsIDOMXULElement Last changed in Gecko 1.7 Attributes Attribute Type Description accessKey DOMString command DOMString control nsIDOMXULSelectControlElement Read only. crop DOMString disabled boolean image DOMString label DOMString selected boolean Read only. value DOMString ...
nsIDataSignatureVerifier
security/manager/ssl/public/nsIDataSignatureVerifier.idlScriptable An interface for verifying that a given string of data was signed by the private key matching the given public key. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview boolean verifyData(in ACString aData, in ACString aSignature, in ACString aPublicKey); Methods verifyData() Verifies that the data matches the data that was used to generate the signature. boolean verifyData( in ACString aData, in ACString aSignature, in ACString aPublicKey ); Parameters aData The data to be tested. aSignature The signature of the data, base64 encoded. aPublicKey The public part of the key used for signing, DER encoded then base64 encoded. Ret...
nsIDebug
xpcom/base/nsIDebug.idlScriptable Provides debugging support for scripted languages, such as JavaScript, Java, Python, Perl, and so forth. Inherits from: nsISupports Last changed in Gecko 1.7 Note: C/C++ consumers who are planning to use the nsIDebug interface with the @mozilla.org/xpcom;1 contract should use NS_DebugBreak() from XPCOM glue instead, or alternatively the NS_ABORT, NS_ASSERTION, NS_BREAK, and NS_WARNING macros, which also call NS_DebugBreak() if used in a debugging build. Method overview void abort(in string aFile, in long aLine); void assertion(in string aStr, in string aExpr, in string aFile, in long aLine); void break(in string aFile, in long aLine); void warning(in string aStr, in string aFile, in long aLine); Methods abort() Requests the process t...
nsIDeviceMotion
xpcom/system/nsIDeviceMotion.idlScriptable This interface is used to implement accelerometer support. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Note: This interface was named nsIDeviceMotion prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3). Method overview void addListener(in nsIDeviceMotionListener aListener); void addWindowListener(in nsIDOMWindow aWindow); Native code only! void removeListener(in nsIDeviceMotionListener aListener); void removeWindowListener(in nsIDOMWindow aWindow); Native code only! Methods addListener() When called, the accelerometer support implementation must begin to notify the specified nsIDeviceMotionListener by...
nsIDeviceMotionListener
xpcom/system/nsIDeviceMotion.idlScriptable This interface can be implemented by clients that want to be notified orientation or acceleration changes on supported devices. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview void onMotionChange(in nsIDeviceMotionData aMotionData); Methods onMotionChange() Called when new orientation or acceleration data is available. void onMotionChange( in nsIDeviceMotionData aMotionData ); Parameters aAcceleration The nsIDeviceMotionData object describing updated motion information. See also MozOrientation nsIDOMOrientationEvent nsIDeviceMotion nsIDeviceMotionData ...
nsIDialogParamBlock
embedding/components/windowwatcher/public/nsIDialogParamBlock.idlScriptable An interface to pass strings, integers and nsISupports to a dialog. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview PRInt32 GetInt( in PRInt32 inIndex ); wstring GetString( in PRInt32 inIndex ); void SetInt( in PRInt32 inIndex, in PRInt32 inInt ); void SetNumberStrings( in PRInt32 inNumStrings ); void SetString( in PRInt32 inIndex, in wstring inString); Attributes Attribute Type Description objects nsIMutableArray A place where you can store an nsIMutableArray to pass nsISupports. Methods GetInt() Get a previously set integer. PRInt32 GetInt( in PRInt32 inIndex ); Parameters inIndex The...
nsIDirIndex
Unspecified for directories. description wstring A description for the filename, which should be displayed by a viewer. ...
nsIDirIndexListener
netwerk/streamconv/public/nsIDirIndexListener.idlScriptable This interface is used to receive contents of directory index listings from a protocol. They can then be transformed into an output format (such as rdf, html and so on) Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void onIndexAvailable(in nsIRequest aRequest, in nsISupports aCtxt, in nsIDirIndex aIndex); void onInformationAvailable(in nsIRequest aRequest, in nsISupports aCtxt, in AString aInfo); Methods onIndexAvailable() Called for each directory entry. void onIndexAvailable( in nsIRequest aRequest, in nsISupports aCtxt, in nsIDirIndex aIndex ); Parameters aRequest The request. aCtxt Opaque parameter aIndex New index to add. onInfo...
nsIDirIndexParser
Attributes Attribute Type Description comment string The comment given, if any. ...
nsIDirectoryEnumerator
xpcom/io/nsIDirectoryEnumerator.idlScriptable This interface provides a means for enumerating the contents of a directory. It is similar to nsISimpleEnumerator except the retrieved entries are QI'ed to nsIFile, and there is a mechanism for closing the directory when the enumeration is complete. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void close(); Attributes Attribute Type Description nextFile nsIFile The next file in the sequence. The nextFile attribute is the first element upon the first call. This attribute is null if there is no next element. Read only. Methods close() Closes the directory being enumerat...
nsIDirectoryIterator
The nsIDirectoryIterator interface provides a way to iterate over the entries in a directory. xpcom/obsolete/nsIFileSpec.idlScriptable Please add a summary to this article. ...
nsIDirectoryService
xpcom/io/nsIDirectoryService.idlScriptable This interface provides methods to initialize and configure a directory service instance. The XPCOM Directory Service implements this interface to provide support for a variety of well-known file and directory locations. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void init(); void registerProvider(in nsIDirectoryServiceProvider prov); void unregisterProvider(in nsIDirectoryServiceProvider prov); init() Initializes the nsIDirectoryService instance. This method must be called before an nsIDirectoryService instance can be used. In the case of the XPCOM Directory Service, this method is called as part of XPCOM initialization. Must not be called by external code; called internally by XPCOM initialization. ...
nsIDirectoryServiceProvider
Method overview nsIFile getFile(in string prop, out PRBool persistent); Methods getFile() The Directory Service calls this method when it gets the first request for a prop or on every request if the prop is not persistent. nsIFile getFile( in string prop, out PRBool persistent ); Parameters prop The symbolic name of the file. persistent true if the returned file will be cached by Directory Service. ...
nsIDirectoryServiceProvider2
nsISimpleEnumerator getFiles( in string prop ); Parameters prop The symbolic name of the file list. ...
nsIDiskCacheStreamInternal
netwerk/cache/nsIDiskCacheStreamInternal.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void closeInternal(); Methods closeInternal() We use this method internally to close nsDiskCacheOutputStream under the cache service lock. void closeInternal(); Parameters None. ...
nsIDispatchSupport
js/src/xpconnect/idl/nsIDispatchSupport.idlNot scriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void COMVariant2JSVal(in COMVARIANTPtr comvar, out jsval val); unsigned long getHostingFlags(in string aContext); boolean isClassMarkedSafeForScripting(in nsCIDRef cid, out boolean classExists); boolean isClassSafeToHost(in JSContextPtr cx, in nsCIDRef cid, in boolean capsCheck, out boolean classExists); boolean isObjectSafeForScripting(in voidPtr theObject, in nsIIDRef id); void JSVal2COMVariant(in jsval var, out COMVARIANT comvar); Methods COMVariant2JSVal() Converts a COM Variant to a jsval. void COMVariant2JSVal( in COMVARIANTPtr comvar, out jsval val ); Parameters comvar The COM Variant to ...
nsIDownloadHistory
docshell/base/nsIDownloadHistory.idlScriptable This interface can be used to add a download to history. There is a separate interface specifically for downloads in case embedders choose to track downloads differently from other types of history. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void addDownload(in nsIURI aSource, [optional] in nsIURI aReferrer, [optional] in PRTime aStartTime); Methods addDownload() Adds a download to history. This will also notify observers that the URI aSource is visited with the topic NS_LINK_VISITED_EVENT_TOPIC if aSource has not yet been visited. void addDownload( in nsIURI aSource, in nsIURI aReferrer, Optional in PRTime aStartTime Optional ); Paramet...
nsIDownloadManagerUI
toolkit/components/downloads/public/nsIDownloadManagerUI.idlScriptable This interface is used to implement the user interface for the Download Manager. If you wish to replace the default Download Manager user interface, implement this interface. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void getAttention(); void show([optional] in nsIInterfaceRequestor aWindowContext, [optional] in unsigned long aID, [optional] in short aReason); Attributes Attribute Type Description visible boolean true if the Download Manager UI is visible; otherwise false. Read only. Constants Constant Value Description REASON_USER_INTER...
nsIDownloadObserver
netwerk/base/public/nsIDownloader.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void onDownloadComplete(in nsIDownloader downloader, in nsIRequest request, in nsISupports ctxt, in nsresult status, in nsIFile result); Methods onDownloadComplete() Called to signal a download that has completed. void onDownloadComplete( in nsIDownloader downloader, in nsIRequest request, in nsISupports ctxt, in nsresult status, in nsIFile result ); Parameters downloader request ctxt status result ...
nsIDownloader
er.idlScriptable A special implementation of a nsIStreamListener that will make the contents of the stream available as a file. This may utilize the disk cache as an optimization to avoid an extra copy of the data on disk. The resulting file is valid from the time the downloader completes until the last reference to the downloader is released. Inherits from: nsIStreamListener Last changed in Gecko 1.7 Method overview void init(in nsIDownloadObserver observer, in nsIFile downloadLocation); Methods init() Initialize this downloader. void init( in nsIDownloadObserver observer, in nsIFile downloadLocation ); Parameters observer The nsIDownloadObserver to be notified when the download completes. downloadLocation The location where the stream contents shoul...
nsIDragDropHandler
nsIDragDropHandler is an interface for communicating with the built-in drag and drop implementation in the content area. Use this to register where the listeners should attach (something that implements nsPIDOMEventTarget which is what we end up using under the hood). content/base/public/nsIDragDropHandler.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 detach(); void hookupTo(in nsIDOMEventTarget attachPoint, in nsIWebNavigation navigator); Methods detach() Unregisters all handlers related to drag and drop. void detach(); Parameters None. hookupTo() Attaches drag handlers to a specified receiver, setting up callbacks to let built-in behaviors ...
nsIDragSession
widget/public/nsIDragSession.idlScriptable Provides support for interacting with an ongoing drag session during a drag and drop operation. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void getData( in nsITransferable aTransferable, in unsigned long aItemIndex ); boolean isDataFlavorSupported( in string aDataFlavor ); Attributes Attribute Type Description canDrop boolean Set the current state of the drag, whether it can be dropped or not. Usually the target "frame" sets this so the native system can render the correct feedback. dataTransfer nsIDOMDataTransfer The data transfer object for the current drag operation. dragAction u...
nsIDroppedLinkHandler
dom/base/nsIDroppedLinkHandler.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean canDropLink(in nsIDOMDragEvent aEvent, in PRBool aAllowSameDocument); AString dropLink(in nsIDOMDragEvent aEvent, out AString aName, [optional] in boolean aDisallowInherit); void dropLinks(in nsIDOMDragEvent aEvent, [optional] in boolean aDisallowInherit, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDroppedLinkItem aLinks); Methods canDropLink() Determines if a link being dragged can be dropped. boolean canDropLink( in nsIDOMDragEvent aEvent, in PRBool aAllo...
nsIEditorBoxObject
layout/xul/base/public/nsIEditorBoxObject.idlScriptable Please add a summary to this article. Inherits from: nsIContainerBoxObject Last changed in Gecko 1.9 (Firefox 3) The boxObject belonging to a XUL editor element implements this interface. Note: Please consider using nsIContainerBoxObject instead. Attributes Attribute Type Description docShell nsIDocShell Read only. Obsolete since Gecko 1.9 The nsIDocShell object that manages the contained document. The editor.xml binding uses this property to gain access to the webNavigation, contentDocument, contentWindow, webBrowserFind, editingSession and commandManager properties. ...
nsIEditorDocShell
Method overview void makeEditable(in boolean inWaitForUriLoad); Attributes Attribute Type Description editable boolean This docShell is editable. Read only. editor nsIEditor Gets or sets the editor for the content document. ...
nsIEditorLogging
editor/idl/nsIEditorLogging.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void startLogging(in nsIFile aLogFile); void stopLogging(); Methods startLogging() Start logging. void startLogging( in nsIFile aLogFile ); Parameters aLogFile The file to which the log should be written. stopLogging() Stop logging. void stopLogging(); Parameters None. ...
nsIEditorMailSupport
editor/idl/nsIEditorMailSupport.idlScriptable Provides simple editing actions for the Thunderbird mail editor. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsISupportsArray getEmbeddedObjects(); nsIDOMNode insertAsCitedQuotation(in AString aQuotedText, in AString aCitation, in boolean aInsertHTML); nsIDOMNode insertAsQuotation(in AString aQuotedText); void insertTextWithQuotations(in DOMString aStringToInsert); void pasteAsCitedQuotation(in AString aCitation, in long aSelectionType); void pasteAsQuotation(in long aSelectionType); void rewrap(in boolean aRespectNewlines); void stripCites(); Methods getEmbeddedObjects() Get a list of IMG and OBJECT tags in the current document. nsISupportsArray getEmbeddedObjects(); Parameters None. Ret...
nsIEditorObserver
editor/idl/nsIEditorObserver.idlScriptable Used by applications wishing to be notified when the editor has completed a user action. 66 Introduced Gecko 1.0 Obsolete Gecko 18 Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void EditAction(); Methods EditAction() Called after the editor completes a user action. void EditAction(); Parameters None. ...
nsIEnvironment
getService(Components.interfaces.nsIEnvironment); Method overview void set(in AString aName, in AString aValue); AString get(in AString aName); boolean exists(in AString aName); Methods set() Set the value of an environment variable. ...
nsIErrorService
xpcom/base/nsIErrorService.idlScriptable This is a service that allows nsresult codes to be mapped to string bundles that can be used to look up error messages. String bundle keys can also be mapped. ...
nsIEventListenerInfo
content/events/public/nsIEventListenerService.idlScriptable An instance of this interface describes how an event listener was added to an event target; these are returned by nsIEventListenerService.getListenerInfoFor, which provides a list of all the listeners to a given event target. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview nsISupports getDebugObject(); AString toSource(); Attributes Attribute Type Description allowsUntrusted boolean Indicates whether or not the event listener allows untrusted events. Read only. capturing boolean Indicates whether or not the event listener is in capture mo...
nsIException
There is no unambiguous indicator for unknown. Read only. data nsISupports Arbitary data for the implementation. Read only. filename string Filename location. This is the location that caused the error, which may or may not be a source file location. ...
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. Examples Here is how to retrive all the extensions installed: var em = Cc['@mozilla.org/extensions/manager;1'] .getService(Ci.nsIExtensionManager); const nsIUpdateItem = Ci.nsIUpdateItem; var extension_type = nsIUpdateItem.TYPE_EXTENSION; items = em.getItemList(extension_type, {}); items.forEach(function(item, index, array) { alert(item.name + " / " + item.id + " version: " + item.version); }); ...
nsIExternalHelperAppService
uriloader/exthandler/nsIExternalHelperAppService.idlScriptable The external helper app service is used for finding and launching platform specific external applications for a given MIME content type. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/uriloader/external-helper-app-service;1. To access this service, use: var externalHelperAppService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"] .getService(Components.interfaces.nsIExternalHelperAppService); Method overview boolean applyDecodingForExtension(in AUTF8String aExtension, in ACString aEncodingType); nsIStreamListener doContent(in ACString aMimeContentType, in nsIRequest aRequest, in nsIInterfaceRequestor aWind...
nsIExternalProtocolService
uriloader/exthandler/nsIExternalProtocolService.idlScriptable The external protocol service is used for finding and launching web handlers (a la registerProtocolHandler in the HTML5 draft) or platform-specific applications for handling particular protocols. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) You can ask the external protocol service if it has an external handler for a given protocol scheme. And you can ask it to load the url using the default handler. Method overview boolean externalProtocolHandlerExists(in string aProtocolScheme); AString getApplicationDescription(in AUTF8String aScheme); nsIHandlerInfo getProtocolHandlerInfo(in ACString aProtocolScheme); nsIHandlerInfo getProtocolHandlerInfoFromOS(in ACString aProtocolScheme, out boolean...
nsIExternalURLHandlerService
uriloader/exthandler/nsIExternalURLHandlerService.idlScriptable The external URL handler service is used for finding platform-specific applications for handling particular URLs. 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 nsIHandlerInfo getURLHandlerInfoFromOS(in nsIURI aURL, out boolean aFound); Methods getURLHandlerInfoFromOS() Given a URL, looks up the handler info from the operating system. This should be overridden by each operating systems implementation. nsIHandlerInfo getURLHandlerInfoFromOS( in nsIURI aURL, out boolean aFound ); Parameters aURL The URL we are looking for. aFound Was an operating system default handler for this URL found? Retu...
nsIFTPChannel
is an extension of nsISupports used to determine if a channel is an FTP channel, and offering additional information about the FTP channel. You can determine if a channel is an FTP channel by checking to see if it implements this interface, by calling nsISupports.queryInterface() on it. netwerk/protocol/ftp/nsIFTPChannel.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Attributes Attribute Type Description lastModifiedTime PRTime The time at which the FTP channel was last updated. ...
nsIFTPEventSink
The nsIFTPEventSink is an extension of nsISupports. It can be used as a notification callback on an FTP channel. netwerk/protocol/ftp/nsIFTPChannel.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method Overview void OnFTPControlLog(in boolean server, in string msg) Methods OnFTPControlLog Allows a consumer to receive a log of the FTP control connection conversation. void OnFTPControlLog ( in boolean server, in string msg); Parameters server A boolean value specifying whether you are a server or a client. msg A string holding response of the last command which had been sent. ...
nsIFeed
toolkit/components/feeds/public/nsIFeed.idlScriptable This interface represents a single Atom or RSS (Really Simple Syndication) news feed. It includes attributes that provide information about the feed, as well as access to the items or entries in the feed. 1.0 66 Introduced Gecko 1.8 Inherits from: nsIFeedContainer Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Attributes Attribute Type Description cloud nsIWritablePropertyBag2 The cloud element on a feed is used to identify the API endpoint of an rssCloud ping server, which distributes notifications of changes to this feed. enclosureCount long Indicates the number of enclosures associated with a feed. generator nsIFeedGener...
nsIFeedContainer
toolkit/components/feeds/public/nsIFeedContainer.idlScriptable This interface provides standard fields used by both feeds (nsIFeed) and feed entries (nsIFeedEntry) 1.0 66 Introduced Gecko 1.8 Inherits from: nsIFeedElementBase Last changed in Gecko 1.8.1 (Firefox 2 / Thunderbird 2 / SeaMonkey 1.1) Method overview void normalize(); Attributes Attribute Type Description authors nsIArray An array of nsIFeedPerson objects describing the authors of the feed or entry. categories nsIArray An array of the categories found in a feed or entry. Note: The returned array will contain nsIFeedCategory objects, except that interface has not been implemented yet. contributors nsIArray An array of nsIFeedP...
nsIFeedElementBase
toolkit/components/feeds/public/nsIFeedElementBase.idlScriptable This interface is a base interface from which several of the other feed access interfaces derive. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Attributes Attribute Type Description attributes nsISAXAttributes All the attributes found on the element. Most derived interfaces provide convenience accessors for their standard fields, so this is only useful when looking for nonstandard fields. baseURI nsIURI The base URI for the entry or feed. Interwiki link ...
nsIFeedGenerator
toolkit/components/feeds/public/nsIFeedGenerator.idlScriptable This interface describes the software that generated an RSS or Atom news feed. 1.0 66 Introduced Gecko 1.8 Inherits from: nsIFeedElementBase Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Attributes Attribute Type Description agent AString The name of the software that created the feed. uri nsIURI A URI associated with the generator software. version AString A string indicating the version of the generator software that created the feed. Interwiki link ...
nsIFeedProcessor
toolkit/components/feeds/public/nsIFeedProcessor.idlScriptable This interface parses RSS or Atom feeds, triggering callbacks based on their contents during and after the processing. 1.0 66 Introduced Gecko 1.8.1 Inherits from: nsIStreamListener Last changed in Gecko 1.8.1 (Firefox 2 / Thunderbird 2 / SeaMonkey 1.1) Implemented by: @mozilla.org/feed-processor;1. To create an instance, use: var feedProcessor = Components.classes["@mozilla.org/feed-processor;1"] .createInstance(Components.interfaces.nsIFeedProcessor); Method overview void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri); void parseFromStream(in nsIInputStream stream, in nsIURI uri); void parseFromString(in AString str, in nsIURI ur...
nsIFeedResult
toolkit/components/feeds/nsIFeedResult.idlScriptable This interface provides access to HTTP and parsing metadata for a feed or entry. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void registerExtensionPrefix(in AString aNamespace, in AString aPrefix); Attributes Attribute Type Description bozo boolean The feed processor sets the bozo bit when a feed triggers a fatal error during XML parsing. There may still be feed metadata and entries that were parsed before the error occurred. doc nsIFeedContainer The parsed feed or entry. null if a non-feed was processed. headers nsIProperties The H...
nsIFeedResultListener
toolkit/components/feeds/public/nsIFeedListener.idlScriptable This interface should be implemented by programs to receive events from the feed parser as parsing progresses. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void handleResult(in nsIFeedResult result); Methods handleResult() Called when feed processing is complete. Even if an error occurred during processing, there may be valid data available for feed-level data or entries processed before the error occurred. If you don't care about doing progress display or the like, this is all you need to implement in order to receive the parsed feed. void handleResult( in nsIFeedResult result )...
nsIFeedTextConstruct
toolkit/components/feeds/public/nsIFeedTextConstruct.idlScriptable This interface represents RSS or Atom feed text fields that may contain plain text, HTML, or XHTML. Some extension elements also include "type" parameters, and this interface could be used to represent those as well. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8.1 (Firefox 2 / Thunderbird 2 / SeaMonkey 1.1) Implemented by: @mozilla.org/feed-textconstruct;1, but users usually don't need to create instances of this directly. Various other feed-related interfaces, such as nsIFeed, nsIFeedEntry, and nsIFeedContainer have attributes that return objects implementing nsIFeedTextConstruct. Method overview nsIDOMDocumentFragment createDocumentFragment(in nsI...
nsIFileInputStream
It may be removed before the stream is closed if it is possible to delete it and still read from it. ...
nsIFileOutputStream
netwerk/base/public/nsIFileStreams.idlScriptable This interface is an output stream that lets you stream to a file. Inherits from: nsIOutputStream Last changed in Gecko 1.7 Method overview void init(in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); Constants Behavior flag constants Constant Value Description DEFER_OPEN 1<<0 See the same constant in nsIFileInputStream. The deferred open will be performed when one of the following is called: Seek() Tell() Write() Flush() DEFER_OPEN is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well. ...
nsIFileProtocolHandler
netwerk/protocol/file/nsIFileProtocolHandler.idlScriptable This interface provides methods to convert between nsIFile and nsIURI. It also provides access to Internet shortcuts stored on the host operating system's file system. Inherits from: nsIProtocolHandler Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview nsIFile getFileFromURLSpec(in AUTF8String url); AUTF8String getURLSpecFromActualFile(in nsIFile file); AUTF8String getURLSpecFromDir(in nsIFile file); AUTF8String getURLSpecFromFile(in nsIFile file); nsIURI newFileURI(in nsIFile aFile); nsIURI readURLFile(in nsIFile file); Methods getFileFromURLSpec() Converts the URL string into the corresponding nsIFile if possible. A local f...
nsIFileStreams
It may be removed before the stream is closed if it is possible to delete it and still read from it. ...
nsIFileURL
The getter returns a reference to an immutable object. ...
nsIFileView
It's not included in Windows or Mac builds. Note: A quirk of the nsIFileView is that it requires an appropriate treecols section in the tree tag, by default fileview will return the file size in the column. If the treecol id is "FilenameColumn" fileview will return the file name, if the id is "LastModifiedColumn" it will return the date of last modification. ...
nsIFormHistory2
toolkit/components/satchel/public/nsIFormHistory.idlScriptable A service which holds a set of name/value pairs. The names correspond to form field names, and the values correspond to values the user has submitted. So, several values may exist for a single name. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: This interface provides no means to access stored values. Stored values are used by the FormFillController to generate autocomplete matches. Method overview void addEntry(in AString name, in AString value); boolean entryExists(in AString name, in AString value); boolean nameExists(in AString name); void removeAllEntries(); void removeEntriesByTimeframe(...
nsIFrameLoader
content/base/public/nsIFrameLoader.idlScriptable Handles loading a frame. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: This interface works in tandem with the nsIContentView interface to manage frames across processes if Electrolysis is in use to support per-frame processes. Method overview void activateFrameEvent(in AString aType, in boolean capture); void activateRemoteFrame(); void destroy(); void loadFrame(); void loadURI(in nsIURI aURI); void sendCrossProcessKeyEvent(in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in boolean aPreventDefault); void sendCrossP...
nsIFrameMessageListener
content/base/public/nsIMessageManager.idlScriptable Implement this interface in a remote frame handling process to receive messages from the browser process. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface is used when implementing out-of-process handling of frames; the process handling a frame should implement this interface in order to receive messages. Method overview void receiveMessage(); Methods receiveMessage() Note: This method is for JavaScript only. Called to deliver a message to the frame handling process; called with one parameter, which has the following properties: name The name of the message. sync ...
nsIGlobalHistory2
docshell/base/nsIGlobalHistory2.idlScriptable This interface provides information about global history to Gecko. It was split off from nsIGlobalHistory during the transition to toolkit interfaces. Inherits from: nsISupports Last changed in Gecko 1.7 This interface replaces and deprecates nsIGlobalHistory Method overview void addURI(in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); boolean isVisited(in nsIURI aURI); void setPageTitle(in nsIURI aURI, in AString aTitle); Methods addURI() Add a URI to global history. Note: Docshell will not filter out URI schemes like chrome:, data:, about: and view-source:. Embedders should consider filtering out these schemes and others, for example mailbox:, f...
nsIHTMLEditor
editor/idl/nsIHTMLEditor.idlScriptable Please add a summary to this article. ...
nsIHTTPHeaderListener
This instance is passed in through {GetURL,PostURL}()'s streamListener parameter. ...
nsIHttpActivityObserver
netwerk/protocol/http/nsIHttpActivityObserver.idlScriptable This interface provides a way for http transport activities to be reported to observers. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void observeActivity(in nsISupports aHttpChannel, in PRUint32 aActivityType, in PRUint32 aActivitySubtype, in PRTime aTimestamp, in PRUint64 aExtraSizeData, in ACString aExtraStringData); Attributes Attribute Type Description isActive boolean true when the interface is active and should observe HTTP activity, otherwise false. If this is false, the observeActivity() method should not be called. Read only. Note: This attribute is present only for compatibility an...
nsIHttpHeaderVisitor
This method can throw an exception to terminate enumeration of the channel's headers. ...
nsIHttpUpgradeListener
netwerk/protocol/http/nsIHttpChannelInternal.idlScriptable The callback interface for nsIHttpChannelInternal.HTTPUpgrade; this is called when an HTTP protocol upgrade is finished. 1.0 66 Introduced Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) This is used, for example, by WebSockets in order to upgrade an HTTP channel to use the WebSocket protocol. Method overview void onTransportAvailable(in nsISocketTransport aTransport, in nsIAsyncInputStream aSocketIn, in nsIAsyncOutputStream aSocketOut); Methods onTransportAvailable() Called when an HTTP protocol upgrade attempt is completed, passing in the information needed by the protocol handler to take over the channel that is no longer b...
nsIIDNService
netwerk/dns/nsIIDNService.idlScriptable This interface provides support for Internationalized Domain Names, including methods for manipulating IDN hostnames according to IETF specification. ...
nsIIFrameBoxObject
layout/xul/base/public/nsIIFrameBoxObject.idlScriptable Please add a summary to this article. Inherits from: nsIContainerBoxObject Last changed in Gecko 1.9 (Firefox 3) The boxObject belonging to a XUL iframe element implements this interface. Note: Please consider using nsIContainerBoxObject instead. Attributes Attribute Type Description docShell nsIDocShell Read only. Obsolete since Gecko 1.9 The nsIDocShell object that manages the contained document. The general.xml binding uses this property to gain access to the webNavigation, contentDocument and contentWindow properties. ...
nsIINIParser
Also, if you need to write to an INI file, use nsIINIParserWriter. ...
nsIInProcessContentFrameMessageManager
content/base/public/nsIFrameMessageManager.idlNot scriptable ??? Add brief description of Interface here! ??? 1.0 66 Introduced Gecko 2.0 Inherits from: nsIContentFrameMessageManager Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsIContent getOwnerContent(); Violates the XPCOM interface guidelines Methods Violates the XPCOM interface guidelines getOwnerContent() nsIContent getOwnerContent(); Parameters None. Return value The nsIContent object representing the owner's content. See also Content process event handling nsIContentFrameMessageManager ...
nsIInputStreamCallback
xpcom/io/nsIAsyncInputStream.idlScriptable This is a companion interface for nsIAsyncInputStream.asyncWait(). Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void onInputStreamReady(in nsIAsyncInputStream aStream); Methods onInputStreamReady() Called to indicate that the stream is either readable or closed. void onInputStreamReady( in nsIAsyncInputStream aStream ); Parameters aStream The stream whose nsIAsyncInputStream.asyncWait() method was called. See also nsIAsyncInputStream.asyncWait() ...
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>. You can get the install location of a particular add-on using nsIExtensionManager interface: var il = Components.classes["@mozilla.org/extensions/manager;1"] .getService...
nsIInterfaceRequestor
The main difference is that interfaces returned are not required to provide a way back to the object implementing nsIInterfaceRequestor. ...
nsIJSCID
js/src/xpconnect/idl/xpcjsid.idlScriptable This interface provides methods to instantiate a component and access service components. Inherits from: nsIJSID Last changed in Gecko 1.7 Method overview nsISupports createInstance(); nsISupports getService(); Methods createInstance() nsISupports createInstance(); Parameters None. Return value getService() nsISupports getService(); Parameters None. Return value See also See Components.classes for usage patterns of the createInstance() and getService() methods. ...
nsIJetpack
js/jetpack/nsIJetpack.idlScriptable This interface enables communication between the chrome process and a remote Jetpack process. 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 sendMessage(in AString aMessageName /* [optional] in jsval v1, [optional] in jsval v2, ... */); void registerReceiver(in AString aMessageName, in jsval aReceiver); void unregisterReceiver(in AString aMessageName, in jsval aReceiver); void unregisterReceivers(in AString aMessageName); void evalScript(in AString aScript); nsIVariant createHandle(); void destroy(); Methods sendMessage() This method asynchronously sends a message to the Jetpack process. void sendMessage( i...
nsIJetpackService
Method overview nsIJetpack createJetpack(); Methods createJetpack() This method creates a new Jetpack process and returns an nsIJetpack interface that represents it. nsIJetpack createJetpack(); Parameters None. ...
nsIJumpListBuilder
Modifying an applied jump list is not permitted. Callers should begin the creation of a new jump list using initListBuild(), add sub lists using addListToBuild(), then commit the jump list using commitListBuild(). Lists are built in real-time during the sequence of build calls, make sure to check for errors on each individual step. ...
nsILoadGroup
Read only. ...
nsILocalFile
In Gecko 14 this Interface was merged into the nsIFile interface. xpcom/io/nsILocalFile.idlScriptable This interface adds methods to nsIFile that are particular to a file that is accessible via the local file system. 66 Introduced Gecko 1.0 Deprecated Gecko 14 Inherits from: nsIFile Last changed in Gecko 1.0 Implemented by: @mozilla.org/file/local;1. To create an instance, use: var localFile = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile); Method overview void appendRelativeNativePath(in ACString relativeFilePath); Native code only! void appendRelativePath(in AString relativeFilePath); ACString getRelativeDescriptor(in nsILocalFile fromFile); void initWit...
nsILocale
AString getCategory( in AString category ); Parameters category A string representing the category to retrieve the locale for. Valid strings are stored in nsILocale.idl. ...
nsILoginInfo
nsILoginInfo is an object containing information for a login stored by the Login Manager. To create and manage logins use nsILoginManager. toolkit/components/passwordmgr/public/nsILoginInfo.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Implemented by: @mozilla.org/login-manager/loginInfo;1. To create an instance, use: var loginInfo = Components.classes["@mozilla.org/login-manager/loginInfo;1"] .createInstance(Components.interfaces.nsILoginInfo); Method overview nsILoginInfo clone(); boolean equals(in nsILoginInfo aLoginInfo); void init(in AString aHostname, in AString aFormSubmitURL, in AString aHttpRealm, in AString aUsername...
nsILoginManagerIEMigrationHelper
toolkit/components/passwordmgr/public/nsILoginManagerIEMigrationHelper.idlScriptable Imports a login from the nsIIEProfileMigrator into the Login Manager. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void migrateAndAddLogin(in nsILoginInfo aLogin); Methods migrateAndAddLogin() Takes a login provided from nsIEProfileMigrator, migrates it to the current login manager format, and adds it to the list of stored logins. Note: In some cases, multiple logins may be created from a single input when the format is ambiguous. void migrateAndAddLogin( in nsILoginInfo aLogin ); Parameters aLogin The login to be migrated. ...
nsILoginManagerPrompter
toolkit/components/passwordmgr/public/nsILoginManagerPrompter.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/login-manager/prompter;1. To call this service, use: var loginManagerPrompter = Components.classes["@mozilla.org/login-manager/prompter;1"] .getService(Components.interfaces.nsILoginManagerPrompter); Method overview void init(in nsIDOMWindow aWindow); void promptToChangePassword(in nsILoginInfo aOldLogin, in nsILoginInfo aNewLogin); void promptToChangePasswordWithUsernames([array, size_is(count)] in nsILoginInfo logins, in PRUint32 count, in nsILoginInfo aNewLogin); ...
nsILoginMetaInfo
toolkit/components/passwordmgr/public/nsILoginMetaInfo.idlScriptable An object that contains metadata for logins stored by the Login Manager. This data can usually be ignored by most users of the Login Manager, which will create and maintain appropriate default values. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) You can specifically modify these values by passing changes into nsILoginManager.modifyLogin() using an nsIPropertyBag2 object as the input. Metadata properties are ignored when comparing logins. Attributes Attribute Type Description guid AString The GUID to uniquely identify the login. This can be any arbitrary string, but a format as created by nsIUUIDGener...
nsIMIMEInputStream
netwerk/base/public/nsIMIMEInputStream.idlScriptable The MIME stream separates headers and a datastream. It also allows automatic creation of the content-length header. Inherits from: nsIInputStream Last changed in Gecko 1.3 Implemented by: @mozilla.org/network/mime-input-stream;1. To create an instance, use: var mimeInputStream = Components.classes["@mozilla.org/network/mime-input-stream;1"] .createInstance(Components.interfaces.nsIMIMEInputStream); Method overview void addHeader(in string name, in string value); void setData(in nsIInputStream stream); Attributes Attribute Type Description addContentLength boolean When true a "Content-Length" header is automatically added to the stream. The value of th...
nsIMacDockSupport
To create an instance, use: var dock = Components.classes["@mozilla.org/widget/macdocksupport;1"] .getService(Components.interfaces.nsIMacDockSupport); See Working with the Mac OS X Dock for details and examples. ...
nsIMemoryMultiReporter
xpcom/base/nsIMemoryReporter.idlScriptable Reports multiple memory measurements using a callback function that gets called once for each measurement. 1.0 66 Introduced Gecko 7.0 Inherits from: nsISupports Last changed in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9) If you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so. The callback, which must implement the nsIMemoryMultiReporterCallback interface, receives values that match the fields in the nsIMemoryReporter object. In order for a multi-reporter to gather and generate reports, you need to call collectReports(). This will call the specified callback's nsIMemoryMultiReporterCallback.ca...
nsIMemoryReporterManager
Each code area is identified by a unique path string, which is displayed in about:memory. ...
nsIMessageListenerManager
dom/base/nsIMessageManager.idlScriptable This interface enables clients to listen for messages sent using the nsIMessageBroadcaster, nsIMessageSender, or nsISyncMessageSender interfaces. 1.0 66 Introduced Gecko 17 Inherits from: nsISupports Last changed in Gecko 41 (Firefox 41 / Thunderbird 41 / SeaMonkey 2.38) Implemented by: @mozilla.org/globalmessagemanager;1. To access this service, use: var globalMM = Components.classes["@mozilla.org/globalmessagemanager;1"] .getService(Components.interfaces.nsIMessageListenerManager); Method overview void addMessageListener(in AString messageName, in nsIMessageListener listener, [optional] in boolean listenWhenClosed) void remo...
nsIMessageWakeupService
content/base/public/nsIMessageWakeupService.idlScriptable Implements the Message Manager wakeup service; this lets other components be woken up when specific Message Manager messages arrive. By using this service, you can avoid starting those components until they're needed. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: This service was introduced in Gecko 5.0 on Firefox for Android, but was not provided on desktop until Gecko 13.0 (Firefox 13). There is no IDL for this interface. The parentprocessmessagemanager is used for this, so messages send from childprocessmessagemanagers will be heard. Requesting wakeups To request a wakeup, a wakeup condition must be registered w...
nsIMessenger
Attributes Attribute Type Description transactionManager nsITransactionManager Readonly: The transaction manager for this nsIMessenger instance. sendingUnsentMsgs boolean Indicates if sending messages is in progress. lastDisplayedMessageUri ACString Readonly...
nsIMicrosummaryGenerator
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides access to a microsummary that has been installed in Firefox. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview long calculateUpdateInterval(in nsIDOMNode aPageContent); boolean equals(in nsIMicrosummaryGenerator aOther); AString generateMicrosummary(in nsIDOMNode aPageContent); Attributes Attribute Type Description loaded boolean Has the generator itself (which may be a remote resource) been loaded. Read only. localURI nsIURI For generators installed by th...
nsIMicrosummaryObserver
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides methods for observing changes to micrummaries. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview void onContentLoaded(in nsIMicrosummary microsummary); void onElementAppended(in nsIMicrosummary microsummary); void onError(in nsIMicrosummary microsummary); Methods onContentLoaded() Called when an observed microsummary updates its content. Since an observer might watch multiple microsummaries at the same time, the microsummary whose content has been updated gets pa...
nsIMicrosummarySet
toolkit/components/places/public/nsIMicrosummaryService.idlScriptable This interface provides access to sets of microsummaries returned from the nsIMicrosummaryService. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview void addObserver(in nsIMicrosummaryObserver observer); nsISimpleEnumerator Enumerate(); void removeObserver(in nsIMicrosummaryObserver observer); Methods addObserver() Add a microsummary observer to this microsummary set. Adding an observer to a set is the equival...
nsIMimeHeaders
nsIMimeHeaders mailnews/mime/public/nsIMimeHeaders.idlScriptable ??? Add brief description of Interface ??? Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: ?????????????????????????????????????. To create an instance, use: Implemented by: ????????????????????????????????????? as a service: var mimeHeaders = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIMimeHeaders); Method overview string extractHeader([const] in string headerName, in boolean getAllOfThem); void initialize([const] in string allHeaders, in long allHeadersSize); Attributes Attribute Type Description allHeaders string Read o...
nsIMsgAccount
nsIMsgAccount mailnews/base/public/nsIMsgAccount.idlScriptable An account consists of an incoming server and one or more outgoing identities. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void addIdentity(in nsIMsgIdentity identity); void clearAllValues(); void init(); void removeIdentity(in nsIMsgIdentity identity); AString toString(); Attributes Attribute Type Description defaultIdentity nsIMsgIdentity identities nsISupportsArray Read only. Outgoing identity list (array of nsIMsgIdentity's) incomingServer nsIMsgIncomingServer Incoming server stuff key ACString Internal key identifying itself Methods addIdentity() Adds a new identity to this account. void addIdentity( in nsIMsgIdentity identity ); Parameters identity The ...
nsIMsgAccountManagerExtension
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 nsIMsgIncomingServer server); Attributes Attribute Type Description name ACString name of the account manager extension. It has to be unique and defines the file name of the property file and the XUL Page as well as the name of the localized string contained in the property file. This attribute is readonly! chromeP...
nsIMsgCustomColumnHandler
The nsIMsgCustomColumnHandler interface allows you to create custom handlers for columns. It can be used in the Thunderbird threadpane for extensions to overlay their own columns. mailnews/base/public/nsIMsgCustomColumnHandler.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsITreeView This interface is meant to be implemented by extensions, as shown in the tutorial. 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. You must implement: nsITreeView.isEditable() nsITreeView.GetCellProperties() nsITreeView.GetImageSrc() nsITreeView.GetCellText() nsITreeView.cycleCell() nsIMsgCustomColumnHandler.getSortStringF...
nsIMsgDBViewCommandUpdater
The nsIMsgDBViewCommandUpdater interface controls changes that occur as the selection changes. mailnews/base/public/nsIMsgDBView.idl#349Scriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports In Thunderbird this is implemented for different windows in several different places: nsMsgDBViewCommandUpdater (for the standalone message window) nsMsgDBViewCommandUpdater (for the threadpane message window) nsMsgSearchCommandUpdater (for search dialogs) Method overview void updateCommandStatus(); void displayMessageChanged(in nsIMsgFolder aFolder, in AString aSubject, in ACString aKeywords); void updateNextMessageAfterDelete(); Methods updateCommandStatus() Called when the number of selected items changes. void u...
nsIMsgDatabase
The nsIMsgDatabase interface is an abstract interface used to access the mail database backend. mailnews/db/msgdb/public/nsIMsgDatabase.idlScriptable Please add a summary to this article. ...
nsIMsgWindow
To create an instance, use: msgWindow = Components.classes["@mozilla.org/messenger/msgwindow;1"] .createInstance(Components.interfaces.nsIMsgWindow); In Thunderbird the default message window is stored in the global variable msgWindow. ...
nsIMsgWindowCommands
Method overview void selectFolder(in ACString folderUri); void selectMessage(in ACString messageUri); void clearMsgPane(); Methods selectFolder() This method is called by the backend to change the folder displayed in the message window. ...
nsIMutableArray
As above, it is legal to add null elements to the array. Note also that null elements can be created as a side effect of insertElementAt(). ...
nsINavHistoryFullVisitResultNode
toolkit/components/places/public/nsINavHistoryService.idlScriptable This interface describes a result from a RESULT_TYPE_FULL_VISIT query on the Places service. This includes more detailed information than the RESULT_TYPE_VISIT query (which returns nsINavHistoryVisitResultNode, and as such takes more time to look up. 1.0 66 Introduced Gecko 1.9 Inherits from: nsINavHistoryVisitResultNode Last changed in Gecko 1.9 (Firefox 3) The information returned in this interface is not commonly used, hence its separation into a separate query type for efficiency. Attributes Attribute Type Description referringVisitId long long The referring visit ID; the referrer should have the same session ID as the visit described by this record. Read only.
nsINavHistoryResultViewObserver
toolkit/components/places/public/nsINavHistoryService.idlScriptable This interface is used by clients of the history results to define domain-specific handling of specific nsITreeView methods that the history result doesn't implement. ...
nsINavHistoryVisitResultNode
rvice.idlScriptable This interface describes a result from a RESULT_TYPE_VISIT query on the Places service. It describes a visit to an entry; you can use it to determine the date and time of the last time the user visited a particular page, for example. This interface provides the session ID so that it's possible to group items from the same session together. 1.0 66 Introduced Gecko 1.9 Inherits from: nsINavHistoryResultNode Last changed in Gecko 1.9 (Firefox 3) Attributes Attribute Type Description sessionId long long The session ID of the visit, used for session grouping when a tree view is sorted by date. Read only. See also nsINavHistoryResultNode ...
nsIObserver
xpcom/ds/nsIObserver.idlScriptable This interface is implemented by an object that wishes to observe notifications. These notifications are often, though not always, broadcast via the nsIObserverService. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview void observe(in nsISupports aSubject, in string aTopic, in wstring aData); Methods observe() This method will be called when there is a notification for the topic that the observer has been registered for. If you expect multiple topics/subjects, the implementor is responsible for filtering. You should not modify, add, remove, or enumerate notifications in the implementation of this method. void observe( in nsISupports aSubject, in string aTopic, in wstring aData ); Parameters ...
nsIObserverService
xpcom/ds/nsIObserverService.idlScriptable This interface provides methods to add, remove, notify, and enumerate observers of various notifications. Inherits from: nsISupports Last changed in Gecko 0.9.6 The XPCOM nsObserverService implements this interface to provide global notifications for a variety of subsystems. Implemented by @mozilla.org/observer-service;1 as a service: var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); Method overview void addObserver( in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); nsISimpleEnumerator enumerateObservers( in string aTopic ); void notifyObservers( in nsISupports aSubject, in string aTopic...
nsIOutputStreamCallback
xpcom/io/nsIAsyncOutputStream.idlScriptable This is a companion interface for nsIAsyncOutputStream.asyncWait. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void onOutputStreamReady(in nsIAsyncOutputStream aStream); Methods onOutputStreamReady() Called to indicate that the stream is either writable or closed. void onOutputStreamReady( in nsIAsyncOutputStream aStream ); Parameters aStream The stream whose nsIAsyncOutputStream.asyncWait() method was called. ...
nsIParentalControlsService
toolkit/components/parentalcontrols/public/nsIParentalControlsService.idlScriptable This interface provides access to the operating system's parental controls feature, allowing code to detect whether such a service is enabled and to request overrides to bypass the feature. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Note: Currently, this interface is only supported on Microsoft Windows Vista and newer as well as Android 4.3 and newer. Implemented by: @mozilla.org/parental-controls-service;1. To create an instance, use: var parentalControlsService = Components.classes["@mozilla.org/parental-controls-service;1"] .createInstance(Components.interfaces.nsIParentalControlsService); Me...
nsIPermission
The nsIPermission interface defines a "permission" object, which is used to allow or block objects (for example cookies, images) from certain sites based on user preferences. netwerk/base/public/nsIPermission.idlScriptable Please add a summary to this article. Last changed in Gecko 2 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Inherits from: nsISupports Attributes Attribute Type Description capability PRUint32 The permission to set: allow, deny, or unknown (which is the default). See nsIPermissionManager.Permission_type_constants for allowed values. Read only. expireTime PRInt64 The expiration time of the permission measured in milliseconds since 1970 Jan 1 0:00:00. Read only. ...
nsIPermissionManager
The nsIPermissionManager interface is used to persistently store permissions for different object types (cookies, images, and so on) on a site-by-site basis. netwerk/base/nsIPermissionManager.idlScriptable Please add a summary to this article. ...
nsIPipe
xpcom/io/nsIPipe.idlScriptable This interface represents an in-process buffer that can be read using nsIInputStream and written using nsIOutputStream. Inherits from: nsISupports Last changed in Gecko 1.6 Method overview void init(in boolean nonBlockingInput, in boolean nonBlockingOutput, in unsigned long segmentSize, in unsigned long segmentCount, in nsIMemory segmentAllocator); Attributes Attribute Type Description inputStream nsIAsyncInputStream The pipe's input end, which also implements nsISearchableInputStream. Read only. outputStream nsIAsyncOutputStream The pipe's output end. Read only. Methods init() initialize this pipe. void init( in boolean nonBlockingInp...
nsIPrefLocalizedString
modules/libpref/public/nsIPrefLocalizedString.idlScriptable This interface is simply a wrapper interface for nsISupportsString so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsISupportsString) and 'localized' wide strings, which get their default values from properites files. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void setDataWithLength(in unsigned long length, [size_is(length)] in wstring data); wstring toString(); Attributes Attribute Type Description data wstring Provides access to string data stored in this property. Methods setDataWithLength() Used to set the contents of this...
nsIPrefService
libpref/public/nsIPrefService.idlScriptable This interface is the main entry point into the back end preferences management library. The preference service is directly responsible for the management of the preferences files and also facilitates access to the preference branch object which allows the direct manipulation of the preferences themselves. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsIPrefBranch getBranch(in string aPrefRoot); nsIPrefBranch getDefaultBranch(in string aPrefRoot); void readUserPrefs(in nsIFile aFile); void resetPrefs(); void resetUserPrefs(); void savePrefFile(in nsIFile aFile); Methods getBranch() Call to get a Preferences "Branch" which accesses user preference data. Usin...
nsIPrintingPrompt
See nsIPrintingPromptService for all documentation. ...
nsIProfile
profile/public/nsIProfile.idlUnknown The Profile Manager is responsible for creating, maintaining, and organizing user profiles. This interface was superseded by the nsIToolkitProfileService interface in Gecko 1.8.1. 66 Introduced Gecko 0.9 Deprecated Gecko 1.8.1 Obsolete Gecko 20.0 Inherits from: nsISupports Last changed in Gecko 1.6 Implemented by: @mozilla.org/profile/manager;1. To get access to the Profile Manager service: var profile = Components.classes["@mozilla.org/profile/manager;1"] .getService(Components.interfaces.nsIProfile); Note: This interface was used by SeaMonkey up through SeaMonkey 1.1 versions, which were based off Gecko 1.8.1. However, it hasn't been used in Firefox since before Firefox 1.0. Method over...
nsIProfileLock
Read only. ...
nsIProfileUnlocker
profile/public/nsIProfileUnlocker.idlScriptable Returned by the nsIToolkitProfile.lock method; you can use this to attempt to force a profile to be unlocked. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void unlock(in unsigned long aSeverity); Constants Constant Value Description ATTEMPT_QUIT 0 Politely ask the process currently holding the profile's lock to quit. FORCE_QUIT 1 Forcibly terminate the process holding the profile lock. Methods unlock() Tries to unlock the profile by attempting or forcing the process that currently holds the lock to quit. void unlock( in unsigned long aSeverity ); P...
nsIProgrammingLanguage
xpcom/base/nsIProgrammingLanguage.idlScriptable This interface provides an enumeration of programming language identifiers. Inherits from: nsISupports Last changed in Gecko 0.9.5 Constants Identifiers for programming languages. Constant Value Description UNKNOWN 0 CPLUSPLUS 1 C++ JAVASCRIPT 2 JavaScript PYTHON 3 Python PERL 4 Perl JAVA 5 Java ZX81_BASIC 6 ZX81 Basic JAVASCRIPT2 7 JavaScript 2 RUBY 8 Ruby PHP 9 PHP TCL 10 TCL MAX 10 This will be kept at the largest index. ...
nsIProgressEventSink
netwerk/base/public/nsIProgressEventSink.idlScriptable This interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel. The information is intended to be displayed to the user in some meaningful way. Inherits from: nsISupports Last changed in Gecko 1.7 This interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel. The information is intended to be displayed to the user in some meaningful way. An implementation of this interface can be passed to a channel via the channel's notificationCallbacks attribute. See nsIChannel for more info. The channel will begin passing notifications to the progress event sink...
nsIPrompt
To avoid redundancy, all methods here link to nsIPromptService. ...
nsIPromptService
embedding/components/windowwatcher/public/nsIPromptService.idlScriptable This interface can be used to display simple dialogs. Its methods should be used in privileged code instead of DOM window.alert, window.confirm, and other similar functions. Inherits from: nsISupports Last changed in Gecko 1.7.5 You can define access keys (or keyboard shortcuts) for buttons by including an ampersand ("&") in front of the character that should be the access key for that button. If you need to include an ampersand in the button's text, use two of them, like this: "&&". Note: Some of these interface methods use out and inout parameters. In C++, out parameters are pointers. For JavaScript, they are extra work, as you can't use an out parameter directly. You need to wrap them in a temporary obje...
nsIProperty
xpcom/ds/nsIProperty.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Attributes Attribute Type Description name AString Get the name of the property. Read only. value nsIVariant Get the value of the property. Read only. ...
nsIPropertyBag2
xpcom/ds/nsIPropertyBag2.idlScriptable This interface extends nsIPropertyBag with some methods for getting properties in specific formats. ...
nsIPropertyElement
xpcom/ds/nsIPersistentProperties2.idlScriptable This interface provides access to individual entries within a stringbundle. Inherits from: nsISupports Last changed in Gecko 1.0 Attributes Attribute Type Description key AUTF8String The key used to refer to this property. value AString The string value stored for this property. See also XUL Tutorial:Property Files ...
nsIProtocolHandler
netwerk/base/nsIProtocolHandler.idlScriptable This interface is used to implement protocol handlers. If you wish to create a new protocol handler, you need to implement this interface. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean allowPort(in long port, in string scheme); nsIChannel newChannel(in nsIURI aURI); nsIURI newURI(in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Attributes Attribute Type Description defaultPort long The default port is the port the protocol uses by default. If the protocol doesn't need a port (for example, the "about" protocol), this attribute is -1. Read only. protocolFlags unsi...
nsIProtocolProxyCallback
netwerk/base/public/nsIProtocolProxyCallback.idlScriptable This interface serves as a closure for nsIProtocolProxyService.asyncResolve(). 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void onProxyAvailable(in nsICancelable aRequest, in nsIURI aURI, in nsIProxyInfo aProxyInfo, in nsresult aStatus); Methods onProxyAvailable() This method is called when proxy info is available or when an error in the proxy resolution occurs. void onProxyAvailable( in nsICancelable aRequest, in nsIURI aURI, in nsIProxyInfo aProxyInfo, in nsresult aStatus ); Parameters aRequest The value returned from asyncResolve. aURI The URI...
nsIPushMessage
This interface resembles PushMessageData from the Push API. Method overview DOMString text(); jsval json(); void binary([optional] out uint32_t dataLen, [array, retval, size_is(dataLen)] out uint8_t data); Methods text() Extracts the message data as a UTF-8 text string. DOMString text(); Parameters None. ...
nsIPushService
nsIPushService supports the Push API implementation in Firefox, and can be used directly from privileged code to create system subscriptions. ...
nsIPushSubscription
Sending a POST request to this URL routes the message to the instance of Firefox that created the subscription. A subscription also has a public key and secret; these are used to encrypt message payloads. This interface resembles PushSubscription from the Push API. ...
nsIRandomGenerator
netwerk/base/public/nsIRandomGenerator.idlScriptable Interface used to generate random data. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void generateRandomBytes(in unsigned long aLength, [retval, array, size_is(aLength)] out octet aBuffer); Methods generateRandomBytes() Generates the specified amount of random bytes. void generateRandomBytes( in unsigned long aLength, [retval, array, size_is(aLength)] out octet aBuffer ); Parameters aLength The length of the data to generate. aBuffer A buffer that contains random bytes of size aLength. ...
nsIRequest
netwerk/base/nsIRequest.idlScriptable This interface is used by the request initiator to control the request. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) For example nsIChannel typically passes itself as the nsIRequest argument to the nsIStreamListener on each onStartRequest, onDataAvaliable, and onStopRequest invocation. Method overview void cancel(in nsresult aStatus); boolean isPending(); void resume(); void suspend(); Attributes Attribute Type Description loadFlags nsLoadFlags The load flags of this request. Bits 0-15 are reserved. When added to a load group, this request's load flags are merged with the load flags of the load group.
nsIRequestObserver
netwerk/base/public/nsIRequestObserver.idlScriptable This interface is used by various streams (such as nsIChannel ) to indicate the start and end of a request. Inherits from: nsISupports Last changed in Gecko 1.0 Method overview void onStartRequest(in nsIRequest aRequest, in nsISupports aContext); void onStopRequest(in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode); Methods onStartRequest() Called to signify the beginning of an asynchronous request. Note: An exception thrown from onStartRequest has the side-effect of causing the request to be canceled. void onStartRequest( in nsIRequest aRequest, in nsISupports aContext ); Parameters aRequest Request being observed. aContext User defi...
nsISHistory
A handle to the session history object can be obtained from nsIWebNavigation. In a non-embedded situation, the owner of the session history component must create a instance of it and set it in the nsIWebNavigation object. ...
nsISHistoryListener
The listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method. ...
nsISOCKSSocketInfo
netwerk/socket/nsISOCKSSocketInfo.idlScriptable This interface provides information about a SOCKS socket. Inherits from: nsISupports Last changed in Gecko 1.7 Attributes Attribute Type Description destinationAddr PRNetAddrPtr The destination server address. Native code only! externalProxyAddr PRNetAddrPtr The external (remote) proxy address. Native code only! internalProxyAddr PRNetAddrPtr The internal (local) proxy address. Native code only! ...
nsIScreenManager
widget/public/nsIScreenManager.idlScriptable This interface lets you get information about the display screen (or screens) attached to the user's computer. 66 Introduced Gecko 0.9.5 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by: @mozilla.org/gfx/screenmanager;1 as a service: var screenManager = Components.classes["@mozilla.org/gfx/screenmanager;1"] .getService(Components.interfaces.nsIScreenManager); Method overview nsIScreen screenForNativeWidget( in voidPtr nativeWidget ); Native code only! nsIScreen screenForRect( in long left, in long top, in long width, in long height ); Attributes Attribute Type Description numberOfScreens unsigned long The number of screens on the user's computer. Read o...
nsIScriptableIO
rror codes. nsIScriptableIO provides a convenient API for creating files and streams, as well as for reading and writing data to them. For your convenience, this API is published through a global IO object. For more details about how to use this object, see the File and Stream Guide. network/base/public/nsIScriptableIO.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports A scriptable IO object can be used in an extension or chrome code by referring to the global IO object. For example: IO.getFile("Profile", "cookies.txt"); From an XPCOM component, however, you will need to get a reference as with other components: var scriptableIO = Components.classes["@mozilla.org/io/scriptable-io;1"] .get...
nsIScriptableUnescapeHTML
parser/html/nsIScriptableUnescapeHTML.idlScriptable This 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.nsIScriptab...
nsIScriptableUnicodeConverter
r APIs you are reading data from or writing data to don't require you to use this legacy representation, you should use TextDecoder and TextEncoder (available to chrome JavaScript via Components.utils.importGlobalProperties) instead of this API. intl/uconv/idl/nsIScriptableUConv.idlScriptable This interface is a Unicode encoder for use by scripts. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by: @mozilla.org/intl/scriptableunicodeconverter. To create an instance, use: var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); Method overview ACString ConvertFromUnicode(in AString aSrc); AC...
nsISearchEngine
netwerk/base/public/nsIBrowserSearchService.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 addParam(in AString name, in AString value, in AString responseType); nsISearchSubmission getSubmission(in AString data, [optional] in AString responseType, [optional] in AString purpose); boolean supportsResponseType(in AString responseType); Attributes Attribute Type Description alias AString An optional shortcut alias for the engine. When non-null, this is a unique identifier. description AString A text description describing the e...
nsISearchSubmission
netwerk/base/public/nsIBrowserSearchService.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Attributes Attribute Type Description postData nsIInputStream The POST data associated with a search submission, wrapped in a MIME input stream. May be null. Read only. uri nsIURI The URI to submit a search to. Read only. ...
nsISeekableStream
NS_SEEK_CUR 1 Specifies that the offset is relative to the current position in the stream. NS_SEEK_END 2 Specifies that the offset is relative to the end of the stream. ...
nsISelection
Implemented by: ?????????????????????????????????????. ...
nsISelection2
content/base/public/nsISelection2.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 8.0 Inherits from: nsISelection Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) In Gecko 8.0 this Interface was merged into the nsISelectionPrivate interface. Method overview void GetRangesForInterval(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, out PRUint32 resultCount, [retval, array, size_is(resultCount)] out nsIDOMRange results); void GetRangesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeAr...
nsISelectionImageService
layout/base/nsISelectionImageService.idlNot scriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void getImage(in short selectionValue, out imgIContainer container); void reset(); Methods getImage() Retrieve the image for alpha blending. void getImage( in short selectionValue, out imgIContainer container ); Parameters selectionValue container reset() The current image is marked as invalid. void reset(); Parameters None. ...
nsIServerSocket
The nsIServerSocket interface implements a server socket that can accept incoming connections. netwerk/base/public/nsIServerSocket.idlScriptable Please add a summary to this article. Last changed in Gecko 1.6 Inherits from: nsISupports Implemented by: @mozilla.org/network/server-socket;1. To create an instance, use: var serverSocket = Components.classes["@mozilla.org/network/server-socket;1"] .createInstance(Components.interfaces.nsIServerSocket); Method overview void init(in long aPort, in boolean aLoopbackOnly, in long aBackLog); void initWithAddress([const] in PRNetAddrPtr aAddr, in long aBackLog);Native code only! void close(); void asyncListen(in nsIServerSocketListener aListener); PRNetAddr ...
nsIServerSocketListener
is in the connected state, and read/write streams can be opened using the normal nsITransport API. The address of the client can be found by calling the nsISocketTransport.GetAddress() method or by inspecting nsISocketTransport.GetHost(), which returns a string representation of the client's IP address, which may be either an IPv4 or an IPv6 address. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void onSocketAccepted(in nsIServerSocket aServ, in nsISocketTransport aTransport); void onStopListening(in nsIServerSocket aServ, in nsresult aStatus); Methods onSocketAccepted() This method is called when a client connection is accepted. void onSocketAccepted( in nsIServerSocket aServ, in nsISocketTransport aTransport ); Parameters aServ ...
nsISmsService
dom/sms/interfaces/nsISmsService.idlScriptable Used to send SMS text messages for the WebSMS API 1.0 66 Introduced Gecko 13.0 Inherits from: nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsservice;1. To create an instance, use: var smsService = Components.classes["@mozilla.org/sms/smsservice;1"] .createInstance(Components.interfaces.nsISmsService); Method overview [implicit_jscontext] nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read ); unsigned short getNumberOfMessagesForText(in DOMString text); boolean hasSuppor...
nsISocketProvider
netwerk/socket/nsISocketProvider.idlScriptable This interface represents a socket provider. It is implemented by several types of socket classes like: UDP, SOCKS, TLS, SSL, and so on. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Implemented by: @mozilla.org/network/socket;2?type=foo. To create an instance, use: var socketProvider = Components.classes["@mozilla.org/network/socket;2?type="] .createInstance(Components.interfaces.nsISocketProvider); Method overview void addToSocket(in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, in PRFileDescStar aFileDesc, out nsISupports aSecurityInfo); Native code only! void newSocket...
nsISocketProviderService
netwerk/socket/nsISocketProviderService.idlScriptable Provides a mapping between a socket type and its associated socket provider instance. One could also use the service manager directly. 66 Introduced Gecko 1.0 Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsISocketProvider getSocketProvider(in string socketType); Methods getSocketProvider() Given a string representing a socket type, this method returns an nsISocketProvider representing that socket type. nsISocketProvider getSocketProvider( in string socketType ); Parameters socketType The socket type for which to get a socket provider. Return value nsISocketProvider that handles the specified socket type. See also nsISocketProvider nsIServiceManager ...
nsISocketTransport
netwerk/base/public/nsISocketTransport.idlScriptable This interface specializes nsITransport for communication over network sockets. It provides methods to open blocking or non-blocking, buffered or unbuffered streams between two end-point in a IP based network. Inherits from: nsITransport Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Note: Connection setup is triggered by opening an input or output stream, it does not start on its own. Completion of the connection setup is indicated by a STATUS_CONNECTED_TO notification to the event sink (if set). To create an instance, call nsISocketTransportService.createTransport() Method overview PRNetAddr getPeerAddr(); Native code only! PRNetAddr getSelfAddr(); Native code only!
nsISpeculativeConnect
netwerk/base/public/nsISpeculativeConnect.idlScriptable Lets non-networking code provide hints to the networking layer that an HTTP connection attempt to a particular site is likely to happen soon; this lets the networking layer begin setting up TCP and, if appropriate, SSL handshakes to save time when the connection is actually opened later. 1.0 66 Introduced Gecko 15.0 Inherits from: nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) To use this service, simply call nsISupports.QueryInterface() on the nsIIOService you plan to use for the connection, to get access to the I/O service's implementation of nsISpeculativeConnect. Then call speculativeConnect() to let the networking layer know what you might be doing in the fut...
nsIStackFrame
filename string Filename location. This is the location that caused the error, which may or may not be a source file location. For example, standard language errors would generally have the same location as their top stack entry. File parsers may put the location of the file they were parsing, and so forth. null indicates "no data" Read only. ...
nsIStreamConverter
You could implement this interface to allow everyone else to use your conversion logic using a standard api. Stream converter users There are currently two ways to use a stream converter: Synchronous: Stream to Stream. ...
nsIStreamListener
nsIRequestObserver contains two methods. So, in all the three methods - onDataAvailable(), nsIRequestObserver.onStartRequest() and nsIRequestObserver.onStopRequest() have to be implemented. ...
nsIStringBundle
It is recommended that you use the methods of XUL:stringbundle to access these functions unless necessary. Alternatively, a string bundle can be created within a javascript context with nsIStringBundleService. ...
nsIStringBundleOverride
intl/strres/nsIStringBundleOverride.idlScriptable Provides the string bundle override service; this interface is an implementation detail. You should never need to use it directly. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/intl/stringbundle/text-override;1. To create an instance, use: var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle/text-override;1"] .getService(Components.interfaces.nsIStringBundleOverride); Note: You should never need to use this service directly. Instead, the string bundle service will automatically try to load this service. If there is no custom-strings.txt file then the service will fail to load. Method overview nsISimpleEnumerator enumerateKeysInBund...
nsIStringBundleService
intl/strres/nsIStringBundle.idlScriptable Provides the string bundle service, which provides a way to fetch localized strings from a property file. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/intl/stringbundle;1. To access this service, use: var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); Method overview nsIStringBundle createBundle(in string aURLSpec); nsIStringBundle createExtensibleBundle(in string aRegistryKey); void flushBundles(); wstring formatStatusMessage(in nsresult aStatus, in wstring aStatusArg); Methods createBundle() nsIStringBundle createBundle( in s...
nsIStringEnumerator
The "next" element is the first string upon the first call. Must be preceded by a call to hasMoreElements() which returns PR_TRUE. This method is generally called within a loop to iterate over the strings in the enumerator. AString getNext(); Parameters None. Return value The next string in the enumerator. Throws an exception if there are no more strings. ...
nsIStyleSheetService
Allows extensions or embeddors to add to the built-in list of user or agent style sheets. 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. To create an instance, use: var styleSheetService = Components.classes["@mozilla.org/content/style-sheet-service;1"] .getService(Components.interfaces.nsIStyleSheetService); Method overview void loadAndRegisterSheet(in nsIURI sheetURI, in unsigned long type); boolean sheetRegistered(in nsIURI sheetURI, in unsigned long type); void unregisterSheet(in nsIURI sheetURI, in unsigned long t...
nsISupports
nsrefcnt AddRef(); Parameters None. Return value An integer value that is generally ignored. ...
nsISupportsArray
xpcom/ds/nsISupportsArray.idlScriptable Please add a summary to this article. ...
nsISupportsCString
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for ASCII character strings. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data ACString Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsChar
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for single character values (often used to store an ASCII character). Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data char Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsDouble
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for double-precision floating-point values. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data double Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsFloat
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for single-precision floating-point values. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data float Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsID
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for boolean values. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data nsIDPtr Provides access to the native type represented by the object. Methods toString() This method returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsInterfacePointer
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for XPCOM objects. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data nsISupports Provides access to the native type represented by the object. dataIID nsIDPtr Stores an IID corresponding to the data attribute. Methods toString() Returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRBool
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for boolean values. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRBool Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRInt16
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 16-bit signed integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRInt16 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRInt32
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 32-bit signed integers. 66 Introduced Gecko 1.0 Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRInt32 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRInt64
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 64-bit signed integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRInt64 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRTime
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for PRTime values. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRTime Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRUint16
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 16-bit unsigned integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRUint16 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRUint32
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 32-bit unsigned integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRUint32 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRUint64
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 64-bit unsigned integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRUint64 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPRUint8
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for 8-bit unsigned integers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRUint8 Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsPriority
xpcom/threads/nsISupportsPriority.idlScriptable This interface exposes the general notion of a scheduled object with an integral priority value. Following UNIX conventions, smaller (and possibly negative) values have higher priority. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) This interface does not strictly define what happens when the priority of an object is changed. An implementation of this interface is free to define the side-effects of changing the priority of an object. In some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored. Method overview void adjustPriority(in long delta); Attribute...
nsISupportsString
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for Unicode character strings. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data AString Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. See bug 166426 for details. From Gecko 2.0 interfaces are no longer frozen. ...
nsISupportsVoid
xpcom/ds/nsISupportsPrimitives.idlScriptable This interface provides scriptable access for generic pointers. Inherits from: nsISupportsPrimitive Last changed in Gecko 1.0 Method overview string toString(); Attributes Attribute Type Description data voidPtr This attribute provides access to the native type represented by the object. Native code only! Methods toString() string toString(); Parameters None. Return value A string valued representation of the object. ...
nsISupports proxies
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. XPCOM proxies were a technology which allowed code to make asynchronous or synchronous XPCOM calls to a different thread on arbitrary XPCOM interfaces. This technology has been removed in Firefox 12 because it was very complex and often lead to strange deadlock conditions. It is no longer needed because JavaScript code can no longer run on arbitrary threads, and compiled code can use compiled runnable to achieve the same effect in a much simpler manner. ...
nsITXTToHTMLConv
You should normally obtain an instance via the nsIStreamConverterService interface. ...
nsITaskbarPreviewController
widget/public/nsITaskbarPreviewController.idlScriptable This interface is used on Microsoft Windows to provide the behavior of taskbar previews. Its methods and properties are used by the nsITaskbarPreview interface. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Clients should provide their own implementation of this interface. Depending on whether the controller is connected to an nsITaskbarTabPreview or nsITaskbarWindowPreview, only certain methods and attributes need to be implemented. Method overview boolean drawPreview(in nsIDOMCanvasRenderingContext2D ctx); boolean drawThumbnail(in nsIDOMCanvasRenderingContext2D ctx, in unsigned long width, in unsigned...
nsITaskbarProgress
widget/public/nsITaskbarProgress.idlScriptable Starting in Windows 7, applications can display a progress notification in the taskbar. This class wraps around the native functionality to do this. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void setProgressState(in nsTaskbarProgressState state, in unsigned long long currentValue Optional, in unsigned long long maxValue Optional); Constants Constant Value Description STATE_NO_PROGRESS 0 Stop displaying progress on the taskbar button. This should be used when the operation is complete or canceled. STATE_INDETERMINATE 1 Display a cycling, indeterminate progress bar. STATE_NORMAL 2 Display a determina...
nsITaskbarTabPreview
widget/public/nsITaskbarTabPreview.idlScriptable This interface is used on Microsoft Windows to control tab preview specific behavior. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsITaskbarPreview Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Tab preview support is disabled by default in Gecko 1.9.2 Creating an nsITaskbarTabPreview for a window will automatically hide that window's nsITaskbarWindowPreview; this is done by Windows and cannot be prevented. When there are no more tab previews left for a window, the window preview is automatically made visible again. An application may have as many tab previews as memory allows. You can't directly instantiate this interface; instead, call the nsIWinTaskbar.createTaskbarTabPreview(). ...
nsIThread
This interface provides a high-level abstraction for an operating system thread. Threads have a built-in event queue, and a thread is an event target that can receive nsIRunnable objects (events) to be processed on the thread. To create a thread, use the nsIThreadManager interface. xpcom/threads/nsIThread.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsIEventTarget Method overview void shutdown() boolean hasPendingEvents() boolean processNextEvent(in boolean mayWait) Attributes Attribute Type Description PRThread PRThread The NSPR thread object corresponding to the nsIThread. Read only. Methods shutdown() Shuts down the thread. This causes events t...
nsIThreadEventFilter
ter interface may be implemented to determine whether or not an event may be accepted by a nested event queue; see nsIThreadInternal.PushEventQueue() for more information. You should implement this interface and its acceptEvent() method, then pass the object implementing it as the filter. xpcom/threads/nsIThreadInternal.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview boolean acceptEvent(in nsIRunnable event);Violates the XPCOM interface guidelines Methods Violates the XPCOM interface guidelines acceptEvent() This method is called to determine whether or not an event may be accepted by a nested event queue. (see nsIThreadInternal.PushEventQueue()) Warning: This method ...
nsIThreadInternal
The nsIThreadInternal interface is implemented by the XPCOM thread object to let consumers observe dispatch activity on a thread. xpcom/threads/nsIThreadInternal.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsIThread Method overview void popEventQueue(); void pushEventQueue(in nsIThreadEventFilter filter); Attributes Attribute Type Description observer nsIThreadObserver Get/set the current thread observer; set to null to disable observing. This attribute may be read from any thread but must only be set on the thread corresponding to this thread object. The observer will be released on the thread corresponding to this thread object after all other events have been pro...
nsIThreadManager
The nsIThreadManager interface lets applications and extensions create and manage threads, each of which is represented by an nsIThread. 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. isMainThread boolean This attribute is true if the calli...
nsIThreadObserver
The nsIThreadObserver interface may be implemented to let an observer implement a layered event queue. The implementation of this interface must be thread safe. xpcom/threads/nsIThreadInternal.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview void afterProcessNextEvent(in nsIThreadInternal thread, in unsigned long recursionDepth); void onDispatchedEvent(in nsIThreadInternal thread); void onProcessNextEvent(in nsIThreadInternal thread, in boolean mayWait, in unsigned long recursionDepth); Methods afterProcessNextEvent() Called by the nsIThread method nsIThread.ProcessNextEvent() after an event is processed. This method is only called on the target thread. Note: I...
nsIThreadPoolListener
The notification happens on the newly created thread. void onThreadCreated(); Parameters None. ...
nsITimer
as elapsed. nsITimer instances must be initialized by calling one of the initialization methods. You may also re-initialize (using one of the initialization methods) an existing instance to avoid the overhead of destroying and creating a timer. It is not necessary to cancel the timer in that case. xpcom/threads/nsITimer.idlScriptable Please add a summary to this article. Last changed in Gecko 5 (Firefox 5 / Thunderbird 5 / SeaMonkey 2.2) Inherits from: nsISupports Implemented by: @mozilla.org/timer;1. To create an instance, use: var timer = Components.classes["@mozilla.org/timer;1"] .createInstance(Components.interfaces.nsITimer); Users of instances of nsITimer should keep a reference to the timer until it is no longer needed in order to assure the timer is fired. M...
nsITimerCallback
This version takes a function to call and a closure to pass to that function. ...
nsIToolkit
void Init( in PRThread aThread ); Parameters aThread The thread passed in runs the message pump. ...
nsITraceableChannel
netwerk/base/public/nsITraceableChannel.idlScriptable This interface is used to allow intercepting of HTTP traffic. It is implemented by nsIHttpChannel. 1.0 66 Introduced Gecko 1.9.0.4 Inherits from: nsISupports Last changed in Gecko 1.9.0.4 The typical way to use this interface is as follows: Register for the "http-on-examine-response" notification to track all HTTP responses; Skip redirects (responseStatus = 3xx on nsIHttpChannel), since otherwise you may end up with two listeners registered for a channel; QI the channel passed as the "subject" to your observer to nsITraceableChannel, and replace the default nsIStreamListener (that passes the data to the original requester - e.g. to XMLHttpRequest or to the browser tab that made the request) with your own implementation...
nsITransaction
This attribute is checked by the transaction manager after the transaction's Execute() method is called. ...
nsITransactionList
Read only. Methods getChildListForItem() Returns the list of children associated with the item at aIndex. Implementations may return null if there are no children, or an empty list. ...
nsITransactionListener
editor/txmgr/idl/nsITransactionListener.idlScriptable This interface is implemented by an object that tracks transactions. ...
nsITransactionManager
editor/txmgr/idl/nsITransactionManager.idlScriptable This interface is implemented by an object that wants to manage/track transactions. ...
nsITransport
netwerk/base/public/nsITransport.idlScriptable This interface provides a common way of accessing i/o streams connected to some resource. This interface does not in any way specify the resource. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) This interface provides methods to open blocking or non-blocking, buffered or unbuffered streams to the resource. The name "transport" is meant to connote the inherent data transfer implied by this interface (that is, data is being transfered in some fashion via the streams exposed by this interface). A transport can have an event sink associated with it. The event sink receives transport-specific events as the transfer is occurring. For a socket transport, these events can include status a...
nsITransportEventSink
void onTransportStatus( in nsITransport aTransport, in nsresult aStatus, in unsigned long long aProgress, in unsigned long long aProgressMax ); Parameters aTransport The transport sending this status notification. ...
nsITransportSecurityInfo
Read only. securityState unsigned long A flag detailing the security state of the connection. ...
nsITreeColumn
Read only. ...
nsITreeColumns
The nsITreeColumns interface represents the tree columns. layout/xul/base/src/tree/public/nsITreeColumns.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview nsITreeColumn getColumnAt(in long index); nsITreeColumn getColumnFor(in nsIDOMElement element); nsITreeColumn getFirstColumn(); nsITreeColumn getKeyColumn(); nsITreeColumn getLastColumn(); nsITreeColumn getNamedColumn(in AString id); nsITreeColumn getPrimaryColumn(); nsITreeColumn getSortedColumn(); void invalidateColumns(); void restoreNaturalOrder(); Attributes Attribute Type Description count long The number of columns. Read only. length long An alias for count (for the benefit of scripts which treat this as an array)...
nsITreeContentView
The nsITreeContentView interface is implemented by tree views that are backed by DOM content. It is typically reached by calling QueryInterface on a nsITreeView. layout/xul/base/src/tree/public/nsITreeContentView.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8.0 Inherits from: nsISupports Method overview long getIndexOfItem(in nsIDOMElement item); nsIDOMElement getItemAtIndex(in long index); Attributes Attribute Type Description root nsIDOMElement The element in the DOM which this view uses as root content. Read only. Obsolete since Gecko 1.8 Methods getIndexOfItem() Retrieve the index associated with the specified content item. long getIndexOfItem( in nsIDOMElement item ); Parameters item A tree row for which to find the row ...
nsITreeSelection
layout/xul/base/src/tree/public/nsITreeSelection.idlScriptable This interface is used by the tree widget to get information about what is selected. ...
nsIURI
netwerk/base/public/nsIURI.idlScriptable This is an interface for an uniform resource identifier with internationalization support, offering attributes that allow setting and querying the basic components of a URI, and methods for performing basic operations on URIs. Inherits from: nsISupports Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) See the following RFCs for details: RFC3490: Internationalizing Domain Names in Applications (IDNA) RFC3986: Uniform Resource Identifier (URI): Generic Syntax RFC3987: Internationalized Resource Identifiers Subclasses of nsIURI, such as nsIURL, impose further structure on the URI. To create an nsIURI object, you should use nsIIOService.newURI(), like this: function makeURI(aURL, aOriginCharset, aBaseURI) { ...
nsIURIFixup
docshell/base/nsIURIFixup.idlScriptable Interface implemented by objects capable of fixing up strings into URIs. ...
nsIURIFixupInfo
preferredURI nsIURI Best guess of what URI consumer expects. May be null if we can't deliver (eg. the input is an invalid URI and FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP is not passed). Read only. fixedURI nsIURI The fixed-up original input, *never* using a keyword search. ...
nsIURLFormatter
toolkit/components/urlformatter/public/nsIURLFormatter.idlScriptable This interface exposes methods to substitute variables in URL formats. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Variable names can contain 'A-Z' letters and '_' characters. Mozilla applications linking to Mozilla websites are strongly encouraged to use URLs of the following format: http[s]://%SERVICE%.mozilla.[com|org]/%LOCALE%/ Method overview AString formatURL(in AString aFormat); AString formatURLPref(in AString aPref); Methods formatURL() Formats a string URL. The set of known variables is predefined. If a variable is unknown, it is left unchanged and a non-fatal error is reporte...
nsIUTF8ConverterService
If not, convert to UTF-8 assuming it's encoded in aCharset and return the converted string in UTF-8. ...
nsIUTF8StringEnumerator
The "next" element is the first string upon the first call. Must be preceded by a call to hasMore(), which returns PR_TRUE. This method is generally called within a loop to iterate over the strings in the enumerator. ...
nsIUUIDGenerator
xpcom/base/nsIUUIDGenerator.idlScriptable This interface can be used to generate an ID that can be considered globally unique, often referred to as a UUID or GUID. 1.0 66 Introduced Gecko 1.8.1 Inherits from: nsISupports Last changed in Gecko 1.8.1 (Firefox 2 / Thunderbird 2 / SeaMonkey 1.1) Implemented by @mozilla.org/uuid-generator; as a service: var uuidGenerator = Components.classes["@mozilla.org/uuid-generator;1"] .getService(Components.interfaces.nsIUUIDGenerator); Method overview nsIDPtr generateUUID(); void generateUUIDInPlace(in nsNonConstIDPtr id); Native code only! Methods generateUUID() Obtains a new UUID using appropriate platform-specific methods to obtain a nsID that can be considered to be globally unique. nsIDPtr ge...
nsIUpdateCheckListener
toolkit/mozapps/update/nsIUpdateService.idlScriptable An interface describing an object that listens to the progress of an update check operation. This object is notified as the check continues, finishes and if it has an error. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void onCheckComplete(in nsIXMLHttpRequest request, [array, size_is(updateCount)] in nsIUpdate updates, in unsigned long updateCount); void onError(in nsIXMLHttpRequest request, in nsIUpdate update); void onProgress(in nsIXMLHttpRequest request, in unsigned long position, in unsigned long totalSize); Methods onCheckComplete() Called when the update check is completed. void onCheckComple...
nsIUpdateChecker
toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes an object that knows how to check for software updates. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void checkForUpdates(in nsIUpdateCheckListener listener, in boolean force); void stopChecking(in unsigned short duration); Constants Constant Value Description CURRENT_CHECK 1 Constant for the stopChecking() method indicating that only the current update check should be stopped. CURRENT_SESSION 2 Constant for the stopChecking() method indicating that all update checks during the current session should be stopped. ANY_CHECKS 3 Constant for the stopChecking() method indic...
nsIUpdateManager
toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes a global application service that maintains a list of previously installed updates, as well as the currently in use update. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview nsIUpdate getUpdateAt(in long index); void saveUpdates(); Attributes Attribute Type Description activeUpdate nsIUpdate An nsIUpdate object describing the currently in use update. This update is not in the history list. Read only. updateCount long The number of updates in the history list; the updates can be fetched by calling getUpdateAt(). Read only. Methods getUpdateAt() Returns the update at the spe...
nsIUpdatePatch
toolkit/mozapps/update/nsIUpdateService.idlScriptable An interface that describes an object representing a patch file that can be downloaded and applied to a version of this application so that it can be updated. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsIDOMElement serialize(in nsIDOMDocument updates); Attributes Attribute Type Description finalURL AString The final URL this patch was being downloaded from. hashFunction AString The hash function to use when determining the integrity of the patch file. hashValue AString The value of the hash function named in hashFunction that should be computed if the file is not corrupt. selected bool...
nsIUpdateTimerManager
toolkit/mozapps/update/nsIUpdateTimerManager.idlScriptable This interface provides a global application service that provides support for long-duration timers (on the order of many days, weeks, or even months). These timers are used to schedule update checks in the future, for example. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void registerTimer(in AString id, in nsITimerCallback callback, in unsigned long interval); Methods registerTimer() Presents a user interface that checks for and displays the available updates. void registerTimer( in AString id, in nsITimerCallback callback, in unsigned long interval ); Parameters i...
nsIUploadChannel
netwerk/base/public/nsIUploadChannel.idlScriptable A channel may optionally implement this interface if it supports the notion of uploading a data stream. The upload stream may only be set prior to the invocation of asyncOpen on the channel. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void setUploadStream(in nsIInputStream aStream, in ACString aContentType, in long aContentLength); Attributes Attribute Type Description uploadStream nsIInputStream Get the stream (to be) uploaded by this channel. Read only. Methods setUploadStream() Sets a stream to be uploaded by this channel. Most implementations of this interface require that the stream: implement threadsafe addRef and release implement nsIInputStream.readSegments() implement nsISeekableS...
nsIUploadChannel2
netwerk/base/public/nsIUploadChannel2.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void explicitSetUploadStream(in nsIInputStream aStream, in ACString aContentType, in long long aContentLength, in ACString aMethod, in boolean aStreamHasHeaders); Methods explicitSetUploadStream() Sets a stream to be uploaded by this channel with the specified Content-Type and Content-Length header values. Most implementations of this interface require that the stream: implement threadsafe addRef and release implement nsIInputStream.readSegments() implement nsISeekableStream.seek(). void explicitSetUploadStream( in nsII...
nsIUserCertPicker
security/manager/ssl/public/nsIUserCertPicker.idlScriptable Please add a summary to this article. ...
nsIUserInfo
To get the service, use: var userInfo = Components.classes["@mozilla.org/userinfo;1"] .getService(Components.interfaces.nsIUserInfo); You can then look at the userInfo object's attributes to learn what the system knows about the user. Attributes Attribute Type Description Linux Mac OSX OS/2 Windows domain string Read only. ...
nsIVariant
xpcom/ds/nsIVariant.idlScriptable XPConnect has magic to transparently convert between nsIVariant and JS types. We mark the interface [scriptable] so that JS can use methods that refer to this interface. But we mark all the methods and attributes [noscript] since any nsIVariant object will be automatically converted to a JS type anyway. ...
nsIVersionComparator
A version-part consists of up to four parts, all of which are optional: <number-a><string-b><number-c><string-d (everything else)> A version-part may also consist of a single asterisk "*" which indicates * "infinity". Numbers are base-10, and are zero if left out. Strings are compared bytewise. ...
nsIWebBrowser
ebBrowser/nsIWebBrowser.idlScriptable This interface is implemented by web browser objects. Embedders use this interface during initialization to associate the new web browser instance with the embedders chrome and to register any listeners. The interface may also be used at runtime to obtain the content DOM window and from that the rest of the DOM. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Warning: This interface was frozen for a very long time, but was unfrozen for Gecko 2.0. Method overview void addWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); void removeWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); Attributes Attribute Type Description ...
nsIWebBrowserChrome
embedding/browser/webBrowser/nsIWebBrowserChrome.idlScriptable Corresponds to the top-level, outermost window containing an embedded Gecko web browser. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview void destroyBrowserWindow(); void exitModalEventLoop(in nsresult aStatus); boolean isWindowModal(); void setStatus(in unsigned long statusType, in wstring status); void showAsModal(); void sizeBrowserTo(in long aCX, in long aCY); Attributes Attribute Type Description chromeFlags unsigned long The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. webBrowser nsIWebBr...
nsIWebBrowserChrome3
embedding/browser/webBrowser/nsIWebBrowserChrome3.idlScriptable An extension to nsIWebBrowserChrome2. 1.0 66 Introduced Gecko 2.0 Inherits from: nsIWebBrowserChrome2 Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview AString onBeforeLinkTraversal(in AString originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab); Methods onBeforeLinkTraversal() Determines the appropriate target for a link. AString onBeforeLinkTraversal( in AString originalTarget, in nsIURI linkURI, in nsIDOMNode linkNode, in PRBool isAppTab ); Parameters originalTarget The original link target. linkURI Link destination URI. linkNode Link DOM node. isAppTab Whether or not the link...
nsIWebBrowserChromeFocus
embedding/browser/webBrowser/nsIWebBrowserChromeFocus.idlScriptable Implemented by the same object as nsIEmbeddingSiteWindow. It represents the focus up-calls from Mozilla to the embedding chrome. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void focusNextElement(); void focusPrevElement(); Methods focusNextElement() Set the focus at the next focusable element in the chrome. void focusNextElement(); Parameters None. focusPrevElement() Set the focus at the previous focusable element in the chrome. void focusPrevElement(); Parameters None. See also See bug 70224 for gratuitous information. ...
nsIWebBrowserFind
By default, the implementation will search the focused frame, or if there is no focused frame, the web browser content area. It does not by default search subframes or iframes. To change this behavior, and to explicitly set the frame to search, QueryInterface to nsIWebBrowserFindInFrames. ...
nsIWebBrowserFindInFrames
Attributes Attribute Type Description currentSearchFrame nsIDOMWindow Frame at which to start the search. Once the search is done, this will be set to be the last frame searched, whether or not a result was found. Has to be equal to or contained within the rootSearchFrame. ...
nsIWebBrowserPersist
embedding/components/webbrowserpersist/nsIWebBrowserPersist.idlScriptable Interface for persisting DOM documents and URIs to local or remote storage. Inherits from: nsICancelable Last changed in Gecko 36.0 (Firefox 36.0 / Thunderbird 36.0 / SeaMonkey 2.33) Implemented by: @mozilla.org/embedding/browser/nsWebBrowser;1 and @mozilla.org/embedding/browser/nsWebBrowserPersist;1. To create an instance, use: var webBrowserPersist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"] .createInstance(Components.interfaces.nsIWebBrowserPersist); Method overview void cancelSave(); void saveChannel(in nsIChannel aChannel, in nsISupports aFile); void saveDocument(in nsIDOMDocument aDocument, in nsISupports aFile, ...
nsIWebNavigation
docshell/base/nsIWebNavigation.idlScriptable Defines an interface for navigating the web. It provides methods and attributes to direct an object to navigate to a new location, stop or restart an in process load, or determine where the object has previously gone. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is implemented by the following components: * @mozilla.org/browser/shistory-internal;1 * @mozilla.org/browser/shistory;1 * @mozilla.org/embedding/browser/nsWebBrowser;1 * @mozilla.org/docshell;1 Gecko 1.9.2 note In Gecko 1.9.2 (Firefox 3.6), the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead. Method overview void goBack void goForward void gotoIndex...
nsIWebPageDescriptor
Read only. ...
nsIWebProgressListener2
An extended version of nsIWebProgressListener. uriloader/base/nsIWebProgressListener2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsIWebProgressListener Method overview void onProgressChange64(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, in long long aMaxTotalProgress); boolean onRefreshAttempted(in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in boolean aSameURI); Methods onProgressChange64() Notification that the progress has changed for one of the requests associated with aWebProgress. Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onState...
nsIWebSocketChannel
nsIWebSocketChannel netwerk/protocol/websocket/nsIWebSocketChannel.idlScriptable Provides support for WebSocket channels. 1.0 66 Introduced Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by: ?????????????????????????????????????. To create an instance, use: var webSocketChannel = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIWebSocketChannel); Method overview void asyncOpen(in nsIURI aURI, in ACString aOrigin, in nsIWebSocketListener aListener, in nsISupports aContext); void close(in unsigned short aCode, in AUTF8String aReason); void sendBinaryMsg(in ACString aMsg); vo...
nsIWebappsSupport
toolkit/components/webapps/nsIWebappsSupport.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void installApplication(in wstring title, in wstring uri, in wstring iconUri, in wstring iconData); boolean isApplicationInstalled(in wstring uri); Methods installApplication() This method installs a web application. void installApplication( in wstring title, in wstring uri, in wstring iconUri, in wstring iconData ); Parameters title The user-friendly name of the application. uri The uri of the web application. iconUri The uri of icon of the web application. iconData A base64 encoded representation of the ap...
nsIWifiListener
netwerk/wifi/nsIWifiListener.idlScriptable This interface is implemented by clients interested in receiving notifications when the list of available WiFi access points changes. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void onChange([array, size_is(aLen)] in nsIWifiAccessPoint accessPoints, in unsigned long aLen); void onError(in long error); Methods onChange() Called when the list of available access points changes. void onChange( [array, size_is(aLen)] in nsIWifiAccessPoint accessPoints, in unsigned long aLen ); Parameters accessPoints An array of nsIWifiAccessPoint objects representing all currently-available WiFi access points. aLen The n...
nsIWifiMonitor
netwerk/wifi/nsIWifiMonitor.idlScriptable This interface can be used to be alerted when the list of available WiFi access points changes. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) This is used, for example, by Geolocation to use WiFi access points for location detection. Implemented by @mozilla.org/wifi/monitor;1 as a service: var wifiMonitor = Components.classes["@mozilla.org/wifi/monitor;1"] .getService(Components.interfaces.nsIWifiMonitor); Method overview void startWatching(in nsIWifiListener aListener); void stopWatching(in nsIWifiListener aListener); Methods startWatching() Starts listening for changes to the WiFi access point list. void s...
nsIWindowCreator
embedding/base/nsIWindowCreator.idlScriptable A callback interface used by Gecko to create new browser windows. The application, either Mozilla or an embedding app, must provide an implementation of the Window Watcher component and notify the WindowWatcher during application initialization. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview nsIWebBrowserChrome createChromeWindow(in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); Methods createChromeWindow() Create a new window. Gecko will/may call this method, if made available to it, to create new windows. nsIWebBrowserChrome createChromeWindow( in nsIWebBrowserChrome parent, in PRUint32 chromeFlags ); Parameters parent The nsIWebBrowserChrome of the parent window, if any. null if no parent...
nsIWorker
Method overview void postMessage(in DOMString aMessage, [optional] in nsIWorkerMessagePort aMessagePort); Attributes Attribute Type Description onmessage nsIDOMEventListener An object to receive notifications when messages are received on the worker's message port. ...
nsIWorkerGlobalScope
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface is an abstract interface representing the 'inside' of a worker. This interface allows a worker to look up information about itself, as well as to control itself. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Attributes Attribute Type Description location nsIWorkerLocation Read only. navigator nsIWorkerNavigator Read only. onerror nsIDOMEventListener self nsIWorkerGlobalScope Returns the global scope object itself. Read only. See also Using web workers nsIWorkerMessagePort nsIWorkerMessageEvent nsIWorkerScope nsIAbstractWorker nsIWorker ...
nsIWorkerMessagePort
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents a worker thread's message port, which is used to allow the worker to post messages back to its creator. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void postMessage(in DOMString aMessage); Methods postMessage() Posts a message into the event queue. void postMessage( in DOMString aMessage ); Parameters aMessage The message to post. See also Using web workers nsIWorkerMessageEvent nsIWorkerGlobalScope nsIWorkerScope nsIAbstractWorker nsIWorker ...
nsIWorkerScope
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents the global scope in which a worker's script runs. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIWorkerGlobalScope Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void postMessage(in DOMString aMessage, [optional] in nsIWorkerMessagePort aMessagePort); void close(); Attributes Attribute Type Description onclose nsIDOMEventListener A listener object to be called when the worker stops running. onmessage nsIDOMEventListener A listener object to be called when a message is posted on the port. The message is in the event's data member. Methods close() Allows the worker to terminate itself. If a listener has been established...
nsIWritablePropertyBag
void deleteProperty( in AString name ); Parameters name Property to delete. Exceptions thrown NS_ERROR_FAILURE If a property with that name doesn't exist. setProperty() Set a property with the given name to the given value. ...
nsIXFormsModelElement
extensions/xforms/nsIXFormsModelElement.idlScriptable Defines scriptable methods for manipulating instance data and updating computed and displayed values. 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. rebuild() Signals th...
nsIXFormsNSInstanceElement
nsIXFormsNSInstanceElement is implemented by all XForms <instance/> elements, defining Mozilla extensions. extensions/xforms/nsIXFormsNSInstanceElement.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(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. Essentially it is just a shortcut to nsIXFormsModelElement::getInstanceDocument() for the given instance element. Related Interfaces nsIXFormsModelElemen...
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 Co...
nsIXMLHttpRequest
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. nsIXMLHttpRequest along with nsIJSXMLHttpRequest and nsIXMLHttpRequestEventTarget are Mozilla's implementation details of the DOM XMLHttpRequest object. Note: If you're a web developer or a Mozilla add-on developer, please refer to the XMLHttpRequest documentation instead. This page contains documentation, specific to Mozilla application and add-on developers. ...
nsIXMLHttpRequestEventTarget
content/base/public/nsIXMLHttpRequest.idlScriptable This interface provides access to the event listeners used when uploading data using the XMLHttpRequest object. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMEventTarget Last changed in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2) Attributes Attribute Type Description onabort nsIDOMEventListener A JavaScript function object that gets invoked if the operation is canceled by the user. onerror nsIDOMEventListener A JavaScript function object that gets invoked if the operation fails to complete due to an error. onload nsIDOMEventListener A JavaScript function object that gets invoked when the operation is successfully completed. onloadend nsIDOMEventListener A JavaScript functio...
nsIXPCException
js/src/xpconnect/idl/xpcexception.idlScriptable These exception objects are the preferred types of exceptions when implementing xpcom interfaces in JavaScript. ...
nsIXPCScriptable
Note: This is not really an XPCOM interface. For example, callers must guarantee that they set the *_retval of the various methods that return a boolean to PR_TRUE before making the call. Implementations may skip writing to *_retval unless they want to return PR_FALSE. js/src/xpconnect/idl/nsIXPCScriptable.idlNot scriptable Please add a summary to this article. ...
nsIXSLTException
content/xslt/public/nsIXSLTException.idlScriptable Please add a summary to this article. Inherits from: nsIException Last changed in Gecko 1.7 Attributes Attribute Type Description sourceNode nsIDOMNode The context node, may be null. Read only. styleNode nsIDOMNode The node in the stylesheet that triggered the exception. Read only. ...
nsIXSLTProcessor
content/xslt/public/nsIXSLTProcessor.idlScriptable XSLT Processor Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/document-transformer;1?type=xslt. To create an instance, use: var xsltProcessor = Components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createInstance(Components.interfaces.nsIXSLTProcessor); Method overview void clearParameters(); nsIVariant getParameter(in DOMString namespaceURI, in DOMString localName); void importStylesheet(in nsIDOMNode style); void removeParameter(in DOMString namespaceURI, in DOMString localName); void reset(); void setParameter(in DOMString namespaceURI, in DOMString localName, in nsIVariant value); nsIDOMDocument transformToDocument(in nsIDOMNode source); ...
nsIXSLTProcessorObsolete
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Use nsIXSLTProcessor instead. ...
nsIXULBrowserWindow
xpfe/appshell/public/nsIXULBrowserWindow.idlScriptable Provides methods that may be called from the internals of the browser area to tell the containing XUL window to update its user interface. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The XULBrowserWindow attribute exists on the nsIXULWindow interface although both Firefox and SeaMonkey also store their nsIXULBrowserWindow reference in the global XULBrowserWindow object accessible from JavaScript code. Note: The XULBrowserWindow object offered to JavaScript code provides a great many more methods and attributes than those listed here, which are only the ones available to C++ code. See the documentation for XULBrowserWindow for details. Method overview AString onBeforeLi...
nsIXULBuilderListener
void didRebuild( in nsIXULTemplateBuilder aBuilder ); Parameters aBuilder The template builder that has rebuilt the content. ...
nsIXULRuntime
xpcom/system/nsIXULRuntime.idlScriptable Provides information about the XUL runtime to allow extensions and XUL applications to determine information about the XUL runtime. 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. To get an instance, use: var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime); Method overview void invalidateCachesOnRestart(); Attributes Attribute Type Description accessibilityEnabled boolean If true, the accessibility service is running. Read only. browserTabsRemoteAutosta...
nsIXULSortService
content/xul/templates/public/nsIXULSortService.idlScriptable A service used to sort the contents of a XUL widget. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void insertContainerNode(in nsIRDFCompositeDataSource db, in nsRDFSortState sortStatePtr, in nsIContent root, in nsIContent trueParent, in nsIContent container, in nsIContent node, in boolean aNotify); Native code only! Obsolete since Gecko 1.9 void sort(in nsIDOMNode aNode, in AString aSortKey, in AString aSortHints); Constants Constant Value Description SORT_COMPARECASE 0x0001 SORT_INTEGER 0x0100 Methods Native code only!insertContainerNode Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in ...
nsIXULTemplateBuilder
become active, the content for the existing match is removed and the content for the new match is generated. A query processor is not required to provide any support for updating results after they have been generated. See the Template Guide for more information about templates. /xul/templates/public/nsIXULTemplateBuilder.idlScriptable Please add a summary to this article. ...
nsIXULTemplateQueryProcessor
ontent/xul/templates/public/nsIXULTemplateQueryProcessor.idlScriptable A query processor takes a template query and generates results for it given a datasource and a reference point. There is a one-to-one relationship between a template builder and a query processor. The template builder creates the query processor, and there is no other means to retrieve it. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) A query processor takes a template query and generates results for it given a datasource and a reference point. There is a one-to-one relationship between a template builder and a query processor. The template builder creates the query processor, and there is no other means to retrieve it. A template query is the contents i...
nsIXULTemplateResult
The result may optionally be identified by an RDF resource. Generally, the result and its id will be able to uniquely identify a node in the source data, such as an RDF or XML node. In other contexts, such as a database query, a result would represent a particular record. ...
nsIXULWindow
When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
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. ...
nsIZipWriter
modules/libjar/zipwriter/public/nsIZipWriter.idlScriptable This interface provides an easy way for scripts to archive data in the Zip file format. Operations on the archive can be performed one by one, or queued for later execution. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Once all the operations you wish to perform are added to the queue, a call to processQueue() will perform the operations in the order they were added to the queue. Operations performed on the queue throw any errors that occur out to the observer. Attempting to perform a synchronous operation on the interface while the background queue is in progress will throw an NS_ERROR_IN_PROGRESS exception. File and directory names should use slashes ...
nsICookie2 MOZILLA 1 8 BRANCH
netwerk/cookie/public/nsICookie2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsICookie2 Attributes Attribute Type Description isHttpOnly boolean Holds true if the cookie is an http only cookie. Read only. See also nsICookie2 ...
nsMsgNavigationType
ct(); gDBView.viewNavigate(Components.interfaces.nsMsgNavigationType.nextMessage, resultId, resultIndex, threadIndex, true); The nsMsgNavigationType interface is defined as a global variable in Thunderbird: var nsMsgViewCommandType = Components.interfaces.nsMsgViewCommandType; mailnews/base/public/nsIMsgDBView.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Constants Name Value Description firstMessage 1 Go to the first message in the view. nextMessage 2 Go to the next message in the view. Will wrap around if the wrap flag is set to true. previousMessage 3 Go to the previous message in the view. Will wrap around if the wrap flag is set to true. lastMessage 4 Go to the last message in the view. toggleThreadKilled 5 ...
nsMsgViewCommandCheckState
The nsMsgViewCommandCheckState interface contains constants used for command status in Thunderbird. ...
nsMsgViewCommandType
The nsMsgViewCommandType interface contains constants used for commands in Thunderbird. For example to mark a message read, you would call: // assuming gDBView is a global nsIMsgDBView gDBView.doCommand(Components.interfaces.nsMsgViewCommandType.markMessagesRead); mailnews/base/public/nsIMsgDBView.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Constants Name Value Description markMessagesRead 0 Marks the selected messages as read. markMessagesUnread 1 Mark the selected messages as unread toggleMessageRead 2 Toggle the read flag of the selected messages flagMessages 3 Flag the selected messages. unflagMessages 4 Unflag the selected messages. toggleThreadWatched 6 Toggle the watched state of the selected thread...
nsMsgViewSortOrder
The nsMsgViewSortOrder interface contains constants used for sort direction in Thunderbird. This interface isn't ever implemented. ...
nsMsgViewSortType
The nsMsgViewSortType interface contains constants used for sorting the Thunderbird threadpane. This interface isn't ever implemented. It is only used to store constants. For example to sort by date you would pass a function the value: Components.interfaces.nsMsgViewSortType.byDate mailnews/base/public/nsIMsgDBView.idlScriptable Please add a summary to this article. ...
XPCOM reference
t that "boxes" a value of a primitive type. All XPCOM primitives are scriptable, and they all implement an XPCOM interface from the table below.XPCOM string functionsXPCOM provides these low-level string functions to let you work with strings; however, it's often better to use one of the string classes rather than directly using these functions. Many XPCOM pages return an nsresult. Prior to Gecko 19 (Firefox 19 / Thunderbird 19 / SeaMonkey 2.16), this was an integer that simply returned an error code. It is now a strongly typed enum when XPCOM is built using a C++11 compiler. This causes compile-time errors to occur when improper values are returned as nsresult values, thereby making it easier to catch many bugs. ...
Setting HTTP request headers
: httpRequestObserver.register(); You should also remember to unregister the observer at shutdown: httpRequestObserver.unregister(); And that's it. XPCOM components You need to register a single http-on-modify-request observer per application (and not one per window). This means that you should put the observer's implementation in an XPCOM component instead of an overlay. If you want to support Gecko2 (Firefox4) you need to register your javascript component as described here: https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0#JavaScript_components. var headerName = "X-hello"; var headerValue = "world"; function LOG(text) { // var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService); // consoleS...
Using the clipboard
idget/transferable;1", "nsITransferable"); // Create a wrapper to construct an nsITransferable instance and set its source to the given window, when necessary function Transferable(source) { var res = nsTransferable(); if ('init' in res) { // When passed a Window object, find a suitable privacy context for it. ...
nsCOMPtr versus RefPtr
This guide provides some explanation and advice on how to choose between them. General Rule of Thumb for nsCOMPtr versus RefPtr The general rule of thumb is to use nsCOMPtr<T> when T is an interface type, and RefPtr<T> when T is a concrete type. This basic rule derives from the fact that some of the nsCOMPtr<T> code is factored into the nsCOMPtr_base base class, which stores the underlying mRawPtr as an nsISupports*. (although, confusingly, debug builds don't work this way). This design saves some space in the binary (or at least it used to). Since nsCOMPtr stores the pointer as an nsISupports*, it must be possible to unambiguously cast from T* to nsISupports*. ...
Generating xpt on Windows
In order to generate an .xpt file from an .idl file in recent versions of the Gecko \ XUL Runner SDK in Windows, you need to use the typelib.py script. Assuming you installed your XULRunner SDK at <MOZSDKDIR>, you then need to issue a command similar to C:\working-dir> <MOZSDKDIR>\sdk\bin\typelib.py <InputFile.idl> -o <OutputFile.xpt> -I <MOZSDKDIR>\idl ...
pyxpidl
The pyxpidl tool suite has been built to replace the older xpidl tool which, in the past, was used to turn XPIDL files into C++ headers and XPCOM typelibs (XPT files). The newer utility has the advantage of not needing any code to be compiled in order to use it, and let us remove a bunch of old code from the tree. pyxpidl has been in use for a while, but replaced xpidl in the Gecko SDK starting in Gecko 9.0. Using pyxpidl pyxpidl is in the SDK in the sdkdir/sdk/bin/ directory. Unlike xpidl, which combined all the functions into a single utility, pyxpidl is comprised of two utilities: header.py, which generates C++ headers from IDL, and typelib.py, which generates XPT files. pyxpidl requires a directory to cache certain information in. You can use a temporary directory or the curren...
xpidl
Mozilla › Tech › XPIDL › xpidl
xpidl is a tool for generating XPCOM interface information, based on XPIDL interface description files. It generates: C++ header files (.h), with a commented template for full C++ implementation of the interface XPConnect typelib files (.xpt), with runtime type information to dynamically call XPCOM objects through XPConnect Note: Starting in Gecko 9.0, xpidl has been replaced with pyxpidl in the Gecko SDK. pyxpidl has been used for some time now, but now this older tool has been fully retired. xpidl is based on the libIDL idl compiler from the Gnome project. The libIDL compiler depends on glib, also from the Gnome project. The xpidl compiler is now part of the build process, allowing us to generate headers used by the XPCOM components. Please check the Build Documentation for f...
XPIDL
e Description Language used to specify XPCOM interface classes. Interface Description Languages (IDL) are used to describe interfaces in a language- and machine-independent way. IDLs make it possible to define interfaces which can then be processed by tools to autogenerate language-dependent interface specifications. XPIDL is expected to converge towards WebIDL in the future. Note: Starting in Gecko 9.0, the older xpidl utility, which was previously used to generate C++ header files, typelib information, and so forth has been replaced with pyxpidl in the Gecko SDK. pyxpidl has been used for some time now, but now the older tool has been fully retired. Writing XPIDL interface files XPIDL closely resembles OMG IDL, with extended syntax to handle IIDs and additional types. Some examples are ...
XTF
Mozilla › Tech › XTF
nts to Mozilla (written in JavaScript or C++). For example, the Mozilla XForms Project uses XTF to add support for the XForms namespace. Documentation XTF Readme The XTF readme. XTF Home The XTF home (outdated). XTF: When XBL Just Won't Cut It More recent primer to XTF by Alex Vincent. Extending Gecko with XBL and XTF A presentation given at XTech 2005 comparing XBL and XTF, as well as discussing XTF basics. View All... Tools DOM Inspector Related Topics DOM, XBL ...
XUL Overlays
Mozilla › Tech › XUL › Overlays
, or stored, contains information about the components or additional packages that have been installed with the browser. When a component such as the "Super Stream Player" from the examples above is registered there, overlays associated with that component are loaded automatically. When the component is not present, only the base files are loaded. Loading overlays at runtime Firefox 1.5 and other Gecko 1.8-based applications also support loading overlays on-the-fly via the document.loadOverlay() function. TODO: elaborate Overlays and skins Warning: Always load master skins from base files. Never load master skins from overlays. Unlike base files, overlays should never load the master skin file for a package. The navigatorOverlay.xul file, for example, does not and should never load the naviga...
Events
This reference will help you track those events down and learn how to use them. Composition Event Name Event Type Fired when... compose-send-message A message gets sent compose-window-close A compose window gets closed compose-window-init A compose window has been opened compose-window-reopen A cached compose window has been reopened. ...
Building a Thunderbird extension 1: introduction
Similar to Firefox, Thunderbird functionality can be enhanced and customized via extensions. Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. This tutorial will introduce you to the components of a Thunderbird extension and will show you how to build your own. ...
Building a Thunderbird extension 6: Adding JavaScript
. We use the function window.setInterval to update the date in case Thunderbird is left running for more than one day. This allows us to call the startup function repeatedly with an interval of 60000ms (every minute). Further Documentation More functions for the dom objects are listed on: DOM/Window (API reference for the Window object) DOM/Document (API reference for the Document object) Gecko DOM Reference (overview of all DOM objects in Gecko) You may also find the Javascript Cheat Sheet very useful. << PreviousNext >> ...
Using Mozilla code in other projects
op applications, called XUL, atop which you can build applications. Various components of the platform, such as the SpiderMonkey JavaScript engine, can be used in your own projects without the rest of the platform. There are also modules that aren't used in Firefox but are available for use by other applications; an example of this is Rhino, the JavaScript engine written in Java. You can embed Gecko, the layout engine used by Firefox to process web pages, as a browser within your own application. Building XUL applications The Joy of XUL An introduction to XUL; a must read for new developers. XUL Reference The complete reference to XUL. XULRunner A Mozilla runtime package that can be used to bootstrap XUL and XPCOM applications with ease. ...
XPI
install.rdf) as well as the actual software to install, which is often itself packaged as a JAR file. When downloaded or dropped into an extension manager, XPInstall automatically interacts with the installation instructions contained in the XPI, and installs the contained software. XPI archives only support files stored uncompressed or compressed using the "deflate" method. 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 X...
js-ctypes
n Firefox. ...
Drawing and Event Handling - Plugins
drawable can be defined in several ways, depending on the platform. Windowless plug-ins can be opaque or transparent. A windowless plug-in draws itself only in response to a paint message from the browser. For information about the way HTML determines plug-in display mode, see Using HTML to Display Plug-ins. NOTE: Windowless plug-ins were not supported on the X Window System platform prior to Gecko 1.9 Alpha 7 (bug 137189). The NPWindow Structure When a plug-in is loaded, it is drawn into a target area. This target is either the windowed plug-in's native window, or the drawable of a windowless plug-in. The NPWindow structure represents either the native window or a drawable. This structure contains information about coordinate position, size, the state of the plug-in (windowed or windowl...
Dominators view - Firefox Developer Tools
he snapshot are retaining the most memory the Retaining Paths panel (new in Firefox 47) shows the 5 shortest retaining paths for a single node. Dominators Tree panel The Dominators Tree tells you which objects in the snapshot are retaining the most memory. In the main part of the UI, the first row is labeled "GC Roots". Immediately underneath that is an entry for: Every GC root node. In Gecko, there is more than one memory graph, and therefore more than one root. There may be many (often temporary) roots. For example: variables allocated on the stack need to be rooted, or internal caches may need to root their elements. Any other node that's referenced from two different roots (since in this case, neither root dominates it). Each entry displays: the retained size of the node, as...
Network request details - Firefox Developer Tools
For each line in the request headers section, a question mark links to the documentation for that request header, if one is available. A Raw toggle button in the section heading controls whether the headers are shown with formatting, or as plain, unformatted text. ...
Flame Chart - Firefox Developer Tools
erneath bubbleSort() are the calls to swap(). If you counted them all, the Call Tree view tells us that you'd see 253 of them. All the ones in this zoom are underneath bubbleSort(), but according to the Call Tree view, the profile does contain one under selectionSort(). We can also see that two of the green markers are for selectionSort() and quickSort(), but we're also seeing calls to platform (Gecko) code in between our calls to the sorting functions. It seems very likely that this is from the console.log() calls in sort(). ...
Remote Debugging - Firefox Developer Tools
You can use the Firefox developer tools on your desktop to debug Web sites and Web apps running in other browsers or runtimes. The other browser might be on the same device as the tools themselves or on a different device, such as a phone connected over USB. The detailed instructions for connecting the developer tools are specific to the runtime. You can connect the developer tools to Gecko-based runtimes like Firefox Desktop, Firefox for Android, and Thunderbird. Firefox Desktop Firefox for Android over USB ...
Settings - Firefox Developer Tools
losing character ] or } for you. Indent using spaces When checked, indentation will be performed using spaces, when off, the editor will use tabs instead. Tab size The frequency of tab stops in the editor. Select 2, 4, or 8. Keybindings Choose the default CodeMirror keybindings or keybindings from one of several popular editors: Vim Emacs Sublime Text Advanced settings Show Gecko platform data A setting to control whether or not profiles should include Gecko platform symbols. Disable HTTP Cache Disable the browser HTTP cache to simulate first-load performance in all tabs that have the Toolbox open. This setting persists, meaning that if it is set, caching will be disabled whenever you reopen the devtools. Caching is re-enabled when the devtools are closed. Note that...
The JavaScript input interpreter - Firefox Developer Tools
provided, ANY_TYPE is used. keys() Given an object, returns a list of the keys (or property names) on that object. This is a shortcut for Object.keys. values() Given an object, returns a list of the values on that object; serves as a companion to keys(). clear() Clears the console output area. inspect() Given an object, opens the object inspector for that object. pprint() Obsolete since Gecko 74 Formats the specified value in a readable way; this is useful for dumping the contents of objects and arrays. help()Deprecated since Gecko 62 :help Displays help text. Actually, in a delightful example of recursion, it will bring you to this page. cd() Switch JavaScript evaluation context to a different iframe in the page. This helper accepts multiple different ways of identifying the ...
Web Console remoting - Firefox Developer Tools
Error - for simplicity. We only removed several unneeded properties and changed how flags work. The private flag tells if the error comes from a private window/tab (added in Firefox 24). Starting with Firefox 24 the errorMessage and lineText properties can be long string actor grips if the string is very long. Console API messages The window.console API calls send internal messages throughout Gecko which allow us to do whatever we want for each call. The Web Console actor sends these messages to the remote debugging client. We use the ObjectActor from dbg-script-actors.js without a ThreadActor, to avoid slowing down the page scripts - the debugger deoptimizes JavaScript execution in the target page. The lifetime of object actors in the Web Console is different than the lifetime of these ob...
Attr.localName - Web APIs
Web › API › Attr › localName
element = document.querySelector("#example"); element.addEventListener("click", function() { const attribute = element.attributes[0]; alert(attribute.localName); }); Notes The local name of an attribute is the part of the attribute's qualified name that comes after the colon. Qualified names are typically used in XML as part of the namespace(s) of the particular XML documents. Note: In Gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for HTML attributes in HTML DOMs (as opposed to XHTML attributes in XML DOMs). In later versions, in compliance with HTML5, the property returns in the case of the internal DOM storage, which is lower case for both HTML attributes in HTML DOMs and XHTML attributes in XML DOMs. Specifications Specificatio...
BeforeUnloadEvent - Web APIs
valent to window.addEventListener("beforeunload", function( event ) { event.preventDefault(); }); WebKit-derived browsers don't follow the spec for the dialog box. An almost-cross-browser working example would be close to the below example. window.addEventListener("beforeunload", function (e) { var confirmationMessage = "\o/"; (e || window.event).returnValue = confirmationMessage; // Gecko + IE return confirmationMessage; /* Safari, Chrome, and other * WebKit-derived browsers */ }); Specifications Specification Status Comment HTML Living StandardThe definition of 'BeforeUnloadEvent' in that specification. Living Standard Initial definition ...
CSSOMString - Web APIs
se whether to use DOMString or USVString. While browser implementations that use UTF-8 internally to represent strings in memory can use USVString when the specification says CSSOMString, implementations that already represent strings as 16-bit sequences might choose to use DOMString instead. Implementation differences Browser DOMString or USVString for CSSOMString Firefox (Gecko) USVString Chrome (Blink) USVString Safari (WebKit) USVString Edge (EdgeHTML) - Opera (Blink) USVString Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'CSSOMString' in that specification. Working Draft Initial definition. ...
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
This API cannot be used by Web content. ...
CanvasRenderingContext2D.filter - Web APIs
erty. HTML <canvas id="canvas"></canvas> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); ctx.filter = 'blur(4px)'; ctx.font = '48px serif'; ctx.fillText('Hello world', 50, 100); Result Applying multiple filters You can combine as many filters as you like. This example applies the contrast, sepia, and drop-shadow filters to a photo of a gecko. HTML <canvas id="canvas"></canvas> <div style="display:none;"> <img id="source" src="https://udn.realityripple.com/samples/90/a34a525ace.jpg"> </div> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); const image = document.getElementById('source'); image.addEventListener('load', e => { ctx.filter = 'contrast(1.4) sepia(1) drop-shado...
Drawing text - Web APIs
. measureText() Returns a TextMetrics object containing the width, in pixels, that the specified text will be when drawn in the current text style. The following code snippet shows how you can measure a text and get its width. function draw() { var ctx = document.getElementById('canvas').getContext('2d'); var text = ctx.measureText('foo'); // TextMetrics object text.width; // 16; } Gecko-specific notes In Gecko (the rendering engine of Firefox, Firefox OS and other Mozilla based applications), some prefixed APIs were implemented in earlier versions to draw text on a canvas. These are now deprecated and removed, and are no longer guaranteed to work. << PreviousNext >> ...
CrashReportBody - Web APIs
sponsive. Examples Crash reports are generally only retrievable via endpoints set up using the Report-To header. It is difficult to retrieve a crash report via a ReportingObserver, as by that point the page would have crashed! Some sample JSON might look like this: { "type": "crash", "age": 42, "url": "https://example.com/", "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0", "body": { "reason": "oom" } } Note: Crash reports are always delivered to the endpoint group named default; there is currently no way to override this. If you want to receive other kinds of reports, but not crash reports, make sure to use a different name for the endpoint group that you choose for those reports. Specifications Specification Status...
CustomEvent - Web APIs
o the same element as well as those attached to elements that will be traversed later (during the capture phase, for instance). Event.stopPropagation() Stops the propagation of events further along in the DOM. Obsolete methods Event.getPreventDefault() Non-standard; use Event.defaultPrevented instead. (Returns the value of Event.defaultPrevented.) Event.preventBubble() Obsolete since Gecko 24 Obsolete; use event.stopPropagation instead. (Prevents the event from bubbling.) Event.preventCapture() Obsolete since Gecko 24 Obsolete; use event.stopPropagation instead. Specifications Specification Status Comment DOMThe definition of 'CustomEvent' in that specification. Living Standard Initial definition. ...
DOMConfiguration - Web APIs
Note: This interface has never been supported in Gecko, and has been removed from the DOM specification. Pre-defined parameters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" Properties DOMConfiguration.parameterNames Read only Is a DOMStringList Methods DOMConfiguration.canSetParameter() Returns a Boolean DOMConfiguration.getParameter() Returns a DOMUserData DOMConfiguration.setParameter() Sets a parameter Specification http://www.w3.org/TR/DOM-Level-3-Cor...MConfiguration ...
DataTransfer.addElement() - Web APIs
Syntax void dataTransfer.addElement(el); Arguments el The Element to set as the drag source. ...
DataTransfer.mozClearDataAt() - Web APIs
ument is not provided, then the data associated with all formats is removed. If the format is not found, then this method has no effect. If the last format for the item is removed, the entire item is removed, reducing mozItemCount by one. Removing the last format for a particular index removes that item entirely, shifting the remaining items down and changing their indices. Note: This method is Gecko-specific. Syntax void dataTransfer.mozClearDataAt([type], index); Arguments type A string representing the type of the drag data to remove from the drag data object. index A unsigned long representing the index of the data to remove. Return value void Example This example shows the use of the mozClearDataAt() method in a dragend event handler. function dragend_handler(event) ...
DataTransfer.mozCursor - Web APIs
The DataTransfer.mozCursor property returns or sets the drag cursor's state. This is primarily used to control the cursor during tab drags. The possible values are: auto Uses the default system behavior. default Uses the default Gecko behavior, which is to set the cursor to an arrow during the drag operation. Note: If any value other than default is set, auto is assumed. Note: This property is currently only implemented on Windows. Note: This property is Gecko-specific. Syntax dataTransfer.mozCursor; Return value A DOMString representing one of the values listed above. Example This example shows the use of the mozCursor property. function drop_handler(event) { var dragData = event.dataTransfer; console.log("mozCursor = " + dragData.mozCursor); } Specifications This ...
DataTransfer.mozGetDataAt() - Web APIs
The DataTransfer.mozGetDataAt() method is used to retrieve an item in the drag event's data transfer object, based on a given format and index. This method returns null if the specified item does not exist or if the index is not in the range from zero to the number of items minus one. Note: This method is Gecko-specific. Syntax nsIVariant dataTransfer.mozGetDataAt([type], index); Arguments type A string representing the type of the drag data to retrieve from the drag data object. index A unsigned long representing the index of the data to retrieve. Return value nsIVariant The data item requested. If the specified item does not exist, null is returned. Example This example shows the use of the mozGetDataAt() method in a drop event handler. function drop_handler(event) { ...
DataTransfer.mozItemCount - Web APIs
This property is Read only . Syntax dataTransfer.mozItemCount; Return value A number representing the number of items being dragged. Example This example shows the use of the mozItemCount property. ...
DataTransfer.mozSetDataAt() - Web APIs
mCount is incremented by one. Data should be added in order of preference, with the most specific format added first and the least specific format added last. If data of the given format already exists, it is replaced in the same position as the old data. The data should be either a string, a Boolean or number type (which will be converted into a string) or an nsISupports. Note: This method is Gecko-specific. Syntax void dataTransfer.mozSetDataAt([type], data, index); Arguments type A string representing the type of the drag data to add to the drag data object. data A nsIVariant representing the data to add to the drag data object. index A unsigned long representing the index of the data to add. Return value void Example This example shows the use of the mozSetDataAt() ...
DataTransfer.mozSourceNode - Web APIs
This property is Read only . Syntax dataTransfer.mozSourceNode; Return value A Node representing node where the drag originated. ...
DataTransfer.mozTypesAt() - Web APIs
Syntax nsIVariant dataTransfer.mozTypesAt(index); Arguments index A unsigned long that is the index of the data for which to retrieve the types. Return value nsIVariant A list of data formats (which are strings). ...
DataTransfer.mozUserCancelled - Web APIs
This property is Read only . Syntax dataTransfer.mozUserCancelled; Return value A Boolean representing true if the user canceled the drag event and returns false otherwise. ...
Document.alinkColor - Web APIs
(e.g., blue, darkblue, etc.) or the hexadecimal value of the color (e.g., #0000FF) Notes The default value for this property in Mozilla Firefox is red (#ee0000 in hexadecimal). document.alinkColor is deprecated in DOM Level 2 HTML. One alternative is the CSS selector :active. Another alternative is document.body.aLink, although this is deprecated in HTML 4.01 in favor of the CSS alternative. Gecko supports both alinkColor/:active and :focus. Internet Explorer 6 and 7 support alinkColor/:active only for HTML anchor (<a>) links and the behavior is the same as :focus under Gecko. There is no support for :focus in IE. ...
Document.applets - Web APIs
Web › API › Document › applets
Since then, calling document.applets in those browsers always returns an empty HTMLCollection. Removal is being considered in WebKit and Edge. Syntax var nodeList = document.applets; Value An HTMLCollection. Example // When you know the second applet is the one you want my_java_app = document.applets[1]; Specifications Specification Status Comment HTML Living StandardThe definition of 'Document.applets' in that specification. ...
Document.cookie - Web APIs
Web › API › Document › cookie
ou can only set/update a single cookie at a time using this method. Consider also that: Any of the following cookie attribute values can optionally follow the key-value pair, specifying the cookie to set/update, and preceded by a semi-colon separator: ;path=path (e.g., '/', '/mydir') If not specified, defaults to the current path of the current document location. Note: Prior to Gecko 6.0, paths with quotes were treated as if the quotes were part of the string, instead of as if they were delimiters surrounding the actual path string. This has been fixed. ;domain=domain (e.g., 'example.com' or 'subdomain.example.com'). If not specified, this defaults to the host portion of the current document location. Contrary to earlier specifications, leading dots in domain names are...
Document.createNodeIterator() - Web APIs
eptNode() method will be called for each node in the subtree based at root which is accepted as included by the whatToShow flag to determine whether or not to include it in the list of iterable nodes (a simple callback function may also be used instead). The method should return one of NodeFilter.FILTER_ACCEPT, NodeFilter.FILTER_REJECT, or NodeFilter.FILTER_SKIP. See the Example. Note: Prior to Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9), this method accepted an optional fourth parameter (entityReferenceExpansion) that is not part of the DOM4 specification, and has therefore been removed. This parameter indicated whether or not the children of entity reference nodes were visible to the iterator. Since such nodes were never created in browsers, this paramater had no effect. E...
Document.createTouch() - Web APIs
The Document.createTouch() method creates and returns a new Touch object. Syntax var touch = DocumentTouch.createTouch(view, target, identifier, pageX, pageY, screenX, screenY); Parameters Note: All parameters are optional. view The window in which the touch occurred. target The EventTarget for the touch. identifier The value for Touch.identifier. pageX The value for Touch.pageX. pageY The value for Touch.pageY. screenX The value for Touch.screenX. screenY The value for Touch.screenY. ...
Document.createTouchList() - Web APIs
The Document.createTouchList() method creates and returns a new TouchList object. Syntax var list = DocumentTouch.createTouchList([touch1 [, touch2 [, ...]]]); Parameters touches Zero or more Touch objects. Note: Firefox also accepts an array of Touch objects. Return value list A TouchList object containing the Touch objects specified by the touches parameter. Example This example illustrates using the Document.createTouchList() method to create TouchList objects. In following code snippet, some Touch objects are created for the target element and those touch points are then used to create some TouchList objects. ...
Document.getElementsByTagNameNS() - Web APIs
ee the note below) of found elements in the order they appear in the tree. namespace is the namespace URI of elements to look for (see element.namespaceURI). name is either the local name of elements to look for or the special value *, which matches all elements (see element.localName). Note: While the W3C specification says elements is a NodeList, this method returns a HTMLCollection both in Gecko and Internet Explorer. Opera returns a NodeList, but with a namedItem method implemented, which makes it similar to a HTMLCollection. As of January 2012, only in WebKit browsers is the returned value a pure NodeList. See bug 14869 for details. Note: Currently parameters in this method are case-sensitive, but they were case-insensitive in Firefox 3.5 and before. See the note in Browser compatibil...
Document.height - Web APIs
Web › API › Document › height
Instead, use document.body.clientHeight. See element.clientHeight. Returns the height of the document object. In most cases, this is equal to the <body> element of the current document. ...
Document.importNode() - Web APIs
e, then only externalNode is imported -- the new node has no children. Note: In the DOM4 specification, deep was an optional argument with a default value of true. This default has changed in the latest spec! The new default value is false. Best Practice: Though it's still an optional argument, you should always provide the deep argument for backward and forward compatibility. With Gecko 28.0 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3), the console warns developers not to omit the argument. Starting with Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)), a shallow clone is defaulted instead of a deep clone. Return value The copied importedNode in the scope of the importing document. Note: importedNode's Node.parentNode is null, since it h...
Document.lastModified - Web APIs
(See: Bug 4363 - document.lastModified returns date in UTC time, but should return it in local time) If you want to know whether an external page has changed, please read this paragraph about the XMLHttpRequest() API. Specifications Specification Status Comment HTML Living StandardThe definition of 'document...
Document.open() - Web APIs
Web › API › Document › open
("<p>I am a fish</p>"); document.write("<p>The number is 42</p>"); document.close(); Notes An automatic document.open() call happens when document.write() is called after the page has loaded. For years Firefox and Internet Explorer additionally erased all JavaScript variables, etc., in addition to removing all nodes. This is no longer the case.document non-spec'ed parameters to document.open Gecko-specific notes Starting with Gecko 1.9, this method is subject to the same same-origin policy as other properties, and does not work if doing so would change the document's origin. Starting with Gecko 1.9.2, document.open() uses the principal of the document whose URI it uses, instead of fetching the principal off the stack. As a result, you can no longer call document.write() into an untrusted...
Document.popupNode - Web APIs
When a popup attached via the popup or context attributes is opened, the XUL document's popupNode property is set to the node that was clicked on. This will be the target of the mouse event that activated the popup. If the popup was opened via the keyboard, the popup node may be set to null. Typically, this property will be checked during a popupshowing event handler for a context menu to initialize the menu based on the context. This property is only set for popups attached via the popup or context attributes. For other types of popups, the value is not changed. ...
Document.title - Web APIs
Web › API › Document › title
ontent of the <title> element in an HTML document). Example <!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <script> alert(document.title); // displays "Hello World!" document.title = "Goodbye World!"; alert(document.title); // displays "Goodbye World!" </script> </body> </html> Notes This property applies to HTML, SVG, XUL, and other documents in Gecko. For HTML documents the initial value of document.title is the text content of the <title> element. For XUL it's the value of the title attribute of the <xul:window> or other top-level XUL element. In XUL, accessing document.title before the document is fully loaded has undefined behavior: document.title may return an empty string and setting document.title may have no effect. Specifications ...
Document.width - Web APIs
Web › API › Document › width
Instead, use document.body.clientWidth. See element.clientWidth. Returns the width of the <body> element of the current document in pixels. Not supported by Internet Explorer. ...
Document.xmlVersion - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Returns the version number as specified in the XML declaration (e.g., <?xml version="1.0"?>) or "1.0" if the declaration is absent. This attribute was never really useful, since it always returned 1.0, and has been removed in DOM Level 4. As such, Firefox 10 no longer implements it. Its primary use in the past was to detect whether or not the document was being rendered as XML rather than HTML. ...
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=...
Element: DOMMouseScroll event - Web APIs
t is over 1 line or 1 page since last event. It's represented by the MouseScrollEvent interface. This event was only implemented by Firefox. You should instead use the standard wheel event. Bubbles Yes Cancelable Yes Interface MouseScrollEvent If you want to prevent the default action of mouse wheel events, it's not enough to handle only this event on Gecko because If scroll amount by a native mouse wheel event is less than 1 line (or less than 1 page when the system setting is by page scroll), other mouse wheel events may be fired without this event. On Gecko 17 (Firefox 17) or later, you need to call preventDefault() of wheel events which must be fired for every native event. Use the standardized wheel event if available. Properties The ev...
Element: afterscriptexecute event - Web APIs
This event was a proposal in an early version of the specification. Do not rely on it. The afterscriptexecute event is fired after a script has been executed. It is a proprietary event specific to Gecko (Firefox). Bubbles Yes Cancelable No Interface Event Event handler property None Specifications Not part of any specification. ...
Element: beforescriptexecute event - Web APIs
This event was a proposal in an early version of the specification. Do not rely on it. The beforescriptexecute event is fired when a script is about to be executed. Cancelling the event prevents the script from executing. It is a proprietary event specific to Gecko (Firefox). Bubbles Yes Cancelable Yes Interface Event Event handler property None Specifications Not part of any specification. ...
Element.clientTop - Web APIs
Web › API › Element › clientTop
es padding.) Therefore, the clientTop value will always equal the integer portion of the .getComputedStyle() value for "border-top-width". (Actually might be Math.round(parseFloat()).) For example, if the computed "border-top-width" is zero, then clientTop is also zero. Note: This property will round the value to an integer. If you need a fractional value, use element.getBoundingClientRect(). Gecko-based applications support clientTop starting with Gecko 1.9 (Firefox 3, implemented in bug 111207). This property is not supported in Firefox 2 and earlier. Syntax var top = element.clientTop; Example In the following illustration, the client area is show in white. (The segments labeled "Top", "Right", etc. have no significance regarding the client area.) The clientTop value is the distance...
Element.getAttribute() - Web APIs
, as a non-exhaustive list) return null when the specified attribute does not exist on the specified element; this is what the current DOM specification draft specifies. The old DOM 3 Core specification, on the other hand, says that the correct return value in this case is actually the empty string, and some DOM implementations implement this behavior. The implementation of getAttribute() in XUL (Gecko) actually follows the DOM 3 Core specification and returns an empty string. Consequently, you should use element.hasAttribute() to check for an attribute's existence prior to calling getAttribute() if it is possible that the requested attribute does not exist on the specified element. Retrieving nonce values For security reasons, CSP nonces from non-script sources, such as CSS selectors, and .
Element.localName - Web APIs
Web › API › Element › localName
as part of the namespace(s) of the particular XML documents. For example, in the qualified name ecomm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">Tony's Syrup Warehouse </ecomm:partner> </ecomm:partner> </ecomm:business> Note: In Gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for HTML elements in HTML DOMs (as opposed to XHTML elements in XML DOMs). In later versions, in compliance with HTML5, the property returns in the case of the internal DOM storage, which is lower case for both HTML elements in HTML DOMs and XHTML elements in XML DOMs. The tagName property continues to return in the...
Element: overflow event - Web APIs
The overflow event is fired when an element has been overflowed by its content or has been rendered for the first time in this state (only works for elements styled with overflow != visible). It is a proprietary event specific to Gecko (Firefox). Bubbles Yes Cancelable Yes Interface UIEvent Event handler property Unknown Examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> Overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getElementById("...
Element.setCapture() - Web APIs
Specification Based on Internet Explorer's implementation. ...
File.fileName - Web APIs
Web › API › File › fileName
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. Obsolete since Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Returns the name of the file. For security reasons the path is excluded from this property. This property is deprecated. Use File.name instead. Syntax var name = instanceOfFile.fileName; Value A string Specification Not part of any specification. ...
File.getAsBinary() - Web APIs
Web › API › File › getAsBinary
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. ...
File.getAsText() - Web APIs
Web › API › File › getAsText
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary The getAsText method provides the file's data interpreted as text using a given encoding. Note: This method is obsolete; you should use the FileReader method readAsText() instead. Syntax var str = instanceOfFile.getAsText(encoding); Parameters encoding A string indicating the encoding to use for the returned data. If this string is empty, UTF-8 is assumed. Returns A string containing the file's data interpreted as text in the specified encoding. ...
FileList - Web APIs
Web › API › FileList
An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. Note: Prior to Gecko 1.9.2, the input element only supported a single file being selected at a time, meaning that the FileList would contain only one file. Starting with Gecko 1.9.2, if the input element's multiple attribute is true, the FileList may contain multiple files. Using the file list All <input> element nodes have a files attribute of type FileList on them which allows access to the items in this list. For example, if the HTML includes the following file input: <...
GamepadButton - Web APIs
The GamepadButton interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. A GamepadButton object is returned by querying any value of the array returned by the buttons property of the Gamepad interface. Note: This is the case in Firefox Gecko 28 and later; Chrome and earlier Firefox versions still return an array of double values when this property is accessed. Properties GamepadButton.value Read only A double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 --1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. ...
GlobalEventHandlers.ondragexit - Web APIs
If you are building a drag-and-drop feature for a website please see the ondragleave event listener instead. Syntax var dragexitHandler = targetElement.ondragexit; Return value dragexitHandler The dragexit event handler for element targetElement. Example This example demonstrates using the ondragexit attribute handler to set an element's dragexit event handler. ...
GlobalEventHandlers.onmousewheel - Web APIs
Instead use the standard wheel event. Syntax element.onmousewheel = handlerFunction; var handlerFunction = element.onmousewheel; handlerFunction should be either null or a JavaScript function specifying the handler for the event. Notes See the DOM event handlers page for information on working with on... handlers. ...
HTMLButtonElement - Web APIs
the button. Methods Inherits methods from its parent, HTMLElement Name Return Type Description checkValidity() Boolean Not supported for reset or button elements. reportValidity() Boolean Not supported for reset or button elements. setCustomValidity(in DOMString error) void Not supported for reset or button elements. With Gecko-based browser, use the :-moz-submit-invalid pseudo-class to style submit buttons based on the validation of a form. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLButtonElement' in that specification. Living Standard HTML 5.2The definition of 'HTMLButtonElement' in that specification. Recommendation The me...
HTMLCanvasElement.getContext() - Web APIs
, depth: false }); 2d context attributes: alpha: Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images. desynchronized: Boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop (Gecko only) willReadFrequently: Boolean that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently. This option is only available, if the flag gfx.canvas.willReadFrequently.enable is set to true (which, by default, is only the case for B2G/Firefox OS...
HTMLInputElement.mozGetFileNameArray() - Web APIs
Also, it throws an error if used in Web pages. ...
HTMLInputElement.mozSetFileNameArray() - Web APIs
Also, it throws an error if used in Web pages. Syntax inputElement.mozSetFileNameArray(aFileNames, aLength); Parameters aFileNames Is the array of file names to apply to the element. ...
HTMLKeygenElement - Web APIs
See bug 101019 for details and status. The <keygen> elements expose the HTMLKeygenElement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of keygen elements. Properties autofocus Is a Boolean that reflects the autofocus HTML attribute, indicating that the form control should have input focus when the page loads. ...
HTMLMediaElement.playbackRate - Web APIs
e media is being played back. This is used to implement user controls for fast forward, slow motion, and so forth. The normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed. If playbackRate is negative, the media is not played backwards. The audio is muted when the fast forward or slow motion is outside a useful range (for example, Gecko mutes the sound outside the range 0.25 to 5.0). The pitch of the audio is corrected by default and is the same for every speed. Some browsers implement the non-standard HTMLMediaElement.preservesPitch property to control this. Syntax // video video.playbackRate = 1.5; // audio audio.playbackRate = 1.0; Value A double. 1.0 is "normal speed," values lower than 1.0 make the media play slower...
HTMLStyleElement.type - Web APIs
The HTMLStyleElement.type read-only property returns the type of the current style. ...
HTMLVideoElement - Web APIs
intrinsic height of the resource in CSS pixels, or 0 if no media is available yet. HTMLVideoElement.videoWidth Read only Returns an unsigned integer value indicating the intrinsic width of the resource in CSS pixels, or 0 if no media is available yet. HTMLVideoElement.width Is a DOMString that reflects the width HTML attribute, which specifies the width of the display area, in CSS pixels. Gecko-specific properties HTMLVideoElement.mozParsedFrames Read only Returns an unsigned long with the count of video frames that have been parsed from the media resource. HTMLVideoElement.mozDecodedFrames Read only Returns an unsigned long with the count of parsed video frames that have been decoded into images. HTMLVideoElement.mozPresentedFrames Read only Returns an unsigned long with ...
Drag Operations - Web APIs
for other reasons such as an invalid drop target, or if it was successful. A drop can occur inside the same window or over another application. The dragend event will always fire regardless. The event's screenX and screenY properties will be set to the screen coordinates where the drop occurred. After the dragend event has finished propagating, the drag and drop operation is complete. [1]: In Gecko, dragend is not dispatched if the source node is moved or removed during the drag (e.g. on drop or dragover). Bug 460801 See also HTML Drag and Drop API (Overview) Dragging and Dropping Multiple Items Recommended Drag Types HTML5 Living Standard: Drag and Drop ...
File drag and drop - Web APIs
snippets. The full source code is available in MDN's drag-and-drop repository (pull requests and/or issues are welcome). Note: HTML drag and drop defines two different APIs to support dragging and dropping files. One API is the DataTransfer interface and the second API is the DataTransferItem and DataTransferItemList interfaces. This example illustrates the use of both APIs (and does not use any Gecko specific interfaces). Define the drop zone The target element of the drop event needs an ondrop global event handler. The following code snippet shows how this is done with a <div> element: <div id="drop_zone" ondrop="dropHandler(event);"> <p>Drag one or more files to this Drop Zone ...</p> </div> Typically, an application will include a dragover event handler on the drop target element and...
Dragging and Dropping Multiple Items - Web APIs
Mozilla supports the ability to drag multiple items using some additional non-standard methods. These are methods that mirror the types property as well as the getData(), setData() and clearData() methods, however, they take an additional argument that specifies the index of the item to retrieve, modify or remove. The drag processing described in this document use the DataTransfer interface. This processing does not use the DataTransferItem interface nor the DataTransferItemList interface. ...
Recommended Drag Types - Web APIs
Dragging Text For dragging text, use the text/plain type. The second data parameter should be the dragged string. ...
Headers.getAll() - Web APIs
Web › API › Headers › getAll
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The getAll() method of the Headers interface used to return an array of all the values of a header within a Headers object with a given name; in newer versions of the Fetch spec, it has been deleted, and Headers.get() has been updated to fetch all header values instead of only the first one. If the requested header doesn't exist in the Headers object, it returns an empty array. For security reasons, some headers can only be controller by the user agent. These headers include the forbidden header names and forbidden response header names. ...
IDBCursor - Web APIs
Web › API › IDBCursor
record at the cursor's position, without changing the cursor's position. This can be used to delete specific records. IDBCursor.update() Returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store. This can be used to update specific records. Constants These constants are no longer available -- they were removed in Gecko 25. You should use the string constants directly instead. (bug 891944) NEXT : "next" : The cursor shows all records, including duplicates. It starts at the lower bound of the key range and moves upwards (monotonically increasing in the order of keys). NEXTUNIQUE : "nextunique" : The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first on...
IDBFactory.deleteDatabase() - Web APIs
rimental version with options (see below): var request = indexedDB.deleteDatabase(name, options); Parameters name The name of the database you want to delete. Note that attempting to delete a database that doesn't exist does not throw an exception, in contrast to IDBDatabase.deleteObjectStore(), which does throw an exception if the named object store does not exist. optionsNon-standard In Gecko, since version 26, you can include a non-standard optional storage parameter that specifies whether you want to delete a permanent (the default value) IndexedDB, or an indexedDB in temporary storage (aka shared pool.) Return value A IDBOpenDBRequest on which subsequent events related to this request are fired. Example var DBDeleteRequest = window.indexedDB.deleteDatabase("toDoList"); DBDele...
IDBFactory.open() - Web APIs
Web › API › IDBFactory › open
ndexedDB.open(name, version); Parameters name The name of the database. version Optional Optional. The version to open the database with. If the version is not provided and the database exists, then a connection to the database will be opened without changing its version. If the version is not provided and the database does not exist, then it will be created with version 1. Experimental Gecko options object options (version and storage) Optional In Gecko, since version 26, you can include a non-standard options object as a parameter of IDBFactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage. Warning: The storage attribute is deprecated and will soon be removed from Gecko. You s...
IDBTransaction - Web APIs
B transaction is aborted. Also available via the onabort property. complete Fired when a transaction successfully completes. Also available via the oncomplete property. error Fired when a request returns an error and the event bubbles up to the transaction object. Also available via the onerror property. Mode constants These constants are no longer available -- they were removed in Gecko 25. You should use the string constants directly instead. (bug 888598) Transactions can have one of three modes: Constant Value Description READ_ONLY "readonly" (0 in Chrome) Allows data to be read but not changed. READ_WRITE "readwrite" (1 in Chrome) Allows reading and writing of data in existing data store...
compareVersion - Web APIs
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. compareVersion Compares the version of a file or package with the version of an existing file or package. ...
getVersion - Web APIs
Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. getVersion Returns an object representing the version number from the Client Version Registry for the specified component. It is used in both trigger scripts and installation scripts. ...
KeyboardEvent.charCode - Web APIs
ode property, but never both. If the key pressed generates a character (e.g., 'a'), charCode is set to the code of that character; charCode respects the letter case (in other words, charCode takes into account whether the shift key is held down). Otherwise, the code of the pressed key is stored in keyCode. When one or more modifier keys are pressed, there are some complex rules for charCode. See Gecko Keypress Event for details. charCode is never set in the keydown and keyup events. In these cases, keyCode is set instead. To get the code of the key regardless of whether it was stored in keyCode or charCode, query the which property. Characters entered through an IME do not register through keyCode or charCode. Actually with the Chinese IME I'm using, entering the IME results in a keypress e...
KeyboardEvent.initKeyboardEvent() - Web APIs
Web applications should use constructor instead of this if it's available. ...
KeyboardEvent.keyCode - Web APIs
one which is supported on all target browsers. Web developers shouldn't use the keyCode attribute for printable characters when handling keydown and keyup events. As described above, the keyCode attribute is not useful for printable characters, especially those input with the Shift or Alt key pressed. When implementing a shortcut key handler, the keypress event is usually better (at least when Gecko is the runtime in use). See Gecko Keypress Event for details. Example window.addEventListener("keydown", function (event) { if (event.defaultPrevented) { return; // Should do nothing if the default action has been cancelled } var handled = false; if (event.key !== undefined) { // Handle the event with KeyboardEvent.key and set handled true. } else if (event.keyCode !== undef...
MSCandidateWindowHide - Web APIs
ntObj interface for the current event. The handler of this event will see that the isCandidateWindowVisible method returns false, and no ClientRect object is returned from getCandidateWindowClientRect. Web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element). See also Microsoft API extensions IME handling guide for Gecko ...
MSCandidateWindowShow - Web APIs
ementById("mySuggestionList").getBoundingClientRect(); // Check if the two rects intersect, and position them away from each other. } When the IME candidate window changes position or closes, it fires MSCandidateWindowUpdate or MSCandidateWindowHide events. Developers could listen to them and shift the suggestion UI accordingly. See also Microsoft API extensions IME handling guide for Gecko ...
MSCandidateWindowUpdate - Web APIs
ace for the current event. ...
MouseScrollEvent - Web APIs
Instead use the standard WheelEvent. ...
MouseWheelEvent - Web APIs
Instead use the standard WheelEvent. ...
NavigatorID.appVersion - Web APIs
property to return the correct browser version. Syntax window.navigator.appVersion Value Either "4.0" or a string representing version information about the browser. Example alert('Your browser version is reported as ' + navigator.appVersion); Notes The window.navigator.userAgent property may also contain the version number (for example "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties. The window.navigator.appVersion, window.navigator.appName and window.navigator.userAgent properties have been used in "browser sniffing" code: scripts that attempt...
NavigatorID.product - Web APIs
The value of the NavigatorID.product property is always "Gecko", in any browser. This property is kept only for compatibility purposes. Note: Do not rely on this property to return a real product name. All browsers return "Gecko" as the value of this property. Syntax productName = navigator.product Value The string "Gecko". Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID.product' in that specification. Living Standard Initial definition ...
NavigatorID - Web APIs
D.appVersion Read only Returns either "4.0" or a string representing version information about the browser. Do not rely on this property to return a useful value. NavigatorID.platform Read only Returns either the empty string or a string representing the platform the browser is running on. Do not rely on this property to return a useful value. NavigatorID.product Read only Always returns "Gecko", in any browser. This property is kept only for compatibility purposes. NavigatorID.userAgent Read only Returns the user-agent string for the current browser. Methods The NavigatorID interface doesn't inherit any methods. NavigatorID.taintEnabled() Always returns false. JavaScript taint/untaint functions were removed in JavaScript 1.2. This method is only kept for compatibility purpo...
Node.localName - Web APIs
Web › API › Node › localName
as part of the namespace(s) of the particular XML documents. For example, in the qualified name ecomm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">Tony's Syrup Warehouse </ecomm:partner> </ecomm:partners> </ecomm:business> Note: In Gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for HTML elements in HTML DOMs (as opposed to XHTML elements in XML DOMs). In later versions, in compliance with HTML5, the property returns in the case of the internal DOM storage, which is lower case for both HTML elements in HTML DOMs and XHTML elements in XML DOMs. The tagName property continues to return in the...
Node.nextSibling - Web APIs
Web › API › Node › nextSibling
Therefore a node obtained, for example, using Node.firstChild or Node.previousSibling may refer to a whitespace text node rather than the actual element the author intended to get. ...
Node.nodePrincipal - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The Node.nodePrincipal read-only property returns the nsIPrincipal object representing current security context of the node. Note: This property exists on all nodes (HTML, SVG, MathML, XUL, etc.), but only if the script trying to use it has chrome privileges. Syntax principalObj = Node.nodePrincipal Value An nsIPrincipal object representing the node's security context. Notes This property is read-only; attempting to write to it will throw an exception. In addition, this property may only be accessed from privileged code. ...
Node.previousSibling - Web APIs
ns the node immediately preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list. Syntax previousNode = node.previousSibling; Example <img id="b0"> <img id="b1"> <img id="b2"> console.log(document.getElementById("b1").previousSibling); // <img id="b0"> console.log(document.getElementById("b2").previousSibling.id); // "b1" Notes Gecko-based browsers insert text nodes into a document to represent whitespace in the source markup. Therefore a node obtained, for example, using Node.firstChild or Node.previousSibling may refer to a whitespace text node rather than the actual element the author intended to get. See Whitespace in the DOM and W3C DOM 3 FAQ: Why are some Text nodes empty? for more information. To navigate the opposi...
Node.rootNode - Web APIs
Web › API › Node › rootNode
r the current node if it's the topmost node in the tree. This is found by walking backward along Node.parentNode until the top is reached. Syntax rootNode = node.rootNode; Value A Node object representing the topmost node in the tree. Example Running the following line in supporting browsers should return a reference to the HTML/document node: console.log(document.body.rootNode); Notes Gecko-based browsers insert text nodes into a document to represent whitespace in the source markup. Therefore a node obtained, for example, using Node.firstChild or Node.previousSibling may refer to a whitespace text node rather than the actual element the author intended to get. See Whitespace in the DOM and W3C DOM 3 FAQ: Why are some Text nodes empty? for more information. ...
Node - Web APIs
Web › API › Node
s does not happen, so the property is in lower case for both HTML and XHTML. Node.namespaceURI Read only The namespace URI of this node, or null if it is no namespace. Note: In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the http://www.w3.org/1999/xhtml/ namespace in both HTML and XML trees. Node.nodePrincipal Obsolete since Gecko 46 A nsIPrincipal representing the node principal. Node.prefix Read only Is a DOMString representing the namespace prefix of the node, or null if no prefix is specified. Node.rootNode Read only Returns a Node object representing the topmost node in the tree, or the current node if it's the topmost node in the tree. This has been replaced by Node.getRootNode(). Methods In addition to t...
Notification.requestPermission() - Web APIs
er for the current origin to display notifications. Syntax The latest spec has updated this method to a promise-based syntax that works like this: Notification.requestPermission().then(function(permission) { ... }); Previously, the syntax was based on a simple callback; this version is now deprecated: Notification.requestPermission(callback); Parameters callback Optional Deprecated since Gecko 46 An optional callback function that is called with the permission value. Deprecated in favor of the promise return value. Returns A Promise that resolves to a DOMString with the permission picked by the user. Possible values for this string are: granted denied default Examples Assume this basic HTML: <button onclick="notifyMe()">Notify me!</button> It's possible to send a notifica...
OffscreenCanvas.getContext() - Web APIs
n creating your rendering context, for example: offscreen.getContext("webgl", { antialias: false, depth: false }); 2d context attributes: alpha: Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images then. (Gecko only) willReadFrequently: Boolean that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently. This option is only available, if the flag gfx.canvas.willReadFrequently.enable is set to true (which, by default, is only the case for B2G/Firefox OS...
Push API - Web APIs
Web › API › Push API
g this, there is currently no standard mechanism. Firefox allows a limited number (quota) of push messages to be sent to an application, although Push messages that generate notifications are exempt from this limit. The limit is refreshed each time the site is visited. In comparison, Chrome applies no limit, but requires that every push message causes a notification to be displayed. Note: As of Gecko 44, the allowed quota of push messages per application is not incremented when a new notification fires, when another is still visible, for a period of three seconds. This handles cases where a burst of Push messages is received, and not all generate a visible notification. Note: Chrome versions earlier than 52 require you to set up a project on Google Cloud Messaging to send push messages, an...
SVGLengthList - Web APIs
SVG length list interface The SVGLengthList defines a list of SVGLength objects. An SVGLengthList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
SVGNumberList - Web APIs
SVG number list interface The SVGNumberList defines a list of SVGNumber objects. An SVGNumberList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. Note: Starting in Gecko 5.0,the SVGNumberList DOM interface is now indexable and can be accessed like arrays. Interface overview Also implement None Methods void clear() SVGNumber initialize(in SVGNumber newItem) SVGNumber getItem(in unsigned long index) SVGNumber insertItemBefore(in SVGNumber newItem, in unsigned long index) SVGNumber replaceItem(in SVGNumber newItem, in unsigned long index) SVGNumber removeItem(in unsigned long index) SVGNumber appendItem(in SVGNumber newItem) Prop...
SVGTransformList - Web APIs
SVG transform list interface The SVGTransformList defines a list of SVGTransform objects. An SVGTransformList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
Selection.isCollapsed - Web APIs
The Selection.isCollapsed read-only property returns a Boolean which indicates whether or not there is currently any text selected. No text is selected when the selection's start and end points are at the same position in the content. Keep in mind that a collapsed selection may still have one (or more, in Gecko) Ranges, so Selection.rangeCount may not be zero. In that scenario, calling a Selection object's getRangeAt() method may return a Range object which is collapsed. Syntax bool = sel.isCollapsed Specifications Specification Status Comment Selection APIThe definition of 'Selection.isCollapsed' in that specification. Working Draft Current ...
Selection.modify() - Web APIs
Web › API › Selection › modify
djust in the appropriate direction based on the language at the selection point. If you want to adjust in a specific direction, you can specify "left" or "right". granularity The distance to adjust the current selection or cursor position. You can move by "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", or "documentboundary". Note: Gecko does not implement "sentence", "paragraph", "sentenceboundary", "paragraphboundary", or "documentboundary". WebKit and Blink do. Note: Starting in Gecko 5.0, the "word" granularity no longer includes the following space, regardless of the default platform behavior. This makes the behavior more consistent, as well as making it work the same way WebKit used to work, but unfortunately they have re...
Selection.selectionLanguageChange() - Web APIs
Obsolete since Gecko 29 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Selection.selectionLanguageChange() method is a Gecko/Firefox internal method that was exposed to web pages until Firefox 29. It was removed in bug 949445 and should not be used. ...
Selection - Web APIs
Web › API › Selection
it holds only one range, accessed as follows: var selObj = window.getSelection(); var range = selObj.getRangeAt(0); selObj is a Selection object range is a Range object As the Selection API specification notes, the Selection API was initially created by Netscape and allowed multiple ranges (for instance, to allow the user to select a column from a <table>). However, browsers other than Gecko did not implement multiple ranges, and the specification also requires the selection to always have a single range. Selection and input focus Selection and input focus (indicated by Document.activeElement) have a complex relationship that varies by browser. In cross-browser compatible code, it's better to handle them separately. Safari and Chrome (unlike Firefox) currently focus the element co...
SharedWorker() - Web APIs
The SharedWorker() constructor creates a SharedWorker object that executes the script at the specified URL. This script must obey the same-origin policy. Note: there is disagreement among browser manufacturers about whether a data URI is of the same origin or not. Although Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) and later accept data URIs, that's not the case in all other browsers. Syntax var myWorker = new SharedWorker(aURL, name); var myWorker = new SharedWorker(aURL, options); Parameters aURL A DOMString representing the URL of the script the worker will execute. It must obey the same-origin policy. name Optional A DOMString specifying an identifying name for the SharedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debuggi...
UserDataHandler - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary When associating user data with a key on a node, Node.setUserData() can also accept, in its third argument, a handler which will be called when the object is cloned, imported, deleted, renamed, or adopted. Per the specification, exceptions should not be thrown in a UserDataHandler. In both document.importNode() and Node.cloneNode(), although user data is not copied over, the handler will be called. Properties None. ...
ValidityState - Web APIs
nly divisible by the step value), or false if it does fit the step rule. If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. tooLong Read only A Boolean that is true if the value exceeds the specified maxlength for HTMLInputElement or HTMLTextAreaElement objects, or false if its length is less than or equal to the maximum length. Note: This property is never true in Gecko, because elements' values are prevented from being longer than maxlength. If true, the element matches the the :invalid and :out-of-range CSS pseudo-classes. tooShort Read only A Boolean that is true if the value fails to meet the specified minlength for HTMLInputElement or HTMLTextAreaElement objects, or false if its length is greater than or equal to the minimum length. If true, the element ...
VideoPlaybackQuality.totalFrameDelay - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The VideoPlaybackQuality.totalFrameDelay read-only property returns a double containing the sum of the frame delay since the creation of the associated HTMLVideoElement. The frame delay is the difference between a frame's theoretical presentation time and its effective display time. ...
WebSocket.close() - Web APIs
Web › API › WebSocket › close
is assumed. See the list of status codes of CloseEvent for permitted values. reason Optional A human-readable string explaining why the connection is closing. This string must be no longer than 123 bytes of UTF-8 text (not characters). Exceptions thrown INVALID_ACCESS_ERR An invalid code was specified. SYNTAX_ERR The reason string is too long or contains unpaired surrogates. Note: In Gecko, this method didn't support any parameters prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5). Specifications Specification Status Comment HTML Living Standard The definition of 'WebSocket.close()' in that specification. Living Standard Initial definition ...
WebSocket.send() - Web APIs
Web › API › WebSocket › send
the byte size of that raw data. ArrayBufferView You can send any JavaScript typed array object as a binary frame; its binary data contents are queued in the buffer, increasing the value of bufferedAmount by the requisite number of bytes. Exceptions thrown INVALID_STATE_ERR The connection is not currently OPEN. SYNTAX_ERR The data is a string that has unpaired surrogates. Note: Gecko's implementation of the send() method differs somewhat from the specification in Gecko 6.0; Gecko returns a boolean indicating whether or not the connection is still open (and, by extension, that the data was successfully queued or transmitted); this is corrected in Gecko 8.0. As of Gecko 11.0, support for ArrayBuffer is implemented but not Blob data types. Specifications Specificati...
Migrating from webkitAudioContext - Web APIs
eb Audio standard was first implemented in WebKit, and the implementation was built in parallel with the work on the specification of the API. As the specification evolved and changes were made to the spec, some of the old implementation pieces were not removed from the WebKit (and Blink) implementations due to backwards compatibility reasons. New engines implementing the Web Audio spec (such as Gecko) will only implement the official, final version of the specification, which means that code using webkitAudioContext or old naming conventions in the Web Audio specification may not immediately work out of the box in a compliant Web Audio implementation. This article attempts to summarize the areas where developers are likely to encounter these problems and provide examples on how to port such ...
Using the Web Speech API - Web APIs
ectly download) the Github repo it is part of, open the HTML index file in a supporting desktop browser, or navigate to the live demo URL in a supporting mobile browser like Chrome, or Firefox OS. Browser support Support for Web Speech API speech synthesis is still getting there across mainstream browsers, and is currently limited to the following: Firefox desktop and mobile support it in Gecko 42+ (Windows)/44+, without prefixes, and it can be turned on by flipping the media.webspeech.synth.enabled flag to true in about:config. Firefox OS 2.5+ supports it, by default, and without the need for any permissions. Chrome for Desktop and Android have supported it since around version 33, without prefixes. HTML and CSS The HTML and CSS are again pretty trivial, simply contain...
Functions and classes available to Web Workers - Web APIs
rkerGlobalScope yes, on WorkerGlobalScope yes, on WorkerGlobalScope yes, on WorkerGlobalScope no close() yes, on WorkerGlobalScope yes, on WorkerGlobalScope yes, but is a no-op. Unknown no postMessage() yes, on DedicatedWorkerGlobalScope no no Unknown no APIs available in workers Function Functionality Support in Gecko (Firefox) Support in IE Support in Blink (Chrome and Opera) Support in WebKit (Safari) Broadcast Channel API Allows simple communication between browsing contexts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site). 38 (38) No support No support No support Cache Cache API provides the ability to programma...
Window.clearImmediate() - Web APIs
Syntax window.clearImmediate( immediateID ) where immediateID is a ID returned by window.setImmediate. ...
Window.defaultStatus - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary Gets/sets the status bar text for the given window. Syntax var sMsg = window.defaultStatus; window.defaultStatus = sMsg; Parameters sMsg is a string containing the text to be displayed by default in the statusbar. Example <html> <body onload="window.defaultStatus='hello!';"/> <button onclick="window.confirm('Are you sure you want to quit?');">confirm</button> </body> </html> Notes To set the status once the window has been opened, use window.status. ...
Window.directories - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary Returned the window personalbar toolbar object. Use the window.personalbar instead. Syntax var dirBar = window.directories; Parameters dirBar is an object of the type BarProp. ...
Window.find() - Web APIs
Web › API › Window › find
See bug 672395. The Window.find() method finds a string in a window. Syntax window.find(aString, aCaseSensitive, aBackwards, aWrapAround, aWholeWord, aSearchInFrames, aShowDialog); aString The text string for which to search. aCaseSensitive Boolean. If true, specifies a case-sensitive search. aBackwards Boolean. If true, specifies a backward search. aWrapAround Boolean. If true, specifies a wrap around search. aWholeWord Unimplemented Boolean. If true, specifies a whole word search. This is not implemented; see bug 481513. aSearchInFrames Boolean. If true, specifies a search in frames. ...
Window.getAttention() - Web APIs
es On Windows, the taskbar button for the window flashes, if this hasn't been disabled by the user. On Linux, the behaviour varies from window manager to window manager - some flash the taskbar button, others focus the window immediately. This may be configurable as well. On Macintosh, the icon in the upper right corner of the desktop flashes. The function is disabled for web content. Neither Gecko nor Internet Explorer supports this feature now for web content. getAttention will still work when used from chrome in a Gecko application. Specification DOM Level 0. Not part of specification. ...
Window.home() - Web APIs
Web › API › Window › home
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The Window.home() method returns the window to the home page. Syntax window.home(); Example function goHome() { window.home(); } Specification DOM Level 0. ...
Window.mozAnimationStartTime - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Returns the time, in milliseconds since the epoch, at which animations started now should be considered to have started. This value should be used instead of, for example, Date.now(), because this value will be the same for all animations started in this window during this refresh interval, allowing them to remain in sync with one another. This also allows JavaScript-based animations to remain synchronized with CSS transitions and SMIL animations triggered during the same refresh interval. ...
Window.mozPaintCount - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Returns the number of times the current document has been painted to the screen in this window. Syntax var paintCount = window.mozPaintCount; paintCount stores the window.mozPaintCount property value. The window.mozPaintCount value is a long long, and starts at zero when the document is first created, incrementing by one each time the document is painted. ...
Window.ondragdrop - Web APIs
Web › API › Window › ondragdrop
d in any other browser. Use the modern standard HTML5 drag and drop feature instead. Summary An event handler for drag and drop events sent to the window. Syntax window.ondragdrop = funcRef; window.addEventListener("dragdrop", funcRef, useCapturing); funcRef The event handler function to be registered. The window.ondragdrop property and the ondragdrop attribute are not implemented in Gecko (bug 112288), you have to use addEventListener. See addEventListener for details. Example Fire an alert on dragdrop In this example, an event listener is added to the window (the event target). If, from an external source, a tab, a link, marked text or a file is dragged and dropped onto this window, the alert is fired. Note how event.stopPropagation(); prevents the browser from loading the dro...
Window.onmozbeforepaint - Web APIs
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Summary An event handler for the MozBeforePaint event. This is used in concert with the window.mozRequestAnimationFrame() method to perform smooth, synchronized animations from JavaScript code. Syntax window.onmozbeforepaint = funcRef; funcRef is the handler function. Example See window.mozRequestAnimationFrame() for an example. Notes This event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozRequestAnimationFrame(). ...
Window.onpaint - Web APIs
Web › API › Window › onpaint
Notes onpaint doesn't work currently, and it is questionable whether this event is going to work at all, see bug 239074. The paint event is raised when the window is rendered. ...
Privileged features - Web APIs
. On Mac systems, dialog windows have a different window border and they may get turned into a sheet. modal If on, the new window is said to be modal. The user cannot return to the main window until the modal window is closed. A typical modal window is created by the alert() function. The exact behavior of modal windows depends on the platform and on the Mozilla release version. Note: As of Gecko 1.9, the Internet Explorer equivalent to this feature is the window.showModalDialog() method. For compatibility reasons, it's now supported in Firefox. Note also that starting in Gecko 2.0, you can use window.showModalDialog() without UniversalBrowserWrite privileges. titlebar By default, all new secondary windows have a titlebar. If set to no or 0, this feature removes the titlebar from th...
Window.routeEvent() - Web APIs
Web › API › Window › routeEvent
Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. The Window method routeEvent(), which is obsolete and no longer available, used to be called to forward an event to the next object that has asked to capture events. Browser Compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
Window.setImmediate() - Web APIs
This method is used to break up long running operations and run a callback function immediately after the browser has completed other operations such as events and display updates. This method is not expected to become standard, and is only implemented by recent builds of Internet Explorer and Node.js 0.10+. It meets resistance both from Gecko (Firefox) and Webkit (Google/Apple). Syntax var immediateID = setImmediate(func, [param1, param2, ...]); var immediateID = setImmediate(func); where immediateID is the ID of the immediate which can be used later with window.clearImmediate. func is the function you wish to call. All parameters will be passed directly to your function. Notes The clearImmediate method can be used to clear the immediate actions, just like clearTimeout f...
Window.sidebar - Web APIs
Web › API › Window › sidebar
kmark in the sidebar" option instead. Also see Creating a Firefox sidebar. addPersistentPanel(title, contentURL, "") Adds a sidebar panel, which is able to work in the background. AddSearchProvider(descriptionURL) Dummy function; does nothing. See Autodiscovery of search plugins. addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory) Obsolete since Gecko 44 Installs a search engine (Sherlock). Adding Sherlock search engines contains more details. Note: This was made obsolete in Firefox 44, and has been removed completely in Firefox 59. IsSearchProviderInstalled(descriptionURL) Indicates if a specific search provider (OpenSearch) is installed. Specification Mozilla-specific. Not part of any standard. ...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
yfill = true; } Another possibility is to use an anonymous function to call your callback, although this solution is a bit more expensive. Example: var intervalID = setInterval(function() { myFunc('one', 'two', 'three'); }, 1000); Another possibility is to use function's bind. Example: var intervalID = setInterval(function(arg1) {}.bind(undefined, 10), 1000); Inactive tabs Requires Gecko 5.0(Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2) Starting in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), intervals are clamped to fire no more often than once per second in inactive tabs. The "this" problem When you pass a method to setInterval() or any other function, it is invoked with the wrong this value. This problem is explained in detail in the JavaScript reference. E...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
every 4 ms when successive calls are triggered due to callback nesting (where the nesting level is at least a certain depth), or after certain number of successive intervals. Take this example: function cb() { f(); setTimeout(cb, 0); } setTimeout(cb, 0); setInterval(f, 0); In Chrome and Firefox, the 5th successive callback call is clamped; Safari clamps on the 6th call; in Edge its the 3rd one. Gecko started to treat setInterval() like this in version 56 (it already did this with setTimeout(); see below). Historically some browsers implemented this throttling behaviour a bit differently (e.g. Firefox) -- on setInterval() calls made from anywhere, or when a nested setTimeout() is called where the nesting level is at least a certain depth. To implement a 0 ms timeout in a modern browser, you ...
Worker() - Web APIs
Web › API › Worker › Worker
The Worker() constructor creates a Worker object that executes the script at the specified URL. This script must obey the same-origin policy. Note: that there is a disagreement among browser manufacturers about whether a data URI is of the same origin or not. Though Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) and later accept data URIs, that's not the case in all other browsers. Syntax var myWorker = new Worker(aURL, options); Parameters aURL A USVString representing the URL of the script the worker will execute. It must obey the same-origin policy. options Optional An object containing option properties that can be set when creating the object instance. Available properties are as follows: type: A DOMString specifying the type of worker to create. The value ca...
WorkerNavigator - Web APIs
Returns an array of DOMStrings representing the languages known to the user, in order of preference. NavigatorOnLine.onLineRead only Returns a Boolean indicating whether the browser is online. NavigatorID.platform Read only Returns a string representing the platform of the browser. Do not rely on this property to return the correct value. NavigatorID.product Read only Always returns 'Gecko', on any browser. This property is kept only for compatibility purposes. NavigatorID.userAgentRead only Returns the user agent string for the current browser. Methods The WorkerNavigator interface implements methods from the NavigatorID, NavigatorLanguage and NavigatorOnLine interfaces. Specifications Specification Status Comment HTML Living StandardThe definit...
Worklet - Web APIs
Web › API › Worklet
e abstracts properties and methods common to all kind of worklets, and cannot be created directly. Instead, you can use one of the following classes: Name Description Location Specification PaintWorklet For programmatically generating an image where a CSS property expects a file. Access this interface through CSS.paintWorklet. Chrome: Main thread Gecko: Paint thread CSS Painting API AudioWorklet For audio processing with custom AudioNodes. Web Audio render thread Web Audio API AnimationWorklet For creating scroll-linked and other high performance procedural animations. Compositor thread CSS Animation Worklet API LayoutWorklet For defining the positioning and dimensions of custom elements. ...
XMLDocument.load() - Web APIs
Web › API › XMLDocument › load
document.load() is a part of an old version of the W3C DOM Level 3 Load & Save module. Can be used with document.async to indicate whether the request is synchronous or asynchronous (the default). As of at least Gecko 1.9, this no longer supports cross-site loading of documents (Use XMLHttpRequest or fetch() instead). Examples var xmlDoc = document.implementation.createDocument("", "test", null); function documentLoaded (e) { alert(new XMLSerializer().serializeToString(e.target)); // Gives querydata.xml contents as string } xmlDoc.addEventListener("load", documentLoaded, false); xmlDoc.load('querydata.xml'); See also the load sample in the XML tests directory. (To test this functionality, create the files on your local disk or on a webserver rather than loading the load.html file f...
Synchronous and asynchronous requests - Web APIs
ET", url, true); xhr.timeout = timeout; xhr.send(null); } Notice the addition of code to handle the "timeout" event by setting the ontimeout handler. Usage: function showMessage (message) { console.log(message + this.responseText); } loadFile("message.txt", 2000, showMessage, "New message!\n"); Here, we're specifying a timeout of 2000 ms. Note: Support for timeout was added in Gecko 12.0. Synchronous request Note: Starting with Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27), Blink 39.0, and Edge 13, synchronous requests on the main thread have been deprecated due to their negative impact on the user experience. Synchronous XHR requests often cause hangs on the web. But developers typically don't notice the problem because the hang only manifests with poor ...
XMLHttpRequest.mozResponseArrayBuffer - Web APIs
This is NULL if the request was not successful, or if it hasn't been sent yet. ...
XMLHttpRequest - Web APIs
Is a boolean. If true, the request will be sent without cookie and authentication headers. XMLHttpRequest.mozSystemRead only Is a boolean. If true, the same origin policy will not be enforced on the request. XMLHttpRequest.mozBackgroundRequest Is a boolean. It indicates whether or not the object represents a background service request. XMLHttpRequest.mozResponseArrayBuffer Obsolete since Gecko 6 Read only ArrayBuffer. The response to the request, as a JavaScript typed array. XMLHttpRequest.multipartObsolete since Gecko 22 This Gecko-only feature, a boolean, was removed in Firefox/Gecko 22. Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. Event handlers onreadystatechange as a property of the XMLHttpRequest instance is supported in all bro...
XSL Transformations in Mozilla FAQ - Web APIs
999/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 sufficiently long XML comment to the beginning of your XML file in order to "push" the <feed> or <rss> tag out of the first 512 bytes, which is analyzed by Firefox to d...
XSLTProcessor - Web APIs
ue: 0 Possible values are: Name Value Effect (None) 0 None DISABLE_ALL_LOADS 1 Disable loading external documents (via e.g. <xsl:import> and document()) Examples Basic example Advanced example Additional example Specifications Not part of any specification. This is a proprietary interface that originated in Gecko. Gecko IDL XSLTProcessor.webidl nsIXSLTProcessor.idl ...
HTML To MSAA - Accessibility
This table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements. For example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from ARIA markup or @title attribute. ...
Accessibility documentation index - Accessibility
arning disabilities. This document introduces cognitive accessibility and improving accessibility of the web for people with cognitive and learning differences. 90 Community Accessibility This document provides links to mailing lists, newsgroups, forums, and other communities related to Accessbility. 91 HTML To MSAA Accessibility The table below shows how Gecko maps HTML elements to MSAA. This table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements. For example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from ARIA markup or @title attribute. 92 Implementing a Microsoft Active Accessibility (MS...
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
The use of this property is not recommended. A proper alt attribute should be used instead. Specifications Not part of any standard. ...
-moz-outline-radius - CSS: Cascading Style Sheets
te: This example will not display the desired effect if you are viewing this in a browser other than Firefox. HTML <p>This element has a rounded outline!</p> CSS p { margin: 5px; border: 1px solid black; outline: dotted red; -moz-outline-radius: 12% 1em 25px; } Result Notes dotted or dashed radiused corners were rendered as solid until Firefox 50, bug 382721 Future versions of Gecko/Firefox may drop this property completely. See bug 593717. Specifications Not part of any standard. ...
:-moz-ui-invalid - CSS: Cascading Style Sheets
valid when the user started interacting with it, the validity styling is changed only when the user shifts focus to another control. However, if the user is trying to correct a previously-flagged value, the control shows immediately when the value becomes valid. Required items have the pseudo-class applied only if the user changes them or attempts to submit an unchanged valid value. By default, Gecko applies a style that creates a red "glow" (using the box-shadow property) around items, which have this pseudo-class applied. See the :invalid pseudo-class for an example that shows how to override the default style. The specification for :user-invalid is still in progress. Syntax Syntax not found in DB! Specifications Specification Status Comment Selectors Level 4...
:invalid - CSS: Cascading Style Sheets
Web › CSS › :invalid
and/or an icon are used. MDN Understanding WCAG, Guideline 1.4 explanations Understanding Success Criterion 1.4.1 | W3C Understanding WCAG 2.0 Notes Radio buttons If any one of the radio buttons in a group is required, the :invalid pseudo-class is applied to all of them if none of the buttons in the group is selected. (Grouped radio buttons share the same value for their name attribute.) Gecko defaults By default, Gecko does not apply a style to the :invalid pseudo-class. However, it does apply a style (a red "glow" using the box-shadow property) to the :-moz-ui-invalid pseudo-class, which applies in a subset of cases for :invalid. Specifications Specification Status Comment HTML Living StandardThe definition of ':invalid' in that specification. Living...
Using CSS transitions - CSS: Cascading Style Sheets
is allows the creation of complex transitions. As it doesn't make sense to animate some properties, the list of animatable properties is limited to a finite set. Note: The set of properties that can be animated is changing as the specification develops. The auto value is often a very complex case. The specification recommends not animating from and to auto. Some user agents, like those based on Gecko, implement this requirement and others, like those based on WebKit, are less strict. Using animations with auto may lead to unpredictable results, depending on the browser and its version, and should be avoided. Defining transitions CSS Transitions are controlled using the shorthand transition property. This is the best way to configure transitions, as it makes it easier to avoid out of sync pa...
Pseudo-elements - CSS: Cascading Style Sheets
after) ::backdrop ::before (:before) ::cue ::cue-region ::first-letter (:first-letter) ::first-line (:first-line) ::grammar-error ::marker ::part() ::placeholder ::selection ::slotted() ::spelling-error Browser Lowest Version Support of Internet Explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element Firefox (Gecko) 1.0 (1.0) :pseudo-element 1.0 (1.5) :pseudo-element ::pseudo-element Opera 4.0 :pseudo-element 7.0 :pseudo-element ::pseudo-element Safari (WebKit) 1.0 (85) :pseudo-element ::pseudo-element Specifications Specification Status Comment CSS Level 1 Recommendation Defined pseudo-classes and pseudo-e...
background-position - CSS: Cascading Style Sheets
Firefox's new parallel CSS engine (also known as Quantum CSS or Stylo, planned for release in Firefox 57) fixes this. See also background-position-x ...
element() - CSS: Cascading Style Sheets
Web › CSS › element
The element() CSS function defines an <image> value generated from an arbitrary HTML element. This image is live, meaning that if the HTML element is changed, the CSS properties using the resulting value are automatically updated. A particularly useful scenario for using this would be to render an image in an HTML <canvas> element, then use that as a background. On Gecko browsers, you can use the non-standard document.mozSetImageElement() method to change the element being used as the background for a given CSS background element. Syntax element(id) where: id The ID of an element to use as the background, specified using the HTML attribute #id on the element. Examples These examples can be viewed live in builds of Firefox that support -moz-element(). A somewhat realistic...
font - CSS: Cascading Style Sheets
Web › CSS › font
downs, etc.). icon The system font used to label icons. menu The system font used in menus (e.g., dropdown menus and menu lists). message-box The system font used in dialog boxes. small-caption The system font used for labeling small controls. status-bar The system font used in window status bars. Prefixed system font keywords Browsers often implement several more, prefixed, keywords: Gecko implements -moz-window, -moz-document, -moz-desktop, -moz-info, -moz-dialog, -moz-button, -moz-pull-down-menu, -moz-list, and -moz-field. Formal definition Initial valueas each of the properties of the shorthand:font-style: normalfont-variant: normalfont-weight: normalfont-stretch: normalfont-size: mediumline-height: normalfont-family: depends on user agentApplies toall elements. It also appli...
image-rendering - CSS: Cascading Style Sheets
d) using the algorithm specified by image-rendering. This property has no effect on non-scaled images. Syntax /* Keyword values */ image-rendering: auto; image-rendering: crisp-edges; image-rendering: pixelated; /* Global values */ image-rendering: inherit; image-rendering: initial; image-rendering: unset; Values auto The scaling algorithm is UA dependent. Since version 1.9 (Firefox 3.0), Gecko uses bilinear resampling (high quality). smooth The image should be scaled with an algorithm that maximizes the appearance of the image. In particular, scaling algorithms that "smooth" colors are acceptable, such as bilinear interpolation. This is intended for images such as photos. high-quality Identical to smooth, but with a preference for higher-quality scaling. If system resources are...
ime-mode - CSS: Cascading Style Sheets
Web › CSS › ime-mode
fox's implementation of ime-mode allows this property on <input type="password">. However, this makes for a bad user experience, and password fields should not enable the IME. Users may correct the inappropriate behavior of sites that don't follow this recommendation by placing the following CSS into their user stylesheet: input[type=password] { ime-mode: auto !important; } The Mac version of Gecko 1.9 (Firefox 3) can't recover the previous state of the IME when a field for which it is disabled loses focus, so Mac users may get grumpy when you use the disabled value. Formal definition Initial valueautoApplies totext fieldsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax auto | normal | active | inactive | disabled Examples Disabling input method support This ...
text-transform - CSS: Cascading Style Sheets
ning of a word are ignored. Authors should not expect capitalize to follow language-specific title casing conventions (such as skipping articles in English). The capitalize keyword was under-specified in CSS 1 and CSS 2.1. This resulted in differences between browsers in the way the first letter was calculated (Firefox considered - and _ as letters, but other browsers did not. Both Webkit and Gecko incorrectly considered letter-based symbols like (a) to be real letters. Internet Explorer 9 was the closest to the CSS 2 definition, but with some weird cases.) By precisely defining the correct behavior, CSS Text Level 3 cleans this mess up. The capitalize line in the browser compatibility table contains the version the different engines started to support this now precisely-defined behavior. ...
matrix() - CSS: Cascading Style Sheets
2D transformation matrix. Its result is a <transform-function> data type. Note: matrix(a, b, c, d, tx, ty) is a shorthand for matrix3d(a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1). Syntax The matrix() function is specified with six values. The constant values are implied and not passed as parameters; the other parameters are described in the column-major order. Note: Until Firefox 16, Gecko accepted a <length> value for tx and ty. matrix(a, b, c, d, tx, ty) Values a b c d Are <number>s describing the linear transformation. tx ty Are <number>s describing the translation to apply. Cartesian coordinates on R2 Homogeneous coordinates on RP2 Cartesian coordinates on R3 Homogeneous coordinates on RP3 ac bd actxbdty001 actxbdty0...
matrix3d() - CSS: Cascading Style Sheets
sform-function> data type. Syntax The matrix3d() function is specified with 16 values. They are described in the column-major order. matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4) Values a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 Are <number>s describing the linear transformation. a4 b4 c4 d4 Are <number>s describing the translation to apply. Note: Until Firefox 16, Gecko accepted a <length> value for a4, b4 and c4. Cartesian coordinates on R2 Homogeneous coordinates on RP2 Cartesian coordinates on R3 Homogeneous coordinates on RP3 This transformation applies to the 3D space and can't be represented on the plane. A generic 3D affine transformation can't be represented using a Cartesian-coordinate matrix, as translations are not l...
width - CSS: Cascading Style Sheets
Web › CSS › width
_length">Width measured in px</div> <div class="em_length">Width measured in em</div> Percentage .percent { width: 20%; background-color: silver; border: 1px solid red; } <div class="percent">Width in percentage</div> max-content p.maxgreen { background: lightgreen; width: intrinsic; /* Safari/WebKit uses a non-standard name */ width: -moz-max-content; /* Firefox/Gecko */ width: -webkit-max-content; /* Chrome */ width: max-content; } <p class="maxgreen">The Mozilla community produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* Firefox */ width: -webkit-min-content; /* Chrome */ width: min-content; } <p class="minblue">The Mozilla community produces a lot of great software.</p> S...
math:min() - EXSLT
Web › EXSLT › math › min
rt() with a data type of number. The minimum value is then the first node in the sorted list, converted into a number. Note: Syntax math:min(nodeSet) Parameters nodeSet The node-set whose lowest value is to be returned. Returns A result tree fragment representing the lowest valued node's numeric value as a string. Specifications EXSLT - MATH:MIN Browser Compatibility Supported in Gecko 1.9 and later. ...
Adding captions and subtitles to HTML5 video - Developer guides
era ignore the default attribute on the <track> element and will instead try to match the browser's language to the subtitle's language. Firefox Firefox's implementation was completely broken due to a bug, leading to Mozilla turning off WebVTT support by default (you can turn it on via the media.webvtt.enabled flag.) However, this bug looks to have been fixed and WebVTT support re-enabled as of Gecko 31, so this will not be a problem for Firefox final release users for much longer (on Gecko 29 as of the time of this writing) this has been fixed as of Firefox 31, and everything works as it should. Plugins If, after reading through this article you decide that you can't be bothered to do all of this and want someone else to do it for you, there are plenty of plugins out there that offer capti...
DOM onevent handlers - Developer guides
r property with the JavaScript in operator. For example: if ("onsomenewfeature" in window) { /* do something amazing */ } Event handlers and prototypes You can't set or access the values of any IDL-defined attributes on DOM prototype objects. That means you can't, for example, change Window.prototype.onload. In the past, event handlers (onload, etc.) weren't implemented as IDL attributes in Gecko, so you were able to do this for those. Now you can't. This improves compatibility. ...
Mouse gesture events - Developer guides
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. Gecko 1.9.1 added support for several Mozilla-specific DOM events used to handle mouse gestures. These are special movements that can be made with a mouse or trackpad and can be interpreted to perform specific tasks. Note: These gesture events are available to add-ons and other browser chrome code, but are never sent to regular web page content. Note: Some operating systems, including Mac OS X and Windows 7, provide default actions when gesture events occur. If you handle a gesture event and wish...
Rich-Text Editing in Mozilla - Developer guides
n Mozilla and Internet Explorer that affects designMode is the generated code in the editable document: while Internet Explorer uses HTML tags (em, i, etc), Mozilla 1.3 will generate by default spans with inline style rules. The styleWithCSS command can be used to toggle between CSS and HTML markup creation. Figure 1 : Generated HTML differences Mozilla: <span style="font-weight: bold;">I love geckos.</span> <span style="font-weight: bold; font-style: italic; text-decoration: underline;">Dinosaurs are big.</span> Internet Explorer: <STRONG>I love geckos.</STRONG> <STRONG><EM><U>Dinosaurs are big.</U></EM></STRONG> Another difference between Mozilla and IE is how to access the document object of an iframe, which is usually used in conjunction with designMode. Mozilla uses the W3C sta...
Introduction to HTML5 - Developer guides
HTML5 is the fifth revision and newest version of the HTML standard. It offers new features that provide not only rich media support but also enhance support for creating web applications that can interact with users, their local data, and servers more easily and effectively than was previously possible. Some HTML5 features remain unsupported by some browsers. However, Gecko, and by extension, Firefox, has very good support for HTML5, and work continues toward supporting more of its features. Gecko began supporting some HTML5 features in version 1.8.1. You can find a list of all of the HTML5 features that Gecko currently supports on the main HTML5 page. For detailed information about multiple browsers' support of HTML5 features, refer to the CanIUse website. Declaring that the documen...
HTML5 - Developer guides
Web › Guide › HTML › HTML5
rage (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 in the browser and for high performance searches on this data using indexes. Using files from web applications Support for the new HTML5 File API has been added to Gecko, making it possible for web applications to access local files selected by the user. This includes support for selecting multiple files using the <input> of type file HTML element's new multiple attribute. There also is FileReader. Multimedia Using HTML5 audio and video The <audio> and <video> elements embed and allow the manipulation of new multimedia content. WebRTC This technology, whe...
Introduction to Web development - Developer guides
xercise that recap and take you through the basics you've learned above. HTML elements reference guide -- a comprehensive guide to HTML elements with details on how browsers support them CSS Getting started with CSS -- an absolute beginners guide to CSS covers basic concepts and fundamentals CSS reference guide -- a complete guide to CSS with details on the level of Gecko/Firefox support for each. The W3C introduction to styling with CSS -- a brief guide to styling web pages for beginners. Common CSS questions -- common questions and answers for beginners Intermediate CSS concepts -- grouping, pseudo-classes and more. JavaScript Beginning Getting started with JavaScript -- what is JavaScript and how can it help you? Ja...
Localizations and character encodings - Developer guides
locales. Finding canonical encoding names The text below refers to canonical names of encodings. The canonical names are the values to the right of the equals sign in unixcharset.properties. Specifying the fallback encoding As of Firefox 28, this section is obsolete, since the preference intl.charset.default no longer exists. The mapping from locales onto fallback encodings is now built into Gecko itself. The fallback encoding is specified by the preference intl.charset.default in intl.properties. It should be set to the canonical name of the legacy encoding that users of the localizations are most likely to encounter when browsing non-conforming legacy Web content that doesn't declare its encoding. Note that the fallback encoding as defined by the previous sentence does not necessarily n...
Mobile Web Development - Developer guides
Web › Guide › Mobile
background for some text using a vendor-prefixed property like -webkit-linear-gradient, it's best to include the other vendor-prefixed versions of the linear-gradient() property. If you don't do that, at least make sure that the default background contrasts with the text: that way, the page will at least be usable in a browser which is not targeted by your linear-gradient rule. See this list of Gecko-specific properties, and this list of WebKit-specific properties, and Peter Beverloo's table of vendor-specific properties. Using tools like CSS Lint can help find problems like this in code, and preprocessors like SASS and LESS can help you to produce cross-browser code. Take care with user agent sniffing It's preferable for web sites to detect specific device features such as screen size and...
<acronym> - HTML: Hypertext Markup Language
Web › HTML › Element › acronym
a sequence of characters that compose an acronym or abbreviation for a word. Usage note: This element has been removed in HTML5 and shouldn't be used anymore. Instead web developers should use the <abbr> element. Attributes This element only has global attributes, which are common to all elements. DOM Interface This element implements the HTMLElement interface. Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Example <p>The <acronym title="World Wide Web">WWW</acronym> is only a component of the Internet.</p> Default styling Though the purpose of this tag is purely for the convenience of the author, its default styling varies from one browser to another: Some browsers, like Internet Explorer, do not style it di...
<address>: The Contact Address element - HTML: Hypertext Markup Language
Web › HTML › Element › address
t that accepts flow content, but always excluding <address> elements (according to the logical principle of symmetry, if <address> tag, as a parent, can not have nested <address> element, then the same <address> content can not have <address> tag as its parent). Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Prior to Gecko 2.0 (Firefox 4), Gecko implemented this element using the HTMLSpanElement interface Attributes This element only includes the global attributes. Usage notes It used to be the case that an <address> element was only supposed to be used to represent the contact information of the document's author. In the latest spec versions however, its definition has been updated so it can now be use...
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
Web › HTML › Element › applet
Removal is being considered in WebKit and Edge. The obsolete HTML Applet Element (<applet>) embeds a Java applet into the document; this element has been deprecated in favor of <object>. Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in. Content categories Flow content, phrasing content, embedded content, interactive content, palpable content. Permitted content Zero or more <param> elements, then transparent. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts embedded content. ...
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
Web › HTML › Element › bdo
t categories Flow content, phrasing content, palpable content. Permitted content Phrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element's attributes include the global attributes. dir The direction in which text should be rendered in this element's contents. Possible values are: ltr: Indicates that the text should go in a left-to-right direction. rtl: Indicates that the text should go in a righ...
<big>: The Bigger Text element - HTML: Hypertext Markup Language
Web › HTML › Element › big
...
<center>: The Centered Text element (obsolete) - HTML: Hypertext Markup Language
Web › HTML › Element › center
be, <body>. This tag has been deprecated in HTML 4 (and XHTML 1) in favor of the CSS text-align property, which can be applied to the <div> element or to an individual <p>. For centering blocks, use other CSS properties like margin-left and margin-right and set them to auto (or set margin to 0 auto). DOM interface This element implements the HTMLElement interface. Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Example 1 <center>This text will be centered. <p>So will this paragraph.</p></center> Example 2 (CSS alternative) <div style="text-align:center">This text will be centered. <p>So will this paragraph.</p></div> Example 3 (CSS alternative) <p style="text-align:center">This line will be centered.<br> And so ...
<cite>: The Citation element - HTML: Hypertext Markup Language
Web › HTML › Element › cite
t categories Flow content, phrasing content, palpable content. Permitted content Phrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Usage notes In the context of the <cite> element, a creative work that might be cited could be, for example, one of the following: A book A research paper An essay A poem A musical score A song A play or film script A fil...
<code>: The Inline Code element - HTML: Hypertext Markup Language
Web › HTML › Element › code
t categories Flow content, phrasing content, palpable content. Permitted content Phrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Example A paragraph of text that includes <code>: <p>The function <code>selectAll()</code> highlights all the text in the input field so the user can, for example, copy or delete the text.</p> The output generated by this HTML lo...
<dt>: The Description Term element - HTML: Hypertext Markup Language
Web › HTML › Element › dt
d tag may be omitted if this element is immediately followed by another <dt> or a <dd> element, or if there is no more content in the parent element. Permitted parents Before a <dt> or a <dd> element, inside a <dl> or (in WHATWG HTML) a <div> that is inside a <dl>. Implicit ARIA role term Permitted ARIA roles listitem DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Example For an example, see the example provided for the <dl> element. Specifications Specification Status Comment HTML Living StandardThe definition of '<dt>' in that specification. Living Standard ...
<em>: The Emphasis element - HTML: Hypertext Markup Language
Web › HTML › Element › em
t categories Flow content, phrasing content, palpable content. Permitted content Phrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. Attributes This element only includes the global attributes. Usage notes The <em> element is for words that have a stressed emphasis compared to surrounding text, which is often limited to a word or words of a sentence and affects the meaning of the sentence itself. Typically this element is...
<listing> - HTML: Hypertext Markup Language
Web › HTML › Element › listing
t they don't get interpreted. A monospaced font can also be obtained on a simple <div> element, by applying an adequate CSS style using monospace as the generic-font value in a font-family property. Attributes This element has no other attributes than the global attributes, common to all elements. DOM interface This element implements the HTMLElement interface. Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobileChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for Andr...
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
racters, to prevent browsers inadvertently parsing content the element content as HTML. A monospaced font can be applied to any HTML element via a CSS font-family style with the monospace generic value. Attributes This element has no other attributes than the global attributes common to all elements. DOM interface This element implements the HTMLElement interface. Implementation note: In Gecko 1.9.2 and before, Firefox implements the interface HTMLSpanElement for this element. ...
<s> - HTML: Hypertext Markup Language
Web › HTML › Element › s
t Phrasing content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role No corresponding role Permitted ARIA roles Any DOM interface HTMLElement Attributes This element only includes the global attributes. Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. Examples <s>Today's Special: Salmon</s> SOLD OUT<br> <span style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT Accessibility concerns The presence of the s element is not announced by most screen reading technology in its default configuration. It can be made to be announced by us...
<textarea> - HTML: Hypertext Markup Language
Web › HTML › Element › textarea
value is block. Compared to other form elements it is relatively easy to style, with its box model, fonts, color scheme, etc. being easily manipulable using regular CSS. Styling HTML forms provides some useful tips on styling <textarea>s. Baseline inconsistency The HTML specification doesn't define where the baseline of a <textarea> is, so different browsers set it to different positions. For Gecko, the <textarea> baseline is set on the baseline of the first line of the textarea's first line, on another browser it may be set on the bottom of the <textarea> box. Don't use vertical-align: baseline on it; the behavior is unpredictable. Controlling whether a textarea is resizable In most browsers, <textarea>s are resizable -- you'll notice the drag handle in the right hand corner, which can b...
<xmp> - HTML: Hypertext Markup Language
Web › HTML › Element › xmp
sure it is not interpreted as markup. A monospaced font can also be obtained on any element, by applying an adequate CSS style using monospace as the generic-font value for the font-family property. Attributes This element has no other attributes than the global attributes, common to all elements. DOM interface This element implements the HTMLElement interface. Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element. ...
HTML documentation index - HTML: Hypertext Markup Language
Web › HTML › Index
pt, Link, Media, Performance, Web Performance, as, preload, rel The preload value of the <link> element's rel attribute lets you declare fetch requests in the HTML's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in. 236 Quirks Mode and Standards Mode Gecko, Guide, HTML, NeedsUpdate, Web Development, Web Standards, XHTML In the old days of the web, pages were typically written in two versions: One for Netscape Navigator, and one for Microsoft Internet Explorer. When the web standards were made at W3C, browsers could not just start using them, as doing so would break most existing sites on the web. Browsers therefore introduced two modes to tre...
Link types - HTML: Hypertext Markup Language
s an OpenSearch plugin that can be easily added to the interface of some browsers like Firefox or Internet Explorer. <a>, <area>, <link>, <form> None. shortlink shortlink Specification From Wikipedia, the free encyclopedia: URL shortening Some websites create short links to make sharing links via instant messaging easier. <link> ??? sidebar Obsolete since Gecko 63 Indicates that the hyperlink leads to a resource that would be better suited for a secondary browsing context, like a sidebar. Browsers, that don't have such a context will ignore this keyword. While once part of the HTML specification, this has been removed from the spec and is only implemented by versions of Firefox prior to Firefox 63. <a>, <area>, <link> <form> s...
MIME types (IANA media types) - HTTP
ultipart/form-data"> <label>Name: <input name="myTextField" value="Test"></label> <label><input type="checkbox" name="myCheckBox"> Check</label> <label>Upload file: <input type="file" name="myFile" value="test.txt"></label> <button>Send the file</button> </form> will send this message: POST / HTTP/1.1 Host: localhost:8000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Upgrade-Insecure-Requests: 1 Content-Type: multipart/form-data; boundary=---------------------------8721656041911415653955004498 Content-Length: 465 -----------------------------8721656041911415653955004498 Content-Dis...
JSON - JavaScript
ces of undefined are replaced with null, and other unsupported native data types are censored. The replacer option allows for specifying other behavior. Examples Example JSON { "browsers": { "firefox": { "name": "Firefox", "pref_url": "about:config", "releases": { "1": { "release_date": "2004-11-09", "status": "retired", "engine": "Gecko", "engine_version": "1.7" } } } } } Specifications Specification ECMAScript (ECMA-262)The definition of 'JSON' in that specification. ...
Strict mode - JavaScript
The normal code may duplicate property names, with the last one determining the property's value. But since only the last one does anything, the duplication is simply a vector for bugs, if the code is modified to change the property value other than by changing the last instance. Duplicate property names are a syntax error in s...
<mpadded> - MathML
ment (a length prefixed with "+" or "-") . width Sets or increments the width. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") . Pseudo-units It is possible to use the keywords "depth", "height", and "width" as a pseudo-unit for the attributes depth, height, lspace, voffset, and width. They represent each length of the same-named dimension. Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) the MathML2 pseudo-unit lspace was allowed, which is no longer present in the MathML3 Recommendation and has been removed now. Examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </mpadded> </math> Specifications Specification Status Comment ...
<mtable> - MathML
Web › MathML › Element › mtable
f the table aligns on the environments baseline. center: See baseline. top: The top of the table aligns on the environments baseline. In addition, values of the align attribute can end with a rownumber (e.g. align="center 3"). This allows you to align the specified row of the table rather than the whole table. A negative Integer value counts rows from the bottom of the table. Starting with Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) the interpretation of negative values has been corrected (bug 601436). In Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14) the parsing has been updated to treat whitespace correctly. alignmentscope Unimplemented class, id, style Provided for use with stylesheets. columnalign Specifies the horizontal alignment of the cells. Mul...
Web audio codec guide - Web media technologies
? Container support AMR, 3GPP RTP / WebRTC compatible No Licensing Non-free; license fees and annual royalties apply. See VoiceAge licensing for details [1] While the Chrome browser does not support AMR, Chrome OS supports AMR-NB (narrowband) and AMR-WB (wideband). [2] The Firefox browser doesn't support AMR; however, the Boot to Gecko platform does support both narrow and wideband AMR in 3GP containers. FLAC (Free Lossless Audio Codec) FLAC (Free Lossless Audio Codec) is a lossless audio codec published by the Xiph.org Foundation. It provides good compression rates with no loss of audio fidelity; that is, the decompressed audio is identical to the original. Because the compression algorithm is specifically designed for audio...
Web video codec guide - Web media technologies
Time RTP / WebRTC compatible No Supporting/Maintaining organization ITU Specification https://www.itu.int/rec/T-REC-H.263/ Licensing Proprietary; appropriate license or licenses are required. Note that multiple patent pools may apply. [1] While Firefox does not generally support H.263, the OpenMax platform implementation (used for the Boot to Gecko project upon which Firefox OS was based) did support H.263 in 3GP files. [2] Version 1 of H.263 specifies a set of picture sizes which are supported. Later versions may support additional resolutions. HEVC (H.265) The High Efficiency Video Coding (HVEC) codec is defined by ITU's H.265 as well as by MPEG-H Part 2 (the still in-development follow-up to MPEG-4). HEVC was designed to support effic...
Media - Progressive web apps (PWAs)
See Privacy and the : visited selector for more details. The cursor property specifies the shape of the pointer: Some of the common shapes are as follows. Place your mouse over the items in this list to see the actual pointer shapes in your browser: Selector Selects pointer Indicating a link wait Indicating that the program cannot accept input ...
Namespaces crash course - SVG: Scalable Vector Graphics
As an XML dialect, SVG is namespaced. It is important to understand the concept of namespaces and how they are used if you plan to author SVG content. Versions of SVG viewers prior to the release of Firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-XML dialect supporting user agents such as Gecko-based browsers which must be very strict. Take some time to understand namespaces now and it will save you all sorts of headaches in the future. Background It has been a long standing goal of the W3C to make it possible for different types of XML based content to be mixed together in the same XML file. For example, SVG and MathML might be incorporated directly into an XHTML based scientific document. Being able to mix content types like this has man...
Specification Deviations - SVG: Scalable Vector Graphics
This page lists those deviations/extensions and our reasoning for them. 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. In general this change will not be visible to SVG authors (the elements for which the SVG specification does not define the 'class' and 'style' attribute are elements that are not displayed directly). ...
Introduction - SVG: Scalable Vector Graphics
JavaScript or CSS). SVG is supported in all modern browsers and even a couple versions back in some cases. A fairly complete browser support table can be found on Can I use. Firefox has supported some SVG content since version 1.5, and that support level has been growing with each release since. Hopefully, along with the tutorial here, MDN can help developers keep up with the differences between Gecko and some of the other major implementations. Before starting you should have a basic understanding of XML or another markup language such as HTML. If you are not too familiar with XML, here are some guidelines to keep in mind: SVG elements and attributes should all be entered in the case shown here since XML is case-sensitive (unlike HTML). Attribute values in SVG must be placed inside quote...
Patterns - SVG: Scalable Vector Graphics
Web › SVG › Tutorial › Patterns
ox so that the pattern starts in the correct place, and if the object size was changed to a larger one, the pattern would automatically scale so that it had the same number of objects and repeats inside it. This contrasts with the "userSpaceOnUse" system, where if the object changes the size, the pattern would stay the same and just repeat itself more times to fill the box. As a slight aside, in Gecko circles seem to have trouble drawing if their radius is set to something less than 0.075 (it is currently unknown whether this is a bug in the pattern element or not). To work around that it is probably best to avoid drawing in "objectBoundingBox" units unless you have to. Neither of these uses is what one would normally think of when you think of a pattern. Patterns usually have a set size and ...
Securing your site - Web security
n do to help secure your site. This article offers an assortment of suggestions, as well as links to other articles providing more useful information. Note: This article is a work in progress, and is neither complete nor does following its suggestions guarantee your site will be fully secure. User information security How to turn off form autocompletion Form fields support autocompletion in Gecko; that is, their values can be remembered and automatically brought back the next time the user visits your site. For certain types of data, you may wish to disable this feature. Privacy and the :visited selector This article discusses changes made to the getComputedStyle() method that eliminates the ability for malicious sites to figure out the user's browsing history. Hash passwords using a s...
Axes - XPath
Web › XPath › Axes
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes There are thirteen different axes in the XPath specification. An axis represents a relationship to the context node, and is used to locate nodes relative to that node on the tree. The following is an extremely brief description of the thirteen available axes and the degree of support available in Gecko. For further information on using XPath expressions, please see the For Further Reading section at the end of Transforming XML with XSLT document. Also see the 'axes' section in the xpath spec. ancestor Indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node. ancestor-or-self Indicates the context node and all of its ancestors, incl...
boolean - XPath
ion. Notes A number evaluates to false if it is positive or negative zero or NaN. Otherwise, it evaluates true. A node-set evaluates to true if it is non-empty. A string evaluates to false if it an empty string. Otherwise, it evaluates to true. An object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type. Defined XPath 1.0 4.3 Gecko support Supported. ...
ceiling - XPath
...
choose - XPath
...
concat - XPath
...
contains - XPath
...
count - XPath
Web › XPath › Functions › count
...
current - XPath
...
document - XPath
ad been concatenated into a single node-set. Other specific conditions exist with specified behaviors. See the XSLT 1.0 documentation for details. Since the URI is relative to the XSL document, document("") would return the root node of the current document. This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library. Defined XSLT 1.0 12.1 Gecko support Supported. ...
element-available - XPath
scope for the expression. Returns Returns true if and only if the expanded-name is the name of an instruction. If the expanded-name has a namespace URI equal to the XSLT namespace URI, then it refers to an element defined by XSLT. Otherwise, it refers to an extension element. If the expanded-name has a null namespace URI, the element-available function will return false. Defined XSLT 1.0 15 Gecko support Supported. ...
false - XPath
Web › XPath › Functions › false
...
floor - XPath
Web › XPath › Functions › floor
...
format-number - XPath
...
function-available - XPath
...
generate-id - XPath
xt node will be used. Returns A string containing the generated id. Notes The same id must be generated every time for the same node in the current document in the current transformation. The generated id may not be the same in subsequent transformations. This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library. Defined XSLT 1.0 12.4 Gecko support Supported. ...
id - XPath
Web › XPath › Functions › id
ds. If expression is a string, or anything other than a node-set, then expression is treated as a space-separated list of ids. The returned node set is the nodes corresponding to those ids. Returns A node-set containing the node or nodes identified by the given id or ids. Notes The DTD of the XML document determines what attribute is an ID. See XPath 1.0 5.2.1 Defined XPath 1.0 4.1 Gecko support Partially supported. ...
key - XPath
Web › XPath › Functions › key
ame of the xsl:key element to be used. value The returned node-set will contain every node that has this value for the given key. Returns A node set. Notes The xsl:key element defines what attribute on what given elements will be used to match the key. This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library. Defined XSLT 1.0 12.2 Gecko support Supported. ...
lang - XPath
Web › XPath › Functions › lang
...
last - XPath
Web › XPath › Functions › last
...
local-name - XPath
...
name - XPath
Web › XPath › Functions › name
de in a given node-set. Syntax name( [node-set] ) Arguments node-set (optional) The QName of the first node in this node-set will be returned. If this argument is omitted, the current context node will be used. Returns A string representing the QName of a node. Notes The QName is the node's qualified name, including its namespace prefix and its local name. Defined XPath 1.0 4.1 Gecko support Supported. ...
namespace-uri - XPath
d. If this argument is omitted, the current context node will be used. Returns A string representing URI of the namespace in which the given node resides. Notes If the given node does not have a specified namespace, the returned string will be an empty string. For nodes other than element and attribute nodes, the returned string will always be an empty string. Defined XPath 1.0 4.1 Gecko support Supported. ...
normalize-space - XPath
...
not - XPath
Web › XPath › Functions › not
...
number - XPath
atch this pattern, then the string is converted to NaN. Boolean true is converted to 1. False is converted to 0. A node-set is first converted to a string as if by a call to the string() function and then converted in the same way as a string argument. An object of a type other than the four basic types is converted to a number in a way that is dependent on that type. Defined XPath 1.0 4.4 Gecko support Supported. ...
position - XPath
of the path. <xsl:template match="//a[position() = 5]"> <!-- this template matches the fifth a element anywhere in the document. --> </xsl:template> <xsl:template match="//div[@class='foo']/bar[position() = 1]"> <!-- this template matches the first bar element that is a child of a div element with a class attribute equal to "foo" --> </xsl:template> Defined XPath 1.0 4.1 Gecko support Supported. ...
round - XPath
Web › XPath › Functions › round
...
starts-with - XPath
...
string-length - XPath
...
string - XPath
tive zero is converted to the string 0. Positive infinity is converted to the string Infinity. Negative infinity is converted to the string -Infinity. Decimal numbers between -1 and 1 are converted to a string with a single leading 0 before the decimal point. Boolean true is converted to the string true. Boolean false is converted to the string false. Defined XPath 1.0 4.2 Gecko support Supported. ...
substring-after - XPath
needle The substring to search for. Everything after the first occurrence ofneedle inhaystack will be returned. Returns A string. Examples XPath Example Output substring-after('aa-bb','-') bb substring-after('aa-bb','a') a-bb substring-after('aa-bb','b') b substring-after('aa-bb','q') (empty string) Defined XPath 1.0 4.2 Gecko support Supported. ...
substring-before - XPath
string to search for. Everything before the first occurrence ofneedle inhaystack will be returned. Returns A string. Examples XPath Example Output substring-before('aa-bb','-') aa substring-before('aa-bb','a') (empty string) substring-before('aa-bb','b') aa- substring-before('aa-bb','q') (empty string) Defined XPath 1.0 4.2 Gecko support Supported. ...
substring - XPath
valuate. start The position withinstring the substring begins length(optional) The length of the substring. If omitted, the returned string will contain every character from thestart position to the end ofstring. Returns A string. Notes As in other XPath functions, the position is not zero-based. The first character in the string has a position of 1, not 0. Defined XPath 1.0 4.2 Gecko support Supported. ...
sum - XPath
Web › XPath › Functions › sum
...
system-property - XPath
...
translate - XPath
)" /> Output THE QUICK BROWN FOX. If abc is longer than XYZ, then every occurrence of characters in abc that do not have a corresponding character in XYZ will be removed. Example <xsl:value-of select="translate('The quick brown fox.', 'brown', 'red')" /> Output The quick red fdx. If XYZ contains more characters than abc, the extra characters are ignored. Defined XPath 1.0 4.2 Gecko support Supported. ...
true - XPath
Web › XPath › Functions › true
...
unparsed-entity-url - XPath
-XML data referenced in the DTD of the source document. Syntax string unparsed-entity-url(string) Arguments The name of the unparsed entity. If the argument is not a string, it is converted using the rules of the string() function. The name should be an XML Name. Returns The URI of the unparsed entity retrieved from the DTD, if it exists. Otherwise an empty string. Defined XSLT 1.0 12.4 Gecko support Not supported. ...
Functions - XPath
For further information on using XPath/XSLT functions, please see the For Further Reading page. ...
<xsl:apply-imports> - XSLT: Extensible Stylesheet Language Transformations
han template rules in imported stylesheets. Sometimes, however, it is useful to be able to force the processor to use a template rule from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet. Syntax <xsl:apply-imports/> Required Attributes None. Optional Attributes None. Type Instruction, appears within a template. Defined XSLT, section 5.6. Gecko support Supported. ...
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
e name of the attribute set. The name must be a valid QName. Optional Attributes use-attribute-sets Builds an attribute set from other attribute sets. The names of the contributing sets must be separated with whitespace characters and must not directly or indirectly embed themselves. Type Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>. Defined XSLT, section 7.1.4. Gecko support Supported. ...
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:call-template> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:choose> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › choose
...
<xsl:comment> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › comment
...
<xsl:copy-of> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › copy-of
...
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › copy
es of the current node. Syntax <xsl:copy use-attribute-sets=LIST-OF-NAMES> TEMPLATE </xsl:copy> Required Attributes None. Optional Attributes use-attribute-sets Lists attribute sets that should be applied to the output node, if it is an element. Names of the sets should be separated with whitespace characters. Type Instruction, appears within a template. Defined XSLT, section 7.5. Gecko support Supported. ...
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
git zero character. The default is (0). digit Specifies the character used in the format pattern to stand for a digit. The default is (#). pattern-separator Specifies the character separating positive and negative subpatterns in a format pattern. The default is the semi-colon (;). Type Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>. Defined XSLT, section 12.3. Gecko support Supported as of 1.0 (Mozilla 1.0, Netscape 7.0). ...
<xsl:element> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › element
. The name must be a valid QName. Optional Attributes namespace Specifies the namespace of the output element. use-attribute-sets A whitespace-separated list of attribute-set element names to be applied to the element element's output element. Applied attributes can be overridden via nested attribute elements. Type Instruction, appears within a template. Defined XSLT, section 7.1.2. Gecko support Supported. ...
<xsl:fallback> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › fallback
...
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › for-each
...
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › if
en. ...
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › import
of the included stylesheet have exactly the same precedence as the contents of the including stylesheet. Syntax <xsl:import href=URI /> Required Attributes href Specifies the URI of the stylesheet to import. Optional Attributes None. Type Top-level, must appear before any other child of <xsl:stylesheet> or <xsl:transform> in the importing stylesheet. Defined XSLT, section 2.6.2. Gecko support Mostly supported with a few issues with top level variables and parameters as of Mozilla 1.0. ...
<xsl:include> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › include
...
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › key
...
<xsl:message> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › message
sheet. It can be useful for debugging. Syntax <xsl:message terminate="yes" | "no" > TEMPLATE </xsl:message> Required Attributes None. Optional Attributes terminate Set to "yes", indicates that execution should be terminated. The default value is "no", in which case the message is output and execution continues. Type Instruction, appears within a template. Defined XSLT, section 13. Gecko support Supported. ...
<xsl:namespace-alias> - XSLT: Extensible Stylesheet Language Transformations
to the XSLT namespace in the output tree. Syntax <xsl:namespace-alias stylesheet-prefix=NAME result-prefix=NAME /> Required Attributes stylesheet-prefix Specifies the temporary namespace. result-prefix Specifies the desired namespace for the output tree. Optional Attributes None. Type Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>. Defined XSLT, section 7.1.1 Gecko support Not supported at this time. ...
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › number
te can have the value "alphabetic" or "traditional". The default is "alphabetic". grouping-separator Specifies what character should be used as the group (e.g. thousands) separator. The default is the comma (,). grouping-size Indicates the number of digits that make up a numeric group. The default value is "3". Type Instruction, appears within a template. Defined XSLT, section 7.7 Gecko support Partial support. See comments above. ...
<xsl:otherwise> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › output
Lists elements whose text contents should be written as CDATA sections. Elements should be whitespace separated. indent (Not supported.) Specifies if the output should be indented to indicate its hierarchic structure. media-type (Not supported.) Specifies the output document MIME type. Type Top-level, must be the child <xsl:stylesheet> or <xsl:transform>. Defined XSLT, section 16. Gecko support Partial support. See comments above. ...
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › param
the first child element of the template. Syntax <xsl:param name=NAME select=EXPRESSION> TEMPLATE </xsl:param> Required Attributes name Names the parameter. This must be a QName. Optional Attributes select Uses an XPath expression to provide a default value if none is specified. Type Instruction, can appear as a top-level element or within a template. Defined XSLT, section 11. Gecko support Supported. ...
<xsl:preserve-space> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:processing-instruction> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › sort
. lang Specifies which language is to be used by the sort. data-type Defines whether items are to be ordered alphabetically or numerically. The allowable values are "text" and "number" with "text" being the default. Type Subinstruction, always appears as a child of <xsl:for-each>, where it must appear before the template proper or of <xsl:apply-templates>. Defined XSLT, section10. Gecko support Supported. ...
<xsl:strip-space> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › template
the <xsl:apply-templates> element. This is useful for processing the same information in multiple ways. priority Specifies a numeric priority for this template. This can be any number other than Infinity. The processor uses this number when more than one template matches the same node. Type Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>. Defined XSLT, section 5.3. Gecko support Supported. ...
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › text
this attribute is essentially irrelevant in context. To output html-entities, use numerical values instead, eg &#160; for &nbsp;) Specifies whether special characters are escaped when written to the output. The available values are "yes" or "no". If "yes" is set, for example, the character > is output as >, not as &gt;. Type Instruction, appears within a template. Defined XSLT, section 7.2 Gecko support Supported as noted. ...
<xsl:transform> - XSLT: Extensible Stylesheet Language Transformations
...
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › value-of
this attribute is essentially irrelevant in context. To output html-entities, use numerical values instead, eg &#160 for &nbsp) Specifies whether special characters are escaped when written to the output. The available values are "yes" or "no". If "yes" is set, for example, the character > is output as >, not as "&gt". Type Instruction, appears with a template. Defined XSLT, section 7.6.1. Gecko support Supported except as above. ...
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › variable
variable through an XPath expression. If the element contains a template, this attribute is ignored. Type Top-level or instruction. If it occurs as a top-level element, the variable is global in scope, and can be accessed throughout the document. If it occurs within a template, the variable is local in scope, accessible only within the template in which it appears. Defined XSLT, section 11. Gecko support Supported. ...
<xsl:when> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › when
an <xsl:choose> element, acting like a case statement. Syntax <xsl:when test=EXPRESSION> TEMPLATE </xsl:when> Required Attributes test Specifies a boolean expression to be evaluated. If true, the contents of the element are processed; if false, they are ignored. Optional Attributes None. Type Subinstruction, always appears within an <xsl:choose> element. Defined XSLT, section 9.2. Gecko support Supported. ...
<xsl:with-param> - XSLT: Extensible Stylesheet Language Transformations
...
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element
Use the {{ListSubpages}} macro once the BCD for <xsl:fallback>, <xsl:import>, <xsl:namespace-alias>, <xsl:number>, <xsl:output>, <xsl:stylesheet>, <xsl:text> and <xsl:value-of> is fully migrated. <xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl...
Basic Example - XSLT: Extensible Stylesheet Language Transformations
The XML file describes an article and the XSL file formats the information for display. Figure 4 : XML file <?xml version="1.0"?> <myNS:Article xmlns:myNS="http://devedge.netscape.com/2002/de"> <myNS:Title>My Article</myNS:Title> <myNS:Authors> <myNS:Author company="Foopy Corp.">Mr. Foo</myNS:Author> <myNS:Author>Mr. ...
Introduction - XSLT: Extensible Stylesheet Language Transformations
it into an existing document. Since the XML data loaded only contains the raw information without any presentation data, it can load quickly even on dialup. XSLT allows the author to directly manipulate the structure of a document. For example, it permits the rearranging and sorting of elements; it also provides more fine-grained control of the resulting document's structure. As of Mozilla 1.2, Gecko enables JavaScript to create XSLT processors. This article covers XSLT/JavaScript bindings in Gecko. They are not available in Netscape 7.0x however are available in Netscape 7.1. ...