Search completed in 1.29 seconds.
2474 results for "mozilla":
Your results are loading. Please wait...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
Introduction When Netscape started the Mozilla browser, it made the conscious decision to support W3C standards. As a result, Mozilla is not fully backwards-compatible with Netscape Navigator 4.x and Microsoft Internet Explorer legacy code; for example, Mozilla does not support <layer> as I will discuss later. Browsers, like Internet Explorer 4, that were built before the conception of W3C standards inherited many quirks. In this article, I will describe Mozilla's quirks mode, which provides strong backwards HTML compatibility with Internet Explorer and other legacy browsers. I'll also cover nonstandard technologies, such as XMLHttpRequest and rich text editing, that Mozilla does support because no W3C equivalent existed at the time. They include: HTML 4.01, XHTML 1.0 and XHTML 1.1 ...
...sion 3 (JavaScript 1.5): ECMA-262 General cross-browser coding tips Even though Web standards do exist, different browsers behave differently (in fact, the same browser may behave differently depending on the platform). Many browsers, such as Internet Explorer, also support pre-W3C APIs and have never added extensive support for the W3C-compliant ones. Before I go into the differences between Mozilla and Internet Explorer, I'll cover some basic ways you can make a Web application extensible in order to add new browser support later. Since different browsers sometimes use different APIs for the same functionality, you can often find multiple if() else() blocks throughout the code to differentiate between the browsers. The following code shows blocks designated for Internet Explorer: . . . v...
...inate the need to recode for a new browser is to abstract out functionality. Rather than multiple if() else() blocks, you increase efficiency by taking common tasks and abstracting them out into their own functions. ...
...And 62 more matches
Mozilla
The articles below include content about downloading and building Mozilla code. In addition, you'll find helpful articles about how the code works, how to build add-ons for Mozilla applications and the like. A bird's-eye view of the Mozilla framework The purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based Mozilla application framework. Accessibility and Mozilla Accessibility is the idea that software (among other things) should be designed to be usable and, as much as possible, convenient to use for people with disabilities. ...
... Add-ons Add-ons allow developers to extend and modify the functionality of Firefox. ...
...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 bugs are filed pointing out situations where perfectly legitimate words are missing from the English spell check dictionary in Firefox. This article describes the process for adding a word to the dictionary. Adding phishing protection data providers ...
...And 55 more matches
Mozilla release FAQ - Archive of obsolete content
Warning: The content of this article may be out of date. It was last updated in 2005. This document may be distributed and modified freely. No guarantee of factuality in this FAQ is made, and it is maintained by Pat Gunn, who is not affiliated with Netscape. Various other people have contributed to this FAQ. General Questions about the Mozilla Project What is Mozilla? Mozilla is a project to continue Netscape Communicator as an open project. The project is maintained by employees of Netscape (now a division of AOL), Red Hat, some other companies, as well as contributors from the community. On what is Mozilla based? The Mozilla project started near the end of life of the 4.x line of Netscape Communicator. Originally, the plan was just to re-stabilize the code and release 5.0, but it...
...but it was decided within the community that the more ambitious changes that were planned for later integration were close to being ready. The old layout engine, networking engine, and several of the older modules were gutted, and much later, the sources reached the point where Netscape was comfortable making a release, and so Netscape 6.0 was released. Netscape 6.0 and above are based off of the Mozilla source. Mozilla 1.0 (Mozilla uses a different versioning system than Netscape) is due for release soon. When was Mozilla released? The source to Mozilla was first released on 31 March 1998. The code has been continually available since then via CVS (see section 1.8), and occasional binary releases (first as milestones, and more recently as versioned releases) have been made. As of the time of thi...
...If built from CVS, the date of the CVS checkout is the best way to refer to the version, otherwise use the release number. Older versions used milestone numbers (e.g. ...
...And 50 more matches
Handling Mozilla Security Bugs
Version 1.1 IMPORTANT: Anyone who believes they have found a Mozilla-related security vulnerability can and should report it by sending email to address security@mozilla.org. For more information read the rest of this document. Introduction In order to improve the Mozilla project's approach to resolving Mozilla security vulnerabilities, mozilla.org is creating more formal arrangements for handling Mozilla security-related bugs. First, mozilla.org is appointing a security module owner charged with primary responsibility for coordinating the investigation and resolution of reported Mozilla security vulnerabilities. The security module owner will have one or more peers to assist in this task. ...
...This document describes how the new security organizational structure will work, and how security-related Mozilla bug reports will be handled. ...
...eating more formal arrangements for handling Mozilla security-related bugs. First, mozilla.org is appointing a security module owner charged with primary responsibility for coordinating the investigation and resolution of reported Mozilla security vulnerabilities. The security module owner will have one or more peers to assist in this task. At the same time, mozilla.org is also creating a larger "Mozilla security bug group" by which Mozilla contributors and others can participate in addressing security vulnerabilities in Mozilla. This document describes how the new security organizational structure will work, and how security-related Mozilla bug reports will be handled. Note that the focus of this new structure is restricted solely to addressing actual security vulnerabilities arising from probl...
...And 33 more matches
List of Mozilla-Based Applications - Archive of obsolete content
The following is a list of all known active applications that are built using Mozilla technologies. This list is likely to be incomplete since we think there are many dark matter projects that we don't know about. If you have information about a new project or extra information about an existing project, please feel free to update this page. A list of former Mozilla-based applications is also available. Name Description Additional Information 389 Directory Server LDAP server Uses NSS A380 seatback entertainment system media software This blog post mentions a reference to Mozilla being used but I couldn't find more information about it. Abstract accounting tool Adobe Acrobat and Adobe Reader Portable Document Format...
... Description Additional Information 389 Directory Server LDAP server Uses NSS A380 seatback entertainment system media software This blog post mentions a reference to Mozilla being used but I couldn't find more information about it. ...
... IM client Uses NSS Apache web server Doesn't use NSS by default, but can be configured to use NSS with mod_nss SSL module ApicaWatch site performance monitoring tool Uses Firefox as part of its monitoring package Astyle CSS editor editing tool Atmail webmail client Aviva for Java mainframe connectivity product Uses Mozilla Rhino Babelgum Internet TV service Basilisk pre-Servo XUL-based web browser Uses most of the Firefox 55 source code Batik Java-based toolkit Uses Mozilla Rhino BitBox security focused browser Seemingly based on Firefox Blackbird browser for African American community BlueGriffon wysiwyg editor Next generat...
...And 30 more matches
Mozilla Crypto FAQ - Archive of obsolete content
In this document I try to answer some frequently asked questions about the Mozilla web browser and mail/news client and its support for SSL, S/MIME, and related features based on cryptographic technology. Note that this document is for your information only and is not intended as legal advice. If you wish to develop and distribute cryptographic software, particularly for commercial sale or distribution, then you should consult an attorney with expertise in the particular laws and regulations that apply in your jurisdiction. I've updated this version of the Mozilla Crypto FAQ to discuss the situation now that the RSA public key algorithm is in the public domain and a full open source crypto implementation is being added to the Mozilla code base. Information in the FAQ also reflects the ne...
... FAQ to discuss the situation now that the RSA public key algorithm is in the public domain and a full open source crypto implementation is being added to the Mozilla code base. Information in the FAQ also reflects the new U.S. encryption export regulations published on January 14, 2000, the release on February 11, 2000, of source code for SSL, S/MIME, and general PKI functionality for use in the Mozilla project, and the "Bernstein advisory" issued by the Bureau of Export Administration on February 17, 2000. The questions in this FAQ address Mozilla's support for encryption and related security functionality, information important to Mozilla contributors relating to encryption functionality in Mozilla, and general questions on U.S. regulation of encryption technology. Cryptographic functionalit...
...ect, and the "Bernstein advisory" issued by the Bureau of Export Administration on February 17, 2000. The questions in this FAQ address Mozilla's support for encryption and related security functionality, information important to Mozilla contributors relating to encryption functionality in Mozilla, and general questions on U.S. regulation of encryption technology. Cryptographic functionality in Mozilla Have all the issues with Mozilla and crypto now been resolved? Almost. Now that the RSA patent is in the public domain, Mozilla crypto development can proceed with minimal restrictions. In the near future the Mozilla code base will include a complete open source cryptographic library, and Mozilla will include SSL support as a standard feature. After the U.S. government relaxed U.S. export regu...
...And 30 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. ...
... 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. Automated testing tips and tricks Automatic Mozilla Configurator Ankh8 Automatically Handle Failed Asserts in Debug Builds As of 2004-12-8, it is now possible to automatically handle failed asserts in debug builds of Mozilla for Windows. BlackConnect Blackwood Bonsai It is a tool that lets you perform queries on the contents of a CVS archive; you can: get a list of...
...doing diffs between various versions of a file; and finding out which person is responsible for changing a particular line of code ("cvsblame"). Bookmark Keywords Practically every Web surfer has bookmarks, of course, and power surfers usually have hundreds stuffed into folders within folders. In addition to being handy pointers to useful resources, bookmarks in Mozilla can be used to make the address bar itself a power tool. Searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks. Building TransforMiiX standalone calICalendarView An object implementing calICalendarView is generally intended to serve as a way of manipulating a set of DOM nodes ...
...And 29 more matches
RDF in Mozilla FAQ - Archive of obsolete content
Where do I find information on Open Directory ("dmoz")? Unfortunately, not here! Well, here's a little... Start at http://www.dmoz.org/ for more information on the Open Directory. ...
... Where do I find information on Open Directory ("dmoz")? Unfortunately, not here! Well, here's a little... Start at http://www.dmoz.org/ for more information on the Open Directory. ...
... Where do I find information on Open Directory ("dmoz")? Unfortunately, not here! Well, here's a little... Start at http://www.dmoz.org/ for more information on the Open Directory. The Open Directory dataset is available as a (huge) RDF/XML dump. ...
...And 26 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
our extension using XUL and JavaScript only. For complex extensions, it may be necessary to create components in C++ that provide 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 releas...
...ns 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 Firefox extension with any or all of the above-mentioned requirements. I should also stress that you do not have to build Mozilla or use the Mozilla build system if you want to create C++ components for Mozilla. If you are just looking to create an XPCOM component or two, this is probably 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 appro...
...ould 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 driven to the brink of insanity trying to build it for the first time. If you're not an experienced C++ developer, I wouldn't even bother. Stick to JavaScript. On Windows Platforms The first time...
...And 20 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
Obsolete since Gecko 4.0This 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. 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. ...
...he 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++. Prerequisites Java 1.4.2 or newer XULRunner 1.8.0.1 or newer Embedding In order to embed Mozilla in your Java application, you will need to add the library MozillaInterfaces.jar (located in xulrunner/sdk/lib folder) to your classpath. This library provides the interfaces necessary to bootstrap Mozilla and call XPCOM methods. To start embedding, we use the methods provided by the Mozilla singleton class. ...
...embed Mozilla in your Java application, you will need to add the library MozillaInterfaces.jar (located in xulrunner/sdk/lib folder) to your classpath. This library provides the interfaces necessary to bootstrap Mozilla and call XPCOM methods. To start embedding, we use the methods provided by the Mozilla singleton class. ...
...And 18 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
We provide an XML-based language called XUL for defining the user interface of your application. CSS is used to style these UI's and DTD's are used to localize the textual information - making your application extremely flexible and able to be utilized across the globe. ...
...anies who are working to provide consumers with new interactive applications, solutions and services, Gecko will become a key catalyst for new growth and innovation and for delivering anytime, anywhere access to millions of new users. As the heart of a browser, the browser engine software component is responsible for interpreting and rendering the graphics, text and script on the Web. With Gecko, Mozilla has cleanly separated the browser engine component from the rest of the client software so it can be embedded and used to interpret, display and run web content, applications and services on any computing platform or device. Open source and freely available, Gecko is small in size and modular and achieves rendering speed superior to all other browser engines - which makes it perfect for embedding...
...speed and standards support, the Gecko browser engine represents a major advance for developers. With Gecko, developers seeking a streamlined way to create and distribute web-based services across multiple platforms and devices can write once to W3C standards and their content and web applications will be accessible from across computing platforms and devices. Gecko is based on contributions from mozilla.org, the organization chartered with managing Netscape's open source initiative among thousands of Internet developers and participating vendors such as Netscape. The Gecko browser engine offers several key benefits including: Size: Gecko has been designed to be lean and modular, bringing full-functionality browsing to a variety of new consumer devices. Because it is small, Gecko can be embedd...
...And 17 more matches
Mozilla Web Developer FAQ
that the Almost Standards mode is activated for HTML, is to use this doctype declaration: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> The easiest way to activate the Quirks mode for HTML is to omit the doctype declaration. However, authoring new documents that rely on quirks is discouraged. The Almost Standards mode was introduced in Mozilla 1.1 beta and Mozilla 1.0.1. In earlier versions the doctype declarations that now activate the Almost Standards mode activated the Standards mode. Doctype sniffing only applies to documents served as text/html. Documents sent as XML always activate the Standards layout mode. This includes documents sent as application/xhtml+xml. The consequence is that XHTML 1.0 Transitional documents are render...
... <a> elements) to block. If the table cells that contain only an image are marked with <td class="imgcell">, the required CSS rule is: .imgcell img, .imgcell a { display: block; } Longer explanation... Why are there still gaps even between text rows in tables when the layout engine is in the Standards mode or in the Almost Standards mode? In the Standards mode and in the Almost Standards mode Mozilla does not suppress the default margins of the first and last child element in table cells. Therefore, the default margins for paragraphs apply even with markup such as <td><p>foo</p></td>. Often the content of a cell in a table of tabular data does not constitute a paragraph. In that case, the easy solution is not to mark the contents of the cell as a paragraph. When the paragraph markup is call...
...x itself. A block is centered by setting its margin-left and margin-right to auto and its width to a value that makes the block narrower than its containing block. It is also possible, although not very likely, that you are seeing a bug. JavaScript doesn't work! Why? Some proprietary document objects such as document.all and document.layers are not part of the W3C DOM and are not supported in Mozilla. ...
...And 15 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
<< PreviousNext >> Mozilla Documentation Firefox extension development is still an immature discipline, with a developer base consisting mostly of hobbyists and just a few organized development groups. There's a great deal of free online documentation available on XUL and extension development, but finding it and turning it into useful information can be a daunting task. Knowing where to look is critical and non trivial. This tutorial was aimed at compiling all the right resources for extension development and putting them in the right context, but there's much more to learn, and knowing how to find it is part of what we felt was necessary to teach. Let's look into the resources that have helped us the most. ...
...t into useful information can be a daunting task. Knowing where to look is critical and non trivial. This tutorial was aimed at compiling all the right resources for extension development and putting them in the right context, but there's much more to learn, and knowing how to find it is part of what we felt was necessary to teach. Let's look into the resources that have helped us the most. The Mozilla Developer Center This is the official and most extensive guide to everything related to Mozilla. MDC is where this tutorial is hosted, and where most of its links point to. It encompasses Firefox, other Mozilla products, Javascript, CSS, XUL, web and extension development guidelines, accessibility, usability, best practices... The list goes on. It's incredibly comprehensive, and its underlying W...
... The list goes on. It's incredibly comprehensive, and its underlying Wiki technology makes it easy to expand and evolve with the help of the community. Having said that, there are a few problems with it. First of all, the in-site search is not reliable, so we recommend using a search engine like Google, with queries such as "MDC Javascript Code Modules" or "Javascript code modules site:developer.mozilla.org". Secondly, there are several important articles that are very lacking in information, like the Preferences System page. And finally, what we mentioned in our XPCOM section: almost no documentation on XPCOM components. The documentation on interfaces is very complete, but it isn't nearly as useful as the documentation that existed at XULPlanet and was later taken down. XULPlanet allowed you t...
...And 11 more matches
Mozilla Web Developer Community - Archive of obsolete content
Get news from developer.mozilla.org and connect with developers involved in cross-browser, standards-based web development. ...
... Get news from developer.mozilla.org and connect with developers involved in cross-browser, standards-based web development. ...
... Get news from developer.mozilla.org and connect with developers involved in cross-browser, standards-based web development. ...
...And 11 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
For the purposes of this article I'm using Dave Townsend's McCoy as an example. ...
...For the purposes of this article I'm using Dave Townsend's McCoy as an example. It's a straightforward XULRunner app that nonetheless uses most of the features any given application is likely to need. ...
...e, you may be fixing bugs in XULRunner, applying patches from Bugzilla that aren't yet checked into the main repository or making your own changes to deploy as part of a customized XULRunner build. So basically, almost everyone should be able to skip the next section. Building XULRunner Still here? Hey, it's not all bad. You'll get a warm fuzzy feeling from mastering the complex but very powerful Mozilla build system. And all that furniture you smash in the meantime makes great kindling to get you through those cold winter nights. Let's face it, it was probably time for you to get some new furniture anyway. Everything you ever wanted to know about building Mozilla (and thus XULRunner) can be found in the Build Documentation. Follow the instructions for meeting build requirements and getting the s...
...And 11 more matches
Contributing to the Mozilla code base
This page should guide you through the initial steps of contributing to Mozilla. Welcome, we're delighted to see you! :) Need help? The Mozilla community prides itself on being an open, accessible, and friendly community for new participants. If you have any difficulties getting involved or finding answers to your questions, please come and ask your questions in our chatroom, where we can help you get started. We know even before you start contributing that getting set up to work on Firefox and finding a bug that's a good fit for your skills can be a challenge. We're always looking for ways to improve this process: making Mozilla more open, accessible, and easier to participate with. If you're having any trouble following this documentation, or hit a barrier you can't get around, plea...
...n before you start contributing that getting set up to work on Firefox and finding a bug that's a good fit for your skills can be a challenge. We're always looking for ways to improve this process: making Mozilla more open, accessible, and easier to participate with. If you're having any trouble following this documentation, or hit a barrier you can't get around, please contact Mike Hoye at mhoye@mozilla.com. We're determined to solve hurdles for new contributors. What skills do I need? Mozilla is a large project and we are thrilled to have contributors with very diverse skills Below is a table with our currently available projects to contribute to, along with the skills needs and links to their documentation. Project Skills Documentation/onboarding Firefox browser (c...
...If getting involved in design, support, translation, testing, or other types of contributions sparks your interest please see community webiste. Perhaps you do not know programming yet, but you...
...And 11 more matches
XML in Mozilla - Archive of obsolete content
Mozilla has a relatively good support for XML. Several World Wide Web Consortium (W3C) Recommendations and drafts from the XML family of specifications are supported, as well as other related technologies. This page is outdated. Please help updating it with current information. Supported Core XML W3C Recommendations The core XML support includes parsing XML without validation (we use the Expat parser), displaying XML with CSS, manipulating XML documents with scripts via DOM, associating stylesheets with XML documents, and namespaces in XML. The core support is very good with few bugs. DTDs and Other External Entities Mozilla does not load external entities from the web. Mozilla can load external entities whose system identifier uses the chrome protocol. This feature is used mainly to ...
..., displaying XML with CSS, manipulating XML documents with scripts via DOM, associating stylesheets with XML documents, and namespaces in XML. The core support is very good with few bugs. DTDs and Other External Entities Mozilla does not load external entities from the web. Mozilla can load external entities whose system identifier uses the chrome protocol. This feature is used mainly to localize Mozilla to different languages (the UI strings are stored in external DTD files). ...
...al entities from the web. Mozilla can load external entities whose system identifier uses the chrome protocol. This feature is used mainly to localize Mozilla to different languages (the UI strings are stored in external DTD files). Another exception is an entity whose system identifier is a relative path, and the XML declaration states that the document is not standalone (default), in which case Mozilla will try to look for the entity under <bin>/res/dtd directory. Mozilla may also make an exception with XHTML documents, see below. Mozilla will read internal (DTD) subsets, and in special circumstances external DTDs as explained above and will use this information to recognize ID type attributes, default attribute values, and general entities. Other Notes A lot of the Document Object Model (DOM, ...
...And 10 more matches
What every Mozilla translator should know
l10n stands for localization = l + another 10 letters + n Mailing lists and other resources There are several mailing lists to keep the track of what's going on, which are available as newsgroups, as well, both on news.mozilla.org and Google groups: The main l10n list Also available as mozilla.dev.l10n, .l10n in short. Discussion about localization take part here just as well as l10n-focused announcements. Planning list Also available as mozilla.dev.planning, .planning in short. The Mozilla project discusses general planning and schedule questions here. ...
...oth on news.mozilla.org and Google groups: The main l10n list Also available as mozilla.dev.l10n, .l10n in short. Discussion about localization take part here just as well as l10n-focused announcements. Planning list Also available as mozilla.dev.planning, .planning in short. The Mozilla project discusses general planning and schedule questions here. Discussions of interest to the general Mozilla developer community are at least notified here. ...
... available as mozilla.dev.l10n, .l10n in short. Discussion about localization take part here just as well as l10n-focused announcements. Planning list Also available as mozilla.dev.planning, .planning in short. The Mozilla project discusses general planning and schedule questions here. Discussions of interest to the general Mozilla developer community are at least notified here. Translate the Mozilla web or mozilla.dev.l10n.web, we moved announcements and discussions about the translation of the Mozilla web pages to this group. All these groups are pretty low traffic. ...
...And 10 more matches
Mozilla’s UAAG evaluation report
overnment accessibility regulations at this time. This document is based on the September 12, 2001 Candidate Recommendation of UAAG 1.0. This may be different from the most recent version, check for updates on the User Agent Working Group home page. Look to the "techniques" document for real-world implementation examples of each checkpoint. ...
...each checkpoint. This UAAG evaluation report covers nightly builds of the Mozilla web browser itself, running on Windows 2000, as of February 20, 2002. We are claiming to support HTML 4, CSS 2, PNG, JPG and GIF. This evaluation does not cover Mailnews or Composer. There may be accessibility and customizability features not listed here. A very good resource is The Customizing Document. When filing Mozilla bugs based on UAAG requirements, please use bug 24413 as the UAAG meta bug. Checkpoint Information (Same scaled used on W3C's UAAG implementation reports pages) Rating Scale C: Complete Implementation VG: Very Good Implementation, almost all requirements satisfied G: Good Implementation, most important requirements satisfied P: Poor Implementation, some requiremen...
...isfied and/or difficult for user to access feature NI: Not Implemented NR: Not Rated NA: Not Applicable Document under construction Guideline 1. Support input and output device-independence. Checkpoint Title Status Notes/plans 1.1 Full keyboard access. (P1) VG We have some remaining bugs, and some keyboard usability issues, but in general Mozilla now has keyboard equivalents for almost everything. Most browsers do not allow the user to select text with the keyboard alone. We intend to do this with a caret browsing feature. 1.2 Activate event handlers. (P1) P onMouseOver, onMouseDown, onMouseUp, onMouseMove, onClick, onDBClick: no keyboard support onFocus and onBlur: Cannot be activated with pointer 1.3 Prov...
...And 9 more matches
Mozilla accessibility architecture
This page is maintained by Aaron Leventhal and by the Mozilla Accessibility Community. Feedback and constructive suggestions are encouraged. 1. Intro This document is for people who wish to understand the architecture of Mozilla's accessibility API module, which provides support for platform accessibility APIs. Accessibility APIs are used by 3rd party software like screen readers, screen magnifiers, and voice dictation software, which need information about document 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 fo...
... 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 node in the DOM tree could be important to 3rd party assistive technology. Accessibility APIs on each operating system have built-in assumptions about what is the most important information, and how an accessibility ser...
...oject 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 node in the DOM tree could be important to 3rd party assistive technology. Accessibility APIs on each operating system have built-in assumptions about what is the most important information, and how an accessibility server like Mozilla should use the API's programmatic interfaces to expose this information to an accessibility client (the assistive technology). Each platform's accessibility API has made different assumptions, although there are a number of common characteristics. For example, they all expose an accessible name, or text representation, of each object, and they all use an enumerated integer value from a finite lis...
...And 8 more matches
How Mozilla's build system works
For that, see the Build Documentation. ...
...For that, see the Build Documentation. ...
...tem. The contents below will explain the basic concepts and terminology of the build system and how to do common tasks such as compiling components and creating jar files. For many developers, typing mach build to build the tree is sufficient to work with the source tree. This document explains how the build system works. Note: This document is not intended for developers who just want to build Mozilla. For that, see the Build Documentation. Phases When you type mach build to build the tree, three high-level phases occur within the build system: System detection and validation Preparation of the build backend Invocation of the build backend Phase 1: configure Phase 1 centers around the configure script. The configure script is a bash shell script. The file is generated from a file cal...
...And 8 more matches
Accessibility and Mozilla
Accessibility API cross-referenceThis cross-reference helps us see the difference between today's accessibility API's. All accessibility APIs to date define a list of possible object roles, or general types, such as button, menu item, text, etc. ...
... Accessibility API cross-referenceThis cross-reference helps us see the difference between today's accessibility API's. All accessibility APIs to date define a list of possible object roles, or general types, such as button, menu item, text, etc. ...
...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 describes a number of design-related aspects to look out for, in no particular order.Accessibility/LiveRegi...
...And 7 more matches
Localizing with Mozilla Translator
MozillaTranslator (MT) is a Java-based CAT tool used to translate a variety of Mozilla applications. Since it is written in Java, any platform that supports Java 1.7 or above supports MozillaTranslator also. If you decide to use MozillaTranslator, be sure you have Java 1.7 or above installed on your system. Like most CAT tools, MozillaTranslator employs glossaries and translation memory to leverage your work from previous translations, thus cutting time and effort when localizing new versions of Mozilla applications. ...
...t supports Java 1.7 or above supports MozillaTranslator also. If you decide to use MozillaTranslator, be sure you have Java 1.7 or above installed on your system. Like most CAT tools, MozillaTranslator employs glossaries and translation memory to leverage your work from previous translations, thus cutting time and effort when localizing new versions of Mozilla applications. Getting started with MozillaTranslator MT uses products as groups of localization files with a common root directory (for instance, you may have a product for Thunderbird, other for SeaMonkey, other for Dom, other for Toolkit, etc.) You update your repository copy using your favorite repository tool, and then update the product(s) in MT. This will remove obsolete strings and files from the internal database of MT, and wil...
...ialog.dtd . . |-- browser-region | `-- region.properties `-- ab-CD |-- alerts | `-- notificationNames.properties |-- autoconfig | `-- autoconfig.properties |-- cookie | |-- cookieAcceptDialog.dtd | `-- cookieAcceptDialog.properties |-- global | |-- about.dtd | |-- appPicker.dtd . . ...
...And 7 more matches
Mozilla internal string guide
Introduction The string classes are a library of C++ classes which are used to manage buffers of wide (16-bit) and narrow (8-bit) character strings. The headers and implementation are in the xpcom/string directory. All strings are stored as a single contiguous buffer of characters. The 8-bit and 16-bit string classes have completely separate base classes, but share the same APIs. As a result, you cannot assign a 8-bit string to a 16-bit string without some kind of conversion helper class or routine. ...
...tringTuple - created via string concatenation nsDependentSubstring - created through Substring nsPromiseFlatString - created through PromiseFlatString() nsLiteral[C]String - created through the ""_ns and u""_ns user-defined literals Of course, there are times when it is necessary to reference these string classes in your code, but as a general rule they should be avoided. ...
...ed up), the number of code units at the beginning of the string to preserve (typically the old logical length), a boolean indicating whether reallocating a smaller buffer is OK if the requested capacity would fit in a buffer that's smaller than current one, and a reference to an nsresult for indicating failure on OOM. (Don't access the return value if the nsresult indicates failure. Unfortunately mozilla::Result is not versatile enough to be used here.) BulkWrite() returns a mozilla::BulkWriteHandle<T>, where T is either char or char16_t. The actual writes are performed through this handle. You must not access the string except via the handle until you call Finish() on the handle in the success case or you let the handle go out of scope without calling Finish() in the failure case, in which case...
...And 7 more matches
Mozilla Application Framework - Archive of obsolete content
We provide a comprehensive framework that does much of the work for you, tools to help you develop your apps, and a community of people to help. ...
...We provide a comprehensive framework that does much of the work for you, tools to help you develop your apps, and a community of people to help. ...
...s and a well-defined plug-in interface for custom protocol handling so you can add the protocols you need. XPCOM A simple, cross-platform component model with multiple language bindings and IDL descriptions so you can plug your custom functionality into the framework and connect it with other components. Web Services Built-in support for XMLHttpRequest, XML-RPC, SOAP, and WSDL to enable Mozilla-based application authors to take advantage of the exploding world of web services. XPInstall Our cross-platform installer for trivial packaging and installation of your Mozilla framework applications. and much much more... Tools Venkman A JavaScript debugger with support for breakpoints, conditional breakpoints, local variable inspection, watch variables, single step, stop on error, ...
...And 6 more matches
Fonts for Mozilla 2.0's MathML engine
Note: These instructions are for Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) until Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27). For the latest version see, this page. Quick Instructions Try this test page to quickly determine whether you need to install additional fonts and to follow the instructions below. You may also want to check out the Mozilla MathML torture test to test your installation against concrete examples. On Windows: Use this MathML fonts installer. On Mac OS X Lion (10.7) and higher versions, STIX fonts are already installed and can be used for MathML. On most Linux distributions and similar open source platforms, you can install math fonts (STIX, Asana or MathJax fonts) from your package manager or get them from this zip archive. On A...
...TIX, 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. ...
...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 prefer (using the font-family property of CSS), with the assurance that Mozilla's font engine will hunt for alternate fonts whenever their specified fonts are not found on a particular user's system. If no appropriate font is ultimately found for a given character, Mozilla will instead display a box containing the hexadecimal representation of the Unicode code point for the character. Some mathematical operators are also drawn by using glyphs for larger variants of the chara...
...And 6 more matches
Rich-Text Editing in Mozilla - Developer guides
Note: This document is out-of-date; you are advised to consult the more up-to-date document available at Making content editable. Mozilla 1.3 introduces an implementation of Microsoft(R) Internet Explorer's designMode feature. The rich-text editing support in Mozilla 1.3 supports the designMode feature which turns HTML documents into rich-text editors. Starting in Firefox 3, Mozilla also supports Internet Explorer's contentEditable attribute which allows any element to become editable or non-editable (the latter for when preventing change to fixed elements in an editable environment). Setting Up Rich-Text Editing Rich-text editing is initialized by setting the designMode property of a document to "On", such as the document inside an iframe. Once designMode has been set to "On", the d...
... which allows one to run commands to manipulate the contents of the editable region. Most commands affect the document's selection (bold, italics, etc), while others insert new elements (adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand will affect the currently active editable element. ...
...ile others insert new elements (adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand will affect the currently active editable element. Internet Explorer Differences One major difference between 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. ...
...And 6 more matches
How Mozilla finds its configuration files - Archive of obsolete content
The of the binary registry file is described here. ...
...The of the binary registry file is described here. ...
...The of the binary registry file is described here. ...
...And 5 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
Mozilla's user interface is made up of XUL (described below), XBL (a topic for another tutorial), JavaScript, CSS, and image files. XUL, XBL, JavaScript, and CSS files are all in text format and can be edited in a standard text editor, while image files are in binary GIF, JPG, or PNG format and must be edited with an image editing program. The files are then collected into a series of JAR archives, which are just ZIP files that contain a specially formatted "manifest" file which describes the contents of the archive so Mozilla knows what to do with them. Although JAR archives are binary files, Mozilla's UI is not compiled into machine code; Mozilla instead builds its UI from the non-compiled files in the archive each time it starts up. Because of this, we can modify the files in the archi...
...es the contents of the archive so Mozilla knows what to do with them. Although JAR archives are binary files, Mozilla's UI is not compiled into machine code; Mozilla instead builds its UI from the non-compiled files in the archive each time it starts up. Because of this, we can modify the files in the archive and see our changes to the UI merely by restarting the application. This makes modifying Mozilla's UI much easier than for many other applications. Although Mozilla stores the UI files in JAR archives, it can also access them in their original, unarchived form, which is useful for the extensions developer because it makes it unnecessary to extract the files from the archive before changing the code and then re-add them to the archive afterwards. Instead, you only have to extract them once an...
...Use your unzip utility to extract all files in that directory with a .jar extension. ...
...And 5 more matches
Developing New Mozilla Features - Archive of obsolete content
Warning: The content of this article may be out of date. It was last updated in 2004. Tips For Contributing New Features To Mozilla. Learn the codebase and coding practices before you start your feature Include learning time in your schedule. Mozilla is a complex codebase. Our portability requirements may be new to even seasoned developers. Our cross-platform component model ("XPCOM") is similar to COM, but you'll want to make sure you use it well before going too far with your project. And of course, we have a set of coding practices to help everyone live together. Life will be much easier if your team has one or more members who are already familiar with and to the Mozilla world. Develop relationships with existing developers in the area of your feature If you want to add a b...
...velopers. Talk to the developers about fixing some of their bugs. Fix some bugs. Have some of your QA team get involved. Once you're familiar with an area, do the completely unexpected and write a piece of documentation. Developers will be grateful, and you'll be known as someone seriously interested in contributing. Become familiar with our code review processes. Have someone on your team become Mozilla-savvy enough to obtain CVS access. Help the existing developers to understand that you are "for real" That you have a clue about Mozilla development; that your team is going to ship a product. Our developers get a lot of mail, and not all of it is helpful. We appreciate the attention and interest in Mozilla, but the developers have to prioritize how they spend their time. Help them to realize y...
...t. Our developers get a lot of mail, and not all of it is helpful. We appreciate the attention and interest in Mozilla, but the developers have to prioritize how they spend their time. Help them to realize you're an informed developer who is interested and able to contribute. This will be much easier if you've been working on suggestion two. Designate someone on your team to be involved with the mozilla.org CVS repository on a regular basis The ease of integrating your feature will increase if someone on your team is intimately involved with the source tree. Reviewing the tree only at the milestone releases is risky if you're doing significant development. Something may have changed that will cause you extra work. And you'll miss the early discussion phase when you can add your perspective to t...
...And 5 more matches
Building Mozilla XForms - Archive of obsolete content
Have a look at the Build Instructions for detailed information for your platform. ...
...Have a look at the Build Instructions for detailed information for your platform. ...
...Have a look at the Build Instructions for detailed information for your platform. ...
...And 5 more matches
Mozilla's Section 508 Compliance
The United States Federal Rehabilitation Act's Section 508 is a new standard for defining accessibility requirements for software and other electronic and information technology. Part of Section 508 (?1194.21) specifically relates to Mozilla, and the ability of US government agencies to buy software that contains Mozilla software components. Here is a detailed list of section 508 bugs in Mozilla's Seamonkey application suite. Some of them are fairly minor. ...
...y of US government agencies to buy software that contains Mozilla software components. Here is a detailed list of section 508 bugs in Mozilla's Seamonkey application suite. Some of them are fairly minor. The following is provided for informational purposes only and is not a legally binding Voluntary Product Accessibility Template (VPAT). ...
...nd color contrast settings. Under Linux/UNIX it is the user's choice, whether to stick with the Gnome theme or not -- they must choose Classic if they want to follow the Gnome theme. Unknown - needs research (h) When animation is displayed, the information shall be displayable in at least one non-animated presentation mode at the option of the user. Complete. Mozilla's preferences under Privacy & Security - Images contain options for making animated images still. (i) Color coding shall not be used as the only means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. Complete. Caveat: normally Mozilla uses a color change to indicate when a link has been visited. However, the vi...
...And 5 more matches
Mozilla Web Services Security Model
rom being used as a tool for Web sites to obtain priveleges that belong to the browser's user (such as being behind a firewall or getting the benefits of the user's cookies), Web browsers restrict what Web pages can do when accessing things in other domains. These restrictions apply to Web Services. However, Web Services can be designed to be accessed from other domains, or even from any domain. ...
...eges that belong to the browser's user (such as being behind a firewall or getting the benefits of the user's cookies), Web browsers restrict what Web pages can do when accessing things in other domains. These restrictions apply to Web Services. However, Web Services can be designed to be accessed from other domains, or even from any domain. Mozilla allows sites hosting such Web Services to tell Mozilla that other sites can access the service. ...
... web-scripts-access.xml File Format The web-scripts-access.xml file is an XML document. Any errors in XML syntax, as well as many failures to follow the format, will cause the document to be ignored. ...
...And 5 more matches
Mozilla-JSS JCA Provider notes
The Mozilla-JSS JCA Provider Newsgroup: mozilla.dev.tech.crypto Overview This document describes the JCA Provider shipped with JSS. The provider's name is "Mozilla-JSS". It implements cryptographic operations in native code using the NSS libraries. Contents Signed JAR file Installing the Provider Specifying the CryptoToken Supported Classes What's Not Supported Signed JAR file JSS implements several JCE (Java Cryptography Extension) algorithms. These algorithms have at various times been export-controlled by the US government. JRE therefore requires that JAR files implementing JCE algorithms be digitally signed by an approved organization. The maintainers of JSS, Sun, Red Hat, and Mozilla, have this approval and signs the official builds of jss4.jar. At runtime, the JRE automatic...
...tomatically verifies this signature whenever a JSS class is loaded that implements a JCE algorithm. The verification is transparent to the application (unless it fails and throws an exception). If you are curious, you can verify the signature on the JAR file using the jarsigner tool, which is distributed with the JDK. If you build JSS yourself from source instead of using binaries downloaded from mozilla.org, your JAR file will not have a valid signature. This means you will not be able to use the JSS provider for JCE algorithms. You have two choices. Use the binary release of JSS from mozilla.org. Apply for your own JCE code-signing certificate following the procedure at How to Implement a Provider for the JavaTM Cryptography Extension. Then you can sign your own JSS JAR file. Installing the...
...This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. rsaKpg.initialize(1024); KeyPair rsaPair = rsaKpg.generateKeyPair(); // Generate a DSA KeyPair...
...And 5 more matches
Mozilla technologies
APNG is a simpler alternative to MNG, providing a spec suitable for the most common usage of animated images on the Internet.DocShellDocshell is the second iteration of what originally started out as WebShell. ...
...It offers increased flexibility and complex querying to make handling the places the user goes easier an...
...ss RSS and Atom feeds.Life After XUL: Building Firefox Interfaces with HTMLThis page gathers technical solutions to common problems encountered by teams shipping HTML-based interfaces inside Firefox.MorkMork is a database file format invented by David McCusker for the Mozilla code since the original Netscape database information was proprietary and could not be released open source. Starting with Mozilla 1.9, it was phased out in favor of SQLite, a more widely-supported file format.PlacesPlaces is the bookmarks and history management system introduced in Firefox 3. It offers increased flexibility and complex querying to make handling the places the user goes easier and more convenient. It also includes new features including favicon storage and the ability to annotate pages with arbitrary informa...
...And 5 more matches
List of Former Mozilla-Based Applications - Archive of obsolete content
The following is a list of all known applications that at one point used Mozilla technologies or that are no longer being actively maintained. A list of actively maintained Mozilla-based applications is also available. Applications that switched to another technology Name Description Additional Information Angelsoft 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 F...
...x-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 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 clie...
...Kit in version 3.0.2 Moblin Browser Browser When Moblin became Meego it switched from a custom Gecko-based browser to Chrome Nautilus File manager Hasn't used Mozilla code since version 2.0 Raptr client Gaming client Was a XULRunner app initially but now uses Adobe AIR Rift Technologies Software installation over Internet No longer using Mozilla technology -- need confirmation and details Second Life Virtual world desktop client Switched from embedded Mozilla browser to a plugin architecture with a qtwebkit plugin Applications that are no longer being developed Name Description Additional Information Aphrodite Browser Inactive AOL client for Mac Internet software No long...
...And 4 more matches
A bird's-eye view of the Mozilla framework
Author: Susan D. Tiner Last Updated Date: 11/23/05 Statement of purpose The purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based Mozilla application framework. It examines what happens when the user performs a simple user interface (UI) action such as clicking a link in the Contents Panel of the Help Viewer window shown below. The article focuses on the architecture of the overall framework supporting the Mozilla application suite, not the architecture of the individual applications themselves. ...
... It examines what happens when the user performs a simple user interface (UI) action such as clicking a link in the Contents Panel of the Help Viewer window shown below. The article focuses 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 y...
...ons/help/ This article also assumes you are familiar with the JavaScript and C++ programming languages, object-oriented programming (OOP) terminology and design concepts, the Microsoft(R) Component Object Model (COM), and the CORBA OMG Interface Definition Language (IDL). Organization This article first covers some conceptual groundwork, then walks through a user scenario to illustrate how key Mozilla architectural components work together to support a simpleHelp Viewer UI action. Framework Layers At a high level, you can think of the Mozilla framework as consisting of a suite of applications, each of which is organized into three basic layers depicted in Figure 1. Figure 1. User Interface (UI) Widgets and Services The X Window System Toolkit defines the termwidget as a pre-defined o...
...And 4 more matches
How Mozilla determines MIME Types
Introduction All data handling in Mozilla is based on the MIME type of the content. This means that every time an URI is loaded, Mozilla must find out its MIME type. The several ways how this happens are described in this document. Content-Type "hints" Mozilla has a concept of "content-type hints". This means that, for example, if Mozilla encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed. This is, however, overridden by the actual MIME type the server sends (if any). (For this specific example, the server override only happens in standards-compliant mode. See Mozilla's Quirks Mode or Web Author FAQ). ...
...a encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed. This is, however, overridden by the actual MIME type the server sends (if any). (For this specific example, the server override only happens in standards-compliant mode. See Mozilla's Quirks Mode or Web Author FAQ). Similar handling happens for <a href="..." type="foo/bar">, starting in Mozilla 1.6alpha. HTTP For HTTP URIs Mozilla usually gets a MIME type sent from the server, and uses it. ...
...type the server sends (if any). (For this specific example, the server override only happens in standards-compliant mode. See Mozilla's Quirks Mode or Web Author FAQ). Similar handling happens for <a href="..." type="foo/bar">, starting in Mozilla 1.6alpha. HTTP For HTTP URIs Mozilla usually gets a MIME type sent from the server, and uses it. Contrary to Internet Explorer's MIME type guessing, Mozilla will generally not sniff the type of the document. ...
...And 4 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
non-ASCII characters. In March of 2003, three important RFC's were approved by IETF. (Cf. RFC's 3490, 3491, 3492.) These new RFC's now make it possible for domain name servers to register non-ASCII domain names and application/client vendors to implement standardized support for handling non-ASCII characters in domain names. How IDN Works When a browser sees a host name such as http://developer.mozilla.org, it passes a request to the DNS resolver service (usually built into an OS), which in turn sends a request to a nearest domain name server to return an IP address that corresponds to the host name. This IP address is then used to connect to the web server in question. IDN allows host/domain names with non-ASCII characters for user input into a browser's location bar or URL's embedded in web ...
... the application must convert such input into a special encoded format using only the usual ASCII subset characters. RFC 3490 (Internationalizing Domain Names in Applications (IDNA)) defines characters used in IDN to be drawn from Unicode Standard 3.2. It also defines how an application should process non-ASCII characters in such a way to conform to existing host name character restrictions. How Mozilla Browsers Handle Non-ASCII Domain Names Unicode and Nameprep When Mozilla receives IDN input from the user via the location bar or a request to process non-ASCII host name links, it first turns them into Unicode, then normalizes the input string to make it conform to general URI requirement. The process will convert uppercase characters to lowercase ones (Case folding), unify characters with mu...
.... With this last piece of obstacle for standardization out of the way, domain name registrars are expected to move forward on implementing the new RFC's for existing and future IDN registrations quickly. JPRS (Japan Registry Service) decided to move to the new RFC implementation on July 10, 2003, only a few weeks after the ICANN's guideline was published. This makes it possible for Netscape 7.1/Mozilla 1.4 users to access Japanese host names under .jp top domain without any additional setup using just the built-in IDN functionality. Real World Examples Punycode There are real world examples of IDN that you can test with Netscape 7.1, which uses Punycode as the default IDN encoding. For example, Most sample links on the following test pages can be used without any further setting: http://w...
...And 4 more matches
Mozilla DOM Hacking Guide
In this document I will try to outline the main aspects of the implementation, beginning with the Class Info mechanism, which lies at the heart of the DOM, then with the description of various interfaces and classes. Since I am myself still learning how it works, don't expect this to be a complete reference quite yet. ...
...In this document I will try to outline the main aspects of the implementation, beginning with the Class Info mechanism, which lies at the heart of the DOM, then with the description of various interfaces and classes. Since I am myself still learning how it works, don't expect this to be a complete reference quite yet. ...
...ability to call methods on an object regardless of the interface it was defined on." For example, when we have the document object in JavaScript, we can call indistinctly document.getElementById(), or document.addEventListener(), although they are defined on two different interfaces (DOMDocument and DOMEventTarget. Needless to say this is critical for the use of the DOM in real-world content. In Mozilla interface flattening is obtained through the use of the nsIClassInfo interface. nsIClassInfo stores the interfaces available for an object and later on XPConnect uses those interfaces to lookup the right method to call. The great thing is that one can easily see the interfaces available from JS through interface flattening by looking at the code. The interesting part is in nsDOMClassInfo::Init()...
...And 4 more matches
Mozilla Port Blocking
: The content of this article may be out of date. Background On 08/15/2001, Cert issued a Vulnerability Note VU#476267 for a "Cross-Protocol" scripting attack, known as the HTML Form Protocol Attack which allowed sending arbitrary data to most TCP ports. A simple exploit of this hole allows an attacker to send forged unsigned mail through a mail server behind your firewall: A really nasty hole. Mozilla responded by modifying how protocols can access ports. By default, Mozilla now blocks access to specific ports which are used by vulnerable services in order to prevent security vulnerabilites due to "Cross-Protocol Scripting". Each protocol's handler can override this blocking for itself in order to enable the required access for that protocol. Potential Problems caused by Port Blocking Port blo...
...s which are used by vulnerable services in order to prevent security vulnerabilites due to "Cross-Protocol Scripting". Each protocol's handler can override this blocking for itself in order to enable the required access for that protocol. Potential Problems caused by Port Blocking Port blocking can cause problems if a site or web application requires access to one of the ports which is blocked in Mozilla. If a user attempts to access a URI on a blocked port, Mozilla shows one of the following alerts to the user or in the Error Console. "Access to the port number given has been disabled for security reasons." "Establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (NS_ERROR_PORT_ACCESS_NOT_ALLOWED)" If your product or web site uses a port which is blocked by Mo...
...to the port number given has been disabled for security reasons." "Establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (NS_ERROR_PORT_ACCESS_NOT_ALLOWED)" If your product or web site uses a port which is blocked by Mozilla's default port blocking rules, you can either change the port of your service to a unblocked value (recommended if possible) or ask your Mozilla users to enable the port. For details on which ports are blocked and how to override the blocking see below. Modifying Mozilla's port blocking at Run time Users can modify the default port blocking through the addition of preferences containing comma delimited lists of port numbers to the user.js file (for single users with the user_pref(...) command) in the user's profile directory. See the exam...
...And 4 more matches
Mozilla projects on GitHub
There are a number of tools and services whose code is hosted on GitHub. This article offers a quick guide for getting started with Mozilla code on GitHub. It also lists some interesting GitHub repositories containing Mozilla project code. Getting started You can look at code on GitHub without an account. That is the first thing to know. To do more--to contribute to the code, or to fork it and start your own project based on Mozilla-related code--you need a GitHub account. To learn more about setting up a GitHub account, visit the GitHub website. Most Mozilla project code is located in repositories within the Mozilla GitHub organization. ...
... Project name Description PDF.js A Portable Document Format (PDF) reader written entirely in JavaScript. ...
.... Most Mozilla project code is located in repositories within the Mozilla GitHub organization. This is a great place to start looking for any projects not listed below. Projects This listing covers the larger-scale and more important Mozilla projects on GitHub. It does not include everything since it's hard to keep track of all the smaller projects. Look to GitHub for the most complete list of Mozilla projects on GitHub. Project name Description PDF.js A Portable Document Format (PDF) reader written entirely in JavaScript. Shumway Shumway is a Flash VM and runtime written in JavaScript. addon-sdk The Mozilla Add-on SDK. asknot The What Can I Do For Mozilla web site, which helps you figure out how you can contribute to Mozilla. ...
...And 4 more matches
Mozilla
We need real content added here. ...
... Stuff about the Mozilla namespace. We need real content added here. ...
... Stuff about the Mozilla namespace. We need real content added here. ...
...And 4 more matches
Mozilla Projects
Many of these are components of Firefox or are tools used to create Firefox, but may be used by other projects as well. Here you'll find links to documentation about these projects. compare-locales compare-locales is a Python script that helps localizers to check their work without running Firefox or another application. Crash reporting Firefox ships with an open-source crash reporting system. This system is combination of projects: Emscripten Emscripten is an LLVM to JavaScript compiler. It takes LLVM bytecode (e.g. ...
...n the window closes). MailNews MailNews stands for "Mail and Newsgroups". MailNews is the back end of the messaging parts of SeaMonkey and Thunderbird. It provides a number of functions and capabilities, including: McCoy McCoy uses XULrunner which is bound to break, for details see this post. Mozilla calls McCoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not. McCoy is an application that allows add-on authors to provide secure updates to their users. Applications periodically look for and install updates to their add-ons. It's important that the update information retrieved has not been tamper...
... 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 underlying platform is done in many different ways. The various checks needed lead to a lot of copy+pasting, leaving the reader to wonder....is this specific check necessary for (e.g.) an operating system? Because information is not consolidated, checks are not done consistently, nor is it defined what we are checking for. Necko ...
...And 4 more matches
Using the Mozilla symbol server
The debugger will not be able to show you the content of all variables and the execution path can seem strange because of inlining, tail calls, and other compiler optimizations. The only workaround is to build an unoptimized local build. ...
...ns a symbol server for trunk Firefox nightly and release builds on Windows. Symbols are available for at least 30 previous days worth of nightly builds, and Firefox releases from 2.0.0.4. This allows debugging of those builds without forcing all users to download large debugging files. The server functions like Microsoft's symbol server so the documentation there can be useful. Note that because Mozilla release builds are heavily optimized, debugging is not always easy. The debugger will not be able to show you the content of all variables and the execution path can seem strange because of inlining, tail calls, and other compiler optimizations. The only workaround is to build an unoptimized local build. The official symbol server URL for Firefox is https://symbols.mozilla.org/. You cannot visit...
...tool. In the examples below, a local cache directory is used to avoid repeatedly fetching the PDB from the server. Replace C:\Users\bsmedberg\symbols with an appropriate cache directory on your machine. Using the symbol server in Microsoft Visual C++ Using the symbol server in Windbg The Windbg symbol path is configured with a string value delimited with asterisk characters. To use only the Mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): SRV*c:\symcache\*https://symbols.mozilla.org/ Set this string as _NT_SYMBOL_PATH in the environment, using the Windbg menus, or by typing the .sympath command. If you would like to get symbols ...
...And 4 more matches
Mozilla splash page - Learn web development
Objective: To test knowledge around embedding images and video in web pages, frames, and HTML responsive image techniques. ...
... for help -- see the Assessment or further help section at the bottom of this page. Note: The example HTML file contains quite a lot of CSS, to style the page. You don't need to touch the CSS, just the HTML inside the <body> element -- as long as you insert the correct markup, the styling will make it look correct. Project brief In this assessment we are presenting you with a mostly-finished Mozilla splash page, which aims to say something nice and interesting about what Mozilla stands for, and provide some links to further resources. Unfortunately, no images or video have been added yet -- this is your job! You need to add some media to make the page look nice and make more sense. The following subsections detail what you need to do: Preparing images Using your favourite image editor, cre...
... and provide some links to further resources. Unfortunately, no images or video have been added yet -- this is your job! You need to add some media to make the page look nice and make more sense. The following subsections detail what you need to do: Preparing images Using your favourite image editor, create 400px wide and 120px wide versions of: firefox_logo-only_RGB.png firefox-addons.jpg mozilla-dinosaur-head.png Call them something sensible, e.g. firefoxlogo400.png and firefoxlogo120.png. Along with mdn.svg, these images will be your icons to link to further resources, inside the further-info area. You'll also link to the firefox logo in the site header. Save copies of all these inside the same directory as index.html. Next, create a 1200px wide landscape version of red-panda.jpg, a...
...And 3 more matches
XSL Transformations in Mozilla FAQ - Web APIs
set to an XML mimetype, namely text/xml or application/xml. The XSLT namespace is http://www.w3.org/1999/XSL/Transform. Use the <?xml-stylesheet ?> processing instruction instead of the non-standard xml:stylesheet. The most common cause is the MIME type handling. To find out which MIME type your server sends, look at Page Info, use extensions like LiveHTTPHeaders or a download manager like wget. Mozilla won't load XSLT stylesheets from a different domain for security reasons. Note: Starting in Gecko 7.0, both text/xsl and application/xslt+xml are supported MIME types for XSLT media stylesheets. Note that Firefox will override your XSLT stylesheet if your XML is detected as an RSS or Atom feed. A known workaround is to add a sufficiently long XML comment to the beginning of your XML file in o...
...x 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 determine if it's a feed or not. See the discussion on bug #338621 for more information. It works in IE, but not in Mozilla? There are even more differences. Most come from what we suspect IE to do after the transformation. It (AFAICT) serializes and parses the output to generate what it actually renders. Mozilla in contrast renders exactly the result of your transformation. Can I do disable-output-escaping? This is actually pretty close to the question above. And in short, no. Disabling output escaping requires us...
...out document.write? Just like for XHTML, document.write is not supported during XSLT transformations. Sadly, current builds don't error, but just give unexpected results, like crashes (bug 202765). In most cases, there is no need to actually use it, though. If you need platform dependent code or stylesheets, just do <xsl:if test="system-property('xsl:vendor')='Transformiix'"> <!-- Mozilla specific markup --> </xsl:if> <xsl:if test="system-property('xsl:vendor')='Microsoft'"> <!-- IE specific markup --> </xsl:if> Check system-properties.xml for the properties of your favorite system. MSXML has an additional property. <xsl:if xmlns:msxsl="urn:schemas-microsoft-com:xslt" test="system-property('msxsl:version')=3"> <!-- MSXML3 sp...
...And 3 more matches
Using XML Data Islands in Mozilla - Archive of obsolete content
is omitted and the type attribute does not specify an executable script type. When putting XML in a data block, you need to make sure that the XML content you are embedding does not have an end tag that case-insensitively matches "</script>". ...
...pplication/xml"); The HTML5 data block-based way shown here works in Firefox, Opera, WebKit-based browsers such as Chrome and Safari, and IE9 while IE's XML data islands work only in IE. ...
...The price of the first line item is " + firstPrice + "."; } </script> </head> <body onload="runDemo()";> Demo did not run </body> </html> The...
...And 2 more matches
Protecting Mozilla's registry.dat file - Archive of obsolete content
Protecting Mozilla's registry.dat file from Windows and Internet Explorer The easyest way to put into place the registry.dat file for a user would theoretically be to put it into the user's profile directory on the server. However, this issue is problematic, because: When the users logs in for the first time, Windows 2000 apparently doesn't load the profile from the server... In other Windows versions, Internet Explorer (which is hard to kick off completely) likes to install "Personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wiping any non-microsoft subfolders from %USERPROFILE%\Application Data, including Mozilla's . In order to prevent this, it's preferable to have mozilla's registry.dat file copied over from the ...
...o install "Personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wiping any non-microsoft subfolders from %USERPROFILE%\Application Data, including Mozilla's . In order to prevent this, it's preferable to have mozilla's registry.dat file copied over from the server using the logon script. Moreover, it's advisable to "protect" the mozilla registry using attrib +r +s in case the logon script is finished before IE's "Personnalized settings" have completed their dirty deed... In summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/STARTUP.BAT on the server): rem ================================================== rem Mozilla rem ============================================...
...t is finished before IE's "Personnalized settings" have completed their dirty deed... ...
...And 2 more matches
Creating a Mozilla Extension - Archive of obsolete content
Warning: The content of this article may be out of date. This tutorial describes how to create an extension for the old versions of Mozilla Suite (currently SeaMonkey). See Building an Extension for an up-to-date tutorial (it focuses on Firefox, but is also applicable to other new applications). A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The exten...
...ich adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. Completing this tutorial will give you a basic understanding of how Mozilla's user interface (UI) is constructed, how to find the source code for the UI you want to extend, how to make an installation of Mozilla modifiable, how to use Mozilla's network library to load and parse web pages in JavaScript, and how to use d...
...ource code status, to get the status of the code. Completing this tutorial will give you a basic understanding of how Mozilla's user interface (UI) is constructed, how to find the source code for the UI you want to extend, how to make an installation of Mozilla modifiable, how to use Mozilla's network library to load and parse web pages in JavaScript, and how to use dynamic overlays to package a Mozilla extension for installation by others. ...
...And 2 more matches
Mozilla's DOCTYPE sniffing - Archive of obsolete content
ete 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 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. The goals that led to choosing this behavior were the following: Almost a...
..., rather than all, to allow for the following points as well.) Authors writing Web pages to current standards should be able to trigger strict mode. Pages written using any public identifiers in DOCTYPE declarations that appear in the future should be displayed using strict mode. In other words, the algorithm is the best approximation we can find for determining which pages were written after Mozilla became a known important user-agent on the Web. Full Standards Mode The following trigger full standards mode: Any document sent with an XML MIME type such as text/xml, application/xml, or application/xhtml+xml (since sniffing only occurs for documents sent as text/html). Any "DOCTYPE HTML SYSTEM" as opposed to "DOCTYPE HTML PUBLIC", except for the IBM doctype noted below A DOCTYPE declara...
...HTML 2.0 Strict Level 2//EN". The public identifier "-//IETF//DTD HTML Strict Level 1//EN". The public identifier "-//IETF//DTD HTML Strict Level 1//EN//2.0". The public identifier "-//IETF//DTD HTML 2.0 Strict Level 1//EN". The public identifier "-//IETF//DTD HTML Strict Level 0//EN". The public identifier "-//IETF//DTD HTML Strict Level 0//EN//2.0". The public identifier "-//WebTechs//DTD Mozilla HTML//EN". The public identifier "-//WebTechs//DTD Mozilla HTML 2.0//EN". The public identifier "-//Netscape Comm. Corp.//DTD HTML//EN". The public identifier "-//Netscape Comm. Corp.//DTD HTML//EN". The public identifier "-//Netscape Comm. Corp.//DTD Strict HTML//EN". The public identifier "-//Microsoft//DTD Internet Explorer 2.0 HTML//EN". The public identifier "-//Microsoft//DTD Internet...
...And 2 more matches
JavaScript-DOM Prototypes in Mozilla
When XPConnect wraps a C++ object it will create a JSObject that is unique to this C++ object. In the case where the C++ object has class info (nsIClassInfo), the JSObject is a more or less empty JSObject which is not really that special. ...
...be a globally available HTMLImageElement, or that such object will be the constructor for any arbitrary image's [[Prototype]]. A third way through which one can access the prototype of an object is through the constructor property of the object, which itself points (initially) to the constructor: document.images[0].constructor.prototype.foo = bar; Note though, the above may or may not work in Mozilla. So far so good; we have shared prototypes, and XPConnect gives us most of this automatically. But this is not good enough, in addition to being able to share and represent each "class" with a constructor, we also want users to be able to extend interfaces, like Node. Node is a DOM interface, but there are no pure Node instances; there are lots of different classes that implement Node (HTMLImage...
...od enough, in addition to being able to share and represent each "class" with a constructor, we also want users to be able to extend interfaces, like Node. Node is a DOM interface, but there are no pure Node instances; there are lots of different classes that implement Node (HTMLImageElement, HTMLDocument, ProcessingInstruction, et c.). But the fact that an instance of a Node will never exist in Mozilla does not mean that the Node interface is useless, in fact, Node can be extended just as we've been doing. If you think back to the HTMLImageElement examples above, those examples let you define new properties on all image elements. By modifying the Node top-level object, you can do similar things to all objects that implement Node. This means you can add a property to every node in a DOM tree by ...
...And 2 more matches
Useful Mozilla Community Sites - Archive of obsolete content
This is the best way to get your extension to users from all around the world. Adding your extension to AMO is easy. All you need is your XPI, a few screenshots (good ones will make your extension much more appealing), and a few minutes to fill a couple of forms. But this won't make your extension public right away. ...
...This is the best way to get your extension to users from all around the world. Adding your extension to AMO is easy. All you need is your XPI, a few screenshots (good ones will make your extension much more appealing), and a few minutes to fill a couple of forms. But this won't make your extension public right away. ...
...sion. You'll also receive feedback that you wouldn't notice by testing only in one language, which can reveal other bugs in your locale handling. There's a significant portion of users that use a localized version of Firefox, so you shouldn't neglect them. Using Babelzilla takes little time and is very valuable. Mozdev mozdev.org provides free project hosting and software development tools for Mozilla applications and add-ons. It is the only hosting service tailored to the needs of the Mozilla community. It offers many necessary services such as bug tracking, source code repositories, download mirrors and many communication tools. There are other free hosting sites such as Souceforge and Google Code that are also very good, but not as specialized as Mozdev. You should pick the one that best f...
...y communication tools. There are other free hosting sites such as Souceforge and Google Code that are also very good, but not as specialized as Mozdev. You should pick the one that best fits your development needs. Conclusion That's it! This is the end of the XUL School Tutorial. Hopefully this guide has helped you get started with add-on development and you're on your way to joining the large Mozilla add-ons developer community. The sheer volume of material can be overwhelming, but you can always come back and use this tutorial as a reference for your future development. Now all you need is a good idea (in case you didn't have one already) and get started. Happy coding! << Previous This tutorial was kindly donated to Mozilla by Appcoast. ...
Other Mozilla customization pages - Archive of obsolete content
At the moment all messages of the program are in german language. This because the program was developped for mozilla configuration in a German administration with about 2000 users. ...
...At the moment all messages of the program are in german language. This because the program was developped for mozilla configuration in a German administration with about 2000 users. ...
... ...
... ...
Mozilla XForms Specials - Archive of obsolete content
This covers both limitations in the extension, and custom extensions. Limitations Repeat Using Attributes The specifications mentions "Creating Repeating Structures Via Attributes", this is partially supported. (limitation tracked in bug 280368) Mixing Repeat and table or ul It is not possible to mix repeats with either table or ul. That means that it is not possible to do: <table> <xf:repeat ...> <tr> ... </tr> </xf:repeat> </table> or <ul> <xf:repeat ...> <li> ... </li> </xf:repeat> </ul> Section 9.3.2 states that mixing with table will probably never work. ...
...ffects functions like hmac() or digest(). Instead of using digest('abc', 'SHA-1') explicitly use the third parameter (the results are equal): digest('abc', 'SHA-1', 'base64') (limitation tracked in bug 477857) Extensions Enumerating Instances The standardized nsIXFormsModelElement does not allow one to enumerate over all possible instances, but only to retrieve instances by their name. In the Mozilla XForms Extension we added a getInstanceDocuments() function to the model which returns all the model's instance documents. This is documented in nsIXFormsNSModelElement. Getting To Instance Element From A Data Node In the XForms 1.0 specification there is no way to get to the instance element from an instance data node. We have added a function via the getFeature() call on each node, that allows ...
... This is documented in nsIXFormsNSModelElement. Getting To Instance Element From A Data Node In the XForms 1.0 specification there is no way to get to the instance element from an instance data node. We have added a function via the getFeature() call on each node, that allows the form author to do that. That is, if instanceNode is a node in an instance document, then: instanceNode.getFeature("org.mozilla.xforms.instanceOwner", "1.0") will return the <instance> element (in the main document) that the node belongs to. Getting To The Instance Document From The Instance Element In the XForms 1.0 specification you have to go through the model element to get to the instance document. It seems a bit awkward if you have the instance element, so we have added a getInstanceDocument() function directly on ...
...ser interface, which allows the form authors to create custom controls. It involves exposing some (script) functionality on all our controls, like output, input, etc. and allowing the UI to be represented in XBL. More information can be found in XForms:Custom Controls. labelposition For xforms:input elements bound to a boolean node we support an attribute labelposition in the namespace http://www.mozilla.org/projects/xfor...009/extensions, which allows the form author to define on which side of the checkbox the label will be shown. For details, see the input control documentation. Misc Cross Domain Submission Not exactly either a limitation, or an extension, but it is worth mentioning here. For security reasons, it is not per default possible for an XForms to submit data to another domain. This i...
Cookies Preferences in Mozilla
These preferences apply to most Mozilla products (including Firefox and Seamonkey), however they are application-specific, so not all of them may apply to you. The default values given are for Firefox 3. ...
...ding Firefox and Seamonkey), however they are application-specific, so not all of them may apply to you. The default values given are for Firefox 3. ...
...om within mailnews or from mail-style URIs false = allow cookies in these situations This preference is applicable to all versions of Seamonkey. New in Thunderbird 3 This preference is applicable to Thunderbird 3 and later. Earlier versions of Thunderbird only allowed cookies on RSS feeds. network.cookie.prefsMigrated Default Value: false Migration pref for users with older profiles (before Mozilla 1.7). If you have the old-style prefs, they will be migrated when starting the application. (The old prefs are network.cookie.lifetime.enabled, network.cookie.lifetime.behavior, and network.cookie.warnAboutCookies.) true = prefs have been migrated false = migrate prefs on next startup Original Document Information Author(s): Mike Connor Last Updated Date: May 22, 2004 Copyright Informati...
... when starting the application. (The old prefs are network.cookie.lifetime.enabled, network.cookie.lifetime.behavior, and network.cookie.warnAboutCookies.) true = prefs have been migrated false = migrate prefs on next startup Original Document Information Author(s): Mike Connor Last Updated Date: May 22, 2004 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Updating NSPR or NSS in mozilla-central
The NSPR and NSS sources in mozilla-central are maintained by the NSPR and NSS teams and always taken from exports of HG tags. Do not check in individual changes. If you check in an individual change by mistake, your change will be lost when the NSPR and NSS teams push a new HG tag to mozilla-central. ...
...PR and NSS sources in mozilla-central are maintained by the NSPR and NSS teams and always taken from exports of HG tags. Do not check in individual changes. If you check in an individual change by mistake, your change will be lost when the NSPR and NSS teams push a new HG tag to mozilla-central. ...
... push a new HG tag to mozilla-central. ...
...he commit comment.) If NSPR or NSS must be upgraded to a new static tag, follow this procedure: Before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard Pull the new sources $ python client.py update_nspr NSPR_TAG_NAME or $ python client.py update_nss NSS_TAG_NAME If you update a branch older than Mozilla 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a blank line) to force a rebuild of NSPR: mozilla/nsprpub/config/prdepend.h or NSS: mozilla/security/nss/coreconf/coreconf.dep Check directory mozilla/nsprpub/patches/ for patches that need to be applied to NSPR, and directory mozilla/security/patches/ for patches that need to be applied to NSS...
Mozilla MathML Project
The Mozilla MathML project is Mozilla's project to build and enhance MathML support within Firefox and other Mozilla-based applications. For a quick overview, see the slides for the innovation fairs at Mozilla Summit 2013. Updates Status of each tag Result of the MathML 3 Testsuite Unofficial nightly builds with MathML patches applied (maintained by Bill Gianopoulos) More updates and archived content Community View Mozilla forums... Mailing list Newsgroup RSS feed IRC channel Wiki used by contributors - check out the latest developments and help us improving MathML in Mozilla. ...
...s of each tag Result of the MathML 3 Testsuite Unofficial nightly builds with MathML patches applied (maintained by Bill Gianopoulos) More updates and archived content Community View Mozilla forums... Mailing list Newsgroup RSS feed IRC channel Wiki used by contributors - check out the latest developments and help us improving MathML in Mozilla. ...
...hannel Wiki used by contributors - check out the latest developments and help us improving MathML in Mozilla. Links Installing fonts for Mozilla's MathML engine MathML Version 3.0 - W3C Recommendation, 21 October 2010 W3C MathML Test Suite - Designed to check the implementation of each element one attribute (or built-in rendering behavior) at a time in a fairly thorough manner. MathML in Mozilla Developer Network MathML Accessibility in Mozilla Sample MathML Documents Screenshots MathML Start Page - with translations in different languages ( Arabic, Chinese, Hebrew, Thai) MathML Basics - Document tailored to display correctly with just the Symbol font that is pre-installed by default on most OS configurations. MathML Torture Test - Comparative testing of MathML rendering against...
...athML Tests - These pages were imported from layout/mathml/tests/. Blog with comments that include MathML. Create MathML Documents Authoring MathML Editors Converters Stylesheets Original Document Information Author(s): Roger B. Sidje Other Contributors: Frederic Wang Last Updated Date: April 4, 2010 Copyright Information: Portions of this content are (C) 1999-2010 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Mozilla Style System Documentation
d back into the layout DLL) represents the style data for a CSS formatting object. In the layout system, these formatting objects are described as frames (interface nsIFrame), although a pair of frames represents table formatting objects. The CSS specification describes formatting objects that correspond to elements in the content model and formatting objects that correspond to pseudo-elements. (Mozilla has a bunch of its pseudo-elements that are not in the CSS specification.) We also create style contexts for some things that are not CSS formatting objects: text nodes and placeholder frames. These three types of style contexts correspond to the three ways of creating a style context: nsIPresContext::ResolveStyleContextFor, nsIPresContext::ResolvePseudoStyleContextFor, and.nsIPresContext::Resolv...
...For, nsIPresContext::ResolvePseudoStyleContextFor, and.nsIPresContext::ResolveStyleContextForNonElement There is also a fourth method, nsIPresContext::ProbePseudoStyleContextFor, which creates a style context only if there are style rules that match the pseudo-element. This is useful for the pseudo-elements defined in the CSS specification (:before, :after, :first-line, :first-letter), but few of Mozilla's custom pseudo-elements, many of which are hacks for further formatting objects that we create. The pres context forwards these calls to its style set object (StyleSetImpl, interface nsIStyleSet), which does the real work (and also maintains the lists of stylesheets and owns the rule tree). These methods may all return an existing style context rather than a new one (see StyleSetImpl::GetContext...
...re used by other code that needs to add style information to the document. For the CSS stylesheets, this process corresponds to CSS selector matching. The output of CSS selector matching as defined by the CSS specification is an ordered list of rules, where the order determines which declarations override other declarations. (In CSS,declarations are the property-value pairs within style rules. In Mozilla, nsCSSDeclaration objects correspond to CSS declaration-blocks.) Due to the high similarity of these lists between elements in the content tree, Mozilla stores the output of the selector matching process in a lexicographic tree, the rule tree. This double tree (style context tree and rule tree) allows for sharing of style data, which allows the data to take up less memory and allows the data comp...
...roblems: Some of the HTML style information is implemented in the content node classes. It should be consolidated so that the style system code can be moved back within the layout DLL and nsIStyleContext can be de-COM-ified. Original Document Information Author(s): L. David Baron Last Updated Date: June 6, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
mozilla::MutexAutoLock
mozilla::MutexAutoLock is an RAII helper for mozilla::Mutex. It is designed to make using mozilla::Mutex safer and easier. To use mozilla::MutexAutoLock, declare and initialize it with a reference to an mozilla::Mutex. The mozilla::MutexAutoLock constructor will Lock() the underlying mozilla::Mutex automatically. When the mozilla::MutexAutoLock goes out of scope, its destructor will Unlock() the underlying mozilla::Mutex. Because of mozilla::MutexAutoUnlock, the rule for determining if your code owns the Mutex underlying the MutexAutoLock is slightly more complicated than that for MonitorAutoEnter. This is because MutexAutoUnlocks can be nested within MutexAutoLocks and vice versa, indefinitely deeply. ...
...a::MutexAutoLock goes out of scope, its destructor will Unlock() the underlying mozilla::Mutex. Because of mozilla::MutexAutoUnlock, the rule for determining if your code owns the Mutex underlying the MutexAutoLock is slightly more complicated than that for MonitorAutoEnter. This is because MutexAutoUnlocks can be nested within MutexAutoLocks and vice versa, indefinitely deeply. Important: When a mozilla::MutexAutoLock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed to own the underlying mozilla::Mutex. Constructors MutexAutoLock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. ...
... vice versa, indefinitely deeply. Important: When a mozilla::MutexAutoLock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed to own the underlying mozilla::Mutex. Constructors MutexAutoLock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. Methods None. ...
...definitely deeply. Important: When a mozilla::MutexAutoLock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed to own the underlying mozilla::Mutex. Constructors MutexAutoLock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. Methods None. ...
mozilla::MutexAutoUnlock
mozilla::MutexAutoUnlock is an RAII helper for mozilla::Mutex. It is designed to make using mozilla::Mutex safer and easier. To use mozilla::MutexAutoUnlock, declare and initialize it with a reference to a locked mozilla::Mutex. The mozilla::MutexAutoUnlock constructor will Unlock() the underlying mozilla::Mutex automatically. When the mozilla::MutexAutoUnlock goes out of scope, its destructor will Lock() the underlying mozilla::Mutex. Because of mozilla::MutexAutoLock, the rule for determining if your code does not own the Mutex underlying the MutexAutoUnlock is slightly more complicated than that for MonitorAutoEnter. This is because MutexAutoUnlocks can be nested within MutexAutoLocks and vice versa, indefinitely deeply. ...
...AutoUnlock goes out of scope, its destructor will Lock() the underlying mozilla::Mutex. Because of mozilla::MutexAutoLock, the rule for determining if your code does not own the Mutex underlying the MutexAutoUnlock is slightly more complicated than that for MonitorAutoEnter. This is because MutexAutoUnlocks can be nested within MutexAutoLocks and vice versa, indefinitely deeply. Important: When a mozilla::MutexAutoUnlock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed not to own the underlying mozilla::Mutex. Constructors MutexAutoUnlock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. ...
...rsa, indefinitely deeply. Important: When a mozilla::MutexAutoUnlock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed not to own the underlying mozilla::Mutex. Constructors MutexAutoUnlock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. Methods None. ...
...ly deeply. Important: When a mozilla::MutexAutoUnlock is the Mutex RAII wrapper most recently pushed on the stack, your code is guaranteed not to own the underlying mozilla::Mutex. Constructors MutexAutoUnlock( in mozilla::Mutex& lock; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Mutex. Methods None. ...
Using Mozilla code in other projects
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. ...
...ions; 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. ...
...he 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. Mozilla Toolkit Information about the Mozilla Toolkit API. Signing Mozilla apps for Mac OS X How to code-sign applications based on Mozilla code for Mac OS X's application security model. Using Mozilla components SpiderMonkey SpiderMonkey is the JavaScript runtime engine used by Mozilla projects. NSPR The Netscape Portable Runtime provides a platf...
...apps for Mac OS X How to code-sign applications based on Mozilla code for Mac OS X's application security model. Using Mozilla components SpiderMonkey SpiderMonkey is the JavaScript runtime engine used by Mozilla projects. NSPR The Netscape Portable Runtime provides a platform-neutral API for system level and libc-type functions. Necko The Mozilla networking library provides cross-platform networking functionality. Embedding Mozilla For information on embedding a web browser into your own application see Embedding Mozilla. ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
Some of them apply only to XUL elements. ...
...Some of them apply only to XUL elements. ...
...Some of them apply only to XUL elements. ...
...Some of them apply only to XUL elements. ...
[Deprecated] The Mozilla build VM - Archive of obsolete content
Mentored bugs have a mentor who commits to helping you every step of the way. Generally, there should be enough information in the bug to get started. Whenever you need help, contact the mentor via Matrix, in the bug itself, or by email. When you've completed the bug, they will help you get your code into the tree. ...
... Mentored bugs have a mentor who commits to helping you every step of the way. Generally, there should be enough information in the bug to get started. Whenever you need help, contact the mentor via Matrix, in the bug itself, or by email. When you've completed the bug, they will help you get your code into the tree. ...
... step of the way. Generally, there should be enough information in the bug to get started. Whenever you need help, contact the mentor via Matrix, in the bug itself, or by email. When you've completed the bug, they will help you get your code into the tree. "Good" first bugs may be a little stale, but at some point in their lives we considered that they would be a good first step for newcomers to Mozilla. We are in the process of migrating these bugs to mentored bugs, but more recent "good first bugs" may be good starting points if there are no appropriate mentored bugs. You can also ask your getting-started questions in the Introduction chat room on Matrix, and any Firefox development questions in the developers room. ...
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
Overview Recent versions of Mozilla include an extension for writing plugins that use XEmbed instead of using the old Xt-based mainloop that most plugins have been using since the Netscape 3.x days. The use of the Xt mainloop has been a problem for modern plugin development because 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 w...
.... Please use the following diagram as a reference: As you can see from the diagram above, it's pretty easy to set up a plugin using Gtk2. The general idea is that you use the XID that was passed into your NPP_SetWindow() call and create a GtkPlug to host inside of that socket. Since the GtkPlug is just a container, you can add your own widgets at your leisure with the packing you prefer. Telling Mozilla You Support XEmbed As mentioned above, you will need to tell Mozilla that you support the XEmbed protocol for hosting plugins. For backwards compatibility reasons if you don't tell Mozilla that you support it it will try to hand you an Xt widget as a parent. However, before you do so you should make sure that the browser also supports XEmbed when the plugin is first initialized. If you've built y...
...port either Xt or XEmbed you can include a fallback for older style hosting. If you haven't you can return an error and the plugin will be ignored. It's good practice to do this in case people try to install your plugin for older versions of the browser that don't support XEmbed functionality. This is an incomplete example of what a piece of code might look like that tries to check for the proper Mozilla version. This would be included in your NP_Initialize function. NPError NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) { NPError err = NPERR_NO_ERROR; PRBool supportsXEmbed = PR_FALSE; NPNToolkitType toolkit = 0; [ code that copies all of the function tables and does ] [ other standard checks ] /* * Make sure that ...
Building Mozilla
In this article, we list documents that will guide you in building Firefox or other projects based upon Mozilla code. ...
... In this article, we list documents that will guide you in building Firefox or other projects based upon Mozilla code. ...
... In this article, we list documents that will guide you in building Firefox or other projects based upon Mozilla code. ...
Working with Mozilla source code
The articles below will help you get your hands on the Mozilla source code, learn to navigate the code, and how to get the changes you propose checked into the tree. Getting a pre-configured Mozilla build system virtual machine This is the easiest way to get started: use a VirtualBox virtual machine which is already configured with a complete build environment for you to use. Just boot the VM and build! Viewing and searching Mozilla source code online Learn how to use Searchfox, Mozilla's online search and browsing tool for accessing the source code. This isn't a good way to download the code, but is a great way to search it. Navigating the Mozilla source code Learn about the various folders in the Mozilla source tree, and how to find what you're looking for. Bugs for newcomer...
...ok here. Interface development guide Guidelines and documentation for how to create and update XPCOM interfaces. The Firefox codebase: CSS Guidelines This document contains guidelines defining how CSS inside the Firefox codebase should be written, it is notably relevant for Firefox front-end engineers. SVG Cleanup Guide Guidelines and best practices for shipping new SVGs. Try Servers Mozilla products build on at least three platforms. If you don't have access to them all, you can use the try servers to test your patches and make sure the tests pass. Creating a patch Once you've made a change to the Mozilla code, the next step (after making sure it works) is to create a patch and submit it for review. This article needs to be updated fully for Mercurial. Getting commit access to th...
...test your patches and make sure the tests pass. Creating a patch Once you've made a change to the Mozilla code, the next step (after making sure it works) is to create a patch and submit it for review. This article needs to be updated fully for Mercurial. Getting commit access to the source code Feel ready to join the few, the proud, the committers? Find out how to get check-in access to the Mozilla code. ...
Overview of Mozilla embedding APIs
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 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. ...
...r.idl nsIWeakReference This interface is used to retern a proxy reference to a component. Interface status... being reviewed Interface definition: nsIWeakReference.idl nsISimpleEmunerator This interface provides a simple enumeration abstraction. Interface status... being reviewed Interface definition: nsISimpleEnumerator.idl nsIServiceManager This interface allows access to global services within mozilla. Interface status... none Interface definition: nsIServiceManager.h nsIShutdownListener This interface is used to receive notifications when the Service Manager is being shutdown. Interface status... none Interface definition: nsIServiceManager.h nsIComponentManager This interface allows new instances of registered XPCOM components to be instantiated. Interface status... none Interface defi...
Mozilla Development Strategies
ce you feel your fix is done. But, daily regressions won't block your primary development. As far as keeping trees up to date goes, the longer you go without updating your tree, the more likely you are to have CVS conflicts. If you update every day for a week, you might not have any conflicts, but if you update once a week and you've changed a lot of code, you'll most likely have conflicts. See mozilla\config\fast-update.pl for a fast way to update your tree. You can update your main mozilla tree (minus nsprpub, etc) in 1-2 minutes. Work on multiple bugs in parallel You should be working on the most important bugs first. But those might be difficult bugs (hard to reproduce crashers, big rewrites for performance, etc.) which can take several days or weeks to complete, plus the time for reviews...
...ou're working on something massive, start a branch If you are working on something big, and you want to be able to check in incrementally without getting reviews, create a branch. But having a branch means dealing with conflicts when you land, and waiting a long time for reviews. Here's how to create a branch: From your Linux or Mac OS X box: # start from your trunk tree on your local disk cd mozilla find . -type d \! -name CVS | xargs -l -P10 cvs tag -l MY_BASE_TAG > & ../taglog1.txt find . -type d \! -name CVS | xargs -l -P10 cvs tag -b -l MY_BRANCH_TAG > & ../taglog2.txt From your Windows box: cvs co -r MY_BRANCH_TAG mozilla/client.mak cd mozilla edit client.mak, putting MY_BRANCH_TAG in the right places. cvs commit client.mak nmake -f client.mak Original Document Information Au...
...AG > & ../taglog2.txt From your Windows box: cvs co -r MY_BRANCH_TAG mozilla/client.mak cd mozilla edit client.mak, putting MY_BRANCH_TAG in the right places. cvs commit client.mak nmake -f client.mak Original Document Information Author(s): Seth Spitzer and Alec Flett Last Updated Date: September 3, 2006 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Mozilla Development Tools
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. ...
... Tinderbox Tinderbox is for knowing when the tree is in flames. It is our home-grown web-based tool for watching the progress of the continuous builds that we run on multiple platforms. It is how we are able to tell when a checkin has broken the build on some platform, and how we know which person needs to be viciously flogged. Bugzilla Bugzilla is where developers can report bugs in the Mozilla source releases, and browse an online database of already-reported bugs. Doctor Doctor is a web interface to CVS. It lets developers and others edit pages on the mozilla.org web site without having to use CVS. Doctor lets you edit pages in WYSIWYG mode if the pages contain the <?doctor enable_wysiwyg_mode ?> processing instruction. Access Doctor by clicking the "Edit this Page" link at the b...
...ses, and browse an online database of already-reported bugs. Doctor Doctor is a web interface to CVS. It lets developers and others edit pages on the mozilla.org web site without having to use CVS. Doctor lets you edit pages in WYSIWYG mode if the pages contain the <?doctor enable_wysiwyg_mode ?> processing instruction. Access Doctor by clicking the "Edit this Page" link at the bottom of any mozilla.org web page. Original Document Information Author(s): Myk Melez Last Updated Date: November 8, 2005 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Mozilla Style System
The handling of those computed values is the responsibility of other parts of the code. Architecture The style system is split in half rather neatly. In one half (the backend) are the sources of specified style data, and in the other half (the frontend) is the code that turns the specified values into computed values. ...
...pond to CSS's concept of rules. However, they also exist for the other types of rule processors. When script dynamically changes the data represented by a CSS style rule, we create a new nsIStyleRule object; keeping the old one around briefly helps to determine what changed and how we need to handle that change. Computed style (front end) The interface that the front end exposes to the rest of Mozilla consists of a single nsStyleSet object and many nsStyleContext objects, each of which holds the computed style for an element, pseudo-element, or text node. The style set provides the API managing the rule processors and for creating style contexts. The style contexts then provide the API for computed style data by allowing retrieval of a set of style structs, each of which contains the computed...
...ition(); if (stylePos->mWidth.GetUnit() == eStyleUnit_Coord) { nscoord w = stylePos->mWidth.GetCoordValue(); ... } else if (stylePos->mWidth.GetUnit() == eStyleUnit_Percent) { ... Rule tree Style data computation CSS style sheet backend Loading Parsing Data structures Cascading HTML Mapped Attribute backend CSS style attribute backend Handling of dynamic changes See Also Mozilla Style System Documentation (2002) Style System Tech Talk (2002) ...
A brief guide to Mozilla preferences
What is a preference? A preference is any value or defined behavior that can be set (presumably, one setting is preferable to another). Preference changes via user interface usually take effect immediately. The values are saved to the user profile (in prefs.js), for both Firefox and Thunderbird. A preference is read from a file, and can call up to four methods: pref(), user_pref(), sticky_pref() and lockPref(). ...
...eferences file in the browser, the first line of the file is made un-parseable and skipped on loading. The only exception to this is user.js . On application launch, several preferences files are loaded. They are: Default preference files Firefox ships default preferences in several files, all in the application directory: greprefs.js - preferences shared by all applications using the Mozilla platform services/common/services-common.js - preferences for some shared services code, this should arguably be included in some other file defaults/pref/services-sync.js - default preferences for Firefox sync, also oddly misplaced browser/app/profile/channel-prefs.js - a file indicating the user's update channel. This is kept separate from other preferences because it can affect how updat...
...eference will be written whenever the preference has a user value even when it is the same as the default. Modifying preferences Advanced users can set named preferences via the advanced preferences editor, by typing about:config in the Location Bar. This UI is not recommended for most users. Programmatic changes to preferences can be made using the Preferences.jsm module from JS code, or the mozilla::Preferences static class methods from C++ code. Changing defaults A systems administrator can modify the default preferences in two ways: The administrator may add an all-companyname.js preference file (install_directory/browser/defaults/preferences/all-companyname.js). This will be parsed last during the preference loading process. The administrator may alternatively put a user.js fil...
Signing Mozilla apps for Mac OS X
Mac OS X's Gatekeeper functionality prevents users from launching applications that haven't been code-signed, in order to help keep their computers secure. Firefox and Thunderbird releases are both signed before shipping; this article describes the process. Signing Mozilla apps without the signing server Firefox and Thunderbird are built using Mozilla's Release Automation infrastructure. On Mac OS X, part of this infrastructure is automatic signing of the ".app" folder using Apple's codesign tool. For projects that don't use Mozilla's Release Automation and would like to be signed for secure launching on OS 10.8 Mountain Lion and later, this guide should provide some insight into how to make sure applications are signed correctly using Apple's codesign tool. Apple's Code Signing Guide i...
...e signing certificate specified by your-signing-identity, rather than allowing the codesign to search the keychain list. The path specified must be a full path; it's usually something similar to /Users/username/Library/Keychains/keychain-name.keychain. --resource-rules /path/to/coderesources Specifies a file to use when generating the rules to be applied to the code signing. When you're signing Mozilla applications with v1 signatures, you'll need to specify a custom CodeResources file here. -f Forces codesign to overwrite an existing signature on the application. -v Increases the verbosity of the codesign tool's output. --deep For v2 signing, sign all nested executables with the same settings. Note that you cannot specify an identifier requirement if you do this, or otherwise you need to ...
...omatic signing process (for example, to exclude a file or folder), you'll need to provide this file.. Once the application bundle is signed, this file will contain the hashes/checksums of all files that are included in the signature. If any file is subsequently changed, the folder will no longer validate. The CodeResources file used to sign official Firefox and Thunderbird builds is available in mozilla-central. For more details on using the CodeResources file, refer to the Code Resources section on Erick Dransch's blog post about code signing. ...
Testing Mozilla code
Testing your code is important! ...
...jectThe ASan Nightly Project involves building a Firefox Nightly browser with the popular AddressSanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.Clang static analysisThis document is split in two parts. The first part will focus on the modern and robust way of static-analysis and the second part will present the build-time static-analysis.Debugging Mozilla with ValgrindThis page describes how to use Valgrind (specifically, its Memcheck tool) to find memory errors.Firefox and Address SanitizerAddress Sanitizer (ASan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in C/C++ programs. It uses a compile-time instrumentation to check all reads and writes during the execution. In addition, the runtime part replaces the m...
...use-after-free and out-of-bound bugs in C/C++ programs. It uses a compile-time instrumentation to check all reads and writes during the execution. In addition, the runtime part replaces the malloc and free functions to check dynamically allocated memory. More information on how ASan works can be found on the Address Sanitizer wiki. Fuzzing InterfaceThe fuzzing interface is glue code living in mozilla-central in order to make it easier for developers and security researchers to test C/C++ code with either libFuzzer or afl-fuzz.Measuring Code Coverage on FirefoxCode coverage essentially is about measuring how often certain lines are hit, branches taken or conditions met in a program, given some test that you run on it. There are different types of coverage metrics (see also the Wikipedia entry)...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
Creating an XSLTProcessor To start, you need to create an XSLTProcessor object: var processor = new XSLTProcessor(); Specifying the stylesheet Before you can use it, you must import a stylesheet with the XSLTProcessor.importStylesheet() method. It has a single parameter, which is the DOM Node of the XSLT stylesheet to import. Note: The import is live, meaning that if you alter the stylesheet DOM after importing it, this will be reflected in the processing. Rather than modifying the DOM it is recommended to use stylesheet parameters which are usually easier and can give better performance. ...
...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 XSLTProcessor from XPCOM components Instantiating an XSLTProcessor from an XPCOM component requires a different syntax as the constructor is not defined inside components. Instead of this: var processor = new XSLTProcessor(); Do this: var processo...
...s The following reflect the interface of the XSLTProcessor object: nsIXSLTProcessor.idl XSLTProcessor.webidl Using XSLTProcessor from XPCOM components Instantiating an XSLTProcessor from an XPCOM component requires a different syntax as the constructor is not defined inside components. ...
Creating a Skin for Mozilla - Archive of obsolete content
How to edit images, extract zip files, and how to modify CSS. Mozilla uses standard gif, png, and jpeg images for the buttons and CSS to style everything else in the interface. What is a skin? A skin does not totally change the interface, it just defines how it looks. You cannot change what happens when the user right clicks on an image, but you can change the look of the right click menu (Make it blue with pink polka dots, for example). If you want to change the functionality of Mozilla, you'll have to look into modifying the chrome. That is beyond the scope of this document. ...
... can change the look of the right click menu (Make it blue with pink polka dots, for example). If you want to change the functionality of Mozilla, you'll have to look into modifying the chrome. That is beyond the scope of this document. ...
Documentation for BiDi Mozilla - Archive of obsolete content
IBMBIDI), written by Simon Montagu and posted to the mozilla-layout mailing list. While it was published in 2001 and might not be totally accurate, it does help understanding the internals of the BiDi code. Overview of BiDi processing Bidi text is reordered according to the Unicode Bidi Algorithm (UBA). The implementation is based on IBM's International Components for Unicode (ICU), which was chosen after comparing and testing the available open-source implementations. ...
...al", "Visual" or "As Source". In "As Source" mode, the text copied into the clipboard is exactly the same (from a Bidi point of view) as the original source. The text pasted from the clipboard (to the composer or to an edit field) is pasted as is. In "Visual" mode, the text copied into the clipboard is exactly the displayed text. The text pasted from the clipboard is converted (if needed) so that Mozilla displays it (from a Bidi point of view) as it would be displayed by a visual clipboard viewer. In "Logical" mode, the text copied into the clipboard is converted (if needed) so that a Logical application will display it (from a Bidi point of view) as it is displayed by Mozilla. Text pasted from the clipboard is treated exactly as if it came from a Logical source. Form controls: based on Bidi Opti...
SVG And Canvas In Mozilla - Archive of obsolete content
Presentation View Online Download Summary Today's Web browsers offer somewhat limited graphics capabilities to Web developers. Advances in hardware, especially graphics processors, offer the potential for far richer graphics in interactive applications. To realize this potential in Web applications, browsers must expose rich new graphics APIs to Web content. The Mozilla project will meet this challenge with two major new features to be delivered in Firefox 1.5: 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. Questions and Discuss...
...w features to be delivered in Firefox 1.5: 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. Questions and Discussion Rich Web: SVG And Canvas In Mozilla - Discussion ...
XUL - Mozilla's XML User Interface Language - Archive of obsolete content
Presentation View Online Download Summary Ben Goodger, lead engineer for Mozilla Firefox talked about XUL, Mozilla's XML User Interface toolkit. ...
... Presentation View Online Download Summary Ben Goodger, lead engineer for Mozilla Firefox talked about XUL, Mozilla's XML User Interface toolkit. ...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
A wiki and IRC channel have been created to track their progress. Discussions Firefox trunk and rc1 slowdown using tabs Discussion regarding certain theme components (specifically alpha-transparency) creating a high CPU load on OS/2. Title case capitalization rules in Firefox Discussion regarding rules for capitalizing the first letter of Firefox menu items in the FF UI. ...
...runk and rc1 slowdown using tabs Discussion regarding certain theme components (specifically alpha-transparency) creating a high CPU load on OS/2. Title case capitalization rules in Firefox Discussion regarding rules for capitalizing the first letter of Firefox menu items in the FF UI. Engineering Student Project - Industry Coach Paul Betts from Ohio State University is looking for someone from Mozilla to be his "Industry Coach" for Engineering 494 - How Great Ideas Turn into Great Products. Mozilla is a great product afterall. Reload vs. reload from cache Discussion regarding the lack of user understanding regarding reloading and reloading from the cache and how to address it. Why Suggestions in search bar doesn't work for me? Discussion regarding suggestions in the search bar not functionin...
mozilla-dev-platform - Archive of obsolete content
About Newsgroup summary for mozilla.dev.platform (Google Groups link) is for people working on the Mozilla Application Framework ("Mozilla-the-platform"). ...
...people working on the Mozilla Application Framework ("Mozilla-the-platform"). Summaries 2006-09-29 (Sept 22 - Sept 29) 2006-10-06 (Sept 30 - Oct 6) 2006-10-13 (Oct 7 - Oct 13) 2006-10-20 (Oct 14 - Oct 20) 2006-10-27 (Oct 21 - Oct 27) 2006-11-03 (Oct 28 - Nov 3) 2006-11-10 (Nov 4 - Nov 10) 2006-11-17 (Nov 11 - Nov 17) 2006-18-24 (Nov 18 - Nov 24) 2006-12-01 (Nov 25 - Dec 1) FAQ FAQ for mozilla.dev.platform ...
ECMAScript 5 support in Mozilla - Archive of obsolete content
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. ...
... 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. ...
Mozilla XForms User Interface - Archive of obsolete content
Currently XForms can be hosted by XHTML and XUL in Seamonkey and Firefox. Later we have plans to support XForms hosted by SVG. The XForms specs define two kinds of XForms UI elements, called 'Form Controls' and 'XForms User Interface'. Elements from the "Form Controls" group allows users to interact with instance data. ...
... instance nodes. These attributes are: ref, nodeset, model and bind. XForms Elements Almost every XForms element can be presented as one of serveral different kinds of widgets. This section contains a short description of each XForms element and its representation. The XForms specification offers suggestions for some of the representations, but some of the widgets we use are only available in the Mozilla XForms processor. The choice of widget that we use is often determined by the data type of the instance node that the xforms element is bound to. The form author can also influence the widget by using the appearance attribute on the element. Form Controls Module This section contains a short description for each form control element. input A key xforms element to show and change the instance data...
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. ...
... 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. ...
Mozilla Plugin Accessibility
cannot keyboard navigate out of a plugin We will apply the same solution as in problem 4 above. The plugin will be responsible for bubbling up shift+tab and tab when the user has reached the end of the tab cycle within the plugin. The bug tracking this work is bug 93149. ? No target 3. Many plugins lack accessibility API support Most plugins that work with Mozilla do not yet support accessibility APIs. A notable acception is the Adobe PDF plugin on Windows, which supports MSAA. In other cases, vendors need to find or be convinced of the business justification so that resources are applied to the problem. Plugin vendors. Unknown 4. Seamonkey has no message bar for plugin installation The message bar will be ported to Seamon...
...plugin on Windows, which supports MSAA. ...
Error codes returned by Mozilla APIs
Each error is listed by its name and an error code in parentheses. An error will typically be displayed on the error console, but can be captured using a try-catch block in JavaScript. These constants can be accessed through Components.results. For example, by using Components.results.NS_ERROR_NOT_INITIALIZED General Errors The following errors are general and can occur when using any component. NS_ERROR_NOT_INITIALIZED (0xC1F30001) An attempt was made to use a component or object which has not yet been initialized. ...
... Components.results ...
Embedding Mozilla
Gecko allows 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 a...
...PIs 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 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 ...
Introduction to Layout in Mozilla
, views, widgets Presentation has media type, dimensions, etc. May not be directly manipulated Detailed Walk-Through Setting up Content model construction Frame construction Style resolution Reflow Painting Setting Up Assume basic knowledge of embedding and network APIs (doc shell, streams) Content DLL auto-registers a Document Loader Factory (DLF) @mozilla.org/content-viewer-factory/view;1?type=text/html All MIME types mapped to the same class, nsContentDLF nsDocShell Receives inbound content via nsDSURIContentListener Invokes nsIDLF::CreateInstance, passes MIME type to DLF nsContentDLF Creates a nsHTMLDocument object, invokes StartDocumentLoad. Creates a parser, returned as nsIStre...
... ...
MathML Accessibility in Mozilla
Mac: MathML support is provided by VoiceOver. ...
... 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. ...
Mozilla 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. ...
...TML Parser In quirks mode, we parsed HTML comments in a non-SGML way compatible with other browsers instead of treating "--" as the comment start and end delimiter. Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This quirk is now HTML5 conform and has been adopted in standards mode. Original Document Information Author(s): David Baron, Boris Zbarsky See also Mozilla's Quirks Mode ...
mozilla::MonitorAutoEnter
mozilla::MonitorAutoEnter is an RAII helper for mozilla::Monitor. It is designed to make using mozilla::Monitor safer and easier. To use mozilla::MonitorAutoEnter, declare and initialize it with a reference to a mozilla::Monitor. The mozilla::MonitorAutoEnter constructor will Enter() the underlying mozilla::Monitor automatically. When the mozilla::MonitorAutoEnter goes out of scope, its destructor will Exit() the underlying mozilla::MonitorAutoEnter. Important: When a mozilla::MonitorAutoEnter is live on the stack, your code is guaranteed to own the underlying mozilla::Monitor. Constructors MonitorAutoEnter( in mozilla::Monitor& monitor; ); This parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::Monitor. Methods Wait() nsresult Wait( ...
...at your code has already properly constructed the mozilla::Monitor. Methods Wait() nsresult Wait( in PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT ); Wait on the underlying monitor until it is Notifyed. Notify() nsresult Notify(void); Notify one thread waiting on the underlying monitor. NotifyAll() nsresult NotifyAll(void); Notify all threads waiting on the underlying monitor. ...
mozilla::services namespace
The services C++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect XPCOM approach: GetService(), CallGetService(), etc methods are expensive and should be avoided when possible. To use it, you first need to include the header into your C++ file: #include "mozilla/Services.h" Then you can obtain references to services by simply accessing them from the mozilla::services namespace. ...
...OM approach: GetService(), CallGetService(), etc methods are expensive and should be avoided when possible. To use it, you first need to include the header into your C++ file: #include "mozilla/Services.h" Then you can obtain references to services by simply accessing them from the mozilla::services namespace. ...
Using the Mozilla source server
Using the Mozilla source server is now even more feature-packed. ...
...packed. The nightly debug builds are now also Source Indexed so that by following a couple of simple steps you can also have the source code served to you for debugging without a local build What you'll need WinDbg or Visual Studio (Note: express editions will not work, but WinDbg is a free download) A nightly build that was created after April 15, 2008; go to the /pub/firefox/nightly/latest-mozilla-central/ folder and grab the installer For builds predating the switch to Mercurial, you'll need cvs.exe, added to your PATH (the cvs.exe from MozillaBuild has problems, use this one instead) Note: Do not use the CVS from MozillaBuild, it will not work! Set up symbols Follow the instructions for Using the Mozilla symbol server. Once the symbol path is set you must now enable Source Server. ...
Automatic Mozilla Configurator - Archive of obsolete content
Automatic Mozilla Configurator:Introduction Automatic Mozilla Configurator:How Mozilla finds its configuration files Automatic Mozilla Configurator:How Thunderbird and Firefox find their configuration files Automatic Mozilla Configurator:Protecting Mozilla's registry.dat file Automatic Mozilla Configurator:Enabling quicklaunch for all users Automatic Mozilla Configurator:Kill the XUL.mfl file for good Automatic Mozilla Configurator:Locked config settings Automatic Mozilla Configurator:Other Mozilla customization pages Online configurator tools: registry.dat mozilla.cfg (locked preferences) ...
External CVS snapshots in mozilla-central - Archive of obsolete content
The following list of directories (incomplete) contain them. Those directories shall be considered read-only, changes shall be delivered to the upstream software projects. Eventually we'd like to have ACLs, but as of today there is no protection for accidental commits to those directories. Such changes will get overwritten without warning on importing the next updated version. NSPR nsprpub NSS dbm security/dbm security/coreconf security/nss Special procedures must be used to update these to newer snapshots of the upstream software projects. The procedure for NSPR and NSS is documented here. ...
Mozilla project presentations - Archive of obsolete content
This article provides links to presentations covering various aspects of the Mozilla project. Community All About Community This presentation provides a look at the Mozilla community giving program. (PDF, 2.5 MB) ...
Directions of the Mozilla RDF engine - Archive of obsolete content
Presentation Download Summary This presentation showed new developments in the Mozilla RDF engine. These include plans to expose the RDF API to public web content, as well as performance and correctness improvements. ...
Mozilla E4X - Archive of obsolete content
ude namespaces, qualified names, and XML elements and lists. E4X also adds new JavaScript operators for filtering XML lists, and for enumerating XML children and descendants. Another E4X feature: the ability to bind a W3C DOM document to a new XML object, reflecting the DOM in E4X terms so that updates to either the DOM or the E4X object hierarchy show up in the other. Questions and Discussion Mozilla E4X - Discussion ...
mozilla.dev.platform FAQ - Archive of obsolete content
Then unpack the XUL app into the Mac structure with xulrunner -install-app Q: Can you build XULRunner with newer (>1.5) features, such as storage? A: XULRunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> Q: Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. ...
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
Binding tab bar to new theme Discussion about how to bind a new theme to a tab bar without losing its original binding. ...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
We'll build upon the stock watcher extension created in earlier articles in this series, updating it so it can also be used in Thunderbird and Sunbird (previous versions worked only in Firefox). ...
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
the Firefox Nightly channel and not yet included in a draft edition of an ECMAScript specification. Additions to the ArrayBuffer object ArrayBuffer.transfer() (spec) New TypedObject objects Based on Typed Objects draft, and exposed via a global TypedObject object, e.g. TypedObject.StructType & TypedObject.ArrayType. This feature is non-standard and not documented. See https://bugzilla.mozilla.org/show_bug.cgi?id=1336740 and https://bugzilla.mozilla.org/show_bug.cgi?id=578700. New Shared Memory objects SharedArrayBuffer Atomics ...
ECMAScript 2015 support in Mozilla - Archive of obsolete content
Code-named "ES.next", "Harmony", or "ECMAScript 6", the first working draft (based on ECMAScript 5.1) was published on July 12, 2011 as "ES.next". In August 2014, the ECMAScript 2015 draft specification was feature frozen and went through a stabilization and bug fixing period. ...
Developing Mozilla XForms - Archive of obsolete content
You should create a new, clean profile for debugging. Then start Firefox out of the build directory: cd obj-*/dist/firefox ./firefox -no-remote -jsconsole -P yourProfileName The XForms extension that was built together with Firefox should be already installed. Then open your form that causes problems and have a look on the console. Often you'll find the first starting points here or in the Error Console. ...
Web APIs: Mozilla-specific documents
In the pages listed here, we provide Mozilla-specific documents about standard Web APIs. This includes notes about any Firefox-only features, or about any experiments or other deviations from the specification that may exist in Mozilla code. ...
Information for Governments and Other Organizations Evaluating Mozilla
Mozilla's Section 508 Compliance Section 508 is a set of accessibility requirements that help US federal agencies decide what software applications they can use. Mozilla's W3C User Agent Guidelines Evaluation Report W3C's WAI is advancing another important set of accessibility standards called UAAG. These guidelines go much further than Section 508 does and Mozilla is further from doing a good job at satisfying them. ...
Cookies in Mozilla
Suggestions as to needed documentation can be directed to Mike Connor. Creating a Cookie Log Steps to create and attach a cookie log in order to aid in triaging a bug in cookies. Cookies Preferences in Mozilla Documentation on what the preferences used by the cookies code actually do. Original Document Information Author(s): Mike Connor Last Updated Date: March 15, 2004 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
JavaScript libraries from Mozilla projects
Documentation for these libraries can be found here. ...
Mozilla Content Localized in Your Language
This section of the style guide is for you to author. The content here should be what you and your localization team have decided, together, to follow when localizing Mozilla products and web sites. You are free to add, edit, remove, and localize everything in this section according to how the localization team for your language agrees. All we ask is that you name this page according to this example, "Mozilla Content in Spanish (es-MX)" and add your locale code tag at the bottom. Enjoy developing your style guide! Your language's style guide Abbreviations How are abbreviations expressed in your language? Numerals and metrics How are numerals and metrics expressed in your language? Formal and informal forms, and separators (, or .) Date Format What are the date formats for week...
Localization at Mozilla
is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture. These resources are for anyone with an interest in the technical aspects involved in localization. They are for developers and all contributors. The documentation here is no longer being maintained and is inaccurate. L10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ . To learn how to bootstrap a new locale for Mozilla projects, please see those documents ...
Mozilla Framework Based on Templates (MFBT)
Its code resides in the mfbt/ source directory, but headers within it should be included using paths like "mozilla/StandardInteger.h". It is fairly new, so its functionality is currently sparse. Feel free to file bugs to add new functionality to it, or to move existing functionality into it, as needed. mfbt code goes to some length to document all its interfaces in comments, including examples when possible. It also attempts to define its functionality in well-named files, such that simply skimming the contents of mfbt/ will quickly suggest the relevant header to examine. ...
Fonts for Mozilla's MathML engine
Note that most of these instructions may as well apply to other Web rendering engines. Installation Instructions Windows Install the Latin Modern Math and STIX fonts as follows: Download latinmodern-math-1959.zip. Open the ZIP archive, move inside the latinmodern-math-1959 directory and then inside the otf directory. You will find a latinmodern-math font file. ...
Mozilla MathML Status
r elements Element [- attribute] Notes mglyph Not implemented. See bug 297465. maction Implemented. maction - tooltip Not implemented. See bug 544001. semantics Implemented. Original Document Information Author(s): Frederic Wang Other Contributors: Copyright Information: Portions of this content are (C) 2010 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Mozilla external string guide
These classes were removed a long time ago. The only remaining string classes are the "internal" ones, which are documented XPCOM Guide Internal strings. ...
mozilla::CondVar
Please see Introduction_to_NSPR for a high-level summary of its semantics. #include "CondVar.h" Methods Constructor CondVar(Mutex& aMutex, const char* aName) Initialize the CondVar with its associated mutex and a name to reference it by. Wait() nsresult Wait( in PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT ); Wait on this CondVar until it is Notifyed. Notify() nsresult Notify(void); Notify one thread waiting on this CondVar. NotifyAll() nsresult NotifyAll(void); Notify all threads waiting on this CondVar. AssertCurrentThreadOwnsMutex() Assert that the current thread has successfully Locked the mutex undergirding this CondVar. Does not incur a runtime penalty in optimized builds. ...
mozilla::Monitor
Please see Introduction_to_NSPR for a high-level summary of its semantics. Methods Enter() Enter the monitor. Exit() Exit the monitor. Wait() nsresult Wait( in PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT ); Wait on this monitor until it is Notifyed. Notify() nsresult Notify(void); Notify one thread waiting on this monitor. NotifyAll() nsresult NotifyAll(void); Notify all threads waiting on this monitor. AssertCurrentThreadIn() Assert that the current thread is in this monitor. Does not incur a runtime penalty in optimized builds. AssertNotCurrentThreadIn() Assert that the current thread is not in this monitor. Does not incur a runtime penalty in optimized builds. ...
mozilla::Mutex
Lock() Lock the mutex. Unlock() Unlock the mutex. AssertCurrentThreadOwns() Assert that the current thread has locked this mutex. Does not incur a runtime penalty in optimized builds. AssertNotCurrentThreadOwns() Assert that the current thread does not own this mutex. Does not incur a runtime penalty in optimized builds. ...
SpiderMonkey: The Mozilla JavaScript runtime
Standalone source code releases can be found on the Releases page. Guides Building SpiderMonkey Build Documentation How to get SpiderMonkey source code, build it, and run the test suite. Using SpiderMonkey Introduction to the JavaScript shell Documentation of the command-line JavaScript shell, js. JSAPI User Guide This guide provides an overview of SpiderMonkey and describes how you can embed engine calls in your applications to make them JavaScript-aware. JSAPI cookbook Shows the JSAPI translation of some commonly used JavaScript expressions and statements. ...
Using JS in Mozilla code
However, there are a few exceptions, listed here. JS Language features Proper tail calls are not implemented. JS standard library features Feature Standard Can be used in code new Proxy(target, handler) ES2015 Yes, but getPrototypeOf and setPrototypeOf handlers are not yet implemented. ...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
SVG 2 is the next major version of the SVG standard, which is a complete rework of the SVG 1.2 draft. Version 2 contains a lot of changes regarding the last stable version SVG 1.1. Those changes are listed below including their support status within Mozilla applications. General Change Notes length attribute and indexed property for list interfaces Implementation status unknown <script> element in content model of all elements Implementation status unknown initialize(), appendItem(), replaceItem(), and insertItemBefore() on list objects making a copy of any list item being inserted that is already in another list Implementation status unknown crossorigin attribute for <image> and <script> elements Not implemented yet (a...
Index - Archive of obsolete content
n is running. 112 tabs/utils Functions for working with XUL tabs and the XUL tabbrowser object. 113 test/assert Add-on SDK, JPM Implements the assert interface defined in the CommonJS Unit Testing specification version 1.1. 114 test/harness Test harness setup and execution. 115 test/httpd An HTTP server for the Mozilla platform, which can be used in unit tests. 116 test/runner Sets up unit tests. 117 test/utils Helper methods used in the CommonJS Unit Testing suite. 118 ui/button/action Add a button to the Firefox user interface. 119 ui/button/toggle Add a toggle button to the Firefox user interface. 120 ui/frame ...
... 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, Extensions, Places No summary! 175 Boxes Code snippets Make the BOX style="display: block" and the wrapping behavior will occur when the box is resized: 176 Canvas code snippets Canvas, Code snippets, Graphics No summary! 177 Cookies Add-ons, Code snippets, Cookies, Extensions No summary! 178 Customizing the download...
... Code snippets, Extensions, Snippets No summary! 199 Modules No summary! 200 On page load Add-ons, Extensions No summary! 201 Page Loading Code snippets No summary! 202 Post data to window Add-ons, Extensions, NeedsContent No summary! 203 Preferences Add-ons, Code snippets, Extensions, Guide, Mozilla, Preferences No summary! 204 Progress Listeners Add-ons, Extensions No summary! 205 QuerySelector DOM No summary! 206 Rosetta C, DOM, HTML, HTMLScriptElement, JavaScript, Non-JavaScript, Programming Languages No summary! 207 Running applications Add-ons, Code snippets, Extensions No summary! 208 S...
...And 230 more matches
Index
Mozilla › Tech › XPCOM › Index
It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. 2 Accessing the Windows Registry Using XPCOM Add-ons, Code snippets, Extensions, NeedsClassification, Windows Registry When implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. ...
... Add-ons, Code snippets, Extensions, NeedsClassification, Windows Registry When implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products. 3 Aggregating the In-Memory Datasource RDF No summary! 4 Binary compatibility XPCOM If Mozilla decides to upgrade to a compiler that does not have the same ABI as the current 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...
...ore 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). ...
...And 153 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
This MCD (aka autoconfig here), is not to be confused with https://wiki.mozilla.org/Thunderbird...oconfiguration . ...
... This MCD (aka autoconfig here), is not to be confused with https://wiki.mozilla.org/Thunderbird...oconfiguration . ...
... This MCD (aka autoconfig here), is not to be confused with https://wiki.mozilla.org/Thunderbird...oconfiguration . ...
...And 75 more matches
Index
ent of security-enabled client and server applications. Applications built with NSS can support SSL v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards. 2 An overview of NSS Internals API, Intermediate, Intro, NSS, Tools A High-Level Overview to the Internals of Network Security Services (NSS) Software developed by the Mozilla.org projects traditionally used its own implementation of security protocols and cryptographic algorithms, originally called Netscape Security Services, nowadays called Network Security Services (NSS). NSS is a library written in the C programming language. It's free and open source software, and many other software projects have decided to use it. In order to support multiple operating systems (...
... a software vendor, administrators inside an organizational infrastructure, or the software user. NSS ships a predefined set of CA certificates. This set, including their trust assignments, is provided by NSS as a software module, called CKBI ("built-in root certificates"), which also implements the PKCS#11 interface. On an organizational level the contents of the set are managed according to the Mozilla CA policy. On a technical level the set is a binary software module. A cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the X.509 certs of your communication partners (peer). It's also required that you safely keep your own secret keys that belong to your own certificates. You might want to protect the storage of your secret ...
.... A file descriptor has a pointer to the first layer handling the data. That layer has a pointer to a potential second layer, which might have another pointer to a third layer, etc. Each layer defines its own functions for the open/close/read/write/poll/select (etc.) functions. When using an SSL network connection, you'll already have two layers, the basic NSPR layer and an SSL library layer. The Mozilla applications define a third layer where application specific processing is performed. You can find more details in the NSPR reference documents. NSS occassionally has to create outbound network connections, in addition to the connections requested by the application. Examples are retrieving OCSP (Online Certificate Status Protocol) information or downloading a CRL (Certificate Revocation List)...
...And 67 more matches
WebIDL bindings
it will just annoy the DOM peers and they'll make you get the review anyway. The configuration file, dom/bindings/Bindings.conf, is basically a Python dict that maps interface names to information about the interface, called a descriptor. There are all sorts of possible options here that handle various edge cases, but most descriptors can be very simple. ...
... edge cases, but most descriptors can be very simple. All the generated code is placed in the mozilla::dom namespace. For each interface, a namespace whose name is the name of the interface with Binding appended is created, and all the things pertaining to that interface's binding go in that namespace. There are various helper objects and utility methods in dom/bindings that are also all in the mozilla::dom namespace and whose headers are all exported into mozilla/dom (placed in $OBJDIR/dist/include by the build process). ...
...d all the things pertaining to that interface's binding go in that namespace. There are various helper objects and utility methods in dom/bindings that are also all in the mozilla::dom namespace and whose headers are all exported into mozilla/dom (placed in $OBJDIR/dist/include by the build process). Adding WebIDL bindings to a class To add a WebIDL binding for interface MyInterface to a class mozilla::dom::MyInterface that's supposed to implement that interface, you need to do the following: If your interface doesn't inherit from any other interfaces, inherit from nsWrapperCache and hook up the class to the cycle collector so it will trace the wrapper cache properly. Note that you may not need to do this if your objects can only be created, never gotten from other objects. If you also i...
...And 46 more matches
Firefox user agent string reference - HTTP
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. 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. ...
...oxversion. The recommended way of sniffing for Gecko-based browsers (if you have to sniff for the browser engine instead of using feature detection) is by the presence of the "Gecko" and "rv:" strings, since some other browsers include a "like Gecko" token. For other products based on Gecko, the string can take one of two forms, where the tokens have the same meaning except those noted below: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail appname/appversion Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion appname/appversion appname/appversion indicates the application name and version. For instance, this could be "Camino/2.1.1", or "SeaMonkey/2.7.1". Firefox/firefoxversion is an optional compatibility token that some Gecko-based browsers may ch...
...et indicators Only from Firefox 11 onwards. The platform part of the UA string indicates if Firefox is running on a phone-sized or tablet device. When Firefox runs on a device that has the phone form factor, there is a Mobile; token in the platform part of the UA string. When Firefox runs on a tablet device, there is a Tablet; token in the platform part of the UA string instead. For example: Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0 Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0 The version numbers are not relevant. Avoid inferring materials based on these. The preferred way to target content to a device form factor is to use CSS Media Queries. However, if you use UA sniffing to target content to a device form factor, please look for Mobi (to in...
...And 28 more matches
Index of archived content - Archive of obsolete content
View Source for XUL Applications Windows XML-related code snippets xml:base support in old browsers XPath getAttributeNS Common Pitfalls Communication between HTML and your extension Creating custom Firefox extensions with the Mozilla build system Custom about: URLs Default Preferences Deploying a Plugin as an Extension Developing add-ons Displaying web content in an extension without security issues Downloading JSON and JavaScript in extensions Enhanced Extension Installation Extension Etiquette Extension Library Extension Pack...
...nd Insertion (HTML & XUL) Appendix F: Monitoring DOM changes Connecting to Remote Content Custom XUL Elements with XBL Getting Started with Firefox Extensions Handling Preferences Intercepting Page Loads Introduction JavaScript Object Management Local Storage Mozilla Documentation Roadmap Observer Notifications Setting Up a Development Environment The Box Model The Essentials of an Extension Useful Mozilla Community Sites User Notifications and Alerts XPCOM Objects Performance best practices in extension...
... Promises Updating addons broken by private browsing changes Using Dependent Libraries In Extension Components Using the Stylesheet Service bookmarks.export() bookmarks.import() Adding preferences to an extension An Interview With Douglas Bowman of Wired News Archived Mozilla and build documentation ActiveX Control for Hosting Netscape Plug-ins in IE Archived SpiderMonkey docs File object open Merging TraceMonkey Repo SpiderMonkey coding conventions Autodial for Windows NT ...
...And 26 more matches
Places Developer Guide
3. It encompasses history, bookmarks, tags, favicons, and annotations. There are two models of identity in the system: URIs, and unique integer identifiers for items in the bookmark system. Some of the APIs are URI-centric, some use item ids. The API signature and context usually make clear which is required. Bookmarks The toolkit bookmarks service is nsINavBookmarksService: var bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Ci.nsINavBookmarksService); This service provides methods for adding, editing and deleting items in the bookmarks collection. Types in the Bookmark System There are the four types of items in the bookmarks system, and their identifiers in the IDL: Bookmark: nsINavBookmarksService.TYPE_BOOKMARK Folder: nsINavBookmarksService.T...
...Firefox utilities and services nsIPlacesTransactionsService - A Firefox service for modifying bookmarks in a transactional manner, providing facilities for undo/redo Places utilities for JavaScript - Accessors and helper functions for Firefox and extensions Creating Bookmarks, Folders and Other Items Creating a Bookmark // create an nsIURI for the URL to be bookmarked. var bookmarkURI = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService) .newURI("http://www.mozilla.com", null, null); var bookmarkId = bookmarks.insertBookmark( bookmarks.toolbarFolder, // The id of the folder the bookmark will be placed in. bookmarkURI, // The URI of the bookmark - an nsIURI object. bookmarks.DEFAULT_INDEX, // The position of the bookmark ...
... // The title of the new folder. bookmarks.DEFAULT_INDEX); // The position of the new folder in its parent folder. Creating a Separator var separatorId = bookmarks.insertSeparator( bookmarks.toolbarFolder, // The id of the folder the separator will be placed in. bookmarks.DEFAULT_INDEX); // The position of the separator in its parent folder. ...
...And 26 more matches
XPCOM Stream Guide
Mozilla › Tech › XPCOM › Guide › Streams
It is not that sequence of characters, though: the characters may not all be available when you read from the stream. Think of a water tank with a spout: the tank may be full, or it may be half-full, or it may be empty. The spout controls how much water you can get out of the tank at a time. The spout is a source of water. If we think of the water as data, then the spout represents an input stream: a controller for data coming out of something. At the same time, there may be some way to put water into the tank - say, a main water line. That water line represents an output stream: a controller for data going into something. ...
... a main water line. That water line represents an output stream: a controller for data going into something. The actual data going in to and coming out of an object isn't usually important to a stream. Streams simply provide a way to read or write data to some object. In basic C++ programming for a console application, we usually talk about streams to access files, or to interact with the user. Mozilla's use of streams is more complex. On the one hand, we don't interact with the user through streams. On the other hand, we use streams to access files within a ZIP archive, to store and provide data coming from websites, even to talk to other programs on the same computer through "pipes" (more on that later). We even have streams that take input from other streams and transform the data within the...
...treams for several different types of data storage. Each of these implements nsIInputStream. ...
...And 24 more matches
Index - Web APIs
Web › API › Index
OM, Document, Property, Read-only, Reference The Document.characterSet read-only property returns the character encoding of the document that it's currently rendered with. 872 Document.clear() API, Deprecated, Document, HTML DOM, Method, NeedsExample, NeedsSpecTable, Reference The Document.clear() method clears the whole specified document in early (pre-1.0) versions of Mozilla. 873 Document.close() API, Document, HTML DOM, Method, Reference The Document.close() method finishes writing to a document, opened with Document.open(). 874 Document.compatMode API, DOM, Document, NeedsSpecTable, Property, Reference The Document.compatMode property indicates whether the document is rendered in Quirks mode or Standards mode. 875 ...
...ace represents the default timeline of the current document. This timeline is a special instance of DocumentTimeline that is automatically created on page load. 966 Document.title API, Command API, Document, HTML DOM, NeedsSpecTable, Property, Reference The document.title property gets or sets the current title of the document. 967 Document.tooltipNode API, API:Mozilla Extensions, DOM, Draft, Gecko, Mozilla, Non-standard, Property, Reference The Document.tooltipNode property returns the node which is the target of the current <xul:tooltip>. 968 Document.visibilityState DOM, Document, Page Visibility API, Property, Read-only, Reference, Web The Document.visibilityState read-only property returns the visibility of the document, that is ...
...resented here are not specific to HTML; they also apply to XML. The demonstrations provided here will work fine in any modern browser, including all versions of Firefox and IE 5+. 1029 Using the W3C DOM Level 1 Core DOM, NeedsUpdate The W3C's DOM Level 1 Core is a powerful object model for changing the content tree of documents. It is supported in all major browsers including Mozilla Firefox and Microsoft Internet Explorer. It is a powerful base for scripting on the web. 1030 Example DOM No summary! 1031 Whitespace in the DOM DOM, Intermediate, NeedsUpdate The presence of whitespace in the DOM can cause layout problems and make manipulation of the content tree difficult in unforeseen ways. Any whitespace characters that are outside of...
...And 24 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
re to include binaries for every platform. Reference materials To get an idea of what kinds of functions embedded XPCOM can handle, take a look at the API reference and the interface definitions from XPIDL in the actual source code. Note: Interface Definition Language (IDL) is a language for giving standard definitions of objects, methods, and so forth. The XPIDL (Cross-Platform IDL) used by Mozilla is a partial extension to the CORBA IDL. You can perform a full-text search of the Firefox source code in Mozilla Cross-Reference using character strings, filenames, etc as search keys. If you're having trouble with any of the details of the interface, it is helpful to search on the source code for usage examples within Firefox. Note: To look at the Firefox 3 source code, choose "Firefox 3" in ...
...Central". Calling XPCOM from XPConnect Use the XPConnect technology to use XPCOM in JavaScript. Listing 1 shows how you can use XPConnect to acquire references to XPCOM services and create new XPCOM objects. ...
...Central". ...
...And 22 more matches
Bootstrapping a new locale
To learn how to bootstrap a new locale for Mozilla projects, please see those documents. In Mozilla, we use the the Mercurial version control system (Hg) to help manage our localizations. When a localization team is registered and your Hg repository is set up for a locale, you can then clone the existing Mozilla release branch (i.e. where active development of the upcoming release of Firefox occurs) and then begin the necessary work for translation. ...
.... L10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ . To learn how to bootstrap a new locale for Mozilla projects, please see those documents. In Mozilla, we use the the Mercurial version control system (Hg) to help manage our localizations. When a localization team is registered and your Hg repository is set up for a locale, you can then clone the existing Mozilla release branch (i.e. where active development of the upcoming release of Firefox occurs) and then begin the necessary work for translation. Hg allows localizers to work locally on their machines and then "push" changes to their official Mozilla repository. Installing Mercurial Depending on your operating system, you will need to install the correct version of Hg on your machine. This document...
...will give you the basic information on how to do that. Install the compare-locales utility The next step is to install compare-locales. $ sudo easy_install compare-locales This will download and install the utility. Clone the source code The next step is to download a copy of the source code to your local system, using Mercurial. You will need to "hg clone" the existing release branch for Mozilla so you have all the files locally for you to begin localization. Make sure to have the directory where you intend to work as the current path on your terminal. (You should "cd" to 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 Fire...
...And 22 more matches
Localizing with Koala
For the purposes of this tutorial, the locale code that we will use will be called "x-testing". In a real-life situation, that would become for example "de" (for German) or "es-ES" (for Spanish in Spain). Translating to x-testing will basically consist of converting any strings to uppercase, for example "File" in original version (en-US) will become "FILE" in x-testing. We will translate a small piece of the UI found in the search bar. ...
...options: Startpage and Management. Before you can use them, you need to create a new Koala project. Creating a new project Create a new Koala project by going to File > New > New Project From Template... Choose "koala" in the Categories list. Choose "koala" in the Templates list. Choose a name for your project (e.g. l10n.kpf). Choose the directory in which the project will live in (e.g. C:\mozilla\l10n on Windows, /home/user/mozilla/l10n on Linux or /Users/user/mozilla/l10n on Mac OS X). Due to a bug in Koala (bug 21930), it is recommended that you don't choose a path that contains spaces (like C:\Documents and Settings\user\...). Click "Open" to create the project. Koala will check for Mercurial. Make sure that your Mercurial installation is in your system's $PATH. Setup wizard will op...
...m's $PATH. Setup wizard will open. Configure the Application Choose "Firefox" as the application. Version: 3.6. Appname: browser. Included locale: en-US (this is the original locale you're translating from). Leave Location empty for now. Check the "Mercurial" checkbox. Note that you don't have to edit the Location field, it automatically fills in when you check the "Mercurial" checkbox: "C:\mozilla\l10n\application\Firefox\3.6". URL: http://hg.mozilla.org/releases/mozilla-1.9.2. Branch: default. Revision: leave empty. Click "OK". Koala will now try to clone the en-US source repository from http://hg.mozilla.org/releases/mozilla-1.9.2. It's almost 1 GB worth of download, so it may take a while. Click "OK". On Windows, if Koala doesn't clone the repositories, you'll need to do it manually.
...And 22 more matches
Using XPCOM Components
<< PreviousNext >> One of the best ways to begin working with XPCOM - especially when you are designing the interface to a component that will be used by others, as we do in Starting WebLock - is to look at how clients are already using XPCOM components. Applications like the Mozilla browser are sophisticated, modularized clients of XPCOM components. ...
... Component Examples You can find out more about how you can use the particular components described here in the XPCOM API Reference. ...
...ophisticated, modularized clients of XPCOM components. In fact, virtually all of the functionality that you associate with a browser - navigation, window management, managing cookies, bookmarks, security, searching, rendering, and other features - is defined in XPCOM components and accessed by means of those component interfaces. Mozilla is made of XPCOM components. This chapter demonstrates how Mozilla uses some of these XPCOM objects, such as the CookieManager, and shows how access to the WebLock component will be defined. Component Examples You can find out more about how you can use the particular components described here in the XPCOM API Reference. For now, what's important to see is how components like the ones in this section are obtained and used by the Mozilla browser. Cookie Manage...
...And 22 more matches
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. The Remote XUL Manager extension lets you manage this whitelist, which is maintained using nsIPermissionManager, by creating entries of type "allowXULXBL", like this: Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager) .add(uri, 'allowXULXBL', Components.interfaces.nsIPermissionManager.ALLOW_ACTION); XUL (pronounced like "zool"), which is short for XML-based User Interface Language, is an XML-based language for describing application interfaces. It contains elements for all common UI widgets (menus, buttons, toolbars, etc.)...
... Components.interfaces.nsIPermissionManager.ALLOW_ACTION); XUL (pronounced like "zool"), which is short for XML-based User Interface Language, is an XML-based language for describing application interfaces. It contains elements for all common UI widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers). XUL is often used by desktop applications like Mozilla but can also be loaded from a web server and rendered inside the content pane of a compatible browser. XUL loaded and rendered in this way is called remote XUL and can be used for basic functions like web site navigation as well as to build sophisticated web-based applications. [***aw: we should have a screenshot here of a xul document loaded in a content window***] This tutorial walks you thro...
...side the content pane of a compatible browser. XUL loaded and rendered in this way is called remote XUL and can be used for basic functions like web site navigation as well as to build sophisticated web-based applications. [***aw: we should have a screenshot here of a xul document loaded in a content window***] This tutorial walks you through the process of building XUL-based navigation for the mozilla.org web site. After completing the tutorial you should understand how to: create XUL documents; serve them from a web server; use Cascading Style Sheets (CSS) to change their appearance; use JavaScript to define their behavior. Global Web Site Navigation Most web sites today have poor global navigation (features for locating and visiting pages across the entire site). It is difficult to ...
...And 20 more matches
IME handling guide
wing 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. ...
...g 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 mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. ...
...er 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 mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. Following table explains the mapping between them. ...
...And 20 more matches
Python binding for NSS
re being removed from the API entirely. Project History Red Hat utilizes both NSS and Python in many of it's projects, however it was not previously possible to call NSS directly from Python. To solve this problem Red Hat generously funded the initial development of python-nss as well as it's continued maintenance. Red Hat following it's open source philosophy has contributed the source to the Mozilla security project. Red Hat welcomes all interested contributors who would like to contribute the the python-nss project as part of an open source community. The initial release of python-nss occurred in September 2008 with it's inclusion in the Fedora distribution. The source code to python-nss was first imported into the Mozilla CVS repository on June 9th 2009. python-nss is currently available i...
...ave already been deprecated due to lessons learned. Thus at some point in the future when it is felt the API has solidified and been further proven in the field a 1.0 release will be made. At that point in time existing users of the python-nss API will need to some elements of their code. A migration script will be provided to assist them. Licensing Information python-nss is available under the Mozilla Public License, the GNU General Public License, and the GNU Lesser General Public License. For information on downloading python-nss releases as tar files, see Source Download. Documentation python-nss API documentation The python-nss API documentation for the current release can be viewed at python-nss API documentation. The API documentation is generated from the python-nss source code and...
...ry illustration. Other Documentation The doc directory contains other files you may wish to review. How to Report a Bug python-nss bugs are currently being tracked in the Red Hat bugzilla system for Fedora. You can enter a bug report here. Source Download Area Source downloads are maintained here. Links to download URL for a specific release can be found in the Release Information section. Mozilla Source Code Management (SCM) Information On March 21, 2013 the NSS project switched from using CVS as it's source code manager (SCM) to Mercurial, also known as hg. All prior CVS information (including release tags) were imported into the new Mercurial repositories, as such there is no need to utilize the deprecated CVS repositories, use Mercurial instead. To check out python-nss source code fr...
...And 20 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
lthough it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Draft This page is not complete. << PreviousNext >> This document was authored by Taiga (Gomita) Gomibuchi and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Gomita-san won "Most Useful Upgraded Extension" award in Mozilla's 2006 "Extend Firefox" competition for ScrapBook, and was runner-up in the "Extend Firefox 2" contest for FireGestures. The chapters so far have each focused on technologies in isolation--XUL, JavaScript, CSS, and XPCOM. In this chapter, we'll discuss how to put them together to actually build an extension. An easier method of building a Firefox/Thunderbird Addon for developers who are well-ac...
... do not exist--to create them, right-click, select "New>Boolean", and type in the name and set the value accordingly. Install the DOM Inspector The DOM Inspector is an extension that lets you examine HTML and XUL DOM tree structures, JavaScript objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. Optional - Install Firebug and Chromebug Chromebug is used by the Firebug development team to develop Firebug. You can use it to help debug Firefox extensions as well as to inspect and learn how the Firefox UI (Chrome) is constructed. You can learn more about Chromebug and download it at http://getfirebug.com/wiki/index.php/Chromebug_User_Guide You may also find this exten...
...ebug Chromebug is used by the Firebug development team to develop Firebug. You can use it to help debug Firefox extensions as well as to inspect and learn how the Firefox UI (Chrome) is constructed. You can learn more about Chromebug and download it at http://getfirebug.com/wiki/index.php/Chromebug_User_Guide You may also find this extension to be valuable: Extension Developer https://addons.mozilla.org/firefox/addon/7434 Developing extensions: What you need to know Let's delve into chrome, something you'll need to know about in order to develop extensions. Chrome What is chrome? "Chrome"is the word used to describe all the GUI structural elements that go into an XUL application. For example, in the Firefox browser window, everything other than the web page being displayed in the cont...
...And 19 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
2 &lt;statusbarpanel&gt; Deprecated, XUL, XUL Elements, XUL Reference An individual element of a statusbar. This is a special type of button which is drawn differently. Unlike normal buttons, a statusbarpanel can only have a label or an image but not both. This element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
... key concepts and terms in the XUL development environment. The purpose of this article is not to describe these items in any great detail but to define what they are in simple terms. I selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in XUL and cross-platform development. In contrast to the Mozilla Jargon File, this article describes items of specific interest to the web or content developer looking to establish a context for understanding Mozilla's new technologies -- and in particular Mozilla's XML-based User Interface Language, XUL. 4 Accessibility/XUL Accessibility Reference Accessibility, XUL This table is designed to show how to expose text properly for various XU...
... needs review} 423 Dynamically modifying XUL-based user interface Add-ons, DOM, Extensions, XUL This article discusses manipulating XUL interfaces, using DOM and other APIs. It explains the concept of DOM documents, demonstrates a few simple examples of using DOM calls to perform basic manipulations on a document, and then demonstrates working with anonymous XBL content using Mozilla-specific methods. 424 FileGuide See IO 425 Accessing Files File and Stream Guide: [ nsIScriptableIO | Accessing Files | Getting File Information | Reading from Files | Writing to Files | Moving, Copying and Deleting Files | Uploading and Downloading Files | Working With Directories ] 426 Getting File Information File and Stream Gui...
...And 19 more matches
Index
Found 42 pages: # Page Tags and summary 1 Localization at Mozilla Landing, Localization, Mozilla, Translation, l10n Localization (L10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture. These resources are for anyone with an interest in the technical aspects involved in localization. 2 Application Translation with Mercurial Android, Draft, Editing, Firefox, Lightning, Localization, Mercurial, SeaMonkey, Translate, patch, thunderbird First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from Build Instructions. This is only necessary once. 3 Bootstrapping a new locale Localization, Mercurial, Translate,...
...urial Android, Draft, Editing, Firefox, Lightning, Localization, Mercurial, SeaMonkey, Translate, patch, thunderbird First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from Build Instructions. This is only necessary once. 3 Bootstrapping a new locale Localization, Mercurial, Translate, bit bucket (see also https://developer.mozilla.org/en/Create_a_new_localization) 4 Encodings for localization files Internationalization, Localization When creating a localization for Mozilla products, it's important to be aware of the encoding of the files that you generate. 5 Index Localization Found 42 pages: 6 L10n Checks Internationalization, Localization, Localization:Tools, Tools...
... 7 L10n testing with xcode Firefox for iOS, Localization Once you have your l10n testing environment set up in Xcode, testing your Firefox on iOS localization is a breeze. ...
...And 19 more matches
<blend-mode> - CSS: Cascading Style Sheets
ound-blend-mode and mix-blend-mode properties. Syntax The <blend-mode> data type is defined using a keyword value chosen from the list below. Values normal The final color is the top color, regardless of what the bottom color is. The effect is like two opaque pieces of paper overlapping. <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: normal; } multiply The final color is the result of multiplying the top and bottom colors. A black layer leads to a black final layer, and a white layer leads to no change. The effect is like two images printed on transparent film overlapping. <div id=...
...545/tr.png'); background-blend-mode: normal; } multiply The final color is the result of multiplying the top and bottom colors. A black layer leads to a black final layer, and a white layer leads to no change. The effect is like two images printed on transparent film overlapping. <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: multiply; } screen The final color is the result of inverting the colors, multiplying them, and inverting that value. A black layer leads to no change, and a white layer leads to a white final layer. The effect is like two images shone onto a projection scre...
...ckground-blend-mode: multiply; } screen The final color is the result of inverting the colors, multiplying them, and inverting that value. A black layer leads to no change, and a white layer leads to a white final layer. The effect is like two images shone onto a projection screen. <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; } overlay The final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter. This blend mode is equivalent to hard-light but with the layers swapped. <div id="div"></div> #div { width: 300px; heig...
...And 19 more matches
Preferences - Archive of obsolete content
This article provides examples for extension developers that wish to use the Mozilla preferences system. Information here applies to the Mozilla Suite, Firefox, Thunderbird, and possibly other Mozilla-based applications. For more details on preferences in Mozilla, see Preferences System. If you haven't yet, read other documents about Mozilla preferences on MDN (links below in Resources section). Note: This article doesn't cover all available methods for manipulating preferences; please refer to the XPCOM reference pages listed in Resources section for the complete list of methods. The interfaces dealing with preferences are fairly well documented, so using the methods not mentioned here should be straightforward. ...
...nks below in Resources section). Note: This article doesn't cover all available methods for manipulating preferences; please refer to the XPCOM reference pages listed in Resources section for the complete list of methods. The interfaces dealing with preferences are fairly well documented, so using the methods not mentioned here should be straightforward. XPCOM interfaces for preferences system Mozilla exposes its preferences system through a few XPCOM interfaces. Look in the Resources section below for the link to a list of preferences-related interfaces. Two used interfaces are nsIPrefService and nsIPrefBranch. The preferences service is instantiated in the same way you instantiate any XPCOM service. To get an nsIPrefBranch, either QueryInterface() the pref service (that will give you the r...
...erfaces. Two used interfaces are nsIPrefService and nsIPrefBranch. The preferences service is instantiated in the same way you instantiate any XPCOM service. To get an nsIPrefBranch, either QueryInterface() the pref service (that will give you the root branch) or call nsIPrefService.getBranch() to get a sub-branch. ...
...And 18 more matches
JSS FAQ
Mozilla › Projects › NSS › JSS › JSS FAQ
JSS Frequently Asked Questions Newsgroup: mozilla.dev.tech.crypto Content: What versions of JDK and JCE do you suggest? Does JSS have 64 bit support? Is JSS FIPS Compliant? Is there any sample code and documentation? If I don't call setCipherPolicy, is the DOMESTIC policy used by default? My SSL connection is hanging on Windows? How can I tell which SSL/TLS ciphers JSS supports? How can I debug my SSL connection? Can you explain JSS SSL certificate approval callbacks? Can I have multiple JSS instances reading separate db's? Once JSS initialized, I can't get anymore instances with CertificateFactory.getInstance(X.509)? ...
...When will JSS have JSSE support? What versions of JDK ...
...When will JSS have JSSE support? What versions of JDK and JRE do you suggest? JSS 3.x wo...
...And 18 more matches
XPCOM Interfaces - Archive of obsolete content
<< PreviousNext >> In this section, we'll take a brief look at XPCOM (Cross-platform Component Object Model), which is the Object system that Mozilla uses. Calling Native Objects By using XUL we can build a complex user interface. We can attach scripts which modify the interface and perform tasks. However, there are quite a number of things that cannot be performed directly with JavaScript. For example, if we wanted to create a mail application, we would need to write scripts which would connect to mail servers to retrieve and send mail. JavaScript does not have the capability to do such things. ...
...performed directly with JavaScript. For example, if we wanted to create a mail application, we would need to write scripts which would connect to mail servers to retrieve and send mail. JavaScript does not have the capability to do such things. The only way to handle this would be to write native code that would get mail. We also need to have a way for our scripts to call the native code easily. ...
... need to write scripts which would connect to mail servers to retrieve and send mail. JavaScript does not have the capability to do such things. The only way to handle this would be to write native code that would get mail. We also need to have a way for our scripts to call the native code easily. Mozilla provides such a method which involves using XPCOM (Cross-platform Component Object Model). Mozilla provides many XPCOM components and interfaces. So, in most cases, you don't need to write native code for yourself. After learning this section, you can search suitable interfaces using XULPlanet XPCOM Reference About XPCOM Mozilla is constructed from a collection of components, each of which performs a certain task. For example, there is a component for each menu, button and element. The compo...
...And 17 more matches
Extending a Protocol
hough. Unfortunately, it's not really fully documented anywhere - and the IPDL parser gets easily confused (hence us excluding comments below). Creating the protocol PEcho.ipdl Let's start by saving the following file to ./dom/ipc/PEcho.ipdl. We will explain what all the parts mean below. Note that the file's name and the protocol name must match. include protocol PWindowGlobal; namespace mozilla { namespace dom { async refcounted protocol PEcho { manager PWindowGlobal; parent: async Echo(nsCString data) returns (nsCString aResult); async __delete__(); }; } // namespace dom } // namespace mozilla Now, edit "./dom/ipc/moz.build" file and add 'PEcho.ipdl', to the IPDL_SOURCES array. Remember that it needs to be in alphabetical order or it won't compile. Breaking it down: inclu...
...evel. 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}. ...
...plement 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.h' file not found". That gives us a good place to start. Defining EchoChild.h Create ./dom/ipc/EchoChild.h, and define it as follows - the inline comments describe what's going on: #ifndef mozilla_dom_EchoChild_h #define mozilla_dom_EchoChild_h // We include the protocol, which is automatically generated for us. #include "mozilla/dom/PEchoChild.h" namespace mozilla { namespace dom { // Note that EchoChild extends the protocol implementation. // the protocol implementation will give us the actual // methods for sending messages, as we will soon see. class EchoChild final : public PEchoCh...
...And 17 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
ut using the most apt HTML to invoke Java in a web page as well. The Object Element: W3C Standards and Cross-Browser Issues The object element is part of the HTML 4.01 specification, and is the recommended mechanism to invoke plugins. Its use is subject to a few caveats that this section outlines. Traditionally, the object element has been used differently by Microsoft Internet Explorer and by Mozilla-based browsers such as Netscape 7. In IE, the object element is used to invoke a plugin that is built on the ActiveX architecture. Here's an example of this kind of usage for IE: <!-- IE ONLY CODE --> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myFlash"> ...
...osoft(R) Windows Media Player. Only the Windows Media Player is supported as an ActiveX control in Netscape 7.1. The details are covered in another article. Browsers such as Netscape 7 will not render the Flash plugin if the above kind of markup is used, because Netscape 7 does not support ActiveX or ActiveX-based component invocations, with the exception of Windows Media Player in Netscape 7.1. Mozilla-based browsers support the Netscape Plugin architecture, which is not COM based like ActiveX (and thus, not invoked via a Unique Identifier) but rather, MIME type based. Mozilla-based browsers support the use of the object element along with a MIME type. Here is an example of this usage, once again for the Macromedia Flash plugin: <object type="application/x-shockwave-flash" data="javascript-to-...
...In fact, the above usage will also work for IE, which understands MIME type invocations for certain MIME types such as Flashin addition to ActiveX-style classid invocations. Since th...
...And 16 more matches
Eclipse CDT Manual Setup
not done automatically yet). Some of it like the section on building the index and usage tips are still relevant, and other parts still may provide useful background information to understand it in more detail on how Eclipse works. You can expect it to take an hour or so to work through these instructions if you're doing so for the first time. ...
...If you set up Eclipse as detailed below, you will experience much better results. ...
...e source.) Static analysis involves parsing the source files, so naturally it can only produce good results if it has a sensible set of preprocessor defines, include paths and pre-include files for each source file. Since Eclipse doesn't initially have any of this information, the code assistance that it's able to provide out of the box is pretty broken. For projects the size and complexity of Mozilla, it's impractical to manually configure Eclipse when there is a valid set of defines and includes paths for each of the different parts of the source code. Happily, Eclipse makes manual configuration unnecessary. Like some other IDEs, that are used with projects like Mozilla that have their own build system. Eclipse provides a tool that can collect the options that are passed to the compiler for ...
...And 16 more matches
Localizing without a specialized tool
From the Create a New Localization document, an interested localizer can follow a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (DTD and properties) used in the Mozilla source code. With that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation. ...
... used in the Mozilla source code. With that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation. Repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version. If you choose to localize Mozilla with nothing more than a text editing application and not a specialized tool, this document (along with Create a New Localization) will enable you to learn just what needs to be done. ...
...What we will translate We will translate a small piece of the UI found in the search bar. The search bar is next to the right of the location bar, and by default points to the Google search. ...
...And 16 more matches
Signing an XPI - Archive of obsolete content
Note: These instructions are outdated. For an extension to work in Firefox it must be signed by Mozilla, not by yourself. See Signing and distributing your add-on. Note: These instructions are for how to test with a self-signed certificate. See Signing an extension for a practical guide. Introduction This article describes how to sign your own Firefox extensions with a code-signing certificate on a Windows platform. It was developed from the linux article So you want to sign your XPI package? by MozDev Group's Pete Collins. This article is a mirror of the original, with minor reformatting, some new info and all links updated in March 2010. Get network security services 1. Download the latest Network Security Services (NSS) package from the Mozilla FTP site at https://ftp.mozilla.org...
... Windows platform. It was developed from the linux article So you want to sign your XPI package? by MozDev Group's Pete Collins. This article is a mirror of the original, with minor reformatting, some new info and all links updated in March 2010. Get network security services 1. Download the latest Network Security Services (NSS) package from the Mozilla FTP site at https://ftp.mozilla.org/pub/mozilla.or.../nss/releases/. For Windows, you'll want the nss-3.11.4.zip package in the NSS_3_11_4_RTM/msvc6.0/WINNT5.0_OPT.OBJ/ folder - it is by 2010 the only one with the right binaries. 2. Extract the contents of the archive file to a local folder. In my case it's C:\Apps\nss-3.11.4\ Get Netscape Portable Runtime 1. Download the latest Netscape Portable Runtime from the Mozilla FTP site: http://ft...
...r.../nss/releases/. For Windows, you'll want the nss-3.11.4.zip package in the NSS_3_11_4_RTM/msvc6.0/WINNT5.0_OPT.OBJ/ folder - it is by 2010 the only one with the right binaries. 2. Extract the contents of the archive file to a local folder. In my case it's C:\Apps\nss-3.11.4\ Get Netscape Portable Runtime 1. Download the latest Netscape Portable Runtime from the Mozilla FTP site: http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/. For Windows you'll want the nspr-4.6.zip package in the v4.6/WINNT5.0_OPT.OBJ/ folder. 2. Extract the contents of the archive file to a local folder. In my case it's C:\Apps\nspr-4.6\ Add path Add the NSS tools bin/ and lib/, and the NSPR lib/ directories to the system path. You can either set this permanently via Control Panel->System Properties->Advanced->...
...And 15 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
This document presents the Windows Registry keys plugin installers can parse to determine where to install a given plugin (for Mozilla browsers) on Windows. Since the prospect of embedded Gecko browsers raises the scenario of more than one Gecko-based browser that a Netscape-style plugin can work with, it becomes important to let plugin developers know how to discover these browsers on a Windows machine. This information applies to Mozilla based browsers that pull the Mozilla codebase after the Mozilla 0.9.1 milestone release. None of the Registry keys mentioned here are written by browsers before the Mozilla 0.9.1 timeframe. For example, Netscape 6.0 and 6.01 do not write any of these keys into the Registry, and thus these keys are not available for plugin vendors to parse for these two ...
...eys into the Registry, and thus these keys are not available for plugin vendors to parse for these two browsers. Netscape 6.1 and onwards, however, will write these keys, and so creating a plugin installer that puts the shared object (DLL) in the right place becomes much easier, since the relevant meta-information is present in the Win32 System Registry. These keys are written by the installer of Mozilla browsers -- the Netscape 6.2 installer, for example, writes these keys to the registry, and so does the Mozilla installer (for versions after Mozilla 0.9.1). Other major commercial browsers based 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...
...cko 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), Mozilla 1.0, and CompuServe 7.0 This section details the suggested mechanism to find out where to install the plugin DLL so that it is picked up by Mozilla based browsers on the desktop. Go to HKEY_LOCAL_MACHINE\Software\Mozilla Caveat Emptor: If the Mozilla subkey is not present under HKEY_LOCAL_MACHINE, look under HKEY_CURRENT_USER\Software\Mozilla\. On Windows XP and Windows 2000, in order to wri...
...And 15 more matches
Creating XPI Installer Modules - Archive of obsolete content
Introduction This article is rather old and only applies to Mozilla Suite and SeaMonkey (until it gets converted to Toolkit). Addons for various Toolkit applications, such as Firefox or Thunderbird, should be packaged in a different way. Mozilla has introduced major changes to the way that themes and all the other parts of the UI are packaged. This new packaging scheme is called XPI (pronounced "zippy"), and interacts with XPInstall. A XPI file typically contains the resources to be installed (in this case the barley.jar we want to have installed in the Mozilla/bin/chrome/ directory) and an install script that guides the installation process. Under the chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of JAR files, or Java ar...
...) and an install script that guides the installation process. Under the chrome/ directory, you'll notice that in addition to the package subdirectories, there are now also a handful of JAR files, or Java archives (see figure below). JAR is a file format based on the ZIP file format and is used for aggregating multiple files into a single file. These archives are redundant with the subdirectories: Mozilla now installs both the compressed and uncompressed versions of the UI, though you can change this when you build Mozilla yourself. chrome/ US/ US.jar chatzilla/ chatzilla.jar chrome.rdf chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar ...
...r content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-US/ en-US.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-chrome.txt messenger/ messenger.jar ... In addition to these JAR files, there are also several new RDF files. These new files represent a redesign of the way that the Mozilla UI is packaged and installed. Though the chrome directory still includes subdirectories of uncompressed files by default, a new way to aggregate and distribute the files has improved performance, made the UI components more portable and easier to install, and made the installation process a much easier one. However, this new arrangement does not make things much easier for the web or user interfa...
...And 15 more matches
Install script template - Archive of obsolete content
s an install.js file that does the following -- 1. Installs to the current browser that is invoking the installation 2. Additionally installs to a secondary location on the Windows desktop, in this case C:\WINNT\System32\MyPlugin\ 3. Writes registry keys exposing the above secondary install location for other browsers to find. ...
...he installation 2. Additionally installs to a secondary location on the Windows desktop, in this case C:\WINNT\System32\MyPlugin\ 3. Writes registry keys exposing the above secondary install location for other browsers to find. ...
... other browsers to find. ...
...And 15 more matches
Introduction to XUL - Archive of obsolete content
XUL (pronounced "zool," as if that spelling helped any, and short for "XML User Interface Language") is our name for the language in which these UI descriptions are built. Window chrome is displayed and managed by the same layout engine that manages HTML content in the browser. UI descriptions, then, look a great deal like HTML 4. ...
...name for the language in which these UI descriptions are built. Window chrome is displayed and managed by the same layout engine that manages HTML content in the browser. UI descriptions, then, look a great deal like HTML 4. XUL is an application of XML. In fact, it is just XML with specific meaning defined for a few element types, and into which HTML can be scattered. Terms "XPFE" is the term Mozilla-the-organization is using to describe Mozilla-the-browser's Cross Platform Front End, because X and C look similar if you beat them long and hard with a hammer. The intention is to build cross-platform applications 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...
...ns 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 cross-platfo...
...And 15 more matches
The Joy of XUL - Archive of obsolete content
This guide is designed to introduce application developers and their managers to XUL so they can not only understand why Mozilla's platform is based on it, but how they might adopt it for their own use. XUL (pronounced "zool") is Mozilla's XML-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the Internet. These applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. ...
...disconnected from the Internet. These applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. Web developers already familiar with Dynamic HTML (DHTML) will learn XUL quickly and can start building applications right away. Also described are some reasons application developers might choose to leverage XUL and Mozilla technology for building cross-platform applications. This same investigation will provide sufficient explanation of Mozilla's motivation to build XUL and why the Mozilla platform is constructed using it. The key features and benefits of XUL will be explored followed by an examination of supporting Mozilla technologies. Finally, a mini case study of a Calendar application written in XUL will reinf...
... Key Features and Benefits Powerful widget-based markup language The goal of XUL is to build cross platform applications, in contrast with DHTML which is intended for developing web pages. ...
...And 15 more matches
Getting Started - Archive of obsolete content
Setup Download the latest version of Mozilla, install it (Install the DOM Inspector as well), and select the classic skin. You can use the same version as the one you use to browse the web, but if you mess it up, it is possible that you will be unable to access your browser without uninstalling and reinstalling Mozilla. For this reason we suggest that you install a second copy into a second directory (Make sure that you use a different profile as stated in the release notes) Extract the chrome The chrome is stored in \mozilla\chrome and the individual modules are stored in Jar files. Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. Mozilla currently comes with two skins, Classic and Modern. Looking in the directory y...
...d in Jar files. Jar files are zip files with a different extension. You can open them up in your zip program the same way you open up zip files. Mozilla currently comes with two skins, Classic and Modern. Looking in the directory you'll also notice that there are classic.jar and modern.jar files. For this tutorial we are going to use the Classic skin as a base. Extract classic.jar into \classic (\mozilla\chrome\classic), but make sure to keep the directory structure. Remember if at any point you wish to revert back to the original code again, just extract this jar over top of what you've modified. Now all of the CSS and images are extracted, but if you make some changes and run Mozilla as it is, you will not see them because it's still set to look at the files in the Jar files. To point Mozilla a...
...the directory structure. Remember if at any point you wish to revert back to the original code again, just extract this jar over top of what you've modified. Now all of the CSS and images are extracted, but if you make some changes and run Mozilla as it is, you will not see them because it's still set to look at the files in the Jar files. To point Mozilla at the correct files we need to open up \mozilla\chrome\installed-chrome.txt in a text editor. You should probably make a backup of this file now, just in case you make a mistake. In the file you'll see a list. Do a search for classic.jar</cde>. On every line that references <code>classic.jar we need to make some changes (There are about 5 lines). Delete the bolded text: Original skin,install,url,jar:resource:/chrome/classic.jar!/skin/cla...
...And 14 more matches
Localizing with Mercurial
Localizing current versions of Firefox, Thunderbird and SeaMonkey includes working with Mercurial. If the documentation is incomplete or you have questions, please drop by the #l10n or #hg channels on irc.mozilla.org. The Mercurial FAQ are also worth a read, should you run into trouble. ...
... In Mozilla, we use the the Mercurial version control system (Hg) to manage our source code and localizations. Mercurial allows localizers to work locally (on their machines) and then push (an Hg term) changes to a remote repository, which usually is hosted on the Mozilla servers (hg.mozilla.org). Localizing current versions of Firefox, Thunderbird and SeaMonkey includes working with Mercurial. If the documentation is incomplete or you have questions, please drop by the #l10n or #hg channels on irc.mozilla.org. The Mercurial FAQ are also worth a read, should you run into trouble. For the eager and quick, below you'll find instructions on installing and configuring Mercurial, instructions on receiving an Hg account commit priviledges, as well as a few tasks you can complete without account...
...n. If you see a message about the version of Mercurial (e.g. Mercurial Distributed SCM (version 1.3.1)), you have installed Mercurial successfully! More details For more details on installing Hg on Linux systems, refer to the instructions on Mercurial's Download page. Mercurial on Windows With Windows, you have a couple of install options: For a command line interface, download and install MozillaBuild package. This will not only install Hg, but also all the tools required to build Mozilla products on Windows. Trust us, you'll want this eventually. For a graphical interface, you may want to install TortoiseHg, which integrates with your Windows Explorer shell. It also installs the command line utility. Part of the command line Hg install for Windows involves making sure the hg executabl...
...And 14 more matches
QA phase
After all of your hard work localizing we're sure that you not only want to see your work but you want to make sure it's accurate! If you don't have a lot of experience with code, you might even be concerned that you've broken something (oops!). Now we'll walk you through performing some quality assurance testing on your work to make sure you're on the right track. ...
... Manual & automated builds With the click of a button, some L10n tools (like Narro and Koala) automatically create language pack builds for you. If you're using one of these tools, feel free to skip ahead to the Seeing your work section. ...
...ols, let's walk you through building your own language pack manually. Note: Remember all of those pre-requisite tools we asked you to install in the initial setup? Here's where you'll need almost all of them. If you haven't installed them yet, now is the time to do it. ...
...And 14 more matches
Translation phase
Each group of projects employs a different type of l10n tool for, you guessed it, localizing the projects. The l10n tools are meant to help you maintain your localized content from release to release and leverage already localized materials when localizing new content. ...
...lized materials when localizing new content. Here we'll identify those groups of projects and the l10n tools associated with them. Along the way we'll point you to basic, technical tutorials on localizing for that particular project group. It's up to you and your community to determine which l10n tool will best suit your needs. ...
...ps of projects and the l10n tools associated with them. Along the way we'll point you to basic, technical tutorials on localizing for that particular project group. It's up to you and your community to determine which l10n tool will best suit your needs. As you gain more experience, you may want to localize independent of Mozilla-developed l10n tools, which we'll also discuss here. ...
...And 14 more matches
Color picker tool - CSS: Cascading Style Sheets
-user-select: none; -ms-user-select: none; user-select: none; } .ui-color-picker .picking-area { width: 198px; height: 198px; margin: 5px; border: 1px solid #DDD; position: relative; float: left; display: table; } .ui-color-picker .picking-area:hover { cursor: default; } /* HSV format - Hue-Saturation-Value(Brightness) */ .ui-color-picker .picking-area { background: url('https://mdn.mozillademos.org/files/5707/picker_mask_200.png') center center; background: -moz-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -moz-linear-gradient(left, #FFF 0%, rgba(255, 255, 255, 0) 100%); background: -webkit-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -webkit-linear-gradient(left, #FFF 0%, rgba(255, 255, 255, 0) 100%); background: -ms-linear-gradient(bottom, #000...
...r: 1px solid #FFF; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; border: 1px solid #FFF; float: left; } .ui-color-picker .hue { background: url("https://mdn.mozillademos.org/files/5701/hue.png") center; background: -moz-linear-gradient(left, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%); background: -webkit-linear-gradient(left, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%); background: -ms-linear-gradient(left, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0...
...#0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%); background: -ms-linear-gradient(left, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%); background: -o-linear-gradient(left, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%); } .ui-color-picker .alpha { border: 1px solid #CCC; background: url("https://mdn.mozillademos.org/files/5705/alpha.png"); } .ui-color-picker .alpha-mask { width: 100%; height: 100%; background: url("https://mdn.mozillademos.org/files/6089/alpha_mask.png"); } .ui-color-picker .slider-picker { width: 2px; height: 100%; border: 1px solid #777; background-color: #FFF; position: relative; top: -1px; } /* input HSV and RGB */ .ui-color-picker .info { width: 200px; margin: 5p...
...And 14 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
sies. Porting Instructions You can use different threading packages to implement NSPR threads. NSPR has a user-level threading library where thread context switches are done by <tt>setjmp/longjmp</tt> or <tt>sigsetjmp/siglongjmp</tt>. This is called the local threads only version of classic NSPR. You should attempt to do a local threads only port first. The classic NSPR source files are in <tt>mozilla/nsprpub/pr/src/threads</tt> and <tt>mozilla/nsprpub/pr/src/io</tt>. If the platform has pthreads, you can also use pthreads as an implementation strategy. This is referred to as pthreads NSPR. Pthreads NSPR has relatively orthogonal source code in the thread management, thread synchronization, and I/O area. The pthreads source files are in <tt>mozilla/nsprpub/pr/src/pthreads</tt>. I use the NetBS...
...rategy. This is referred to as pthreads NSPR. Pthreads NSPR has relatively orthogonal source code in the thread management, thread synchronization, and I/O area. The pthreads source files are in <tt>mozilla/nsprpub/pr/src/pthreads</tt>. I use the NetBSD port I recently received as an example to illustrate the mechanical part of the porting process. There are a few new files you need to add: <tt>mozilla/nsprpub/config/NetBSD.mk</tt> The name of this file is the return value of <tt>uname -s</tt> on the platform, plus the file suffix <tt>.mk</tt>. ...
... NetBSD port I recently received as an example to illustrate the mechanical part of the porting process. There are a few new files you need to add: <tt>mozilla/nsprpub/config/NetBSD.mk</tt> The name of this file is the return value of <tt>uname -s</tt> on the platform, plus the file suffix <tt>.mk</tt>. If the return value of <tt>uname -s</tt> is too long or ambiguous, you can modify it in <tt>mozilla/nsprpub/config/arch.mk</tt> (the makefile variable <tt>OS_ARCH</tt>). <tt>mozilla/nsprpub/pr/include/md/_netbsd.cfg</tt> We have a program <tt>mozilla/nsprpub/pr/include/gencfg.c</tt> to help you generate partof this file. ...
...And 13 more matches
The First Install Problem - Archive of obsolete content
Win32 System Registry, like the example application. This document proposes a meta-information model in the Win32 Registry similar to the one used by Microsoft's HKEY_CLASSES_ROOT\CLSID\ where a new ActiveX control (OCX) on the system presents its UUID as a registry key (identifying the ActiveX control) as well as information about where to find the OCX (e.g. under the InprocServer32 subkey). For Mozilla-based browsers, this system would be on a per-module basis, and instead of a UUID, we'll use a URI nomenclature that gives us the desired uniqueness. This URI nomenclature is called a Plugin Identifier (PLID) and is described on a separate page. The following write-up describes how a plugin installer can write keys to the Win32 System Registry to enable Gecko-based browsers to discover the plugin...
...nd instead of a UUID, we'll use a URI nomenclature that gives us the desired uniqueness. This URI nomenclature is called a Plugin Identifier (PLID) and is described on a separate page. The following write-up describes how a plugin installer can write keys to the Win32 System Registry to enable Gecko-based browsers to discover the plugin at runtime. ...
...s. This URI nomenclature is called a Plugin Identifier (PLID) and is described on a separate page. The following write-up describes how a plugin installer can write keys to the Win32 System Registry to enable Gecko-based browsers to discover the plugin at runtime. Write a key under HKEY_LOCAL_MACHINE\Software\MozillaPlugins\ which is a vendor-determined PLID. If the HKEY_LOCAL_MACHINE\Software\MozillaPlugins key doesn't exist, create it, and write the vendor-determined PLID for each module that the vendor wishes to install. Example: A piece of software called MyApplication might create HKEY_LOCAL_MACHINE\Software\MozillaPlugins\@mycompany.com/MyApplication,version=5.0.1/ where the PLID is something the corporation that makes MyApplication (MyCompany Inc.) determines. Note that MyApplication co...
...And 13 more matches
Application Translation with Mercurial
ntact the person responsible for localization from the team's page (see above) so he can notify you by mail when the next strings for translation become available. If it is a red text consisting of a number and the word 'missing', then there are untranslated texts and you can move on with this guide. Required Tools Build pre-requisites First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from Build Instructions. This is only necessary once. MozillaBuild must be installed into an absolute file path without whitespaces, else it will break. File comparison program For the translation, it is recommend to use file comparison program to compare the English file (containing the new texts) with the file of your locale (which is still missing...
...exts to translate. The Firefox extension Scrapbook is used in this guide. Install it into your default Firefox profile (you will have more than one profile when following this guide). ...
...extension Scrapbook is used in this guide. Install it into your default Firefox profile (you will have more than one profile when following this guide). Getting the current Texts in English and your Locale Obtaining the English texts with the source code Get the source code by downloading the following file: Firefox Desktop or Firefox for Android: Download the mozilla-<branch>.hg file (e.g. ...
...And 13 more matches
Release phase
ming an official L10n release. Here, we'll continue to stay true to the original intent of this guide and only present you with the technical information you need to become an official release. We'll primarily focus on getting your release repository setup and the Mercurial commands you'll need to know to use that repository. For more information on the release part of the L10n process, visit the Mozilla wiki here. Your official release repository Now that your locale has been registered, the localization files will live on Mozilla Mercurial server at hg.mozilla.org. Depending on which branch you work on, the URL of your repository might look like this: http://hg.mozilla.org/releases/l10n-central/x-testing If you followed the Koala or plain text approach, you probably already have a local clone ...
...tinction between them. You can pull using both, but you can only push through SSH. Consequently, if you already have a local clone that you pulled using HTTP, you'll need to modify a config file to tell Mercurial to push through SSH. Let's go over configuring your connection protocols. ...
...ll using both, but you can only push through SSH. Consequently, if you already have a local clone that you pulled using HTTP, you'll need to modify a config file to tell Mercurial to push through SSH. Let's go over configuring your connection protocols. Configuration Before you try pushing, you need to tell SSH which username you wish to use for connecting with hg.mozilla.org. ...
...And 13 more matches
Index
ivity Manager interfaces thunderbird This page describes the programmatic interfaces behind the Activity Manager component. The functionality of the component is described on the Activity Manager page, and the Activity Manager examples page has code snippets. See nsIActivityManager.idl and nsIActivity.idl files for source documentation. 7 Address Book Interfaces MailNews, Mozilla, SeaMonkey, thunderbird This page contains a list of the interfaces that you'll will most likely hit when writing patches for the Address Book or writing extensions. The complete list of interfaces for the address book can be found here. Address Book examples show how to perform various tasks and provide code snippets. 8 Address Book examples MailNews, SeaMonkey, thunderbird ...
... Address book sync client design by Richard H. Pizzarro <rhp@netscape.com> 10 Autoconfiguration in Thunderbird Administration, enterprise Author: Ben Bucksch Please do not change this document without consulting the author 11 Autoconfig file format No summary! 12 Autoconfig file format definition Please see https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat. 13 Autoconfig: How to create a configuration file Autoconfiguration, thunderbird Authoritative definition 14 Autoconfiguration in Thunderbird Moved to Autoconfiguration 15 Buddy icons in mail Seth Spitzer Mozilla is now able to show icons in the message header area and the addre...
... If there is a card, but no screenname, the icon will not appear. And finally, if there is no icon, the icon will not appear. The reason this file name scheme was chosen was is this is how Netscape 7.0 IM stores buddy icons on disk. So if you use NIM, and you use buddy icons, this will just work for free. Notes: 16 Cached compose window FAQ Seth Spitzer (sspitzer@mozilla.org) What is the "cached" compose window? Instead of destroying the mail compose window on send (or close) just to create a new one the next time, Mozilla Mail will "cache" the compose window on send (or close), and use that instead. The downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing. The upside is that is has been a major performanc...
...And 13 more matches
Proxy Auto-Configuration (PAC) file - HTTP
are down, and there was no DIRECT option specified, the browser will ask if proxies should be temporarily ignored, and direct connections attempted. After 20 minutes, the browser will ask if proxies should be retried, asking again after an additional 40 minutes. Queries will continue, always adding 20 minutes to the elapsed time between queries. Examples PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081 Primary proxy is w3proxy:8080; if that goes down start using mozilla:8081 until the primary proxy comes up again. PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081; DIRECT Same as above, but if both proxies go down, automatically start making direct connections. (In the first example above, Netscape will ask user confirmation about making direct connections; in...
...ility alert() There was one associative array (object) already defined, because at the time JavaScript code was unable to define it by itself: ProxyConfig.bindings Note: pactester (part of the pacparser package) was used to test the following syntax examples. ...
...ociative array (object) already defined, because at the time JavaScript code was unable to define it by itself: ProxyConfig.bindings Note: pactester (part of the pacparser package) was used to test the following syntax examples. ...
...And 13 more matches
Miscellaneous - Archive of obsolete content
Example for Firefox: Services.startup.quit(Services.startup.eForceQuit|Services.startup.eRestart); Mouse and keyboard Detecting mouse wheel events When scrolling the mous...
... Example for Firefox: Services.startup.quit(Services.startup.eForceQuit|Services.startup.eRestart); Mouse and keyboard Detecting mouse wheel events When scrolling the mouse wheel on an element, the DOMMouseScroll event fires. event.detail contains the numbe...
... Example for Firefox: Services.startup.quit(Services.startup.eForceQuit|Services.startup.eRestart); Mouse and keyboard Detecting mouse wheel events When scrolling the mouse wheel on an element, the DOMMouseScroll event fires. event.detail contains the number of lines t...
...And 12 more matches
Source code directories overview - Archive of obsolete content
This document is a guide for developers to the directory structure of the Mozilla source code tree. It gives a bird's eye view of the source code so a developer can get a good idea what is in Mozilla and where to find things. It is a good document 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 p...
...ng Yellow Box (Cocoa). beos contains source code for BeOS. qt contains source code for the QT toolkit, a C class library which runs on X-Windows on Unix, Windows 95, Windows 98 and Window NT 4.0. photon contains source code for Photon, a microkernel windowing system used in several real-time operating systems from QNX Software Systems Ltd. SeaMonkey SeaMonkey is the development name for the Mozilla browser suite. accessible contains code to support Microsoft Active Accessibility and Sun's ATK accessibility API for Linux. browser contains the code for Firefox. This will be covered below. build contains scripts (usually Perl) and programs used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of ...
... Active Accessibility and Sun's ATK accessibility API for Linux. browser contains the code for Firefox. This will be covered below. build contains scripts (usually Perl) and programs used by the Mozilla build team for building and managing the Mozilla code base. These programs coordinate the running of makefiles and the creation of the dist directory. calendar contains the code for the various Mozilla calendar apps and extensions. caps contains C interfaces and code for determining the capabilities of content based on the security settings and certificates (e.g. Verisign). chrome contains the toolkit chrome registry. config contains scripts and programs used by Mozilla developers to manipulate the code base and to perform special actions inside makefiles. These programs are used for code le...
...And 12 more matches
Frequently Asked Questions - Archive of obsolete content
Note: This page is extremely out of date. What is the status of the SVG implementation? We currently maintain two documents to help answer this question: a status page for SVG in Firefox 1.5+ and a status page for SVG in the development trunk. Why does Mozilla show source code/gibberish instead of SVG? There are two possible reasons for this: a simple mistake in the SVG file, or a misconfigured server. If there's a grey area at the top of the source with the text "This XML file does not appear to have any style information associated with it" then the problem is with the SVG file. To be valid the root <svg> tag in SVG files must have at least the following two "namespace bindings". <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> Actually the sec...
...ongly recommend you include it. For more information see this link. If source code is displayed without a gray area at the top, or if you just see gibberish, then the problem is server misconfiguration. When servers send user agents an SVG file they must tell the user agent that the file has the MIME type "image/svg+xml", and if the SVG file is stored gzipped they must tell the browser that too. ...
...em is server misconfiguration. When servers send user agents an SVG file they must tell the user agent that the file has the MIME type "image/svg+xml", and if the SVG file is stored gzipped they must tell the browser that too. Mozilla is strict about this, and no, it's not a bug. Failing to respect the MIME types servers send is incorrect and has been a source of security holes in other browsers. Mozilla will not be changing this behaviour. For more information on server configuration for SVG see this link. Why does Mozilla show an "XML Parsing Error" message instead of SVG? This is an XML debugging message to help XML authors correct errors in their XML documents. Mozilla will show this message when there's an XML well formedness error in the file it tried to load. (It doesn't mean there's an ...
...And 12 more matches
Table Layout Regression Tests - Archive of obsolete content
n rather than causing Bugzilla avalanches. Prerequisites In order to run these tests, you will need to have: Make sure that your build is a debug build (in short you need ac_add_options --enable-debug in your .mozconfig file). to build the layoutdebugger itself, build either all extensions or include layoutdebug in your .mozconfig file. For example ac_add_options --enable-extensions=all. a Mozilla tree with the test files at %MOZ_SRC%/layout/html/tests, DISABLE_TESTS should not be defined (so ac_add_options --enable-tests), patience and time. Test Runs Go to the %MOZ_SRC%/layout/html/tests/block directory. Avoid the nasty assertions to pop up by set XPCOM_DEBUG_BREAK=warn, the world would be a much better place if we could first fix those assertions. As you will probably run your n...
...with the test files at %MOZ_SRC%/layout/html/tests, DISABLE_TESTS should not be defined (so ac_add_options --enable-tests), patience and time. Test Runs Go to the %MOZ_SRC%/layout/html/tests/block directory. Avoid the nasty assertions to pop up by set XPCOM_DEBUG_BREAK=warn, the world would be a much better place if we could first fix those assertions. As you will probably run your normal Mozilla in parallel with the testing issue then: set MOZ_NO_REMOTE=1 at the command prompt. Start the layout debugger via mozilla -layoutdebug - P foo where foo is just another profile than your main profile. Select from the Regression-Test Menu the Add New List...entry. Select %MOZ_SRC%/layout/html/tests/block/rtest.lst. Execute the baseline test Shutdown the layoutdebugger Execute mozilla -layout...
...tests/block/rtest.lst. Execute the baseline test Shutdown the layoutdebugger Execute mozilla -layoutdebug - P foo >selftest.txt Execute the verify test Make a note which tests have failed grep 'failed' selftest.txt (these are false positives, quite frequently they indicate reflow problems, pages showing differently when loaded from cache) Make your changes to the source, recompile. ...
...And 12 more matches
Manifest Files - Archive of obsolete content
<< PreviousNext >> In this section, we'll see how to put chrome and XUL files into a package and create the manifest files for them. Packages A package is a set of XUL files and scripts that define the functionality of a user interface. Packages may be installed into Mozilla and referenced with chrome URLs. A package can contain any kinds of files and may be split into subdirectories for different parts of the package. A package can be stored either as a directory or as a JAR archive. Manifest files A manifest file describes a package and maps its location on disk to a chrome URL. The manifest files in the chrome directory will be examined when a Mozilla application starts up to see what packages are installed. That means that all you need to do to install a new package is add a ...
...le for. For example: skin browser classic/1.0 jar:classic.jar!/skin/classic/browser/ locale browser en-US jar:en-US.jar!/locale/browser/ For these, the extra field has been added to indicate that the skin and locale applies to the browser. The skin name is 'classic/1.0'. In this case, a version number is being used as part of the theme name, but that is optional if you are making your own theme. Mozilla doesn't handle the version number in a special way; the version number is just part of the theme name. The locale is 'en-US'. The chrome URLs that these would map to would be chrome://browser/skin and chrome://browser/locale. If you were creating your own theme or locale for the browser, all you need to do is create a manifest file with one of these two lines in it, modified to suit your theme or...
...ill need to create an install file install.rdf which describes what will be installed, the author of the extension and which versions of the browser or other applications it is compatible with. A specific directory structure is needed as well since extensions are limited in where the files may be installed to. An extension is packaged up into an XPI file. XPI is short for XPInstall and is used by Mozilla to install components. Like a JAR file, an XPI file is just a ZIP file with a different extension, so you can create and view XPI files with a ZIP utility. Firefox's extension manager handles installing extensions packaged into XPI files automatically. It is recommended to upload extensions to the Mozilla Add-ons site, where users can locate them for installation. While they may be installed from...
...And 12 more matches
XUL Structure - Archive of obsolete content
<< PreviousNext >> We'll begin by looking at how the XUL is handled in Mozilla. How XUL is Handled In Mozilla, XUL is handled in much the same way as HTML or other types of content are handled. When you type the URL of an HTML page into the browser's address field, the browser locates the web site and downloads the content. The Mozilla rendering engine takes the content in the form of HTML source and transforms it into a document tree. The tree is then converted into a set of objects that can be displayed on the screen. Style sheets (CSS), images, and other technologies are used to control the presentation. XUL functions in much the same way. In fact, in Mozilla, all document types, whether they are HTML or XUL, or even SVG, are all handled by the same underlying code. This mea...
...UL and HTML are handled in the same way, you can load both from either your local file system, from a web page, or from an extension or standalone XULRunner application. Content from remote sources (e.g. http://localhost/~username/ ), regardless of whether they are HTML or XUL or another document type, are limited in the type of operations they can perform, for security reasons. For this reason, Mozilla provides a method of installing content locally and registering the installed files as part of its chrome system. This allows a special URL form, called a chrome:// URL, to be used. By accessing a file using a chrome URL, the files receive elevated privileges to access local files, access preferences and bookmarks and perform other privileged operations. Obviously, web pages do not get these priv...
...a the chrome URL, if you know what it is. Standalone XUL applications may include XUL code in a similar way, but, of course, the XUL for the application will be included as part of the installation, instead of having to be installed separately as an extension. However, this XUL code will be registered in the chrome system such that the application can display the UI. It is worth noting that the Mozilla browser itself is actually just a set of packages containing XUL files, JavaScript and style sheets. These files are accessed via a chrome URL and have enhanced privileges and work just like any other package. Of course, the browser is much larger and more sophisticated than most extensions. Firefox and Thunderbird, as well as number of other components are all written in XUL and are all accessib...
...And 12 more matches
Obsolete Build Caveats and Tips
Therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. Each piece of information should mention the page and the section it originally came from. You can copy in the original text and bold out what has been removed. ...
...Therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. Each piece of information should mention the page and the section it originally came from. You can copy in the original text and bold out what has been removed. ...
...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. ...
...And 12 more matches
SVN for Localizers
It's a handy tool that allows us to grab, change, and store versions of source files in one location. ...
...It's a handy tool that allows us to grab, change, and store versions of source files in one location. ...
...It's a handy tool that allows us to grab, change, and store versions of source files in one location. ...
...And 12 more matches
Setting up the Gecko SDK
t 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). ...
...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). ...
...ions 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 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. ...
...And 12 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
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. ...
... 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 input software, want to track what's happening inside Mozilla. They need to know about focus changes and other events, and it needs to know what objects are contained in the current document or dialog box. Using this information, a screen reader will speak out loud important changes to the document or UI, and allow the user to track where they navigate. The screen reader user can navigate the web page using screen reader commands or browser commands, and th...
...on't use MSAA if you're not going to take it all the way via testing with assistive technologies and working with AT vendors. Don't use MSAA for exposing documents or other specialized data, if it's important that the user get access to formatting information. You will have to expose interfaces that contain more info than MSAA does. This information may be in the form of extensions to MSAA, like Mozilla has done with ISimpleDOMNode (you can QI to it from IAccessible). This is likely to be a painful road even if you are a major player, in terms of getting the cooperation of AT vendors. It may be a good enough solution; however, if what you need is JAWS, Dragon and ZoomText support. ZoomText and Dragon can get by with your MSAA support., and JAWS can be scripted (even by external developers) to su...
...And 12 more matches
File I/O - Archive of obsolete content
Note: File objects are nsIFile. For legacy reasons, there is also an nsILocalFile interface. ...
...input/output in chrome JavaScript. You access the file system using Mozilla XPCOM components. Note: File objects are nsIFile. For legacy reasons, there is also an nsILocalFile interface. Creating an nsIFile object Components.utils.import("resource://gre/modules/FileUtils.jsm"); var file = new FileUtils.File("/home"); Or the same without using FileUtils.jsm: var file = Components.classes["@mozilla.org/file/local;1"]. createInstance(Components.interfaces.nsILocalFile); file.initWithPath("/home"); Note: The path should be in the "native" form (for example"C:\\Windows"). If you need to use file:// URIs as initializers, see discussion of nsIIOService below. Note: You can still get a file object even if the specified file does not exist, and no exception will be thrown. An except...
...s that require the file to exist are called, e.g., isDirectory(), moveTo(), and so on. Getting files in special directories Components.utils.import("resource://gre/modules/FileUtils.jsm"); // get the "data.txt" file in the profile directory var file = FileUtils.getFile("ProfD", ["data.txt"]); Or the same without using FileUtils.jsm: // Get profile directory. var file = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("ProfD", Components.interfaces.nsIFile); // Or using Services.jsm and Ci = Components.interfaces var file = Services.dirsvc.get("ProfD", Ci.nsIFile); // Append the file name. file.append("data.txt"); // Note: "file" is an object that implements nsIFile. If you want the // file system path,...
...And 11 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
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 installing add-ons. Simply create the boolean preference extensions.checkCompatibil...
...e add-ons that are disabled for being incompatible to become enabled and add-ons that would normally not install to be installed. Update RDF Format If you host your add-on's updateURL yourself then you will need to return the add-on version information in an RDF format. Below is an example update manifest. It lists information about 2 different versions of the extension with id foobar@developer.mozilla.org. The versions included are 2.2 and 2.5, both of which specify compatibility with Firefox versions 1.5 to 2.0.0.*. For version 2.2 an https update link is used while version 2.5 has a regular http link with 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 ...
...h specify compatibility with Firefox versions 1.5 to 2.0.0.*. For version 2.2 an https update link is used while version 2.5 has a regular http link with 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 ver...
...And 11 more matches
Creating a Microsummary - Archive of obsolete content
he href attribute. If the URL points to a generator, it uses the generator to generate the microsummary for the page. Otherwise, if the URL returns plain text content (or HTML content that can be converted to plain text), Firefox uses the content as the microsummary for the page. ...
...s the content as the microsummary for the page. Beginnings Generators are expressed as XML documents whose root element is the <generator> element in the http://www.mozilla.org/microsummaries/0.1 namespace. To begin building the generator, create a new empty text file and add an XML declaration and empty <generator> tag to it: <?xml version="1.0" encoding="UTF-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1"> </generator> Giving it a Name Generators should have name attributes which are arbitrary descriptions of the microsummaries the generator creates. Names should be descriptive enough to give users a good idea what information the microsummaries will provide. Since our generator will be creating microsummaries displaying the Firefox download count, let's give it the name...
...s which are arbitrary descriptions of the microsummaries the generator creates. Names should be descriptive enough to give users a good idea what information the microsummaries will provide. Since our generator will be creating microsummaries displaying the Firefox download count, let's give it the name "Firefox Download Count": <?xml version="1.0" encoding="UTF-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="Firefox Download Count"> </generator> Adding an XSLT Transform Sheet Generators must include an XSLT transform sheet (also known as an XSLT stylesheet) which transforms the page content into its microsummary. XSLT is a powerful language for transforming documents into different representations of the same information. Add the XSLT transform sheet to th...
...And 11 more matches
Eclipse CDT
Introduction Eclipse CDT (C/C++ Development Tools) is an open-source IDE for C and C++ development with advanced code assistance (inheritance/call graph explorer, jump to definition, refactoring, autocomplete, syntax highlighting, and so on). ...
...Using this plugin will result in parts of the UI described below being hidden or disabled. ...
...ce features (easily 4 GB of RAM, although this will drop to just over 1 GB if you restart after indexing is complete). Therefore, it is not recommended for use if your machine only has 4 GB of RAM. Installing Eclipse Regarding llvm4eclipsecdt, do not install or select this toolchain for Mozilla development. This plugin is intended mainly for managed projects but we use an unmanaged project for Mozilla (since it has its own build system). Using this plugin will result in parts of the UI described below being hidden or disabled. Download "Eclipse IDE for C/C++ Developers" (not Eclipse IDE for Enterprise Java Developers) from the Eclipse download page, install it, and add the directory containing the eclipse binary to your PATH (/Applications/Eclipse.app/Contents/Eclipse/ on Mac). (While packa...
...And 11 more matches
Getting SpiderMonkey source code
You can get the SpiderMonkey source code in gzipped form or directly from the Mercurial repository. Downloading gzipped SpiderMonkey source code You can download gzipped SpiderMonkey source code from the following URLs: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ Here is a command-line example of downloading and unzipping SpiderMonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 These commands should work on most platforms 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.mozil...
...ersion 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 These commands should work on most platforms 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). ...
...This fetches a snapshot of the current Mozilla tree. If you have problems with the instructions above, you can read the full details of using Mercurial to get Mozilla code here. ...
...And 11 more matches
Accessing the Windows Registry Using XPCOM
The examples in this document are all written in JavaScript using XPCOM. ...
...provides extensive registry functionality. The interface follows the Windows API fairly closely, but with many of the low-level details taken care of for you. If you are writing an extension that only needs to support Firefox 1.5 or newer, then you only need to read this section. A simple example Here's a simple example showing how to read your Windows ProductId: var wrk = Components.classes["@mozilla.org/windows-registry-key;1"] .createInstance(Components.interfaces.nsIWindowsRegKey); wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", wrk.ACCESS_READ); var id = wrk.readStringValue("ProductId"); wrk.close(); This example, while simple, shows several important things about using the interface. First, you must use createIn...
... for all operations In addition to open() and create(), there are the openChild() and createChild() methods. You can call these methods on an already-opened registry key to open a child key. Both methods take a relative path and access mode as parameters and return a new object implementing nsIWindowsRegKey. ...
...And 11 more matches
Static Analysis for Windows Code under Linux - Archive of obsolete content
We highly recommend you to read the cross compiling manual and the Dehydra build manual before you start the following reading. Build GCC Corss-compiler with Plugin Support By default GCC does not support plugins. Dehydra requires patching GCC such that it can load plugins as shared libraries: # Prepare a directory mkdir $HOME/dehydra cd $HOME/dehydra #Obtain GCC 4.3 sources wget ftp://mirrors.kernel.org/gnu/gcc/gcc...-4.3.0.tar.bz2 tar jxvf gcc-4.3.0.tar.bz2 # Get the patches which enable plugins cd gcc-4.3.0/ # Create an hg repository. ...
...CC such that it can load plugins as shared libraries: # Prepare a directory mkdir $HOME/dehydra cd $HOME/dehydra #Obtain GCC 4.3 sources wget ftp://mirrors.kernel.org/gnu/gcc/gcc...-4.3.0.tar.bz2 tar jxvf gcc-4.3.0.tar.bz2 # Get the patches which enable plugins cd gcc-4.3.0/ # Create an hg repository. This makes it easy to apply patches, they can be applied manually hg init . hg clone http://hg.mozilla.org/users/tglek_mo...-moz-plugin-mq .hg/patches # Apply gty.diff and plugin.diff # If you have mq setup, do hg qpush -a (for file in `cat .hg/patches/series`; do cat .hg/patches/$file; done) |patch -p1 cd .. Now, the Gcc source with plugin supports is ready, we should now build a cross compiler from this source. And the instructions are exactly the same with the one here. Follow that instructio...
...produce the correct shared library. So, we should make a Linux native compiler with plugin support to make Treehydra! This sound crazy, but it may be the only right way to do this. Just follow this and this to compile both Dehydra and Treehydra shared libraries. And these libraries can be used directly with our cross compiler. ...
...And 10 more matches
Using nsIXULAppInfo - Archive of obsolete content
The following sections provide a few examples of using nsIXULAppInfo from JavaScript. ...
...The following sections provide a few examples of using nsIXULAppInfo from JavaScript. ...
...The following sections provide a few examples of using nsIXULAppInfo from JavaScript. ...
...And 10 more matches
Client-Server Overview - Learn web development
this level of detail, but at least now you know where this all came from! The request Each line of the request contains information about it. ...
...n about it. ...
...hat an HTML head contains useful information about an HTML document (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=6ynxs23n521lu21b1t136rhbv7...
...And 10 more matches
Gecko info for Windows accessibility vendors
ges 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 accessibility aids can track what's going on inside the user interface of any software package t...
...e 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. XUL: eXtensible User-interface Language The XML-based language used by Firefox and Mozilla to develop the UI. Similar to HTML in that it can be combined with CSS and Javascript to make powerful applications. Contains more desktop-style widgets than HTML and follows a box layout model, rather than being text-flow based. AJAX: Asynchronous JavaScript And XML AJAX is a method of building interactive web applications that process user requests, user actions immediatel...
...s (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. Windows Applications Based on the Gecko Layout Engine Gecko is a rendering engine that Mozilla, Netscape and other new browsers 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. Gecko is the core architecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it. Embedde...
...And 10 more matches
Roll your own browser: An embedding how-to
e that isn't totally obvious, nonetheless it has to be done. Here is that effort. I have created a directory under embedding called config. Contained within this directory are a couple of makefiles: basebrowser-unix basebrowser-win The XPInstall packager follows the same format. However in our case, we only have one named XPI package. After the build is done, you can change directory into mozilla/embedding/config, and do a make. This will produce a directory in DIST named Embed. It should include all of the base support that you need to get a web browser started up. Included is the sample test application (gtkEmbed or winEmbed). What initializations do I have to do? Somewhere during the start of your application, you must initialize XPCOM. You will also want to shut this down when you ...
...(gtkEmbed or winEmbed). What initializations do I have to do? Somewhere during the start of your application, you must initialize XPCOM. You will also want to shut this down when you quit. Other initialization must be done to start up event queues and load some string bundles. All of this is somewhat generic and has been isolated into a static library that you can simply call on. If you build mozilla/embedding/base/, a static library (on windows) called baseembed_s.lib is built. Just link this library to your application. There 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, oth...
...ib is built. Just link this library to your application. There 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 environ...
...And 10 more matches
Building the WebLock UI
<< PreviousNext >> Up until now, we've been building a component that can be installed in any Gecko application. The XPCOM interfaces and tools you've used have been general, cross-platform, and available in the Gecko Runtime Environment or in any Gecko-based application after Mozilla 1.2 (when the GRE began to be used). In this chapter, however, we are going to be building a user interface for the WebLock component that's meant to be added to the existing Mozilla browser[other-mozlike-browsers]. It uses XUL, which is an XML language that Gecko knows how to render as user interface, but it also interacts with particular parts of the Mozilla user interface, where it must install itself as an extension to the UI. Specifically, the user interface we create in this chapter will be ov...
...or both of the XUL files. weblock.js provides JavaScript functions for both of the XUL files. Each of these files is described briefly in the sections below. In the following chapter we'll describe how you can take these files and create a package, an installable archive that includes the WebLock component and the new UI. ...
...and the new UI. Because this step (particularly the overlay section) is so dependent on Mozilla, the chapter is divided up into a couple of different sections. The second section, XUL, describes the XML-based User Interface Language (XUL) and how you can use it to create a dialog that provides access to the WebLock component and its services. The third section, Overlaying New User Interface Into Mozilla, describes how to create an overlay into the browser that will make this dialog accessible from a Mozilla build. The overlay section, where we discuss how to import scripts, images, and other resources from Mozilla into your own UI, is by far the more complicated of the two. ...
...And 10 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
or the Firefox Developers Conference Summer 2007. Shimoda-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008). Before you learn how to develop extensions, let's learn about XUL, the XML-based User-interface Language, which is one of the building blocks for extensions. Introduction An overview of XUL XUL is an XML-based language, and was developed to be the GUI markup language for the Mozilla browser. There are earlier experiments going back a long way in developing user interfaces using a combination of HTML and scripting languages, and XUL could be considered an evolutionary step from that. Similar approaches are found in XAML, which is used in Windows Vista, and Flex, which is used in Adobe Flash. Like web pages, which display the same regardless of platform, applications marked up...
...anguages with formal specifications that have been standardized by bodies like the W3C, XUL currently does not have an explicit specification. Note: Although there is a specification document, its markup is based on implementations and markup as of 2001, and current XUL differs from it in many aspects. ...
...nd the XUL page in the Mozilla wiki. For each element that I explain in this chapter, I will illustrate it with a source code example. You can type these examples up and open them in Firefox to see how they behave and appear. You can download a file with all the source code examples from: FIXME: Attache the translated tarball - Paul Task !. 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. ...
...And 9 more matches
Tamarin build documentation - Archive of obsolete content
on ARM Windows Mobile 6.5 MIPS (Linux) SH4 (Linux) Getting the Tamarin source The Tamarin source resides in Mercurial at Tamarin Central. Active development source resides at Tamarin Redux. In this document replace instances of tamarin-central with tamarin-redux to operate in the redux repository. Use the following command to create a copy of the Tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-central tamarin-central Tips for working with Mercurial can be found here. Building Tamarin Building Tamarin will create all the libraries for the AVMPlus and garbage collector (MMgc), and create a standalone executable (shell) for executing files in the ABC file format. Running the shell without any arguments will list the available options. Note that additional command-line argu...
...Tamarin will create all the libraries for the AVMPlus and garbage collector (MMgc), and create a standalone executable (shell) for executing files in the ABC file format. Running the shell without any arguments will list the available options. Note that additional command-line arguments are only available in the debug configuration. The Tamarin codebase contains a cross-platform build system for Mozilla developers. The cross-platform build system is used for daily automated build testing so it is the most reliable system. The Tamarin codebase has the ability to build additional code which supports debugging hooks. In the XCode project, this is the Debug_Debugger and Release_Debugger configurations. The Flash Player builds Tamarin with the debugging hooks off for codesize reasons, but the Mozill...
...ebugging hooks off for codesize reasons, but the Mozilla client will build Tamarin with the debugging hooks on. Cross-platform build (general instructions - non-android) Prerequisites: You need Python 2.5 or later and GNU make 3.81 or later. (GNU make 3.80 does not work. Nor does any other brand of make.) With the right prerequisites, use these commands to build Tamarin: $ hg clone http://hg.mozilla.org/tamarin-redux/ $ cd tamarin-redux $ mkdir objdir-release $ cd objdir-release $ python ../configure.py $ make ... $ shell/avmshell shell 1.0 build cyclone ... The AVMPlus executable is avmshell. Optional Flags: --enable-debugger - Debugger build --enable-debug - Debug build For verbose build of Tamarin, you can pass CPPFLAGS to make. $ make CPPFLAGS=-DAVMPLUS_VERBOSE Addi...
...And 9 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
ity of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. XPInstall is a JavaScript-based installer technology that works across all the platforms that Mozilla and Netscape browsers based on Mozilla (such as Netscape 7) are deployed. It can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on Windows) or obliging the user to restart their browser. For plugin vendors who have already written a native code (e.g. EXE) ...
... (create a ZIP archive) and then renaming it with the XPI file extension instead of the ZIP file extension. Unlike native code installers (for example, files called setup.exe), the programming language for install operations in XPI is JavaScript. ...
...les called setup.exe), the programming language for install operations in XPI is JavaScript. Since the file format that contains the software and the install.js JavaScript file is a cross-platform file (Zip) and since JavaScript is understood by Mozilla browsers on all platforms, often one single XPI package can be deployed on all platforms. This is, in fact, how skins and themes are installed to Mozilla 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 Ge...
...And 9 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
. SeaMonkey 2 is being reworked to support the same process as Firefox, Thunderbird and others. This tutorial adds a customizable button to all SeaMonkey's toolbars. It adds a menu choice to ChatZilla's menu bar (because ChatZilla has no toolbar). Note: For a similar tutorial that applies to SeaMonkey 2, Firefox, Thunderbird and Sunbird, see: Custom Toolbar Button Earlier versions and other Mozilla applications also support extensions, but some parts of this tutorial are not appropriate for them. Required tools You will need two tools. Your operating system normally provides them: A way to create and work with files and directories A text editor for plain text files Character encoding Some text editors have a setting for character encoding. If your language uses only plain Latin (ASC...
... For information about how to find the directory where you installed SeaMonkey, see: Installation directory If you cannot easily find the directory, you can use the following method to find it. From SeaMonkey's menu bar, choose Tools - Web Development - JavaScript Console. Copy the following code. It is one very long line ending in path--make sure that you get all of it: Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("AChrom", Components.interfaces.nsIFile).path In the JavaScript Console window, paste the code in the field near the top. Presss the Return or Enter key, or the Evaluate button. The console displays the location of SeaMonkey's chrome directory. Explanation: The chrome directory contains program files that are...
...ur extension, and the directory will contain all your extension's files. 5. Create a plain text file named contents.rdf. Copy the following content, making sure that you scroll to get all of it. ...
...And 9 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
oblems 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. For more specific Gecko recommendations, please see the Gecko Compatibility Handbook Gecko Although many web developers are aware of Firefox, Mozilla, and Netscape browsers, far fewer are aware that these browsers are members of an entire family of user agents based upon the Gecko layout engine which includes the commercial browser CompuServe 7, and open source browsers such as Epiphany, Galeon, Camino, Kmeleon, and SeaMonkey. Gecko was designed from the ground up to be compliant with the W3C HTML, W3C CSS, W3C XML, W3C DOM, and ECMAScript (J...
...approach at this time was to distinguish user agents by vendor and version using the reported user agent string. Although this approach was considered reasonable at the time, this approach caused problems for browser vendors right from the beginning. The original Netscape browsers used a user agent string which began with the code name for the Netscape browser followed by its version number, e.g. ...
...er agent string which began with the code name for the Netscape browser followed by its version number, e.g. Mozilla/version followed by a comment token which gave additional information regarding the operating system being used, etc. Since the earliest browser detection techniques were based upon looking for a Netscape based browser and only provided customized content to browsers which used the Mozilla/version user agent string, other browser vendors standardized on using Mozilla/version to signal that they were compatible with a particular Netscape version. Since other browsers pretended to be Netscape browsers and encoded their version information in a non-standard fashion in the user agent comment area, the task of determining which browser was being used became more complicated than it shou...
...And 9 more matches
XForms Custom Controls - Archive of obsolete content
be able to get a good start. To really grasp the following information, a good understanding of XForms, XBL, JavaScript and CSS is needed. XPCOM knowledge will certainly not hurt. But even if you are only comfortable with a couple of these technologies, we hope that the possibilities outlined below will inspire you to learn more where you need to. Implementation Status The framework we use in the Mozilla XForms processor is very much a "work in progress". Please keep in mind that just about everything we mention here may change to some degree as we continue to work on it. Work has just started in the W3C XForms Working Group to investigate the custom control issue, so eventually (hopefully?) there will be an "official" and common way to customize your form's user interface across all XForms proce...
...ted in the W3C XForms Working Group to investigate the custom control issue, so eventually (hopefully?) there will be an "official" and common way to customize your form's user interface across all XForms processors. Why Do You Need This You will probably find that your need for customization will fall into one of the following categories: custom presentation - XForms controls as rendered by the Mozilla XForms processor do not provide the right look and feel for you. custom data types - existing XForms controls are not able to work properly with your data type advanced XForms controls - you need your controls to be able to do more things than traditional XForms controls can do new host language - you'd like to support XForms in host languages other than XHTML or XUL Custom Presentation The Mozi...
...ms control's presentation has its own XBL binding. In many cases different values provided for the appearance or mediatype attributes will determine which XBL binding will be used for a particular XForms control on the form. As mentioned in the spec, the appearance attribute can be used to influence the look and feel of a control even when all other conditions remain constant. For example, in the Mozilla XForms extension we will render a combobox widget when appearance='minimal' on a select1 control. Should the form author instead choose to use appearance='compact' on this control, we would render a listbox widget. Here is a snippet from our .css file to show the type of CSS rule we would use to make such a determination. xf|select1[appearance="compact"] { -moz-binding: url('chrome://xforms/con...
...And 9 more matches
Gecko FAQ - Gecko Redirect 1
Gecko is continuously under development at mozilla.org. Gecko has been known previously by the code names "Raptor" and "NGLayout"; the new name was chosen following a trademark infringement dispute. For more information see the Wikipedia article on Gecko. ...
...Gecko has been known previously by the code names "Raptor" and "NGLayout"; the new name was chosen following a trademark infringement dispute. ...
... XUL. How is a layout engine like Gecko different from a Web browser? Gecko provides the foundation needed to display content on the screen, including a layout engine and a complementary set of browser components. However, Gecko does not package all of these components alongside other interface modules in a coherent, user-friendly application (including menus, toolbars, etc.), such as Firefox. mozilla.org assembles the necessary components into its applications, such as Firefox, Thunderbird, SeaMonkey, which are available for free download from mozilla.org. Netscape released its own version of the browser branded as Netscape Navigator. Other companies release their own software and hardware products that use Gecko. See XULRunner Hall of Fame for a partial list of application that use Gecko via...
...And 9 more matches
Debugging on Mac OS X
For specific information on a way to debug hangs, see Debugging a hang on OS X. Creating a debuggable build First, you need to build the application you're going to debug using --disable-optimize--enable-debug-symbols in your .mozconfig (also add --enable-debug if you want assertions etc. compiled in). See Building Firefox for macOS if you need help creating your own build. Debugging Firefox on macOS 10.14+ macOS 10.14 introduced Notarization and Hardened Runtime features for improved application security. ...
...e developer.entitlements.xml file from the source tree while production builds use production.entitlements.xml. On macOS 10.15+, downloaded try builds will not launch by default because Notarization is required. To workaround this problem, remove the quarantine extended attribute from the downloaded Nightly: $ xattr -r -d com.apple.quarantine /Path/to/Nightly.app Local Builds Local builds of mozilla-central do not enable Hardened Runtime and hence do not have debugging restrictions. As a result, some functionality will be permitted on local builds, but blocked on production builds which have Hardened Runtime enabled. Bug 1522409 was filed to automate codesigning local builds to enable Hardened Runtime by default and eliminate this discrepancy. To obtain a Hardened Runtime build without usin...
...is recommended to test fixes with SIP enabled. Disabling SIP has system security implications that should be understood before taking this step. Creating an Xcode project If you try to create a new Xcode project in an existing directory then Xcode will delete its existing contents (Xcode will warn you beforehand). To work around that, the steps below have you initialize the project outside the Mozilla source tree, close the project, copy the .xcodeproj project "file" into the source tree, and then reopen the project to finish setting it up. Note also that since Xcode 7.3.1 it doesn't seem to be possible to have the Xcode project live outside the source tree. If you try to do that then Xcode will simply copy the source files under the project directory rather than link to them (still the case ...
...And 9 more matches
Old Thunderbird build
GNU/Linux Build Prerequisites Mac OS X Build Prerequisites Get the source Note: On Windows, you won't be able to build the Thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "Documents and Settings"). You can pick any other location, such as a new directory C:/thunderbird-src (where "C:/", with a forward slash, is intentional to clarify you are in the MozillaBuild command prompt per Windows build prerequisite). Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permissi...
...use of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving it close to the root of your machine and re-building. Get the latest source code from Mozilla's comm-central Mercurial code repository: hg clone https://hg.mozilla.org/comm-central Then, get all the repositories it depends on. The comm-central repository includes a script to do just that. This may take a while, it's a lot of code! First, cd into the comm-central subdirectory (created automatically by the previous command): cd comm-central then run: python client.py checkout On som...
...he comm-central subdirectory (created automatically by the previous command): cd comm-central then run: python client.py checkout On some types of network connections, "hg clone" might fail because it gets interrupted. It is faster and more efficient to use Mercurial bundles instead the first time you fetch the complete repo. In this case, you need a bundle for comm-central, and a bundle for mozilla-central. Unbundle mozilla-central into a "mozilla" subdirectory of your comm-central repo after unbundling comm-central. (Make sure the unbundled folder's name is now "mozilla" and not "mozilla-central"). Then run "python client.py checkout" to ensure you are up-to-date. The source code requires 3.6GB of free space or more and additionally 5GB or more for default build. Build configuration To...
...And 9 more matches
IPDL Tutorial
All messages for multi-process plugins and tabs in Firefox are declared in the IPDL language. To experiment with adding a new IPDL protocol, see Creating a New Protocol. All IPDL messages are sent between parent and a child end points, called actors. An IPDL protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent. ...
... and deserialize these types. See ipc/ipdl/ipdl/builtin.py for the most up-to-date list of automatically imported types. Actors may be passed as parameters. The C++ signature will accept a PProtocolParent* on one side and convert it to a PProtocolChild* on the other. Maybe types If you want to pass a potentially undefined argument, you can add ? postfix after the type name. ...
...dd ? postfix after the type name. Then you can pass a mozilla::Maybe object instead of a concrete value. protocol PMaybe { child: async Maybe(nsCString? ...
...And 9 more matches
jpm - Archive of obsolete content
ry "$HOME/node_modules/.bin/" to your terminal's PATH first. Add the following line to the end of the file $HOME/.profile to add it to your PATH permanently (as the file .profile is executed every time a new terminal is opened): export PATH="$HOME/node_modules/.bin/:$PATH" Installing jpm from git Alternatively, you can also get the latest version of jpm using git: git clone https://github.com/mozilla-jetpack/jpm.git cd jpm npm install npm link After installing jpm After installation, at the command prompt, type: jpm You should see a screen summarizing the available jpm commands. Note that unlike cfx, jpm is available in every command prompt you start, as long as you installed it with the --global flag. Install a different version of Firefox As of Firefox 48, it is not possible to use u...
..., you will need to use the -b option to jpm run. See Selecting a browser version. Problems? If you do not see this, ask for help. SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You are welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network. Command reference jpm supports the following commands: jpm init Create a skeleton add-on as a starting point for your add-on. jpm run Launch an instance of Firefox with your add-on installed. jpm test Runs your add-on's unit tests. jpm xpi Package your add-on as an XPI file, which is the install file format for Firefox add-ons. ...
... xpi Package your add-on as an XPI file, which is the install file format for Firefox add-ons. jpm post Package your add-on as an XPI file, and then post it to some URL. jpm watchpost Package your add-on as an XPI file whenever there is a file change and post that to some URL. jpm sign Package your add-on as an XPI file, and then retrieve a new XPI signed by Mozilla. jpm init This command initializes a new add-on from scratch. Create a new directory, change into it, and run jpm init. mkdir my-addon cd my-addon jpm init You'll then be asked to supply some information about your add-on: this will be used to create your add-on's package.json file. title name: this defaults to the name of the directory in which you are running jpm init. Unless an ...
...And 8 more matches
Setting Up a Development Environment - Archive of obsolete content
<< PreviousNext >> Getting the right tools There are 3 tools that we think are essential for effective add-on development (or any kind of development, really): a source code editor, a source control system, and a build system. In regards to code editing, there's no official Mozilla IDE. On the other hand, extensions use the same (or similar) languages that are used for web development, so most text editors and IDEs are up to the task. Most XUL tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help. We recommend Komodo Edit. It's free, open source, and cross-platform. It's based on the Mozilla XULRunner platform, so it has support for some of the particularities in Firefox extension development. Komodo Edit ha...
...ou'll find online are merely templates that generate the folder structure for the project, and that's not much help. We recommend Komodo Edit. It's free, open source, and cross-platform. It's based on the Mozilla XULRunner platform, so it has support for some of the particularities in Firefox extension development. Komodo Edit has automatic completion for XUL tags and attributes, and it supports Mozilla's CSS extensions (CSS values and properties beginning with "-moz"). It has an add-on system similar to the one in Firefox, and there are some Komodo extensions that provide additional help in extension development. That is more than what you can get with most other editors, so we recommend you to give it a try. All of our examples are handled with Komodo Edit, so if you see a .kpf or .komodoproje...
...s, so we recommend you to give it a try. All of our examples are handled with Komodo Edit, so if you see a .kpf or .komodoproject file in an example you download, this is a Komodo project file. We recommend Git and GitHub for source control, but any decent software configuration management system will do. To package XPI files, we use make. We chose make because this is the same system used by Mozilla to build Firefox, and it is available for all operating systems. make is a default tool in most UNIX-based systems. It can be installed on Mac OS X as part of the XCode Tools package, and on Windows with cygwin. In cygwin installations you'll have to explicitly check the make and zip utilities from the long list of packages to download and install. Also make sure that make is in the executable s...
...And 8 more matches
No Proxy For configuration - Archive of obsolete content
Overview As browsers rapidly grew in popularity in the mid-90's, many network administrators added proxy servers. Initially, proxy servers were used for access control and performance. Many networks had limited access to the public network via proxy servers. Because the public network was small in scope and connections were slow, a caching proxy could often improve the overall performance. ...
...alhost, 127.0.0.1", by default. Entry points: Preferences | Advanced | Proxies control-click menu for off line-online icon (network plug) Configuration The no proxy list is composed of either domain elements or IPv4 address elements. The elements are separated by either a space (" ") or a comma (","). ...
...y list is composed of either domain elements or IPv4 address elements. The elements are separated by either a space (" ") or a comma (","). Note for former-IE users: "*" is supported only at the beginning of domain filters (*.mozilla.org). To block ... put this into "No Proxy for" ...for example use... ...
...And 8 more matches
Autodial for Windows NT - Archive of obsolete content
s set to enable autodial, then any application trying to access the Internet will trigger the autodial feature whenever an Internet address cannot be reached. However, this service will won't function if you have a LAN card installed, unless that particular address has been accessed in the past via a dialup connection. Origin of the Bug Before the implementation of the Autodial Helper feature, Mozilla would trigger the autodial feature on NT-based operating systems, but only if certain conditions are met. These conditions are as follows: The autodial service is running Control Panel | Network Connections | Advanced | Dialup Preferences | Enable autodial by location is set for some location A dialup connection has been configured There is no LAN connected OR The dialup connection has been ...
... some location A dialup connection has been configured There is no LAN connected OR The dialup connection has been used to access the Internet address in question. Most systems are not set up correctly for this to happen, and most users have no idea how all these details work. So, as more people move to Windows XP from Windows 98, the autodial suddenly stops working for them. In fact, it's not Mozilla that is broken, it's that Microsoft has changed the way things work from Windows 98 to Windows XP. In an attempt to help users who want to use the autodial feature of the OS, I added the Autodial Helper Feature requested in bug 93002. How the Feature Works This feature doesn't do anything on Linux, Mac, or the consumer versions of Windows. The "correct" way too use the autodial feature in NT-b...
...rally, if the service is running, and an address can't be reached, the autodial helper adds the address to the RAS Autodial Address db. The next time this address is tried and can't be found, the autodial service will be triggered and dialup will commence. Many Windows XP users, especially Windows XP Home users, don't understand that Microsoft has changed how autodial works. To them it looks like Mozilla is broken because Windows doesn't try to dial when the feature is turned on in Control Panel | Internet Options | Connections when they are using Mozilla but it does when they are using Internet Explorer. "What's a system service" they might ask when told about how autodial is supposed to work now. The second part of this fix is for those users. We try to mimic the autodial system service if it i...
...And 8 more matches
A XUL Bestiary - Archive of obsolete content
key concepts and terms in the XUL development environment. The purpose of this article is not to describe these items in any great detail but to define what they are in simple terms. I selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in XUL and cross-platform development. In contrast to the Mozilla Jargon File, this article describes items of specific interest to the web or content developer looking to establish a context for understanding Mozilla's new technologies -- and in particular Mozilla's XML-based User Interface Language, XUL. Chrome Some of the most powerful and frequently misunderstood features of XUL and the Mozilla browser have to do with chrome. The term chrome is used in di...
...he 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,all,dialog=no')" /> In this example, the chrome URL is being used to point to a chrome within the package hierarchy of the Mozilla application. A Help chrome defined in mozilla/bin/chrome/help/ is being invoked from the Help menu. Note that when ...
... from the Help menu. Note that when no file name is specified after the chrome directory path, a file name with the same name as the package is assumed. In other words, a chrome URL like the global pointer above picks up a file called global.css, and the help pointer above could also be written as chrome://help/content, because the name of the package itself is "help." Viewing Chromes Other Than Mozilla's There is a special flag you can use to start Mozilla with some chrome other than the default. When you invoke Mozilla from the command line with the -chrome flag, you can specify a chrome just as you would in the previous example: mozilla -chrome chrome://help/content/help.xul Brings up the help package mentioned in the previous example as a "stand-alone" chrome. This special option allows ...
...And 8 more matches
Extentsions FAQ - Archive of obsolete content
Just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." Option #4 Install Toolbar Control <http://webdesigns.ms11.net/chromeditp.html> Asking for help with getting an extension to process Windows messages. ...
...ev-extensions FAQ Friday, September 22 - 29, 2006 (? top) How to write an XPCOM component in C++ that can communicate to a COM component? Write an XPCOM component in C++ - it will talk to the COM component and will be accessible to JS code via XPConnect. How to customizes toolbar button to coexist in a toolbar palette and status bar? Option #3 Install Status Buttons 1.0 <https://addons.mozilla.org/firefox/1272/> "Lets you put toolbar buttons at either end of the status-bar. Just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." Option #4 Install Toolbar Control <http://webdesigns.ms11.net/chromeditp.html> Asking for help with getting an extension to process Windows messages. use WM_COPYDATA How to creating an extensi...
... to create a dynamic drop down menu that may have submenus using JavaScript for an extension? These two links should give you a starting point: http://www..xulplanet.com/tutorials/...u/advmenu.html http://www.xulplanet.com/tutorials/x...dommodify.html Request for a Thunderbird extension that can automatically detect the default domain when composing e-mails via autodetect. <https://bugzilla.mozilla.org/show_bug.cgi?id=312818> "Thunderbird requires domain in addresses and doesn't always add default" There is an extension that allows what you want attached to one of the comments in this bug. How to get the value of a text box when a button is clicked? Read http://developer.mozilla.org/en/docs/Extension_FAQ and check if there are any errors in JS console. Friday, September 29 - October ...
...And 8 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
opers? Full Circle If you were part of the early web's big bang in the mid-1990s you might recall that being able to use JavaScript both client-side and server-side was core to Netscape's original vision for Web apps. Netscape Livewire was the first server-side JavaScript engine. ...
...cript engine. Now more than 10 years later, with Netscape's technology group having been transformed into The Mozilla Foundation, server-side JavaScript is seeing a strong resurgence because of the simplicity it provides to Web developers reinvigorated by the fact that today's CPUs can process JavaScript more than 10x faster than the CPUs of the mid-90's ever could. And just like before, it's the Mozilla team that's at the core of this latest evolution of the Web. In fact, the next JavaScript engine from Mozilla, TraceMonkey, is poised to boost JavaScript performance by factors of 20 to 40 times according to Brendan Eich, Mozilla CTO and the creator of JavaScript. In recent developments we also see the advent of other performant engines for JavaScript such as v8 from Google and squirrelfish for w...
...for JavaScript such as v8 from Google and squirrelfish for webKit, these engines are raising the bar on performance and help to maintain a competitive environment that will hopefully direct competitive focus on the performance aspect of all the major JavaScript implementations. There are currently two main JavaScript engines used server-side and both are from the minds at Mozilla: Mozilla Rhino and Mozilla SpiderMonkey. Rhino is a JavaScript interpreter written in Java that can also bridge JavaScript to Java server-side. Steve Yegge of Google has been doing interesting work with this engine. SpiderMonkey on the other hand is the JavaScript engine (written in C) in the highly popular Mozilla Firefox browser. SpiderMonkey is what will evolve to become TraceMonkey. In additi...
...And 8 more matches
Simple Thunderbird build
18,277 MAPIX.h 02/06/2009 17:02 5,012 MSPST.h Get the source Note: On Windows, you won't be able to build the Thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "Documents and Settings"). You can pick any other location, such as a new directory C:/thunderbird-src (where "C:/", with a forward slash, is intentional to clarify you are in the MozillaBuild command prompt per Windows build prerequisite). Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permissi...
... denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving it closer to the root of your machine and re-building. ...
...rmission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving it closer to the root of your machine and re-building. ...
...And 8 more matches
XForms Accessibility
XForms elements behavior is implemented in accordance with accessible toolkit checklist. ...
... XForms accessibility is implemented only on trunk. Trunk builds are not considered stable and should not be installed on top of the Firefox used for daily browsing. Currently we have verified that XForms accessibility is working on the Windows platform, and Linux testing has not yet been done, although everything should work and is ready to be tested. You will find trunk builds of Firefox at ftp.mozilla.org, trunk builds of XForms extension (Windows) at ftp.mozilla.org or trunk builds of XForms extension (Linux) ftp.mozilla.org. Build It Yourself If you would like to build firefox/seamonkey yourself then please ensure your .mozconfig file has the following option: ac_add_options --enable-extensions=default,xforms,schema-validation How To Test There are two approaches to test XForms acces...
...st XForms accessibility. The first is to use and assistive technology such as a screen reader, or an accessibility testing tool, to make sure XForms elements have proper accessible objects. Or you may be guided by toolkit checklist to check keyboard navigation for XForms controls. ...
...And 8 more matches
Creating the Component Code
rfaces 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 provides the information that applications need in order to use components properly. The WebLock component must do a number of things to register itself. Specifically, the component library has to contain implementations for the component-related interfaces described in this chapter: nsIModule and nsIFactory, which are ...
...aces, the rest of the registration process itself is simple. Applications typically use regxpcom, described in the next section. The regxpcom Program An explicit way to register a component is to run the application regxpcom. Without any arguments passed to regxpcom, the program registers the component in the default component registry. We suggest that when you are testing your component in the Mozilla or Netscape client, you copy your component into the components directory in the client's installation folder. When it is copied there, run regxpcom from the command line to register that component and all the others in that directory. Several new options have been added to regxpcom in versions 1.4 and later. You can run regxpcom with the -h option to see full usage options. Registration Altern...
...from the command line to register that component and all the others in that directory. Several new options have been added to regxpcom in versions 1.4 and later. You can run regxpcom with the -h option to see full usage options. Registration Alternatives A Gecko embedding application may provide other ways to register XPCOM components. XPInstall, the cross-platform installation technology that Mozilla uses to install the browser and other components, is one such alternative. It is described further in Packaging WebLock. You should consult with the authors of the application you wish to extend to see if there are other supported ways. Overview of the WebLock Module Source As we mentioned in the previous section, components have layers. There are three main parts to every XPCOM component. From...
...And 8 more matches
nsIPromptService
terface 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 object, which can be either empty or have a value property set to the out parameter type. For more information on out parameters and JavaScript refer to Working with out parameters. ...
...e extra work, as you can't use an out parameter directly. You need to wrap them in a temporary object, which can be either empty or have a value property set to the out parameter type. For more information on out parameters and JavaScript refer to Working with out parameters. Implemented by: @mozilla.org/embedcomp/prompt-service;1. ...
...play. aOutSelection Contains the index of the selected item in the list when this method returns true. If you call this method from JavaScript, this argument is wrapped in an object with an attribute named 'value' which holds the selected index. Return value true for OK, false for Cancel Example code alert example alert displays a simple dialog. ...
...And 8 more matches
Using nsIDirectoryService
This implementation will allow you to Get(), Set(), Define(), and Undefine() nsIFile. Getting a location: Most developers need to find where a file or directory is located. With nsDirectoryService, there are two steps involved. First, you must know what the string key (or property) is that refers to this locations. Header files containing known keys are listed in the Known Locations section of this document. Bear in mind that this list is not static. Components can add and remove locations at their will. ...
... can add and remove locations at their will. Second, you must acquire the implementation and call Get() passing the known string key. In the example below, prop is a string that references your requested file locations. C++ nsCOMPtr<nsIFile> dir; NS_GetSpecialDirectory(prop, getter_AddRefs(dir)); if (!dir) return NS_ERROR_FAILURE; Javascript: var file = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsIFile); (The example is taken from the Code snippets section of this site.) Adding a location: There are currently two ways to add a file location to the directory service: directly and delayed. You can directly add a new nsIFile with any p...
...ts.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsIFile); (The example is taken from the Code snippets section of this site.) Adding a location: There are currently two ways to add a file location to the directory service: directly and delayed. You can directly add a new nsIFile with any property string using the nsIProperties interface: Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .set("MyFileName", file); Now, if your cost is too high to set all of these properties at once, you can register to be a callback that can provide an nsIFile. To do this, you must get the implementation again like above. When you have it, QueryInterface for the nsIDirectoryServ...
...And 8 more matches
Border-image generator - CSS: Cascading Style Sheets
put-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2C9FC9; border-radius: 5px; color: #FFF; f...
...379B4A; cursor: pointer; } /*************************************************************************************/ /*************************************************************************************/ /* * UI DropDown */ /* Dropdown */ .ui-dropdown { height: 2em; width: 120px; font-family: "Segoe UI", Arial, Helvetica, sans-serif; font-size: 12px; background-image: url("https://mdn.mozillademos.org/files/6037/drop_arrow_icon.png"); background-position: right center; background-repeat: no-repeat; background-color: #359740; position: relative; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-dropdown:hover { cursor: pointer; backgroun...
...t-family: "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5em; color: #FFF; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #FFF; border-radius: 2px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover...
...And 8 more matches
Event reference
ds and/or functions used to get additional information about what happened. Events can represent everything from basic user interactions to automated notifications of things happening in the rendering model. This article offers a list of events that can be sent; some are standard events defined in official specifications, while others are events used internally by specific browsers; for example, Mozilla-specific events are listed so that add-ons can use them to interact with the browser. Most common categories Resource events Event Name Fired When error A resource failed to load. abort The loading of a resource has been aborted. load A resource and its dependent resources have finished loading. beforeunload The window, the do...
... Event HTML5 media The volume has changed. waiting Event HTML5 media Playback has stopped because of a temporary lack of data. wheel WheelEvent DOM L3 A wheel button of a pointing device is rotated in any direction. Non-standard events Event Name Event Type Specification Fired when... ...
... Playback has stopped because of a temporary lack of data. wheel WheelEvent DOM L3 A wheel button of a pointing device is rotated in any direction. Non-standard events Event Name Event Type Specification Fired when... afterscriptexecute Event Mozilla Specific A script has been executed. beforescriptexecute Event Mozilla Specific A script is about to be executed. ...
...And 8 more matches
places/bookmarks - Archive of obsolete content
mark item represents only a snapshot of state at a specific time. The module does not automatically sync up a Bookmark instance with ongoing changes to that item in the database from the same add-on, other add-ons, or the user. ...
...ly a snapshot of state at a specific time. The module does not automatically sync up a Bookmark instance with ongoing changes to that item in the database from the same add-on, other add-ons, or the user. ...
...e query objects. let { search, UNSORTED } = require("sdk/places/bookmarks"); // Simple query with one object search( { query: "firefox" }, { sort: "title" } ).on("end", function (results) { // results matching any bookmark that has "firefox" // in its URL, title or tag, sorted by title }); // Multiple queries are OR'd together search( [{ query: "firefox" }, { group: UNSORTED, tags: ["mozilla"] }], { sort: "title" } ).on("end", function (results) { // Our first query is the same as the simple query above; // all of those results are also returned here. Since multiple // queries are OR'd together, we also get bookmarks that // match the second query. The second query's properties // are AND'd together, so results that are in the platform's unsorted // bookmarks folder, AN...
...And 7 more matches
Finding window handles - Archive of obsolete content
Note: Starting in Gecko 17.0, nsIBaseWindow.nativeHandle provides the handle (HWND [Widows], GdkWindow* [Linux], NSWindow* [MacOSX],...) of a top-level window, for all plateforms, as a string. When working on Windows platforms, many APIs and frameworks require a window handle (HWND type). Since Mozilla tries to be as cross-platform as possible, it can be difficult to get the handle you need. Note: Starting in Gecko 2.0, only the top level browser window has an HWND. ...
.... Note: Starting in Gecko 2.0, only the top level browser window has an 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. ...
...e 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. This code can be used from external application or from an XPCOM component within an extension. ...
...And 7 more matches
Build - Archive of obsolete content
Extract the source code, and you should have a directory called mozilla/. ...
... Building Prism is similar to building McCoy, but there are some differences which is why a separate build documentation article. To build prism, you must first build the xulrunner tree, and then build prism. Make sure you have the required build prerequisites. Grab the latest release source code from Mozilla's ftp site. Extract the source code, and you should have a directory called mozilla/. ...
...similar to building McCoy, but there are some differences which is why a separate build documentation article. To build prism, you must first build the xulrunner tree, and then build prism. Make sure you have the required build prerequisites. Grab the latest release source code from Mozilla's ftp site. Extract the source code, and you should have a directory called mozilla/. ...
...And 7 more matches
Merging TraceMonkey Repo - Archive of obsolete content
Merge via hg merge You may see a number of conflicts. ...
... Merge via hg merge You may see a number of conflicts. ...
... Merge via hg merge You may see a number of conflicts. ...
...And 7 more matches
Mac stub installer - Archive of obsolete content
Run the installer from the opt "Mozilla Installer" folder. ...
... Run the installer from the opt "Mozilla Installer" folder. ...
... Run the installer from the opt "Mozilla Installer" folder. ...
...And 7 more matches
Creating hyperlinks - Learn web development
ut also different areas of the site (navigation functionality), login/registration pages (user tools), and more. Anatomy of a link A basic link is created by wrapping the text or other content, see Block level links, inside an <a> element and using the href attribute, also known as a Hypertext Reference, or target, that contains the web address. <p>I'm creating a link to <a href="https://www.mozilla.org/">the Mozilla homepage</a>. </p> This gives us the following result: I'm creating a link to the Mozilla homepage. Adding supporting information with the title attribute Another attribute you may want to add to your links is title. The title contains additional information about the link, such as which kind of information the page contains, or things to be aware of on the web site. <p>I'm...
...is gives us the following result: I'm creating a link to the Mozilla homepage. Adding supporting information with the title attribute Another attribute you may want to add to your links is title. The title contains additional information about the link, such as which kind of information the page contains, or things to be aware of on the web site. <p>I'm creating a link to <a href="https://www.mozilla.org/" title="The best place to find more information about Mozilla's mission and how to contribute">the Mozilla homepage</a>. </p> This gives us the following result and hovering over the link displays the title as a tooltip. I'm creating a link to the Mozilla homepage. Note: A link title is only revealed on mouse hover, which means that people relying on keyboard controls or tou...
... one or more paragraphs or other types of content you already know about. Change some of the content into links. Include title attributes. Block level links As mentioned before, almost any content can be made into a link, even block-level elements. If you have an image you want to make into a link, use the <a> element and reference the image file with the <img> element. <a href="https://www.mozilla.org/"> <img src="mozilla-image.png" alt="mozilla logo that links to the mozilla homepage"> </a> Note: You'll find out more about using images on the Web in a future article. A quick primer on URLs and paths To fully understand link targets, you need to understand URLs and file paths. This section gives you the information you need to achieve this. A URL, or Uniform Resource Locator is sim...
...And 7 more matches
mach
Mach was committed on 2012-SEP-26. Mach also requires Python 2.7. Mach itself is Python 3 compliant, but modules used by mach likely are not Python 3 compliant - so stick to Python 2.7. ...
... $ cd devtools/client $ mach build webconsole # Rebuild only the files in the devtools/client/webconsole directory $ mach mochitest webconsole/test # Run mochitests in devtools/client/webconsole/test Enable tab completion To enable tab completion in bash, run the following command. ...
.../mozilla-central/python/mach/bash-completion.sh This will enable tab completion of mach command names, and in the future it may complete flags and other arguments too. Note: Mach tab completion will not work when running mach in a source directory older than Firefox 24. For zsh, you can call the built-in bashcompinit function before sourcing: autoload bashcompinit bashcompinit source /path/to/mozilla-central/python/mach/bash-completion.sh Frequently Asked Questions Why should I NOT use mach? A real FAQ for a change! Mach is not the best software ever. Say, if you run a rolling release Arch Linux Distro or derivate thereof ("Manjaro"), you have something less tedious: Octopi! Just install Thunderbird from sources out of the AUR repo! Many PKGBUILD options to choose from and most work like...
...And 7 more matches
Using JSS
Mozilla › Projects › NSS › JSS › Using JSS
Gather Components Setup your runtime environment Initialize JSS in your application Gather components You need the JSS classes and the NSPR, NSS, and JSS shared libraries. NSPR and NSS Shared Libraries JSS uses the NSPR and NSS libraries for I/O and crypto. JSS version 3.0 linked statically with NSS, so it only required NSPR. JSS versions 3.1 and later link dynamically with NSS, so they also require the NSS shared libraries. The exact library names vary according to the convention for each platform. ...
.... For example, the NSPR library is called nspr4.dll or libnspr4.dll on Windows and libnspr4.so on Solaris. The following table gives the core names of the libraries, omitting the platform-specific prefix and suffix. ...
...he NSPR library is called nspr4.dll or libnspr4.dll on Windows and libnspr4.so on Solaris. The following table gives the core names of the libraries, omitting the platform-specific prefix and suffix. ...
...And 7 more matches
NSS_3.12_release_notes.html
Note: Firefox 3 uses NSS 3.12, but not the new SQLite-based shareable certificate and key databases. We missed the deadline to enable that feature in Firefox 3. ...
... Note: Firefox 3 uses NSS 3.12, but not the new SQLite-based shareable certificate and key databases. We missed the deadline to enable that feature in Firefox 3. Distribution Information The CVS tag for the NSS 3.12 release is NSS_3_12_RTM. NSS 3.12 requires NSPR 4.7.1. See the Documentation section for the build instructions. NSS 3.12 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_RTM/src/. Binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_RTM/. Both debug and optimized builds are provided. Go to the subdirectory for your platform, DBG (debug) or OPT (optimized), to get the tar.gz or zip file. The tar.gz o...
...file. The tar.gz or zip file expands to an nss-3.12 directory containing three subdirectories: include - NSS header files lib - NSS shared libraries bin - NSS Tools and test programs You also need to download the NSPR 4.7.1 binary distributions to get the NSPR 4.7.1 header files and shared libraries, which NSS 3.12 requires. NSPR 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/. NSS 3.12 libraries have the following versions: sqlite3: 3.3.17 nssckbi: 1.70 softokn3 and freebl3: 3.12.0.3 other NSS libraries: 3.12.0.3 New in NSS 3.12 3 new shared library are shipped with NSS 3.12: nssutil sqlite nssdbm 1 new include file is shipped with NSS3.12: utilrename.h New functions in the nss shared library: CERT_CheckNameSpace (...
...And 7 more matches
NSS tools : modutil
Name modutil - Manage PKCS #11 module information within the security module database. Synopsis modutil [options] [[arguments]] STATUS This documentation is still work in progress. Please contribute to the initial review in Mozilla NSS bug 836477[1] Description The Security Module Database Tool, modutil, is a command-line utility for managing PKCS #11 module information both within secmod.db files and within hardware tokens. modutil can add and delete PKCS #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable FIPS 140-2 compliance, and assign default providers for cryptographic operations. This tool can also create certificate, key, and module security database files. The tasks associated with se...
...he module itself, like supported cipher mechanisms, version numbers, serial numbers, and other information about the module and the token it is loaded on. ...
...KCS #11 Module Library file: **Internal ONLY module** Manufacturer: Mozilla Foundation Description: NSS Internal Crypto Services PKCS #11 Version 2.20 Library Version: 3.11 Cipher Enable Flags: None Default Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES Slot: NSS Internal Cryptographic Services Slot Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES Manufacturer: Mozilla Foundation Type: Software Version Number: 3.11 Firmware Version: 0.0 Status: Enabled Token Name: NSS Generic Crypto Services Token Manufacturer: Mozilla Foundation Token Model: NSS 3 Token Serial Number: 0000000000000000 Token Version: 4.0 Token Firmware Version: 0.0 Access: Write Protected Login Type: Public (no login required) User Pin: NOT Initialized Slot: NSS User Private Key a...
...And 7 more matches
Hacking Tips
ck.h, StackFrame class) or (nil) if compiled with IonMonkey, the file and line number of the call location and under parentheses, the JSScript pointer and the jsbytecode pointer (pc) executed. ...
...If gdb does not load the unwinder by default, you can force it to, by using the source command with the js-gdb.py file. Setting a breakpoint in the generated code (from gdb, x86 / x86-64, arm) To set a breakpoint the generated code of a specific JSScript compiled with IonMonkey. Set a breakpoint on the instruction you are interested in. If you have no precise idea which function you ...
...struction, add a command to generate a static breakpoint in the generated code. $ gdb --args js [...] (gdb) b js::ion::CodeGenerator::visitStart (gdb) command >call masm.breakpoint() >continue >end (gdb) r js> function f(a, b) { return a + b; } js> for (var i = 0; i < 100000; i++) f(i, i + 1); Breakpoint 1, js::ion::CodeGenerator::visitStart (this=0x101ed20, lir=0x10234e0) at /home/nicolas/mozilla/ionmonkey/js/src/ion/CodeGenerator.cpp:609 609 } Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff7fb165a in ?? () (gdb) Once you hit the generated breakpoint, you can replace it by a gdb breakpoint to make it conditional, the procedure is to first replace the generated breakpoint by a nop instruction, and to set a breakpoint at the address of the nop. (gdb) x /5i $pc -...
...And 7 more matches
XPCOM Thread Synchronization
This article covers the API of Mozilla synchronization only. For a higher-level introduction to thread synchronization, see Introduction_to_NSPR. ...
...For a higher-level introduction to thread synchronization, see Introduction_to_NSPR. ...
...h approved code. PRLock* mLock; PRMonitor* mMonitor; PRCondVar* mCvar; FooConstructor() { } nsresult Init() { mLock = nsAutoLock::NewLock("Foo lock"); // check for null mMonitor = nsAutoMonitor::NewMonitor("Foo monitor"); // check for null mCvar = PR_NewCondVar(mRawLock); // check for null // ... } New Construction using namespace mozilla; Mutex mLock; Monitor mMonitor; CondVar mCvar; FooConstructor() : mLock("Foo lock"), mMonitor("Foo monitor"), mCvar(mLock, "Foo condvar") { } nsresult Init() { // ... } Old Usage Note: This is deprecated code that is shown only to compare with approved code. ConcurrentMethod() { nsAutoLock al(mLock); nsAutoMonitor am(mMonitor); ...
...And 7 more matches
Box-shadow generator - CSS: Cascading Style Sheets
t-family: "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5em; color: #FFF; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #FFF; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover...
...peat; color: #FFF; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: pointer; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/files/5681/checked.png"); background-color: #379B4A; } /* * BOX SHADOW GENERATOR TOOL */ body { max-width: 1000px; height: 800px; margin: 20px auto 0; font-family: "Segoe UI", Arial, Helvetica, sans-serif; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } #con...
...d #CCC; border-radius: 3px; display: block; background-position: center center; background-repeat: no-repeat; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; float: left; } #layer_manager .button:hover { background-color: #3380C4; border: 1px solid #3380C4; cursor: pointer; } #layer_manager [data-type='add'] { background-image: url("https://mdn.mozillademos.org/files/5685/add-black.png"); } #layer_manager [data-type='add']:hover { background-image: url("https://mdn.mozillademos.org/files/5687/add-white.png"); } #layer_manager [data-type='move-up'] { background-image: url("https://mdn.mozillademos.org/files/5697/up-black.png"); margin-left: 5%; margin-right: 5%; } #layer_manager [data-type='move-up']:hover { background-image: url("https:...
...And 7 more matches
page-mod - Archive of obsolete content
Run scripts in the context of web pages whose URL matches a given pattern. Usage To use page-mod, you specify: one or more scripts to attach. The SDK calls these scripts "content scripts". a pattern that a page's URL must match, in order for the script(s) to be attached to that page. ...
...sage To use page-mod, you specify: one or more scripts to attach. The SDK calls these scripts "content scripts". a pattern that a page's URL must match, in order for the script(s) to be attached to that page. ...
...tached to that page. For example, the following add-on displays an alert whenever the user visits any page hosted at "mozilla.org": var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*.mozilla.org", contentScript: 'window.alert("Page matches ruleset");' }); You can modify the document in your script: var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*.mozilla.org", contentScript: 'document.body.innerHTML = ' + ' "<h1>Page matches ruleset</h1>";' }); You can supply the content script(s) in one of two ways: as a string literal, or an array of string literals, assigned to the contentScript option, as above as separate files supplied in your add-on's "data" directory. If you supply the scripts as separate files in the "data" dire...
...And 6 more matches
url - Archive of obsolete content
Parameters url : string The URL, as a string, to be converted. Returns string : The converted native file path as a string. fromFilename(path) Converts the given native file path to a file: URL. Parameters path : string The native file path, as a string, to be converted. Returns string : The converted URL as a string. isValidURI(uri) Checks the validity of a URI. isValidURI("http://mozilla.org") would return true, whereas isValidURI("mozilla.org") would return false. Parameters uri : string The URI, as a string, to be tested. Returns boolean : A boolean indicating whether or not the URI is valid. getTLD(url) Returns the top-level domain for the given URL: that is, the highest-level domain under which individual domains may be registered. Uses getPublicSuffix() internally. v...
...Returns boolean : A boolean indicating whether or not the URI is valid. getTLD(url) Returns the top-level domain for the given URL: that is, the highest-level domain under which individual domains may be registered. Uses getPublicSuffix() internally. var urls = require("sdk/url"); console.log(urls.getTLD("http://www.bbc.co.uk/")); // "co.uk" console.log(urls.getTLD("https://developer.mozilla.org/")); // "org" Parameters url : string The URL, as a string. Returns string : The top-level domain for the URL. URL Methods toString() Returns a string representation of the URL. Returns string : The URL as a string. toJSON() Returns a string representation of the URL. Returns string : The URL as a string. Properties scheme The name of the protocol in the URL, without the tra...
... domain for the URL. URL Methods toString() Returns a string representation of the URL. Returns string : The URL as a string. toJSON() Returns a string representation of the URL. Returns string : The URL as a string. Properties scheme The name of the protocol in the URL, without the trailing ':'. Compare with protocol. ...
...And 6 more matches
Creating Reusable Modules - Archive of obsolete content
n that lets the user select a file on disk and calculates its hash. For both these operations we'll use XPCOM interfaces. File picker To let the user select a file we'll use nsIFilePicker. ...
...e nsICryptoHash XPCOM interface The documentation page for that interface includes an example of calculating an MD5 hash of a file's contents, given its path. ...
...hash of a file's contents, given its path. ...
...And 6 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
SRs 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. Step 1: Use Services.jsm If you load one of Mozilla's internal JSM files, for example Services.jsm, you'll do so via privileged JavaScript code like this: Components.utils.import("resource://gre/modules/Services.jsm"); From here on out, it is assumed you've imported Services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples. The examples will also assume that you know how to properly add instructions t...
...ns to your add-on's chrome.manifest to add and remove resource, chrome, locale, & etc. mappings, so that you can access your files with custom paths such as: resource://myAddon/filename.ext chrome://myAddon/content/filename.ext Step 2: No more resource:// URIs for files internal to your bundle Unfortunately, resource mappings in your chrome.manifest were not usable in restartless add-ons until Mozilla finally fixed this bug in Firefox 38, which looked bad, but only because Mozilla is still using resource:// URIs internally and in examples. Resource mappings for files in the mozilla distribution, such as Services.jsm (above), will continue to work. In overlay extensions, you can place a resource mapping in the chrome.manifest for your add-on and load your own JSM from resource:// URIs. It's a g...
...donID = ...; // Just store a constant with your ID Components.utils.import("resource://gre/modules/AddonManager.jsm"); AddonManager.getAddonByID(myAddonID,function(addon) { var file = Services.io.newURI("resource://myAddon/filename.ext",null,null) .QueryInterface(Components.interfaces.nsIFileURL) .file; var stream = Components.classes["@mozilla.org/network/file-input-stream;1"] .createInstance(Components.interfaces.nsIFileInputStream) .QueryInterface(Components.interfaces.nsISeekableStream); stream.init(file, 0x01, 0444, 0); // read-only, read by owner/group/others, normal behavior /* do stuff */ }); This bit of code is paraphrased and probably not to be recommended as-is, ...
...And 6 more matches
Introduction - Archive of obsolete content
h this tutorial you'll learn how to develop Firefox extensions. You'll learn how to quickly do the most common tasks in extension development, comparing several different approaches to solve them. In most cases we'll provide code samples that you can easily copy and adapt to your needs, as well as some working example extensions. ...
...sion development, comparing several different approaches to solve them. In most cases we'll provide code samples that you can easily copy and adapt to your needs, as well as some working example extensions. The tutorial aims to be as brief as possible, often falling back on Mozilla documentation for more detailed information. You can think of it as a quick guide to the expansive world that is the Mozilla platform. Most links in this documentation are meant to be clicked and read. We'll start with a brief introduction to some key concepts, in case you're not familiar with Mozilla and Firefox. Mozilla and Firefox The term Mozilla can be used to refer to several concepts: the Mozilla project, the Mozilla Foundation, the Mozilla Corporation and the old Mozilla browser. Even Firefox is sometimes re...
...t links in this documentation are meant to be clicked and read. We'll start with a brief introduction to some key concepts, in case you're not familiar with Mozilla and Firefox. Mozilla and Firefox The term Mozilla can be used to refer to several concepts: the Mozilla project, the Mozilla Foundation, the Mozilla Corporation and the old Mozilla browser. Even Firefox is sometimes referred to as "Mozilla". If you're unfamiliar with these terms, it's good that you take some time and learn a little about Mozilla. This will help you understand the culture that surrounds the Mozilla community. Mozilla has spawned several products and projects, the most notable being the Mozilla Firefox web browser. Firefox is one of the most successful open source projects in history, combining the openness, standar...
...And 6 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
See Building an Extension for updated instructions. Now that we have a static overlay we're in good shape to create a XPI package that installs our extension as a dynamic overlay. XPIs have a complex structure designed to separate UI layers from each other. To make our XPI we'll start out by creating a directory to hold the files we're going to add to the XPI. Then we'll modify URLs in our files so they point to the right place. ...
...d.png These are the files we're going to put into the XPI. ...
...d to create two files in the directory, one called contents.rdf which contains information for the chrome registry about the component being installed and one called install.js that contains the code to install the component. ...
...And 6 more matches
contents.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- List all the skins being supplied by this theme --> <RDF:Seq about="urn:mozilla:skin:root"> <RDF:li resource="urn:mozilla:skin:mySkin/1.0" /> </RDF:Seq> <RDF:Description about="urn:mozilla:skin:mySkin/1.0" chrome:displayName="My Skin" chrome:accessKey="M" chrome:author="Me" chrome:description="This is my custom skin for mozilla" chrome:name="mySkin/1.0" chrome:image="preview.png"> <chrome:packages> <RDF:Seq about="urn:mozilla:skin:mySkin/1.0:packages"> <RDF:li resource="urn...
... State that we ...
... State that we work only with major version 1 of this package. --> <RDF:Desc...
...And 6 more matches
How to Write and Land Nanojit Patches - Archive of obsolete content
Obsolete since Gecko 11 (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8)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. 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. (Note: this document is called NanojitMerge for historical reasons -- Adobe and Mozilla used to have separate copies of Nanojit, but this was a maintenance headache so they were merged. The first version of this doc...
...ions of nanojit. (Note: this document is called NanojitMerge for historical reasons -- Adobe and Mozilla used to have separate copies of Nanojit, but this was a maintenance headache so they were merged. The first version of this document was written just after that merge occurred.) Resources Nanojit development now takes place on a single shared repository nanojit-central. ...
...Merge for historical reasons -- Adobe and Mozilla used to have separate copies of Nanojit, but this was a maintenance headache so they were merged. The first version of this document was written just after that merge occurred.) Resources Nanojit development now takes place on a single shared repository nanojit-central. ...
...And 6 more matches
Using gdb on wimpy computers - Archive of obsolete content
The debugger uses a lot of memory. How do I fix it? If your computer has less than 256 MB of memory, your computer will become unhappy as GDB loads Mozilla's shared libraries. The solution to this is to delay loading shared libraries until they are actually needed. However, you need to make sure that the base libraries like libc and pthreads are loaded before you tell GDB to stop loading shared libraries. If you don't allow those libraries to be loaded then GDB will not be able to properly debug threads on Linux. Mozilla uses pthreads for its networking library so you need to be able to work in a threaded environment. The best way to do this is to set a breakpoint in main, let the program run until main and then turn off automatic library loading. From there you can allow the program to continue...
...ded then GDB will not be able to properly debug threads on Linux. Mozilla uses pthreads for its networking library so you need to be able to work in a threaded environment. The best way to do this is to set a breakpoint in main, let the program run until main and then turn off automatic library loading. From there you can allow the program to continue running. ...
...hreads on Linux. Mozilla uses pthreads for its networking library so you need to be able to work in a threaded environment. The best way to do this is to set a breakpoint in main, let the program run until main and then turn off automatic library loading. From there you can allow the program to continue running. ...
...And 6 more matches
Building accessible custom components in XUL - Archive of obsolete content
rst browser to support DHTML Accessibility; it maps the declarations within the HTML page to the underlying accessibility architecture so that assistive technologies can "read" a web page and know how to present these complex controls to the end user. This has all been well-documented for some time. However, it is less well-known that the same DHTML Accessibility techniques can be applied to XUL, Mozilla's XML markup language for building user interfaces. (The Firefox interface itself is built in XUL, as well as the graphical interface presented by Firefox extensions.) XUL itself has a much richer set of built-in controls than HTML. There is generally no need to build your own XUL tab bar or treeview. Firefox ships with a tabbox element and a tree element, and these elements are fully accessible ...
...l value="dinner" flex="1"/> <label value="lodging" flex="1"/> <label value="breakfast" flex="1"/> <label value="lunch" flex="1"/> <label value="dinner" flex="1"/> </column> <-- several columns omitted for brevity --> </columns> </grid> </code> Now we can use CSS to add some minimal styling to make it actually look like a spreadsheet. ...
...-2.zip install stage-2.xpi Using the new DHTML Accessibility techniques in Firefox 1.5, we can declare the role of each element in our spreadsheet. The grid element is really a spreadsheet. Each label element is really a cell within the spreadsheet. Each description element is really a row or column header within the spreadsheet. You can find a list of all the supported roles in Firefox 1.5 on mozilla.org. Role declarations are a little confusing at first glance, but they all follow the same pattern. The role attribute itself is in the XHTML 2 namespace. We will need to declare the namespace (xmlns:x2="http://www.w3.org/TR/xhtml2") so we can add an xhtml2:role attribute to each XUL element. The role attribute value is also in a namespace. We will need to declare this namespace as well (xmlns:w...
...And 6 more matches
Building XULRunner with Python - Archive of obsolete content
n on Linux, see Mark Lise's Post With the Python extensions enabled XULRunner provides python script access to the DOM and XPCOM in addition to the usual Java Script. This gives access to Python features and modules and builds on Mark Hammond's pyXPCOM work from Active State. XPCOM components can also be created in Python. Currently (Mar 07) Python is not enabled by default so a custom build of Mozilla is needed. This page provides instructions in the hope of eliminating much trial and error. You should also read the the developer documentation on source code and building as wells as PyXPCOM XULRunner with Python promises to be a good platform for accessibility projects and both Jambu Alternative Input and the IAccessible2 test tool are using it. Of particular interested is access to MSAA and ...
...Studio 8 Express (MSVC8) you will almost certainly want to use Visual Studio .NET 2003 (MSVC71) which is not longer officially available. The issue is that XULRunner must be built with the same version of C as Python and with Python 2.5 that is MSVC71. Both must use the same version of the C runtime library MSVCRT?.DLL or crashes will ensue. The alternative is to build Python with MSVC8 as well asMozilla, but that may be problematic. It might also be possible to use the Open Source MinGW compiler with the correct MSVC run time but that is apparently not recommended. Apply any Service Packs and for MSVC71 SP 1 is available. The matching platform SDK is also needed and for MSVC71 that is .NET Framework SDK 1.1. The latest Mozilla Build system is easy to use. Install the included Python distro usi...
... to be installed for the build but will be useful later when installing Python packages which look for entries in the Windows' registry. Building The batch filestart-msvc71.bat is used to launch the build console (MSys from the MinGw project ). If you plan to checkout often into empty folders you could modify it to set the CVSROOT environment variable. set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot Having created amozilla project directory (e.g.C:\projects\mozilla or/c/projects/mozilla in msys) create the following .mozconfig file. Note this is complete and does not require the checkout of any other project specific .mozconfig files as sometimes shown. It effectively specifies a release build that is not particularly suitable for debugging XULRunner itself. It uses the trunk ...
...And 6 more matches
Gecko Compatibility Handbook - Archive of obsolete content
nline 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 were developed before the relevant W3C recommendations for H...
...imple code or that have updated to support standards. Set Up Browsers For Testing The various Gecko-based browsers do not always contain Netscape in the user-agent string. Thus it's critical to verify that you are properly detecting browsers such as AOL for macOS. You can either download the various browsers. Or, if you are using user-agent detection, you can install an extension in Firefox or Mozilla which allows you to "spoof" the user-agent strings of the various Gecko browsers. Here's how: Launch Mozilla or Firefox. The benefit of using these browsers is that if you're only detecting Netscape or Netscape6 you'll see the issues right away. Install the User Agent Switcher extension. After restarting your browser, add the the user-agent strings that you want to test to the list (Tools | ...
... than Netscape 4.x is to Gecko, due to increased support of W3C standards. Problem: Site certified on Netscape 6.x looks incorrect in other browsers If your site is already Gecko-compatible, try switching back to a Netscape 6 user-agent string. If it looks OK, you're probably detecting only Netscape or Netscape6. Detecting Gecko instead is the easy way to fix this as well as accomodate users of Mozilla, CompuServe 7, etc. (Related article) Problem: Site has problems in all Gecko-based browsers If you are still seeing problems, take a look at the troubleshooting section of this handbook. Also if you're using Netscape 4.x and Microsoft proprietary technologies, see Using Web Standards in Your Web Pages for a quick tutorial on what's different in Gecko. AOL or CompuServe Problems Even if your ...
...And 6 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
ance tests NOT done Linux (Nokia N810) ARMv5 supported, acceptance and performance tests NOT done Current Build Status The current Tamarin Tracing build status can be found at Tamarin Tracing Build Status Getting the Tamarin source The Tamarin Tracing source resides in Mercurial at Tamarin Tracing. Use the following command to create a copy of the Tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-tracing tamarin-tracing Building Tamarin Building Tamarin will create all the libraries for the AVMPlus and garbage collector (MMgc), and create a standalone executable, avmshell, for executing files in the ABC file format. Running avmshell without any arguments will list the available options. Note that additional command-line arguments are only available in the debug configuration.
...amarin will create all the libraries for the AVMPlus and garbage collector (MMgc), and create a standalone executable, avmshell, for executing files in the ABC file format. Running avmshell without any arguments will list the available options. Note that additional command-line arguments are only available in the debug configuration. ...
...Additionally, you need Python 2.4 or later and GNU make 3.81 or later. (GNU make 3.80 does not work. ...
...And 6 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
ension to WebDAV) is a protocol standardized by the IETF and used to remote-access or share contact information over a server. 68 Certificate authority Cryptography, Glossary, Security A certificate authority (CA) is an organization that signs digital certificates and their associated public keys. This certifies that an organization that requested a digital certificate (e.g., Mozilla Corporation) is authorized to request a certificate for the subject named in the certificate (e.g., mozilla.org). 69 Certified Apps, B2G, Firefox OS, Glossary, Security, Trustworthy Certified means that an application, content or data transmission has successfully undergone evaluation by professionals with expertise in the relevant field, thereby indicating completeness, secu...
..., Glossary A fetch metadata request header is a HTTP request header that provides additional information about the context the request originated from. These header names are prefixed with Sec- and thus they are forbidden header names so headers can not be modified from JavaScript. 145 Firefox OS B2G, Boot2Gecko, Firefox OS, Glossary, Infrastructure, Intro 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. 146 First CPU idle Glossary, Lighthouse, Performance, Web Performance First CPU Idle measures when a page is minimally interactive, or when the window is quiet enough to handle user input. It is a non-standard Google web performance met...
...ely Invoked Function Expressions (IIFE), Intro, JavaScript A function is a code snippet that can be called by other code or by itself, or a variable that refers to the function. When a function is called, arguments are passed to the function as input, and the function can optionally return a value. A function in JavaScript is also an object. 162 Fuzz testing Firefox, Fuzzing, Mozilla, QA, Security, Testing Fuzzing is a technique for testing software using automated tools to provide invalid or unexpected input to a program or function in a program, then checking the results to see if the program crashes or otherwise acts inappropriately. This is an important way to ensure that software is stable, reliable, and secure, and we use fuzzing a lot at Mozilla. 163 G...
...And 6 more matches
Multiprocess on Windows
s to do whatever we want with that request. Our callback implementation forwards the method call to the main thread in order to invoke the method on the wrapped object. The interceptor is also aware that any outparams, which contain interfaces, must also be wrapped with interceptors of their own. This code lives in the mscom library, located in the tree at /ipc/mscom. Its headers are exported to mozilla/mscom. Ensuring that the interceptor supports your interfaces This information is current, but is likely to change when bug 1346957 is landed. Interceptors cannot replicate interfaces without access to the metadata that describes those interfaces. Since we are using COM, we already generate metadata by declaring interfaces using midl. This does not (yet) work as transparently as we would lik...
...le 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 resources, then use RegisterProxy(). This is the preferred mechanism, as it will register both your OICF and typelib metadata. If you have a standalone...
... interface outputs an array of interfaces, the interceptor would only wrap the first element in the array, because it cannot distinguish between scalars and arrays. Note: If your new interface does not contain either of these annotations, then you do not need to worry about this step. ...
...And 6 more matches
Command line options
This page describes the commonly used options and how to use them. You can open the command line interface by pressing shift + F2. Syntax rules But first, let's describe the syntax rules that apply for all options. Command parameters containing spaces must be enclosed in quotes, such as "Joel User". Command actions are case insensitive. ...
...t apply for all options. Command parameters containing spaces must be enclosed in quotes, such as "Joel User". Command actions are case insensitive. Command parameters, except profile names, are case insensitive. Blank spaces ( ) separate commands and parameters. Each message option follows the syntax field=value, for example: to=foo@nowhere.net subject=cool page attachment=www.mozilla.org attachment='file:///c:/test.txt' body=check this page or also in Thunderbird 52 and newer: body=c:\path\to\file.txt Separate multiple message options by comma (,), for example: "to=foo@nowhere.net,subject=cool page" . Comma separators must not follow or precede spaces ( ). To assign multiple values to a field, enclose the values in single quotes ('), for example: "to='foo@nowhere...
... User profile -allow-downgrade Firefox 67's downgrade protection prevents accidentally starting Firefox in a profile running a later version of Firefox. Depending on changes between the two versions, some files in a profile may not be downwards compatible. Adding this option bypasses downgrade protection. -CreateProfile profile_name Create a new profile in the defau...
...And 6 more matches
Configuring Build Options
referable to add as few options as possible. Please read the following directions carefully before building, and follow them in order. Skipping any step may cause the build to fail, or the built software to be unusable. Build options, including options not usable from the command-line, may appear in "confvars.sh" files in the source tree. Using a mozconfig configuration file The choice of which Mozilla application to build and other configuration options can be configured in a mozconfig file. (It is possible to manually call configure with command-line options, but this is not recommended). The mozconfig file should be in your source directory (that is, /mozilla-central/mozconfig or /comm-central/mozconfig). Create a blank mozconfig file: echo "# My first mozilla config" > mozconfig If you...
...k will not find it. This is useful if you choose to have multiple mozconfig files for different applications or configurations (see below for a full example). Note that in the export example below the filename was not mozconfig. Regardless of the name of the actual file you use, we refer to this file as the mozconfig file in the examples below. Setting the mozconfig path: export MOZCONFIG=$HOME/mozilla/mozconfig-firefox Calling the file .mozconfig (with a leading dot) is also supported, but this is not recommended because it may make the file harder to find. This will also help when troubleshooting because people will want to know which build options you have selected and will assume that you have put them in your mozconfig file. mozconfig contains two types of options: Options prefixed...
...er value, e.g. -j1. Choose an application The --enable-application=application flag is used to select an application to build. Firefox is the default. Choose one of the following options to add to your mozconfig file: Browser (Firefox) ac_add_options --enable-application=browser Note: This is the default Mail (Thunderbird) ac_add_options --enable-application=comm/mail Mozilla Suite (SeaMonkey) ac_add_options --enable-application=suite Calendar (Lightning Extension, uses Thunderbird) ac_add_options --enable-application=comm/mail ac_add_options --enable-calendar Selecting build options The build options you choose depends on what application you are building and what you will be using the build for. If you want to use the build regularly, you will want a...
...And 6 more matches
Initial setup
n. They're not required for you to begin contributing, but will be required when you are preparing to produce an official release. For now, simply be aware that these will become important as your efforts progress. These accounts will store your code, contributions, and help you produce an official localization. hg (Mercurial) Mercurial is the revision control environment that houses the main Mozilla source code as well as localized code for each official Mozilla localization. You will need this for localizing Mozilla applications. Hg commit access is not necessary to begin localizing. After you have some experience with hg, you may want to get commit access. At that point, you must visit the Mozilla Committer page and follow the process outlined there. Here is an example bug that illustrates...
...See this wiki page about how to gain access to SVN. The SVN for Localizers guide will help you learn the most important SVN commands for l10n. ...
...See this wiki page about how to gain access to SVN. The SVN for Localizers guide will help you learn the most important SVN commands for l10n. Add a request about creating your locale's repository to the new locales newsgroup. ...
...And 6 more matches
DMD
belled "Save" or "Analyze reports" or "DMD"). The button won't be present in non-DMD builds, and will be grayed out in DMD builds if DMD isn't enabled at start-up. If you wish to trigger DMD dumps from within C++ or JavaScript code, you can use nsIMemoryInfoDumper.dumpMemoryToTempDir. For example, from JavaScript code you can do the following. const Cc = Components.classes; let mydumper = Cc["@mozilla.org/memory-info-dumper;1"] .getService(Ci.nsIMemoryInfoDumper); mydumper.dumpMemoryInfoToTempDir(identifier, anonymize, minimize); This will dump memory reports and DMD output to the temporary directory. identifier is a string that will be used for part of the filename (or a timestamp will be used if it is an empty string); anonymize is a boolean that indicates if the memory r...
...not mark files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec The final step is to make Android use the above wrapper script while launching Fennec, so that the environment variable is present when Fennec starts up. ...
...ennec starts up. Assuming you have done a local build, the app identifier will be org.mozilla.fennec_$USERNAME ($USERNAME is your username on the host machine) and so we do this as shown below. If you are using a DMD-enabled try build, or build from other source, adjust the app identifier as necessary. adb shell su # You need root access for the setprop command to take effect setprop wrap.org.mozilla.fennec_$USERNAME "/data/local/tmp/dmd_fennec" Once this is set up, starting the org.mozilla.fennec_$USERNAME app will use the wrapper script. ...
...And 6 more matches
Performance
Documentation Reporting a Performance Problem A user friendly guide to reporting a performance problem. A development environment is not required. Benchmarking Tips on generating valid performance metrics. Performance best practices in extensions A performance "best practices" guide for extension developers. Measuring Add-on Startup Performance A guide for add-on developers on how to set up a performance testing environment. ...
...m avoid impairing application performance. GPU performance Tips for profiling and improving performance when using a GPU. Scroll-Linked Effects Information on scroll-linked effects, their effect on performance, related tools, and possible mitigation techniques. Automated Performance Testing and Sheriffing Information on automated performance testing and sheriffing at Mozilla. Best practices for Front-end Engineers Tips for reducing impacts on browser performance in front-end code. Memory profiling and leak detection tools The Developer Tools "Memory" panel The memory panel in the devtools supports taking heap snapshots, diffing them, computing dominator trees to surface "heavy retainers", and recording allocation stacks. ...
...mance in front-end code. Memory profiling and leak detection tools The Developer Tools "Memory" panel The memory panel in the devtools supports taking heap snapshots, diffing them, computing dominator trees to surface "heavy retainers", and recording allocation stacks. about:memory about:memory is the easiest-to-use tool for measuring memory usage in Mozilla code, and is the best place to start. It also lets you do other memory-related operations like trigger GC and CC, dump GC & CC logs, and dump DMD reports. about:memory is built on top of Firefox's memory reporting infrastructure. DMD DMD is a tool that identifies shortcomings in about:memory's measurements, and can also do multiple kinds of general heap profiling. Are We Slim Yet ...
...And 6 more matches
JSS Provider Notes
It implements cryptographic operations in native code using the NSS libraries. Contents Signed JAR file Installing the Provider Specifying the CryptoToken Supported Classes What's Not Supported Signed JAR file JSS 3.2 implements several JCE (Java Cryptography Extension) algorithms. These algorithms have at various times been export-controlled by the US government. ...
...atically verifies this signature whenever a JSS class is loaded that implements a JCE algorithm. The verification is transparent to the application (unless it fails and throws an exception). If you are curious, you can verify the signature on the JAR file using the jarsigner tool, which is distributed with the JDK. If you build JSS yourself from source instead of using binaries downloaded from mozilla.org, your JAR file will not have a valid signature. This means you will not be able to use the JSS provider for JCE algorithms. You have two choices. Use the binary release of JSS from mozilla.org. Apply for your own JCE code-signing certificate following the procedure at How to Implement a Provider for the JavaTM Cryptography Extension. Then you can sign your own JSS JAR file. ...
...This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. rsaKpg.initialize(1024); KeyPair rsaPair = rsaKpg.generateKeyPair(); // Generate a DSA KeyPair. This ...
...And 6 more matches
NSS 3.12.4 release notes
NSS 3.12.4 requires NSPR 4.8. This is not a hard requirement. Our QA tested NSS 3.12.4 with NSPR 4.8, but it should work with NSPR 4.7.1 or later. ...
... NSS 3.12.4 requires NSPR 4.8. This is not a hard requirement. Our QA tested NSS 3.12.4 with NSPR 4.8, but it should work with NSPR 4.7.1 or later. You can check out the source from CVS by cvs co -r NSPR_4_8_RTM NSPR cvs co -r NSS_3_12_4_RTM NSS See the Documentation section for the build instructions. ...
...la.org:/cvsroot, with the CVS tag NSS_3_12_4_RTM. NSS 3.12.4 requires NSPR 4.8. This is not a hard requirement. Our QA tested NSS 3.12.4 with NSPR 4.8, but it should work with NSPR 4.7.1 or later. You can check out the source from CVS by cvs co -r NSPR_4_8_RTM NSPR cvs co -r NSS_3_12_4_RTM NSS See the Documentation section for the build instructions. NSS 3.12.4 source is also available on ftp.mozilla.org for secure HTTPS download: Source tarball: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_4_RTM/src/. Major changes in NSS 3.12.4 NSS 3.12.4 is the version that we submitted to NIST for FIPS 140-2 validation. Currently NSS 3.12.4 is in the "Review Pending" state in the FIPS 140-2 pre-validation list at http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140InProces...
...And 6 more matches
Notes on TLS - SSL 3.0 Intolerant Servers
Problem A number of Netscape 6.x/7.x and Mozilla users have reported that some secure sites -- typically sites featuring online transactions or online banking over the HTTPS protocol -- do not display any content at all. The connection seems terminated and a blank page is displayed. This is the main symptom of the problem when Mozilla based browsers encounter TLS/SSL 3.0 intolerant servers. Cause There are some number of web servers in production today which incorrectly implement the SSL 3.0 specification. This incorrect implementation causes them to reject connection attempts from clients that are compliant with the SSL 3.0 and TLS (aka SSL 3.1) specifications. ...
... Technical Information The SSL 3.0 and TLS (aka SSL 3.1) specs both contain a provision -- the same provision -- for detecting "version rollback attacks". ...
...able with TLS/SSL spec-compliant clients. Normally the servers which have this problem are not equipped to deal with the TLS protocol, but instead of rolling back to SSL 3.0 as the rollback provision provides, they terminate/drop the connection, thus resulting in most cases a blank page display. For up-to-date information, you can read a Bugzilla bug report which keeps track of this problem with Mozilla-based browsers. See bug 59321. Servers currently known to exhibit this intolerant behavior As of this writing, this problem has been reported for the following servers: (Wherever there is an upgraded version which fixes the problem, it is indicated by an asterisked remark in the parentheses. ) Domino-Go-Webserver/4.6.2.6 (and perhaps some later versions) IBM_HTTP_Server/1.3.6.3 or earlier (...
...And 6 more matches
Querying Places
eries(). Within one query object, all parameters are ANDed together. The conditions for different query objects are then ORed together. This allows for a simpler implementation and interface than a full logical operation with nested clauses while still being expressive. ...
...th nested clauses while still being expressive. Example of querying for any pages I've visited that contain the word "firefox" in the title/URL or that I've visited today from mozilla.org. ...
...The current behavior does the normal query and then selects keywords from the first query and filters all the results. ...
...And 6 more matches
Avoiding leaks in JavaScript XPCOM components
This article needs to be updated to reflect the changes and the cases where they help. Take every information on this site with a grain of salt, although most concepts and best practices still apply. Using XPCOM in JavaScript (also known as XPConnect) is an environment where memory management issues are not obvious. There are no calls to malloc and free and no reference counting. ...
... issues are not obvious. There are no calls to malloc and free and no reference counting. Despite this, it's easy to write JavaScript code that leaks. It's easy to write leaky code in any garbage-collected language. But it's even easier in this environment because some of the objects you're dealing with are reference-counted behind the scenes. Programmers writing and reviewing JavaScript code in Mozilla should understand how code using XPCOM in JavaScript can leak so that they can avoid leaks. This document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common JavaScript patterns that cause leaks. Basics of memory management Creating objects that are not a fixed size for the lifetime of the program (global variables) or a fixed si...
... also apply to reference counting as well. Garbage collection Garbage collection is generally used to refer to algorithms that (1) determine which objects are still needed by starting from a set of roots and finding all objects reachable from those objects and (2) returning all remaining objects to the heap. The roots include things like global variables and variables on the current call stack. Mozilla's JavaScript engine uses one of the most common garbage collection algorithms, mark and sweep, in which the garbage collector clears the mark bit on each object, sets the mark bits on all roots and all objects reachable from them, and then finalizes all objects not marked and returns the memory they used to the heap. Garbage collection (at least when the term is not used to refer to lesser algor...
...And 6 more matches
nsIMacDockSupport
widget/nsIMacDockSupport.idlScriptable Provides access to the Dock on Mac OS X. 1.0 66 Introduced Gecko 2.0 Inherits from: nsIMacDockSupport Last changed in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Implemented by: @mozilla.org/cookie-monster;1. 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. Method summary void activateApplication(in boolean aIgnoreOtherApplications); Attributes Attribute Type Description badgeText AString Text to display in a badge on the application's dock icon. This can be used, for example,...
...se, the application is only activated if other applications are not currently active. About dockMenu By default Firefox adds two menu items to the dock menu. The menu items are "New Window" and "New Private Window". If permanent private browsing mode is enabled then the "New Private Window" menu item is hidden. ...
...ication is only activated if other applications are not currently active. About dockMenu By default Firefox adds two menu items to the dock menu. The menu items are "New Window" and "New Private Window". If permanent private browsing mode is enabled then the "New Private Window" menu item is hidden. ...
...And 6 more matches
nsIZipWriter
ueue is in progress will throw an NS_ERROR_IN_PROGRESS exception. File and directory names should use slashes ("/") as separators and should not begin with a slash. Note: Although it is not necessary to add directory entries in order to add file entries within them, some Zip utilities may have problems with that, so it may be best to add the directory entries explicitly first. ...
... should use slashes ("/") as separators and should not begin with a slash. Note: Although it is not necessary to add directory entries in order to add file entries within them, some Zip utilities may have problems with that, so it may be best to add the directory entries explicitly first. Implemented by: @mozilla.org/zipwriter;1. ...
...t to add the directory entries explicitly first. void addEntryDirectory( in AUTF8String aZipEntry, in PRTime aModTime, in boolean aQueue ); Parameters aZipEntry The path of the directory entry to add to the Zip file.Note: You must use forward slashes in the path. ...
...And 6 more matches
XPCOM primitive
Primitives are rarely useful. The main use case is to store primitive values in a data structure that can only store XPCOM objects, such as nsIArray. Also, certain APIs, such as nsITransferable.setTransferData(), require primitives. ...
...equire primitives. ...
... uuid(d18290a0-4a1c-11d3-9890-006008962422)] interface nsISupportsID : nsISupportsPrimitive { attribute nsIDPtr data; string toString(); }; AString nsISupportsString @mozilla.org/supports-string;1 [scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)] interface nsISupportsString : nsISupportsPrimitive { attribute AString data; wstring toString(); }; PRBool nsISupportsPRBool @mozilla.org/supports-PRBool;1 [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)] interface nsISupportsPRBool : nsISupportsPrimitive { attribute PRBool data; string toString(); }; PRUint8 nsISupportsPRUint8 @mozilla.org/supports-PRUint8;1 [scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)] interface nsISupportsPRUint8 : nsISupportsPrimitive { attribute PRUint8 data; string toS...
...And 6 more matches
Working with windows in chrome code
It contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows. Opening windows From a <script> in a window or an overlay To open a new window, we usually use a window.open or window.openDialog DOM call, like this: var win = window.open("chrome://myextension/content/about.xul", "aboutMyExtension", "chrome,centerscreen"); The first parameter to window.open is the URI of the XUL file that describes the window and its contents. ...
...rently, including always assuming the dialog feature is specified. From XPCOM components and modules If the Window object is unavailable (for example, when opening a window from XPCOM component code), you might want to use nsIWindowWatcher interface. Its parameters are similar to window.open; in fact, window.open's implementation calls nsIWindowWatcher's methods. var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var win = ww.openWindow(null, "chrome://myextension/content/about.xul", "aboutMyExtension", "chrome,centerscreen", null); Window object Note the win variable in the above section, which is assigned the return value of window.open. It can be used to access the opened ...
... Window when it has a more useful example Opener code: window.openDialog("chrome://test/content/progress.xul", "myProgress", "chrome,centerscreen", {status: "Reading remote data", maxProgress: 50, progress: 10} ); progress.xul: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window onload="onLoad();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script><![CDATA[ var gStatus, gProgressMeter; var maxProgress = 100; function onLoad() { gStatus = document.getElementById("status"); gProgressMeter = document.getElementById("progressmeter"); if("arguments" in window && window.arguments.length > 0) { maxProgress = window.arguments[0].maxProgress; setProgress(window.arguments[0].progr...
...And 6 more matches
Link prefetching FAQ - HTTP
scribed in RFC 5988 section 5. The browser observes all of these hints and queues up each unique request to be prefetched when the browser is idle. There can be multiple hints per page, as it might make sense to prefetch multiple documents. For example, the next document might contain several large images. Some more examples follow: <link rel="prefetch alternate stylesheet" title="Designed for Mozilla" href="mozspecific.css"> <link rel="next" href="2.html"> Are anchor (<a>) tags prefetched? No, only <link> tags with a relation type of next or prefetch are prefetched. However, if there is sufficient interest, we may expand link prefetching support to include prefetching <a> tags, which include a relation type of next or prefetch in the future. Doing so would probably help content providers a...
...so would probably help content providers avoid the problem of stale prefetching links. Is link prefetching standards compliant? Yes, link prefetching as outlined in this document does not violate any existing web standards. In fact, the HTML 4.01 specification explicitly allows for the definition of new link relation types (see Section 6.12: Link types). However, the exact mechanism employed by Mozilla is not yet standardized. An Internet-Draft is in the works. Standardization of this technique is part of the scope of HTML 5, see the current working draft, section ?5.11.3.13. Link type "prefetch". How is browser idle time determined? In the current implementation (Mozilla 1.2), idle time is determined using the nsIWebProgressListener API. We attach a listener to the toplevel nsIWebProgress o...
...et standardized. An Internet-Draft is in the works. Standardization of this technique is part of the scope of HTML 5, see the current working draft, section ?5.11.3.13. Link type "prefetch". How is browser idle time determined? In the current implementation (Mozilla 1.2), idle time is determined using the nsIWebProgressListener API. We attach a listener to the toplevel nsIWebProgress object ("@mozilla.org/docloaderservice;1"). From this, we receive document start & stop notifications, and we approximate idle time as the period between the last document stop and the next document start. The last document stop notification occurs roughly when the onLoad handler would fire for the toplevel document. This is when we kick off prefetch requests. If a subframe contains prefetching hints, prefetching ...
...And 6 more matches
2015 MDN Fellowship Program - Archive of obsolete content
applications. This page is a historical archive, originally hosted at /fellowship, and was localized. More information: MDN/DeveloperFellowship wiki page. Announcing the MDN Fellows! blog post, May 14 2015. MDN Fellows Successfully Oriented blog post, July 6 2015. MDN Fellows: What They Did & What's Next blog post, September 23, 2015. 2015 MDN Fellowship Program Launching in Q1 2015, the Mozilla Developer Fellowship intends to accelerate the involvement of highly-skilled and experienced web developers with the open web. Who Web and mobile developers with an established track record of contributions and expertise in a specific web technology, function or domain who wish to increase the effectiveness of their teaching and communications. What Seven weeks of partnering closely with Mozi...
...To support our efforts, the Fellow will review various technical specifications to identify gaps between the documentation and current situation and refine existing tests to adapt to this cross-browser test harness. ...
...urrent situation and refine existing tests to adapt to this cross-browser test harness. Activities and Deliverables Identify gaps between existing documentation and current development environments. The work would entail refining existing tests to adapt to this framework. Required skills and experience Experience and comfort writing Javascript test scripts. Mentor Information Josh Matthews, Mozilla Platform Group. GitHub: jdm Twitter: @lastontheboat Service Workers Brief Project Description Service workers essentially act as proxy servers that sit between web applications, the browser and (when available) the network. They enable the creation of effective offline experiences and wiill also allow access to push notifications and background sync APIs. Activities and Deliverables Wri...
...And 5 more matches
Content Scripts - Archive of obsolete content
ing content scripts You can load a single script by assigning a string to either the contentScript or the contentScriptFile option. The contentScript option treats the string itself as a script: // main.js var pageMod = require("sdk/page-mod"); var contentScriptValue = 'document.body.innerHTML = ' + ' "<h1>Page matches ruleset</h1>";'; pageMod.PageMod({ include: "*.mozilla.org", contentScript: contentScriptValue }); The contentScriptFile option treats the string as a resource:// URL pointing to a script file stored in your add-on's data directory. jpm doesn't make a "data" directory by default, so you must add it and put your content scripts in there. This add-on supplies a URL pointing to the file "content-script.js", located in the data subdirectory under the...
... in your add-on's data directory. jpm doesn't make a "data" directory by default, so you must add it and put your content scripts in there. ...
... Instead, keep the script in a separate file and load it using contentScriptFile. This makes your code easier to maintain, secure, debug and review. ...
...And 5 more matches
util/match-pattern - Archive of obsolete content
ify patterns using a regular expression: var { MatchPattern } = require("sdk/util/match-pattern"); var pattern = new MatchPattern(/.*example.*/); The regular expression is subject to restrictions based on those applied to the HTML5 pattern attribute. In particular: The pattern must match the entire value, not just any subset. ...
...ue, not just any subset. For example, the pattern /moz.*/ will not match the URL http://mozilla.org. The expression is compiled with the global, ignoreCase, and multiline flags disabled. The MatchPattern constructor will throw an exception if you try to set any of these flags. ...
... For example, the pattern /moz.*/ will not match the URL http://mozilla.org. The expression is compiled with the global, ignoreCase, and multiline flags disabled. The MatchPattern constructor will throw an exception if you try to set any of these flags. ...
...And 5 more matches
XPCOM Objects - Archive of obsolete content
<< PreviousNext >> XPCOM XPCOM is a cross platform component object model, similar to Microsoft COM. Taken from the XPCOM page. Firefox can be seen as composed of two layers. The largest of the two is a compiled platform, mostly written in C++. On top of it lies the chrome, mostly written in XML, Javascript and CSS. In fact, you can separate the two. We often mention other "Mozilla based applications". Well, those are applications that, simply put, take the underlying platform with perhaps a few changes and additions, and then write their own chrome layer. This lower layer is called XULRunner, and it is a very powerful platform, providing a very robust development base for web-enabled, cross-platform applications. The fact that it allows to easily create OS-independent applications is ...
...rome) communicate. Most of the objects and functions in the lower layers are hidden from the chrome; those that need to be publicized are exposed through XPCOM components and interfaces. You can think of XPCOM as a reference to all the capabilities available on the lower layers of Firefox. Using XPCOM components is relatively simple, as you've seen in previous examples. this.obsService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); The Cc object (Components.classes) is an index to static objects and class definitions available through XPCOM. The string between the brackets is just an identifier, in this case corresponding to the Observer service. You'll usually know what string to use by reading examples and documentation. There is no comprehensive list of these...
... be extended by add-ons. If you want to see the list in your current Firefox installation, just run the following code in the Error Console: var str = ""; for (var i in Components.classes) { str += i + "\n" }; str A run on Firefox 3.6.2 with a few extensions installed yields 876 strings. That's quite a lot. Luckily, you'll only need to know a handful of those for extension development. The @mozilla.org/ prefix is just a way to keep things namespaced. We would use something like @xulschool.com/ to make our own components. Components are either services (static objects) or instances of classes, just like the objects we handle in JS. The method you call on Cc["some-string"] should either be getService or createInstance, depending on what you're asking for. In most cases it is very clear which...
...And 5 more matches
Tabbed browser - Archive of obsolete content
aces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindow); mainWindow.gBrowser.addTab(...); From a dialog If your code is running in a dialog opened directly by a browser window, you can use: window.opener.gBrowser.addTab(...); If window.opener doesn't work, you can get the most recent browser window using this code: var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var mainWindow = wm.getMostRecentWindow("navigator:browser"); mainWindow.gBrowser.addTab(...); Opening a URL in a new tab // Add tab gBrowser.addTab("http://www.google.com/"); // Add tab, then make active gBrowser.selectedTab = gBrowser.addTab("http://www.google.com/"); Manipulating con...
...ncommand="myExtension.foo(event)" onclick="checkForMiddleClick(this, event)" label="Click me"/> JS: var myExtension = { foo: function(event) { openUILink("http://www.example.com", event, false, true); } } Opening a URL in an on demand tab Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "gSessionStore", "@mozilla.org/browser/sessionstore;1", "nsISessionStore"); // Create new tab, but don't load the content. var url = "https://developer.mozilla.org"; var tab = gBrowser.addTab(null, {relatedToCurrent: true}); gSessionStore.setTabState(tab, JSON.stringify({ entries: [ { title: url } ], userTypedValue: url, userTypedClear: 2, lastAccessed: tab.lastAccessed, ...
...r window (for example, help or about information) or external (on-line http(s)://) HTML documents when the user clicks an extension's button or link. The following code demonstrates how to re-use an existing tab that already displays the desired URL/URI. If no such tab exists, a new one is opened with the specified URL/URI. ...
...And 5 more matches
Locked config settings - Archive of obsolete content
Putting into place locked configuration settings This feature exists for Mozilla and Firefox, but not for Thunderbird Locked settings can be put into a mozilla.cfg file in the C:\Program Files\mozilla.org\Mozilla directory. The mozilla.cfg file is an encoded file of javascript commands. The encoding is a simple "byte-shifting" with an offset of 13 (netscape 4 used a similar encoding, but with a of 7 instead). ...
...r Mozilla and Firefox, but not for Thunderbird Locked settings can be put into a mozilla.cfg file in the C:\Program Files\mozilla.org\Mozilla directory. The mozilla.cfg file is an encoded file of javascript commands. The encoding is a simple "byte-shifting" with an offset of 13 (netscape 4 used a similar encoding, but with a of 7 instead). ...
...d Firefox, but not for Thunderbird Locked settings can be put into a mozilla.cfg file in the C:\Program Files\mozilla.org\Mozilla directory. The mozilla.cfg file is an encoded file of javascript commands. The encoding is a simple "byte-shifting" with an offset of 13 (netscape 4 used a similar encoding, but with a of 7 instead). This file also needs to be "called" from C:\Program Files\mozilla.org\Mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); Note: Newer versions of Mozilla or Firefox store the all.js file in greprefs rather than defaults\pref The moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg ... and to decode mozilla.cfg files: moz-byteshift.pl -s -13 <mozilla.cfg >m...
...And 5 more matches
In-Depth - Archive of obsolete content
System Colours CSS2 defines colours which are the same as your operating systems theme. A list of the different operating system colours can be found on the W3C's web site. Mozilla CSS Properties Mozilla.org created their own CSS properties to allow them to use the technology for the UI of Mozilla. All of the properties follow the W3C's standards for vendor extensions, which is why they all begin with -moz. This is only a list of properties which may be useful to you; it is in no way all of the Mozilla specific properties available. Other sites which list Mozilla specific CSS properties XulPlanet.com [dead link, 26.03.13] Mozilla-prefixed properties on the standard track 26.03.13 -moz-appearance Makes a widget look like it's from your operating system. Possible are (This is probably an in...
...x); -moz-opacity Makes boxes semi-transparent. It takes a decimal value, 0.00 is invisible and 1.00 is totally visible. How do I know what to Modify? Now that you've got everything extracted and you know how to modify items, you might be wondering, how do I know where everything is? Well there is an easy way to find out - Using the DOM Inspector. If you didn't install it when you first installed Mozilla you may have to run the installer again. Load mozilla and one browser window. Then open the DOM Inspector (Tools->Web Development->DOM Inspector). Click File->Inspect and select the browser window. What appears in a tree view below is the actual code for the interface. Using this, we can figure out what objects are where, what classes/id's they have applied to them, and most importantly, which fi...
...groups of styles that are applied to this object. When you select an item in the list the bottom portion will display the actual styles that are applied. Go through this list one item at a time and find the one which applies the image to the button (.toolbarButton-1). Look at the file column. It says that the file is located in chrome://navigator/skin/. This is a small problem with the display in Mozilla 1.2 what it means is \navigator\navigator.css (Most of the time it displays the file correctly, but sometimes, like in this case, it does not). Go into \mySkin\navigator and load navigator.css. You'll notice that the .toolbar-1 class is located here. Now you can point the image to wherever you like. The image that is listed there by default (chrome://navigator/skin/icons/btn1.gif) is actually a b...
...And 5 more matches
Downloading Nightly or Trunk Builds - Archive of obsolete content
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). ...
...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). ...
...hange. 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" is used for...
...And 5 more matches
Makefile.mozextension.2 - Archive of obsolete content
The same goes for this slight Makefile rework here. ...
...The same goes for this slight Makefile rework here. ...
...This Makefile is a modification of the Makefile.mozextention, found in Makefile for packaging an extension - MozillaZine Knowledge Base (2005). Note that the original Makefile.mozextention merely repeats the steps in Getting started with extension development - MozillaZine Knowledge Base (2008). The same goes for this slight Makefile rework here. ...
...And 5 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
, false); toolbox.palette.appendChild(button); This code is thanks to dgutov and is seen in full context at his repository here at GitHub: dgutov / bmreplace / bootstrap.js. Watch for a snippet that you can copy and paste into Scratchpad, and then run on Gists@GitHub here: _ff-addon-snippet-AddToolbarButtonToPalette.js . It is based on the code from the repo above. ...
... an element and then appendChild to the toolbar (document.getElementById('nav-bar')) or appendChild to the addon bar (document.getElementById('addon-bar')) is that once in the toolbar palette, users can configure it through the customize menu. They can drag it to the addon bar or to the toolbar. Styling the button Most toolbar buttons have icons. To attach an image to the button we use standard Mozilla skinning facilities. If you're unfamiliar with how that works, read the skinning section of Jonah Bishop's excellent Toolbar Tutorial. Although the article covers creating an entire toolbar, rather than just a button, it has a great explanation of the techniques we'll use here. Icon size Toolbar buttons can have two different sizes -- big and small. This means you'll need to provide two icons f...
...e.manifest file: style chrome://global/content/customizeToolbar.xul chrome://myextension/skin/toolbar-button.css If you are developing for Firefox 1.0, attach it to the Customize Toolbar window (chrome://global/content/customizeToolbar.xul) using skin/contents.rdf. ...
...And 5 more matches
Skinning XUL Files by Hand - Archive of obsolete content
ges. To skin a XUL file means to change the overall look of that file by changing its style information. In the very near future, it will be possible to skin XUL files dynamically and completely -- by pressing a button, selecting a skin from a menu, or by accepting a skin from over the web. When this day comes, skins defined in a global skin file will be applied to a whole application -- like the Mozilla browser -- so that all the various windows and parts will look consistent. In the meantime, however, skinning a file requires some manual interaction. This article can help you get started understanding skins and creating skins for XUL. It presumes you have at least basic understanding of XUL and the Application Object Model that XUL describes. Following the instructions here, you are going to cr...
...hing in the front end of an application. Much of what makes XUL look (and act!) the way it does comes from the CSS for each XUL element. CSS2, for example, gives you control over the absolute positioning of any element within its parent element. Also, most of the behavior that buttons exhibit comes from styles and an event model based on JavaScript that dynamically switches between these styles. Mozilla's current global skin defines this basic behavior for several classes of button. A button is styled by the global skin when its class attribute is set to a class which is defined in the global skin. For example, when a button is defined as follows: <button class="plain" label="Push Me" /> Then the following very simple style definition applies to that button. button.plain { border: 0px !impor...
...mple, when a button is defined as follows: <button class="plain" label="Push Me" /> Then the following very simple style definition applies to that button. button.plain { border: 0px !important; } The global skin, in which styles for these several button classes and dozens of other elements are defined, is described in the following section. If you want to use the classes already defined in Mozilla's global skin to style your elements, you may do so. But you may also want to define new classes of buttons particular to your XUL file, in which case the style information will be wholly defined within your custom CSS file. Reading the Global Skin It's very important to familiarize yourself with the basic style definitions in the global skin before you set out creating your own stylesheet. CSS...
...And 5 more matches
2006-11-03 - Archive of obsolete content
11 2006. When he builds using the disable.crypto option he encounters the following problem: No rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'. ...
...11 2006. When he builds using the disable.crypto option he encounters the following problem: No rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'. ...
...11 2006. When he builds using the disable.crypto option he encounters the following problem: No rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'. ...
...And 5 more matches
2006-11-10 - Archive of obsolete content
Summary: mozilla.dev.builds - November 4th to November 10th 2006 Browser Buttons November 4th: Mojr wants to know if Firefox has a similar feature that the new IE 6 has built in. This feature consists of creating buttons using a small program, that allows you to create shortcuts to a particular address. The button gets added to the toolbar, separate from the links. Reflow branch build failed with VC 7.1 SP1 November 8th: Roy received an error when he tried to reflow a branch build using VC 7.1 SP1. On the same day he posted the answer to his posting that he found in last weeks posting. Click here to see the answer to the problem. building xulrunner application with mozilla November 8th: Kirans is trying to build Mozilla with XULRunner option on a windows machine. When h...
... November 9th: Jonathan Watt responded to his posting stating that he must have the wrong line endings in his mozconfig or some other script fill that he is probably using to run. ...
... Announcements There are no announcements this week. Meetin...
...And 5 more matches
Examples - Archive of obsolete content
cript> </head> <body> <h1>Problem 2 - Comments in XHTML</h1> <p> This document is valid XHTML 1.0 Strict served as <code>application/xhtml+xml</code>. </p> <p> This document contains inline CSS rules contained in a <code>style</code> element and surrounded by a Comment and JavaScript contained in a <code>script</code> element and surrounded by a Comment. ...
...1.0 Strict served as <code>application/xhtml+xml</code>. </p> <p> This document contains inline CSS rules contained in a <code>style</code> element and surrounded by a Comment and JavaScript contained in a <code>script</code> element and surrounded by a Comment. ...
...ld;} --> </style> </head> <body> <h1>Example 1 - XHTML 1.0 Strict as text/html</h1> <p> This document is valid XHTML 1.0 Strict served as <code>text/html</code>. </p> <p> This document contains inline CSS rules contained in a <code>style</code> element and surrounded by a SGML Comment. </p> <p> Note how the CSS rules for the background are applied in Netscape 7.x, Mozilla, Opera 7 and Internet Explorer 5.5+. </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="Valid XHTML 1.0!" height="31" width="88" /></a> </p> </body> </html> Back to the article Example 2 <!-- This file should have a .xml extension --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//...
...And 5 more matches
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
Warning: The content of this article may be out of date. This article was written on August 31, 2001; it is not compatible with current versions of Firefox. This article applies to Mozilla versions 0.9.2 and higher and Netscape versions 6.1 and higher. It does not cover Netscape 6 and 6.01 Introduction Plugins that used to take advantage of being scriptable via LiveConnect in 4.x Netscape browsers lost this possibility in the new world. The main reason for this is that there is no guarantee of Java compatibility on a binary level due to the jri/jni switch. The new Mozilla XPCOM architecture allows XPCOM components be scriptable via a different mechanism called XPConnect. We leverage some of these ideas to help you make your Netscape Communicator 4.x plugins exposed to JavaScript i...
...rowsers lost this possibility in the new world. The main reason for this is that there is no guarantee of Java compatibility on a binary level due to the jri/jni switch. The new Mozilla XPCOM architecture allows XPCOM components be scriptable via a different mechanism called XPConnect. We leverage some of these ideas to help you make your Netscape Communicator 4.x plugins exposed to JavaScript in Mozilla based browsers. In order to make it still possible to script plugins, some changes have been made to the Mozilla code. The changes allow to make existing 4.x plugins scriptable with only minor modifications in their code. ...
...The old Plugin API call NPP_GetValue is used to retrieve this information from the plugin. ...
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
ple, the <select> element can have its options displayed and cycled between using the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...ect> element can have its options displayed and cycled between using the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
ple, the <select> element can have its options displayed and cycled between using the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...ect> element can have its options displayed and cycled between using the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...the up and down arrow keys. Note: Different browsers may have different keyboard control options available. See Using native keyboard accessibility for more details. You essentially get this behavior for free, just by using the appropriate elements, e.g. ...
...And 5 more matches
Debugging on Windows
Ways to start the debugger First of all, it's necessary to install a Visual Studio extension to be able to follow child processes as they are created. Firefox, in general, and even in non-e10s mode, does not start the main process directly, it starts it via a Launcher Process. This means that Visual Studio will only attach to the first process it finds, and will not hit any break-point (and even notifies you that it cannot find their location). ...
...tup project, by right clicking on it (it appears bold when it's the case) can be useful. Breakpoints are kept across runs, this can be a good way to debug startup issues. Run the program until you hit an assertion. You will get a dialog box asking if you would like to debug. Hit "Cancel". The MSDEV IDE will launch and load the file where the assertion happened. This will also create a Visual C++ Mozilla project in the directory of the executable by default. Attach the debugger to an existing Mozilla process. In the Visual Studio, select Debug > Attach to Process. If you want to debug a content process, you can hover on the tab of page you want to debug, which would show the pid. You can then select the process from dialog opened from "Attach to Process". For more information, see Attach to Run...
...sual Studio, select Debug > Attach to Process. If you want to debug a content process, you can hover on the tab of page you want to debug, which would show the pid. You can then select the process from dialog opened from "Attach to Process". For more information, see Attach to Running Processes with the Visual Studio Debugger. Debugging Release and Nightly Builds Refer to the steps to use the Mozilla symbol server and source server. Creating a Visual C++ project for Firefox Please refer to the documentation on firefox-source-docs. Changing/setting the executable to debug VC++ 6.0: To change or set the executable to debug, go to Project > Settings..., Debug tab and select General from the drop down list. "Executable for debug session:" should show the executable you are debugging. If it is...
...And 5 more matches
Developer guide
There are lots of ways to contribute to the Mozilla project: coding, testing, improving the build process and tools, or contributing to the documentation. This guide provides information that will not only help you get started as a Mozilla contributor, but that you'll find useful to refer to even if you are already an experienced contributor. Documentation topics Getting Started A step-by-step beginner's guide to getting involved with Mozilla. For new Mozilla developers A directory of articles which are particularly helpful for new Mozilla developers. Working with Mozilla Source Code A code overview, how to get the code, and the coding style guide. Build Instructions How to build Firefox, Thunderbird, SeaMonkey, or other Mozilla applications. Development process overview ...
...tting involved with Mozilla. For new Mozilla developers A directory of articles which are particularly helpful for new Mozilla developers. Working with Mozilla Source Code A code overview, how to get the code, and the coding style guide. Build Instructions How to build Firefox, Thunderbird, SeaMonkey, or other Mozilla applications. Development process overview An overview of the entire Mozilla development process. Managing multiple profiles When working with prerelease versions of Firefox, it's often helpful to have multiple Firefox profiles, such as one for each channel, or for different kinds of testing. Getting documentation updated How to ensure that documentation is kept up to date as you develop. ...
... applications. Development process overview An overview of the entire Mozilla development process. Managing multiple profiles When working with prerelease versions of Firefox, it's often helpful to have multiple Firefox profiles, such as one for each channel, or for different kinds of testing. Getting documentation updated How to ensure that documentation is kept up to date as you develop. Mozilla modules and module ownership This article provides information about Mozilla's modules, what the role of a module owner is, and how module owners are selected. Code snippets Useful code samples for a wide variety of things you might need to figure out how to do. Mozilla development strategies Tips for how to make the most of your time working on the Mozilla project. Debugging Find helpful ...
...And 5 more matches
Namespace
Below, find links to articles about C++ classes Mozilla uses within various namespaces, primarily the mozilla namespace. ...
... Below, find links to articles about C++ classes Mozilla uses within various namespaces, primarily the mozilla namespace. ...
... Below, find links to articles about C++ classes Mozilla uses within various namespaces, primarily the mozilla namespace. ...
...And 5 more matches
4.3 Release Notes
ypomanager.initialize method or using the NSS environment variable NSS_DEFAULT_DB_TYPE. ...
...all NSS 3.12 initialization options (see InitializationValues) New SSL error codes (see http://mxr.mozilla.org/security/sour...util/SSLerrs.h) SSL_ERROR_UNSUPPORTED_EXTENSION_ALERT SSL_ERROR_CERTIFICATE_UNOBTAINABLE_ALERT SSL_ERROR_UNRECOGNIZED_NAME_ALERT SSL_ERROR_BAD_CERT_STATUS_RESPONSE_ALERT SSL_ERROR_BAD_CERT_HASH_VALUE_ALERT New TLS cipher suites (see http://mxr.mozilla.org/security/sour...SSLSocket.java): TLS_RSA_WITH_CAMELLIA_128_CBC_SHA TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA TLS_RSA_WITH_CAMELLIA_256_CBC_SHA TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA Note: the following TLS cipher suites are declared but are not yet implemented: TLS_DH_DSS_WITH_CAMELLIA...
...JSS is a JNI library we provide the jss4.jar but expect you to build the JSS's matching JNI shared library. We provide the jss4.jar in case you do not want ...
...And 5 more matches
NSS functions
s, and Utility functions described below on this page. Other sources of information: The NSS_reference documents the functions most commonly used by applications to support SSL. The NSS home page links to additional SSL documentation. If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozilla Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function. Function name/documentation Source code NSS versions NSS_GetClientAuthData MXR 3.2 and later NSS_SetDomesticPolicy MXR 3.2 and later ...
... MXR 3.7.4 and later Deprecated SSL functions The following SSL functions have been replaced with newer versions. The deprecated functions are not supported by the new SSL shared libraries. Applications that want to use the SSL shared libraries must convert to calling the new replacement functions listed below. Each function name is linked to its entry in the old SSL Reference. The Mozilla Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. Function name/documentation Source code Replacement in NSS 3.2 SSL_Enable MXR SSL_OptionSet SSL_EnableCipher MXR SSL_CipherPrefSetDefault SSL_EnableDefault ...
... SSL_RedoHandshake MXR SSL_ReHandshake SSL_SetPolicy MXR SSL_CipherPolicySet Certificate functions The public functions listed here are used to interact with certificate databases. If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozilla Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function. Function name/documentation Source code NSS versions CERT_AddCertToListTail MXR 3.2 and later CERT_AddExtension MXR 3.5 and later ...
...And 5 more matches
NSS tools : certutil
t variable to sql: export NSS_DEFAULT_DB_TYPE="sql" This line can be set added to the ~/.bashrc file to make the change permanent. Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: * https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: * https://wiki.mozilla.org/NSS_Shared_DB See Also pk12util (1) modutil (1) certutil has arguments or operations that use features defined in several IETF RFCs. * http://tools.ietf.org/html/rfc5280 * http://tools.ietf.org/html/r...
...e Also pk12util (1) modutil (1) certutil has arguments or operations that use features defined in several IETF RFCs. * http://tools.ietf.org/html/rfc5280 * http://tools.ietf.org/html/rfc1113 * http://tools.ietf.org/html/rfc1485 The NSS wiki has information on the new database design and how to configure applications to use it. ...
...tutil has arguments or operations that use features defined in several IETF RFCs. * http://tools.ietf.org/html/rfc5280 * http://tools.ietf.org/html/rfc1113 * http://tools.ietf.org/html/rfc1485 The NSS wiki has information on the new database design and how to configure applications to use it. ...
...And 5 more matches
NSS tools : modutil
Mozilla › Projects › NSS › tools › modutil
le itself, like supported cipher mechanisms, version numbers, serial numbers, and other information about the module and the token it is loaded on. ...
... Module Library file: **Internal ONLY module** Manufacturer: Mozilla Foundation Description: NSS Internal Crypto Services PKCS #11 Version 2.20 Library Version: 3.11 Cipher Enable Flags: None Default Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES Slot: NSS Internal Cryptographic Services Slot Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES Manufacturer: Mozilla Foundation Type: Software Version Number: 3.11 Firmware Version: 0.0 Status: Enabled Token Name: NSS Generic Crypto Services Token Manufacturer: Mozilla Foundation Token Model: NSS 3 Token Serial Number: 0000000000000000 Token Version: 4.0 Token Firmware Version: 0.0 Access: Write Protected Login Type: Public (no login required) User Pin: NOT Initialized ...
... Token Name: NSS Generic Crypto Services Token Manufacturer: Mozilla Foundation Token Model: NSS 3 Token Serial Number: 0000000000000000 Token Version: 4.0 Token Firmware Version: 0.0 Access: Write Protected Login Type: Public (no login required) User Pin: NOT Initialized Slot: NSS User Private Key and Certificate Services Slot Mechanism Flags: None Manufacturer: Mozilla Foundation Type: Software Version Number: 3.11 Firmware Version: 0.0 Status: Enabled Token Name: NSS Certificate DB Token Manufacturer: Mozilla Foundation Token Model: NSS 3 Token Serial Number: 0000000000000000 Token Version: 8.3 Token Firmware Version: 0.0 Access: NOT Write Protected Login Type: Login required User Pin: Initialized A related command, -...
...And 5 more matches
SpiderMonkey Build Documentation
Use these instructions to build the latest SpiderMonkey source code. Before you begin, make sure you have the right build tools for your computer: Linux, Windows, Mac, others. When building a version older than 28, you'll additionally need NSPR. And of course, you'll need to get the SpiderMonkey source code. Non-developer (optimized) build Use these steps if you want to install SpiderMonkey for production use or run performance benchmarks. ...
...figure.in <options> --enable-build-backends=CompileDB,RecursiveMake (RecursiveMake is there as you'd likely also want to be able to build!) Windows Builds Since version 28, threadsafe builds are the default, and should work out of the box on all POSIX platforms. Hence, the following instructions should only be relevant if you're on Windows or compiling an older version of SpiderMonkey. The MozillaBuild batch file you used to open your shell (e.g. start-shell-msvc2013.bat or start-shell-msvc2013-x64.bat) determines whether the compiler toolchain will target 32-bit or 64-bit builds. To create a 64-bit build, note that you must configure with --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32. Since the POSIX NSPR emulation is not available for Windows, a working version of NSPR must be ava...
...uilds the in-tree version of NSPR which is probably what you want; because SpiderMonkey uses newer NSPR symbols, the NSPR that ships with your operating system probably does not work. If --enable-nspr-build does not work, explicitly tell configure where to find NSPR using the --with-nspr-cflags and --with-nspr-libs configure options. ...
...And 5 more matches
Index
Found 550 pages: # Page Tags and summary 1 SpiderMonkey: The Mozilla JavaScript runtime SpiderMonkey Standalone source code releases can be found on the Releases page. 2 Creating JavaScript tests Automated testing, Build documentation, Guide, QA, SpiderMonkey In which test suite does your new test belong? 3 Creating JavaScript jstest reftests ECMAScript, Guide, JavaScript, test In the js/src/tests directory, there are a few important subdirectories. 4 FOSS Guide, SpiderMonkey Feel free to add your own SpiderMonkey-based open source projects (and if necessary add categories)! 5 Future directions Guide, Mozilla, SpiderMonkey This article documents future directions in fun...
...uture state" for the engine. That means the code as it is today won't match this document, and that's OK. Whenever practical, new code and changes should move code closer to the ideal future. And of course, the idea of the future is always evolving in time as things change and we learn more. 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 SpiderMon...
... listed here are dealing with the JavaScript shell obtained at the end of the build documentation of SpiderMonkey. It is separated in 2 parts, one section related to debugging and another section related to drafting optimizations. Many of these tips only apply to debug builds of the JS shell; they will not function in a release build. 10 How to embed the JavaScript engine Embedding Mozilla, JavaScript, SpiderMonkey, Tutorial See also JSAPI User Guide. In particular, it has more and better code examples! 11 Index Index, MDN Meta, SpiderMonkey Found 550 pages: 12 Introduction to the JavaScript shell SpiderMonkey To get the SpiderMonkey JavaScript shell, see the SpiderMonkey Build Documentation or download a compiled binary for your plat...
...And 5 more matches
Setting up an update server
The goal of this document is to provide instructions for installing a locally-served Firefox update. Obtaining an update MAR Updates are served as MAR files. There are two common ways to obtain a MAR to use: download a prebuilt one, or build one yourself. Downloading a MAR Prebuilt Nightly MARs can be found here on archive.mozilla.org. Be sure that you use the one that matches your machine's configuration. For example, if you want the Nightly MAR from 2019-09-17 for a 64 bit Windows machine, you probably want the MAR located at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-US.win64.complete.mar. Prebuilt MARs for release and beta can be found here. Beta builds are those with a b in the version string. After locating the ...
... Building a MAR Building a MAR locally is more complicated. Part of the problem is that MARs are signed by Mozilla and so you cannot really build an "official" MAR yourself. This is a security measure designed to prevent anyone from serving malicious updates. ...
...After locating the desired version, the MARs will be in the update directory. You want to use the MAR labelled complete, not a partial MAR. Here is an example of an appropriate MAR file to use: https://archive.mozilla.org/pub/firefox/releases/69.0b9/update/win64/firefox-69.0b9.complete.mar. Building a MAR Building a MAR locally is more complicated. Part of the problem is that MARs are signed by Mozilla and so you cannot really build an "official" MAR yourself. This is a security measure designed to prevent anyone from serving malicious updates. If you want to use a locally-built MAR, the copy of Firefox being updated will need to be built to allow un-signed MARs. See Building Firefox for more information on building Firefox locally. These changes will need to be made in order to use the locally...
...And 5 more matches
XML Extras
lable 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 cases for each of the implemented components listed above exist in extensions/xmlextras/tests/. More exhaustive test suites ...
... you will need to look at page source for the HTML documents. For XMLHttpRequest object you can mostly rely on the Microsoft XMLHttpRequest documentation, with some caveats: all functions and property names begin with a lower case letter and the object creation is different. Some properties are not implemented. Thad Hoffman has written a document that shows how you can mimic XML Data Islands in Mozilla. ...
...quest object you can mostly rely on the Microsoft XMLHttpRequest documentation, with some caveats: all functions and property names begin with a lower case letter and the object creation is different. Some properties are not implemented. Thad Hoffman has written a document that shows how you can mimic XML Data Islands in Mozilla. ...
...And 5 more matches
Packaging WebLock
<< PreviousNext >> In this final part of the tutorial, we'll put all of the pieces of the web locking component - the library itself, the type library, the header file, and the user interface resources - into a package that can be installed on other systems. The first section, Component Installation Overview, describes the general installation process in Mozilla. The following sections describe the steps you can take to organize the WebLock component for distribution and installation. 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/proje...
... 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. ...
...ts. 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 with the browser into which it is installed (see Registration Methods in XPCOM for more information on registration). The sample installation script shown below uses the Mozilla XPInstall technology to manipulate an installer and talk to Mozilla'schrome registry as high-level JavaScript objects. ...
...And 5 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. ...
... << 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. ...
...And 5 more matches
nsIConsoleService
It is used to log various messages, warnings, and errors and to obtain the logged messages. ...
...e/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. ...
...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. ...
...And 5 more matches
Address Book examples
faces. See An overview of Thunderbird components for a general description of the Thunderbird user interface and related programmatic interfaces. How do I get all address books? Use the Address Book Manager to get an nsISimpleEnumerator, then progress through the enumerator, looking for nsIAbItem, nsIAbCollection or nsIAbDirectory interfaces as you require. ...
...essBook.dirName); ... } } How do I get one address book? Address Books are uniquely identified by a URI. This can be obtained via nsIAbDirectory.URI. The code stores URIs in various places (e.g. preferences, in address book trees etc). Assuming you have the URI, then use the Address Book Manager to get an nsIAbDirectory representing the address book: let abManager = Components.classes["@mozilla.org/abmanager;1"] .getService(Components.interfaces.nsIAbManager); let oneAddressBook = abManager.getDirectory(addressBookURI); How do I search for a particular contact property (name, email)? Once you have an object that implements nsIAbCollection (see above), you can search for cards with particular properties within that collection using getCardFromProperty. This ...
...bCard for built-in property names): var searchQuery = "(or(PrimaryEmail,bw,@V)(NickName,bw,@V)(and(IsMailList,=,TRUE)(Notes,bw,@V)))"; searchQuery = searchQuery.replace(/@V/g, encodeURIComponent("mystr") The search queries use Lisp syntax with operators enumerated in nsAbQueryStringToExpression.cpp. ...
...And 5 more matches
Plug-in Basics - Plugins
nd the following section, Checking Plug-ins by MIME Type, describes how you can use JavaScript to locate plug-ins yourself and establish which ones are to be registered for which MIME types. How Gecko finds plug-ins When a Gecko-based browser starts up, it checks certain directories for plug-ins, in this order: Windows Directory pointed to by MOZ_PLUGIN_PATH environment variable. ...
... Mac OS X ~/Library/Internet Plug-Ins. ...
... Mac OS X ~/Library/Internet Plug-Ins. /Library/Internet Plug-Ins. /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources. Plug-ins within toolkit bundles. Profile directory/plugins, where Profile directory is a user profile directory. ...
...And 5 more matches
content - CSS: Cascading Style Sheets
Web › CSS › content
HTML <h1>5</h1> <p>According to Sir Tim Berners-Lee, <q cite="http://www.w3.org/People/Berners-Lee/FAQ.html#Internet">I was lucky enough to invent the Web at the time when the Internet already existed - and had for a decade and a half.</q> We must understand that there is nothing fundamentally wrong with building on the contributions of others. </p> <h1>6</h1> <p>According to the Mozilla Manifesto, <q cite="http://www.mozilla.org/about/manifesto/">Individuals must have the ability to shape the Internet and their own experiences on the Internet.</q> Therefore, we can infer that contributing to the open web can protect our own individual experiences on it. </p> CSS q { color: blue; } q::before { content: open-quote; } q::after { content: close-quote; } h1::...
...te; } q::after { content: close-quote; } h1::before { content: "Chapter "; /* The trailing space creates separation between the added content and the rest of the content */ } Result Image combined with text This example inserts an image before the link. If the image is not found, it inserts text instead. HTML <a href="http://www.mozilla.org/">Mozilla Home Page</a> CSS a::before { content: url("https://mozorg.cdn.mozilla.net/media/img/favicon.ico") / " MOZILLA: "; font: x-small Arial, sans-serif; color: gray; } Result Targeting classes This example inserts additional text after special items in a list. HTML <h2>Paperback Best Sellers</h2> <ol> <li>Political Thriller</li> <li class="new-entry">Halloween Stories<...
...re Romance</li> </ol> CSS .new-entry::after { content: " New!"; /* The leading space creates separation between the added content and the rest of the content */ color: red; } Result Images and element attributes This example inserts an image before each link, and adds its id attribute after. ...
...And 5 more matches
User-Agent - HTTP
g system, vendor, and/or version of the requesting user agent. Please read Browser detection using the user agent for why serving different Web pages or services to different browsers is usually a bad idea. Header type Request header Forbidden header name no Syntax User-Agent: <product> / <product-version> <comment> Common format for web browsers: User-Agent: Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions> Directives <product> A product identifier -- its name or development codename. <product-version> Version number of the product. <comment> Zero or more comments containing more details; sub-product information, for example. Firefox UA string For more on Firefox- and Gecko-based user agent strings, see the Firefox u...
...<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 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...
... 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"). ...
...And 5 more matches
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
Note: the "Additional plugins are required" bar can appear for legitimate reasons when the SVG or its embedding HTML is broken or served incorrectly over the network (see the SVG FAQ). ...
...Note: the "Additional plugins are required" bar can appear for legitimate reasons when the SVG or its embedding HTML is broken or served incorrectly over the network (see the SVG FAQ). ...
...embedded SVG. Note: the "Additional plugins are required" bar can appear for legitimate reasons when the SVG or its embedding HTML is broken or served incorrectly over the network (see the SVG FAQ). If the blue square with the white cross displays when you load this scripting across embed demo, then you are not experiencing this problem. If it doesn't, then you almost certainly are. ...
...And 5 more matches
Bookmarks - Archive of obsolete content
Firefox 2 and earlier Creating a new bookmark var win = myBrowser.contentWindow; // Get the bookmarks service const BMSVC = Components.classes["@mozilla.org/browser/bookmarks-service;1"] .getService(Components.interfaces.nsIBookmarksService); // Create the bookmark BMSVC.createBookmarkInContainer(win.document.title, // bookmark name win.location.href.toString(), // URI of the bookmark null, // shortcut win.document.title, // description win.document.characterSet, // charset null, // postData bookmarksService.getBookmarksToolbarFolder(), // bookmark folder ...
...vice interface, provides methods for creating, deleting, and manipulating bookmarks and bookmark folders. This article offers examples for how to perform common bookmark management tasks using the bookmarks service. Initiating the bookmarks service As is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Components.interfaces.nsINavBookmarksService); Creating a bookmark folder Creating a new bookmark folder is done using the nsINavBookmarksService.createFolder() method. For example, to create a new folder in the Bookmarks menu: var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder var newFolderId = bmsvc.cr...
...w folder places it at the end of the list. You can easily change this code to insert the new folder into the bookmarks toolbar by changing bookmarksMenuFolder to another folder attribute. Creating a new bookmark To create a new bookmark, use the nsINavBookmarksService.insertBookmark() method. The URI for the bookmark needs to be specified using an nsIURI object. ...
...And 4 more matches
Install Manifests - Archive of obsolete content
what applications it is compatible with, how it should be updated, and so on. The format of the Install Manifest is RDF/XML. The file must be called install.rdf and live at the top level of an add-on's XPI file. Layout The basic layout of an Install Manifest is like so: <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Some properties are required, some are optional. Some have simple string values, some are complex resources. Required Property Reference Your Install Manifest must specify these properties correctly otherwise your add-on may not install. id The ID of the extension, which m...
...ons 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 check dictionary 128 Telemetry Experiment 256 WebExtension Experime...
... Compatibility. For Firefox/Thunderbird 1.5, see Toolkit version format. Examples <em:version>2.0</em:version> <em:version>1.0.2</em:version> <em:version>0.4.1.2005090112</em:version> Firefox 1.5 / XULRunner 1.8 - add-ons that do not use a valid version format will not be installed. The version format is different from, although backwards-compatible with, 1.0's. For add-ons hosted on addons.mozilla.org - Mozilla's update website may repackage your add-on and correct or reject malformed version strings. Optional Property Reference You may need to supply these properties, depending on the capabilities of your add-on. aboutURL The chrome:// URL of the extension's about dialog box. This is only useful to extensions. If this property is specified, in the about:addons extensions list, the Ab...
...And 4 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
stens for a custom DOM event. Here we call the event MyExtensionEvent. var myExtension = { myListener: function(evt) { alert("Received from web page: " + evt.target.getAttribute("attribute1") + "/" + evt.target.getAttribute("attribute2")); } } document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); // The last value is a Mozilla-specific value to indicate untrusted content is allowed to trigger the event. The data from the web page (unprivileged code) will be the values of attribute1 and attribute2. To trigger the alert() in the listener and pass the data from the web page, write code such as this in the web page: var element = document.createElement("MyExtensionDataElement"); element.setAttribute("attribute1", "fooba...
... In the web page: document.addEventListener("MyAnswerEvent",function(e) { ExtensionAnswer(e); },false); var element; function CallExtension() { var element = document.createElement("MyExtensionDataElement"); element.setAttribute("attribute1", "foobar"); element.setAttribute("attribute2", "hello world"); docu...
...esponse: " + (response ? ...
...And 4 more matches
The Essentials of an Extension - Archive of obsolete content
oadable tools for all platforms that generate them. The enclosing brackets are just notation, and they're just common practice. As long as your id has some uniqueness to it, it's OK to use either form. <em:name>XUL School Hello World</em:name> <em:description>Welcome to XUL School!</em:description> <em:version>0.1</em:version> <em:creator>Appcoast</em:creator> <em:homepageURL>https://developer.mozilla.org/docs/XUL_School</em:homepageURL> This is the data that is displayed before and after the extension is installed, that you can see in the Add-ons Manager. There are many other tags that can be added, for contributors and translators. The full specification of the install.rdf file has all the details. Since extensions can be translated to multiple languages, it is often necessary to transla...
... <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>4.0</em:minVersion> <em:maxVersion>10.*</em:maxVersion> </Description> </em:targetApplication> This node specifies the target application and target versions for the extension, specifically Firefox, from version 4 up to version 10. The UUID is Firefox's unique ID. Other Mozilla and Mozilla-based applications such as Thunderbird and Seamonkey have their own. You can have an extension that works on multiple applications and versions. For example, if you create a Firefox extension, it would normally take little effort to port it to SeaMonkey, which has very similar features and UI. The min and max version specify the version range in which the extension can be installed. ...
...e extension will be installed in a disabled state. Users can disable version checks through preferences or installing add-ons like the Add-on Compatibility Reporter. Beginning with Firefox 11, add-ons will default to compatible and Firefox will mostly ignore the version range. Testing your add-ons with every Firefox version is always recommended, though. This is the information Firefox and other Mozilla applications need to install an add-on. Any errors or missing information will cause the installation process to fail, or the extension to be installed in a disabled state. The chrome.manifest File Chrome is the set of user interface elements of the application window that are outside of a window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elem...
...And 4 more matches
Using the Stylesheet Service - Archive of obsolete content
ements and to CSS anonymous boxes. Getting such styles wrong can easily lead to very incorrect behavior, including crashes. Be very careful with your CSS when using AGENT_SHEET stylesheets. Adding a stylesheet To use the stylesheet service, you get a reference to the service, create a URI and pass the URI to the stylesheet service's loadAndRegisterSheet method. ...
...CSS when using AGENT_SHEET stylesheets. Adding a stylesheet To use the stylesheet service, you get a reference to the service, create a URI and pass the URI to the stylesheet service's loadAndRegisterSheet method. var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"] .getService(Components.interfaces.nsIStyleSheetService); var ios = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uri = ios.newURI("chrome://myext/content/myext.css", null, null); sss.loadAndRegisterSheet(uri, sss.USER_SHEET); Note: loadAndRegisterSheet will load the stylesheet synchronously, so you should only call this method using local URIs. Determining whether a sheet has been loaded If you are writin...
...egisterSheet will load the stylesheet synchronously, so you should only call this method using local URIs. Determining whether a sheet has been loaded If you are writing an extension and adding your stylesheet in an onload handler, you'll want to see if your sheet has already been added. If you don't check, you will wind up adding your sheet once per window load. ...
...And 4 more matches
Conclusion - Archive of obsolete content
If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...If the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. ...
...And 4 more matches
JSS build instructions for OSX 10.6 - Archive of obsolete content
The following build instructions were provided by PAVRW. The generic instructions didn't work to build on OSX 10.6.7. ...
... The following build instructions were provided by PAVRW. The generic instructions didn't work to build on OSX 10.6.7. ...
... The following build instructions were provided by PAVRW. The generic instructions didn't work to build on OSX 10.6.7. ...
...And 4 more matches
JavaScript Client API - Archive of obsolete content
Overview This page describes how to use the internal client-side Sync JavaScript API. This API is available in Mozilla-based products that use Sync, such as Firefox desktop. This document is somewhat outdated, and the API isn't well-supported for use from add-ons; tread carefully. The best, and most up-to-date, reference to Sync's internal APIs is the source code. ...
... code. Please note that usage of the Sync APIs is governed by a terms of service: By accessing or using the Firefox Sync APIs in connection with the development of your own client software to access the Firefox Sync services (a "Third Party Client"), you acknowledge that you will need to install and use a local version of the Firefox Sync server for multiple account testing and that any use of Mozilla's hosted Firefox Sync services is subject to Mozilla's Firefox Sync Terms of Service at https://services.mozilla.com/tos/. Further, you agree (a) to maintain and link to (including on websites from which your Third Party Client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your Third Party Client is managed and ...
... Further, you agree (a) to maintain and link to (including on websites from which your Third Party Client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your Third Party Client is managed and protected; (b) that your Third Party Client will only store data in encrypted form on the Firefox Sync servers operated by Mozilla; (c) that you and your Third Party Client will use the Firefox Sync APIs solely for their intended purpose; (d) that your Third Party Client will not hide or mask its identity as it uses the Services and/or Firefox Sync APIs, including by failing to follow required identification conventions; and (e) that you and your Third Party Client will not use the Firefox Sync APIs for any application or se...
...And 4 more matches
Creating a Help Content Pack - Archive of obsolete content
The previous document had a lot of places where ideas were simply introduced without explanation, and I've tried to go through things a bit more slowly with better descriptions. This is still very much a work in progress, tho, and I need to complete the rest of it soon (where "complete" means "use what's there that's good, build on the stuff that's not as good, and add other useful information as necessary". This document describes how to integrate HTML help documentation into your application using the Mozilla Help Viewer. ...
...ed to go through things a bit more slowly with better descriptions. This is still very much a work in progress, tho, and I need to complete the rest of it soon (where "complete" means "use what's there that's good, build on the stuff that's not as good, and add other useful information as necessary". This document describes how to integrate HTML help documentation into your application using the Mozilla Help Viewer. Documentation contained in the Help Viewer can be accessed using any XUL application or program that embeds Mozilla. What is a Content Pack? A Content Pack is a packaged set of files that describe Help content. Content Packs include help documents written in XHTML, a content pack descriptor file written in RDF, and a table of contents, index, and glossary (also written in RDF). You...
... The Contents of a Content Pack Content Packs consist of a general pack description file, table of contents, index, search, glossary, and help documents. The help documents are written in XHTML, and the rest are written in RDF. ...
...And 4 more matches
Reading textual data - Archive of obsolete content
swer. Using the system character encoding may work (XXX insert text how to get it), or again the default character encoding from preferences. Converting read data If you 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 = /* N...
...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. ...
...ce provides an easy way to read entire lines from a unichar stream. It can be used like nsILineInputStream, except that it supports non-ASCII characters, and has no problems with charsets with embedded nulls (like UTF-16 and UTF-32). It can be used like this: var charset = /* Need to find out what the character encoding is. ...
...And 4 more matches
enumKeys - Archive of obsolete content
ftware\\Netscape\\Navigator\\Mail". subkeyIndex An integer representing the 0-based index of the subkey being sought. Returns The name if it succeeded; NULL if the referenced value does not exist. Description enumKeys can be used to iterate through the subkeys at a given key location. ...
...t succeeded; NULL if the referenced value does not exist. Description enumKeys can be used to iterate through the subkeys at a given key location. The following example shows how to use enumKeys to find the plugins subdirectory below the various Mozilla-based browser installations. ...
...f the referenced value does not exist. Description enumKeys can be used to iterate through the subkeys at a given key location. The following example shows how to use enumKeys to find the plugins subdirectory below the various Mozilla-based browser installations. ...
...And 4 more matches
Custom toolbar button - Archive of obsolete content
if you plan to write a more complex extension. Note that this extension is very simplified. Use other tutorials and articles to find out more--the main Extensions page here is a good starting point. In particular, the articles Creating toolbar buttons and Building an Extension explain the process in more detail. Supported applications You can use the steps on this page with any or all of these Mozilla applications: Firefox 1.5 or a later version SeaMonkey 2.0 or a later version Thunderbird 1.5 or a later version Sunbird 0.3 or a later version Pre-release versions of these (alphas, betas and release candidates) are also OK. In the rest of this page, the term application means the Mozilla application where you want to add the button. Note: There is a similar tutorial for SeaMonkey 1.
... Required tools You will need two tools. ...
...anation: The name is a unique identifier for the extension. There is more information about identifiers in a later section of this tutorial. 3. Create a plain text file named install.rdf. Copy the following content, making sure that you scroll to get all of it. ...
...And 4 more matches
Creating a Window - Archive of obsolete content
however, we should look at the basic syntax of a XUL file. Creating a XUL File An XUL file can be given any name but it really should have a .xul extension. The simplest XUL file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- Other elements go here --> </window> This window will not do anything since it doesn't contain any UI elements. Those will be added in the next section. In fact, there will not be shown any window at all. If you want to force the window to become visible you can add the width and height attribute to the window tag. Here is a line by line breakdo...
...his is an XML file. You would normally add this line as is at the top of each xul file. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> This line is used to specify the style sheets to use for the file. This is the syntax that XML files use to import style sheets. In this case, we import the styles found in the global part of a skin package. We didn't specify a specific file so Mozilla will determine which files in the directory to use. In this case, the all-important global.css file is selected. This file contains all the default declarations for all of the XUL elements. Because XML does not have any knowledge of how elements should be displayed, the file indicates how. Generally, you will put this line at the top of every XUL file. You can also import other style sheets using...
...horizontal" The orient attribute specifies the arrangement of the items in the window. The value horizontal indicates that items should be placed horizontally across the window. You may also use the value vertical, which means that the items are placed in a column. This is the default value, so you may leave the attribute off entirely if you wish to have vertical orientation. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> This line declares the namespace for XUL, which you should put on the window element to indicate that all of its children are XUL. Note that this URL is never actually downloaded. Mozilla will recognize this URL internally. <!-- Other elements go here --> Replace this comment block with other elements (the buttons, menus and other user interface c...
...And 4 more matches
XUL Questions and Answers - Archive of obsolete content
More documentation on Search plugins is available in the Search plugins category. Is localizing remote XUL possible? Loading remote DTDs for XML documents is currenty not supported in XUL. The following bugs were reported on this issue: bug 22942, bug 133698. Is there an editor widget in XUL that supports syntax highlighting? Daniel Glazman has been working on this for his projects. ...
...ible to have checkbox support for multi column lists? The current issue is a person exploring if it is possible to have checkbox support for multi column lists. ...
...T_NAME); node.setAttribute(ATTRIBUTE, VALUE); node.setAttribute(ATTRIBUTE, VALUE); elem.appendChild(node); How do I access XUL elements in a sidebar from the context menu JavaScript? The sidebar's content is a separate document, so you should use document.getElementById("sidebar").contentDocument.getElementById(...) This is something you could see using the DOMi. ...
...And 4 more matches
Application Update - Archive of obsolete content
This article will hopefully explain how to update your XulRunner application using the same method that Firefox, Thunderbird, Songbird, and ChatZilla use. Getting Started You will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or 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. Applicat...
...rder to generate SHA1 hashes I installed shash. Application Settings You will need to configure the following settings in your application: Branding The update process uses branding information, setup branding for your application as described here: XulRunner Tips Icons The updater process for Linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 Preferences // Whether or not app updates are enabled pref("app.update.enabled", true); // This preference turns on app.update.mode and allows automatic download and // install to take place. We use a separate boolean toggle for this to make // the UI easier to construct. pref("app.update.auto", true); // Defines how the Application Update Service notifies the user ...
... here's how the update process works. At the scheduled interval the application checks the update server for update.xml, search for the correct one using the Software name, versions, build id's, channels, and other information like locales. If the update.xml file doesn't exist there is no update. Update.xml contains only information about the update. It points to the update mar file (a Mozilla Archive) which contains all files which are going to be updates It also contains a SHA1 hash and file size used for verification of the update. If an update file is found that correctly describes an update your application, or rather xulrunner, will download the update, verify it with the hash and filesize and install. It will then prompt the user to restart the application. Resources ...
...And 4 more matches
contents.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- List all the skins being supplied by this theme --> <RDF:Seq about="urn:mozilla:skin:root"> <RDF:li resource="urn:mozilla:skin:My_Theme"/> </RDF:Seq> <RDF:Description about="urn:mozilla:skin:My_Theme" chrome:displayName="My Theme" chrome:accessKey="N" chrome:author="" chrome:authorURL="" chrome:description="" chrome:name="My_Theme" chrome:image="preview.png"> <chrome:packages> <RDF:Seq about="urn:mozilla:skin:My_Theme:packages"> <RDF:li resource="urn:mozilla:skin:My_Them...
...State that we work only with major version 1 of this package. --> <RDF:Description chrome:sk...
...sKey="N" chrome:author="" chrome:authorURL="" chrome:description="" chrome:name="My_Theme" chrome:image="preview.png"> <chrome:packages> <RDF:Seq about="urn:mozilla:skin:My_Theme:packages"> <RDF:li resource="urn:mozilla:skin:My_Theme:browser"/> <RDF:li resource="urn:mozilla:skin:My_Theme:communicator"/> <RDF:li resource="urn:mozilla:skin:My_Theme:global"/> <RDF:li resource="urn:mozilla:skin:My_Theme:mozapps"/> <RDF:li resource="urn:mozilla:skin:My_Theme:help"/> </RDF:Seq> </chrome:packages> </RDF:Description> <!-- Version Information. State that we work only with major version 1 of this package. --> <RDF:Description chrome:skinVersion="1.5" about="urn:mozilla:skin:My_Theme:browser"/> <RDF:D...
...And 4 more matches
How do you upload your files to a web server? - Learn web development
Logging in For this example, we'll suppose that our hosting provider (the service that will host our HTTP web server) is a fictitious company "Example Hosting Provider" whose URLs look like this: mypersonalwebsite.examplehostingprovider.net. We have just opened an account and received this info from them: Congratulations for opening an account at Example Hosting Provider. ...
...e that our hosting provider (the service that will host our HTTP web server) is a fictitious company "Example Hosting Provider" whose URLs look like this: mypersonalwebsite.examplehostingprovider.net. We have just opened an account and received this info from them: Congratulations for opening an account at Example Hosting Provider. ...
...this: mypersonalwebsite.examplehostingprovider.net. We have just opened an account and received this info from them: Congratulations for opening an account at Example Hosting Provider. Your account is: demozilla Your website will be visible at demozilla.examplehostingprovider.net To publish to this account, please connect through SFTP with the following credentials: SFTP server: sftp://demozilla.examplehostingprovider.net Username: demozilla Password: quickbrownfox Port: 5548 To publish on the web, put your files into the Public/htdocs directory. ...
...And 4 more matches
Accessibility Features in Firefox
orld 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. Screen magnifier users can also benefit from Firefox's powerful features today, as caret and focus tracking are fully enabled. Mozilla Corporation is currently reaching out to work with AI Squared, the makers of ZoomText, in order to enable complete support of advanced ZoomText features such as the Doc Reader and App Reader. We are also optimistic that the the makers of MAGic and Lunar/Supernova will add Firefox support in the coming year. Mozilla has support for Dragon Naturally Speaking. Some users of the professional version...
...e coming year. Firefox on Linux currently boasts the best onscreen keyboard support in the industry via GOK, the Gnome Onscreen Keyboard. Basic screen reader accessibility is available via the Fire Vox extension. Fire Vox can also be used on Windows or OS X. For more detailed information, please check the assistive technology compatibility guide is kept on an editable Wiki. Keyboard Support "Mozilla Firefox is a web-browser with superior keyboard support." Alan Cantor, Cantor Access Consulting Firefox includes keyboard access to all of its amazing features: Browse with caret allows users to select arbitrary content with the keyboard and move through content as if inside a read-only editor. This allows copying arbitrary pieces of text to the clipboard. The F7 key toggles this feature on...
...here are far fewer keys to type to get the desired location. For example, it is possible to navigate to the desired link by pressing 2 letter keys rather than tabbing through many links to get there. Caret browsing allows you to move through web content one letter a time. You can even select web content and copy it to the clipboard. -- all with the keyboard Detailed Advanced Javascript control: Mozilla gives you the ability to fine tune what Javascript is allowed to do while you browse. For example, you can disable functions that websites use to move or resize windows, or to remove your status bar, to disable right-click contextual menus, change the status bar text, etc. You can furthermore control javascript capabilities to remove scrollbars, toolbars or system buttons like minimize, close and...
...And 4 more matches
CSUN Firefox Materials
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. Screen magnifier users can also benefit from Firefox's powerful features today, as caret and focus tracking are fully enabled. Mozilla Corporation is currently reaching out to work with AI Squared, the makers of ZoomText, in order to enable complete support of advanced ZoomText features such as the Doc Reader and App Reader. Firefox on Linux currently boasts the best onscreen keyboard support in the industry via GOK, the Gnome Onscreen Keyboard. Basic screen reader accessibility is available via Gnopernicus or the Fire Vox exten...
...eaching out to work with AI Squared, the makers of ZoomText, in order to enable complete support of advanced ZoomText features such as the Doc Reader and App Reader. Firefox on Linux currently boasts the best onscreen keyboard support in the industry via GOK, the Gnome Onscreen Keyboard. Basic screen reader accessibility is available via Gnopernicus or the Fire Vox extension. Keyboard Support "Mozilla Firefox is a web-browser with superior keyboard support. " - Alan Cantor, Cantor Access Consulting (http://www.cantoraccess.com) Firefox includes keyboard access to all of its amazing features: Find as you type allows for quick navigation to links and text searching without opening a separate dialog -- this allows more convenient use by screen magnification users because there is a single poi...
...sibility Extension, from the University of Illinois, provides new menus and keyboard shortcuts for accessing every feature of a web page Community Contributions The real reason behind Firefox's success is the great community of volunteers and organizations that realize they have something to benefit from a browser open to utilizing their ideas and hard work. Contributions come in many forms. The Mozilla Firefox community welcomes bug reports, ideas, documentation, answering questions in the support forums -- and nearly any kind of community involvement resulting in a browser built for a broader audience of users and developers. Here are a couple of success stories from businesses who contributed accessibility code because they needed an accessible web browser which supported their software: IBM ...
...And 4 more matches
Index
675 Creating an appealing add-on listing Add-ons, Beginner, Guide, WebExtension, publishing There are two essential steps to getting people to use your add-on: they need to discover your add-on and open the listing page, then the listing page needs to encourage them to click the Add to Firefox button. ...
...show how useful your add-on is. 676 Index Add-ons, Glossary, Guide, Index Found 689 pages: 677 Signing and distributing your add-on Add-ons, Extensions, WebExtensions, distribution, publication, reviews, signing Add-ons need to be signed before they can be installed into release and beta versions of Firefox. ...
...hey can be installed into release and beta versions of Firefox. This signing process takes place through addons.mozilla.org (AMO), whether you choose to distribute your add-on through AMO or to do it yourself. 678 Make money from browser extensions Guide, Monetization, WebExtensions, distribution While users can download browser extensions for Firefox free of cost from addons.mozilla.org (AMO), this doesn't mean you can't make money from browser extensions, and to a more limited extent themes. ...
...And 4 more matches
Creating MozSearch plugins
Firefox 2 uses a simplified form of the OpenSearch format for storing search plugins. A MozSearch search plugin is an XML file that describes the search engine, its URL, and the parameters that need to be passed to that URL. Warning: MozSearch is non-standard and is intended for internal use within Mozilla projects only. It should only be used if your intention is to distribute the search plugin packaged in a Firefox extension, or if you are creating plugins meant to be shipped by default in a Firefox build. For creating search plugins for installation from the web, see Creating OpenSearch plugins for Firefox The plugin file The MozSearch format is similar to the OpenSearch format. The only difference is the root element and XML namespace. Example: searching Yahoo! The following XML ...
... Firefox build. For creating search plugins for installation from the web, see Creating OpenSearch plugins for Firefox The plugin file The MozSearch format is similar to the OpenSearch format. The only difference is the root element and XML namespace. ...
...on&amp;command={searchTerms}" /> <Url type="text/html" method="GET" template="http://search.yahoo.com/search"> <Param name="p" value="{searchTerms}"/> <Param name="ei" value="UTF-8"/> <MozParam name="fr" condition="pref" pref="yahoo-fr" /> </Url> <SearchForm>http://search.yahoo.com/</SearchForm> </SearchPlugin> Let's say the user chooses to use the Yahoo! ...
...And 4 more matches
Simple Instantbird build
use of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving it close to the root of your machine and re-building. Get the latest source code from Mozilla's comm-central Mercurial code repository: hg clone http://hg.mozilla.org/comm-central Then, get all the repositories it depends on. The comm-central repository includes a script to do just that. This may take a while, it's a lot of code! First, cd into the comm-central subdirectory (created automatically by the previous command): cd comm-central then run: python client.py checkout Note: U...
...subdirectory (created automatically by the previous command): cd comm-central then run: python client.py checkout Note: Unless you have a very good network connection, "hg clone" might fail because it gets interrupted. It is faster and more efficient to use Mercurial bundles instead the first time you fetch the complete repo. In this case, you need a bundle for comm-central, and a bundle for mozilla-central. Unbundle mozilla-central into a "mozilla" subdirectory of your comm-central repo after unbundling comm-central. Then run python client.py checkout to ensure you are up-to-date. The source code requires 1.5GB of free space or more. Build configuration By default, the build system creates a release build of Instantbird roughly equivalent to the official Instantbird release builds. If th...
...system creates a release build of Instantbird roughly equivalent to the official Instantbird release builds. If that's not exactly what you want, there are many build configuration options to choose from, although it's strongly recommended that you only use options that you fully understand. The normal way to specify build options is to place them in a file called '.mozconfig' at the root of your mozilla source tree, i.e. your comm-central repo. For example, to create a debug build instead of a release build, that file would contain: ac_add_options --enable-debug For more on configuration options, see the page Configuring build options. Note that if you use an MOZ_OBJDIR it cannot be a sibling folder to your source directory. Use an absolute path to be sure! Building Instantbird What you nee...
...And 4 more matches
Getting Started with Chat
Try to keep messages as concise as possible. ...
... Note that on 2nd March 2020, Mozilla moved away from IRC to Matrix for its public channels, the IRC server was shut down. This page is being retained for historical and reference purposes. The general rules and etiquette are still useful for our new home. Please see https://wiki.mozilla.org/Matrix for up-to-date information. ...
...or historical and reference purposes. The general rules and etiquette are still useful for our new home. Please see https://wiki.mozilla.org/Matrix for up-to-date information. General Rules and Etiquette Once you have your client set up (see software below) and are connected, there are some basic rules you should follow to ensure the most enjoyable and productive experience: As with all Mozilla forums and events, agreeing to our Community Participation Guidelines is a requirement for participation. Try to keep messages as concise as possible. If you have something long to post, a code snippet for example, use paste.mozilla.org and paste the generated URL in IRC instead. When addressing someone directly, try to use name: message format. For example, "ashughes: good morning!" Every cha...
...And 4 more matches
WebRequest.jsm
oke the listener for resource types that match one of the types given. To specify match patterns, first import the "MatchPattern.jsm" module, then construct a MatchPattern. The MatchPattern constructor accepts: either: a string defining a single pattern or: an array of such strings Cu.import("resource://gre/modules/MatchPattern.jsm"); let pattern = new MatchPattern("https:/developer.mozilla.org/*"); Cu.import("resource://gre/modules/MatchPattern.jsm"); let pattern = new MatchPattern(["https://mozorg.cdn.mozilla.net/*", "https://mdn.mozillademos.org/*", "https://developer.cdn.mozilla.net/*"]); See the match patterns article for details on the syntax of the strings you supply. If you supply an array of strings, then ...
... not included in the argument passed to the listener. ...
.../WebRequest.jsm", {}); WebRequest.onBeforeRequest.addListener(logURL); function logURL(e) { console.log("Loading: " + e.url); } Filtering This example logs URLs for requests under "https://developer.mozilla.org/": let {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {}); Cu.import("resource://gre/modules/MatchPattern.jsm"); let pattern = new MatchPattern("https:/developer.mozilla.org/*"); WebRequest.onBeforeRequest.addListener(logURL, {urls: pattern}); function logURL(e) { console.log("Loading: " + e.url); } This listener will be invoked for requests matching any of the three patterns, where the resource type is "stylesheet" or "image": let {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {}); Cu.import("resource://gre/modules/MatchPattern.jsm"); ...
...And 4 more matches
Uplifting a localization from Central to Aurora
You want to have a repo from which you can uplift to aurora shortly after the migration. The Releases page on wikimo has the upcoming dates. You should be good doing it the day after. ...
...pts that didn't work. So, here are the mercurial steps to reproduce. Prerequisites: merge tool. You really want a merge tool for this. I use kdiff3; you may choose your own based on what you read at http://mercurial.selenic.com/wiki/MergeProgram a clone of your central repo. Let's pretend it's at l10n-central/ab-CD. a clone of your aurora repo. Let's pretend it's at releases/l10n-mozilla-aurora/ab-CD Here's how we do it: # set up a new local clone of your central repo hg clone l10n-central/ab-CD workrepo cd workrepo # pull in the changesets you have on aurora hg pull -r default ../releases/l10n/mozilla-aurora/ab-CD Now, there are two routes forward: 1) things are pretty silent. Good luck, you're basically done. All you need to do is to push from your l10...
... want to land on aurora. If so, you want to fix those issues on aurora alone, verify them there, and then go back to this page. One of the reasons why we suggested that you do the merging in a separate tree is just this. You can just throw your merge candidate away as long as you find fixes that you've forgotten on either aurora or beta, and address those in their own repos first. Push them to hg.mozilla.org there, verify the builds, and then try to merge l10n-central and aurora again. There is one scenario where you don't want to have the conflicts resolved outside of the actual merge: en-US on central changed, in a way that doesn't make sense on aurora. Say, en-US removed a string for the release+2, and you fixed a typo in the string that still exists in release+1. So you fixed the string on au...
...And 4 more matches
Creating localizable web applications
img/> for decorations; instead, use CSS). Document your code so that localizers know what they're translating (e.g. in gettext use comments and contexts). App Logic Detect the locale correctly Be smart about detecting the user's locale correctly. You can use one or more of the following techniques: HTTP Accept-Language headers, the UA string, IP geolocation. See examples of the addons.mozillaorg code at /addons/trunk/site/app/config/language.php and /addons/trunk/site/app/config/language.inc.php. The LANGUAGE_CONFIG class expects arrays of valid languages & supported languages. Always give the user a possibility to change the locale (e.g. by adding locale dropdown menu at bottom of page) and remember this choice for the future visits. Use the locale code in the URLs Depending on ho...
... of the pages you link to Indicate the language of the pages you link to if it is different from the user's current language. For English, add hreflang="en" to links to resources that are not going to be localized or are external to your web application. Then, use CSS to give a cue to the user that if she follows the link, she will be served English content. Snippet 1. Bad: <a href="http://www.mozilla.com/privacy-policy.html"><?= _('Privacy policy'); ?></a> Snippet 2. Good: CSS: a[hreflang="en"]::after { content: " [en]" } HTML/PHP: <a href="http://www.mozilla.com/privacy-policy.html" hreflang="en"><?= _('Privacy policy'); ?></a> Don't mingle app logic and localizable content when using pure HTML If you decide not to use gettext on some pages (e.g. because they contain a lot of te...
...o = localeconv(); return number_format($num, $decimals, $locale_info['decimal_point'], $locale_info['thousands_sep']); } printf(_("%s MB"), num_format($size, 1)); Wrap as few HTML tags as possible When wrapping the localizable content with the gettext function calls, put all the code that irrelevant to localization outside the function call. Snippet 1. Bad: <?= _("<a href=\"https://addons.mozilla.org/firefox/downloads/latest/10900\" class=\"get-personas\" id=\"download\"><span>Get Personas for Firefox - Free</span>");?><span class="arrow"></span></a> Snippet 2. Good: <a href="https://addons.mozilla.org/firefox/downloads/latest/10900" class="get-personas" id="download"> <span><?= _("Get Personas for Firefox - Free");?></span><span class="arrow"></span> </a> Snippet 3. Bad: <p><?= ...
...And 4 more matches
NSS FAQ
Mozilla › Projects › NSS › FAQ
For an overview of NSS, see Overview of NSS. ...
...d a general-purpose cryptography library. It does not support PKCS #11. It is based on the SSLeay library developed by Eric A. Young and Tim J. Hudson. OpenSSL is widely used in Apache servers and is licensed under an Apache-style licence. NSS supports both server and client applications as well as PKCS #11 and S/MIME. To permit its use in as many contexts as possible, NSS is licensed under the Mozilla Public License, version 2. How does NSS compare to SSLRef? SSLRef was an early reference implementation of the SSL protocol. It contains bugs that were never fixed, doesn't support TLS or or the new 56-bit export cipher suites, and does not contain the fix to the Bleichenbacher attack on PKCS#1. Netscape no longer maintains SSLRef or makes it available. It was built as an example of an SSL imp...
... support the PKCS #11 interface. Does NSS require Netscape Portable Runtime (NSPR)? To provide cross-platform support, NSS utilizes Netscape Portable Runtime (NSPR) libraries as a portability interface and implementation that provides consistent cross-platform semantics for network I/O and threading models. You can use NSPR throughout your application or only in the portion that calls into NSS. Mozilla strongly recommends that multithreaded applications use the NSPR or native OS threading model. (In recent NSPR releases, the NSPR threading model is compatible with the native threading model if the OS has native threads.) Alternatively, you can adapt the open-source NSPR implementation to be compatible with your existing application's threading models. More information about NSPR may be found at...
...And 4 more matches
NSS tools : pk12util
S_DEFAULT_DB_TYPE environment variable to sql: export NSS_DEFAULT_DB_TYPE="sql" This line can be set added to the ~/.bashrc file to make the change permanent. Most applications do not use the shared database by default, but they can be configured to use them. ...
...ange permanent. Most applications do not use the shared database by default, but they can be configured to use them. ...
...fox and Thunderbird to use the new shared NSS databases: o https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: o https://wiki.mozilla.org/NSS_Shared_DB See Also certutil (1) modutil (1) The NSS wiki has information on the new database design and how to configure applications to use it. o https://wiki.mozilla.org/NSS_Shared_DB_Howto o https://wiki.mozilla.org/NSS_Shared_DB Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. ...
...And 4 more matches
Creating a Python XPCOM component
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. (Note that some details may be missing.) Preparation If a binary of PyXPCOM is not available, you will need to build it - see Building PyXPCOM. Tip: you can achieve a copy of binary of PyXPCOM from PythonExt; simply unpack xpi and take everything you need. If you wish to use PyXPCOM from a normal Python executable, you will need to tell Python where it can find the PyXPCOM library. This is probably best done by setting a PYTHONPATH variable pointing at the 'bin/python' directory in the application. ...
...ve a copy of binary of PyXPCOM from PythonExt; simply unpack xpi and take everything you need. If you wish to use PyXPCOM from a normal Python executable, you will need to tell Python where it can find the PyXPCOM library. This is probably best done by setting a PYTHONPATH variable pointing at the 'bin/python' directory in the application. This is not necessary when your components are loaded by Mozilla as the Python loader modifies sys.path. Then you can import xpcom in any Python module (mostly, in your component). Defining the interface Make a file named "nsIPySimple.idl" to define the interface: #include "nsISupports.idl" [scriptable, uuid(2b324e9d-a322-44a7-bd6e-0d8c83d94883)] interface nsIPySimple : nsISupports { attribute string yourName; void write( ); void change(in string ...
...Script are both loosely-typed, so it's fairly easy to pass information from one to the other. Note: There are exceptions; see this discussion for information on the use of string and wstring for unicode transfer. See here for info on describing interfaces, and on which types can be used. Registering the interface In the "components" directory, execute : ../xpidl -m typelib -w -v -I /usr/share/idl/mozilla/ nsIPySimple.idl On Windows you must point to the idl directory as part of your Mozilla build. For example: xpidl.exe -m typelib -w -v -I C:\source\mozilla\obj-i686-pc-mingw32\dist\idl foo.idl xpidl will then create nsIPySimple.xpt, which should be placed correctly (e.g., in the 'components' directory). Implementing the component Unlike C++, PyXPCOM does much of the work for you. Make a file na...
...And 4 more matches
mozIRegistry
Warning: The content of this article may be out of date. It appears to be a design document for something that never got implemented. Introduction The title of this document is completely misleading. It's not really about any "registry interface" so much as it's about how Mozilla supports a more dynamic binding between interface clients and the code that actually provides the implementation of those interfaces. It happens that this objective requires storing information about which implementation to use in a place distinct from your source code. And it happens that we've chosen, up till now, to store that information in the "Netscape registry" file. Which explains how this information came to be associated with the notion of a "registry." Someday (I hope) this page will be proper...
...ens that we've chosen, up till now, to store that information in the "Netscape registry" file. Which explains how this information came to be associated with the notion of a "registry." Someday (I hope) this page will be properly titled so that everybody knows it is the place to come to in order to find out how they are supposed to link together the various XPCOM components that together form the Mozilla browser. The information below is intended to tell you everything you need to know about how to do that. Summary Clients will rely on nsRepository to create instances of a given class. Clients requiring dynamic "binding" of CLSIDs will be required to use some higher-level services (TBD) to figure out the CLSIDs they should use. The intent is that such services themselves be built on top of the...
...component categories" in some respects), along with the ability to "set" services (versus the Service Manager insisting on creating the services itself) would suffice. Worst case, clients would obtain the mozIRegistry singleton via some other means (i.e., a "NSGetRegistry" function). Architecture This diagram illustrates the various components that you will be using to interoperate with other Mozilla components. Some are for illustrative purposes (the lighter-colored boxes near the top of the picture). These are placeholders for the types of components you're designing and implementing. I'll talk about them to provide examples of how you should use the other boxes. These components (indicated by the darker-colored boxes) are the services you'll be using. I'll be explaining the rationale for t...
...And 4 more matches
Building an Account Manager Extension
Step 1: Implementing nsIAccountManagerExtension As first step we have to implement the nsIAccountManagerExtension. We name the Extension "devmo-account" and state that it is located in the Chrome Package "example@mozilla.org". Furthermore we show the new panel only for IMAP accounts... Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); //class constructor function DevmoAccountManagerExtension() {}; // class definition DevmoAccountManagerExtension.prototype = { name : "devmo-account", chromePackageName : "example@mozilla.org", showPanel: function(server) { //this panel is only shown for imap accounts... if (server.type == \"imap\") return true; return false; }, QueryInterface: XPCOMUtils.generateQI([ Com...
...it if you copied this example!)... DevmoAccountManagerExtension.prototype.classID = Components.ID("{659ce960-9dfb-11dd-ad8b-0800200c9a55}"); // ... the description and ... DevmoAccountManagerExtension.prototype.classDescription = "Devmo Account Manager Extension"; // ... textual unique identifier or rendez-vous point in the category manager. ...
...erExtension.prototype.classID = Components.ID("{659ce960-9dfb-11dd-ad8b-0800200c9a55}"); // ... the description and ... DevmoAccountManagerExtension.prototype.classDescription = "Devmo Account Manager Extension"; // ... textual unique identifier or rendez-vous point in the category manager. ...
...And 4 more matches
Using the clipboard
The component @mozilla.org/widget/clipboardhelper;1 can be used to copy text to the clipboard. This component implements the interface nsIClipboardHelper, which has a function copyString that can be used to copy a string. ...
...pying, and pasting to and from the clipboard. The clipboard Mozilla provides a number of interfaces for accessing the clipboard. The component @mozilla.org/widget/clipboardhelper;1 can be used to copy text to the clipboard. This component implements the interface nsIClipboardHelper, which has a function copyString that can be used to copy a string. const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.interfaces.nsIClipboardHelper); gClipboardHelper.copyString("Put me on the clipboard, please."); This example will first create a clipboard helper and then copy a short string to the clipboard. This method only works to put strings on the clipboard. For other types of data, such as URLs or images, you will ...
... .getService(Components.interfaces.nsIClipboardHelper); gClipboardHelper.copyString("Put me on the clipboard, please."); This example will first create a clipboard helper and then copy a short string to the clipboard. This method only works to put strings on the clipboard. For other types of data, such as URLs or images, you will need to use a more complex method. A component @mozilla.org/widget/clipboard;1 and an interface nsIClipboard provide general access to the system clipboard. You can use them to copy and paste any type of data from your application to the clipboard. Three XPCOM objects are needed to handle clipboard operations. The first is an object that holds the data to put on the clipboard. The second is the clipboard object. The third is an object which is used to...
...And 4 more matches
Activity Manager examples
e Activity Manager window The following sample will show a process and an event for junk processing in the Activity Manager window. ...
...unk processing in the Activity Manager window. ...
... gActivityManager.addActivity(process); // Step 2: Showing some progress let percent = 50; process.setProgress(percent, "Junk processing 25 of 50 messages", 25, 50); // Step 3: Removing the process and adding an Event using Process' attributes process.state = Components.interfaces.nsIActivityProcess.STATE_COMPLETED; gActivityManager.removeActivity(process.id); let event = Components.classes["@mozilla.org/activity-event;1"].createInstance(nsIAE); // Localization is omitted, initiator is omitted event.init(folder.prettiestName + " is processed", null, "No junk found", process.startTime, // start time Date.now()); // completion time event.contextType = process.contextType; // optional event.contextObj = process.contextObj; // optional gAct...
...And 4 more matches
Browser detection using the user agent - HTTP
trying to work around a specific bug in some version of a browser? Look, or ask, in specialized forums: you're unlikely to be the first to hit this problem. Also, experts, or simply people with another point of view, can give you ideas for working around the bug. If the problem seems uncommon, it's worth checking if this bug has been reported to the browser vendor via their bug tracking system (Mozilla; WebKit; Blink; Opera). Browser makers do pay attention to bug reports, and the analysis may hint about other workarounds for the bug. Are you trying to check for the existence of a specific feature? Your site needs to use a specific Web feature that some browsers don't yet support, and you want to send those users to an older Web site with fewer features but that you know will work. This is th...
...ng engines. Never use the OS token to define if a browser is on mobile, tablet or desktop. The OS may run on more than one type of (for example, Android runs on tablets as well as phones). ...
...e, tablet or desktop. The OS may run on more than one type of (for example, Android runs on tablets as well as phones). The following table summarizes the way major browser vendors indicate that their browsers are running on a mobile device: Common browsers User Agent strings Browser Rule Example Mozilla (Gecko, Firefox) Mobile or Tablet token in the comment. ...
...And 4 more matches
String.prototype.substring() - JavaScript
, then the effect of substring() is as if the two arguments were swapped; See example below. Any argument value that is less than 0 or greater than stringName.length is treated as if it were 0 and stringName.length, respectively. Any argument value that is NaN is treated as if it were 0. ...
...ng() is as if the two arguments were swapped; See example below. Any argument value that is less than 0 or greater than stringName.length is treated as if it were 0 and stringName.length, respectively. Any argument value that is NaN is treated as if it were 0. ...
...ple uses substring() to display characters from the string 'Mozilla': let anyString = 'Mozilla' // Displays 'M' console.log(anyString.substring(0, 1)) console.log(anyString.substring(1, 0)) // Displays 'Mozill' console.log(anyString.substring(0, 6)) // Displays 'lla' console.log(anyString.substring(4)) console.log(anyString.substring(4, 7)) console.log(anyString.substring(7, 4)) // Displays 'Mozilla' console.log(anyString.substring(0, 7)) console.log(anyString.substring(0, 10)) Using substring() with length property The following example uses the substring() method and length property to extract the last characters of a particular string. This method may be easier to remember, given that you don't need to know the starting and ending indices as you would in the above examples. // Display...
...And 4 more matches
Authoring MathML - MathML
nately there are many generators from simple notations, WYSIWYG editors and other Content Management Systems to help writing Web pages. Mathematical notations are even more complex with structures like fractions, square roots or matrices that are likely to require their own tags. As a consequence, good MathML authoring tools are more important and we describe some tools below. In particular, the Mozilla MathML team has been developing TeXZilla, a Javascript Unicode LaTeX-to-MathML converter that is intended to be used in many scenarios described here. Of course, the list is by no means exhaustive and you are invited to check out the W3C MathML software list where you can find various other tools. Note that by design, MathML is well-integrated in HTML5 and in particular you can use usual Web fea...
...tant 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 the mathematics: @namespace url('http://www.w3.org/1999/xhtml'); @namespace m url('http://www.w3.org/1998/Math/MathML'); body, m|mtext...
...the same .tex source for both latex and latexml. cons: This requires to install programs on your computer, which may be a bit more difficult or they may not be available on all platforms. You must run the programs on your computer and have some kind of workflow to get the Web pages at the end ; that may be a bit tedious. Binary programs are not appropriate to integrate them in a Mozilla extension or XUL application. TeXZilla can be used from the command line and will essentially have the same support as itex2MML described below. However, the stream filter behavior is not implemented yet. If you only want to parse simple LaTeX mathematical expressions, you might want to try tools like itex2MML or Blahtex. The latter is often available on Linux distributions. Let's conside...
...And 4 more matches
Working with Events - Archive of obsolete content
on. Then in the constructor you can assign a listener function to this property as an alternative to calling the object's on() method. For example: the ActionButton object emits an event when the button is clicked. The following add-on creates a button and assigns a listener to the onClick property of the options object supplied to the button's constructor. ...
...perty as an alternative to calling the object's on() method. For example: the ActionButton object emits an event when the button is clicked. The following add-on creates a button and assigns a listener to the onClick property of the options object supplied to the button's constructor. ...
... calling the object's on() method. For example: the ActionButton object emits an event when the button is clicked. The following add-on creates a button and assigns a listener to the onClick property of the options object supplied to the button's constructor. ...
...And 3 more matches
Connecting to Remote Content - Archive of obsolete content
or transferring XML between a local script and a remote server via HTTP. It is an integral part of the modern web, and all major browsers support it. Besides XML, it can be used to retrieve data in other formats, for example JSON, HTML and plain text. In this section we'll look into the XML and JSON communication mechanisms. ...
... First you need to create an XSLT stylesheet that acts as a template. This template will transform the XML you receive (in our case, the example XML document above) and convert it into XUL. The XSLT tutorial contains details for building these templates. ...
...value-of select="total" /> </xul:label> </xul:hbox> </xul:vbox> </xsl:template> </xsl:stylesheet> Next you need to read the XSLT stylesheet as a file stream and parse it into a document object. After that, the XSLT stylesheet can be imported into an XSLT processor as shown below. Now, the processor is ready to perform the transformation. ...
...And 3 more matches
Setting up an extension development environment - Archive of obsolete content
These details apply to Firefox, Thunderbird, and SeaMonkey (version 2.0 and above). Overview You'll create a new user profile to run your development specific Firefox session. This will utilize distinctive development preferences in about:config. Install Firefox development extensions specifically for this new developer user profile. Edit files in the extensions folder of this profile, and restart the application as this new developer profile. ...
...e Firefox profiles. This particularly comes in handy for the use of all currently available Firefox versions. It even allows the running of simultaneous versions, at the same time. To quickly achieve our task of creating just a developer profile, we will start the application with the parameters: /path/to/Firefox -no-remote -P ProfileName Without these parameters, the default behavior of your Mozilla applications is to only open the everyday user profile: named default. As we are specifically defining the user profile dev, If you don't have the dev profile already created, the profile selection window opens, where you can create it. In the following example, the described command starts a new instance of Firefox, with a profile called dev; even if an instance of Firefox is already running. ...
...ith a profile called dev; even if an instance of Firefox is already running. On Ubuntu (and many other Linux distributions): /usr/bin/firefox -no-remote -P dev On other distributions of Linux/Unix: /usr/local/bin/firefox -no-remote -P dev On MacOS Mavericks (10.9) and newer: /Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev & On Windows: Start -> Run "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -P dev On Windows 64 bit: Start -> Run "%ProgramFiles(x86)%\Mozilla Firefox\firefox.exe" -no-remote -P dev To start Thunderbird or SeaMonkey instead of Firefox, substitute thunderbird, or seamonkey for the firefox used in our examples. Note: you could run Firefox using your regular profile while developing. However, you won't enjoy the benefits of isolated re...
...And 3 more matches
Creating reusable content with CSS and XBL - Archive of obsolete content
Note: XBL cannot be loaded over HTTP, so this technique is only useful for local content accessed using the file:/// scheme, or from add-on code. You apply this technique in a simple demonstration. Information: XBL bindings The structure provided by markup languages and CSS is not ideal for complex applications where parts need to be self-contained and reusable. You can place stylesheets in separate files, and you can place scripts in separate files. But you must link those files from the document as a whole. Another structural limitation concerns content. ...
...-contained and reusable. You can place stylesheets in separate files, and you can place scripts in separate files. But you must link those files from the document as a whole. Another structural limitation concerns content. You can use CSS to provide content for selected elements, but the content is limited to text and images, and its positioning is limited to before or after the selected element. Mozilla provides a mechanism that overcomes these limitations: XBL (XML Bindings Language). You can use XBL to link selected elements to their own: Stylesheets Content Properties and methods Event handlers Because you avoid linking everything at the document level, you can make self-contained parts that are easy to maintain and reuse. More details For more information about XBL binding...
...void linking everything at the document level, you can make self-contained parts that are easy to maintain and reuse. More details For more information about XBL bindings, see the XBL page in this wiki. Action: An XBL demonstration Make a new HTML document, doc6.html. Copy and paste the content from here: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <HTML> <HEAD> <TITLE>Mozilla CSS Getting Started - XBL demonstration</TITLE> <LINK rel="stylesheet" type="text/css" href="style6.css"> </HEAD> <BODY> <H1>XBL demonstration</H1> <DIV id="square">Click Me</DIV> </BODY> </HTML> Make a new CSS file, style6.css. This stylesheet contains the document style. Copy and paste the content from here: /*** XBL demonstration ***/ #square { -moz-binding: url("square.xbl#square"); ...
...And 3 more matches
JXON - Archive of obsolete content
r will convert an XML DOM tree to a JavaScript Object tree. The text content of each element is stored into the keyValue property, while nodeAttributes, if they exist, are listed under the child object keyAttributes. The constructor's argument can be the entire XML Document, a DocumentFragment or simply an Element node. /*\ |*| |*| JXON Snippet #1 MDNDeveloper Network |*| |*| https://developer.mozilla.org/docs/JXON |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parseText (sValue) { if (/^\s*$/.test(sValue)) { return null; } if (/^(?:true|false)$/i.test(sValue)) { return sValue.toLowerCase() === "true"; } if (isFinite(sValue)...
...hod, in which nodeAttributes are listed under the same object of child nodes but have the "@" prefix (as suggested by the BadgerFish Convention). As above, the text content is stored into the keyValue property. The constructor's argument can be the entire XML Document, a DocumentFragment or simply an Element node of it. /*\ |*| |*| JXON Snippet #2 MDNDeveloper Network |*| |*| https://developer.mozilla.org/docs/JXON |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parseText (sValue) { if (/^\s*$/.test(sValue)) { return null; } if (/^(?:true|false)$/i.test(sValue)) { return sValue.toLowerCase() === "true"; } if (isFinite(sValue)...
...ations). Also, this time we use a function instead of a constructor. The function's argument can be the entire XML Document, a DocumentFragment, or simply an Element node within it. nodeAttributes have the "@" prefix, as suggested by the BadgerFish Convention. In many cases, this is the most practical conversion method. /*\ |*| |*| JXON Snippet #3 MDNDeveloper Network |*| |*| https://developer.mozilla.org/docs/JXON |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parseText (sValue) { if (/^\s*$/.test(sValue)) { return null; } if (/^(?:true|false)$/i.test(sValue)) { return sValue.toLowerCase() === "true"; } if (isFinite(sValue)...
...And 3 more matches
Kill the XUL.mfl file for good - Archive of obsolete content
Loading these files from the server, and storing them back slows down the network, thus it may actually be faster without than with XUL.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly. ...
...fileserver based environment, this can be problematic: At several megabytes a pop, these files will take up a considerable amount of space, because each user has his own... ...
...eral megabytes a pop, these files will take up a considerable amount of space, because each user has his own... Loading these files from the server, and storing them back slows down the network, thus it may actually be faster without than with XUL.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly. ...
...And 3 more matches
Finding the file to modify - Archive of obsolete content
The structure layer identifies the widgets (menus, buttons, etc.) and their position in the UI relative to each other, the style layer defines how the widgets look (size, color, style, etc.) and their overall position (alignment), and the behavior layer specifies how the widgets behave and how users can use them to accomplish their goals. mention the localization layer (Note: These layers are not completely mutually exclusive. ...
...layer. The structure layer consists of XUL files. XUL, which is short for XML-based User Interface Language (and is pronounced like "Zool"), is an XML-based language specifically designed for describing application interfaces. It contains elements for all common UI widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers). ...
...cally designed for describing application interfaces. It contains elements for all common UI widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers). Each window and dialog box in Mozilla is defined by a single XUL file (in some cases other XUL files called overlays contribute portions of another window's structure). To add a tinderbox status icon to Mozilla, we need to find the XUL file that defines the structure of the browser window. The best way to find a XUL file for a window is to use the DOM Inspector. The DOM Inspector is a tool bundled with Mozilla that allows you to examine the DOM of web pages and XUL windows. To access it, go to the "Tools" menu, select the "Web Development" submenu, then select the "DOM Inspector" item. The DOM Inspecto...
...And 3 more matches
Installing Dehydra - Archive of obsolete content
at the mq extension is enabled. SpiderMonkey provides scripting capabilities for Dehydra. GCC 4.5, with the package gcc-4.5-plugin-dev installed. (Alternately, build from source) A modern Linux distribution. Dehydra is not supported on Mac OS X. Building SpiderMonkey It is recommended that you use SpiderMonkey revision AURORA_BASE_20110705 when building Dehydra. cd $HOME hg clone http://hg.mozilla.org/mozilla-central/ cd mozilla-central hg update AURORA_BASE_20110705 cd js/src autoconf-2.13 mkdir $HOME/obj-js cd $HOME/obj-js $HOME/mozilla-central/js/src/configure --enable-optimize --disable-debug make It has to be checked whether later/newer branches (like AURORA_BASE_20120131) are working, too. Please also note that autoconf v2.13 is really needed: it does not work with e.g. v2.68. There...
... above. Building GCC 4.5 For Treehydra's process_tree_decl to work, when compiling with g++, you must use a patched GCC 4.5 before building Dehydra. cd $HOME # obtain GCC 4.5.3 (see http://gcc.gnu.org/mirrors.html for alternate mirrors) wget http://www.netgull.com/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 tar -jxvf gcc-4.5.3.tar.bz2 # apply PLUGIN_FINISH_DECL patch wget https://bug559964.bugzilla.mozilla.o....cgi?id=457606 -O finish_decl.diff cd gcc-4.5.3 patch -p0 < ../finish_decl.diff # build GCC cd .. mkdir gcc-objdir mkdir gcc-dist cd gcc-objdir ../gcc-4.5.3/configure --disable-bootstrap --enable-languages=c,c++ --prefix=$PWD/../gcc-dist make make install Building Dehydra and Treehydra Building Dehydra requires SpiderMonkey development headers from the previous step. CXX should point to yo...
...../gcc-4.5.3/configure --disable-bootstrap --enable-languages=c,c++ --prefix=$PWD/../gcc-dist make make install Building Dehydra and Treehydra Building Dehydra requires SpiderMonkey development headers from the previous step. CXX should point to your copy of GCC 4.5. It is recommended to get the latest Dehydra sources by checking out from Mercurial. ...
...And 3 more matches
Embedding FAQ - Archive of obsolete content
However, there is a stripped down, uncommented code with eclipse libraries in this thread. ...
...However, there is a stripped down, uncommented code with eclipse libraries in this thread. ...
...However, there is a stripped down, uncommented code with eclipse libraries in this thread. ...
...And 3 more matches
Supporting private browsing mode - Archive of obsolete content
avoid saving personal information when private browsing mode is enabled. Doing this is quite easy, using the nsIPrivateBrowsingService interface. Detecting private browsing mode Determining whether or not the user is currently in private browsing mode is simple. Just check the value of the privateBrowsingEnabled attribute on the nsIPrivateBrowsingService service. var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; if (!inPrivateBrowsingMode) { /* save private information */ } In the above example, we only save the user's private information if not in private browsing mode. Note: Private browsing mode may only be detected by chrome code, such...
...te("privatebrowsingmode") == "temporary") { // private browsing mode is temporary } if (docRoot.getAttribute("privatebrowsingmode") == "permanent") { // private browsing mode is permanent for this session } Turning private browsing on and off Extensions can turn private browsing mode on and off by manipulating the value of the privateBrowsingEnabled attribute. ...
...g mode changes. This handles interacting with the private browsing service so you don't have to. ...
...And 3 more matches
Using cross commit - Archive of obsolete content
cross-commit is a script that allows a single patch to be easily checked in on multiple branches. Getting the script "make -f client.mk pull_all" from a working copy of the trunk now pulls cross-commit, and that'll work on the 1.8 branch soon, too, so you might already have the script. If you don't, however, then from the parent directory of your source dir, do: cvs co mozilla/tools/cross-commit Note that you will need to have $CVSROOT and such set up correctly for this to work. Using the script Quick overview There are a couple of common ways to use cross-commit: Land something simultaneously on the trunk and MOZILLA_1_8_BRANCH # Modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # Commit on trunk and branch at once # Make sure to use -m "Commit message"...
...Other...
...aret.h Land something on two other branches that has already landed on the trunk # update to the first branch you want to land on cvs update -rMOZILLA_1_8_BRANCH layout/base/nsCaret.h # Modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # Commit on all the branches at once # Make sure to use -m "Commit message" when doing so tools/cross-commit --moz18 --branch MOZILLA_1_8_0_BRANCH -m "Fix some sort of security bug" layout/base/nsCaret.h Notes Note that you MUST use a -m option with a CVS checkin message. Otherwise cross-commit will end up waiting forever for you to type a CVS checkin message in an editor that it never shows you! (Although it works without specifying -m on the command line if you are using X-enabled emacs on Linux.) Also note that if you do...
...And 3 more matches
Venkman Introduction - Archive of obsolete content
This article provides an overview and some practical examples of using the JavaScript debugger in web applications and web page scripting. This introduction is the first in a series of articles on Venkman and JavaScript debugging. ...
...This article provides an overview and some practical examples of using the JavaScript debugger in web applications and web page scripting. This introduction is the first in a series of articles on Venkman and JavaScript debugging. ...
...step, /next, /finish, /frame, and /where commands. On Windows, the JavaScript debugger compares favorably with Visual Interdev and other large web development tools. On other platforms, including Mac OS and Unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. 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 ...
...And 3 more matches
Venkman - Archive of obsolete content
Documentation Venkman Introduction An overview and some practical examples of using the JavaScript Debugger in Web development. Using Breakpoints in Venkman This article describes breakpoints in JavaScript and how to use Venkman to set and examine breakpoints. ...
... Documentation Venkman Introduction An overview and some practical examples of using the JavaScript Debugger in Web development. Using Breakpoints in Venkman This article describes breakpoints in JavaScript and how to use Venkman to set and examine breakpoints. ...
...aScript debugging API known as js/jsd. This API augments the existing JavaScript API, providing clients with a useful set of debugger functionality implemented in C. Bandhauer then went on to reflect that API into Java, and create his cross platform front end, eventually producing Netscape JavaScript Debugger 1.0 and 1.1. In April of 2001, Robert Ginda began work on a JavaScript debugger for Mozilla, called Venkman. Venkman builds on the js/jsd portion of John's 1998 work, exposing it as an XPCOM component. This allows the user interface be written in JavaScript and XUL, which allows Venkman to be fully cross-platform. Venkman is named after the character Dr. Peter Venkman, played by Bill Murray in the movies Ghostbusters and Ghostbusters II. Getting Venkman ...
...And 3 more matches
Video presentations - Archive of obsolete content
Mozilla is actively working to produce video presentations that can help you learn how the Mozilla codebase works and how to take advantage of its technology in your own applications and extensions. This article is a jumping-off point to help you find those presentations. 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. ...
...g 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. ...
...e 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 about the Mozilla project. (as QuickTime; 138 MB and 132 MB) Developing Mozilla These presentations cover various aspects of the process of working on the Mozilla project, including building, testing, and debugging. H...
...And 3 more matches
Elements - Archive of obsolete content
hello.xml should reside in the same directory which co...
...lo world! </html:b><children/></content> </binding> <binding id="hello2"> <content><html:b>Hello from my binding! </html:b><children/></content> </binding> </bindings> You can view the result by opening helloworld.html in Firefox. hello.xml should reside in the same directory which contains helloworld.html. Next: bindings > binding element. Notes In the current stable releases of Mozilla products (e.g. Firefox 2) it is impossible to attach bindings to table sub-elements (rows, cells etc.) You can attach binding only to the table element itself. This has been fixed for future versions of Mozilla products. See bug 83830 for more information and for workarounds. Default encoding in XML documents (including XBL files) is UTF-8. An explicit encoding declarations may be present to ove...
... a namespace-related resource. Namespaces in XML Besides the default namespace, you can declare any amount of additional namespaces to handle your content. The most useful namespaces could be HTML/XHTML, XUL (XML User Interface Language), SVG (Scalable Vector Graphics) and XLink. ...
...And 3 more matches
Unix stub installer - Archive of obsolete content
Where does the unix stub installer code reside? The unix stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ard/unix/src2/> How do we get setup to debug the unix stub installer? Build the unix installer (debug or non-debug target) by typing "make" in the src2 directory Grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...staller.tar.gz> Gunzip and untar the build to some temporary location like /tmp. Copy the installer.ini and config.ini files over into the src2 directory. If you don't want the installer to download then grab a nightly "full" installer, say from <ftp://ftp.mozilla.org/pub/mozilla/ni...gnu-sea.tar.gz>. Then untar and gunzip this to /tmp. Copy the xpi directory into the src2 directory you are debugging from. Run the ins...
.../tmp. Copy the installer.ini and config.ini files over into the src2 directory. If you don't want the installer to download then grab a nightly "full" installer, say from <ftp://ftp.mozilla.org/pub/mozilla/ni...gnu-sea.tar.gz>. Then untar and gunzip this to /tmp. Copy the xpi directory into the src2 directory you are debugging from. Run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags. If you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt. ...
...ctory you are debugging from. Run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags. If you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt. How we get setup to debug the XPInstall engine from the unix stub installer? Build your entire mozilla tree (which should build the installer in the src2 directory as well). Go to mozilla/xpinstall/packager/unix. On the shell prompt type "perl deliver.pl". Now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/installer/raw. Debug using "gdb mozilla-installer-bin" and set a breakpoint at XPI_Init(). You can step into the XPInstall engine through the xpist...
...And 3 more matches
Windows stub installer - Archive of obsolete content
Where does the Windows stub installer code reside? The windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/setup/> How do we get setup to debug the Windows stub installer? Build your entire mozilla tree, which should build the stub installer in the setup directory as well. (If you need to rebuild stub installer, got to /mozilla/xpinstall/wizard/windows/setup and type "nmake /f makefile.win") Go to mozilla/xpinstall/wizard/windows/builder On the shell prompt type "perl build.pl". Now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/dist/WIN32_D.OBJ/install. Run the stub installer setup.exe from the install directory. If you need to use VC++ to debug the installer: Under Project | Settings | Debug ...
...illa/xpinstall/wizard/windows/builder On the shell prompt type "perl build.pl". Now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/dist/WIN32_D.OBJ/install. Run the stub installer setup.exe from the install directory. ...
...you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/dist/WIN32_D.OBJ/install. Run the stub installer setup.exe from the install directory. ...
...And 3 more matches
Creating a Skin - Archive of obsolete content
unding on the tabs. tab:first-child { -moz-border-radius: 4px 0px 0px 0px; } tab:last-child { -moz-border-radius: 0px 4px 0px 0px; } tab[selected="true"] { color: #000066; font-weight: bold; text-decoration: underline; } Two rules change the normal tab appearance, the first sets the rounding on the first tab and the second sets the rounding on the last tab. Used here is a special Mozilla style rule, -moz-border-radius, that creates rounded border corners. The upper left border of the first tab and the upper right border of the second tab are rounded by four pixels and the other corners have a round corner of zero pixels, which is equivalent to no rounding. Increase the values here for more rounding and decrease them for a more rectangular look. The last rule only applies to tabs...
...ve their selected attribute set to true. It makes the text in the selected tab appear bold, underlined and dark blue. Note in the image that this style has applied only to the first tab, because it's the selected one. Adding Toolbar Icons It is somewhat difficult to distinguish the buttons on the toolbar from the commands on the menu. We could add some icons to the buttons to make them clearer. Mozilla Composer provides some icons for open and save buttons, which we'll just use here to save time. We can set the image for a button using the list-style-image CSS property. #opensearch { list-style-image: url("chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(48px 16px 64px 0); -moz-box-orient: vertical; } #savesearch { list-style-image: url("chrome://editor/skin/icons/btn1.g...
...save time. We can set the image for a button using the list-style-image CSS property. #opensearch { list-style-image: url("chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(48px 16px 64px 0); -moz-box-orient: vertical; } #savesearch { list-style-image: url("chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(80px 16px 96px 0); -moz-box-orient: vertical; } Mozilla provides a custom style property -moz-image-region which can be used to make an element use part of an image. You can think of it as a clip region for the image. You set the property to a position and size within an image and the button will display only that section of the image. This allows you to use the same image for multiple buttons and set a different region for each one. When you have lot...
...And 3 more matches
Cross Package Overlays - Archive of obsolete content
revious 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. This is useful because the overlay can modify the user interface of another package without changing the other package. For example, you could add menu items or toolbars to the Mozilla browser window. We'll use this feature to add a toolbar to the Mozilla browser window. The Mozilla Mail application uses overlays to add content to the browser window. For example, if Mail is not installed, there will be no New Message command. However, if Mail is installed, an overlay will be applied to the menu to add the New Message command. Below, we'll add a find files toolbar to the browser...
...Once you have created an overlay, you can add it to the contents.rdf file. Then add items, one for each window that you want the overlay to apply to. Our find files example First, let's create a simple overlay. ...
... add items, one for each window that you want the overlay to apply to. Our find files example First, let's create a simple overlay. It will just have a few elements for entering a filename and directory to search. Call the file foverlay.xul and add it to the findfile directory along with findfile.xul. ...
...And 3 more matches
Introduction - Archive of obsolete content
nly the user interface will be created, with only limited functionality. The actual finding of files will not be implemented. A blue line will appear to the left of a paragraph where the find file dialog is being modified. You can follow along by looking for these sections. What is XUL and why was it created? XUL (pronounced "zool" and rhyming with "cool") was created to make development of the Mozilla browser easier and faster. It is an XML language so all features available to XML are also available to XUL. Most applications need to be developed using features of a specific platform making building cross-platform software time-consuming and costly. A number of cross-platform solutions have been developed in the past. Java, for example, has portability as a main selling point. XUL is one such...
...ments found in modern graphical interfaces. Some elements that can be created are: Input controls such as textboxes and checkboxes Toolbars with buttons or other content Menus on a menu bar or pop up menus Tabbed dialogs Trees for hierarchical or tabular information Keyboard shortcuts The displayed content can be created from the contents of a XUL file or with data from a datasource. In Mozilla, such datasources include a user's mailbox, their bookmarks and search results. The contents of menus, trees and other elements can be populated with this data, or with your own data supplied in an RDF file. There are several ways you can use XUL: Firefox extension An extension adds functionality to the browser itself, often in the form of extra toolbars, context menus, or customizations to ...
... extension An extension adds functionality to the browser itself, often in the form of extra toolbars, context menus, or customizations to the browser's user interface. This is done using a feature of XUL called an overlay, which allows the UI provided from one source, in this case, the Firefox browser, to be merged together with the UI from the extension. Extensions may also be applied to other Mozilla based products such as Thunderbird. Standalone XULRunner application XULRunner is a packaged version of the Mozilla platform which allows you to create standalone XUL applications. A browser isn't required to run these applications, as they have their own executable file. XUL package In between the other two are applications which are created in the same way as an extension, but they act like...
...And 3 more matches
Localization - Archive of obsolete content
; has. A file is created which contains the entity declarations for each supported language. In English, the &findLabel; entity will probably be declared to have the text "Find". DTD Files Entities are declared in Document Type Definition (DTD) files. Files of this type are normally used to declare the syntax and semantics of a particular XML file, but they also let you declare entities. In the Mozilla chrome system, you will find DTD files located in the locales subdirectory. You would normally have one DTD file (with an extension .dtd) per XUL file. If you look in the chrome directory, you should see an archive for your language. (en-US.jar is the default for English.) You might have locale files in multiple languages, for example, US English (en-US) and French (fr). Inside these archives, y...
...L file, usually with the same filename except with a .dtd extension. So, for the find files dialog, we will need a file called findfile.dtd. For non-installed chrome files, you can just put the DTD file in the same directory as the XUL file. Note: You should encode DTD files as UTF-8 for non-ASCII characters. That is, you should save them in UTF-8 format (without BOM). For more information, see Mozilla Language Packs. Once you have created a DTD file for your XUL, you will need to add a line to the XUL file which indicates that you want to use the DTD file. Otherwise, errors will occur as it won't be able to find the entities. To do this, add a line of the following form somewhere near the top of the XUL file: <!DOCTYPE window SYSTEM "chrome://findfile/locale/findfile.dtd"> This line specif...
...nges shown in red. ...
...And 3 more matches
XPCOM Examples - Archive of obsolete content
<< PreviousNext >> This section provides some examples of using XPCOM along with some additional interfaces. Window Management This example contains RDF datasource that will be seen in the later section. You might skip this example for the time being, except when you have already had that knowledge. Creating a Window menu The list of currently open Mozilla windows can be used as an RDF datasource. This allows you to create a Window menu with a list of the currently open windows in the application. The datasource for this is rdf:window-mediator. We can use this as in the following example: Example 1 : Source <toolbox> <menubar id="windowlist-menubar"> <menu label="Window"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"> <templ...
...ted on the menu. Window mediator component This is fine for displaying a list of open windows, but we would like to enhance this so that clicking on the menu item will switch to that window. This is accomplished by using the window mediator component. It implements the interface nsIWindowDataSource. The code below shows how to get a component which implements it: var wmdata = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService(); wmdata.QueryInterface(Components.interfaces.nsIWindowDataSource); This code retrieves a window mediator data source component. The component used here is the same one that handles the window-mediator RDF datasource. You can also get this component through the RDF service, which is another service that manages RDF datasources. The nsIWindo...
...dow" oncommand="switchFocus(event.target);"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"> <template> <rule> <menuitem uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name"/> </rule> </template> </menupopup> </menu> </menubar> </toolbox> <script> function switchFocus(elem) { var mediator = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService(); mediator.QueryInterface(Components.interfaces.nsIWindowDataSource); var resource = elem.getAttribute('id'); switchwindow = mediator.getWindowForResource(resource); if (switchwindow){ switchwindow.focus(); } } </script> A command handler was added to the menu element which calls the function switchFocus() with a parameter o...
...And 3 more matches
Using spell checking in XUL - Archive of obsolete content
gine component and then call the check() method on the string you wish to test. This method returns true if the word is correctly spelled, or false if it's not. You may also want to check to see if the word is in the user's personal dictionary, since sometimes a word might be correctly spelled but in the dictionary. ...
...thod on the string you wish to test. This method returns true if the word is correctly spelled, or false if it's not. You may also want to check to see if the word is in the user's personal dictionary, since sometimes a word might be correctly spelled but in the dictionary. ...
... correctly spelled, or false if it's not. You may also want to check to see if the word is in the user's personal dictionary, since sometimes a word might be correctly spelled but in the dictionary. ...
...And 3 more matches
CommandLine - Archive of obsolete content
var appHandler = { /* nsISupports */ QueryInterface : function clh_QI(aIID) { if (aIID.equals(nsICommandLineHandler) || aIID.equals(nsIFactory) || aIID.equals(nsISupports)) return this; throw Components.results.NS_ERROR_NO_INTERFACE; }, /* nsICommandLineHandler */ handle : function clh_handle(aCmdLine) { var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.notifyObservers(aCmdLine, "commandline-args-changed", null); }, helpInfo : " -test <value> A test attribute\n", /* nsIFactory */ createInstance : function mdh_CI(aOuter, aIID) { if (aOuter != null) { throw Components.results.NS_ERROR...
...QueryInterface(aIID); throw components.results.NS_ERROR_FAILURE; }, registerSelf : function mod_regself(aCompMgr, aFileSpec, aLocation, aType) { var compReg = aCompMgr.QueryInterface(nsIComponentRegistrar); compReg.registerFactoryLocation(CLASS_ID, CLASS_NAME, CONTRACT_ID, aFileSpec, aLocation, aType); var catMan = Components.classes["@mozilla.org/categorymanager;1"] .getService(nsICategoryManager); catMan.addCategoryEntry("command-line-handler", CLD_CATEGORY, CONTRACT_ID, true, true); }, unregisterSelf : function mod_unreg(aCompMgr, aLocation, aType) { var compReg = aCompMgr.QueryInterface(nsIComponentRegistrar); compReg.unregisterFactoryLocation(CLASS_ID, aLoca...
... .getService(nsICategoryManager); catMan.addCategoryEntry("command-line-handler", CLD_CATEGORY, CONTRACT_ID, true, true); }, unregisterSelf : function mod_unreg(aCompMgr, aLocation, aType) { var compReg = aCompMgr.QueryInterface(nsIComponentRegistrar); compReg.unregisterFactoryLocation(CLASS_ID, aLocation); var catMan = Components.classes["@mozilla.org/categorymanager;1"] .getService(nsICategoryManager); catMan.deleteCategoryEntry("command-line-handler", CLD_CATEGORY); }, canUnload : function (aCompMgr) { return true; } }; function NSGetModule(aCompMgr, aFileSpec) { return appHandlerModule; } Create an observer that will get notified when arguments change: chrome/content/cmdline.js function ...
...And 3 more matches
XULRunner tips - Archive of obsolete content
e://inspector/content/inspector.xul", "", "chrome"); Alternatively, the DOM Inspector may also be added as an extension: (if you already have inspector installed for another application you can skip to the next step) Follow the instructions above through "Unzip the package." Create a file in the extensions directory of your application with the same name as the DOM Inspector ID (inspector@mozilla.org) containing one line of text -- the exact path to the root directory of DOM inspector (where the install.rdf is) like this one: /home/username/.mozilla/firefox/numbersandletters/extensions/inspector@mozilla.org/ Now create a javascript file with the following code and include it in the main window of your application: function startDOMi() { // Load the Window DataSource so that brows...
... /home/username/.mozilla/firefox/numbersandletters/extensions/inspector@mozilla.org/ Now create a javascript file with the following code and include it in the main window of your application: function startDOMi() { // Load the Window DataSource so that browser windows opened subsequent to DOM // Inspector show up in the DOM Inspector's window list. ...
...unction startDOMi() { // Load the Window DataSource so that browser windows opened subsequent to DOM // Inspector show up in the DOM Inspector's window list. ...
...And 3 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
July 27, 2012 so it will take some time to completely fill in and some issues still need to have solutions written for them. Operating system specific issues Windows 7 Windows 7 Aero missing right-hand title bar buttons When tabs are on top and the menu bar is disabled, Firefox is missing the min/max/restore/close button on the right side of the title bar. Please see the following threads on MozillaZine for solutions to this issue: http://forums.mozillazine.org/viewtopic.php?f=18&t=2131121 http://forums.mozillazine.org/viewtopic.php?f=18&t=1953371&start=60 Windows 7 Aero not going into full screen mode properly On Win7 with Aero Glass support Firefox doesn't always go to full screen mode from a normal window properly. The resolution to this issue is to add the following code to your brow...
...file somewhere below where the main-window is made transparent to support Aero glass. @media all and (-moz-windows-compositor) { /* Make transition to Fullscreen mode seamlessly in Firefox 10+ */ #main-window[inFullscreen="true"] { -moz-appearance: none; background-color: -moz-dialog!important; } } For more information about this issue please see bug 732757 and bug 732757 and this MozillaZine thread. Mac OS X OS X Lion missing toolbar button icons Due to Firefox bug 679708 and bug 702558, some toolbar buttons icons may be missing on Firefox 8 and later running on Mac OS X Lion. In order to work around this issue, you need to either rename any of the following files that are in your chrome://browser/skin/ folder and fix any references to those files, or copy them to the folder c...
... Web Developer > Responsive Design View) needs background styling for the unused area of the content window. Debugger Debugger toolbar buttons are missing icons On the Debugger (Tools > Web Developer > Debugger) the toolbar buttons are missing their icons. Miscellaneous issues HTML 5 media controls HTML 5 media controls are not styled The HTML5 video control bar is not styled. Please go to Mozilla's Mission page using both your theme and the default theme and try the video on that page. This issue needs to be corrected in the next version of your theme. HTML 5 media control bar is missing full screen button The fullscreen icon is missing from the HTML5 video control bar. To test this go to Mozilla's Mission page. Warning: If you copy over the Firefox 11 or newer style rules and graphics...
...And 3 more matches
CSS - Archive of obsolete content
Archive › Web › CSS
Normally, a <...
...Normally, a <...
...Normally, a <...
...And 3 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> This example illustrates that a conformant browser can ignore content inside of comments. In addition, this example shows how the differences between browsers in handling inline content in text/xml or application/xhtml+xml can be problematic. Mozilla 1.1+/Opera 7 Do not apply CSS or execute the JavaScript. Netscape 7.0x/Mozilla 1.0.x Do not apply CSS but does execute the JavaScript. Internet Explorer 5.5+ Can not display the document. (See Talk:Properly_Using_CSS_and_JavaScript_in_XHTML_Documents of this ascertation. - XmlGuru) Inline style and script Containing Double Dashes Another problem with using comments to surround JavaScript ...
...ty. <script type="text/javascript"> //<![CDATA[ var i = 0; while (++i < 10) { // ... } //]]> </script> Examples Using CSS rules in inline style within comments Example 1 - XHTML 1.0 Strict as text/html This example illustrates the behavior of XHTML served as text/html when CSS rules are contained inline and surrounded by comments. ...
...s are contained inline and surrounded by comments. This example is supported by Netscape 7.x, Mozilla, Opera 7 and Internet Explorer 5.5+ which all apply the CSS rules as expected. Example 2 - XHTML 1.0 Strict as text/xml This example illustrates the behavior of XHTML served as text/xml when CSS rules are contained inline and surrounded by comments. This example is supported by Netscape 7.x, Mozilla, and Opera 7 but not Internet Explorer 5.5+ (See Talk:Properly_Using_CSS_and_JavaScript_in_XHTML_Documents of this ascertation. - XmlGuru). Note that Netscape 7.x, Mozilla and Opera all agree that CSS rules contained inline inside of comments are to be ignored. Example 3 - XHTML 1.0 Strict as application/xhtml+xml This example illustrates the behavior of XHTML served as application/xhtml+xml...
...And 3 more matches
RDF in Fifty Words or Less - Archive of obsolete content
fifty words, but the key points are pretty simple (and put into bold text for you manager-types who just want to get straight to the point). The Resource Description Framework, or "RDF", is really two things. First, RDF is a graph-based model for describing Internetresources (like web pages and email messages), and how these resources relate to one another. But what does that mean,really? To a Mozilla developer, it means that the RDF data model (the "graph") can be used as a mechanism for integrating and organizing Internet resources. Let's look at an example:bookmarks. Right now, most web browsers let you organize your bookmarks hierarchically intofolders. Each bookmark is apointer to a web page called a URI (Uniform Resource Identifier). But a web page is just one kind of Internet resource...
...ark example. Say that one of my bookmark "folders" is really a pointer to my email inbox: when I open that folder, voila! All the messages that I've received over night appear. But how did that happen? The inbox "folder" was really just a pointer to an Internet resource that contains more RDF that extends the graph. ...
...ource that contains more RDF that extends the graph. That "Internet resource" was a URI that pointed to a CGI script (say, http://www.mozilla.org/smart-mail/get-mail.cgi?user=waterson&folder=inbox). ...
...And 3 more matches
What is a URL? - Learn web development
nting to a resource that no longer exists or that has moved. As the resource represented by the URL and the URL itself are handled by the Web server, it is up to the owner of the web server to carefully manage that resource and its associated URL. Active Learning There is no active learning available yet. Deeper dive Basics: anatomy of a URL Here are some examples of URLs: https://developer.mozilla.org https://developer.mozilla.org/docs/Learn/ https://developer.mozilla.org/search?q=URL Any of those URLs can be typed into your browser's address bar to tell it to load the associated page (resource). A URL is composed of different parts, some mandatory and others optional. Let's see the most important parts using the following URL: http://www.example.com:80/path/to/myfile.html?key1=value1&k...
... relative URL by looking only at the path part of the URL. If the path part of the URL starts with the "/" character, the browser will fetch that resource from the top root of the server, without reference to the context given by the current document. Let's look at some examples to make this clearer. Examples of absolute URLs Full URL (the same as the one we used before) https://developer.mozilla.org/docs/Learn Implicit protocol //developer.mozilla.org/docs/Learn In this case, the browser will call that URL with the same protocol as the one used to load the document hosting that URL. Implicit domain name /docs/Learn This is the most common use case for an absolute URL within an HTML document. The browser will use the same protocol and the same domain name as the one used t...
...ument. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL. Note: it isn't possible to omit the domain name without omitting the protocol as well. ...
...And 3 more matches
What’s in the head? Metadata in HTML - Learn web development
the content of your page is useful as it has the potential to make your page appear higher in relevant searches performed in search engines (such activities are termed Search Engine Optimization, or SEO.) Active learning: The description's use in search engines The description is also used on search engine result pages. Let's go through an exercise to explore this Go to the front page of The Mozilla Developer Network. View the page's source (Right/Ctrl + click on the page, choose View Page Source from the context menu.) Find the description meta tag. It will look something like this (although it may change over time): <meta name="description" content="The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progress...
...atures you'll see on websites are proprietary creations, designed to provide certain sites (such as social networking sites) with specific pieces of information they can use. For example, Open Graph Data is a metadata protocol that Facebook invented to provide richer metadata for websites. In the MDN Web Docs sourcecode, you'll find this: <meta property="og:image" content="https://developer.cdn.mozilla.net/static/img/opengraph-logo.dc4e08e2f6af.png"> <meta property="og:description" content="The Mozilla Developer Network (MDN) provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and HTML5 Apps. It also documents Mozilla products, like Firefox OS."> <meta property="og:title" content="Mozilla Developer Network"> One effect of this is that when you link...
...The most commonly used of these is the favicon (short for "favorites icon", referring to its use in the "favorites" or "bookmarks" lists in browsers). ...
...And 3 more matches
What to do and what not to do in Bugzilla
Getting/Upgrading Bugzilla privileges If you want to get Bugzilla privileges (as described below), please see this page. It lists the requirements and the email to contact. If you need faster access to get canconfirm or editbugs, especially in order to triage bugs or to participate in a bug day, then you can ask in #bmo on irc, or you may create a bug requesting permissions. Include a link to your Bugzilla activity page in the bug description. ...
...f there are only a few comments in the bug, it may be reopened only if the original reporter provides more info, or confirms someone else's steps to reproduce. 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. Repo...
...f problems with specific websites that result from bad coding practices already determined to be "tech evangelism" cases by the module owner or peer, or problems that result from the use of proprietary technology, should be be moved to the Tech Evangelism product rather than being resolved as INVALID. Resolving bugs as FIXED Resolve a bug as FIXED if the bug has been fixed by a checkin into the Mozilla Mercurial code repository. Bugs which can no longer be reproduced should be marked WORKSFORME instead of FIXED if they can't be linked to a single checkin. Resolving bugs as WONTFIX Bugs should not be marked WONTFIX by the normal bug triager. The decision to mark a bug WONTFIX is reserved for module owners or module peers. Verifying bugs Only RESOLVED bugs can be verified. To verify a bug, yo...
...And 3 more matches
Creating a Language Pack
need to get the right strings for the build you use. Best is to create an installer there. First, we get the en-US builds. There is a target to get those, too, Another way to test it to repack the en-US binary. From the obj-firefox-build/browser/locales directory, download the most recent en-US nightly that will be repacked to include your locale. ...
... right strings for the build you use. Best is to create an installer there. First, we get the en-US builds. There is a target to get those, too, Another way to test it to repack the en-US binary. From the obj-firefox-build/browser/locales directory, download the most recent en-US nightly that will be repacked to include your locale. ...
...e. Best is to create an installer there. First, we get the en-US builds. There is a target to get those, too, Another way to test it to repack the en-US binary. From the obj-firefox-build/browser/locales directory, download the most recent en-US nightly that will be repacked to include your locale. ...
...And 3 more matches
Creating a spell check dictionary add-on
ersion number (see below). In addition to these required files, you may add optional files, for example to give your add-on an icon or to describe the license of the dictionary. Here is an example of the install.rdf file. You can create and edit it with a plain text editor such as Notepad. ...
...ed files, you may add optional files, for example to give your add-on an icon or to describe the license of the dictionary. Here is an example of the install.rdf file. You can create and edit it with a plain text editor such as Notepad. ...
...n icon or to describe the license of the dictionary. Here is an example of the install.rdf file. You can create and edit it with a plain text editor such as Notepad. ...
...And 3 more matches
Creating Sandboxed HTTP Connections
anslate 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. ...
...s a global, since another listener will be used for cookie notifications (covered in the next section). It is usually best to use a JavaScript wrapper that implements all the required methods and calls the specified callback function when the connection has completed. ...
...nel.asyncOpen(listener, null); function StreamListener(aCallbackFunc) { this.mCallbackFunc = aCallbackFunc; } StreamListener.prototype = { mData: "", // nsIStreamListener onStartRequest: function (aRequest, aContext) { this.mData = ""; }, onDataAvailable: function (aRequest, aContext, aStream, aSourceOffset, aLength) { var scriptableInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"] .createInstance(Components.interfaces.nsIScriptableInputStream); scriptableInputStream.init(aStream); this.mData += scriptableInputStream.read(aLength); }, onStopRequest: function (aRequest, aContext, aStatus) { if (Components.isSuccessCode(aStatus)) { // request was successfull this.mCallbackFunc(this.mData); } else { ...
...And 3 more matches
Creating Custom Events That Can Pass Data
other than the standard mouse/keyboard events) and, depending on the data passed along with this event, you want Firefox to react differently. Note that starting with version 6, Firefox supports DOM Level 3 customEvent, which lets you dispatch custom events with arbitrary data from JavaScript. (see bug 427537) Requirements In order to do this you must be able to do all of the following: Download Mozilla Source Code Build Mozilla Creating Custom Firefox Extensions with the Mozilla Build System. This is the foundation for everything we'll do. What's in a name Despite whatever you may have been taught in your English class, there's a lot in a name when it's an event name. As of Gecko 1.8, if your event names do not start with "nsDOM" and their interfaces do not start with "nsIDOM" then you can for...
...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 version of Firefox unless you get your patches into the trunk. At the time of writing the author is not aware of a way to do this that doesn't involve modifications to trunk. What follows a list of the files you'll need to modify, as well as a discussion of each change. mozilla/dom/base/nsDOMClassInfoClasses.h The change you make here is really rather small but it is incredibly important. If you peruse nsDOMClassInfoClasses.h you'll see of list of macros of the form DOMCI_CLASS(foo). You'll want to add an entry to it which looks like this: DOMCI_CLASS({truncated name}) Here's the fun part: Above I mentioned that you must name your events as nsDOM. However, here you wan...
...l see of list of macros of the form DOMCI_CLASS(foo). You'll want to add an entry to it which looks like this: DOMCI_CLASS({truncated name}) Here's the fun part: Above I mentioned that you must name your events as nsDOM. However, here you want to put the other part of the name (e.g. if you have an event named nsDOMMyFirstEvent your nsDOMClassInfoClasses entry would be DOMCI_CLASS(MyFirstEvent)). mozilla/dom/src/base/nsDOMClassInfo.cpp Mozilla contains many convenience macros to make changes like the one you're making easier. Your modification of this file is basically just two macro calls. Try to make sure of two things: Keep your stuff at the back. You know never know what depends on that enum you modified Keep your stuff organized. Same reason as above. You need to make the following two mod...
...And 3 more matches
Gecko Logging
log module across multiple translation units. LazyLogLodule provides a conversion operator to LogModule* and is suitable for passing into the logging macros detailed below. Note: Log module names can only contain specific characters. The first character must be a lowercase or uppercase ASCII char, underscore, dash, or dot. Subsequent characters may be any of those, or an ASCII digit. #include "mozilla/Logging.h" static mozilla::LazyLogModule sFooLog("foo"); Logging interface A basic interface is provided in the form of 2 macros and an enum class. Mozilla Logging Macros MOZ_LOG(module, level, message) Outputs the given message if the module has the given log level enabled. module - The log module to use. level - The log level of the message. message - ...
...dule to use. level - The log level of the message. message - A printf-style message to output. Must be enclosed in parentheses. MOZ_LOG_TEST(module, level) Checks if the module has the given level enabled. module - The log module to use. level - The output level of the message. Log Level Numeric Value Purpose Mozilla Logging Levels Disabled 0 Indicates logging is disabled. This should not be used directly in code. Error 1 An error occurred, generally something you would consider asserting in a debug build. Warning 2 A warning often indicates an unexpected state. Info 3 An informational message, often indicates the current program state. Debug...
...ates an unexpected state. Info 3 An informational message, often indicates the current program state. Debug 4 A debug message, useful for debugging but too verbose to be turned on normally. Verbose 5 A message that will be printed a lot, useful for debugging program flow and will probably impact performance. ...
...And 3 more matches
Index
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. ...
...t became a requirement for building Gecko in February 2017 with Firefox 54. 8 Experimental features in Firefox Experimental, Firefox, Preferences, features This page lists features that are in Nightly versions of Firefox along with information on how to activate them, if necessary. 10 Firefox UI considerations for web developers Activity Stream, Firefox, Icons, Mozilla, New Tab, NewTab, UI, Web, Web Development, favicon There are a number of places within the Firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way. One example is the new tab page, which includes a "Top Sites" section showing sites you visit that Firefox thinks you're likely to want to visit again, as well as potential...
...es are listed for the user to choose a destination to visit or a site to manage in some way. One example is the new tab page, which includes a "Top Sites" section showing sites you visit that Firefox thinks you're likely to want to visit again, as well as potentially some sites that have been pinned to always appear in that space. ...
...And 3 more matches
Embedding the editor
scenarios that editor needs to deal with. Note here that I use the term 'Composer' to mean an HTML-savvy compose widget that does rich text editing, and 'Editor' to mean a plain text editor (as well as the underlying technology for Composer). <htmlarea> is intended as a shorthand for a rich-text multiline text widget embedded in an HTML document, and is not meant to infer that future versions of Mozilla will support this specific tag. Composer embedded in a XUL application Developers need to embed composer widgets in their XUL applications, by using the <editor> tag as we do today. They should need to do as little work as possible to get basic editing functionality, be able to have any number of <editor>s per window, and control whether those <editor>s are in HTML or plain text mode. Composer em...
...that the composer code is agnostic to where its UI is coming from; communication between the core editor and the UI needs to go through one or more interfaces that insulate the editor from its host application. (The current nsEditorShell makes assumptions about the hosting XUL document, which need to be broken.) Composer embedded in a web page (<htmlarea>) IE 5 supports the <HTMLArea> element; if Mozilla is to support something similar, editor needs to be embeddable to the extent that this can be done. It is likely that we'd use XBL to implement this type of widget, as is the plan for other form controls. As is the case for composer embedded in a native application, there is a requirement here that the composer UI be configurable, such that it can be displayed either as a toolbar at the top of th...
...nt this type of widget, as is the plan for other form controls. As is the case for composer embedded in a native application, there is a requirement here that the composer UI be configurable, such that it can be displayed either as a toolbar at the top of the <htmlarea>, a floating palette, or a top-level toolbar. Current problems The current composer architecture was created while other parts of Mozilla were still under development, and as a result it suffers from a number of shortcomings, and anachronisms. This section describes its major faults. Editor incorrectly rooted The editor in a composer window is current owned by the nsEditorShell, which in turn is created, owned and destroyed by the nsEditorBoxObject. The box object is a layout structure that is owned by content nodes, and survives f...
...And 3 more matches
Gecko
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 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. Embedding Mozilla Using Gecko in your own application. Character sets supported by Gecko A list of the character sets supported by Gecko. HTML parser threading Description of multithreading in the HTML parser. Gecko Home Page o...
...pplications; for web-standard DOM events, see the DOM event reference. Introduction to Layout in Mozilla Tech Talk on layout. Embedding Mozilla Using Gecko in your own application. Character sets supported by Gecko A list of the character sets supported by Gecko. HTML parser threading Description of multithreading in the HTML parser. Gecko Home Page on MozillaWiki Home for the active developers. Roadmaps and more up-to-date resources. View All... ...
...And 3 more matches
How to implement a custom autocomplete search component
the default directory otherwise only paths beginning with / or ~/ will be autocompleted. Building your custom autocomplete search components Sometimes, you may want to build your own autocomplete source. To do so you need the following: Create an XPCOM component that implements the nsIAutoCompleteSearch interface. Make sure the contract ID of your XPCOM component follows the following form: "@mozilla.org/autocomplete/search;1?name=xxx", where "xxx" is the name of your autocomplete source. Implement the list of matched strings using the nsIAutoCompleteResult interface. The simplest way to make an XPCOM component is to build an XPCOM JavaScript Component (this cannot be done with a JavaScript module). How to Build an XPCOM Component in Javascript will step you through the process. Because cre...
...opriate in your case): Warning: The UUID used below in chrome.manifest and assigned to CLASS_ID must be changed before use. ...
...ils.generateQI([ Ci.nsIAutoCompleteSearch ]) }; // The following line is what XPCOM uses to create components const NSGetFactory = XPCOMUtils.generateNSGetFactory([ ProviderAutoCompleteSearch ]); Then register your XPCOM component. ...
...And 3 more matches
Memory reporting
This is most obviously used in about:memory and telemetry. This document describes things that you should know when writing a memory reporter. Memory Reporters A memory reporter makes one or more memory measurements (a.k.a. reports). ...
...rly when writing memory reporters for third-party code that cannot be modified. A Simple Example Imagine a simple string class with the following data fields: class MyString { private: char *mBuffer; // heap-allocated size_t mLen; // ... methods ... } Here are what the measurement functions (yes, functions) should look like for this class. size_t MyString::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const { return aMallocSizeOf(mBuffer); } size_t MyString::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const { return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); } (Note that SizeOfExcludingThis and SizeOfIncludingThis aren't overrides of methods on a global base class that is common to all reporters. These names are just a convention th...
...eOf aMallocSizeOf) const { return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); } (Note that SizeOfExcludingThis and SizeOfIncludingThis aren't overrides of methods on a global base class that is common to all reporters. These names are just a convention that is commonly followed. That said, note that for some classes these methods may be virtual.) mfbt/MemoryReporting.h defines mozilla::MallocSizeOf as follows: typedef size_t (*MallocSizeOf)(const void* p); Functions with this signature measure the size of p by asking the heap allocator how big it is (via moz_malloc_usable_size). All this is probably not what you'd expect, but the above functions have the following crucial features. They let you measure the MyString object itself or not as necessary. This is important b...
...And 3 more matches
FIPS Mode - an explanation
What's a FIPS? The United States government defines many (several hundred) "Federal Information Processing Standard" (FIPS) documents. (FIPS sounds plural, but is singular; one FIPS document is a FIPS, not a FIP.) FIPS documents define rules, regulations, and standards for many aspects of handling of information by computers and by people. They apply to all US government employees and personnel, including soldiers in the armed forces. ...
... documents define rules, regulations, and standards for many aspects of handling of information by computers and by people. They apply to all US government employees and personnel, including soldiers in the armed forces. Generally speaking, any use of a computer by US government personnel must conform to all the relevant FIPS regulations. If you're a US government worker, and you want to use a Mozilla software product such as Firefox, or any product that uses NSS, you will want to use it in a way that is fully conformant with all the relevant FIPS regulations. Some other governments have also adopted many of the FIPS regulations, so their applicability is somewhat wider than just the US government's personnel. What is "FIPS Mode"? One of the FIPS regulations, FIPS 140, governs the use of en...
...s, FIPS 140, governs the use of encryption and cryptographic services. It requires that ALL cryptography done by US government personnel MUST be done in "devices" that have been independently tested, and certified by NIST, to meet the extensive requirements of that document. These devices may be hardware or software, but either way, they must function and behave as prescribed. So, in order for Mozilla Firefox and Thunderbird to be usable by people who are subject to the FIPS regulations, Mozilla's cryptographic software must be able to operate in a mode that is fully compliant with FIPS 140. To that end, Mozilla products can function in a "FIPS Mode", which is really "FIPS 140 Mode", when paired with a compliant copy of NSS. (Note, the current version of FIPS 140 is revision 2, a.k.a. FIPS 1...
...And 3 more matches
Getting Started With NSS
How to get involved with NSS Network Security Services (NSS) is a base library for cryptographic algorithms and secure network protocols used by Mozilla software. Would you like to get involved and help us to improve the core security of Mozilla Firefox and other applications that make use of NSS? We are looking forward to your contributions! We have a large list of tasks waiting for attention, and we are happy to assist you in identifying areas that match your interest or skills. You can find us on Mozilla IRC in channel #nss or you could ask your questions on the mozilla.dev.tech.crypto newsgroup. The NSS library and its supporting command line tools are written in the C programming language. Its build system and the automated tests are based on makefiles and bash scripts. Over tim...
...been produced that describe various aspects of NSS. You can start with: the current primary NSS documentation page from which we link to other documentation. a General Overview of the applications that use NSS and the features it provides. a high level Introduction to the Internals of NSS. learn about getting the NSS sources, building, and testing. Old documentation that is on the archived mozilla.org website. (Unfortunately the NSS project doesn't have a technical writer at this time, so our documentation is not as organized as we would like it to be. You could contribute by organizing it in a better way.) NSS Sample Code A good place to start learning how to write NSS applications are the command line tools that are maintained by the NSS developers. You can find them in subdirectory ...
....org website. (Unfortunately the NSS project doesn't have a technical writer at this time, so our documentation is not as organized as we would like it to be. You could contribute by organizing it in a better way.) NSS Sample Code A good place to start learning how to write NSS applications are the command line tools that are maintained by the NSS developers. You can find them in subdirectory mozilla/security/nss/cmd Or have a look at some basic NSS sample code. A new set of samples is currently under development and review, see Create new NSS samples. You are welcome to download the samples via: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH How to Contribute ... (this section is still under construction, but there are many contribution opportunities) St...
...And 3 more matches
JSS
Mozilla › Projects › NSS › JSS
The JSS project has been relocated! As of April 6, 2018, JSS has been migrated from Mercurial on Mozilla to Git on Github. JSS source should now be checked out from the Github: git clone git@github.com:dogtagpki/jss.git -- OR -- git clone https://github.com/dogtagpki/jss.git All future upstream enquiries to JSS should now use the Pagure Issue Tracker system: https://pagure.io/jss/issues Documentation regarding the JSS project should now be viewed at: http://www.dogtagpki.org/wiki/JSS NOTE: As much of the JSS documentation is sorely out-of-date, updated information will be a work in progress, and many portions of any legacy documentation will be re-written over the course of time. Stay tuned! Legacy JSS information can still be found at: SOURCE: https://hg.mozil...
...hould now be viewed at: http://www.dogtagpki.org/wiki/JSS NOTE: As much of the JSS documentation is sorely out-of-date, updated information will be a work in progress, and many portions of any legacy documentation will be re-written over the course of time. Stay tuned! Legacy JSS information can still be found at: SOURCE: https://hg.mozilla.org/projects/jss ISSUES: https://bugzilla.mozilla.org/buglist.cgi?product=JSS WIKI: /docs/Mozilla/Projects/NSS/JSS Network Security Services for Java (JSS) is a Java interface to NSS. JSS supports most of the security standards and encryption technologies supported by NSS. JSS also provides a pure Java interface for ASN.1 types and BER/DER encoding. JSS offers a implementation of Java SSL sockets that uses NSS's SSL/TLS implementatio...
...capabilities found in NSS's SSL/TLS library but not found in JSSE. NSS is the cryptographic module where all cryptographic operations are performed. JSS essentially provides a Java JNI bridge to NSS C shared libraries. When NSS is put in FIPS mode, JSS ensures FIPS compliance by ensuring that all cryptographic operations are performed by the NSS cryptographic module. ...
...And 3 more matches
NSS 3.14.2 release notes
Network Security Services (NSS) 3.14.2 is a patch release for NSS 3.14. The bug fixes in NSS 3.14.2 are described in the "Bugs Fixed" section below. NSS 3.14.2 should be used with NSPR 4.9.5 or newer. The release is available for download from https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_2_RTM/src/ For the primary NSS documentation pages please visit /docs/NSS New in NSS 3.14.2 NSS will now make use of the Intel AES-NI and AVX instruction sets for hardware-accelerated AES-GCM on 64-bit Linux systems. Note: the new assembly code requires GNU as version 2.19 or newer. On Red Hat Enterprise Linux 5.x systems, install the binutils220 package and add /usr/libexec/binutils220 to the beginning of your PATH environment variable. Initial manual pages for some NSS com...
...Changes in NSS 3.14.2 Bug 805604 - Support for AES-NI and AVX accelerated AES-GCM was contributed by Shay Gueron of Intel. If compiled on Linux systems in 64-bit mode, NSS will include runtime detection to check if the platform supports AES-NI and PCLMULQDQ. ...
...n to check if the platform supports AES-NI and PCLMULQDQ. If so, NSS uses the optimized code path, reducing the CPU cycles per byte to 1/20 of what was required before the patch (https://bugzilla.mozilla.org/show_bug.cgi?id=805604 and https://crypto.stanford.edu/RealWorldCrypto/slides/gueron.pdf). Support for other platforms, such as Windows, will follow in a future NSS release. (https://bugzilla.mozilla.org/show_bug.cgi?id=540986) SQLite has been updated to 3.7.15. Note: please apply the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=837799 if you build NSS with the system SQLite library and your system SQLite library is older than 3.7.15. Bug 816853 - When using libpkix for certificate validation, applications may now supply additional application-defined trust anchors to be used in ...
...And 3 more matches
NSS 3.40 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.40, which is a minor release. Distribution Information The HG tag is NSS_3_40_RTM. NSS 3.40 requires NSPR 4.20 or newer. ...
... Introduction The NSS team has released Network Security Services (NSS) 3.40, which is a minor release. Distribution Information The HG tag is NSS_3_40_RTM. NSS 3.40 requires NSPR 4.20 or newer. ...
... Introduction The NSS team has released Network Security Services (NSS) 3.40, which is a minor release. Distribution Information The HG tag is NSS_3_40_RTM. NSS 3.40 requires NSPR 4.20 or newer. ...
...And 3 more matches
NSS_3.12.3_release_notes.html
NSS 3.12.3 Release Notes 2009-04-01 Newsgroup: mozilla.dev.tech.crypto Contents Introduction Distribution Information New in NSS 3.12.3 Bugs Fixed Documentation Compatibility Feedback Introduction Network Security Services (NSS) 3.12.3 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.3 are described in the "Bugs Fixed" section below. NSS 3.12.3 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.3 release is NSS_3_12_3_RTM. NSS 3.12.3 requires NSPR 4.7.4. See the Documentation section for the build instructions. ...
...NSS 3.12. The bug fixes in NSS 3.12.3 are described in the "Bugs Fixed" section below. NSS 3.12.3 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.3 release is NSS_3_12_3_RTM. NSS 3.12.3 requires NSPR 4.7.4. See the Documentation section for the build instructions. NSS 3.12.3 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_3_RTM/src/. Binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_3_RTM/. Both debug and optimized builds are provided. Go to the subdirectory for your platform, DBG (debug) or OPT (optimized), to get the tar.gz or zip file. The tar.gz ...
...gz or zip file expands to an nss-3.12.3 directory containing three subdirectories: include - NSS header files lib - NSS shared libraries bin - NSS Tools and test programs You also need to download the NSPR 4.7.4 binary distributions to get the NSPR 4.7.4 header files and shared libraries, which NSS 3.12.3 requires. NSPR 4.7.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.4/. New in NSS 3.12.3 Changes in behavior: In the development of NSS 3.12.3, it became necessary to change some old library behaviors due to the discovery of certain vulnerabilities in the old behaviors, and to correct some errors that had limited NSS's ability to interoperate with cryptographic hardware and software from other sources. Most ...
...And 3 more matches
Installing Pork
These instructions are to install Pork on a Linux system. Prerequisites Flex >2.5.4 (flex-old on ubuntu) Bison GCC Pork uses GCC to generate .i/.ii files (preprocessed C/C++) for Elsa to parse. The recommended version of GCC is GCC 4.2. Elsa (the C++ parser in Pork) has a hard time with some of the new features used in later GCC C++ headers. Our recent work has gotten Mozilla to compile with GCC 4.2. GCC 4.3 should also work fairly well, but there may be 5 or so files that Elsa can't parse. To make Pork easy to use, you will want to install MCPP that integrates into GCC. You will probably want a separate GCC for this so you don't have to modify your standard system GCC. You can install GCC in the normal way in a special directory. Build and Install MCPP MCPP generates macro e...
...on instructions for Linux and compiled your own gcc, then you should not need to "sudo" make install. If you run simply "make install" and see file permission errors, mcpp is likely trying to override your main gcc installation. Make sure that (1) your "$PATH" is correct; (2) you passed the correct "CC=..." and "CXX=..." to "./configure". ...
...n simply "make install" and see file permission errors, mcpp is likely trying to override your main gcc installation. Make sure that (1) your "$PATH" is correct; (2) you passed the correct "CC=..." and "CXX=..." to "./configure". Install the Pork Stack Pork is a set of tools written at Mozilla for refactoring C++. Pork's aim is to simply doing C/C++ refactoring through Elsa. ...
...And 3 more matches
Manipulating bookmarks using Places
vice interface, provides methods for creating, deleting, and manipulating bookmarks and bookmark folders. This article offers examples for how to perform common bookmark management tasks using the bookmarks service. Initiating the bookmarks service As is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Components.interfaces.nsINavBookmarksService); Creating a bookmark folder Creating a new bookmark folder is done using the nsINavBookmarksService.createFolder() method. For example, to create a new folder in the Bookmarks menu: var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder var newFolderId = bmsvc.cr...
...w folder places it at the end of the list. You can easily change this code to insert the new folder into the bookmarks toolbar by changing bookmarksMenuFolder to another folder attribute. Creating a new bookmark To create a new bookmark, use the nsINavBookmarksService.insertBookmark() method. The URI for the bookmark needs to be specified using an nsIURI object. ...
...RI referring to the Google web site, then calls nsINavBookmarksService.insertBookmark() to create a new bookmark to Google, placing it at the end of the bookmarks folder referenced by newBkmkId. Finding bookmark items If you know the URI of a site and wish to find all bookmarks that link to it, you can use the nsINavBookmarksService.getBookmarkIdsForURI() method. var ios = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uri = ios.newURI("http://google.com/", null, null); var bookmarksArray = bmsvc.getBookmarkIdsForURI(uri, {}); After executing this code, the array bookmarksArray contains the IDs of all bookmarks that refer to the specified URI (in this case, "http://google.com"). Manipulating existing items Th...
...And 3 more matches
Preface
of the tools, techniques, and technologies that make up XPCOM. 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. For example, the introduction includes a discussion of components and what they are, and the first chapter - in which you compile the basic code and register it with Mozilla - prompts a discussion of the relationship 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...
... component implementation code is written in C++, and much of the discussion of how to make your codeinto an XPCOM component starts from C++. You don't need to be a C++ expert, however. Although basic ideas such as inheritance and encapsulation should be familar to you, wherever possible they are explained in the book as they are used. Also many of the examples are in JavaScript, which is used in Mozilla to access XPCOM components as scriptable objects, and so familiarity with that language is useful as well. XPCOM stands for the Cross Platform Component Object Model. As this name implies, XPCOM is similar to Microsoft COM. If you have any experience with this technology, much of it can be applied to XPCOM. However, this book does not assume any prior knowledge of COM - all of the basic COM idea...
...e custom WebLock component interface. Finish implementing the WebLock component: nsIContentPolicy, file I/O, locking, etc. Creating the user interface for the WebLock component. Packaging WebLock for distribution and installation. Following Along with the Examples There are a couple of different ways to get XPCOM onto your machine so you can begin to create components. ...
...And 3 more matches
xpcshell
xpcshell is an XPConnect-enabled JavaScript Shell. It is a console application that lets you run JavaScript code. Unlike the ordinary JS shell (js), xpcshell lets the scripts running in it access XPCOM functionality. Prerequisites You need your own build of Mozilla to use xpcshell. Running xpcshell ./run-mozilla.sh ./xpcshell xpcshell is almost always in the same directory as run-mozilla.sh. ...
...XPConnect-enabled JavaScript Shell. It is a console application that lets you run JavaScript code. Unlike the ordinary JS shell (js), xpcshell lets the scripts running in it access XPCOM functionality. Prerequisites You need your own build of Mozilla to use xpcshell. Running xpcshell ./run-mozilla.sh ./xpcshell xpcshell is almost always in the same directory as run-mozilla.sh. ...
...is a console application that lets you run JavaScript code. Unlike the ordinary JS shell (js), xpcshell lets the scripts running in it access XPCOM functionality. Prerequisites You need your own build of Mozilla to use xpcshell. Running xpcshell ./run-mozilla.sh ./xpcshell xpcshell is almost always in the same directory as run-mozilla.sh. ...
...And 3 more matches
nsACString_internal
ay of characters, which may or may not be null-terminated. This type is not instantiated directly. A sub-class is instantiated instead. For example, see nsTString. NAMES: nsAString for wide characters nsACString for narrow characters Many of the accessors on nsTSubstring are inlined as an optimization. ...
...or example, see nsTString. NAMES: nsAString for wide characters nsACString for narrow characters Many of the accessors on nsTSubstring are inlined as an optimization. ...
...s on nsTSubstring are inlined as an optimization. ...
...And 3 more matches
nsAString (External)
Class Declaration This header provides wrapper classes around the frozen string API which are roughly equivalent to the internal string classes. ...
... Class Declaration This header provides wrapper classes around the frozen string API which are roughly equivalent to the internal string classes. ...
...lasses. ...
...And 3 more matches
nsAString_internal
ay of characters, which may or may not be null-terminated. This type is not instantiated directly. A sub-class is instantiated instead. For example, see nsTString. NAMES: nsAString for wide characters nsACString for narrow characters Many of the accessors on nsTSubstring are inlined as an optimization. ...
... For example, see nsTString. NAMES: nsAString for wide characters nsACString for narrow characters Many of the accessors on nsTSubstring are inlined as an optimization. ...
...ssors on nsTSubstring are inlined as an optimization. ...
...And 3 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. ...
...criptable 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. ...
...main Time at which main application core was loaded. Note: Only available with libxul builds. firstPaint Time the first paint occurred. Note: Only available with libxul builds. sessionRestored Time session restore finished. Example This example logs startup time information to the console. ...
...And 3 more matches
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. ...
...tegoryManager.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. ...
...MPtr<nsISupportsCString> category = do_QueryInterface(elem, &rv); if (NS_FAILED(rv)) break; nsEmbedCString categoryName; rv = category->GetData(categoryName); if (NS_FAILED(rv)) break; printf("%s\n", categoryName.get()); } return NS_OK; } This snippet shows how to print out a list of all categories in Javascript. ...
...And 3 more matches
nsICryptoHash
void initWithString(in ACString aAlgorithm); void update([const, array, size_is(aLen)] in octet aData, in unsigned long aLen); void updateFromStream(in nsIInputStream aStream, in unsigned long aLen); Constants Hash algorithms These constants are used by the init() method to indicate which hashing function to use. The values map directly onto the values defined in mozilla/security/nss/lib/cryptohi/hasht.h. Constant Value Description MD2 1 Message Digest Algorithm 2 MD5 2 Message-Digest algorithm 5 SHA1 3 Secure Hash Algorithm 1 SHA256 4 Secure Hash Algorithm 256 SHA384 5 Secure Hash Algorithm 384 SHA512 6 Secure Hash Algorithm 512 Methods finish() Com...
...mple Computing the Hash of a File You can easily compute the hash of a file using nsICryptoHash. You will need to create an instance of nsICryptoHash, open an input stream from a file, and then update the hash with the file. ...
...en an input stream from a file, and then update the hash with the file. ...
...And 3 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. ...
...lScriptable 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. ...
...bout: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. ...
...And 3 more matches
nsIWindowMediator
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. ...
...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. ...
...t 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. ...
...And 3 more matches
Setting HTTP request headers
ame code we used before, earlier in this article, to add the HTTP request header. The name of this object -- httpRequestObserver -- isn't important. We could have named it anything we liked. Registering After we've created the observer, we need to register it. In our case, we want to register it for the "http-on-modify-request" topic. We can do this with the code below. var observerService = Cc["@mozilla.org/observer-service;1"] .getService(Ci.nsIObserverService); observerService.addObserver(httpRequestObserver, "http-on-modify-request", false); The first statement gets the object that will let us register with topics that we want to get notified about. The second statement does the actual registering. We are saying we want httpRequestObserver to be notified (by c...
...ng, in an actual real-world application, you'd probably want to code it more like the following. ...
...tpRequestObserver.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. ...
...And 3 more matches
XPCOM
pplication or even by an extension. Accessing the Windows Registry Using XPCOMWhen implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist XPCOM interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products.Aggregating the In-Memory Datasourcealready_AddRefedalready_AddRefed in association with nsCOMPtr allows you to assign in a pointer without AddRefing it.Binary compatibilityIf Mozilla decides to upgrade to a compiler that does not have the same ABI as the current version, any built component may fail. It is a possiblity that is introduced when upgrading to a new compiler without recompil...
...ill 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. ...
...xtension 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 entities, including XPCOM Interfaces (this type of GUIDs is callled IID), components (CID), and legacy add-ons--like extensions and themes--that were created prior to Firefox 1.5. Add-ons can (and should) be identified with IDs of the form extensionname@organization.tld since Firefox 1.5.Generic factoryMost XPCOM factories can be very simple. Rick Pott...
...And 3 more matches
Index - Firefox Developer Tools
You can use them to examine, edit, and debug HTML, CSS, and JavaScript. 2 3D view HTML, Tools, Web Development, Web Development:Tools When you click on the 3D view button, the page goes into 3D view mode; in this mode, you can see your page presented in a 3D view in which nested blocks of HTML are increasingly "tall," projecting outward from the bottom of the page. ...
...ts to DOM Inspector. The one you are likely to be most familiar with is its inspector.xul-based primary UI. This is the two-pane inspector that appears when Ctrl+Shift+I (or Cmd+Shift+I) is pressed from one of the applications for which DOM Inspector has explicit support (i.e., menuitems placed via overlay). 9 Introduction to DOM Inspector DOM_Inspector The DOM Inspector is a Mozilla extension that you can access from the Tools > Web Development menu in SeaMonkey, or by selecting the DOM Inspector menu item from the Tools menu in Firefox and Thunderbird, or by using Ctrl/Cmd+Shift+I in either application. DOM Inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own XULRunner app. DOM Inspector can serve as a sanity check to veri...
...s the whole browser rather than just single page on a single tab. 16 DOM Property Viewer DOM, Tools, Web Development The DOM Property Viewer lets you inspect the properties of the DOM as an expandable tree structure, starting from the window object of the current page or the selected iframe. 17 Debugger-API Debugger, Intermediate, Intro, JavaScript, Tools Mozilla's JavaScript engine, SpiderMonkey, provides a debugging interface named Debugger which lets JavaScript code observe and manipulate the execution of other JavaScript code. Both Firefox's built-in developer tools and the Firebug add-on use Debugger to implement their JavaScript debuggers. However, Debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage an...
...And 3 more matches
Working with the History API - Web APIs
methods work in conjunction with the onpopstate event. Adding and modifying history entries Using pushState() changes the referrer that gets used in the HTTP header for XMLHttpRequest objects created after you change the state. The referrer will be the URL of the document whose window is this at the time of creation of the XMLHttpRequest object. Example of pushState() method Suppose http://mozilla.org/foo.html executes the following JavaScript: let stateObj = { foo: "bar", } history.pushState(stateObj, "page 2", "bar.html") This will cause the URL bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists. Suppose now that the user navigates to http://google.com, then clicks the Back button. At this point, the URL ba...
... the following JavaScript: let stateObj = { foo: "bar", } history.pushState(stateObj, "page 2", "bar.html") This will cause the URL bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists. Suppose now that the user navigates to http://google.com, then clicks the Back button. At this point, the URL bar will display http://mozilla.org/bar.html and history.state will contain the stateObj. The popstate event won't be fired because the page has been reloaded. The page itself will look like bar.html. If the user clicks Back once again, the URL will change to http://mozilla.org/foo.html, and the document will get a popstate event, this time with a null state object. Here too, going back doesn't change the document's contents f...
...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. ...
...And 3 more matches
Window.navigator - Web APIs
Web › API › Window › navigator
a reference to the Navigator object, which has methods and properties about 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. ...
...gator object, which has methods and properties about 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. ...
...t and return a string var sBrowser, sUsrAg = navigator.userAgent; // The order matters here, and this may report false positives for unlisted browsers. ...
...And 3 more matches
Border-radius generator - CSS: Cascading Style Sheets
put-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2C9FC9; border-radius: 5px; color: #FFF; f...
...t-family: "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5em; color: #FFF; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #FFF; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover...
...peat; color: #FFF; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: pointer; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/files/5681/checked.png"); background-color: #379B4A; } body { max-width: 1000px; margin: 0 auto; font-family: "Segoe UI", Arial, Helvetica, sans-serif; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } #container { width: 100%; -moz-box-sizi...
...And 3 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
Web › HTTP › CORS
HTTP/1.1 200 OK Date: Mon, 01 ...
...pplication/xml, and since a custom header is set, this 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. ...
...erver: Apache/2 Access-Control-Allow-Origin: https://foo.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.examp...
...And 3 more matches
Getting Started (jpm) - Archive of obsolete content
enting the add-on Now you can write the add-on's code. Unless you've changed the value of "entry point" ("main" in package.json), this goes in "index.js" file in the root of your add-on. This file was created for you in the previous step. Open it and add the following code: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("http://www.mozilla.org/"); } Note that "entry point" defaults to "index.js" in jpm, meaning that your main file is "index.js", and it is found directly in your add-on's root. In cfx, the entry poi...
... instance of Firefox with your add-on installed. If Firefox can not be located, or you have installed Firefox Developer as an alternate browser, you may need to provide the path to it. For example, in Ubuntu: jpm run -b /usr/bin/firefox When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with http://www.mozilla.org/ loaded into it. That's all this add-on does. It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab. Try editing this file. For ...
...ch enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab. Try editing this file. For example, we could change the page that gets loaded: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://developer.mozilla.org/"); } At the command prompt, execute jpm run again. This time clicking it takes you to https://developer.mozilla.org/. Packaging the add-on When you've finished the ad...
...And 2 more matches
Dialogs and Prompts - Archive of obsolete content
This will: Handle a few keyboard events (ENTER/ESC and more), which is good for keyboard accessibility. ...
...ancel buttons in an order that is consistent with OS default (but the button set and layout is highly customizable, see below). Simple dialog code The following XUL code defines a simple dialog with two buttons, OK and Cancel (buttons="accept,cancel" attribute on dialog). <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onAccept();" ondialogcancel="return onCancel();"> <script src="chrome://..."/> <!-- Content --> </dialog> You need to implement onAccept and onCancel functions in your script. If they return anything but false, the dialog will be closed. Buttons in <dialog> Predefined There a...
...ined labels or meaning. extra2 is positioned at the left side of the dialog (by default). For each of these buttons you can set their label, accesskey and oncommand handler by adding buttonlabel<buttonname>, buttonaccesskey<buttonname> and ondialog<buttonname> attributes to the dialog element. ...
...And 2 more matches
Downloading Files - Archive of obsolete content
se use Downloads.jsm instead. Downloading files To download a file, create an instance of nsIWebBrowserPersist and call its nsIWebBrowserPersist.saveURI() method, passing it a URL to download and an nsIFile instance representing the local file name/path. Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); const WebBrowserPersist = Components.Constructor("@mozilla.org/embedding/browser/nsWebBrowserPersist;1", "nsIWebBrowserPersist"); var persist = WebBrowserPersist(); var targetFile = Services.dirsvc.get("Desk", Ci.nsIFile); targetFile.append("file.bin"); // Obtain the privacy context of the browser window that the URL // we are downloading comes from. If, and only if, the URL is not // related to a windo...
...persist.saveURI(uriToSave, null, null, null, "", targetFile, privacy); If you don't need detailed progress information, you might be happier with nsIDownloader. ...
...to be displayed so the user can enter credentials, but you can return a username and password credentials directly without prompting the user. If you want to open a login prompt, you can use the default prompt by calling the window watcher's getNewAuthPrompter() method. Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); const WebBrowserPersist = Components.Constructor("@mozilla.org/embedding/browser/nsWebBrowserPersist;1", "nsIWebBrowserPersist"); var persist = WebBrowserPersist(); // Obtain the privacy context of the browser window that the URL // we are downloading comes from. If, and only if, the URL is not // related to a window, null should be used instead. var privacy = PrivateBrowsingUtils.privacyContextFromWindo...
...And 2 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
it will be wrapped in another proprietary program. The deleted advertising clause The original BSD license contained an advertising clause, which stated that "any advertising for software using an modification of this source code must display the name of the original developer." This clause has been removed. The Modified BSD license is the version that does not include the advertising clause. Mozilla Public License (MPL) This is an OSS license created by Netscape and the Mozilla Organization. Netscape created it for its open-source web browser. The Common Public License (CPL) and Eclipse Public License (EPL) are similar in substance. Because the CPL is written in such a way that it does not mention any software or company by name, you can use the CPL if you plan to use this kind of licensin...
... whatever you want with them. There are companies that have built businesses on open source by taking advantage of this fact. Red Hat Enterprise Linux (RHEL) cannot be copied or distributed with the Redhat trademark in place. A number of RHEL clones have appeared, such as CentOS, where the trademarked parts have been scrubbed away by a community effort. The Firefox web browser, developed by the Mozilla Foundation, does not permit modifications of its name or trademarked icon. For this reason, the Debian project, which distributes free software as a volunteer effort, has a browser based on Firefox, but with a different name and logo. Document licenses As open-source software grows in popularity, people have begun thinking about applying its principles to content other than software, to allow a...
... case, the choice of license is up to the copyright holder--the developer. It's important to thoroughly understand the license you choose and make a choice that strikes a good balance in terms of utility to the creator and the user. ...
...And 2 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
an, the JavaScript debugger Venkman is a full-fledged JavaScript debugger that runs inside Firefox. It works like typical debuggers, and is useful not only for developing extensions, but also for general web development. Also, because it works with the JavaScript in extensions and Firefox itself, the debugger can be a good way to learn about design methods. Installing This is bundled with the Mozilla Suite and the current version of SeaMonkey, but it needs to be installed as an extension in Firefox. See https://addons.mozilla.org/firefox/216/. Install the extension in Firefox directly from the above URL and relaunch Firefox. Starting up Select "JavaScript Debugger" from the Tools menu. Targeting JavaScript for debugging. When Venkman first launches, it can only debug the file currently o...
...to lift this restriction in order to develop extensions. Uncheck the "Exclude Browser Files" menu item under the Debug menu (Figure 1). FIXME: Figure 1: Uncheck "Exclude Browser Files." Set up QuickNote For the purposes of this explanation, we're going to use the file-storage mechanism in QuickNote1 for our debugger. Install QuickNote from the following URL and relaunch Firefox. https://addons.mozilla.org/firefox/46/. After relaunching Firefox, activate QuickNote. Then select Tools:QuickNote:Float to display it in its own window. Using Venkman Read in source code Activate Venkman, and then select Open Windows:quicknote.xul:Files on the top-left of the screen. Double-click on quicknote.js to open it in source-code view (Figure 2). FIXME: Figure 2: Selecting source code Inserting breakpoin...
... mistake in implementation of subtraction) _letfunc: function(func) { // correct pop order b = this.pop(); a = this.pop(); this.push(func(a, b)); }, Understanding source code In the open-source community, you can learn a lot about how software works by studying its source code; with a massive project like Firefox, people typically use special source-code browsing tools to make sense of it. Mozilla Cross-Reference Mozilla Cross-Reference is a full-text searchable source-code listing hosted at mozilla.org. We're going to use MXR (http://mxr.mozilla.org), a Linux source-code browser. Getting started Visit this URL: http://mxr.mozilla.org . In the left-hand sidebar, you should see a link to a search starting point and a search form (Figure 5). FIXME: Figure 5: mxr.mozilla.org Usage What ...
...And 2 more matches
Adding windows and dialogs - Archive of obsolete content
to inspect the value of a variable, but your final extension should not have alert calls anywhere. If you use window.alert, the alert window will have the title [JavaScript Application], indicating that the source of the message is not well defined. The Prompt Service allows better alerts to be displayed. Here's an example of displaying an alert using the Prompt Service: let prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); prompts.alert(window, "Alert Title", "Hello!"); You should of course use localized strings instead of hard-coded ones. The Prompt Service allows you to set the title of the dialog however you want it, and also lets you specify the window you want to use as a parent for the alert. This normally should be set to the current...
...e alert. This normally should be set to the current window. You can pass a null value and the service will pick the currently active window. Confirm Confirmation dialogs display a text with a Yes / No question, and prompts the user to choose an answer. In HTML you can use the window.confirm function for this. The Prompt Service has a confirm method with similar behavior: let prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); if (prompts.confirm(window, "Confirm Title", "Would you like to continue?")) { // do something. } else { // do something else } The method returns a boolean value indicating the user's response. Others Unprivileged Javascript can also use the window.prompt function to receive text input from the user. The Prompt Serv...
...that allow different kinds of inputs, such as text, passwords, usernames and passwords, and checkboxes that can be used for "Never ask this again"-type dialogs. The confirmEx and prompt methods are the most customizable, allowing a great deal of options that cover most common dialog cases. Using the Prompt Service will save you a lot of XUL coding, and you'll be at ease knowing that you're using Mozilla's tried and tested code. The Dialog Element When the Prompt Service is not enough, you'll have to create you own XUL dialogs. Luckily, you still get a great deal of help from the platform if you use the dialog element as the document root instead of the more generic window element. You may be asking yourself what's the big deal about defining a simple XUL window with an OK and maybe a Cancel b...
...And 2 more matches
Session store API - Archive of obsolete content
ox is about to restore a tab, an event of type SSTabRestoring is sent. If your extension wants to be able to restore data when tabs are restored, you can install a listener like this: function myExtensionHandleRestore(aEvent) { var tab = event.originalTarget; /* the tab being restored */ var uri = tab.linkedBrowser.contentDocument.location; /* the tab's URI */ Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService) .logStringMessage("restoring tab: " + uri); }; document.addEventListener("SSTabRestoring", myExtensionHandleRestore, false); Simply replace the contents of the function myExtensionHandleRestore() with whatever you need to do when the tab is restored. In this example, nsIConsoleService is used to ...
...ast tab has been restored unless you determine how many tabs need to be restored then count the SSTabRestored events. This section provides a few simple examples of how to make use of the session store API. Saving a value with a tab The following code will attach a key/value pair to a tab, so that when the tab is restored, that pair is still associated with it. var ss = Components.classes["@mozilla.org/browser/sessionstore;1"] .getService(Components.interfaces.nsISessionStore); var currentTab = gBrowser.selectedTab; var dataToAttach = "I want to attach this"; ss.setTabValue(currentTab, "key-name-here", dataToAttach); This code sets the value of the key "key-name-here" to dataToAttach. You may use any JavaScript object as the data. Fetching a saved value You can fetch ...
...ttach this"; ss.setTabValue(currentTab, "key-name-here", dataToAttach); This code sets the value of the key "key-name-here" to dataToAttach. You may use any JavaScript object as the data. Fetching a saved value You can fetch a value associated with a tab at any time (whether the tab is in the process of being restored or not), using code similar to the following: var ss = Components.classes["@mozilla.org/browser/sessionstore;1"] .getService(Components.interfaces.nsISessionStore); var currentTab = gBrowser.selectedTab; var retrievedData = ss.getTabValue(currentTab, "key-name-here"); After this code executes, the variable retrievedData contains the value saved for the key "key-name-here". retrievedData is undefined if there is no value saved for that key name. Deleting a v...
...And 2 more matches
XUL user interfaces - Archive of obsolete content
In XUL, many common user interface features are built in. For example, XUL provides specialized windows like dialogs and wizards, as well as status bars, menus, tool bars, and even browsers. ...
...In XUL, many common user interface features are built in. For example, XUL provides specialized windows like dialogs and wizards, as well as status bars, menus, tool bars, and even browsers. ...
... More details For more information about XUL user interfaces, see the XUL page in this wiki. Action: A XUL demonstration Make a new XUL document as a plain text file, doc7.xul. ...
...And 2 more matches
Creating a status bar extension - Archive of obsolete content
e You can download a copy of this sample to look over -- or to use as the basis for your own extension. Download the sample The install manifest The install manifest, install.rdf, is a text file containing information that tells the host application important information about the extension. ...
...- or to use as the basis for your own extension. Download the sample The install manifest The install manifest, install.rdf, is a text file containing information that tells the host application important information about the extension. ...
...illa.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>status-bar-sample-1@example.com</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <!-- Front End Metadata --> <em:name>Status Bar Sample 1</em:name> <em:description>Sample static status bar panel</em:description> <em:creator>My Name</em:creator> <em:homepageURL>http://developer.mozilla.org/en/docs/Creating_a_status_bar_extension</em:homepageURL> <!-- Describe the Firefox versions we support --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>2.0.0.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> Let's take a look a...
...And 2 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
XUL tutorials for more information. Example 3. chrome/content/emptysidebar.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?> <?xml-stylesheet href="chrome://browser/skin/browser.css" type="text/css" ?> <!DOCTYPE page SYSTEM "chrome://emptysidebar/locale/emptysidebar.dtd"> <page id="sbEmptySidebar" title="&emptysidebar.title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > <vbox flex="1"> <label id="atest" value="&emptysidebar.title;" /> </vbox> </page> New extensions can be registered in the menus or popups, Firefox uses overlays for extending menus. This is an separate XUL file that specifies the location of menu items. The sidebar here is added to the View | Sidebar menu. The overlay file is listed in Exam...
...rlays for extending menus. This is an separate XUL file that specifies the location of menu items. The sidebar here is added to the View | Sidebar menu. The overlay file is listed in Example 4. Example 4. ...
...that control how it is installed and where its chrome resources are stored. The first is install.rdf, the install manifest. See Install Manifests for a complete listing of the required and optional properties. The install manifest is listed in Example 5. Example 5. ...
...And 2 more matches
New Security Model for Web Services - Archive of obsolete content
oaded from outside of the firewall. Using a SOAP Header for Verification SOAP messages have a distinct processing model allowing a header to be added that the recipient is required to understand and accept, which identifies the untrusted source of a script making a request. SOAP services which have not been cleared for access by untrusted scripts will reject the requests. This is offered in the Mozilla implementation of SOAP today. Unfortunately, this does not prevent SOAP messages from being sent to non-SOAP addresses, which is a big enough problem that the verification cannot stand alone to guarantee that untrusted service requests are always properly rejected by services that should be firewall-protected. It may also be inconvenient to modify a SOAP service to ignore the specific verificat...
...for most providers of public resources to create. Web Scripts Access Statements The syntax of statements of the access file are as follows. <!ELEMENT webScriptAccess (delegate?|allow*)> <!ELEMENT delegate EMPTY> <!ELEMENT allow EMPTY> <!ATTLIST allow type|from CDATA #IMPLIED>. The Root Element The first element of the file should be the following: <wsa:webScriptAccess xmlns:wsa="http://www.mozilla.org/2002/soap/security"> Delegation If the <delegate/> element is present then "web-scripts-access.xml" is required in the subdirectory for URIs which are in a subdirectory. For example, if the script in question is "http://www.example.com/foo/bar.xml", then the declarations file http://www.example.com/web-scripts-access.xml which contains the "delegate" keyword delegates to http://www.example...
...such as "soap", "soapv", or "load". Types must not contain spaces. Specify "any" as the type to permit any requested type of access to resources. The principle URI of the script will be checked for the specified URI prefix. If "from" is not specified, then all scripts will be allowed. Note: One can also use wild charater(s) in "from" value. ...
...And 2 more matches
Standalone XPCOM - Archive of obsolete content
Warning: The content of this article may be out of date. These instructions were last updated in 2000. Standalone XPCOM is a tree configuration that builds a minimal set of libraries (shared mostly) that can be used to get all features of XPCOM. The contents of this standalone XPCOM in general are: NSPR : mozilla/nsprpub XPCOM : mozilla/xpcom NOTE 1: XPCOM APIs are not frozen yet. By XPCOM 1.0 release they will be. ...
...pdated in 2000. Standalone XPCOM is a tree configuration that builds a minimal set of libraries (shared mostly) that can be used to get all features of XPCOM. The contents of this standalone XPCOM in general are: NSPR : mozilla/nsprpub XPCOM : mozilla/xpcom NOTE 1: XPCOM APIs are not frozen yet. By XPCOM 1.0 release they will be. NOTE 2: XPCOM Standalone differs from the XPCOM built with Mozilla. Hence cannot be used with the Mozilla browser. Building Standalone XPCOM Here are the instructions for building the Standalone XPCOM on Unix or Windows: Step 1 : Pull the sources cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all BUILD_MODULES=xpcom Step 2 : Build XPCOM Standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake ...
...get built by default. nsTestSample is the sample application. This should have been installed in your bin/ directory. libsample.so (unix) is the sample component implementation that the sample application will try to instantiate. This should have been installed in your bin/components directory To run the test, cd to your bin/ directory setenv LD_LIBRARY_PATH . ./nsTestSample Warning: MOZILLA_FIVE_HOME not set. nsNativeComponentLoader: autoregistering begins. nsNativeComponentLoader: autoregistering succeeded Inital print: initial value Set value to: XPCOM defies gravity Final print : XPCOM defies gravity Test passed. Test FAILED: What went wrong? The most common case of why the sample would have failed if you didn't run it from the bin directory. Here are some error me...
...And 2 more matches
XTech 2005 Presentations - Archive of obsolete content
Web 1.6: A Rope of Sand - Opening Keynote, Mike Shaver Mozilla E4X - Brendan Eich "ECMAScript for XML" (ECMA-357), a new standard for writing and processing XML directly in JavaScript (ECMA-262, ISO-16262). E4X marries XML and JavaScript syntax, and extends JavaScript to include namespaces, qualified names, and XML elements and lists. E4X also adds new JavaScript operators for filtering XML lists, and for enumerating XML children and descendants. Another E4X feature: the ability to bind a W3C DOM document to a new XML object, reflecting the DOM in E4X terms so that updates to either the DOM or the E4X object hierarchy show up in the other. ...
...o include namespaces, qualified names, and XML elements and lists. E4X also adds new JavaScript operators for filtering XML lists, and for enumerating XML children and descendants. Another E4X feature: the ability to bind a W3C DOM document to a new XML object, reflecting the DOM in E4X terms so that updates to either the DOM or the E4X object hierarchy show up in the other. ...
...enumerating XML children and descendants. Another E4X feature: the ability to bind a W3C DOM document to a new XML object, reflecting the DOM in E4X terms so that updates to either the DOM or the E4X object hierarchy show up in the other. Directions of the Mozilla RDF engine: website scripting, standards conformance and perfomance - Axel Hecht This presentation showed new developments in the Mozilla RDF engine. These include plans to expose the RDF API to public web content, as well as performance and correctness improvements. Rich Web: SVG And Canvas In Mozilla - Robert O'Callahan Today's Web browsers offer somewhat limited graphics capabilities to Web developers. Advances in hardware, especially graphics processors, offer the potential for far richer graphics in interactive applicatio...
...And 2 more matches
Namespaces - Archive of obsolete content
s, or Python module importing, you are already familiar with the namespace concept. An XML namespace is identified by an unique name (called a URI, not a URL, even though it can look like a URL). An URI is any string, although most people choose a URL-based URI because URLs are an easy way to hope for uniqueness. Although there's nothing preventing someone else from using the namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul, it's fairly unlikely anyone would choose that accidentally. Even if they did accidentally choose it, they may not define the same elements as XUL anyway (e.g., <textbox/>) in their schema/DTD. Any element type or attribute name in an XML namespace can be uniquely identified by its XML namespace and its "local name". Together, these two items define a qu...
...ther, these two items define a qualified name, or QName. For example, <xul:textbox/> uses a namespace named "xul" and a local name "textbox". This distinguishes it from, for example, <foobar:textbox/> which might occur in the same document. The xul and foobar namespaces must be defined at the top of the XML document in which they are used, like so: <foobar:some-element xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:foobar="the-foobar-namespace"> <xul:textbox id="foo" value="bar"/> <foobar:textbox favorite-food="pancakes"/> </foobar:some-element> Notice I've mixed two <textboxes/> in the same document. The only way to distinguish that they have different meanings is with namespaces. There's only one other thing to know: "default namespace". Every...
...bar:some-element> Notice I've mixed two <textboxes/> in the same document. The only way to distinguish that they have different meanings is with namespaces. There's only one other thing to know: "default namespace". Every XML element has a "default namespace", and this is used with XUL elements all the time. In XUL documents, you'll usually see this: <window id="foo" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> ... ... </window> and in XHTML documents, you'll see this: <html xmlns="http://www.w3.org/1999/xhtml"> ... ... </html> There is a very subtle difference here than before. Before I wrote xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" but here the :xul piece is omitted. This signifies to the XML parser that htt...
...And 2 more matches
Code Samples - Archive of obsolete content
pecify the file that you want to launch. You can launch an executable file or some other file that your operating system knows how to open. Note: On operating systems that use backslash characters, double each backslash character. On operating systems that use forward-slash characters, specify the file in the normal way. ...
...the normal way. const path = "C:\\WINDOWS\\CHARMAP.EXE" var file = Components .classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile) file.initWithPath(path) file.launch() Open a web page If your button is in Firefox or SeaMonkey, use code like this to open a web page. Change the first line to specify the page that you want to open: const url = "http://www.mozilla.org/" document .getElementById("content") .webNavigation .loadURI(url, 0, null, null, null) If your button is in Thunderbird or Sunbird, use code like this to open a web page. ...
...like this to open a web page. Change the first line to specify the page that you want to open: const url = "http://www.mozilla.org/" document .getElementById("content") .webNavigation .loadURI(url, 0, null, null, null) If your button is in Thunderbird or Sunbird, use code like this to open a web page. Change the first line to specify the page that you want to open: const url = "http://www.mozilla.org/" var uri = Components .classes["@mozilla.org/network/simple-uri;1"] .getService(Components.interfaces.nsIURI) uri.spec = url Components .classes["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Components.interfaces.nsIExternalProtocolService) .loadUrl(uri) Compose an e-mail To compose an e-mail, use the same code as in the section Open a web page above. C...
...And 2 more matches
Toolbars - Archive of obsolete content
XUL School: Adding Toolbars and Toolbar Buttons A helpful tutorial to creating toolbars and toolbar buttons. Toolbar customization events A look at the events that are sent during toolbar customization; you can use these to be kept aware of changes to toolbars. Creating toolbar buttons How to use overlays to add toolbar buttons to Mozilla applications. Custom toolbar button Another example of how to create a toolbar button, complete with a sample extension you can download and try. Code snippets: Toolbar Code snippets that are helpful when working with toolbars. Community View Mozilla extension development forums... Mailing list...
...ample of how to create a toolbar button, complete with a sample extension you can download and try. Code snippets: Toolbar Code snippets that are helpful when working with toolbars. Community View Mozilla extension development forums... ...
...e extension you can download and try. Code snippets: Toolbar Code snippets that are helpful when working with toolbars. Community View Mozilla extension development forums... Mailing list Newsgroup RSS feed #extdev IRC channel MozillaZine forum about:addons newsletter Mozilla's Web-Tech blog mozdev project owners Planet Mozilla Other community links... ...
...And 2 more matches
Advanced Rules - Archive of obsolete content
r each of the four. Of course, the example above doesn't have any content. We'll add that later. triple element The next element is the triple element. It is used to check for the existence of a given triple (or assertion) in the RDF datasource. A triple is like a property of a resource. For example, a triple exists between a bookmark and its URL. ...
... the example above doesn't have any content. We'll add that later. triple element The next element is the triple element. It is used to check for the existence of a given triple (or assertion) in the RDF datasource. A triple is like a property of a resource. For example, a triple exists between a bookmark and its URL. ...
...he next element is the triple element. It is used to check for the existence of a given triple (or assertion) in the RDF datasource. A triple is like a property of a resource. For example, a triple exists between a bookmark and its URL. This might be expressed as follows: A Bookmark to mozilla.org -> URL -> www.mozilla.org This means that there is a triple between the bookmark 'A Bookmark to mozilla.org' and 'www.mozilla.org' by the URL property. ...
...And 2 more matches
Content Panels - Archive of obsolete content
ocument within the window. It has the advantage that it can be placed anywhere and the contents can be loaded from a different file. Set the URL to appear in the frame with the src attribute. This URL may point to any kind of file, although it will usually point to an HTML file or another XUL file. You can use a script to change the contents of the iframe without affecting the main window. In the Mozilla browser window, the area where the web page is displayed is created by using an iframe. When the user enters a URL or clicks on a link in a document, the source of the frame is changed. iframe example Example 1 : Source View <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton label="Back" /> <toolbarbutton label="Forward" /> <textbox id="urlfield" /> </toolbar> </toolbox> <i...
...page is displayed is created by using an iframe. When the user enters a URL or clicks on a link in a document, the source of the frame is changed. iframe example Example 1 : Source View <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton label="Back" /> <toolbarbutton label="Forward" /> <textbox id="urlfield" /> </toolbar> </toolbox> <iframe id="content-body" src="http://www.mozilla.org/index.html" flex="1" /> The example here has created a very simple interface for a web browser. A box has been created containing two elements: a toolbox and an iframe. A Back button, a Forward button and a field for typing is URLs has been added to the only toolbar (We'll learn about toolbar in a later section). The web pages would appear inside the iframe. In this case, the file index.html...
...rward buttons. The browser can also load pages with referers and other flags. Essentially, the browser tag should be used when you want to create a browser-like interface, but the iframe may be used when you just need a simple panel. A similar element, tabbrowser, provides the functionality of browser but also provides a tab bar for switching between multiple pages. This is the widget used by the Mozilla browser for its tabbed browsing interface. The tabbrowser element is actually implemened as a tabbox containing a set of browser elements. Both types of browser offer similar control over pages that are displayed. browser example Example 2 : Source View <browser src="http://www.mozilla.org" flex="1" /> As with the iframe, you can specify the url in a browser using the src attribute. For a...
...And 2 more matches
Document Object Model - Archive of obsolete content
. The DOM structure may be examined and modified using various methods provided for this purpose. Specific XUL elements also provide additional functions which may be used. Each XUL file that is loaded will have its own document displayed in a window or frame. Although there is only ever one document associated with a window at a time, you may load additional documents using various methods. In Mozilla, the DOM may be accessed and manipulated using JavaScript. The various DOM objects have functions which may be accessed in script, however, it is important to note that the DOM is an API that is accessible by JavaScript. JavaScript itself is just a scripting language that can access these objects because Mozilla provides these objects for use. In JavaScript, there is always a single global objec...
...y with the 'window' identifier just to be clearer. The window's open() method also returns a reference to the new window so you can call functions of the new window from the opener. It is important to note, however, that the open() method returns before the window has fully loaded, so functions will not typically be available yet. The window object isn't defined by any DOM specification, but in Mozilla is sometimes considered part of DOM Level 0, a name used by some developers to refer to the DOM-like functions before they were added to specifications. The actual document displayed in a window can be retrieved using the window's document property. Since it is one of the most commonly referenced properties of the window, the document property is usually referenced without the 'window.' qualifier...
... sometimes considered part of DOM Level 0, a name used by some developers to refer to the DOM-like functions before they were added to specifications. The actual document displayed in a window can be retrieved using the window's document property. Since it is one of the most commonly referenced properties of the window, the document property is usually referenced without the 'window.' qualifier. Mozilla provides several different document objects depending on the kind of document. The three main documents are HTMLDocument, XMLDocument, and XULDocument, for HTML, XML and XUL documents respectively. Obviously, it is this latter type of document used for XUL. The three document types are very similar, in fact they all share the same base implementation. However, there are a few functions that are s...
...And 2 more matches
Templates - Archive of obsolete content
More details on these will be provided in the later section. Usually, elements such as treeitems and menuitems will be populated with data. ...
...nt to use for each constructed element. The template element should be placed inside the container that will contain the constructed elements. For example, if you are using a tree, you should place the template element inside a tree element. Simple Template Example This is better explained with an example. Let's take a simple example where we want to create a button for each top-level bookmark. Mozilla provides a bookmarks datasource so it can be used to get the data. This example will only get the top-level bookmarks (or bookmark folders) as we're going to create buttons. For child bookmarks, we would need to use an element that displays a hierarchy such as a tree or menu. This example and any others that reference internal RDF datasources will only work if you load them from a chrome URL. F...
... datasource so it can be used to get the data. This example will only get the top-level bookmarks (or bookmark folders) as we're going to create buttons. For child bookmarks, we would need to use an element that displays a hierarchy such as a tree or menu. This example and any others that reference internal RDF datasources will only work if you load them from a chrome URL. For security reasons, Mozilla doesn't allow access to them from other sources. To view this example, you will need to create a chrome package and load the file from there (you can do this easily, see Manifest Files). You can then enter the chrome URL into the browser URL field. Example 1 : Source <vbox datasources="rdf:bookmarks" ref="NC:BookmarksRoot" flex="1"> <template> <button uri="rdf:*" label="rdf:http://home.
...And 2 more matches
window - Archive of obsolete content
Describes the structure of a top-level window. It is the root node of a XUL document. It is by default a horizontally oriented box. As it is a box, all box attributes can be used. By default, the window will have a platform-specific frame around it. To set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window. Without including the css file at "chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog. Note: Starting in Gecko 1.9.2, you can detect when a window is activated or deact...
...footer, screenX, screenY, sizemode, title, width, windowtype Examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!-- run this example using copy & paste in this live XUL editor: https://github.com/KM-200/xul --> <!-- Extremely recommended to keep this css include!! ...
...be different if the element or its contents have a minimum or maximum width, or the size is adjusted by the flexibility or alignment of its parent. The CSS width property may also be used. windowtype Type: string Set to a string which can be used to identify the type of window. This might be used, for example, to distinguish between a browser window and an editor window. Some of Mozilla's window handling functions use this attribute to group windows of the same type together. Values for window type as found on MXR: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - Looks like if window has gBrowser it has this window type devtools:scratchpad - Scratchpad windows navigator:view-source - The view source windows Properties Inherited ...
...And 2 more matches
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. ...
...PIs which can be used to render web pages within native and Java applications. As of December 2008,XULRunner 1.9.0.4 is available in the "Gecko 1.9.0" branch upon which Firefox 3 is based. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.8.0.4 . To register XULRunner with the system, open a command ...
...f XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. ...
...And 2 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
XULRunner 1.9.1 is a stable release of the Mozilla XULRunner application framework. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.9.1.x is built from the same source code snapshot as Firefox 3.5.x. Current Version The current version of XULRunner is 1.9.1.19, matching Firefox 3.5.19 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. ...
...1.x is built from the same source code snapshot as Firefox 3.5.x. Current Version The current version of XULRunner is 1.9.1.19, matching Firefox 3.5.19 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9.1 . To register XULRunner with the system, open a command ...
... of XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. ...
...And 2 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
XULRunner 1.9.2 is a stable release of the Mozilla XULRunner application framework. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 1.9.2.x is built from the same source code snapshot as Firefox 3.6.x. Current Version The current version of XULRunner 1.9.2 is 3.6.26, matching Firefox 3.6.26 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. ...
...is built from the same source code snapshot as Firefox 3.6.x. Current Version The current version of XULRunner 1.9.2 is 3.6.26, matching Firefox 3.6.26 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9.2 . To register XULRunner with the system, open a command prompt and...
...ation. Remove the XULRunner directory. Mac OS X If you have multiple versions of XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. You also need to remove the receipt, especially if you plan on reinstalling a different version. Type sudo rm /var/db/receipts/org.mozilla.xulrunner.* Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. Sample applications are available from the Mozilla Developer Center. Save the application archive to your desktop or another convenient place. Windows Run the following command from the Start Menu -> Run or from a command...
...And 2 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
XULRunner 1.9 is a stable release of the Mozilla XULRunner application framework. It replaces version 1.8.0.4; 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. XULRunner 1.9 is built from the same source code snapshot as Firefox 3. Current Version The current version of XULRunner is 1.9.0.17, matching Firefox 3.0.17 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. ...
... is built from the same source code snapshot as Firefox 3. Current Version The current version of XULRunner is 1.9.0.17, matching Firefox 3.0.17 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.9 . To register XULRunner with the system, open a command prom...
...f XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. ...
...And 2 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
XULRunner 2.0 is a stable release of the Mozilla XULRunner application framework. It provides facilities for launching standalone XUL applications and embedding APIs which can be used to render web pages within native and Java applications. XULRunner 2.0.x is built from the same source code snapshot as Firefox 4.0.x. Current Version The current version of XULRunner 2.0 is 2.0, matching Firefox 4.0 Detailed release notes can be found here. System Requirements Before installing, make sure your computer meets the system requirements (NB: that page will change for Firefox 4 shipping). The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English. The releases directory can...
...ctory can be found here. Specific runtimes can be found at: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for 32-bit Linux Download XULRunner for 64-bit Linux (Warning: links may become out-of-date at times). Windows Unpack the ZIP file to a new directory using an archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\2.0 . To register XULRunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only). Mac OS X Open the .pkg file within the installer and follow the directions. XULRunner 2.0 is a universal binary containing i386 and x86_64 architectures. XULRunner 1.9.2 and earlier vers...
...ns of XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. ...
...And 2 more matches
Getting started with XULRunner - Archive of obsolete content
If you need to change XULRunner itself or integrate it with external binaries you may need to read that article. Step 1: Download XULRunner You can find a download link on the main XULRunner page here on MDN. ...
...If you need to change XULRunner itself or integrate it with external binaries you may need to read that article. Step 1: Download XULRunner You can find a download link on the main XULRunner page here on MDN. Since we are not creating any binary XPCOM components, we only need to download and install the XULRunner runtime package, not the SDK. ...
...location you like, but there are many places in the documentation that will assume that you have this installed in /Library/Frameworks. In Ubuntu desktop and its variants (Xubuntu, Kubuntu, ...), from version 11.10 (Oneiric Ocelot), XULRunner is not longer maintained and doesn't exist in Ubuntu repository. Therefore, either you need to compile XULRunner manually or download a binary release from Mozilla's FTP server. One way to achieve this is to run the following script everytime you want to install a new version: FIREFOX_VERSION=`grep -Po "\d{2}\.\d+" /usr/lib/firefox/platform.ini` ARCH=`uname -p` XURL=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$FIREFOX_VERSION/runtimes/xulrunner-$FIREFOX_VERSION.en-US.linux-$ARCH.tar.bz2 cd /opt sudo sh -c "wget -O- $XURL | tar -xj" sudo ln ...
...And 2 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
he application package. ...
...istry); var toolkitChromeReg = chromeRegService.QueryInterface(Components.interfaces.nsIToolkitChromeRegistry); var selectedLocale = xulChromeReg.getSelectedLocale("localeswitchdemo"); var availableLocales = toolkitChromeReg.getLocalesForPackage("localeswitchdemo"); // Render locale menulist by iterating through the query result from getLocalesForPackage() const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var localeListbox = document.getElementById("locale-listbox"); var selectedItem = null; while(availableLocales.hasMore()) { var locale = availableLocales.getNext(); var listitem = document.createElementNS(XUL_NS, "listitem"); listitem.setAttribute("value", locale); listitem.setAttribute("label", locale); if (locale == s...
..."value", locale); listitem.setAttribute("label", locale); if (locale == selectedLocale) { // Is this the current locale? selectedItem = listitem; } localeListbox.appendChild(listitem); } // Highlight current locale localeListbox.selectedItem = selectedItem; } catch (err) { alert (err); } 4. Code to update the locale user preference and restart the application Mozilla XULRunner doesn't allow runtime switching of the locale, therefore the application must be restarted to activate the new choice. Here is an example event handler which is fired when the user clicks on the button to change the locale. It saves the new locale to the user application preferences (thereby overriding the default prefs.js above) and then asks XULRunner to restart. function changeLocale...
...And 2 more matches
Monitoring plugins - Archive of obsolete content
ny disk I/O time. It is therefore technically incorrect to say that the runtime is a measure of CPU use, however, it is a good representation of overall resources being consumed by the plugin. Usage To make use of the new component you must register to receive its runtime notifications using the observer service. The notification's topic is experimental-notify-plugin-call. If you are new to the Mozilla observer service, you may want to familiarize yourself with it before proceeding further. You can find more information on the observer service here and here. Below are a number of JavaScript snippets that would be useful to developers trying to use this feature: Registration To register for runtime notifications with the observer service you must create a class with an observe method which ...
...ere. Below are a number of JavaScript snippets that would be useful to developers trying to use this feature: Registration To register for runtime notifications with the observer service you must create a class with an observe method which receives 3 parameters (subject, topic and data) as well as a register method that contains the following code: var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService (Components.interfaces.nsIObserverService); observerService.addObserver(this, "experimental-notify-plugin-call", false); Observing As discussed above, to specify what you want done when a notification arrives your class must have an observe method, receiving 3 parameters (subject, topic and data). The topic contains the notificat...
...correct one. This is useful in cases where your class is registered to receive notifications for more than one topic with the observer service. ...
...And 2 more matches
Adobe Flash - Archive of obsolete content
ature 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: Verifying the Flash Plugin Version Below, JavaScript identif...
...rmance and Flash As is the case with any plug-in content, Flash content has the potential to slow down or even completely stall not just the tab it's running in, but the entire browser and even the entire computer it's being used on. Avoiding poorly-written or unnecessary Flash content is crucial to ensuring the user has a positive experience on not just your site, but the entire Web. As part of Mozilla's effort to improve the user experience, a feature was added in Firefox 49 that automatically blocks certain Flash modules that have little or no user-noticeable impact from being used. These block-listed modules include various fingerprinting and HTTP_cookie#Supercookie modules. In the future, other modules may be blocked as well. And, of course, eventually Flash support will be removed from Fir...
...urther in the section on FSCommands. Accessing Flash from JavaScript The simple example below shows how input into an HTML text box in a form field can be transferred to a Flash animation (the grey text box below). Example 2: JavaScript to Flash Communication Note: Javascript to Flash Communication may not work with flash player versions older than version 8 if the user has installed multiple Mozilla based browsers onto the same machine (see bug 284057 and bug 233533). Enter some text in the HTML form field below and then click outside the field, or hit the Enter key, to send the text to the Flash movie below: The example is missing. Example 2 shows the use of Macromedia Flash's SetVariable method being invoked from JavaScript. In general, to invoke a Macromedia-defined method on a Flash ...
...And 2 more matches
0.90 - Archive of obsolete content
Archive › RSS › Version › 0.90
t. (See the RSS Versions List for a list of non-deprecated RSS formats.) Consumers of RSSSHOULD still be able to accept RSS 0.90 feeds though. ...
...cated RSS formats.) Consumers of RSSSHOULD still be able to accept RSS 0.90 feeds though. ...
... be able to accept RSS 0.90 feeds though. ...
...And 2 more matches
Sunbird Theme Tutorial - Archive of obsolete content
Introduction A theme is a package that users can install in an application to change the appearance of the application, without changing how the application works. For example, a theme can change the size and colour of the toolbar buttons, and provide different icons on the buttons. ...
...ve CSS Graphic design Knowledge of XUL, XBL and JavaScript is useful for advanced themes. Making a theme A theme consists of: A unique identifier A file containing information about the theme A file that registers the theme with Sunbird Some files containing the theme itself Set up your theme in Sunbird's profile directory. For information on how to find the profile directory, see the Mozillazine article: Profile Folder Inside the profile directory, go to the <tt>extensions</tt> directory. Note: If the <tt>extensions</tt> directory is empty, you are in the wrong place--start again and follow the instructions more carefully. Creating a unique identifier Create an identifier that is likely to be unique, in the form: <tt>something@domain-name</tt> It must contain an at-sign (<tt>@<...
... directory's name. This new directory is your theme directory. Go into your theme directory. Creating information about your theme In your theme directory, create a plain text file named <tt>install.rdf</tt>. ...
...And 2 more matches
Building a Theme - Archive of obsolete content
dow. The file icon.png is used as an icon in the same panel. We'll leave both of them out for now, unless you have something picked out that you want to use. The remaining directories will be extracted from the default theme. First, you'll want to create a directory somewhere. Copy your Firefox installation's omni.ja into this directory. The location differs by operating system: Linux: /usr/lib/MozillaFirefox/chrome/classic.ja or /usr/lib/firefox-*.*.*/omni.ja Windows: \Program Files\Mozilla Firefox\omni.ja Mac OS X: /Applications/Firefox.app/Contents/MacOS/omni.ja Now, open (or unzip) this file into the directory you created. It contains several folders, modules, jssubloader and others. The files we will be needing are located under the chrome\toolkit\skin\classic folder. Create a folder c...
...ent environment and follow the directions there. It's especially important to install the DOM Inspector, which we'll be using in later steps. Create the Install Manifest Open the file called install.rdf that you created at the top of your extension's folder hierarchy and put this inside: <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>sample@example.net</em:id> <em:version>1.0</em:version> <em:type>4</em:type> <!-- Target Application this theme can install into, with minimum and maximum supported versions. --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> ...
...e the file. Chrome URIs Next, we have to tell Firefox where to find the theme files for your theme. CSS, XUL, and other files are part of "Chrome Packages" - bundles of user interface components which are loaded via chrome:// URIs. Rather than load the browser from disk using a file:// URI (since the location of Firefox on the system can change from platform to platform and system to system), Mozilla developers came up with a solution for creating URIs to content that the installed add-on knows about. The browser window is: chrome://browser/content/browser.xul. Try typing this URL into the location bar in Firefox! Chrome URIs consist of several components: Firstly, the URI scheme (chrome) which tells Firefox's networking library that this is a Chrome URI. It indicates that the content of...
...And 2 more matches
Using SSH to connect to CVS - Archive of obsolete content
Anonymous/read-only access via SSH is not available at this time. Please see our source code page for directions accessing read-only CVS, and our getting write access page for directions on obtaining write access. Generating an SSH key First, install ssh. Most Linux, BSD, and OSX distributions come with it installed already. Cygwin makes ssh available on Windows if you install the openssh package from the Net category. If all else fails, OpenSSH is a widely used and highly portable implementation. ...
...VSROOT environment variable. If you wish to keep your previous pserver trees, you'll need to update the Root files in each CVS subdirectory in your tree. This can be done using a unix-style find and perl: find . -name Root -exec perl -p -i -e "s/pserver/ext/" {} \; Dealing with firewalls Do not attempt to perform the steps in this section unless you have first verified that you can access cvs.mozilla.org from outside of the firewall. Only proceed with these steps once you are certain you can access cvs.mozilla.org from the open Internet. If you are behind a firewall with an http tunneling proxy, you can use a program called corkscrew, in combination with the ProxyCommand ssh config directive to continue to access the mozilla CVS server. This technique was taken from Eric Engstrom's site, but...
...se steps once you are certain you can access cvs.mozilla.org from the open Internet. If you are behind a firewall with an http tunneling proxy, you can use a program called corkscrew, in combination with the ProxyCommand ssh config directive to continue to access the mozilla CVS server. This technique was taken from Eric Engstrom's site, but the instructions have been re-written specifically for Mozilla. Download, build, and install corkscrew by following the instructions in the INSTALL file in the corkscrew source distribution. Corkscrew uses the standard "./configure; make install" technique common to many open source projects. Make sure you have a ~/.ssh/config file that has at least the following directives PreferredAuthentications hostbased,publickey,password Host cvs.mozilla.org Pr...
...And 2 more matches
Archive of obsolete content
ses validating XHTML 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. 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. ...
...sing XML. There are no real standards for this conversion, but some conventions begin to appear on the web. There are some cases in which the whole content of an XML document must be read from the JavaScript interpreter (like for web-apps languages or settings XML documents, for example). In these cases JXON could represent the most practical way. List of Former Mozilla-Based Applications The following is a list of all known applications that at one point used Mozilla technologies or that are no longer being actively maintained. List of Mozilla-Based Applications The following is a list of all known active applications that are built using Mozilla technologies. This list is likely to be incomplete sin...
...ges were moved from the top level of MDN in a spate of furious reorganization. MMgc MMgc is the Tamarin (nee Macromedia) garbage collector, a memory management library that has been built as part of the AVM2/Tamarin effort. It is a static library that is linked into the Flash Player but kept separate, and can be incorporated into other programs. Mozilla release FAQ This document may be distributed and modified freely. No guarantee of factuality in this FAQ is made, and it is maintained by Pat Gunn, who is not affiliated with Netscape. Various other people have contributed to this FAQ. Newsgroup summaries Obsolete: XPCOM-based scripting for NPAPI plugins Plugins that u...
...And 2 more matches
How do you make sure your website works properly? - Learn web development
with your web hosting configuration. Let's see how to diagnose and solve those problems. Active Learning There is no active learning available yet. Dig deeper Test in your browser If you want to know whether your website works correctly, the first thing to do is fire up your browser and go to the page you want to test. Uh-oh, where's the image? Let's look at our personal website, http://demozilla.examplehostingprovider.net/. It's not showing the image we expected! Open Firefox's Network tool (Tools ? Web Developer ? Network) and reload the page: There's the problem, that "404" at the bottom. "404" means "resource not found", and that's why we didn't see the image. HTTP statuses Servers respond with a status message whenever they receive a request. Here are the most common statuses...
... we succeeded in reloading the page and the image. 304 for basic.css means that this file has not changed since the last request, so the browser can use the file in its cache rather than receiving a fresh copy. So we fixed the error and learned a few HTTP statuses along the way! Frequent errors The most frequent errors that we find are these: Typos in the address We wanted to type http://demozilla.examplehostingprovider.net/ but typed too fast and forgot an "l": The address cannot be found. Indeed. 404 errors Many times the error just results just from a typo, but sometimes maybe you either forgot to upload a resource or you lost your network connection while you were uploading your resources. First check the spelling and accuracy of the file path, and if there's still a problem, uplo...
...nd meets most criteria. But we can already note it would have been better to use a CDN. That doesn't matter very much when we're only serving one image, but it would be critical for a high-bandwidth website serving many thousands of images. ...
...And 2 more matches
What is a Domain Name? - Learn web development
r in the label). a, 97, and hello-strange-person-16-how-are-you are all examples of valid labels. The label located right before the TLD is also called a Secondary Level Domain (SLD). A domain name can have many labels (or components). It is not mandatory nor necessary to have 3 labels to form a domain name. For instance, www.inf.ed.ac.uk is a valid domain name. For any domain you control (e.g. mozilla.org), you can create "subdomains" with different content located at each, like developer.mozilla.org, iot.mozilla.org, or wiki.developer.mozilla.org. Buying a domain name Who owns a domain name? You cannot "buy a domain name". This is so that unused domain names eventually become available to use again by someone else. If every domain name was bought, the web would quickly fill up with unuse...
...k. For instance, every domain name under .fire is managed by Amazon. Finding an available domain name To find out whether a given domain name is available, Go to a domain name registrar's website. Most of them provide a "whois" service that tells you whether a domain name is available. Alternatively, if you use a system with a built-in shell, type a whois command into it, as shown here for mozilla.org: $ whois mozilla.org Domain Name:MOZILLA.ORG Domain ID: D1409563-LROR Creation Date: 1998-01-24T05:00:00Z Updated Date: 2013-12-08T01:16:57Z Registry Expiry Date: 2015-01-23T05:00:00Z Sponsoring Registrar:MarkMonitor Inc. (R37-LROR) Sponsoring Registrar IANA ID: 292 WHOIS Server: Referral URL: Domain Status: clientDeleteProhibited Domain Status: clientTransferProhibited Domain Status: clien...
...1998-01-24T05:00:00Z Updated Date: 2013-12-08T01:16:57Z Registry Expiry Date: 2015-01-23T05:00:00Z Sponsoring Registrar:MarkMonitor Inc. (R37-LROR) Sponsoring Registrar IANA ID: 292 WHOIS Server: Referral URL: Domain Status: clientDeleteProhibited Domain Status: clientTransferProhibited Domain Status: clientUpdateProhibited Registrant ID:mmr-33684 Registrant Name:DNS Admin Registrant Organization:Mozilla Foundation Registrant Street: 650 Castro St Ste 300 Registrant City:Mountain View Registrant State/Province:CA Registrant Postal Code:94041 Registrant Country:US Registrant Phone:+1.6509030800 As you can see, I can't register mozilla.org because the Mozilla Foundation has already registered it. On the other hand, let's see if I could register afunkydomainname.org: $ whois afunkydomainname.org...
...And 2 more matches
JavaScript basics - Learn web development
esponses when buttons are pressed or with data entry on forms; with dynamic styling; with animation, etc. This article helps you get started with JavaScript and furthers your understanding of what is possible. What is JavaScript? JavaScript ("JS" for short) is a full-fledged dynamic programming language that can add interactivity to a website. It was invented by Brendan Eich (co-founder of the Mozilla project), the Mozilla Foundation, and the Mozilla Corporation. JavaScript is versatile and beginner-friendly. With more experience, you'll be able to create games, animated 2D and 3D graphics, comprehensive database-driven apps, and much more! JavaScript itself is relatively compact, yet very flexible. Developers have written a variety of tools on top of the core JavaScript language, unlocking ...
...the heading, storing each inside variables: let myButton = document.querySelector('button'); let myHeading = document.querySelector('h1'); Add the function below to set the personalized greeting. This won't do anything yet, but this will change soon. function setUserName() { let myName = prompt('Please enter your name.'); localStorage.setItem('name', myName); myHeading.textContent = 'Mozilla is cool, ' + myName; } The setUserName() function contains a prompt() function, which displays a dialog box, similar to alert(). This prompt() function does more than alert(), asking the user to enter data, and storing it in a variable after the user clicks OK. In this case, we are asking the user to enter a name. Next, the code calls on an API localStorage, which allows us to store data in the...
...ch contains the user's entry for the name. Finally, we set the textContent of the heading to a string, plus the user's newly stored name. Add the if ... else block (below). We could call this initialization code, as it structures the app when it first loads. if(!localStorage.getItem('name')) { setUserName(); } else { let storedName = localStorage.getItem('name'); myHeading.textContent = 'Mozilla is cool, ' + storedName; } This first line of this block uses the negation operator (logical NOT, represented by the !) to check whether the name data exists. If not, the setUserName() function runs to create it. If it exists (that is, the user set a user name during a previous visit), we retrieve the stored name using getItem() and set the textContent of the heading to a string, plus the user'...
...And 2 more matches
Useful string methods - Learn web development
arts melting, don't worry! You really don't need to know about most of these early on in your learning journey. But there are a few that you'll potentially use quite often that we'll look at here. Let's enter some examples into the browser developer console. Finding the length of a string This is easy -- you simply use the length property. Try entering the following lines: let browserType = 'mozilla'; browserType.length; This should return the number 7, because "mozilla" is 7 characters long. This is useful for many reasons; for example, you might want to find the lengths of a series of names so you can display them in order of length, or let a user know that a username they have entered into a form field is too long if it is over a certain length. Retrieving a specific string character O...
...irst letter you'd do this: browserType[0]; Remember: computers count from 0, not 1! You could use this to, for example, find the first letter of a series of strings and order them alphabetically. To retrieve the last character of any string, we could use the following line, combining this technique with the length property we looked at above: browserType[browserType.length-1]; The length of "mozilla" is 7, but because the count starts at 0, the character position is 6; using length-1 gets us the last character. Finding a substring inside a string and extracting it Sometimes you'll want to find if a smaller string is present inside a larger one (we generally say if a substring is present inside a string). This can be done using the indexOf() method, which takes a single parameter -- the su...
...main string, it returns a number representing the index position of the substring -- which character number of the main string the substring starts at. If the substring is not found inside the main string, it returns a value of -1. Try this: browserType.indexOf('zilla'); This gives us a result of 2, because the substring "zilla" starts at position 2 (0, 1, 2 -- so 3 characters in) inside "mozilla". Such code could be used to filter strings. For example, we may have a list of web addresses and only want to print out the ones that contain "mozilla". This can be done in another way, which is possibly even more effective. Try the following: browserType.indexOf('vanilla'); This should give you a result of -1 -- this is returned when the substring, in this case 'vanilla', is not found i...
...And 2 more matches
Accessibility Information for Core Gecko Developers
with JavaScript rather than declarative markup to describe the behavior of custom widgets such as menus and tree views. These widgets are often not even keyboard focusable, and assistive technologies do not understand these widgets. This document shows several interactive desktop-style widgets that are accessible by keyboards and assistive technologies, and outlines a plan being developed by IBM, Mozilla, and the WAI Protocols and Formats Working Group (PFWG) to address the issue of DHTML accessibility. Mozilla Accessibility Architecture This document explains how we implement the cross-platform accessibility layer in Mozilla. It contains a class hierararchy and an explanation of the accessibility cache. Unix Accessibility Project This document describes the SUN accessibility project. ...
...Since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night. ...
...is document explains how we implement the cross-platform accessibility layer in Mozilla. It contains a class hierararchy and an explanation of the accessibility cache. Unix Accessibility Project This document describes the SUN accessibility project. ...
...And 2 more matches
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...
...lla 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 expose a read-only DOM (document object model). Mozilla Support for Linux/UNIX Assistive Technology Developers Mozilla supports the AT-SPI (Assistive Technology Service Provider Interface) in HTML and in our user interface (based on XUL technology). This makes it possible for the developers of Linux and UNIX accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for Mozilla. Join the Moz...
...rface) in HTML and in our user interface (based on XUL technology). This makes it possible for the developers of Linux and UNIX accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for Mozilla. ...
...And 2 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, fr...
...The providers work together to supply a complete set of chrome for a particular window, from the images on the toolbar buttons to the files that describe the text, content, and appearance of the window itself. There are three basic types of chrome providers: Content The main source file for a window description comes from the content provider, and it can be any file type viewable from within Mozilla. It will typically be a XUL file, since XUL is designed for describing the contents of windows and dialogs. The JavaScript files that define the user interface are also contained within the content packages, as well as most XBL binding files. Locale Localizable applications keep all their localized information in locale providers. This allows translators to plug in a different chrome package to...
... @ # ; : ? / are not allowed in the packagename. Firefox 2, Thunderbird 2, and SeaMonkey 1.1 will not find the chrome when packagename is mixed case. If the above example had a packagename of CamelCasePackage, you would get an error message similar to "No chrome registered for chrome://camelcasepackage/path/to/files". Firefox 3, Thunderbird 3, and SeaMonkey 2 support mixed case. Bug resolved in Mozilla 1.9; see bug 132183. Manifest instructions comments # this line is a comment - you can put here whatever you want A line is a comment if it begins with the character '#'. Any following character in the same line is ignored. manifest manifest subdirectory/foo.manifest [flags] This will load a secondary manifest file. This can be useful for separating component and chrome registration in...
...And 2 more matches
HTTP logging
atever state you need to be in just before your bug occurs. Open a new tab and type in "about:networking" into the URL bar. Go to the "Logging section" Adjust the location of the log file if you don't like the default Adjust the list of modules that you want to log: this list has the exact same format as the MOZ_LOG environment variable (see below). Generally the default list is OK, unless a Mozilla developer has told you to modify it. Click on Start Logging. Reproduce the bug (i.e. go to the web site that is broken for you and make the bug happen in the browser) Make a note of the value of "Current Log File". Click on Stop Logging. Go to the folder containing the specified log file, and gather all the log files. You will see several files that look like: log.txt-main.1806, log.txt-chil...
... file, and gather all the log files. You will see several files that look like: log.txt-main.1806, log.txt-child.1954, log.txt-child.1970, etc. This is because Firefox now uses multiple processes, and each process gets its own log file. For many bugs, the "log.txt-main" file is the only thing you need to upload as a file attachment to your Bugzilla bug (this is assuming you're logging to help a mozilla developer). Other bugs may require all the logs to be uploaded--ask the developer if you're not sure. Pat yourself on the back--a job well done! Thanks for helping us debug Firefox. Logging HTTP activity by manually setting environment variables Sometimes the about:networking approach won't work, for instance if your bug occurs during startup, or you're running on mobile, etc. In that case...
...ey and press "R". Type CMD and press enter, a new Command Prompt window with a black background will appear. Copy and paste the following lines one at a time into the Command Prompt window. Press the enter key after each one.: For 64-bit Windows: set MOZ_LOG=timestamp,rotate:200,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5,cookie:5 set MOZ_LOG_FILE=%TEMP%\log.txt "c:\Program Files\Mozilla Firefox\firefox.exe" For 32-bit Windows: set MOZ_LOG=timestamp,rotate:200,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5,cookie:5 set MOZ_LOG_FILE=%TEMP%\log.txt "c:\Program Files (x86)\Mozilla Firefox\firefox.exe" (These instructions assume that you installed Firefox to the default location, and that drive C: is your Windows startup disk. Make the appropriate adjustments if those...
...And 2 more matches
Debugging
Debugging a project as large as Mozilla can be a daunting task. Fortunately, over the years, Mozilla developers have come up with not just technologies and features to help you debug code, but have devised tips and techniques that can help too. Also available are assorted tools that you can use when debugging. Documentation topics Debugging on top of the Mozilla platform Debugging JavaScript code How to debug JavaScript code, with a focus on debugging code in the Mozilla project itself. Debugging a XULRunner application Tips and suggestions that will help you debug your XULRunner based application. Debugging update problems Learn how to debug update problems in Mozilla-based applications. ...
...ozilla platform Debugging JavaScript code How to debug JavaScript code, with a focus on debugging code in the Mozilla project itself. Debugging a XULRunner application Tips and suggestions that will help you debug your XULRunner based application. Debugging update problems Learn how to debug update problems in Mozilla-based applications. Debugging the Mozilla platform Using debuggers with Mozilla Debugging Mozilla on Windows FAQ Questions (and answers) about debugging Mozilla on Windows. Debugging Mozilla on OS X Questions (and answers) about debugging Mozilla on OS X. Debugging Mozilla with gdb gdb is our primary debugger on Mac and Linux. Debugging Mozilla with lldb lldb is the new debugger on Mac. ...
...lla with lldb lldb is the new debugger on Mac. Advanced debugging techniques Understanding crash reports How to read crash reports, which are full of information yet often not easy to interpret and act on. Debugging a minidump Windows crash reports include a minidump, which contains a lot of information about the application when it crashed. Debugging Mozilla with valgrind Valgrind 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 dete...
...And 2 more matches
Simple SeaMonkey build
You can build a bleeding-edge, development version of SeaMonkey using the commands below. For complete information, see the build documentation. Build prerequisites Hardware Requirements: The SeaMonkey build process is both I/O- and CPU-intensive, and can take a long time to build even on modern hardware. Minimum and recommended hardware requirements for Mozilla development are: Recommended: 8GB of RAM (having only 4GB RAM and 4GB swap may give memory errors during compile) 35 GB free disk space. This will accomodate Visual Studio 2013 Community Edition, the required SDKs, the MozillaBuild package, the Mercurial source repository and enough free disk space to compile. A fast SSD is recommended; the Firefox build process is I/O-intensive. High speed internet Installing build tool...
...sm Problems? See Mac OS X build prerequisites. Windows: Install Visual C++ 2013. Both the professional edition and the express edition will work. You may need to install one or more Windows SDKs. See Windows SDK versions for a quick guide. If you decided on the Windows 8 SDK, you also need the Outlook 2010 MAPI Header Files from Microsoft. Install MozillaBuild, a package of additional build tools. (If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'. After that all should be well.) Open a shell window by running: c:\mozilla-build\start-msvc2013.bat. Even if you're on 64-bit Windows, do not use the files ending in -x64.bat. ...
...ndow by running: c:\mozilla-build\start-msvc2013.bat. Even if you're on 64-bit Windows, do not use the files ending in -x64.bat. By default you will arrive in your Windows user home directory which is likely to contain spaces in its path (e.g. C:\Users\myaccount). This can lead to problems later in the building stage. To avoid that, create a directory without spaces in its path (e.g. mkdir /c/mozilla-src) and switch to it before building (cd /c/mozilla-src). Problems? See Windows build prerequisites. Building SeaMonkey Building SeaMonkey requires at least 2 GB of disk space and 256 MB of available RAM. # Get the source # for Aurora, use https://hg.mozilla.org/releases/comm-aurora/ and comm-aurora instead # for Beta, use https://hg.mozilla.org/releases/comm-beta/ and comm-...
...And 2 more matches
ESLint
html .xhtml Additionally, some directories and files are ignored, see the .eslintignore file Handling Errors If your code fails an ESLint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined. no-undef (eslint) If you don't understand a rule, you can look it up on eslint.org for more information about it. Mozilla Specific Rules There are some rules that are specific for the Mozilla code-base. These have the prefix mozilla/. More information: Outline details of the rules Rule Source Code Common issues and how to solve them My editor says that "mozilla/whatever" is unknown Run ./mach eslint --setup Restart your editor If that doesn't work, check that you have your editor pointing to the correc...
... Remove the directory from .eslintignore (in the base directory of the repository) Fix errors that occur when running ./mach eslint path/to/dir, see also the no-undef rules below. no-undef The no-undef rule is currently being enabled throughout the code base. Here are some common issues: My script is imported into the global browser.xul scope. ...
...My script is imported into the global browser.xul scope. Add a line like: /* eslint-env mozilla/browser-window */ or enable the rule in a .eslintrc.js if it will apply to the whole directory. ...
...And 2 more matches
Interface Compatibility
This includes CSS properties that begin with the -moz- prefix (e.g. -moz-box-shadow), or JavaScript APIs that begin with the moz prefix (e.g. ...
...anges are different depending on the consumers and the languages involved. Web Content APIs which are visible to web content are not modified, except as a last resort when inherent security vulnerabilities or incompatibility with other browsers make it the only option. Any changes, including new features, must have super-review. One exception to this rule is APIs which are explicitly shipped with Mozilla prefixes as a technology preview. This includes CSS properties that begin with the -moz- prefix (e.g. -moz-box-shadow), or JavaScript APIs that begin with the moz prefix (e.g. canvasrenderingcontext.mozDrawText). These APIs may be removed or replaced with standard interfaces in future releases of Mozilla. Jetpack The Jetpack SDK and APIs are not yet complete. The stable version 1.0 of the Jetpa...
...rsion 1.0 of the Jetpack SDK is planned for later in 2010. Documented APIs which are shipped as part of the Jetpack SDK are designed to work in future versions of Firefox. Achieving this compatibility may require rebuilding the extension with a new version of the Jetpack SDK. JavaScript/XUL Interfaces Traditional extensions written using XUL overlays and XPCOM have access to the full power of the Mozilla platform. With the power, however, comes the understanding that the Mozilla platform is constantly changing and many APIs may change in future versions of Firefox. In micro/maintenance releases, there should be no incompatible changes to interfaces, except as a last resort when a security fix leaves no other option. This includes not only XPCOM interfaces, but JavaScript functions, XBL bindings...
...And 2 more matches
Runtime Directories
Default Application Installation and User Profile Directories Firefox OS Application Directory User Profile Directory Temporary Directory Windows Vista/7 C:\Program Files\Mozilla Firefox\ C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\ (or %APPDATA%\Mozilla\Firefox\) C:\Users\<username>\AppData\Local\Mozilla\Firefox\ (or %LOCALAPPDATA%\Mozilla\Firefox) and C:\Users\<username>\AppData\Local\VirtualStore\Program Files\Mozilla Firefox\ Windows 2000/XP C:\Program Files\Mozilla Firefox\ C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\ (or %APPDATA%\Mozilla\Firefox\) C:\Documents and Settings\<username>\Local Settings\Application Data\Mozilla\Firefox\ OS X /Applications/Firefox.app ~/...
...efox\ C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\ (or %APPDATA%\Mozilla\Firefox\) C:\Documents and Settings\<username>\Local Settings\Application Data\Mozilla\Firefox\ OS X /Applications/Firefox.app ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/ ~/Library/Caches/Firefox/Profiles/xxxxxxxx.default/ Linux ???? ...
...zilla\Firefox\ OS X /Applications/Firefox.app ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/ ~/Library/Caches/Firefox/Profiles/xxxxxxxx.default/ Linux ???? ...
...And 2 more matches
Displaying Places information using views
plan on changing, you will want to set the view's place property dynamically using JavaScript. Note that in the latter case it is not sufficient to call setAttribute on the element; use the element's place property instead. See Querying Places and Places query URIs for information on query URIs. ...
...element; use the element's place property instead. See Querying Places and Places query URIs for information on query URIs. The following example uses the built-in tree view to display bookmarks whose titles or URLs contain "mozilla". Remember that, because XUL is XML, any ampersands in query URIs must be written as entity reference &amp; and not simply &. <tree type="places" place="place:terms=mozilla&amp;onlyBookmarked=1&amp;queryType=1"> <treecols> <treecol id="title" label="My Bookmarks" flex="1" primary="true" /> </treecols> <treechildren /> </tree> The next example does the same as the last but uses JavaScript to set the tree's place attribute: var histServ = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService); var query = histServ.getNe...
...Type=1"> <treecols> <treecol id="title" label="My Bookmarks" flex="1" primary="true" /> </treecols> <treechildren /> </tree> The next example does the same as the last but uses JavaScript to set the tree's place attribute: var histServ = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService); var query = histServ.getNewQuery(); query.searchTerms = "mozilla"; query.onlyBookmarked = true; var opts = histServ.getNewQueryOptions(); opts.queryType = opts.QUERY_TYPE_BOOKMARKS; var uri = histServ.queriesToQueryString([query], 1, opts); var tree = document.getElementById("mytree"); tree.place = uri; These two examples use the built-in tree view, but the point is to demonstrate the use of the place attribute and property. In this regard the built-in menu...
...And 2 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. ...
...ly If desired, connect an Android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices List of devices attached emulator-5554 device If no device is found, 'mach geckoview-junit' will offer to start an emulator. Before running tests, install the androidTest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it. mozilla-central$ mach install --app org.mozilla.geckoview.test To run all tests: mozilla-central$ mach geckoview-junit To run just one class of tests: mozilla-central$ mach geckoview-junit <class> Please note that unlike Robocop tests, <class> needs to be specified using the fully qualified class name including the package, e.g. org.mozilla.geckoview.test.ContentDelegateTest. To run just one test:...
...Each test must be listed on its own line. ...
...And 2 more matches
How to get a stacktrace for a bug report
If you file a bug report in Bugzilla about a crash you should include a stacktrace (call stack) in your report. A stacktrace will tell Mozilla developers what crashed and provide a starting point for investigating its cause. This article describes how to use the Mozilla Crash Reporter (Breakpad) to get a crash ID, which our engineers can use to get a stacktrace, and alternative ways to get a stacktrace if you can't get a crash ID. Requirements You need a binary build of Firefox from Mozilla.org. SeaMonkey and Thunderbird also support crash reporting. Mozilla's crash report server currently only has debug information for Mozilla builds and thus the crash reporter cannot work if you use a build from a Linux distribution or if you compile from source code. In these cases you will need to ...
...f you use a build from a Linux distribution or if you compile from source code. In these cases you will need to use one of the alternative methods listed below. Note: When filing a crash report, it is important to know whether the crash occurs with Firefox safe mode. This helps engineers determine whether a particular extension or plugin is the cause of the crash. ...
...ses you will need to use one of the alternative methods listed below. Note: When filing a crash report, it is important to know whether the crash occurs with Firefox safe mode. This helps engineers determine whether a particular extension or plugin is the cause of the crash. How to get a crash ID with the Mozilla Crash Reporter 1. Crash and submit a report to the system. The Mozilla Crash Reporter window should automatically come up after Firefox crashes. If you have any additional information about the crash, such as additional detail on what you were doing at the time that may have triggered the crash, please enter it into the comments box. Be sure that you check the "Tell Mozilla about this crash" checkbox and click the restart button. The crash reporter should now submit...
...And 2 more matches
How to get a stacktrace with WinDbg
Debugging Tools for Windows for free, those include WinDbg which you will need here. Download it from Install Debugging Tools for Windows. (You'll want the 32-bit version, even if you are using a 64-bit version of Windows) Then install it, the standard settings in the installation process are fine. A Firefox nightly or release You need a Firefox version for which symbols are availables from the Mozilla symbol server to use with WinDbg. You can use any official nightly build or released version of Firefox from Mozilla. You can find the latest trunk nightly builds under http://ftp.mozilla.org/pub/mozilla.o.../latest-trunk/. Debugging To begin debugging, ensure that Firefox is not already running and open WinDbg from the Start menu. (Start->All Programs->Debugging Tools for Windows->WinDbg) Next...
...tp.mozilla.org/pub/mozilla.o.../latest-trunk/. Debugging To begin debugging, ensure that Firefox is not already running and open WinDbg from the Start menu. (Start->All Programs->Debugging Tools for Windows->WinDbg) Next, open the "File" menu and choose "Open Executable...". In the file chooser window that appears, open the firefox.exe executable in your Firefox program folder (C:\Program Files\Mozilla Firefox). You should now see a "Command" text window with debug output at the top and an input box at the bottom. Before debugging can start, several commands must be entered into the one-line input box at the bottom of the Command window. Tip: All commands must be entered exactly as written, one line at a time, into the bottom of the Command box. Copying and pasting each line is the easies...
...void mistakes Some commands start with a period (.) or a pipe character (|), which is required. (The keystroke for a pipe character on US keyboards is SHIFT+\) Submit the log file on a bug or via the support site, even if nothing seems to happen during the debug process Start debugging Now that Firefox is opened in the debugger, you need to configure your WinDbg to download symbols from the Mozilla symbol server. To load the symbols, enter the three commands below, pressing enter after each one. (More details are available at Using the Mozilla symbol server.) .sympath SRV*c:\symbols*http://symbols.mozilla.org/firefox;SRV*c:\symbols*http://msdl.microsoft.com/download/symbols .symfix+ c:\symbols .reload /f Now wait for the symbols to download. This may take some time depending on your conn...
...And 2 more matches
How to Report a Hung Firefox
sh into Firefox which will trigger the crash reporter: Download crashfirefox.exe here (source code). Running this tool will search for firefox.exe and inject crashing code into it. The tool also has command-line options to kill processes with other names or by process ID. Run the crashfirefox.exe tool. The Firefox crash report UI should appear. Please check the box to send the crash report to Mozilla Start Firefox. Type "about:crashes" in the URL bar and click on the top listing. The crash report should look something like this report, which is an example of bug 1132241. Create a new bug report at bugzilla.mozilla.org using this link. Linux and Mac On Linux and Mac (Firefox >=27), sending SIGABRT to a process will trigger the crash reporter. You can use any process monitoring tool to fi...
...IGABRT to a process will trigger the crash reporter. You can use any process monitoring tool to find the Firefox process ID (PID). Then, in a terminal, kill Firefox using a command such as this: # Replace 31042 with the PID of Firefox found above kill -n SIGABRT 31042 # on osx kill -s SIGABRT 31042 The Firefox crash report UI should appear. Please check the box to send the crash report to Mozilla Start Firefox. Type "about:crashes" in the URL bar and click on the top listing. Create a new bug report at bugzilla.mozilla.org using this link. All OS As long as you do not need to be in Firerfox's safe mode, a user friendly method of crashing Firefox is to install and use the addon Crash Me Now! (Simple) Use the menu button to find the Crash me icon and click the icon. Firefox crash ...
...listing. Create a new bug report at bugzilla.mozilla.org using this link. All OS As long as you do not need to be in Firerfox's safe mode, a user friendly method of crashing Firefox is to install and use the addon Crash Me Now! (Simple) Use the menu button to find the Crash me icon and click the icon. Firefox crash report UI should appear. Please check the box to send the crash report to Mozilla Start Firefox. Type "about:crashes" in the URL bar and click on the top listing. Create a new bug report at bugzilla.mozilla.org using this link. Another way to trigger a crash in a hung tab is to run the following script in the Browser Console (opened after selecting the hung tab): let wm = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator); let win = ...
...And 2 more matches
Integrated Authentication
This document provides an overview of Mozilla's support for integrated authentication. This entails support for the the Simple and Protected GSS-API Negotiation Mechanism (SPNEGO) internet standard (RFC 2478) to negotiate either Kerberos, NTLM, or other authentication protocols supported by the operating system. SPNEGO is commonly referred to as the "negotiate" authentication protocol. Mozilla does not have its own internal implementation of SPNEGO. Instead, it leverages system libraries that provide SPNEGO; SSPI on Microsoft Windows, and GSS-API on Linux, Mac OSX, and other UNIX-like systems. The Mozilla implementation of SPNEGO can be found under extensions/auth/. It used to live in extensions/negotiateauth. ...
... commonly referred to as the "negotiate" authentication protocol. Mozilla does not have its own internal implementation of SPNEGO. Instead, it leverages system libraries that provide SPNEGO; SSPI on Microsoft Windows, and GSS-API on Linux, Mac OSX, and other UNIX-like systems. The Mozilla implementation of SPNEGO can be found under extensions/auth/. It used to live in extensions/negotiateauth. Mozilla also supports raw NTLM authentication using an internal implementation (based on the documentation provided by Eric Glass) that supports NTLMv1/LMv1 and NTLM2 Session Key modes. As of Mozilla 1.7, there is no support for NTLMv2/LMv2. This is mainly due to the fact that NTLMSSP does not provide a means to negotiate use of NTLMv2/LMv2. <i>This document is incomplete ...</i> Flow Diagram The diagr...
...This is to protect the user from the possibility of DNS-spoofing being used to stage a man-in-the-middle exploit (see bug 17578 for more info). Moreover, with Windows clients NTLM may be negotiated as the authentication protocol. ...
...And 2 more matches
Localization content best practices
This document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes. Note: If you're a localizer and you want to contribute to the localization of Mozilla products, you might want to read our Localization quick start guide for information on localizing Mozilla code. Note on localizers Mozilla localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with VCS systems. It's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details. Localization files Choose good key IDs T...
...ely to cause severe headaches for localizers if the placeholders cannot be inflected. Use proper plural forms Firefox supports proper plural forms. As a native English speaker, you might find it natural to use delete-cookie = Delete cookie delete-cookies = Delete cookies In Firefox this should be # LOCALIZATION NOTE (delete-cookies): Semi-colon list of plural forms. # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals # #1 is the number of cookies to delete # example: delete-cookies = Delete #1 cookie;Delete #1 cookies Important: always include the localization note with this format if you use a plural form in Firefox. This comment is used by tools to identify strings with plural forms. One last advice: never use plural form as a replacement for single/multiple conditio...
...they rarely do in other languages. Take Bookmark: it can be both a noun and a verb in English. A developer could be tempted to reuse the same string "Bookmark" in the button to add a bookmark, and in the header for the next dialog. This won't work in some languages. Avoid unnecessary complexity in strings Consider this string: privacy-link = <p>By proceeding you accept the <a href="https://www.mozilla.org/privacy" class="external">Privacy Terms</a>.</p> In this case, you shouldn't put the URL inside the localization string, unless you need it to be localizable. If you change the URL, you're going to need a new string ID; the same goes for the anchor's attributes, or the paragraph markup. Instead, you should use the following strings # LOCALIZATION NOTE(privacy-text): {{link}} will be replace...
...And 2 more matches
BloatView
can view one or more bloat logs in your browser by running the following program. perl tools/bloatview/bloattable.pl log1 log2 ... logn > htmlfile This will produce an HTML file that contains a table similar to the following (but with added JavaScript so you can sort the data by column). Byte Bloats Name File Date blank blank.txt Tue Aug 29 14:17:40 2000 mozilla mozilla.txt Tue Aug 29 14:18:42 2000 yahoo yahoo.txt Tue Aug 29 14:19:32 2000 netscape netscape.txt Tue Aug 29 14:20:14 2000 The numbers do not include malloc 'd data such as string contents. Click on a column heading to sort by that column. Click on a class name to see details for that class. Class Name Instance Size Bytes allocated ...
...hoo.txt Tue Aug 29 14:19:32 2000 netscape netscape.txt Tue Aug 29 14:20:14 2000 The numbers do not include malloc 'd data such as string contents. Click on a column heading to sort by that column. Click on a class name to see details for that class. ...
...:20:14 2000 The numbers do not include malloc 'd data such as string contents. Click on a column heading to sort by that column. Click on a class name to see details for that class. ...
...And 2 more matches
NSPR release procedure
As the name of the shell script implies, repackage.sh merely repackages binary distributions in a different format. Before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target. ...
...As the name of the shell script implies, repackage.sh merely repackages binary distributions in a different format. Before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target. ...
...As the name of the shell script implies, repackage.sh merely repackages binary distributions in a different format. Before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target. ...
...And 2 more matches
Running NSPR tests
NSPR has a test suite in the mozilla/nsprpub/pr/tests directory. By default, we don't build the test programs. Running gmake in the top-level directory (mozilla/nsprpub) only builds the NSPR libraries. To build the test programs, you need to change directory to mozilla/nsprpub/pr/tests and run gmake. Refer to NSPR build instructions for details. ...
... NSPR has a test suite in the mozilla/nsprpub/pr/tests directory. By default, we don't build the test programs. Running gmake in the top-level directory (mozilla/nsprpub) only builds the NSPR libraries. To build the test programs, you need to change directory to mozilla/nsprpub/pr/tests and run gmake. Refer to NSPR build instructions for details. ...
...e top-level directory (mozilla/nsprpub) only builds the NSPR libraries. To build the test programs, you need to change directory to mozilla/nsprpub/pr/tests and run gmake. Refer to NSPR build instructions for details. ...
...And 2 more matches
NSPR
Documentation About NSPR This topic describes, in general terms, the goals of NSPR and a bit about how it does it. NSPR API Reference The reference describes each API public macro, structure and function in the NSPR API. NSPR build instructions How to checkout and build from source. NSPR release process How to prepare an NSPR release. ...
... various source and binary packages, depending on your platform: Windows: Build the source package, using the NSPR build instructions. Mac: Install the MacPorts nspr package, or the Homebrew nspr package. Ubuntu: Install the libnspr4-dev package via apt-get. Debian: Install the libnspr4-dev package via apt-get. ...
...r platform: Windows: Build the source package, using the NSPR build instructions. Mac: Install the MacPorts nspr package, or the Homebrew nspr package. Ubuntu: Install the libnspr4-dev package via apt-get. Debian: Install the libnspr4-dev package via apt-get. ...
...And 2 more matches
An overview of NSS Internals
NSS is a library written in the C programming language. It's free and open source software, and many other software projects have decided to use it. ...
... a software vendor, administrators inside an organizational infrastructure, or the software user. NSS ships a predefined set of CA certificates. This set, including their trust assignments, is provided by NSS as a software module, called CKBI ("built-in root certificates"), which also implements the PKCS#11 interface. On an organizational level the contents of the set are managed according to the Mozilla CA policy. On a technical level the set is a binary software module. A cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the X.509 certs of your communication partners (peer). It's also required that you safely keep your own secret keys that belong to your own certificates. You might want to protect the storage of your secret ...
.... A file descriptor has a pointer to the first layer handling the data. That layer has a pointer to a potential second layer, which might have another pointer to a third layer, etc. Each layer defines its own functions for the open/close/read/write/poll/select (etc.) functions. When using an SSL network connection, you'll already have two layers, the basic NSPR layer and an SSL library layer. The Mozilla applications define a third layer where application specific processing is performed. You can find more details in the NSPR reference documents. NSS occassionally has to create outbound network connections, in addition to the connections requested by the application. Examples are retrieving OCSP (Online Certificate Status Protocol) information or downloading a CRL (Certificate Revocation List)...
...And 2 more matches
4.3.1 Release Notes
ed to perform. Some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care. NSS/JSS provides a way to specify a set of flags and a corresponding mask for these flags. see generateECKeyPairWithOpFlags see generateRSAKeyPairWithOpFlags see generateDSAKeyPairWithOpFlags Distribution Information JSS is checked into mozilla/security/jss/. The CVS tag for the JSS 4.3.1 release is JSS_4_3_1_RTM. Source tarballs are available from ftp://ftp.mozilla.org/pub/mozilla.or...-4.3.1.tar.bz2 Binary releases are no longer available on mozilla. JSS is a JNI library we provide the jss4.jar but expect you to build the JSS's matching JNI shared library. We provide the jss4.jar in case you do not want to obtain your own JCE code sig...
...vailable from ftp://ftp.mozilla.org/pub/mozilla.or...-4.3.1.tar.bz2 Binary releases are no longer available on mozilla. JSS is a JNI library we provide the jss4.jar but expect you to build the JSS's matching JNI shared library. We provide the jss4.jar in case you do not want to obtain your own JCE code signing certificate. JSS is a JCE provider and therefore the jss4.jar must be signed. ftp://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/JSS_4_3_1_RTM. Documentation Documentation for JSS 4.3.1 is available as follows: Build Instructions for JSS 4.3.1 Javadoc [online] [zipped] Read the instructions on using JSS. ...
... Platform Information You can check out the source from CVS by cvs co -r JSS_4_3_1_RTM JSS JSS 4.3.1 works with JDK versions 4 or higher we suggest the latest. ...
...And 2 more matches
NSS_3.11.10_release_notes.html
NSS 3.11.10 Release Notes 2008-12-10 Newsgroup: <ahref="news: mozilla.dev.tech.crypto"="" news.mozilla.org="">mozilla.dev.tech.crypto</ahref="news:> Contents Introduction Distribution Information Bugs Fixed Documentation Compatibility Feedback Introduction Network Security Services (NSS) 3.11.10 is a patch release for NSS 3.11. The bug fixes in NSS 3.11.10 are described in the "Bugs Fixed" section below. Distribution Information The CVS tag for the NSS 3.11.10 release is NSS_3_11_10_RTM. NSS 3.11.10 requires NSPR 4.7.1. See the Documentation section for the build instructions. ...
...etwork Security Services (NSS) 3.11.10 is a patch release for NSS 3.11. The bug fixes in NSS 3.11.10 are described in the "Bugs Fixed" section below. Distribution Information The CVS tag for the NSS 3.11.10 release is NSS_3_11_10_RTM. NSS 3.11.10 requires NSPR 4.7.1. See the Documentation section for the build instructions. NSS 3.11.10 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_10_RTM/src/. Binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_10_RTM/. Both debug and optimized builds are provided. Go to the subdirectory for your platform, DBG (debug) or OPT (optimized), to get the tar.gz or zip file. The ta...
...The tar.gz or zip file expands to an nss-3.11.10 directory containing three subdirectories: include - NSS header files lib - NSS shared libraries bin - NSS Tools and test programs You also need to download the NSPR 4.7.1 binary distributions to get the NSPR 4.7.1 header files and shared libraries, which NSS 3.11.10 requires. NSPR 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/. Bugs Fixed The following bugs have been fixed in NSS 3.11.10. Bug 291384: certutil -K behavior doesn't match usage Bug 374247: modutil -disable command not disabling modules' slots Bug 384459: Certification path validation fails when Authority Key Identifier extension contains key identifier Bug 385946: Can't import certificate into cert datab...
...And 2 more matches
NSS_3.12.1_release_notes.html
NSS 3.12.1 Release Notes 2008-09-05 Newsgroup: mozilla.dev.tech.crypto Contents Introduction Distribution Information New in NSS 3.12.1 Bugs Fixed Documentation Compatibility Feedback Introduction Network Security Services (NSS) 3.12.1 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.1 are described in the "Bugs Fixed" section below. NSS 3.12.1 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.1 release is NSS_3_12_1_RTM. NSS 3.12.1 requires NSPR 4.7.1. See the Documentation section for the build instructions. ...
...for NSS 3.12. The bug fixes in NSS 3.12.1 are described in the "Bugs Fixed" section below. NSS 3.12.1 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.1 release is NSS_3_12_1_RTM. NSS 3.12.1 requires NSPR 4.7.1. See the Documentation section for the build instructions. NSS 3.12.1 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_1_RTM/src/. Binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_1_RTM/. Both debug and optimized builds are provided. Go to the subdirectory for your platform, DBG (debug) or OPT (optimized), to get the tar.gz or zip file. The tar.
.... The tar.gz or zip file expands to an nss-3.12.1 directory containing three subdirectories: include - NSS header files lib - NSS shared libraries bin - NSS Tools and test programs You also need to download the NSPR 4.7.1 binary distributions to get the NSPR 4.7.1 header files and shared libraries, which NSS 3.12.1 requires. NSPR 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/. New in NSS 3.12.1 New functions in the nss shared library: CERT_NameToAsciiInvertible (see cert.h) Convert an CERTName into its RFC1485 encoded equivalent. Returns a string that must be freed with PORT_Free(). Caller chooses encoding rules. CERT_EncodeSubjectKeyID (see cert.h) Encode Certificate SKID (Subject Key ID) extension. PK11_GetAllSlotsForCe...
...And 2 more matches
NSS_3.12.2_release_notes.html
NSS 3.12.2 Release Notes 2008-10-20 Newsgroup: mozilla.dev.tech.crypto Contents Introduction Distribution Information New in NSS 3.12.2 Bugs Fixed Documentation Compatibility Feedback Introduction Network Security Services (NSS) 3.12.2 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.2 are described in the "Bugs Fixed" section below. NSS 3.12.2 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.2 release is NSS_3_12_2_RTM. NSS 3.12.2 requires NSPR 4.7.1. See the Documentation section for the build instructions. ...
...for NSS 3.12. The bug fixes in NSS 3.12.2 are described in the "Bugs Fixed" section below. NSS 3.12.2 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.2 release is NSS_3_12_2_RTM. NSS 3.12.2 requires NSPR 4.7.1. See the Documentation section for the build instructions. NSS 3.12.2 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_2_RTM/src/. Binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_2_RTM/. Both debug and optimized builds are provided. Go to the subdirectory for your platform, DBG (debug) or OPT (optimized), to get the tar.gz or zip file. The tar.
... The tar.gz or zip file expands to an nss-3.12.2 directory containing three subdirectories: include - NSS header files lib - NSS shared libraries bin< - NSS Tools and test programs You also need to download the NSPR 4.7.1 binary distributions to get the NSPR 4.7.1 header files and shared libraries, which NSS 3.12.2 requires. NSPR 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/. New in NSS 3.12.2 New functions in the nss shared library: SEC_PKCS12AddCertOrChainAndKey (see p12.h) New PKCS11 errors (see secerr.h) SEC_ERROR_PKCS11_GENERAL_ERROR SEC_ERROR_PKCS11_FUNCTION_FAILED SEC_ERROR_PKCS11_DEVICE_ERROR Bugs Fixed The following bugs have been fixed in NSS 3.12.2. Bug 200704: PKCS11: invalid session handle 0 Bu...
...And 2 more matches
NSS 3.12.6 release notes
NSS 3.12.6 release notes 2010-03-03 Newsgroup: mozilla.dev.tech.crypto Introduction Network Security Services (NSS) 3.12.6 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.6 are described in the "Bugs Fixed" section below. NSS 3.12.6 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.6 release is NSS_3_12_6_RTM. NSS 3.12.6 requires NSPR 4.8.4. See the Documentation section for the build instructions. ...
...ugs Fixed" section below. NSS 3.12.6 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.6 release is NSS_3_12_6_RTM. NSS 3.12.6 requires NSPR 4.8.4. See the Documentation section for the build instructions. ...
.../LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.6 release is NSS_3_12_6_RTM. NSS 3.12.6 requires NSPR 4.8.4. See the Documentation section for the build instructions. NSS 3.12.6 source and binary distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_6_RTM/src/. You also need to download the NSPR 4.8.4 binary distributions to get the NSPR 4.8.4 header files and shared libraries, which NSS 3.12.6 requires. NSPR 4.8.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.4/. New in NSS 3.12.6 S...
...And 2 more matches
NSS 3.15.2 release notes
Users are encouraged to upgrade immediately. ...
...Users are encouraged to upgrade immediately. ...
...Users are encouraged to upgrade immediately. ...
...And 2 more matches
NSS 3.26 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.26, which is a minor release. Distribution information The hg tag is NSS_3_26_RTM. NSS 3.26 requires Netscape Portable Runtime (NSPR) 4.12 or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.26, which is a minor release. Distribution information The hg tag is NSS_3_26_RTM. NSS 3.26 requires Netscape Portable Runtime (NSPR) 4.12 or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.26, which is a minor release. Distribution information The hg tag is NSS_3_26_RTM. NSS 3.26 requires Netscape Portable Runtime (NSPR) 4.12 or newer. ...
...And 2 more matches
NSS 3.29 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.29, which is a minor release. Distribution information The hg tag is NSS_3_29_RTM. NSS 3.29 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.29, which is a minor release. Distribution information The hg tag is NSS_3_29_RTM. NSS 3.29 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.29, which is a minor release. Distribution information The hg tag is NSS_3_29_RTM. NSS 3.29 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. ...
...And 2 more matches
NSS 3.34 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.34, which is a minor release. Distribution information The hg tag is NSS_3_34_RTM. NSS 3.34 requires Netscape Portable Runtime (NSPR) 4.17, or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.34, which is a minor release. Distribution information The hg tag is NSS_3_34_RTM. NSS 3.34 requires Netscape Portable Runtime (NSPR) 4.17, or newer. ...
... Introduction The Network Security Services (NSS) team has released NSS 3.34, which is a minor release. Distribution information The hg tag is NSS_3_34_RTM. NSS 3.34 requires Netscape Portable Runtime (NSPR) 4.17, or newer. ...
...And 2 more matches
NSS 3.37 release notes
An issue where NSS erroneously accepted HRR requests was resolved. ...
... An issue where NSS erroneously accepted HRR requests was resolved. ...
... An issue where NSS erroneously accepted HRR requests was resolved. ...
...And 2 more matches
NSS 3.44.3 release notes
ices (NSS) 3.44.3 is a patch release for NSS 3.44. The bug fixes in NSS 3.44.3 are described in the "Bugs Fixed" section below. It was released on 19 November 2019. The NSS team would like to recognize first-time contributors: Craig Disselkoen Distribution Information The HG tag is NSS_3_44_3_RTM. NSS 3.44.3 requires NSPR 4.21 or newer. ...
... 3.44.3 are described in the "Bugs Fixed" section below. It was released on 19 November 2019. The NSS team would like to recognize first-time contributors: Craig Disselkoen Distribution Information The HG tag is NSS_3_44_3_RTM. NSS 3.44.3 requires NSPR 4.21 or newer. ...
...ribed in the "Bugs Fixed" section below. It was released on 19 November 2019. The NSS team would like to recognize first-time contributors: Craig Disselkoen Distribution Information The HG tag is NSS_3_44_3_RTM. NSS 3.44.3 requires NSPR 4.21 or newer. ...
...And 2 more matches
NSS 3.48 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.48 on 5 December 2019, which is a minor release. The NSS team would like to recognize first-time contributors: Craig Disselkoen Giulio Benetti Lauri Kasanen Tom Prince Distribution Information The HG tag is NSS_3_48_RTM. NSS 3.48 requires NSPR 4.24 or newer. NSS 3.48 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_48_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.48 TLS 1.3 is the default maximum TLS version. See Bug 1573118 for details. TLS extended master secret is enabled by default, where possible. See Bug 1575411 for details. The master pas...
...fter HelloRetryRequest Bug 1596450 - Added a simplified and unified MAC implementation for HMAC and CMAC behind PKCS#11 Bug 1522203 - Remove an old Pentium Pro performance workaround Bug 1592557 - Fix PRNG known-answer-test scripts Bug 1586176 - EncryptUpdate should use maxout not block size (CVE-2019-11745) Bug 1593141 - add `notBefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::TrustDomain::CheckRevocation Bug 1591363 - Fix a PBKDF2 memory leak in NSC_GenerateKey if key length > MAX_KEY_LEN (256) Bug 1592869 - Use ARM NEON for ctr_xor Bug 1566131 - Ensure SHA-1 fallback disabled in TLS 1.2 Bug 1577803 - Mark PKCS#11 token as friendly if it implements CKP_PUBLIC_CERTIFICATES_TOKEN Bug 1566126 - POWER GHASH Vector Acceleration Bug 1589073 - Use of new PR_ASSE...
...xor Bug 1566131 - Ensure SHA-1 fallback disabled in TLS 1.2 Bug 1577803 - Mark PKCS#11 token as friendly if it implements CKP_PUBLIC_CERTIFICATES_TOKEN Bug 1566126 - POWER GHASH Vector Acceleration Bug 1589073 - Use of new PR_ASSERT_ARG in certdb.c Bug 1590495 - Fix a crash in PK11_MakeCertFromHandle Bug 1591742 - Ensure DES IV length is valid before usage from PKCS#11 Bug 1588567 - Enable mozilla::pkix gtests in NSS CI Bug 1591315 - Update NSC_Decrypt length in constant time Bug 1562671 - Increase NSS MP KDF default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage Bug 1590972 - Use -std=c99 rather than -std=gnu99 Bug 1590676 - Fix build if ARM doesn't support NEON Bug 1575411 - Enable TLS extended master secret by default Bug 1590970 - SSL_S...
...And 2 more matches
NSS 3.56 release notes
Notable Changes in NSS 3.56 NSPR dependency updated to 4.28. ...
... Notable Changes in NSS 3.56 NSPR dependency updated to 4.28. ...
... Notable Changes in NSS 3.56 NSPR dependency updated to 4.28. ...
...And 2 more matches
Migration to HG
Each project now lives in its own separate space, they can be found at: https://hg.mozilla.org/projects/nspr/ https://hg.mozilla.org/projects/nss/ https://hg.mozilla.org/projects/jss/ https://hg.mozilla.org/projects/python-nss/ This migration has been used as an opportunity to change the layout of the source directories. For NSPR, "mozilla/nsprpub" has been removed from the directory hierarchy, all files now live in the top directory of the NSPR repository. Likewise for NSS and JSS, "mozilla/security" has been removed and files now live at the top level. ...
... Besides the new layout, the build system hasn't changed. Most parts of the NSS build instructions remain valid, especially the instructions about setting environment variables. ...
... Besides the new layout, the build system hasn't changed. Most parts of the NSS build instructions remain valid, especially the instructions about setting environment variables. ...
...And 2 more matches
certutil
environment variable to sql: export NSS_DEFAULT_DB_TYPE="sql" This line can be set added to the ~/.bashrc file to make the change permanent. Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: o https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: o https://wiki.mozilla.org/NSS_Shared_DB See Also pk12util (1) modutil (1) certutil has arguments or operations that use features defined in several IETF RFCs. o http://tools.ietf.org/html/rfc5280 o http://tools.ietf.org/html/rfc1113 ...
...red_DB See Also pk12util (1) modutil (1) certutil has arguments or operations that use features defined in several IETF RFCs. o http://tools.ietf.org/html/rfc5280 o http://tools.ietf.org/html/rfc1113 o http://tools.ietf.org/html/rfc1485 The NSS wiki has information on the new database design and how to configure applications to use it. ...
... certutil has arguments or operations that use features defined in several IETF RFCs. o http://tools.ietf.org/html/rfc5280 o http://tools.ietf.org/html/rfc1113 o http://tools.ietf.org/html/rfc1485 The NSS wiki has information on the new database design and how to configure applications to use it. ...
...And 2 more matches
NSS tools : pk12util
environment variable to sql: export NSS_DEFAULT_DB_TYPE="sql" This line can be set added to the ~/.bashrc file to make the change permanent. Most applications do not use the shared database by default, but they can be configured to use them. ...
...ost applications do not use the shared database by default, but they can be configured to use them. ...
...new shared NSS databases: o https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: o https://wiki.mozilla.org/NSS_Shared_DB See Also certutil (1) modutil (1) The NSS wiki has information on the new database design and how to configure applications to use it. o https://wiki.mozilla.org/NSS_Shared_DB_Howto o https://wiki.mozilla.org/NSS_Shared_DB Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. ...
...And 2 more matches
NSS tools : signver
Mozilla › Projects › NSS › tools › signver
environment variable to sql: export NSS_DEFAULT_DB_TYPE="sql" This line can be set added to the ~/.bashrc file to make the change permanent. Most applications do not use the shared database by default, but they can be configured to use them. ...
...ost applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: o https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: o https://wiki.mozilla.org/NSS_Shared_DB See Also signtool (1) The NSS wiki has information on the new database design and how to configure applications to use it. ...
... o https://wiki.mozilla.org/NSS_Shared_DB_Howto For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: o https://wiki.mozilla.org/NSS_Shared_DB See Also signtool (1) The NSS wiki has information on the new database design and how to configure applications to use it. o Setting up the shared NSS database https://wiki.mozilla.org/NSS_Shared_DB_Howto o Engineering and technical information about the shared NSS database https://wiki.mozilla.org/NSS_Shared_DB Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releas...
...And 2 more matches
SpiderMonkey 17
You can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (MD5 checksum: 20b6f8f1140ef6e47daa3b16965c9202). ...
... These release notes are an incomplete draft and were initially seeded from the (now-defunct) 1.8.8 release notes, which were themselves seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to SpiderMonkey 17. The Mozilla JavaScript team is pleased to announce the release of SpiderMonkey 17. You can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (MD5 checksum: 20b6f8f1140ef6e47daa3b16965c9202). SpiderMonkey 17 is the JavaScript engine that shipped in Firefox 17. It continues to improve performance over previous SpiderMonkey releases, with ongoing JIT compilation work and with the introduction of type inference to enable faster JITted code. It also contains new language and API features described in det...
...erMonkey 17 is the JavaScript engine that shipped in Firefox 17. It continues to improve performance over previous SpiderMonkey releases, with ongoing JIT compilation work and with the introduction of type inference to enable faster JITted code. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. -- 25 March 2013 Platform support SpiderMonkey 17 is supported on all the platforms where Firefox 17 runs. SpiderMonkey 17 includes a just-in-time compiler (JIT) that compiles JavaScript to machine code, for a significant speed increase. It is supported on x86, x86_64, and ARM a...
...And 2 more matches
SpiderMonkey 24
You can download full source code here: https://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2 (SHA1: ce779081cc11bd0c871c6f303fc4a0091cf4fe66) SpiderMonkey 24 is the JavaScript engine that shipped in Firefox 24. ...
... These release notes are an incomplete draft and were initially seeded from the SpiderMonkey 17 release notes, so they're not necessarily complete or fully accurate. The Mozilla JavaScript team is pleased to announce the release of SpiderMonkey 24. You can download full source code here: https://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2 (SHA1: ce779081cc11bd0c871c6f303fc4a0091cf4fe66) SpiderMonkey 24 is the JavaScript engine that shipped in Firefox 24. ...
...fe66) SpiderMonkey 24 is the JavaScript engine that shipped in Firefox 24. It continues to improve performance over previous SpiderMonkey releases, with a significantly improved garbage collector, a new JIT compilation mode, and other features. It also contains new language and API features described in detail below. ...
...And 2 more matches
TPS Tests
TPS is an end to end test for Sync. It's name stands for Testing and Profiling tool for Sync (which is a misnomer, since it doesn't do any profiling), and it should not be confused with the similarly named tests in Talos. TPS consists of a Firefox extension of the same name, along with a python test runner, both of which live inside mozilla-central. The python test runner will read a test file (in JavaScript format), setup one or more Firefox profiles with the necessary extensions and preferences, then launch Firefox and pass the test file to the extension. The extension will read the test file and perform a series of actions specified therein, such as populating a set of bookmarks, syncing to the Sync server, making bookmark modifications, etc. A test file may contain an arbitrary numb...
...l, do not use your personal firefox account, as TPS will delete and replace the data in it many times, not to mention the first run is 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. ...
...e and replace the data in it many times, not to mention the first run is 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. ...
...And 2 more matches
Mork
Mozilla › Tech › Mork
Mork Structure Mork is a schema-less database format. ...
...Mork Structure Mork is a schema-less database format. ...
...Mork Structure Mork is a schema-less database format. ...
...And 2 more matches
Generating GUIDs
Add-ons can (and should) be identified with IDs of the form extensionname@organization.tld since Firefox 1.5. Warning: If you just want an ID for your add-on, generating a GUID is almost definitely not what you want to do. Using the extensionname@organization.tld form is approximately one thousand times easier for everyone involved. Don't have a domain name? Do you have a blog on a subdomain? Use that. If all else fails, using extensionname@yourusername.addons.mozilla.org should be fine; no one will care. ...
...me@organization.tld since Firefox 1.5. Warning: If you just want an ID for your add-on, generating a GUID is almost definitely not what you want to do. Using the extensionname@organization.tld form is approximately one thousand times easier for everyone involved. Don't have a domain name? Do you have a blog on a subdomain? Use that. If all else fails, using extensionname@yourusername.addons.mozilla.org should be fine; no one will care. Remember, these are identifiers, not e-mail addresses, and they're never resolved. Canonical form The common form of a GUID is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x stands for a hexadecimal digit. There are a number of tools that can be used to generate a GUID in the canonical form. Note: If you do choose to use an email-style ID for your ad...
...xxxx-xxxx-xxxxxxxxxxxx, where each x stands for a hexadecimal digit. There are a number of tools that can be used to generate a GUID in the canonical form. Note: If you do choose to use an email-style ID for your add-on, you probably don't want it to be a real email address, since it might attract spam. Online tools Generate GUID Online UUID (GUID) Generator on the WEB UUID Generator for Mozilla Code (both IDL and C++.h forms) You can get a GUID from one of the bots (such as botbot, firebot) on #firefox IRC channel by /msging "uuid" to them. Windows Windows users can use the GuidGen tool from Microsoft to obtain a GUID. (This tool is also part of MS Visual C++) Linux Use /usr/bin/uuidgen. This can be found in package uuid-runtime (Debian). Mac OS X Use /usr/bin/uuidgen. Perl ...
...And 2 more matches
How to build an XPCOM component in JavaScript
as possible. Implementation This example component will expose a single method, which returns the string "Hello World!". Defining the Interface If you want to use your component in other XPCOM components, you must define the interfaces that you want exposed. If you want to use your component only from JavaScript, you can skip to the next section. There are many interfaces already defined in Mozilla applications, so you may not need to define a new one. You can browse existing XPCOM interfaces at various locations in the Mozilla source code, or using XPCOMViewer, a GUI for browsing registered interfaces and components. You can download an old version of XPCOMViewer that works with Firefox 1.5 from mozdev mirrors. If an interface exists that meets your needs, then you do not need to write an...
... "nsISupports.idl" [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-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 downl...
...tions. 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 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.
...And 2 more matches
An Overview of XPCOM
epts, and terminology of the XPCOM component model along the way. This chapter provides a quick tour of XPCOM - an introduction to the basic concepts and technologies in XPCOM and component development. The brief sections in this chapter introduce the concepts at a very high level, so that we can discuss and use them with more familiarity in the tutorial itself, which describes the creation of a Mozilla component called WebLock. The XPCOM Solution The Cross Platform Component Object Module (XPCOM) is a framework which allows developers to break up monolithic software projects into smaller modularized pieces. These pieces, known as components, are then assembled back together at runtime. The goal of XPCOM is to allow different pieces of software to be developed and built independently of one a...
...able 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 components. They are usually contained in reusable binary libraries (a DLL on Windows, for example, or a DSO on Unix), which can include one or more components. When two or more related components are grouped together in a binary library, the library is referred to as a module. Modular, compon...
...mance When code is modularized, modules that are not necessary right away can be "lazy loaded", or not loaded at all, which can improve the performance of your application. Maintenance Even when you are not updating a component, designing your application in a modular way can make it easier for you to find and maintain the parts of the application that you are interested in. Mozilla has over four million lines of code, and no single individual understands the entire codebase. The best way to tackle a project of this size is to divide it into smaller, more manageable pieces, use a component programming model, and to organize related sets of components into modules. The network library, for example, consists of components for each of the protocols, HTTP, FTP, and others, which...
...And 2 more matches
Starting WebLock
focus on the functionality that actually handles the web locking. Getting Called at Startup No person is an island to himself, and neither are components. The sample component you'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 event...
...ree(previous); // free the memory the replaced value might have used The unregistration, which should occur in the unregistration callback, looks like this: rv = catman->DeleteCategoryEntry("xpcom-startup", "WebLock", PR_TRUE); // persist A complete code listing for registering WebLock as a startup observer follows: #define MOZILLA_STRICT_API #include "nsIGenericFactory.h" #include "nsCOMPtr.h" #include "nsXPCOM.h" #include "nsIServiceManager.h" #include "nsICategoryManager.h" #include "nsMemory.h" #include "nsIObserver.h" #include "nsEmbedString.h" #define WebLock_CID \ { 0x777f7150, 0x4a2b, 0x4301, \ { 0xad, 0x10, 0x5e, 0xab, 0x25, 0xb3, 0x22, 0xaa}} #define WebLock_ContractID "@dougt/weblock" class WebLock: publi...
... linkjavadoc style HTML documentation. Defining the Weblock Interface in XPIDL Most interfaces in the XPCOM world are described in XPIDL. The XPIDL file for the iWebLock interface can be used to generate the C++ header file, which you'll need to implement the interface in the component and also a type library that makes the component accessible from JavaScript or other interpreted languages. In Mozilla, JavaScript is the bridge between components and the XUL-based user interface. The XPIDL Syntax The XPIDL syntax is a mix of C++ and Java, and of course it's very much like the OMG IDL upon which it is closely based. The XPIDL for iWebLock appears below: iWebLock #include "nsISupports.idl" interface nsISimpleEnumerator; [scriptable, uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)] interface iWebloc...
...And 2 more matches
XPCOM guide
Mozilla › Tech › XPCOM › Guide
These articles provide tutorials and usage documentation for XPCOM, including how to use it in your own projects and how to build XPCOM components for your Firefox add-ons and the like. Avoiding leaks 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. This document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common JavaScript patterns that cause leaks.Creating XPCOM componentsThis guide is about Gecko, and about creating XPCOM components for Gecko-based applications.How to build an XPCOM component in JavaScriptIf you are looking for Add-on SDK solution for XPCOM JavaScript components the...
...ces map to abstract classes in C++, a common problem when dealing with IDL is when you have an IDL inheritance hierarchy, and a corresponding C++ implementation hierarchy, you run into multiple inheritance. That's not inherently multiple inheritance, though, because you only mix in interfaces (i.e. the problem would not exist with Java's interfaces).Making cross-thread calls using runnablesIn the Mozilla platform, most activities such as layout, DOM operations, content JavaScript, and chrome JavaScript run on the main thread. However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread.Mozilla internal string guideMost of the Mozilla code uses a C++ class hierarchy to pass string data, rather than using raw pointers. This guide documents the string classes which a...
...h as layout, DOM operations, content JavaScript, and chrome JavaScript run on the main thread. However, it may be useful for C++ code in the Mozilla platform to run tasks on another thread.Mozilla internal string guideMost of the Mozilla code uses a C++ class hierarchy to pass string data, rather than using raw pointers. This guide documents the string classes which are visible to code within the Mozilla codebase (code which is linked into libxul). mozilla::services namespaceThe services C++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect XPCOM approach: GetService(), CallGetService(), etc methods are expensive and should be avoided when possible.Receiving startup notificationsSometimes it's necessary for XPCOM components to receive notif...
...And 2 more matches
Introduction to XPCOM for the DOM
ce nsIFoo. You can manipulate the nsFoo object directly through fooptr, however your code will not be very robust. Indeed, if someone decides to change the name or the signature of the methods you use, you will have to change all the calls to those methods throughout your code. As opposed to a concreate class, an interface is supposed to be more stable through time. Indeed, many interfaces in the Mozilla code are frozen (this is indicated by the comment @Frozen at the beginning of the interface definition). That means that the interface will never change anymore. The good thing is that your code will (in the best condition) last forever. The bad thing is that we have to find a way to improve those interfaces, and freezing them obliges implementers to create new interfaces. In summary, manipulate ...
...ever, ifooptr does not give you access to that function, since it is a pointer to nsIFoo, for the reasons mentioned in Section 1.B. XPCOM provides a handy method to get a pointer to an interface when you have a pointer to another interface, and both interfaces are implemented by the same object. This method is QueryInterface(). It is defined on the nsISupports interface. Every single interface in Mozilla inherits from nsISupports. This is one of the main rules of XPCOM. The goal is the following: find out whether an object (an instance of a class) implements a given interface. This is what QueryInterface() does. You pass an interface and the address of a pointer to store the interface to QueryInterface(). If the interface is implemented by the object, the pointer passed in will be assigned to the...
...use of XPCOM and nsCOMPtr's described until now covers about 80% of what you need to know to read the code, and even write some. I could go on about do_GetService, explain the implementation of QueryInterface, etc, but I feel this is not worth the trouble. For the more advanced topics of XPCOM, please see the XPCOM project page. The next section is a tutorial on how to add a new interface to the Mozilla DOM, with build instructions et al, and the last section is a discussion of the more advanced topics of object-oriented C++ , interface inheritance, and other fun stuff. Tutorial : How to add a new interface Introduction The purpose of this tutorial is to describe the process of adding a new interface to the DOM and then implementing it. A good understanding of the previous sections is preferr...
...And 2 more matches
Components.classes
u should use the in operator to test for the element before trying to access it: if (!("@some/bogus/class;1" in Components.classes)) // do something... The properties of the Components.classes object can be enumerated using a for...in loop. Usage In order to retrieve the object for a given ContractID, you can query the Components.classes array as follows: var clazz0 = Components.classes["@mozilla.org/messenger;1"]; clazz0 is the class object for the ContractID @mozilla.org/messenger;1, which is not usually used by itself, but whose createInstance and getService methods can be used to create a new instance of the component or to access the singleton instance, if the contract ID represents a service. A new XPCOM component instance can be created from the returned class object as follows:...
...he class object for the ContractID @mozilla.org/messenger;1, which is not usually used by itself, but whose createInstance and getService methods can be used to create a new instance of the component or to access the singleton instance, if the contract ID represents a service. ...
...te a new instance of the component or to access the singleton instance, if the contract ID represents a service. A new XPCOM component instance can be created from the returned class object as follows: var obj = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); which is a shortcut to var obj = Components.classes["@mozilla.org/supports-array;1"] .createInstance(); obj.QueryInterface(Components.interfaces.nsISupportsArray); If you don't provide a specific interface to createInstance(), it will return an XPConnect wrapper for the component, which only exposes the methods of the nsISupports interface (and under certain circumstances the special wrappedJSObject property). To access a service (a ...
...And 2 more matches
HOWTO
Async network requests Problem You want to make network requests or do other asynchronous work in xpcshell. However, when you start your script, it exits immediately, before the network request returns. Solution 1. Put the following at the end of your script: // Do async processing // From <https://developer.mozilla.org/en/XPConnect/xpcshell/HOWTO> print("Doing async work"); gScriptDone = false; var gThreadManager = Cc["@mozilla.org/thread-manager;1"] .getService(Ci.nsIThreadManager); var mainThread = gThreadManager.currentThread; while (!gScriptDone) mainThread.processNextEvent(true); while (mainThread.hasPendingEvents()) mainThread.processNextEvent(true); 2. In all callbacks where your script is finished, i.e. both success and error callbacks, put: gScriptDone = true; If you f...
...les/gloda/log4moz.js"); However, you get (for that particular line, which is the first import): uncaught exception: [Exception... ...
...1 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file.js :: <TOP_LEVEL> :: line 12" data: no] Solution 1 var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); loader.loadSubScript("chrome://myall/content/file.jsm"); See: http://mxr.mozilla.org/comm-central/...figUtils.js#54 Solution 2 Append the following at the top of your JS file which you want to run in xpcshell { // <https://developer.mozilla.org/en/XPConnect/xpcshell/HOWTO> // <https://bugzilla.mozilla.org/show_bug.cgi?id=546628> let Cc = Components.classes; let Ci = Components.interfaces; // Register resource://app/ URI let ios = Cc["@mozilla.org/network/io-servi...
...And 2 more matches
nsIAlertsService
here 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. ...
...m 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. ...
...owsing Optional Controls the image loading behavior. If true, the image URL will be loaded in private browsing mode. Exceptions thrown NS_ERROR_NOT_AVAILABLE Unable to display the notification; this may happen, for example, on Mac OS X if Growl is not installed. Example Simple usage The following code was used to display the above notification. var alertsService = Components.classes["@mozilla.org/alerts-service;1"]. getService(Components.interfaces.nsIAlertsService); try { alertsService.showAlertNotification("chrome://mozapps/skin/downloads/downloadIcon.png", "Alert title", "Alert text goes here.", false, "", null, ""); } catch (e) { // This can fail on Mac OS X } Listening for call...
...And 2 more matches
nsICommandLineHandler
handler is registered in the category "command-line-handler". 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". ...
...ry 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". ...
...D implementing this interface. By convention, handlers with ordinary priority should begin with "m". ...
...And 2 more matches
nsIFileView
e 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. Currently no other file stats are implemented. ...
... 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. Currently no other file stats are implemented. The nsIFileView provides a configuration interface to @mozilla.org/filepicker/fileview;1 , which also implements nsITreeView so that it can be passed as a tree view. Implemented by: @mozilla.org/filepicker/fileview;1. ...
... is "LastModifiedColumn" it will return the date of last modification. Currently no other file stats are implemented. The nsIFileView provides a configuration interface to @mozilla.org/filepicker/fileview;1 , which also implements nsITreeView so that it can be passed as a tree view. Implemented by: @mozilla.org/filepicker/fileview;1. To create an instance, use: var fileView = Components.classes["@mozilla.org/filepicker/fileview;1"] .createInstance(Components.interfaces.nsIFileView); Method overview void setDirectory(in nsIFile directory); void setFilter(in AString filterString); void sort(in short sortType, in boolean reverseSort); Attributes Attribute Type Description reverseSort boolean If true results will be sorted in ascending order. Read only. selectedFiles ...
...And 2 more matches
nsIPushService
messages from remote servers. Inherits from: nsISupports Last changed in Gecko 46.0 (Firefox 46.0 / Thunderbird 46.0 / SeaMonkey 2.43) Push lets a remote server send payloads to a web site, add-on, or component running in the browser. nsIPushService supports the Push API implementation in Firefox, and can be used directly from privileged code to create system subscriptions. ...
...46.0 (Firefox 46.0 / Thunderbird 46.0 / SeaMonkey 2.43) Push lets a remote server send payloads to a web site, add-on, or component running in the browser. nsIPushService supports the Push API implementation in Firefox, and can be used directly from privileged code to create system subscriptions. ...
.... Privileged code should pass the system principal. callback The callback to call when the nsIPushSubscription is created. Passing the system principal exempts the subscription from permission checks and background messages quotas, which are enforced for service worker subscriptions. ...
...And 2 more matches
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. ...
...SocketTransportService.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. ...
... 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 .... ...
...And 2 more matches
nsISupports proxies
oxies A proxy, in this context, is a stub object which enables a method of any class which is derived from nsISupports and has a typelib to be called on any in-process thread. The main reason for nsISupports Proxies is that JavaScript and UI are on a single thread. When one is busy, the other is blocked. A good example of this is the old install.js scripts that were used in XPInstall in older Mozilla versions. They from the majority of JavaScript code, which is small and can be quickly run. XPInstall installation scripts are sometimes very complex and can require long execution time due to unzipping or native file system actions. If XPInstall ran on the UI thread, the product would appear frozen until the script was complete. This is definitely bad. Because of this, XPInstall was moved to its...
.... This is definitely bad. Because of this, XPInstall was moved to its own thread. Now XPInstall can do its installations while the product renders, but now XPInstall can not access UI elements such as a progress meter or a confirmation dialog. How can a separate non-UI thread act as if it was on the UI thread? Herein lays the utility of nsISupports Proxies. I believe that other people working on Mozilla need similar solutions. In this document, I will try to explain how to use nsISupports Proxies. How do I use it? The API has changed in Mozilla 1.9, but the prose below hasn't been updated yet. See xpcom/proxy/public/nsIProxyObjectManager.idl for the updated interface and its documentation. See also . From a users point of view, you need only to look at the nsIProxyObjectManager. It has two ...
...u. This creation will happen off the destination's event queue. For instance, if you need to not only use an object remotely, but also have it created remotely, use the second API. The IID that you are requesting must be in the typelib. These means that you should have had to create and IDL for it and have generated a typelib. If you haven't, or you've never heard of these things, see http://www.mozilla.org/scriptable/ . The proxyType parameter can be either two flags: PROXY_SYNC or PROXY_ASYNC. These two flags can also be ORed with PROXY_ALWAYS. PROXY_ALWAYS will ensure that a proxy object is always created no matter what thread you currently are on. If this flag is not specified, the Proxy Object Manager will compare the eventQ which you pass to the eventQ which is on the current thread. If ...
...And 2 more matches
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. ...
...t.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. ...
...icitly dictating whether the operation should be considered private for the purposes of network requests, caching, etc. All arguments and exceptions are identical to saveURI, with the exception of aIsPrivate which is used to indicate the private nature of the operation. ...
...And 2 more matches
nsIXMLHttpRequest
Obsolete since Gecko 60 (Firefox 60 / Thunderbird 60 / SeaMonkey 2.57)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. 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. The interface definition: //github.com/RealityRipple/UXP/blob/master/dom/xhr/nsIXMLHttpRequest.idl Elevated Privileges As mentioned in the "Non-Standard Properties" the property of channel was read-only...
... set nsiRequest - Constants in the xhr.channel.loadFlags. For instance, as done in Example 2, the flag of LOAD_ANONYMOUS is added, this strips all user data (cookies, tokens, etc). Using event handlers from native code (Not sure if it's up-to-date) From native code, the way to set up onload and onerror handlers is a bit different. Here is a comment from Johnny Stenback <jst@netscape.com>: The mozilla implementation of nsIXMLHttpRequest implements the interface nsIDOMEventTarget and that's how you're supported to add event listeners. Try something like this: nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(myxmlhttpreq)); target->AddEventListener(NS_LITERAL_STRING("load"), mylistener, PR_FALSE) where mylistener is your event listener object that implements the interface nsIDOMEventListener...
...entListener from C++ weird things will happen too, since the result will depend on what JS happens to be on the stack when you do it.... Conclusion: Do not use event listeners on XMLHttpRequest from C++, unless you're aware of all the security implications. And then think twice about it. ...
...And 2 more matches
Xptcall Porting Status
What is this? This is a status page for the multiplatform porting of xptcall. xptcall has a FAQ and a Porting Guide. This is being maintained by John Bandhauer <jband@netscape.com>. Feel free to email me with questions or to volunteer to contribute xptcall code for any platform. Mike Shaver <shaver@mozilla.org> is the best contact regarding 'nix (Unix, Linux, Finux, etc.) ports of xptcall. Status Status Platform Contributors and <font color="red">?</font> Possible Contributors Notes <font color="white">Done</font> Win32 x86 John Bandhauer <jband@netscape.com> win32 <font color="white">Done</font> Linux x86 John Bandhauer <jband@netscape.com> Ulrich Drepper <drepper@cygnus.com> unix <font color="white">Done</font> FreeBSD and NetBSD x86 Christoph Toshok <toshok@hungry.com>, J...
...nce <rogerl@netscape.com>, Chris McAfee <mcafee@netscape.com> unix This is checked in and working. <font color="white">Done</font> Solaris Sparc v9 (64bit) Stuart Parmenter <pavlov@netscape.com>, Chris Seawood <cls@seawood.org> unix This is checked in and (pavlov claims!) working. <font color="white">Done</font> OS/2 John Fairhurst <mjf35@cam.ac.uk> I never heard exactly who did what. But mozilla has been working on OS/2 for a long time now. <font color="white">Done</font> OpenVMS Alpha Colin R. Blake <colin@theblakes.com> Colin says this is passing all the tests on OpenVMS Alpha! <font color="white">Done</font> NT Alpha bob meader <bob@guiduck.com> bob writes: Enclosed is xptcall for alpha/nt target.. It is a variation of the IRIS port (only targeted for win32). Notice the last 2 f...
... OS/2 for a long time now. <font color="white">Done</font> OpenVMS Alpha Colin R. Blake <colin@theblakes.com> Colin says this is passing all the tests on OpenVMS Alpha! <font color="white">Done</font> NT Alpha bob meader <bob@guiduck.com> bob writes: Enclosed is xptcall for alpha/nt target.. It is a variation of the IRIS port (only targeted for win32). Notice the last 2 files (the change to mozilla\xpcom\build\makefile.win and mozilla\xpcom\build) are needed because I was unable to figure how to do a "declspecexport" from the assembler ASAXP ... if some knows how to do that then those last 2 files won't be needed. I have had someone look over this code at bridge.com (the entry point to compaq/gem compiler team) and this code was given the OK. I consider it "done". This code lives in the fil...
...And 2 more matches
XPIDL
y 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 in the xpcom/base and xpcom/ds directories of the Mozilla tree. XPIDL:Syntax (Now up to date again) XPIDL syntax (Out of date) XPIDL Author's Guide (Not as out of date) Explanation of IDL semantics A full guide to the syntax can be found at XPIDL:Syntax, which is written in an ABNF form. An xpidl file is essentially just a series of declarations. At the top level, we can define typedefs, native types, or interfaces. Interfaces may furthermore c...
...Types can of course be one of the fundamental types, or any other type declared via a typedef, interface, or a native type. Native types are types which correspond to a given C++ type. Most native...
...Types can of course be one of the fundamental types, or any other type declared via a typedef, interface, or a native type. Native types are types which correspond to a given C++ type. Most native types are not scriptable:...
...And 2 more matches
XUL Overlays
Mozilla › Tech › XUL › Overlays
same ID attribute. Thus, given the following base: ... <menu id="file-menu"> <menupopup id="menu_FilePopup"> <menuitem name="New"/> <menuitem name="Open"/> <menuitem name="Save"/> <menuitem name="Close"/> </menupopup> </menu> ... And given the following overlay: <?xml version="1.0"?> <overlay id="singleItemEx" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="menu_FilePopup"> <menu id="file_menu"> <menuitem name="Super Stream Player"/> </menu> </menupopup> </overlay> The result will be: ... <menu id="file-menu"> <menupopup id="menu_FilePopup"> <menuitem name="New"/> <menuitem name="Open"/> <menuitem name="Save"/> <menuitem name="Close"/> <menuitem name="Super Stream Player...
...pup id="menu_FilePopup"> <menu id="file_menu"> <menuitem name="Super Stream Player"/> </menu> </menupopup> </overlay> The result will be: ... <menu id="file-menu"> <menupopup id="menu_FilePopup"> <menuitem name="New"/> <menuitem name="Open"/> <menuitem name="Save"/> <menuitem name="Close"/> <menuitem name="Super Stream Player"/> </menupopup> </menu> ... If you are developing a Mozilla extension, note that the ID namespace is shared by all the extensions. So, in order to avoid unpredicted behaviors you will probably benefit from using a unique prefix for the IDs of the XUL elements of your extension. For instance, you can use the name of your extension, or an abbreviation of it. Loading overlays Overlays can be loaded explicitly or dynamically. When you load an overlay explicit...
...structively overwrites the image source in the base file with a replacement. In the base file, the HTML image element points to a Netscape GIF icon: <html:img id="foo" src="netscapeImage.gif"/> In the overlay, an element with the same ID attribute specifies a different image, and that image is superimposed on top of the original Netscape image as part of the merge process: <html:img id="foo" src="mozillaImage.gif"/> When the base file references an overlay file which contains the html image element above, the new src attribute is superimposed over the original, and the Mozilla icon replaces the Netscape icon. Overlay positioning XUL overlays also support positioning of nodes. You can specify a position attribute on a node in the overlay to provide a hint for insertion into the master document. In...
...And 2 more matches
Add Option to Context Menu
Assuming this on chrome.manifest: overlay chrome://messenger/content/mailWindowOverlay.xul chrome://myext/content/thunderbird-overlay.xul Add the next in thunderbird-overlay.xul. ...
...This can be reached by addin...
...For more details see Chrome Registration. ...
...And 2 more matches
Using the Multiple Accounts API
By Alec Flett alecf@flett.org Structure Servers Identities Storage Creating new accounts SMTP Servers Appendix A: Listing of all preferences and properties Structure The account system consists of: The Account Manager (nsIMsgAccountManager): There is a single account manager in the the client, which maintains the list of accounts, servers, etc. It is also responsible for the creation of any new account-related objects. The account manager maintains the main list of Accounts. ...
... (You may have noticed that Identities 2 and 3 are shared between a few accounts...more on that later) Servers Servers are show in...
... (You may have noticed that Identities 2 and 3 are shared between a few accounts...more on that later) Servers Servers are show in the folder pane, and in ...
...And 2 more matches
Thunderbird
nkey and Postbox. Thunderbird is built on the same technical platform as the Firefox web browser. Currently one of the most popular open source email clients, it is used by tens of millions of people around the world to bring together all their email accounts, chat, newsgroup and feed reading in a familiar high-productivity environment. (From early 2007 to early 2011 Thunderbird was developed by Mozilla Messaging, a subsidiary owned by Mozilla.) Documentation Building Thunderbird Information about building Thunderbird with the comm-central repository. There's also information about how the review process works and how to use the Mozilla symbol server to help with debugging. MailNews Protocols Rough documentation about mail protocols.. Database views ...
...Database views Backend information about nsIMsgDBView and related interfaces. Thunderbird API documentation Thunderbird API documentation Extension documentation Tutorials and tips for building Thunderbird extensions View All... ...
...Tutorials and tips for building Thunderbird extensions View All... ...
...And 2 more matches
Virtualenv
virtualenv is software for isolating python package environments (e.g. import paths). It is written by Mozilla's own Ian Bicking. Creating a virtualenv installs setuptools (or optionally distribute) into the virtual environment. It is recommended that you use virtualenv for installing anything other than system software that you are working on. You will obviate the need to have access to your system packages and you won't mess up your system packages with whatever code you install into the site-packages directory of the virtualenv. site-packages should mostly be for system-installed python and not python that you are installing as a user. This page is mostly a stub for how virtualenv is used at Mozilla. For more information on virtualenv in general, see the virtualenv web site. Python ...
... and you won't mess up your system packages with whatever code you install into the site-packages directory of the virtualenv. site-packages should mostly be for system-installed python and not python that you are installing as a user. This page is mostly a stub for how virtualenv is used at Mozilla. For more information on virtualenv in general, see the virtualenv web site. Python packaging at Mozilla is covered in Python. Getting Virtualenv virtualenv is a python package. You can download it from its PyPI package page or install it with easy_install. The github virtualenv repository is maintained by the Python Packaging Authority (including Mozilla's Tarek Ziade and Ian Bicking). If you have git installed, you can clone the latest version of virtualenv: git clone git://github.com/pypa/vir...
...The virtualenv is created in ${OBJDIR}/_virtualenv and should be recreated as part of the configure step. The populate_virtualenv.py script, when invo...
...And 2 more matches
Web Console remoting - Firefox Developer Tools
his object provides methods that abstract away protocol packets, things like startListeners(), stopListeners(), etc. Protocol packets look as follows: { "to": "root", "type": "listTabs" } { "from": "root", "consoleActor": "conn0.console9", "selected": 2, "tabs": [ { "actor": "conn0.tab2", "consoleActor": "conn0.console7", "title": "", "url": "https://tbpl.mozilla.org/?tree=Fx-Team" }, // ... ] } Notice that the consoleActor is also available as a global actor. When you attach to the global consoleActor you receive all of the network requests, page errors, and the other events from all of the tabs and windows, including chrome errors and network events. This actor is used for the Browser Console implementation and for debugging remote Firefox/B2G i...
...e request argument is the same as the request object in the above example request packet. Page errors Page errors come from the nsIConsoleService. Each allowed page error is an nsIScriptError object. The pageError packet is: { "from": "conn0.console9", "type": "pageError", "pageError": { "errorMessage": "ReferenceError: foo is not defined", "sourceName": "http://localhost/~mihai/mozilla/test.js", "lineText": "", "lineNumber": 6, "columnNumber": 0, "category": "content javascript", "timeStamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } The packet is similar to nsIScriptError - for simplicity. We only removed several unneeded properties and changed how flags work. The priv...
...tor from the debugger. Console API messages come through the nsIOb serverService - the console object implementation lives in dom/base/ConsoleAPI.js. ...
...And 2 more matches
Recommended Drag Types - Web APIs
be preferred. Note: In older code, you may find text/unicode or the Text types. These are equivalent to text/plain, and will store and retrieve plain text data. Dragging Links Dragged hyperlinks should include data of two types: text/uri-list, and text/plain. Both types should use the link's URL for their data. For example: var dt = event.dataTransfer; dt.setData("text/uri-list", "https://www.mozilla.org"); dt.setData("text/plain", "https://www.mozilla.org"); As usual, set the text/plain type last, as a fallback for the text/uri-list type. Note: the URL type is uri-list with an I, not an L. To drag multiple links, separate each link inside the text/uri-list data with a CRLF linebreak. Lines that begin with a number sign (#) are comments, and should not be considered URLs. You can use comm...
... data with a CRLF linebreak. Lines that begin with a number sign (#) are comments, and should not be considered URLs. You can use comments to indicate the purpose of a URL, the title associated with a URL, or other data. The text/plain fallback for multiple links should include all URLs, but no comments. For example, this sample text/uri-list data contains two links and a comment: http://www.mozilla.org #A second link http://www.example.com When retrieving a dropped link, ensure you handle when multiple links are dragged, including any comments. For convenience, the special type URL may be used to refer to the first valid link within data for the text/uri-list type. Do not add data with the URL type -- attempting to do so will set the value of the text/uri-list type instead. var url = ...
...ed link, ensure you handle when multiple links are dragged, including any comments. For convenience, the special type URL may be used to refer to the first valid link within data for the text/uri-list type. Do not add data with the URL type -- attempting to do so will set the value of the text/uri-list type instead. var url = event.dataTransfer.getData("URL"); You may also see data with the Mozilla-specific type text/x-moz-url. If it appears, it should appear before the text/uri-list type. It holds the URLs of links followed by their titles, separated by a linebreak. For example: http://www.mozilla.org Mozilla http://www.example.com Example Dragging HTML and XML HTML content may use the text/html type. The data for this type should be serialized HTML source code. For example, it would b...
...And 2 more matches
URL() - Web APIs
Web › API › URL › URL
lative URL. If not specified, it defaults to ''. Note: You can still use an existing URL object for the base, which stringifies itself to the object's href property. Exceptions Exception Explanation TypeError url (in the case of absolute URLs) or base + url (in the case of relative URLs) is not a valid URL. ...
...ect for the base, which stringifies itself to the object's href property. Exceptions Exception Explanation TypeError url (in the case of absolute URLs) or base + url (in the case of relative URLs) is not a valid URL. ...
... Exception Explanation TypeError url (in the case of absolute URLs) or base + url (in the case of relative URLs) is not a valid URL. ...
...And 2 more matches
Window.open() - Web APIs
Web › API › Window › open
re the current url in order to compare url in the event of another call of this function. */ } </script> (...) <p><a href="http://www.spreadfirefox.com/" target="SingleSecondaryWindowName" onclick="openRequestedSinglePopup(this.href); return false;" title="This link will create a new window or will re-use an already opened one" >Promote Firefox adoption</a></p> <p><a href="http://www.mozilla.org/support/firefox/faq" target="SingleSecondaryWindowName" onclick="openRequestedSinglePopup(this.href); return false;" title="This link will create a new window or will re-use an already opened one" >Firefox FAQ</a></p> FAQ How can I prevent the confirmation message asking the user whether they want to close the window? You cannot. New windows not opened by javascript cannot as a rule ...
...indowName" onclick="openRequestedSinglePopup(this.href); return false;" title="This link will create a new window or will re-use an already opened one" >Firefox FAQ</a></p> FAQ How can I prevent the confirmation message asking the user whether they want to close the window? You cannot. New windows not opened by javascript cannot as a rule be closed by JavaScript. The JavaScript Console in Mozilla-based browsers will report the warning message: "Scripts may not close windows that were not opened by script." Otherwise the history of URLs visited during the browser session would be lost. More on the window.close() method How can I bring back the window if it is minimized or behind another window? First check for the existence of the window object reference of such window and if it exists ...
...no other reliable way. You can examine an example explaining how to use the focus() method. How do I force a maximized window? You cannot. All browser manufacturers try to make the opening of new secondary windows noticed by users and noticeable by users to avoid confusion, to avoid disorienting users. How do I turn off window resizability or remove toolbars? You cannot force this. Users with Mozilla-based browsers have absolute control over window functionalities like resizability, scrollability and toolbars presence via user preferences in about:config. Since your users are the ones who are supposed to use such windows (and not you, being the web author), the best is to avoid interfering with their habits and preferences. We recommend to always set the resizability and scrollbars presence (...
...And 2 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
r application. // Adapted from the patch for mozTCPSocket error reporting (bug 861196). const {Cc,Ci} = require("chrome"); function createTCPErrorFromFailedXHR(xhr) { let status = xhr.channel.QueryInterface(Ci.nsIRequest).status; let errType; if ((status & 0xff0000) === 0x5a0000) { // Security module const nsINSSErrorsService = Ci.nsINSSErrorsService; let nssErrorsService = Cc['@mozilla.org/nss_errors_service;1'].getService(nsINSSErrorsService); let errorClass; // getErrorClass will throw a generic NS_ERROR_FAILURE if the error code is // somehow not in the set of covered errors. try { errorClass = nssErrorsService.getErrorClass(status); } catch (ex) { //catching security protocol exception errorClass = 'SecurityProtocol'; } if (er...
...4B001E: // NS_ERROR_UNKNOWN_HOST, network(30) errName = 'DomainNotFoundError'; break; case 0x804B0047: // NS_ERROR_NET_INTERRUPT, network(71) errName = 'NetworkInterruptError'; break; default: errName = 'NetworkError'; break; } } // XXX we have no TCPError implementation right now because it's really hard to // do on b2g18. ...
... } } // XXX we have no TCPError implementation right now because it's really hard to // do on b2g18. On mozilla-central we want a proper TCPError that ideally // sub-classes DOMError. Bug 867872 has been filed to implement this and // contains a documented TCPError.webidl that maps all the error codes we use in // this file to slightly more readable explanations. ...
...And 2 more matches
Architecture - Accessibility
Sometimes the embedded object is really just another text container with more embedded objects. However in accessibility hierarchies such as ATK and IAccessible2, text is not exposed in leaf nodes as it is in a W3C DOM. The text is actually exposed via a special text interface in the parent of the text nodes. It is concatenated together with all its sibling text nodes, and embedded objects between the text nodes are exposed as the unicoded embedded object character '\xfffc'. ...
...e parent object's nsIAccessibleText. This is done for backward compatibility with older MSAA clients which didn't have access to a text interface. The children of a Hypertext object are a superset of the links it exposes. The new system makes it easier to show caret positions etc., which will be an improvement in IA2 over MSAA. Example Take the following HTML code: <div>Hello<a href="http://www.mozilla.org/access">My link<img src="image.gif">is cool</a>Bye</div> Both the <a> and <img> are hyperlinks Also, both the <div> and <a> are hypertexts So the <a> is both a hypertext and a hyperlink, because it contains text and is contained within text. This means that we have an exact mirror to the dom, but text lives in the parents instead of in the leaves, which now don't really provide additional us...
...pport the HyperText interface, it is more performant to grab the text from the AccessibleText interface and then only visit the link children. The HyperLink interface can be used to grab the children. Using this technique is about twice as fast as visiting all nodes in the tree, according to tests run by the developers of NVDA. (F) To get the line of text at the caret: Many editors, including the Mozilla editor, have a strange issue with caret offsets. The caret can sometimes visually appear at the end of a line, but logically it is on the first character on the next line. You can test this in a given editor by pressing the End key on a line, to see whether the caret is shown past the End of the line. To doublecheck, hit the Delete key and see if it removes the first char of the next line. Theref...
...And 2 more matches
Accessibility documentation index - Accessibility
Found 105 pages: # Page Tags and summary 1 Accessibility Accessibility, Landing Accessibility (often abbreviated to A11y--as in "a" then 11 characters then "y") in Web development means enabling as many people as possible to use Web sites, even when those people's abilities are limited in some way. 2 ARIA ARIA, Accessibility, HTML Accessible Rich Internet Applications (ARIA) is a set of attributes that define ways to make web content and web applications (especially those developed with JavaScript) more accessible to people with disabilities. ...
... such as screen readers or magnifiers. 79 widgets Accessibility This page was auto-generated because a user created a sub-page to this page. 80 overview Accessibility, JavaScript, Landing, NeedsUpdate Here's a look at working examples and best practices in building accessible JavaScript widgets. 81 Accessibility FAQ Accessibility, FAQ Mozilla Accessibility Project 82 Accessibility Information for Web Authors Accessibility, Authoring DHTML Accessibility Roadmap: a peek into how DHTML will be made accessible in the future. This document gives a plan which is being developed by IBM, Mozilla and WAI Protocols and Formats Working Group (PFWG) to address the issue of Accessible DHTML. 83 Accessibility and Spa...
...res NASA conducted research on the perception of color, and found that luminance contrast mattered greatly as to how they were perceived. The two images below are from NASA research, specifically, from the article, "Designing With Blue" 84 Accessibility documentation index Accessibility, Index This document provides a list of links to all accessibility articles on the Mozilla Developer Network. 85 Accessibility: What users can do to browse more safely color, epilepsy, photosensitivity, prefers-reduced-motion, reflex epilepsy, saturation, seizure disorders, seizures, user settings, web animation This article discusses making web content accessible for those with vestibular disorders, and those who support them, by taking advantage of personalizatio...
...And 2 more matches
Accessibility Information for Web Authors - Accessibility
follow these guidelines as well. Web Content Accessibility Guidelines (WCAG) 1.0 Another important set of guidelines from the W3C Web Accessibility Initiative (WAI). The European Union is looking to base their upcoming accessibility regulations on these guidelines. These guidelines are discussed on the WAI interest group discussion list. How-to's Key-navigable custom DHTML widgets in Mozilla & IE This document discusses how to use tabindex, element.focus() and onkeypress to make custom DHTML widgets such as menus or tree views keyboard accessible. Accessible Web Page Authoring IBM has put together a simple, practical resource for web authors to learn accessibility the fast and painless way. Highly recommended, an excellent resource. Dive Into Accessibility by Mark Pilgrim ...
...d in Techniques For Accessibility Evaluation And Repair Tools from W3C. The Juicy Studio CSS analyzer will also analyze and report the color contrast and color brightness differences involved in your stylesheets. The Future: Accessible DHTML DHTML Accessibility Roadmap: a peek into how DHTML will be made accessible in the future. This document gives a plan which is being developed by IBM, Mozilla and WAI Protocols and Formats Working Group (PFWG) to address the issue of Accessible DHTML. Dynamic web content is not accessible, because it uses vanilla <div>'s and <span>'s combined with Javascript rather than declarative markup to describe the behavior of custom widgets such as menus and tree views. These widgets are usually not even keyboard focusable. Furthermore, assistive technologies d...
... understand what these widgets are supposed to be, or what state they are in or what they are capable of. This document tackles such difficulties and shows several interactive desktop-style widgets such as tree views, menu bars and spreadsheets which are accessible both with the keyboard and assistive technologies such as screen readers, screen magnifiers and alternative input devices. Join the Mozilla Accessibility Community Live Chat Both 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google ...
...And 2 more matches
Index - Developer guides
Web › Guide › Index
mmunities related to AJAX, please link to them here. 4 Getting Started AJAX, API, Advanced, JavaScript, WebMechanics, XMLHttpRequest This article guides you through the AJAX basics and gives you some simple hands-on examples to get you started. 5 WAI ARIA Live Regions/API Support AJAX, Accessibility Firefox 3 contains important improvements to the way the Mozilla engine exposes live changes in a document. 6 Audio and Video Delivery Audio, Guide, HTML, HTML5, Media, Video Whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the browser's <audio> and <video> elements remains pretty much the same. Currently, to support all browsers we need to specify two formats, although w...
...Listener() 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 Observers instead if possible. 23...
...u use them. 24 Overview of events and handlers Beginner, DOM, Example, JavaScript, NeedsBeginnerUpdate, 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...
...And 2 more matches
places/favicon - Archive of obsolete content
ct that represents a page's URL and returns a promise that resolves with the favicon URL for that page. The object can be a URL String or a Tab. The platform service (mozIAsyncFavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon URLs for visited sites. ...
...favicon URL for that page. The object can be a URL String or a Tab. The platform service (mozIAsyncFavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon URLs for visited sites. ...
...yncFavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon URLs for visited sites. ...
...sites. let { getFavicon } = require("sdk/places/favicon"); // String example getFavicon("http://mozilla.org").then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); // Tab example require("sdk/tabs").open({ url: "http://mozilla.org", onReady: function (tab) { getFavicon(tab).then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); } }); // An optional callback can be provided to handle // the promise's resolve and reject states getFavicon("http://mozilla.org", function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); Parameters object : string|tab A value that represents the URL of the page to get the favicon URL from. Can be a URL String or a Ta...
Adding a Button to the Toolbar - Archive of obsolete content
The button is added to the toolbar at the top of the browser window: You can't set the initial location for the button, but the user ca...
...The button is added to the toolbar at the top of the browser window: You can't set the initial location for the button, but the user can move it using the browser's c...
...f your addon directory and add the following code to it: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://www.mozilla.org/"); } Now run the add-on with jpm run. The button is added to the toolbar at the top of the browser window: You can't set the initial location for the button, but the user can move it using the browser's customization feature. The id attribute is mandatory, and is used to remember the position of the button, so you should not change it in subsequent versions of the add-on. Clicking the but...
...e add-on with jpm run. The button is added to the toolbar at the top of the browser window: You can't set the initial location for the button, but the user can move it using the browser's customization feature. The id attribute is mandatory, and is used to remember the position of the button, so you should not change it in subsequent versions of the add-on. Clicking the button loads https://www.mozilla.org/ into a new tab. Specifying the icon The icon property may specify a single icon or a collection of icons in different sizes, as in the example above. If you specify a collection of icons in different sizes the browser will automatically choose the best fit for the screen resolution and the place in the browser UI that hosts the button. Read more about specifying multiple icons. The icon f...
Getting started (cfx) - Archive of obsolete content
ready for testing: try "cfx test" and then "cfx run". Have fun!" Implementing the add-on Now you can write the add-on's code, which goes in the "main.js" file in your "lib" directory. This file was created for you in the previous step. Open it and add the following code: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://www.mozilla.org/"); } Save the file. Next, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png Back at th...
... to the "data" directory: icon-16.png icon-32.png icon-64.png Back at the command prompt, type: cfx run This is the SDK command to run a new instance of Firefox with your add-on installed. When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with https://www.mozilla.org/ loaded into it. That's all this add-on does. It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab. Try editing this file. For ...
...ch enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab. Try editing this file. For example, we could change the page that gets loaded: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); function handleClick(state) { tabs.open("https://developer.mozilla.org/"); } At the command prompt, execute cfx run again. This time clicking it takes you to https://developer.mozilla.org/. Packaging the add-on When you've finished the ad...
... To build an XPI, just execute the command cfx xpi from the add-on's directory: cfx xpi You should see a message like: Exporting extension to my-addon.xpi. To test that this worked, try installing the XPI file in your own Firefox installation. ...
HTML to DOM - Archive of obsolete content
, and <iframe>. It will also remove all JavaScript, including element attributes that contain JavaScript. function HTMLParser(aHTMLString){ var html = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null), body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); html.documentElement.appendChild(body); body.appendChild(Components.classes["@mozilla.org/feed-unescapehtml;1"] .getService(Components.interfaces.nsIScriptableUnescapeHTML) .parseFragment(aHTMLString, false, null, body)); return body; } It works by creating a content-level (this is safer than chrome-level) <div> in the current page, then parsing the HTML fragment and attaching that fragment to the <div>. The <div> is returned, and it is never actually appended to the ...
... Using a hidden XUL iframe (alternate example) Sometimes, a browser element is overkill, or does not meet your needs, or you can't fulfill its requ...
... Using a hidden XUL iframe (alternate example) Sometimes, a browser element is overkill, or does not meet your needs, or you can't fulfill its requirements. While working on Donkeyfire, I discovered the iframe XUL ...
... }, As you can see, we obtain full access to the DOM of the page we loaded in background, and we can even evaluate XPath expressions. In the example, we dump() to the console the page's URL and the text contained in the first h1 tag of the page's <body>. But, we still need to see how to execute the famous loadURI() method using our iframe: donkeybrowser.webNavigation.loadURI("http://developer.mozilla.org", Components.interfaces.nsIWebNavigation, null, null, null); Also, I recommend you take a look at the nsIWebNavigation interface. ...
JS XPCOM - Archive of obsolete content
eton). Whether you must create a new instance or access as a service depends on the contract. In order to get an XPCOM object you need to know the contract ID of the object and the interface that you wish to use on it. Creating an instance of a component The preferred method of creating XPCOM instances is via the Components.Constructor helper. ...
...d the interface that you wish to use on it. Creating an instance of a component The preferred method of creating XPCOM instances is via the Components.Constructor helper. ...
...var nsFile = Components.Constructor("@mozilla.org/file/local;1", "nsIFile", "initWithPath"); var file = new nsFile(filePath); They can also be created and initialized manually: var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsIFile); file.initWithPath(filePath); This creates a new instance of the object with contract ID @mozilla.org/file/local;1 and allows you to call methods from the nsIFile interface on it. Getting an XPCOM service var preferences = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); You can then call any methods in the nsIPrefService interface on the preferences object. Getting a different interface for a componen...
... channel.originalURI = uri; return channel; }, getURIFlags: function(uri) { // Do NOT return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT unless // you make sure to set a non-system principal in newChannel. return 0; }, classDescription: "About MyStuff Page", classID: Components.ID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), contractID: "@mozilla.org/network/protocol/about;1?what=mystuff", QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]) } var NSGetModule = XPCOMUtils.generateNSGetModule([AboutHandler]); } ...
JavaScript Daemons Management - Archive of obsolete content
mon framework will remain the recommended way for simple animations, because Daemon without its collection of methods is essentially a clone of it. /*\ |*| |*| ******************************* |*| * daemon.js * |*| ******************************* |*| |*| ver. 1.0 rev. 2 |*| |*| daemon.js - A JAVASCRIPT HIGHLY SCALABLE DAEMONS MANAGER. |*| |*| https://developer.mozilla.org/docs/JavaScript/Timers/Daemons |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| \*/ "use strict"; /**************************** * THE DAEMON SYSTEM * ****************************/ /* The global "Daemon" constructor */ function Daemon...
...***************************** * DAEMON IS NOW READY! * *******************************/ /******************************* * POLYFILLS * *******************************/ /*\ |*| |*| IE-specific polyfill which enables the passage of arbitrary arguments to the |*| callback functions of JavaScript timers (HTML5 standard syntax). ...
...onstructor is a dependent-clone of Daemon which uses a recursive invocation of the setTimeout timer rather than a single invocation of setInterval. /*\ |*| |*| ******************************* |*| * daemon-safe.js * |*| ******************************* |*| |*| ver. 1.0 rev. 2 |*| |*| daemon.js - A JAVASCRIPT HIGHLY SCALABLE DAEMONS MANAGER |*| |*| https://developer.mozilla.org/docs/JavaScript/Timers/Daemons |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| \*/ "use strict"; /************************************** * THE SAFE-DAEMON SUB-SYSTEM * **************************************/ /* The "Daemon.safe" const...
...method (it is relatively rare), there is a comment which explains why. If there are not comments to that method it depends only on the base system. /*\ |*| |*| ******************************* |*| * daemon-methods.js * |*| ******************************* |*| |*| ver. 1.0 rev. 2 |*| |*| daemon.js - A JAVASCRIPT HIGHLY SCALABLE DAEMONS MANAGER |*| |*| https://developer.mozilla.org/docs/JavaScript/Timers/Daemons |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| \*/ "use strict"; /* SYSTEM NOT REQUIRED Daemon instances methods */ /* Movement */ Daemon.prototype.syncStart = function (bReverse) { this.synchronize(); if...
Getting Started with Firefox Extensions - Archive of obsolete content
<< PreviousNext >> What's a Firefox Extension? Extensions add new functionality to Mozilla applications such as Firefox and Thunderbird. They can add anything from a toolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download. Taken from the Extensions page. As described in the quoted text, an extension is a small application that adds something new to one or more Mozilla applications. This tutorial focuses on extensions for Firefox, but the same (or very similar) principles apply to creating extensions for other applications such as Thunderbird, Seamonkey, and Flock. It is also worth noting that there are differences between the definit...
...nguage packs are developed in a very similar way. Plugins are entirely different, and they will not be covered here. You can read more about plugins and their development in the Plugins page. Firefox provides a very rich and flexible architecture that allows extension developers to add advanced features, customize the user's experience, and completely replace and remove parts of the browser. The Mozilla Add-ons repository (AMO) holds an extensive number of extensions with a wide variety of functions: content filtering (AdBlock Plus, NoScript), web application interaction (Delicious Bookmarks, eBay Companion) and web development (DOM Inspector, Firebug). These are very advanced and complex extensions, and you'll learn most of what it takes to create extensions like these. Extensions now exist in...
...lyzing a very simple extension. The Hello World Extension Our sample extensions and this tutorial in general are meant for modern versions of Firefox, but most of it works on older versions too. We'll now begin with a basic "Hello World" extension. Let's start by installing it. Click on the link below. NOTE: This extension is unsigned. Starting with Firefox 43, extensions need to be signed by Mozilla before they can be installed in Firefox. Unsigned add-ons can still be installed in Developer Edition, Nightly, and ESR versions of Firefox, after toggling the xpinstall.signatures.required preference in about:config. Install Hello World Click the above link and then click "allow" in the pop-up bubble. You should see another pop-up telling you that you are installing an unverified add-on. Click...
... ...
Handling Preferences - Archive of obsolete content
Preferences are used to store settings and information to change their default behavior. To open the preferences window in Firefox, select the following from the main menu: On Windows, Tools > Options On Mac, Firefox > Preferences On Linux, Edit > Preferences Note: Keep in mind the usage of the terms "Preferences" and "Options" in different platforms. If you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system. Tip: you can use window.navigator.platform in your chrome code to figure out the operating system Firefox is running on. ...
...stored. This file is updated when preferences are modified by the user. User preferences: the file user.js in the user's profile directory holds additional preferences the user has set. This file is never written to by Firefox, but you may wish to set preferences manually in this file to override other settings. Lockfile settings: these preferences are stored in a file that usually has the name mozilla.cfg or netscape.cfg. The file may be located on a network. It is intended to be used by an administrator or ISP to set settings centrally. In addition, certain preferences may be locked such that users cannot change them. Locked preferences are disabled in the Preferences window. Firefox exposes its most common high-level preferences through the Preferences window and other parts of its UI. In ...
... new preference. Note: Always begin your preference names with "extensions", followed by some namespacing and finally the actual name of the preference. Name parts are normally separated by dots. Now let's look at how we actually manage the preference values. Managing preferences with XPCOM We use the Preferences Service in order to get and set preference values: this._prefService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch); // ... get count() { return this._prefService.getIntPref("extensions.xulschoolhello.message.count"); }, increment : function() { let currentCount = this._prefService.getIntPref("extensions.xulschoolhello.message.count"); this._prefService.setIntPref("extensions.xulschoolhello.message.count", currentCount + 1); } One important...
.../preferences/preferences.css). This way you don't have to rewrite all the CSS rules defined for Firefox. You should also look at the class values set to elements in the XUL file, so that your Preferences window is just like the one in Firefox and your extension is better integrated into the application and the native OS look and feel. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
JavaScript Object Management - Archive of obsolete content
you want to use across all objects within the namespace. For instance, there are frequently used XPCOM services such as the Observer service that can be included as members in the namespace: /** * <Namespace> namespace. */ if (typeof <Namespace> == "undefined") { var <Namespace> = { /** * Initializes this object. */ init : function() { this.obsService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); } }; <Namespace>.init(); }; JS objects can also be treated as string-indexed arrays: // equivalent. <Namespace>.Hello = {}; <Namespace>["Hello"] = {}; // equivalent. <Namespace>.Hello.init(); <Namespace>.Hello["init"](); This is very useful in cases where you have to set attributes or functions with dynamically gen...
...ol. Just like with the chrome, we define the package name and then a path. To keep things simple, just locate the JSM files in a modules directory under the root of our project. In order to access a file messageCount.js in this directory, the URL would be: resource://xulschoolhello/messageCount.js Code modules are regular JS files, so there's nothing new in regards to naming or file types. Mozilla has adopted a standard of using the extension .jsm for these files, but they say .js is fine as well. To keep things simple, specially regarding code editors and default file associations in the developer's system, we have decided to stick with .js. Download this version of the Hello World project with JSM to see the changes you need to make to the build system in order to include the files in t...
...ead to nothing but problems, so be careful when deciding what should be chrome and what shouldn't be. We needn't test for the pre-existence of our namespace object here, as modules are given their own namespace. The 2 declared constants above are used to reduce code size. We frequently need to use XPCOM components in our code, so instead of doing this: this.obsService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); It's better to do this: this.obsService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); These 2 constants don't need to be defined in the overlay because they are already defined globally in the browser.js file in Firefox. We only need to define them when we're making windows of ...
...general. You can use it in JSM, chrome, even on regular web pages. Since entities tend to be used all throughout an application, we think that having those classes defined at the module level is the best approach. JSM is the best solution to handle objects that are window-independent. In the following section we'll discuss XPCOM, which is an older alternative to JSM and one of the foundations of Mozilla applications. You shouldn't skip that section because there are many common situations in extension development where you'll have to use XPCOM, maybe even implement XPCOM components of your own. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Observer Notifications - Archive of obsolete content
observer service is simple, invoking the addObserver method with three parameters. The first parameter is an observer object, the second parameter is a notification topic, and the third parameter is a boolean which indicates whether the observer service should hold a weak reference to the observer. You should normally set the third parameter to false. let observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); observerService.addObserver(testObserver, "xulschoolhello-test-topic", false); You should come up with a notification topic that is unique so you know it will not conflict with Firefox or other extensions topics. To remove an observer for a specific topic, you use the removeObserver method. The method tak...
...nd a message to the chrome. You would have to invoke a method for the chrome objects in all windows. It's much easier to use observers in this case. Let's see the following example code on how to send out a notification from non-chrome code. /** * Notifies all the registered observers with the test notification topic. */ notifyTest : function() { let observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); let subject = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); // assign some text to data attribute subject.data = "This is a test."; // notify all registered observers observerService.notifyObservers( subject, "xulschoolhello-te...
...ing so will result in memory leaks. Therefore, the registered observer is unregistered when the browser window is unloaded. /** * Controls the browser overlay for the Hello World extension. */ XULSchoolChrome.BrowserOverlay = { /* Observer service. */ _observerService : null, /** * Initializes this object. */ init : function() { this._observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); this._observerService.addObserver(this, "xulschoolhello-test-topic", false); }, /** * Unitializes this object. */ uninit : function() { this._observerService.removeObserver( this, "xulschoolhello-test-topic"); }, /** * Observes the registered notification topics. * @param a...
...is sent. Useful Firefox notifications We have covered sending and receiving custom notification topics using observers and the observer service. In Firefox, there are many built-in observer topics that you can observe as well. The Observer Notifications page lists some useful topics and is definitely worth spending time studying it. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Getting the page URL in NPAPI plugin - Archive of obsolete content
ue.value.objectValue; // Create a "href" identifier. identifier = NPN_GetStringIdentifier( "href" ); // Get the location property from the location object. bool b2 = NPN_GetProperty( m_pNPInstance, locationObj, identifier, &variantValue ); This code is just a rough example. Remember to release any references after using them. Tradeoffs: Uses NPAPI only Works in most browsers Does not work in Mozillas older than Firefox 1.0 Via NPP_NewStream From Braden McDaniel: If you want the URI of the resource for which the plug-in is invoked, the most NPAPI-friendly way to do that is to get it from the NPStream that is passed to NPP_NewStream. Tradeoffs: NPAPI only Probably works in all browsers, all versions Is sort of backwards (?) Advantages / disadvantages ? Via DOM From Benjamin Smedberg: Th...
...g: The NPAPI gives you the ability to get access to the nsIDOMWindow object which contains the current plugin via the NPNVDOMElement enum passed to NPN_GetValue. ...
...ent plugin via the NPNVDOMElement enum passed to NPN_GetValue. ...
...Element enum passed to NPN_GetValue. ...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
ata); 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. ...
...uest. 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. ...
...s 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.archive.org/web/20090218052536/http://devedge-temp.mozilla.org/viewsource/catalog-new_en.xml Data Binder Component This procedure traverses the DOM that was returned via XMLHTTPRequest and generates markup based on the data provided in the DOM nodes. When the markup is ready, it copies the markup into the container element, which is a DIV element. The...
... the container.. document.getElementById("container").innerHTML+=articleTitle+"<br />"; } Source code for the sample <html> <head> <title>Inner-browsing example, with XMLHTTPRequest and DOM</title> <script type="text/javascript" language="javascript" src="xmlrequest.js"></script> <script> /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limita...
Bookmark Keywords - Archive of obsolete content
Practically every Web surfer has bookmarks, of course, and power surfers usually have hundreds stuffed into folders within folders. In addition to being handy pointers to useful resources, bookmarks in Mozilla can be used to make the address bar itself a power tool. Searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks. The key to this ability, if you'll pardon the pun, is the ability to add a keyword to any Mozilla bookmark. ...
...l be retrieved from user-customized bookmarks. The key to this ability, if you'll pardon the pun, is the ability to add a keyword to any Mozilla bookmark. Under ordinary circumstances, this might be used to reduce typing of a common URL: http://www.cnn.com/ could be given the keyword cnn. Once that's done, all it takes to go to the CNN home page would be to type <tt>cnn</tt> into the address bar. Mozilla will automatically expand the keyword to the corresponding bookmarked URL, and load up the site. That's pretty interesting on its own, but Mozilla takes it a step further by allowing the user to define an "entry point" for added information. For example, a keyworded bookmark could be set up so that a user could type <tt>google spam and eggs</tt> and thereby trigger a Google search for the words "...
... the location field-- it can be anywhere inside the field. You just need to fill in whatever piece of a URL it is you want to be able to "fill in" when you use the keymark. All we need now is a keyword, and our keymark will be ready to go. Fill in the value bz, as shown in Figure 5. With that done, all you have to do in the future is type <tt>bz</tt> followed by a space and the bug's number into Mozilla's address bar, and the browser will jump right to the bug with that number. This is illustrated in Figure 6. That's all it takes! Setting up a Google Keymark To set up a keymark that will search Google directly form the address bar, go to Google and run a search for any word. Once you get a result page, bookmark that page. You'll need to replace the word for which you searched. One such examp...
..., as shown (with extra highlighting) in Figure 8. Now we can run Google searches straight from the address bar. These searches can be as complex as Google will tolerate, since the entered data will be converted to URL-encoded text before it's sent to the Google servers. Thus we could type any of the following into the address bar and get back useful results: <tt>google geitost</tt> <tt>google Mozilla Keyword Bookmark</tt> <tt>google bookmark site:developer.netscape.com</tt> <tt>google netscape XML support -site:netscape.com</tt> A Few Examples In the course of writing this article, a number of potentially useful bookmarks were considered as possible examples. Instead of just throwing them away, we're providing them for you in the following table. Even better, you can file them for future...
Building TransforMiiX standalone - Archive of obsolete content
You need to get the source from CVS. Add TX_EXE=1 mk_add_options BUILD_MODULES="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. ...
...on Windows, Unix and OS X. Read the build instructions for your platform to get the requirements, which are the same as for Mozilla. You need to get the source from CVS. Add TX_EXE=1 mk_add_options BUILD_MODULES="xpcom transformiix" ac_add_options --enable-standalone-modules="xpcom transformiix" to your .mozconfig, and use client.mk to pull as usual. This will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/Makefile.in plus nspr and xpcom from the cvs repository. Building from a full mozilla tree is not supported. It is recommended to add ac_add_options --disab...
...c_add_options --without-zlib ac_add_options --without-png ac_add_options --without-x to your .mozconfig, too, as it stops configure from testing unneeded libs. make -f client.mk build as usual. Of course, make -f client.mk checks out and builds just TransforMiiX alright. ...
...t and builds just TransforMiiX alright. The binary transformiix(.exe) will be in extensions/transformiix/source and dist/bin/ (symbolic link). Run it via run-mozilla.sh transformiix on unices and just transformiix.exe on Windows. ...
Creating a hybrid CD - Archive of obsolete content
The utility mkhybrid lets you create hybrid CDs that work with all three filesystems. Mkhybrid was written by James Pearson and is is a component of the latest versions of cdrecord. ...
...The utility mkhybrid lets you create hybrid CDs that work with all three filesystems. Mkhybrid was written by James Pearson and is is a component of the latest versions of cdrecord. ...
...gth of file names to 32 characters. The utility mkhybrid lets you create hybrid CDs that work with all three filesystems. Mkhybrid was written by James Pearson and is is a component of the latest versions of cdrecord. I used version 1.8.1a03 although you'll probably want to get a newer one. Here's what I did to create the CD for the second anniversary party. mkhybrid -o ~/party.iso -r -J -hfs -V mozilla.party -map ~/HFSmapping ~/party/ cdrecord -v speed=2 dev=0,6,0 ~/party.iso Its also handy to be able to mount an image file to test it. mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom Here is the HFS mapping that I used. The Creator "MOSS" is for Netscape 4.x and "MOZZ" is used for Mozilla. It is used as the creator type for README and other text fil...
... ...
Creating a Release Tag - Archive of obsolete content
ate. It has not been updated for usage of Mercurial. Here are directions for creating a release from a linux system. Note that there are a couple of extra files for Win32 and Macintosh that aren't pulled by the normal script and need to be pulled by hand. The mini-branch is created so you can check in the build scripts with the necessary changes without touching the original branch. Check out Mozilla from the branch you want to tag. Remember to also check out extra Mac and Win32 files that aren't normally checked out on linux or the tag won't build on those platforms. cvs co -r NETSCAPE_6_2_RELEASE mozilla/client.mk cd mozilla gmake -f client.mk checkout Create a Mini Branch for the pull scripts on all three platforms so we can change them without changing anything on the original b...
... tag. Remember to also check out extra Mac and Win32 files that aren't normally checked out on linux or the tag won't build on those platforms. cvs co -r NETSCAPE_6_2_RELEASE mozilla/client.mk cd mozilla gmake -f client.mk checkout Create a Mini Branch for the pull scripts on all three platforms so we can change them without changing anything on the original branch. cd .. cvs tag -b MOZILLA_0_9_4_1_RELEASE_MINI_BRANCH mozilla/client.mk Delete the existing build scripts and repull them from the mini-branch you just created. rm mozilla/client.mk cvs co -r MOZILLA_0_9_4_1_RELEASE_MINI_BRANCH mozilla/client.mk In each of the build scripts find the variables defining the branch and change it from the branch you originally pulled from to the new tag you are creating. m...
... and repull them from the mini-branch you just created. rm mozilla/client.mk cvs co -r MOZILLA_0_9_4_1_RELEASE_MINI_BRANCH mozilla/client.mk In each of the build scripts find the variables defining the branch and change it from the branch you originally pulled from to the new tag you are creating. mozilla/client.mk Check the build scripts back in to the mini-branch. cvs ci mozilla/client.mk Create the tag. find . ...
..._9_4_1_RELEASE_MINI_BRANCH mozilla/client.mk In each of the build scripts find the variables defining the branch and change it from the branch you originally pulled from to the new tag you are creating. mozilla/client.mk Check the build scripts back in to the mini-branch. cvs ci mozilla/client.mk Create the tag. find . -type d \! -name CVS | xargs -l -P10 cvs tag -l MOZILLA_0_9_4_1_RELEASE >& ../taglog Original Document Information Author(s): Dawn Endico Last Updated Date: November 1, 2005 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
tected 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 Control click application icon(Firefox icon), choose Show Package Contents. Go to contents/MacOS/Chrome/classic.jar Copy classic.jar to another easily accessible folder -- Classic is recommended -- extract the conte...
... theme. The packages section lists which components of the browser you're modifying. If we also had skins for Chatzilla, we would need to add another line resembling the other ones and change it to point to Chatzilla. But this list includes everything that we changed, so just modify the blue text to point to match the name/version that you used in the sections before this. <RDF:li resource="urn:mozilla:skin:My_Theme:communicator"/> <RDF:li resource="urn:mozilla:skin:My_Theme:editor"/> <RDF:li resource="urn:mozilla:skin:My_Theme:global"/> <RDF:li resource="urn:mozilla:skin:My_Theme:messenger"/> <RDF:li resource="urn:mozilla:skin:My_Theme:navigator"/> Save the file and exit the text editor. install.rdf Make a copy of install.rdf and place it in the My_Theme directory, then open it up in your ...
...Once you've done this, insert the information as above, and scroll down. ...
... Triggering the install from the web To install the theme's JAR file directly from the web, you need to run some JavaScript. <a href='javascript:InstallTrigger.installChrome(InstallTrigger.SKIN, "myskin.jar", "My Skin Theme")'>install My Skin</a> If you have JAR files on your hard drive and would like to install them, then download/use this form. You can also just open the themes window in Mozilla and drag and drop your .jar file onto it. Now to change your folder(s) back into a .jar Well it's easy! What you do is put your folder(s) into a .zip file and then when it's compressed make the .zip into a .jar ...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
articular window, and proceed up to the point at which the data stream is dispatched to the proper handler. The final goal is to find the correct stream listener to pump the data into when necko calls OnDataAvailable (e.g., we may find the HTML parser as the stream listener to give the data to). Dramatis Personae This document focuses on the interaction of three classes with each other, but other Mozilla components are also involved. Main Roles nsDocShell This class corresponds, basically, to a "window" object in JavaScript -- each frame, iframe, content area, tab, etc has its own docshell. A docshell can have a name associated with it (e.g. a named frame). All loads that we consider in this document are initiated via the docshell. nsDocShell implements too many interfaces to count; the ones th...
... all the information related to a particular load. There is basically one of these per load (though see the section on stream converters). nsDocumentOpenInfo implements nsIStreamListener and proxies the nsIStreamListener calls over to the "real" stream listener once one is chosen. This is the class that handles deciding where the data from the load should go. Supporting Roles Necko This is the Mozilla networking library. This handles actually going out and getting the data. It also handles determining the MIME type of the data, which is used to decide who gets the data. Category Manager This is used in a last-ditch attempt to find a content listener. nsIURIContentListener implementations We try to find one of these which can handle data of the type we're looking at (that is, it can give us an ...
...e data. Category Manager This is used in a last-ditch attempt to find a content listener. nsIURIContentListener implementations We try to find one of these which can handle data of the type we're looking at (that is, it can give us an nsIStreamListener to pump data into). Most often, the one we find is nsDSURIContentListener, which corresponds to a docshell and handles most of the data types that Mozilla handles internally. nsIExternalHelperAppService If we can't do anything else with a load, we give it to the nsIExternalHelperAppService and let it look for a helper app, put up the "what do I do now?" dialog, and so forth. Bird's Eye View <map id="loadDiagramMap" name="loadDiagramMap"><area alt="(13) DoContent()" coords="534,239,715,300" href="#nsIExternalHelperAppService::DoContent"> <area alt=...
... ...
Repackaging Firefox - Archive of obsolete content
articular group of users (for example, your organization's employees or clients). Because Firefox is designed from the ground up for extensibility and customization, this process is simple and easy to maintain. Important legal considerations Before you get started, it is very important to know and abide by the legal requirements for distributing Firefox. You must have written authorization from Mozilla to distribute a modified version of Firefox. To do this, please contact trademarks@mozilla.com. Getting started Now, on to the technical details. The following diagram represents an overview of the process and the pieces involved: You will need the following to get started: A Macintosh computer (even for repackaging Windows or Linux only); it may be either PowerPC or Intel based. The rep...
...ll this extension a "distro extension" (sometimes abbreviated as "DEX"), because it is used to create a new "distribution" of Firefox, with different branding, etc. Using an extension makes it far easier to keep track of your changes easily when the time comes to upgrade to new versions of Firefox, and also ensures, when set-up correctly, that users are able to safely receive Firefox updates from Mozilla. More about this below. While the aim of this article is not to fully document how to make an extension (for that, try this section of the Mozilla Developer Center), here is a basic tutorial to get you started, and some tips specific for creating a DEX. If you already have an extension that you want to bundle with Firefox, and don't want to bundle an extra extension solely to set a few defaults...
... (or needed at all) for that preference. Therefore, if *all* of your preferences can use the same values, you do not need to include any properties files at all. Note that you must know which preferences are localizable and which ones aren't. See the MDC documentation for more information on them. Important Extension Preferences There is a small set of preferences which will be given to you by Mozilla. They help Mozilla track your distribution, and plan upgrades accordingly. They allow for upgrades to be delivered by Mozilla specifically for your distribution, if need be, and because of that they are the most important preferences you need to set. Mozilla will provide you with the values you will need here. Note that the app.partner.'name' setting uses the same value for both the name and the...
...ution, if need be, and because of that they are the most important preferences you need to set. Mozilla will provide you with the values you will need here. Note that the app.partner.'name' setting uses the same value for both the name and the value of the preference. All of these settings are non-localizable, so they are set directly in partner.js and do not need to be in the properties file. mozilla.partner.id=<name> app.partner.<name>=<name> app.distributor=<name> app.distributor.channel=<name> Other Preferences Some settings are commonly set in partner distributions. This is not meant to be a comprehensive list of preferences, however. If you find a preference you think is generally useful to most partner repacks, please add it below, using the same style: Localizable preferences brow...
GRE Registration - Archive of obsolete content
Successfully embedding the GRE requires that information about installed GREs be stored on the system. This information is stored differently on each operating system. This document describes the registration mechanism. Windows On windows, GRE registration information is kept in the win32 registry under the HKEY_LOCAL_MACHINE/Software/mozilla.org/GRE and HKEY_CURRENT_USER/Software/mozilla.org/GRE keys. ...
...tored on the system. This information is stored differently on each operating system. This document describes the registration mechanism. Windows On windows, GRE registration information is kept in the win32 registry under the HKEY_LOCAL_MACHINE/Software/mozilla.org/GRE and HKEY_CURRENT_USER/Software/mozilla.org/GRE keys. Each subkey is searched for GRE registration information: HKLM/Software/mozilla.org/GRE/1.8_1 Version=1.8 GreHome=C:\path\to\installed-dir Feature=Value Feature2=Value2 HKLM/Software/mozilla.org/GRE/1.8_2 Version=1.8 GreHome=C:\path\to\second-installation When installing a GRE via the Mozilla suite GRE installer, the installer will blindly overwrite any previous GRE information in HKLM/Software/mozilla.org/GRE/<version>. When installing a GRE via the command li...
... Mac On mac, the only GRE is the libxul framework XUL.framework. ...
...rnate keys <version>_1 _2 until an available key is found. Mac On mac, the only GRE is the libxul framework XUL.framework. This framework is installed either in /Library/Frameworks/XUL.framework/Versions/<version> or in ~/Library/Frameworks/XUL.framework/Versions/<version>. Linux On linux, registration information is kept in INI-style files of the following form: [1.7.10] GRE_PATH=/usr/lib/mozilla-1.7.10 Feature=Value Feature2=Value2 These INI files can be in any of the following locations: /etc/gre.conf /etc/gre.d/*.conf ~/.gre.conf ~/.gre.d/*.conf Mozilla has never officially shipped a linux GRE based on the Mozilla suite. However, some linux distributors including Red Hat/Fedora Core ship /etc/gre.d/*.conf files with the Mozilla suite RPMs. XULRunner RPMs/post-install scripts should re...
GRE - Archive of obsolete content
The framework for embedding Mozilla technologies was at one point called the GRE (Gecko Runtime Environment). This embedding framework allows applications to locate a compatible Gecko runtime and embed it without knowing in advance where that runtime will be installed. This document describes how embedders should dynamically link to a GRE. To understand how GREs are registered, see GRE Registration. The XRE project, which means "XUL Runtime Environment", has been replaced by XULRunner. Mozilla Suite: the old GRE There are two different forms for the GRE: the "old" GRE was part of the Mozilla application suite. It was installed with the Windows installer of Mozilla 1.4 through 1.7.x. There was never an official GRE shipped for Linux, but various distributors such as Red Hat have registe...
... XULRunner: the new GRE XULRunner is the new version of the GRE, which not only allows embedding but is capable of bootstrapping entire XUL applications such as Firefox. ...
... XULRunner: the new GRE XULRunner is the new version of the GRE, which not only allows embedding but is capable of bootstrapping entire XUL applications such as Firefox. XULRunner supports or is planned to support embedding on all three major platforms (Windows, Mac, and Linux). ...
...itialize XPCOM and do your work; when finished, shut down XPCOM. Unlink XPCOM with XPCOMGlueShutdown(). Dependent libraries and environment variables The XULRunner GRE is designed so that the embedder does not need to set any environment variables such as PATH or LD_LIBRARY_PATH before calling XPCOMGlueStartup(), because it dynamically loads the correct dependent libraries. Unfortunately, the Mozilla suite-based GRE is not as forgiving, especially on Linux. Embedders will need to set the LD_LIBRARY_PATH environment variable and start a new process in order to embed a suite-based GRE correctly. ...
JavaScript crypto - Archive of obsolete content
e 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 the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. Using the Mozilla crypto object from JavaScript Mozilla defines a special JavaScript object to allow web pages access to certain cryptographic-related services. These services are a balance between the functionality web pages need and the requiremen...
...ndicating all cryptographic mechanisms should be turned on by default (see below). cipherFlags A bit vector indicating all SSL or S/MIME cipher functions supported by the module (see below). Mechanism flag definitions In general, most tokens should not set any of the cipher flags. Setting these flags means you want your token to supply the default implementation for these functions. Normally Mozilla uses its own internal module to supply these functions. These flags override that preference. If you choose to implement these flags, your module must supply the following additional functions for each flag: PKCS11_MECH_FLAG: must support CKM_RSA_PKCS and CKM_RSA_X_509 and the following functions: C_WRAPKEY, C_ENCRYPT, C_SIGN, C_DECRYPT, C_UNWRAPKEY, C_VERIFYRECOVER, C_VERIFY, C_GENERATEKEYPAI...
...Therefore, this flag ...
...ECH_RANDOM_FLAG = 0x1<<27; //Random number generator PKCS11_PUB_READABLE_CERT_FLAG = 0x1<<28; //Stored certs can be read off the token w/o logging in PKCS11_DISABLE_FLAG = 0x1<<30; //tell Mozilla to disable this slot by default Cipher flags Reserved Important for CryptoMechanismFlags 0x1<<11, 0x1<<12, ... , 0x1<<26, 0x1<<29, and 0x1<<31 are reserved for internal use in Mozilla. Therefore, these bits should always be set to 0; otherwise, Mozilla might exhibit unpredictable behavior. Important for CipherFlags All values are reserved for internal use in Mozilla. Therefore, this flag should always be set to 0; otherwise, Mozilla might exhibit unpredictable behavior. Example of CryptoMechanismFlags and CipherFlags pkcs11MechanismFlags = PKCS11_MECH_DSA_FLAG | PKCS11_MEC...
Monitoring downloads - Archive of obsolete content
the extension loads, it will do some housekeeping chores. In particular, it needs to get an instance of the Download Manager's nsIDownloadManager interface and create the database into which its data will be stored. ...
... this.initialized = true; this.strings = document.getElementById("downloadlogger-strings"); this.dlMgr = Components.classes["@mozilla.org/download-manager;1"] .getService(Components.interfaces.nsIDownloadManager); this.dlMgr.addListener(downloadlogger); // Open the database, placing its file in the profile directory this.dbFile = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsIFile); this.dbFile.append("downloadlogger.sqlite"); // Get access to the storage service and open the database this.storageService = Components.classes["@mozilla.org/storage/service;1"] .getService(Componen...
...ject called downloadlogger_dlwindow. Since this is a simple example, it's a one-shot log window; it doesn't monitor for further changes to the log. It simply displays the state of downloads at the moment the window was opened. ...
...() { // Open the database this.dbFile = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsIFile); this.dbFile.append("downloadlogger.sqlite"); // Get access to the storage service and open the database this.storageService = Components.classes["@mozilla.org/storage/service;1"] .getService(Components.interfaces.mozIStorageService); var dbConn = this.storageService.openDatabase(this.dbFile); var loglist = document.getElementById("loglist"); var statement = dbConn.createStatement("SELECT * FROM items"); // Get all items in table try { while (statement.executeStep()) { var row = document.createElem...
Priority Content - Archive of obsolete content
ce 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 Application Development With Mozilla Original: Author's page and planned host, Ben's temporary host Wiki Location: TOC and links page still under construction. Migrators: Nigel McFarlane and Ben Karel Shorter Works Mostly completed: Bypassing Security Restrictions and Signing Code Original: Bypassing Security Restrictions and Signing Code Wiki Location: Bypassing Security Restrictions and Signing Code Migrators: Joel Stan...
...e Gecko-based Browsers Wiki Location: SOAP in Gecko-based Browsers Migrators: Doron Rosenberg In progress: CSS Support Charts Original: CSS Support Charts and Archive.org mirror Wiki Location: CSS Support Charts Migrators: Serge K. Keller Licensing: These CSS charts appear to be under a CC:By-NC-SA license, please make note of that on the page when you do the migration. Started: Using Mozilla in Testing and Debugging Web Sites Original: Using Mozilla in Testing and Debugging Web Sites Wiki Location: Using Mozilla in Testing and Debugging Web Sites Migrators: Serge K. Keller NOTE: Henrik contacted me on Apr 27 and gave us permission to use any of his materials in DevEdge in the Devmo Wiki under the CC:By-SA license (yay!) Started: Browser Feature Detection Original: Browser Fea...
... Testing and Debugging Web Sites Migrators: Serge K. Keller NOTE: Henrik contacted me on Apr 27 and gave us permission to use any of his materials in DevEdge in the Devmo Wiki under the CC:By-SA license (yay!) Started: Browser Feature Detection Original: Browser Feature Detection Wiki Location: Browser Feature Detection Migrators: Serge K. Keller Mostly Completed*: Rich-Text Editing in Mozilla 1.3 "Mostly Completed" means I'm waiting for a location to store example and source files which are required for demoing the information in the articles. Original: Rich-Text Editing in Mozilla 1.3 Wiki Location: Rich-Text Editing in Mozilla I dropped the 1.3, as the article still applies and shouldn't sound outdated. Migrators: Joel Coreson Note: the article links some external example fil...
...leted articles on the DevEdge page instead. Almost completed: Eric Meyer's articles on ViewSource See here for full list and details. Already completed migrations are listed here, and the full list will be transferred on this page once all articles are migrated. Migrators: Serge K. Keller Equivalents Security Developer Central -> Security Plugins Central -> Plugins DevEdge Community -> Mozilla Web Developer Community Notes from DevMo Wishlist DevEdge Toolbox Tools on devedge Examples on devedge Started: DevEdge Sidebar Completed: Standards-Compliant Authoring Tools on devedge Mostly completed: Tools:Validators on devedge Dependant on the sidebar tabs and the tune-up wizard. ...
Supporting per-window private browsing - Archive of obsolete content
ponents.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); if (!PrivateBrowsingUtils.isWindowPrivate(window)) { ... } } catch(e) { // pre Firefox 20 (if you do not have access to a doc. // might use doc.hasAttribute("privatebrowsingmode") then instead) try { var inPrivateBrowsing = Components.classes["@mozilla.org/privatebrowsing;1"]. getService(Components.interfaces.nsIPrivateBrowsingService). privateBrowsingEnabled; if (!inPrivateBrowsing) { ... } } catch(e) { Components.utils.reportError(e); return; } } Obtaining an nsILoadContext for priv...
...s) if not used carefully. Clearing any temporarily-stored private data It is permissable to store private data in non-persistent ways for the duration of a private browsing session. To be notified when such a session ends (i.e., when the last private window is closed), observe the last-pb-context-exited notification. ...
...n from ending If there are unfinished transactions involving private data, where the transactions will be terminated by the ending of a private session, an add-on can vote to prevent the session from ending (prompting the user is recommended). To do this, observe the last-pb-context-exiting notification and set the data field of the nsISupportsPRBool subject to true. ...
...p://example.org", null, null); channel.QueryInterface(Components.interfaces.nsIPrivateBrowsingChannel); channel.setPrivate(true); // force the channel to be loaded in private mode Similarly, XMLHttpRequest objects created via createInstance(Ci.nsIXMLHttpRequest) will often require explicit adjustment, since they have no context from which to derive a privacy status. var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpReqeust); var channel = xhr.channel.QueryInterface(Components.interfaces.nsIPrivateBrowsingChannel); channel.setPrivate(true); ...
Tamarin Build System Documentation - Archive of obsolete content
When all of the slave machines are free they all start the first build phase simultaneously. If an error or failure occurs on any slave in a phase the build stops. ...
...ceptance tests are the majority and are run on all shells (release, release-debugger, debug, debug-debugger). The test phase takes approximately 1 hour 45 minutes. The Performance and Deep phases do not run synchronously. The phases run when slaves are available and the other phases do not wait for completion to start the next build. ...
... of no checkin activity The build system prioritizes tamarin-redux checkins over sandbox builds When several tamarin-redux checkins occur the newest change is built including all checkins since the last build Each sandbox build occurs in the order they were submitted, The submitter may cancel a build. How do I build a sandbox build? Create a user repository, instructions are https://developer.mozilla.org/En/Publishing_Mercurial_Clones Go to the request a sandbox build page http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm Enter the repository url, revision number, email address, and description. the description appears in the buildbot status page, please describe what you are trying to build and test After submitting a sandbox build view the build status page or the queue (...
...questbuild.cfm Enter the repository url, revision number, email address, and description. ...
Tamarin - Archive of obsolete content
Tamarin is available under the MPL/GPL/LGPL tri-license. ...
...w to get, build, and use Tamarin. Tamarin Build System Documentation Documentation on how the Tamarin build system works and how to modify. Tamarin commit hook Instructions for installing and using the mercurial hook for Tamarin. Tamarin Acceptance Testing Instructions on how to validate changes to the Tamarin source code. Tamarin pages at wiki.mozilla.org More documentation. MMgc overview An overview of the Tamarin garbage collector. Nanojit LIR In Nanojit, LIR is the source language for compilation to machine code. Tamarin strings documentation The implementation of Tamarin strings has changed. This page is a how-to about the changes, and what can be done to adapt source cod...
...in strings documentation The implementation of Tamarin strings has changed. This page is a how-to about the changes, and what can be done to adapt source code to the changes. ...
...anges. Tamarin doxygen documentation Documentation for the latest release. ...
Writing textual data - Archive of obsolete content
nt 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. Writing to a stream In Gecko 1.8 (SeaMonkey 1.0, Firefox 1.5), you can use nsIConverterOutputStream: var charset = "UTF-8"; // Can be any character encoding name that Mozilla supports var os = Components.classes["@mozilla.org/intl/converter-output-stream;1"] .createInstance(Components.interfaces.nsIConverterOutputStream); // This assumes that fos is the nsIOutputStream you want to write to os.init(fos, charset, 0, 0x0000); os.writeString("Umlaute: \u00FC \u00E4\n"); os.writeString("Hebrew: \u05D0 \u05D1\n"); // etc. os.close(); You can also w...
....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: // First, get and initialize the ...
...verterOutputStream. 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: // First, get and initialize the converter var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); converter.charset = /* The character encoding you want, using UTF-8 for this example */ "UTF-8"; Now you can convert and write to the stream: // This code assumes that os is your nsIOutputStream // your_string here is the string you want to write. var chunk = co...
...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 */ "UTF-8"; // Now, convert a string to an nsIInputStream var stream = converter.convertToInputStream("A string with non-ASCII characters: \u00FC \u05D0\n"); // stream can now be used ...
XBL - Archive of obsolete content
erneath the bound element. Most XUL widgets are at least partially implemented using XBL. You can build your own reusable widgets from existing XUL, HTML, SVG, and other primitives using XBL. Specifications XBL 1.0 is specified in XBL 1.0 Reference. Unfortunately, the actual implementation in Mozilla is different from the specification, and there's no known document available describing the differences. Hopefully, the Reference will be updated to describe those differences. XBL 1.0 is a Mozilla-specific technology, and not a W3C standard. At least two standards spawned from it have died: sXBL and XBL 2.0. Warning: sXBL and XBL 2.0 h...
...ecific technology, and not a W3C standard. At least two standards spawned from it have died: sXBL and XBL 2.0. Warning: sXBL and XBL 2.0 have died. W3C sXBL (currently a working draft, 2005) stands for SVG's XML Binding Language. It is supposed to include a subset of XBL 2.0 features needed for SVG. It's similar in spirit to Mozilla's XBL, but there are a few subtle (and not-so-subtle) differences. For example, names of the elements are different. Also sXBL lacks 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 implementatio...
...ferences. For example, names of the elements are different. Also sXBL lacks 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). ...
...s Shadow DOM (Editor's Draft) CSS Scoping >> Shadow Encapsulation See also Introduction to XBL from the XUL Tutorial. Custom XUL Elements with XBL from the XUL School Tutorial for add-on developers XBL chapter of "Rapid Application Development with Mozilla" XBL 2.0 Primer (draft) XBL 2.0 Cross-browser implementation in JavaScript More XBL resources... Community View Mozilla forums... Mailing list Newsgroup RSS feed ...
textbox (Toolkit autocomplete) - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] This element is created by setting the type attribute of the textbox to autocomplete. It is used to create a textbox with a popup containing a list of possible completions for what the user has started to type. Toolkit applications (such as Firefox) use a different autocomplete mechanism than the Mozilla suite. The example below will create an autocomplete textbox that will search the user's history. Attributes accesskey, autocompletepopup, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltiptext,...
... autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element. autocompletesearch New in Thunderbird 2Requires SeaMonkey 1.1 Type: space-separated list of values A space-separated list of search component names, each of which implements the nsIAutoCompleteSearch interface. The components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute. search-autocomplete Requires SeaMonkey 2.1 The user's default search engine's suggestions are searched. places-tag-autocomplete Requires SeaMonkey 2.1 The user's Places tags are searched. mydomain New in Thunderbird 3 Requires SeaMonkey 2.0 The user's email domain is suggested. ...
...script context at this point can only access the following things: Global Values/Functions i.e. window, document, or any of the functions/objects/variables bound to the window object Event object Example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myFunction(e){ /* Do something cool here or just say the below */ alert(e.target.nodeName); } </script> <textbox id="find-text" onchange="return myFunction(event);"/> </window> oninput Type: script code This event is sent when a user enters text in a textbox. This event is onl...
... the forcecomplete (or forceComplete) attribute. highlightNonMatches New in Thunderbird 1 Requires SeaMonkey 1.0 Type: boolean Gets and sets the value of the highlightnonmatches attribute. ignoreBlurWhileSearching Type: boolean Gets and sets the value of the ignoreblurwhilesearching (or ignoreBlurWhileSearching) attribute. inputField Type: textbox element In Mozilla, the XUL textbox is implemented as a wrapper around an HTML input element. This read only property holds a reference to this inner input element. label Type: string Gets and sets the value of the label attribute. maxLength Type: integer The maximum number of characters that the textbox allows to be entered. maxRows Type: integer Gets and sets the value of th...
Adding HTML Elements - Archive of obsolete content
. (There are some reasons, and the main one concerns the control of the layout described later). However, this section will describe how to use them anyway. Remember that XML is case-sensitive though, so you'll have to enter the tags and attributes in lowercase. XHTML namespace In order to use HTML elements in a XUL file, you must declare that you are doing so using the XHTML namespace. ...
... doing so using the XHTML namespace. This way, Mozilla can distinguish the HTML tags from the XUL ones. The attribute below should be added to the window tag of the XUL file, or to the outermost HTML element. xmlns:html="http://www.w3.org/1999/xhtml" This is a declaration of HTML much like the one we used to declare XUL. This must be entered exactly as shown or it won't work correctly. Note that Mozilla does not actually download this URL, but it does recognize it as being HTML. Here is an example as it might be added to the find file window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gat...
... A simple table </html:td> </html:tr> </html:table> These examples will create an image from the file banner.jpg, a checkbox and a single-cell table. You should always use XUL features if they are available and you probably should not use tables for layout in XUL. (There are XUL elements for doing layout). Notice that the prefix html: was added to the front of each tag. This is so that Mozilla knows that this is an HTML tag and not a XUL one. If you left out the html: part, the browser would think that the elements were XUL elements and they would not display because img, input, table, and so on are not valid XUL tags. In XUL, you can add labels with the description or label element. You should use these elements when you can. You can also add labels to controls either by using the HTM...
...ar, 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 A description element is only valid in XUL and not in HTML. It should not have the html: qualifier. Next, we will learn how to adding spacing between elements. << PreviousNext >> ...
Adding Style Sheets - Archive of obsolete content
ok of the elements we have created so far. XUL uses CSS (Cascading Style Sheets) to customize elements. Style Sheets A style sheet is a file which contains style information for elements. It was originally designed for HTML elements but can be applied to XUL elements also, or to any XML for that matter. The style sheet contains information such as the fonts, colors, borders, and size of elements. Mozilla applies a default style sheet to each XUL window. In many cases, it will suffice to leave the defaults as is. Other times, however, you will want to provide a custom style sheet. In general, you will associate a single style sheet with each XUL file. You can place a style sheet anywhere you wish. If your XUL file is stored remotely and accessed via an HTTP URL, you can store the style sheet remot...
...ed to with the URL chrome://findfile/content/findfile.xul so the style sheet file will be stored in chrome://findfile/skin/findfile.css. All the XUL examples so far have actually been using a style sheet already. The second line has always been: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> This line indicates that we want to use the style provided by chrome://global/skin/. In Mozilla, this will be translated as the file global.css, which contains default style information for XUL elements. You could leave the line out and the elements will still work, however they will look fairly plain. The style sheet applies various fonts, colors and borders to make the elements look more suitable. Changing the Styles However, there will be times when the default look of elements will not ...
...<spacer class="titlespace"/> <hbox> <progressmeter id="progmeter" value="50%" style="display:none;"/> The new xml-stylesheet line is used to import the style sheet. It will contain the styles instead of having them directly in the XUL file. You can include any number of style sheets in a similar way. Here the style...
...the skin. If the user changes the interface skin, the files in a directory other than default will be applied. Importing Style Sheets We've already seen how to import style sheets for use. An example is shown below: <?xml-stylesheet href="chrome://bookmarks/skin/" type="text/css"?> This might be the first lines of a bookmarks window. It imports the bookmarks style sheet, which is bookmarks.css. Mozilla's skin system is smart enough to figure out which style sheet to use, because the specific filename was not indicated here. We have done a similar thing with the global style sheet file (chrome://global/skin). A style sheet may import styles from another stylesheet using the import directive. Normally, you will only import one style sheet from each XUL file. The global style sheet can be imported...
Anonymous Content - Archive of obsolete content
ful for creating a single widget that is made up of a set of other widgets, but can be referred to as only a single widget. Mechanisms are provided for adding attributes to the inner elements that were specified on the outer element. ...
...of a set of other widgets, but can be referred to as only a single widget. Mechanisms are provided for adding attributes to the inner elements that were specified on the outer element. Declaring Scrollbar Example The example below shows how a scrollbar might be declared (It has been simplified a bit from the real thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarBinding"> <content> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </content> </binding> </bindings> This file contains a single binding, declared with the binding element. The id attribute should be set t...
...l:slider> <xul:scrollbarbutton type="increment"/> </scrollbar> The elements within the content tag are added to the scroll bar anonymously. Although anonymous content is displayed on screen, you cannot get to it through a script in the normal way. To the XUL, it's as if there was only one single element, even though it is really made up of a number of elements. If you look at a scroll bar in a Mozilla window, you will see that it is made up of an arrow button, a slider, a thumb inside it and a second arrow button at the end, which are the elements that appear in the XBL above. These elements would in turn be bound to other bindings that use the base XUL elements. Notice that the content elements need the XUL namespace (they appear preceded with xul:), because they are XUL elements and aren't v...
...tton at the end, which are the elements that appear in the XBL above. These elements would in turn be bound to other bindings that use the base XUL elements. Notice that the content elements need the XUL namespace (they appear preceded with xul:), because they are XUL elements and aren't valid in XBL. This namespace was declared on the bindings tag. If you don't use the namespace on XUL elements, Mozilla will assume that the elements are XBL, not understand them, and your elements won't work correctly. Filename Input Field Example Another example, this time for a field for entering a filename: <binding id="fileentry"> <content> <textbox/> <button label="Browse..."/> </content> </binding> Attaching this binding to an element will cause it to contain a field for entering text, followed...
Introduction to XBL - Archive of obsolete content
ehavior of a XUL widget. For example, a binding might be attached to a scroll bar. The behavior describes the properties and methods of the scroll bar in addition to describing the XUL elements that make up a scroll bar. Like XUL, XBL is an XML language, so it has similar syntax rules. The following example shows the basic skeleton of an XBL file: <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl"> <binding id="binding1"> <!-- content, property, method and event descriptions go here --> </binding> <binding id="binding2"> <!-- content, property, method and event descriptions go here --> </binding> </bindings> The bindings element is the root element of an XBL file and contains one or more binding elements. Each binding element declares a single binding. The id attr...
...nt, even one you make up yourself). By assigning a class to a box tag, you can associate a binding to only those boxes that belong to that class. The following example demonstrates this. ...
...The box has been declared to have a class of okcancelbuttons. The style sheet associated with the file says tha...
...The box has been declared to have a class of okcancelbuttons. ...
The Chrome URL - Archive of obsolete content
<< PreviousNext >> The following section will describe how to refer to XUL documents and other chrome files. The Chrome URL XUL files can be referenced with a regular HTTP URL (or any type of URL) just like HTML files. However, packages that are installed into Mozilla's chrome system can be referenced with special chrome URLs. The packages included with Mozilla will already be installed but you can register your own. Installed packages have the advantage that they don't have security restrictions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. For example, a chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is u...
...ions placed on them, which is necessary for many applications. Another advantage over other URL types is that they automatically handle multiple themes and locales. For example, a chrome URL lets you refer to a file in the theme such as an image without needing to know which theme the user is using. As long as the filenames are the same in each theme, you can refer to the file using a chrome URL. Mozilla will take care of determining where the file is located and return the right data. This also means that it doesn't matter where the package is installed to be able to access it. The chrome URLs are independent of where the files might physically be located. This makes it much easier to write applications that have lots of files since you don't have to worry about the details of locating files. Th...
...ng on which part you want. <file.xul> is simply the filename. Example: chrome://messenger/content/messenger.xul The example here refers to the messenger window. You could point to a file that is part of a skin by replacing 'content' with 'skin' and changing the filename. Similarly, you can point to a file that is part of a locale by using 'locale' instead of 'content'. When you open a chrome URL, Mozilla looks through its list of installed packages and tries to locate the JAR file or directory that matches the package name and part. The mapping between chrome URLs and JAR files are specified in the manifest files stored in the chrome directory. If you were to move the file messenger.jar somewhere else and update the manifest file accordingly, Thunderbird will still work since it doesn't rely on i...
...tory that matches the package name and part. The mapping between chrome URLs and JAR files are specified in the manifest files stored in the chrome directory. If you were to move the file messenger.jar somewhere else and update the manifest file accordingly, Thunderbird will still work since it doesn't rely on its specific installed location. By using chrome URLs we can leave details like this to Mozilla. Similarly, if the user changes their theme, the 'skin' part of the chrome URL translates to a different set of files, yet the XUL and scripts don't need to change. Here are some more examples. Note how none of the URLs specify which theme or locale is used and none specify a specific directory. chrome://messenger/content/messenger.xul chrome://messenger/content/attach.js chrome://messenger/skin/...
Tree Box Objects - Archive of obsolete content
cific row in the tree. The tree will call the view to get the updated data and update the contents of the tree on screen. Other redrawing functions are invalidateCell() to redraw only a single cell invalidateColumn() to redraw a column invalidateRange() to redraw a range of rows invalidate() to redraw the entire tree. Note that redrawing does not occur until the calling script ends since Mozilla does not redraw in the background. Note: it is not necessary to run tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject) as shown in the code examples on this page because: let boxobject = tree.treeBoxObject; Note: is equivalent to: let boxobject = tree.boxObject; boxobject.queryInterface("Components.interfaces.nsITreeBoxObject"); Scrolling the Tree You can also scroll th...
...ethod since when the user resizes a flexible tree, the page size will grow and shrink, so you don't need to calculate the page size manually. This isn't too hard to calculate manually anyway since the tree box object also provides a getPageLength() function which returns the number of rows in a page. In the scrolling example above, getPageLength() would return four. Note that in Firefox 1.0 and Mozilla 1.7 and earlier, the getPageLength() function is called getPageCount() instead. The name was changed to getPageLength() since it was confusing before since it doesn't return the number of pages, but the size of each page. You could determine the number of pages by dividing the total number of rows by the page length. The ensureRowIsVisible() function will scroll to a row just as scrollToRow() d...
...an empty object and the function will fill in the 'value' property with the necessary value. The three out parameters will be filled in with the row, the column and a child type. The row is the index of the row the mouse is over, since we call it with the event coordinates of a mousemove event. If the coordinate is not over a row, the row value will be set to -1. The column is a column object in Mozilla 1.8 and later. In earlier versions, columns are identified with a string, the id of the column. In later versions, a separate column object exists, which can be queried for column data. The following line is used so that the example above will work in all versions. if (column.value && typeof column.value != "string") { column.value = column.value.id; } If the column is a string, we are runn...
...d later. In earlier versions, columns are identified with a string, the id of the column. In later versions, a separate column object exists, which can be queried for column data. The following line is used so that the example above will work in all versions. if (column.value && typeof column.value != "string") { column.value = column.value.id; } If the column is a string, we are running on Mozilla 1.7 or earlier, but for later versions we get the column id from the column object. If you are writing code for multiple versions, you should check for this as above. The last argument to getCellAt() is the child type which is filled in with a string depending on what part of the cell the coordinate is at. If you move the mouse around in the previous example, you might notice the label change be...
Trees - Archive of obsolete content
Archive › Mozilla › XUL › Tutorial › Trees
cal lists using a tree. The Tree One of the more complex elements in XUL is the tree. A tree may be used to display rows of text in columns. It can be used with rows either in a flat list or arranged into a hierarchy. A tree also allows the user to rearrange, resize and hide individual columns. Some examples of trees include the list of messages in a mail application, or the Bookmarks window in Mozilla. In some ways, a tree has some similarities with the listbox. Both can be used to create tables of data with multiple rows and columns, and both may contain column headers. The tree also supports nested rows, whereas the listbox does not. However, listboxes may contain any type of content, whereas trees may only contain text and images. (Using advanced features, progress meters or checkboxes als...
...displayed in the tree. tree This is the outer element of a tree. treecols This element is a placeholder for a set of treecol elements. treecol This is used to declare a column of the tree. By using this element, you can specify additional information about how the data in the columns are sorted and if the user can resize the columns. You should always place an id attribute on a column, as Mozilla uses the ids to identify the columns when rearranging and hiding them. This is no longer required in Mozilla 1.8 and later, but it is still a good idea to use ids on columns. treechildren This contains the main body of the tree where the individual rows of data will be displayed. Example tree with two columns Example 1 : Source View <tree flex="1"> <treecols> <treecol id="nameColumn"...
...utomatically. The button in the upper right corner can be used to hide and show the columns. You can place a hidecolumnpicker attribute on the tree and set it to true if you would like to hide this button. If this button is hidden, the user will not be able to hide columns. Make sure that you set an id attribute on each column or the hiding and showing of columns will not work in all versions of Mozilla. The treechildren element surrounds all of the rows. Inside the body are individual rows, which may in turn contain other rows. For a simpler tree, each row is created with the treeitem and treerow elements. The treerow element surrounds all of the cells in a single row, while a treeitem element would surround a row and all of its children. Trees with nested rows are described in the next sectio...
...of the search would be displayed. The tree will use a content tree view. The following code should be added in place of the iframe. <tree flex="1"> <treecols> <treecol id="name" label="Filename" flex="1"/> <treecol id="location" label="Location" flex="2"/> <treecol id="size" label="Size" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="2520 bytes"/> </treerow> </treeitem> </treechildren> </tree> <splitter collapse="before" resizeafter="grow"/> We've added a tree with three columns for the filename, the location and the file size. The second column will appear twice as wide due to the larger flexibility. A single row has been added to demonstrate what ...
XUL accessibility guidelines - Archive of obsolete content
bility features built into the XUL languages. Most of all, accessibility requires a conscious effort on your part, and a desire to include everyone. It is hoped that these guidelines will be sufficiently clear and detailed that everyone--even someone with no previous background in accessibility--can understand them. In addition, there is an active community of accessibility developers within the Mozilla Project that will be happy to help you with any concerns or questions you have in regards to making your XUL applications fully accessible. There is also a XUL accessibility tool which can help test some of these guidelines, but please be aware that no tool can replace human judgement for accessibility, and understanding the guidelines is vital. Learn More Accessibility Platform Fe...
...hat will be happy to help you with any concerns or questions you have in regards to making your XUL applications fully accessible. There is also a XUL accessibility tool which can help test some of these guidelines, but please be aware that no tool can replace human judgement for accessibility, and understanding the guidelines is vital. Learn More Accessibility Platform Features Mozilla Community Software Accessibility - Where Are We Today? Intro to accessibility, assistive technologies, and Mozilla resources. Introduction to Web Accessibility. Overview of web accessibility from WebAIM. Dive Into Accessibility. Downloadable book on web accessibility with tips and character sketches. Assistive technology compatibility. List of popular assistive technologies...
...els with XUL. #accessibility. Accessibility channel for general discussion around Internet accessibility with logger. Useful at conferences. Apple Accessibility. Portal to Apple accessibility. LARS (Linux Accessibility Resource Site). Portal for general Linux accessibility. Microsoft Accessibility. Portal for Microsoft accessibility. Accessibility - MDC. Accessibility hub on the Mozilla Developer Center. mozilla.support.accessibility. Mozilla accessibility newsgroup. #accessibility. Accessibility channel on Mozilla's IRC server. Guidelines Keyboard access Keyboard access is important to users who can't use a mouse. Many screen reader users and those with physical disabilities rely on the keyboard as their primary input tool. These users require easy, predictable...
...yboard Shortcuts. Careful attention should be taken when setting keyboard shortcuts. When creating an extension (for Firefox or another XUL application), make sure the keyboard shortcuts you assign do not interfere with those already defined by the base application. Refer to the following resources when setting keyboard shortcuts. Learn More Keyboard Shortcuts and Accesskeys Mozilla Keyboard Planning FAQ and Cross Reference. An excellent guide for determining unused key combinations and cross platform issues. Mozilla Keyboard Shortcuts. A full list of keyboard shortcuts for the various Mozilla applications. Mozilla's accesskey FAQ. A short reference for using the accesskey attribute. Context menus The context menu is the small menu activated with a right mou...
XUL accessibility tool - Archive of obsolete content
It is designed to test (insofar as automated testing is possible) the guidelines and requirement for creating accessible XUL as set forth in the XUL accessibility guidelines, and to report on any problems found in tested documents. While not meant to be a comprehensive test suite (meaning that passing all included tests does not guarantee that an application is free of accessibility bugs or issues), many of the most common accessibility mistakes will be found and reported. ...
...test suite (meaning that passing all included tests does not guarantee that an application is free of accessibility bugs or issues), many of the most common accessibility mistakes will be found and reported. Availability The XUL Accessibility Tool can currently be obtained from [http://www.xulplanet.com/aaron/files...bilitytool.xpi]. Future versions of the extension will be available from addons.mozilla.org. The version currently on XulPlanet is compatible with the following XUL applications: Firefox 1.5+ Thunderbird 3.0a+ Recent Sunbird builds Recent Songbird builds. It probably also works on Seamonkey, but I haven't verified this. Use To launch the tool after installation, look for an entry in the Tools menu of the host application, or hit Ctrl+Alt+Shift+F12. Once the tool window has lo...
...e command line, check a text file, and output the results somewhere. Known Bugs: Test for lowercase I or L as accesskey (sometimes?) flags upppercase I and L too. Possible false positives in some of the other tests Processing is slower than we would like. Ideas for further work on XUL a11y Some general ideas for using the tool and guidelines to further the accessibility cause within the Mozilla Project. Add usability, i18n, security and other considerations to XUL a11y guidelines -- make them more general Sprinkle the a11y techniques throughout the turorial and reference. Run checking tool on Firefox, Thunderbird and other apps looking for bugs and fixing them. Improve tool along the way Add checking tool to DOM Inspector or other popular XUL debugging tools. Merge with other XUL c...
...orial and reference. Run checking tool on Firefox, Thunderbird and other apps looking for bugs and fixing them. Improve tool along the way Add checking tool to DOM Inspector or other popular XUL debugging tools. Merge with other XUL checking tools -- this doesn't need to be a11y-specific. One problem is that Mark Finkle's XUL Validator tool uses a different engine. Add the tool into the addons.mozilla.org review process Go through the most useful/popular extensions with tool and fix a11y issues Add checker to tinderbox so that bugs are caught at checkin time Some or all of this work could be done through grants, and a likely person to oversee the grant deliverables and milestones would be Mark Finkle. He has volunteered to take that on. ...
tree - Archive of obsolete content
Archive › Mozilla › XUL › tree
is false by default. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. builderView Type: nsIXULTreeBuilder A reference to the tree builder which constructed the tree data. The builder provides access to the RDF resources for each row in the tree, and allows sorting the data by column. In newer versions of Mozilla, the builderView property is actually a synonym for the view property, since the two interfaces are flattened together into a single interface in JavaScript. This property is read-only. columns Type: nsITreeColumns Returns the columns for the tree as an nsITreeColumns object. contentView Type: nsITreeContentView For trees built with a content builder ...
...- that is, those that do not have flags set -- the contentView will be a reference to the nsITreeContentView for the tree. This interface lets you retrieve the DOM element corresponding to a given a row index and vice versa. For trees that are not built with a content builder, the functions of nsITreeContentView will not be available, since there are no DOM nodes to retrieve. In newer versions of Mozilla, the contentView property is actually a synonym for the view property, since the two interfaces are flattened together into a single interface in JavaScript. This property is read-only. currentIndex Type: integer Set to the row index of the tree caret in the tree. For trees with focus, the caret's position is indicated by the focus ring, but unfocused trees won't show a fo...
...g. selType Type: string Gets and sets the value of the seltype attribute. selstyle Type: string If set to the value primary, only the label of the primary column will be highlighted when an item in the tree is selected. Otherwise, the entire row will be highlighted. To see the difference, compare the selection style in the folder list and the message list in Mozilla mail. tabIndex Type: integer Gets and sets the value of the tabindex attribute. treeBoxObject Type: nsITreeBoxObject The box object is responsible for rendering the tree on the window. This object implements the nsITreeBoxObject interface and contains functions for retrieving the cells at certain coordinates, redrawing cells and scrolling the tree. This property is eq...
...etElementById('mytree'); document.title = t.view.getCellText(t.currentIndex,t.columns.getNamedColumn('age')); To select the checkbox and display the cell's text value, you can use code like the following. ...
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
APIs which can be used to render web pages within native and Java applications. XULRunner 1.8.0.4 is now available as a security/stability update; all users should install this new version. System Requirements Before installing, make sure your computer meets the system requirements. The system requirements for XULRunner are the same as the system requirements for Firefox. Installing XULRunner Mozilla provides XULRunner for Windows, Mac OS X, and Linux, in English: Download XULRunner for Windows Download XULRunner for Mac OS X Download XULRunner for Linux Windows Unpack the ZIP file to a new directory using a archive tool (7zip is recommended). The following directory is recommended: C:\Program Files\Mozilla XULRunner\1.8.0.1 . To register XULRunner with the system, open a command...
... of XULRunner installed on Mac OS X, it is not possible to uninstall only one version. To remove all installed versions of XULRunner, remove the /Library/Frameworks/XUL.framework directory. Installing XUL Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. ...
...Applications XUL applications can be obtained from various sources, and are typically packaged as a ZIP archive with the extension .xulapp or .xpi. Sample applications are available from the Mozilla Developer Center. Save the application archive to your desktop or another convenient place. ...
...Asked Questions Why is installing XULRunner so painful? Why isn't there a nice installer? Because nobody has written that code yet! This is a developer preview release: additional features for installing and deploying XULRunner and applications based on XULRunner will be available in future releases. I'm writing a XUL application, how can I deploy that application to my users? Right now Mozilla recommends that XULRunner should be deployed privately with each application. See Deploying XULRunner 1.8 for more information. Where is the source code? Here. 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 ...
Debugging a XULRunner Application - Archive of obsolete content
CONSOLE_LOG=C:\path\to\logfile. To output messages to the JavaScript console There are two ways to output messages to the JS console: Components.utils.reportError(str) will output str as an "error" (i.e. with the red stop icon next to it). jsdump(str) (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 Fire...
... the following to your prefs.js: (in recent ffox, edit about:config instead) pref("devtools.debugger.remote-enabled", true); In Firefox, go to Tools > Web Developer > Connect... and you should be able to point the debugger to your app. Happy debugging :) Venkman Follow these instructions to install Venkman into your XULRunner application (XULRunner 1.9 and later): Get Venkman from addons.mozilla.org (v0.9.87 at the time of writing). To download the package, right-click the install link and save the package locally. Create a directory <application>/distribution/bundles/venkman. Unzip the package into that directory. Add <script src="chrome://venkman/content/venkman-overlay.js" /> to one of your XUL windows. Add UI to open Venkman to your window (it could be a menu item or a toolbar but...
...d them in open windows tab When opening a JS file in Venkman, the code is unformatted and I get the following error in the jsconsole... Security Error: Content at x-jsd:source?location=chrome%3A%2F%2Fvenkman%2Fcontent%2Fvenkman-overlay.js&instance=12 may not load or link to chrome://venkman/skin/venkman-source.css. Note the "New in Firefox 3" attribute "contentaccessible" on https://developer.mozilla.org/En/Chrome_Registration so as per http://markmail.org/message/ezbomhkw3bgqjllv#query:x-jsd+page:1+mid:xvlr7odilbyhn6v7+state:results change the manifest to have this line: content venkman jar:venkman.jar!/content/venkman/ contentaccessible=yes I get errors about not being able to open contentAreaUtils.js, contentAreaDD.js, findUtils.js, or contentAreaUtils.js... Inspired by http://article.
...ration so as per http://markmail.org/message/ezbomhkw3bgqjllv#query:x-jsd+page:1+mid:xvlr7odilbyhn6v7+state:results change the manifest to have this line: content venkman jar:venkman.jar!/content/venkman/ contentaccessible=yes I get errors about not being able to open contentAreaUtils.js, contentAreaDD.js, findUtils.js, or contentAreaUtils.js... ...
Dialogs in XULRunner - Archive of obsolete content
imilar to creating windows. Each dialog is described in its own XUL file. XUL provides a dialog element to act as the container for the dialog. Dialog XUL files can have DTD, CSS, and JavaScript, just like windows. ...
...utton's caption, and the access key for the button, as well as the JavaScript function to call if the button is pressed. XUL handles placing and styling the buttons on the dialog. This is also nice for cross-platform applications, as each OS has its own convention for where buttons should be placed on a dialog. Here is a short list of the button attributes on dialog; see also Creating dialogs at MozillaZine knowledge base: buttons A comma separated list of buttons to show on dialog (accept, cancel, help, extra1, and extra2). buttonlabelaccept Label for the accept button; similar attributes exist for the other button types. buttonaccesskeyaccept Access key for the accept button; similar attributes exist for the other button types. ondialogaccept JavaScript to execute if the accept butto...
...of the most frequently used common dialogs are for opening and saving files. For instance, Windows has supported built-in file open and file save dialogs for many years, and the Macintosh has always had them. It makes creating an application easier for developers; in addition, the consistent user experience also makes applications easier to use. XUL supports native implementations of filepickers (Mozilla terminology for File Open and Save dialogs). Newer releases will allow using preferences to switch to a XUL emulation filepicker, if you want to. The XUL filepickers are XPCOM components and must be instantiated before using, like this: function doFileOpen() { /* See: http://developer.mozilla.org/en/docs/XUL_Tutorial:Open_and_Save_Dialogs */ var nsIFilePicker = Components.interfaces.nsIFile...
...ogs). Newer releases will allow using preferences to switch to a XUL emulation filepicker, if you want to. ...
XULRunner - Archive of obsolete content
Releases Until version 41, XULRunner could be downloaded from ftp.mozilla.org. ...
... Releases Until version 41, XULRunner could be downloaded from ftp.mozilla.org. ...
...at can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It provides mechanisms for installing, upgrading, and uninstalling these applications. XULRunner also provides libxul, a solution which allows the embedding of Mozilla technologies in other projects and products. Releases Until version 41, XULRunner could be downloaded from ftp.mozilla.org. Firefox (from version 3) ships with a private XULRunner package, which can run any compatible XULRunner application using the -app switch: firefox -app application.ini is equivalent to xulrunner -app application.ini Older builds are also available. Overview Development Plan What XULRunner Provides XULRunner FAQ Nightly builds: unstable-trunk ...
...ailable applications based on XULRunner. Build Documentation Learn how to get the source and build it. Debug Documentation Steps to configure Venkman to debug your App XULRunner Guide A fairly complete, but outdated, introduction and tutorial for XULRunner which collates much of the documentation found here. View all... Community View Mozilla forums... Mailing list Newsgroup RSS feed #xulrunner on irc.mozilla.org Other community links... Related topics XUL See also A brief introduction to XULRunner ...
2006-10-13 - Archive of obsolete content
Summary: mozilla.dev.apps.firefox - October 6, 2006 - October 13, 2006 Announcements Firefox Vista compatible and versioning heads up Robert Strong describes the compatibility between Windows Vista and Firefox, also about the versioning change. Large discussion about why the use of the sequence 2.0.0.*. Discussions Everyone and his goldfish thinks bug 300198 should be fixed Large response to the discussion about the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=300198, regarding middle clicking on a tab. Annoying Firefox 2 Save dialog instead of Open/Save ones. ...
... about why the use of the sequence 2.0.0.*. Discussions Everyone and his goldfish thinks bug 300198 should be fixed Large response to the discussion about the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=300198, regarding middle clicking on a tab. Annoying Firefox 2 Save dialog instead of Open/Save ones. User questions about a Open/SaveAs bug that already exisits: https://bugzilla.mozilla.org/show_bug.cgi?id=347230 Installer for 2.0RC2 ehume gives the developers a thumbs up for the new installer for 2.0RC2 having a textfield where you can type in the installation directory. A way to recover the toolbars from popup windows that hide it A suggestion for a way to recover toolbars from a popup window that disables it. User suggests 3 ways, and suggests a default. (No responses...
...e Compile error while compiling first build. User was conservative on what libraries they used, but now they have a compile error and can't make sense of it. No responses as of yet. Firefox browser problem: width:30ex does not respect font Discussion about a font rendering problem with Firefox Print on the Firefox context menu User would like discussion about why the bug https://bugzilla.mozilla.org/show_bug.cgi?id=204519 is a WONTFIX. (User feels Print belongs on the context menu along with Back, Reload, etc.) Questions About Programming For Firefox A Student questions how to create an extension that changes fonts, and how to capture website content before it is displayed. Firefox add-on wanted User is inquiring if there is such an application to automatically save pieces of a w...
...ayed. Firefox add-on wanted User is inquiring if there is such an application to automatically save pieces of a webpage everytime is it updated. Firefox 2.0 should re-implement modal window.open to support Web 2.0 User would like the option to show pop-up windows, using window.open(), from inside untrusted script, to be re-implemented. This function was disabled, see bug: https://bugzilla.mozilla.org/show_bug.cgi?id=180048 Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Summary List ...
Server-Side JavaScript - Archive of obsolete content
n the server from those available in the browser, leading to segregated teams, disparate and inconsistent know-how, and plenty of server-side string manipulation gymnastics to generate HTML or Ajax pages. The simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire. ...
...nerate HTML or Ajax pages. The simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire. But back then, 350 MHz servers were the best you could buy, and Mozilla was yet to emerge from the Netscape organization to continue to advance the state of Web technologies. Today with computing cycles having increased more than 10-fold and Mozilla's work on Rhino (JavaScript interpreter in Java) and SpiderMonkey (JavaScript interpreter in C) and JavaScript itself, we have very solid foundations for JavaScript to be extraordinarily useful and applicable on the server-side again -- with performance in the same range as popular server-side environments like PHP and Ruby on Rails. Now, with TraceMonkey available, JavaScript (both client sid...
...preter in C) and JavaScript itself, we have very solid foundations for JavaScript to be extraordinarily useful and applicable on the server-side again -- with performance in the same range as popular server-side environments like PHP and Ruby on Rails. Now, with TraceMonkey available, JavaScript (both client side and server-side) can see 20x to 40x speed improvements according to Brendan Eich, Mozilla CTO and creator of JavaScript. Server-Side JavaScript is another way in which, as this article quotes Eich, "Mozilla wants to 'get people thinking about JavaScript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'" Many vendors today are embedding Mozilla Rhino or Mozilla SpiderMonkey into Web server environments. Some, like Aptana wi...
...another way in which, as this article quotes Eich, "Mozilla wants to 'get people thinking about JavaScript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'" Many vendors today are embedding Mozilla Rhino or Mozilla SpiderMonkey into Web server environments. Some, like Aptana with the open source Jaxer server actually embed the entire Mozilla Firefox browser engine (including SpiderMonkey) within a Web server to enable server-side Ajax and server-side DOM access in addition to server-side execution of JavaScript. ...
Reference - Archive of obsolete content
code if they cannot be written in a "version-neutral" manner. Do you think this makes sense? -- dria 04:27, 22 September 2005 (PDT) Those examples are not "bad examples" per se. They are there specifically to show the differences between the two versions. I was wondering what should be done about those examples, since they would no longer be valid with Fx 1.5+ and family. BTW, https://bugzilla.mozilla.org/attachment.cgi?id=195375 is a screenshot of a table of differences. --Maian 05:10, 22 September 2005 (PDT) If the examples are there specifically to show the differences between two versions of JS, and if we have a section in the reference that is dedicated to discussing these differences, I would think that those samples should be included in that section of the reference. Or am I misunde...
...ns 1.6 and 1.7. With <script type="application/javascript;version=1.7" />. See New_in_JavaScript_1.7#Using_JavaScript_1.7. This will impact the presentation of future examples if it hasn't already. --George3 11:47, 14 Sept 2006 (EDT) SGML comment hiding quirks SGML comment hiding needs to be mentioned here and its consequences. Brendan just mentioned one obscure one here: https://bugzilla.mozilla.org/show_bu...?id=310993#c20 --Maian 22:46, 5 October 2005 (PDT) Section title capitalization There's an inconsistency in the capitalization of section titles. Some capitalize everything as if it's a book title. Others just capitalize the first word. Which scheme should we take, or does it even matter? --Maian 07:11, 8 September 2005 (PDT) If you want to make them consistent, I think we shou...
...s be added to all the examples? --Maian 21:06, 25 Aug 2005 (PDT) The original authors didn't use semicolons, but I'd add them. --Nickolay 00:58, 26 Aug 2005 (PDT) (More coding style questions) --Maian 04:06, 31 Aug 2005 (PDT) I'd say, just make a note here about decisions you make. It would be best to have all examples to use the same style. --Nickolay 05:37, 31 Aug 2005 (PDT) Gonna follow Mozilla's coding guides here: http://www.mozilla.org/hacking/mozil...de.html#Visual --Maian 00:30, 20 September 2005 (PDT) btoa() and atob() base64 encode and decode functions This documentation is missing the base64 encode (btoa) and decode (atob) functions. Anyone know why this has been left out? Danbeck 07:02, 22 September 2005 (PDT) AFAICT , base64-related functionality is not a part of the Jav...
...free to field ideas/concept to the DevMo Mailing List for discussion, and then actually code it (or find someone to do so). Thanks for your thoughts --Callek 15:05, 13 January 2006 (PST) Notification when reorganization is finished Leandro (localiser for the Portuguese wiki) would like to be emailed when the JS Reference reorganization has been finished. His user page is here: http://developer.mozilla.org/pt/docs...%C3%AAs_Xavier -- dria 08:19, 24 February 2006 (PST) Object and Function Relation here is my problem , it has been breaking my head for quite some time now. i'm very confused about the way Function and Object in the JavaScript core are related at first i thought it was something like this : Function -> Object -> instance instance is for example the Math Object, it behaves same...
Requests For Enhancement - Archive of obsolete content
Archive › Web › XForms › RFE
You can also contact the XForms team about your request. You can do so by posting a message on the XForms Newsgroup or file a new bug in the 'XForms' component of the 'Core' product. An additional way to attract the XForms team's attention to an enhancement request you are promoting is to vote for the bug that is related with the feature request (if there is no bug yet then please feel free to file it). ...
...hat 14 year old HTML hacks CAN build really powerful web apps and reduce the need for JavaScript by 90%. Now we need to start teaching XForms to web newcomers before 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 ...
...ntation 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. Custom Controls Interfaces This section contains RFE to the custom control interfaces. If you find that you can't create a custom control due to limitations in our interfaces or the functionality of our controls, then this is the right place to pass along your...
... please file it here. This section could be of particular interest to people using custom controls in XUL documents for the following reasons: XUL, in many cases, is much better suited for application development than XHTML. Therefore the control set may need to be more extensive to address the wider spectrum of requirements that a XUL application will have on its controls. XUL is a feature of Mozilla only and custom control authors should be aware their controls won't work on other browser platforms. Enhancements of XForms elements If you find that none of the elements proposed by the XForms spec address your requirements, please post your usecase here. XForms extension UI This section should be for used for noting potiential UI improvements to the Mozilla XForms extension. ...
XForms Styling - Archive of obsolete content
Processors such as Chiba create "old-style" HTML forms from XForms documents, and must be styled accordingly. However, most of the time the transition is straight-forward: View the source after processing of your XForms document, and map the old styles to the new elements. ...
...Processors such as Chiba create "old-style" HTML forms from XForms documents, and must be styled accordingly. However, most of the time the transition is straight-forward: View the source after processing of your XForms document, and map the old styles to the new elements. ...
..., most of the time the transition is straight-forward: View the source after processing of your XForms document, and map the old styles to the new elements. ...
...the source after processing of your XForms document, and map the old styles to the new elements. Appearance attributes can also make a big difference. ...
XForms Input Element - Archive of obsolete content
rol is bound (see the spec). Attributes UI Common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control Single-Node Binding Special inputmode - not supported for this control incremental - supported. The default value is 'false'. Mozilla Extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) Type restrictions The input element can be bound to a node containing simple content of any data type except xsd:base64Binary, xsd:hexBinray or any data type derived from these. Representations The xforms input element can be represented by the following widgets for the spcified data typ...
...corresponding label can be displayed before or after the checkbox by using the labelposition attribute. Specific handling of attributes incremental - if "true" or this attribute is omitted from this element, then the instance node will be updated when the user checks or un-checks the checkbox. If "false" then the instance node will be updated when the checkbox loses the focus. ...
...the checkbox by using the labelposition attribute. Specific handling of attributes incremental - if "true" or this attribute is omitted from this element, then the instance node will be updated when the user checks or un-checks the checkbox. If "false" then the instance node will be updated when the checkbox loses the focus. labelposition - a Mozilla XForms extension in the namespace http://www.mozilla.org/projects/xfor...009/extensions. This attribute is optional, possible values are before and after. The default value if omitted is after. It controls the display of the label relative to the checkbox. before shows the label first, then the checkbox, after shows the checkbox, than the label. labelposition was introduced with Mozilla XForms 0.8.8. Before that, the default behavior was to display...
...ncremental - if "true", the bound instance node will be updated on each character typed by the user or when the user clicks on a date from the calendar widget. If "false" or the incremental attribute is omitted on this element then the bound instance node will be updated when the control loses focus. calendar A form author may notice a xforms input element represented by a calendar widget in the Mozilla XForms processor if the control meets the following criteria (xhtml/xul). Characteristics the bound instance node is of type xsd:date or a type derived from it appearance attribute also contains the value "full" firefox 2.0 doesn't currently contain any similar XHTML or XUL widgets. months list This widget is similar to a combo box populated with the sequence of the 12 month names that comprise...
XUL Parser in Python - Archive of obsolete content
With new widgets and attributes landing all the time, I wanted to get some quicker way of looking at the XUL--at particular builds, at particular widgets, at which elements had which attributes, etc. ...
...r</tt> command it depends on gets you your XUL files. Again, you can easily use <tt>ls</tt> instead, as I should have done, and pick up some extra support. I will make these adjustments and change it into a real module when I get a second, so that someone can instantiate the parser from their own scripts and use it more flexibly: >>> import XULTool >>> myXP = XULParser() >>> CHROME_DIR = 'D:\src\mozilla\xpfe' >>> res = myXP.parseXUL(CHROME_DIR, 'window', 'id') Where something like the above would write out all the XUL window ids in the build. Something like that, anyway. Results The results from the script are written to a file called res.html. This is another hard-coded thing I have to open up. If you want to test this script you should change the filename "res.html" specified in the fourth...
...instead of thekeys: for item in elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_list[item].values(): w.write('<tr><td class="at">' + a + '</td>') With these modifications, the script creates an output more like a Periodic Table of XUL Elements. Until I spruce it up a little, this is just a very basic demonstration of using Python's XML parser with XUL. But Mozilla's upcoming support for languages like Perl and Python will really open up the Mozilla platform to tools and approaches of this kind--and make now a good time to start thinking about how these various technologies will be put together. The first level of support for Python in Mozilla will apparently be for Python modules made available as XPCOM objects. Extending on the approach in this script, th...
...of introspective XUL chrome that could modify and replicate itself by calling services from the XULParser and XULWriter XPCOM objects. Please feel free to suggest changes, change the format of the results output, or adapt this script in any way you want. I have probably made some errors and undoubtedly written some strange, graceless Python. Most of all, please feel free to experiment with the Mozilla development platform in this way or in any other way you can imagine. Original document information Author: Ian Oeschger ...
Community - Extensions
If you know of useful mailing lists, newsgroups, forums, or other communities related to extension development, please link to them here. ...
... If you know of useful mailing lists, newsgroups, forums, or other communities related to extension development, please link to them here. ...
... If you know of useful mailing lists, newsgroups, forums, or other communities related to extension development, please link to them here. ...
...Zine Extensions & Themes forum #extdev channel on moznet IRC network -- extension development questions #addons channel on moznet IRC network -- questions about http://addons.mozilla.org mozdev project owners mailing list Mozillazine Knowledge Base AllYourIdeas -- ideas for extensions ((REALLY needs a unique CAPTCHA)) BabelZilla -- a community for developers and translators of extension for Mozilla Applications ...
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
ze of the body of the request message. However, these entity headers are often 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. ...
...quest message. However, these entity headers are often 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. ...
...listed in responses to preflight requests. ...
...r: https://developer.mozilla.org/testpage.html Connection: keep-alive Upgrade-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 ...
Site - MDN Web Docs Glossary: Definitions of Web-related terms
web content is determined by the registrable domain of the host within the origin. This is computed by consulting a Public Suffix List to find the portion of the host which is counted as the public suffix (e.g. com, org or co.uk). The concept of a site is used in SameSite cookies, as well as a web application's Cross-Origin Resource Policy. ...
...strable domain of the host within the origin. This is computed by consulting a Public Suffix List to find the portion of the host which is counted as the public suffix (e.g. com, org or co.uk). The concept of a site is used in SameSite cookies, as well as a web application's Cross-Origin Resource Policy. ...
...ed by consulting a Public Suffix List to find the portion of the host which is counted as the public suffix (e.g. com, org or co.uk). The concept of a site is used in SameSite cookies, as well as a web application's Cross-Origin Resource Policy. ...
...a web application's Cross-Origin Resource Policy. ...
HTML basics - Learn web development
the order of the items doesn't matter, such as a shopping list. These are wrapped in a <ul> element. Ordered lists are for lists where the order of the items does matter, such as a recipe. These are wrapped in an <ol> element. Each item inside the lists is put inside an <li> (list item) element. For example, if we wanted to turn the part of the following paragraph fragment into a list <p>At Mozilla, we're a global community of technologists, thinkers, and builders working together ... </p> We could modify the markup to this <p>At Mozilla, we're a global community of</p> <ul> <li>technologists</li> <li>thinkers</li> <li>builders</li> </ul> <p>working together ... </p> Try adding an ordered or unordered list to your example page. Links Links are very important -- they are what ma...
...</li> <li>builders</li> </ul> <p>working together ... </p> Try adding an ordered or unordered list to your example page. Links Links are very important -- they are what makes the web a web! To add a link, we need to use a simple element -- <a> -- "a" being the short form for "anchor". To make text within your paragraph into a link, follow these steps: Choose some text. ...
...n ordered or unordered list to your example page. Links Links are very important -- they are what makes the web a web! To add a link, we need to use a simple element -- <a> -- "a" being the short form for "anchor". To make text within your paragraph into a link, follow these steps: Choose some text. We chose the text "Mozilla Manifesto". ...
... what makes the web a web! To add a link, we need to use a simple element -- <a> -- "a" being the short form for "anchor". To make text within your paragraph into a link, follow these steps: Choose some text. We chose the text "Mozilla Manifesto". Wrap the text in an <a> element, as shown below: <a>Mozilla Manifesto</a> Give the <a> element an href attribute, as shown below: <a href="">Mozilla Manifesto</a> Fill in the value of this attribute with the web address that you want the link to link to: <a href="https://www.mozilla.org/about/manifesto/">Mozilla Manifesto</a> You might get unexpected results if you omit the https:// or http:// part, called the protocol, at the beginning of the web address. After making a link, click it to make sure it is sending you where you wanted ...
Index - Learn web development
bout most of these. In this article, we'll just set you up with a bare minimum -- a text editor and some modern web browsers. 42 JavaScript basics Beginner, CodingScripting, JavaScript, Learn, Web, l10n:priority JavaScript ("JS" for short) is a full-fledged dynamic programming language that can add interactivity to a website. It was invented by Brendan Eich (co-founder of the Mozilla project), the Mozilla Foundation, and the Mozilla Corporation. 43 Publishing your website Beginner, CodingScripting, FTP, GitHub, Google App Engine, Learn, Web, l10n:priority, publishing, web server Publishing a website is a complex topic because there are many ways to go about it. This article doesn't attempt to document all the possible methods. Instead, it explains the adv...
...ng how they can help us solve such problems. 55 Making asynchronous programming easier with async and await Beginner, CodingScripting, Guide, JavaScript, Learn, Promises, async, asynchronous, await More recent additions to the JavaScript language are async functions and the await keyword, part of the so-called ECMAScript 2017 JavaScript edition (see ECMAScript Next support in Mozilla). These features basically act as syntactic sugar on top of promises, making asynchronous code easier to write and to read afterwards. They make async code look more like old-school synchronous code, so they're well worth learning. This article gives you what you need to know. 56 Client-side web APIs API, Articles, Beginner, CodingScripting, DOM, Graphics, JavaScript, Landing, Lear...
...cr That's all for now. We have covered images and captions in detail. In the next article we'll move it up a gear, looking at how to use HTML to embed video and audio in web pages. 247 Test your skills: HTML images Beginner, HTML, Images, Learn, test your skills This aim of this skill test is to assess whether you've understood our Images in HTML article. ...
... Images in HTML article. 248 Mozilla splash page Assessment, Beginner, CodingScripting, Embedding, HTML, Images, JPEG, Multimedia, PNG, Video, iframe, img, picture, responsive, sizes, src, srcset In this assessment, we'll test your knowledge of some of the techniques discussed in this module's articles, getting you to add some images and video to a funky splash page all about Mozilla! 249 Responsive images Article, Beginner, CodingScripting, Design, Graphics, Guide, HTML, Image, Intermediate, JPEG, PNG, Pictures, captions, hyperlinks, img, picture, sizes, src, srcset That's a wrap for responsive images -- we hope you enjoyed playing with these new techniques. As a recap, there are two distinct problems we've been discussing here: 250 Video and ...
Getting started with React - Learn web development
er the entire user interface of an application, using tooling provided by Facebook's own create-react-app tool. How does React use JavaScript? React utilizes features of modern JavaScript for many of its patterns. Its biggest departure from JavaScript comes with the use of JSX syntax. JSX extends JavaScript's syntax so that HTML-like code can live alongside it. ...
...ve alongside it. For example: const heading = <h1>Mozilla Developer Network</h1>; This heading constant is known as a JSX expression. React can use it to render that <h1> tag in our app. Suppose we wanted to wrap our heading in a <header> tag, for semantic reasons? ...
... Of course, your browser can't read JSX without help. ...
...> However, this looks kind of awkward, because the <header> tag that starts the expression is not indented to the same position as its corresponding closing tag. Of course, your browser can't read JSX without help. When compiled (using a tool like Babel or Parcel), our header expression would look like this: const header = React.createElement("header", null, React.createElement("h1", null, "Mozilla Developer Network") ); It's possible to skip the compilation step and use React.createElement() to write your UI yourself. In doing this, however, you lose the declarative benefit of JSX, and your code becomes harder to read. Compilation is an extra step in the development process, but many developers in the React community think that the readability of JSX is worthwhile. Plus, popular tooling m...
Information for External Developers Dealing with Accessibility
Accessibility API cross reference Should be helpful at anyone looking at implementing accessibility API support for a product on multiple platforms. Contains info on accessible roles, states and events. ...
...f function keys, what are reserved keyboard shortcuts, how to create your own keyboard shortcuts, keyboard focus and navigation, type-ahead and key-repeat, etc. Gnome keys: Keyboard documentation for Gnome 2.2: still seeking developer guidelines for keyboard. Other Useful Resources Links for those who wish to learn more about web accessibility or open source accessibility. Join the Mozilla Accessibility Community Live Chat Both 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google ...
...C 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. ...
... good chance to find someone to chat with there, day or night. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. ...
Software accessibility: Where are we today?
for adaptive technology professionals to make money on rehab, trainingand support - something there is currently not enough of. Each end user has a unique set problems, and in the open source world, providing highly customized solutions can be a business in itself. Right now, GUI's on Linux are mostly not accessible. Microsoft Windows is still far more accesible. ...
...Please follow the practical techniques put forth listed in the Accessible XUL Authoring Guidelines. These guidelines cover many possible scenarios. ...
... potential "gotchas" when developing XUL UI. Please follow the practical techniques put forth listed in the Accessible XUL Authoring Guidelines. These guidelines cover many possible scenarios. If you take a little time to learn them, they will become an unconscious improvement to your design and engineering technique. ...
...Engineers can provide context simply by creating an nsIAccessible for each custom control. The infrastructure to do this is straightforward. Other developers No matter what kind of work you do, the basis of accessibility is the need to understand that every user is different. ...
Simple Sunbird build
sudo port install mercurial libidl autoconf213 Problems? See Mac OS X build prerequisites. Windows: If you're using Windows XP, you must have Windows XP Service Pack 2 and .NET Framework 2.0. Install Visual C++ 2005 or 2008. Both the professional edition and the express edition will work. You may need to install one or more Windows SDKs. See Windows SDK versions for a quick guide. Install MozillaBuild, a package of additional build tools. (If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'. After that all should be well.) Open a shell window by running: c:\mozilla-build\start-msvcX.bat (where X is 8 for VS 2005, and 9 for VS 2008). Problems? See Windows build prerequisi...
...nd lots of available swap space. On Windows, if you open the command prompt you are usually in your user profile folder which often contains spaces ( C:\Documents and Settings\...). This causes problems while building. To avoid this issue, change to a directory without spaces (i.e. C:\ ) before doing the following steps. You can use the "cd" command to do so. # Get the source hg clone http://hg.mozilla.org/comm-central/ cd comm-central python client.py checkout # Setup a basic .mozconfig file echo 'ac_add_options --enable-application=calendar' > .mozconfig # let's build Sunbird... echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-sb-release' >> .mozconfig # ...in this directory... # USE THIS ONLY IF NOT ON WINDOWS! Parallel compilation on Windows is # unreliable now due to b...
.... # Build make -f client.mk For a debug build, you need different configuration options in your .mozconfig file. This requires more disk space, about 2.5 GB. mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-sb-debug ac_add_options --enable-application=calendar ac_add_options --enable-debug ac_add_options --disable-optimize Running Sunbird The Sunbird executable can be found in objdir-sb-release/mozilla/dist/bin/ (on Mac, objdir-sb-release/dist/Calendar.app/Contents/MacOS/). Building Sunbird and Lightning If you've set up you build environment as above, then all you need to do is: echo 'ac_add_options --enable-calendar' >> .mozconfig or just add the ac_add_options --enable-calendar line to your .mozconfig with your favourite editor. Then just re-run the "make -f client.mk" command above (you c...
... you build environment as above, then all you need to do is: echo 'ac_add_options --enable-calendar' >> .mozconfig or just add the ac_add_options --enable-calendar line to your .mozconfig with your favourite editor. Then just re-run the "make -f client.mk" command above (you can do the addition before running make for the first time). This will build the lightning extension into src/../objdir-sb/mozilla/dist/xpi-stage/. See this section for information on how to easily integrate Lightning into a nightly version of Thunderbird. How to build again later In your comm-central directory, run these commands: # Get the latest source python client.py checkout Then just re-run the "make -f client.mk" command above. make will only recompile files that changed, but it's still a long haul. An incremental ...
Gecko SDK
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. 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...
...t to build general functionality. That's the reason why the Gecko SDK was devised. Do not confuse the Gecko/XULRunner SDK with XULRunner itself. ...
... 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. You do have to get and distribute the newest Gecko components (gklayout.dll etc.), though. Downloading For Gecko versions before 2.0, you should choose the Gecko SDK version for the earliest version of Mozilla you wish to target. For Gecko versions 2.0 and higher, you...
...s the following: 1.9.2 IDL files for frozen interfaces (under idl/) Header files for frozen interfaces, XPCOM functions, and NSPR functions (under include/) Import libraries or shared libraries (under lib/) Static utility libraries (under lib/) Various tools (under bin/) For more information about safely linking XPCOM components using the XPCOM "glue" library, see XPCOM Glue. Using the Mozilla Build System with the SDK It's possible to use the Mozilla Build System with the SDK. This can be done by downloading the source code for Firefox and using the --with-libxul-sdk option to configure. Resources static xpidl.exe (non-official) If you are looking for a static linked xpidl.exe, you can download here. Mac Intel Gecko 1.8 SDK The official Mac 1.8 SDK is a ppc version. This is an u...
JNI.jsm
he 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 recommended to use slash notation. So for GeckoAppShell we woul...
... 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. ...
...ger;', WindowManager_LayoutParams: 'Landroid/view/WindowManager$LayoutParams;', ViewGroup_LayoutParams: 'Landroid/view/ViewGroup$LayoutParams;', View: 'Landroid/view/View;', void: 'V', Context: 'Landroid/content/Context;', String: 'Ljava/lang/String;', Object: 'Ljava/lang/Object;', GeckoAppShell: 'Lorg/mozilla/gecko/GeckoAppShell;' }; var GeckoAppShell = JNI.LoadClass(my_jenv, fullyQualifiedNameOfClass(SIG.GeckoAppShell), { static_methods: [ { name: 'getContext', sig: '()' + SIG.Context }] }); var Context = JNI.LoadClass(my_jenv, fullyQualifiedNameOfClass(SIG.Context), { methods: [ ...
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 a...
...r locale Simple workflow, just put the file on svn and it can appear on the staging server Disadvantages to HTML Very hard for QA If localizer changes something incorrectly (i.e. accidentally removes some HTML like </h1>, that localizer can break everything.) Very hard to update automatically, if not impossible. Can be hard to tell what has changed .lang files Historically, Mozilla has used a gettext-like file to present content for localization. .lang files provide some features that differentiate it from Gettext: .lang is not dependent on PHP/.po library, so if our webdev team sets up a site without gettext support, we still have .lang. (It should be noted that this is near impossibility since most sites will be set up with gettext support.) .lang files can be easily ...
... used by the web developer. See the example below. ...
...ntended changes Disadvantage of gettext .po file needs to be compiled into a .mo file for localizer to see changes Using regular diff to see changes to a file is sometimes impossible because the editing tool can save the .po file using a completely different structure or order of entities. Read more about gettext on Wikipedia and on MDC. Wiki Blogging, documentation, and other types of Mozilla content often surface as wikis. Case study: Download Day In the above Gettext example, notice how the web developer used "certificate_intro" as the value of the msgid. This is not the actual content that was translated. So, if a localizer wanted to use one of the many powerful Gettext tools, like po-editor, the msgid provides NO CONTEXT for translation or for other localizers to verify translat...
MathML In Action
MathML in Action Are you seeing nifty equations throughout this page? No? Too bad. Here is a screenshot of what you are missing. Download a MathML-enabled Mozilla build to remedy this sad situation. You already have a MathML-enabled build but what you see on the screenshot is not what you get? In that case you are probably missing some crucial MathML fonts. Now that you are well-equipped, you should be able to see this inline equation with varying accents: x ^ + xy ^ + xyz ^ . Next to it is this tiny formula, det | a c b d | = a d - b c , which can also be typeset in displaystyle as det | a b c d | = a d - b c . Mathematical typesetting is picky. MathML in Mozilla aims at complying with the MathML specification so that What You See Is What You Markup, o...
...regressions)? I...
...Now, what next? As you try out MathML in Mozilla, what to do with those few things that appear to you not to work as per the MathML spec? Or what about those things that just seem itchy, and 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 Bugzil...
... ? m = 2 n ? ( ? k = 1 m - 1 ? ( m / k ) / ? m / k ? ? ) - 1 ? ? ? ? W s k ( ? g ) ? ( ? | ? | ? k ? ? ? ? ? ? L s ( ? g ) s ) 1 / s For more examples, refer to links on the MathML Project page, and if you are building your own Mozilla binary, see the directory mozilla/layout/mathml/tests. Now, what next? As you try out MathML in Mozilla, what to do with those few things that appear to you not to work as per the MathML spec? Or what about those things that just seem itchy, and 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 th...
Updates
A new HTML parser, which lets you use MathML inside non-XHTML documents. Complete support for STIX fonts 1.0. Better rendering of mathematical symbols, especially stretchy operators. October 21, 2010 MathML 3.0 is now a W3C recommendation! June 11, 2010 STIX Fonts Version 1.0 are now compatible with trunk. May 28, 2010 STIX Fonts Version 1.0 Released. ...
...s. Complete support for STIX fonts 1.0. Better rendering of mathematical symbols, especially stretchy operators. October 21, 2010 MathML 3.0 is now a W3C recommendation! June 11, 2010 STIX Fonts Version 1.0 are now compatible with trunk. May 28, 2010 STIX Fonts Version 1.0 Released. April 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 consis...
...ay 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. ...
...s level 1 (CSS1), and the W3C Document Object Model level 1 (DOM1) [...] as well as support for display of mathematical equations using MathML." December 7, 2001 Status Report October 2000 The first International MathML conference April 14, 2000 Status Report February 12, 2000 MathML-enabled M13 Builds For Win32 September 21, 1999 MathML has landed. September 18, 1999 Status Report - MozillaZine annoucement September 3, 1999 XSL Coming To Mozilla? MathML Too? May 23, 1999 Reader Opinion: MathML's Viability - talkback May 14, 1999 Mozilla MathML Project Underway May 1999 Mozilla MathML Project Initiation ...
Midas editor module security preferences
This functionality is completely removed since 2013-12-14 18:23 PST, see: bugs 38966 and 913734 Note: If you've reached this page from a message box in Firefox or another Mozilla product, try using keyboard shortcuts for the Cut, Copy, and Paste commands: Copy: Ctrl+C or Ctrl+Insert (command+C on Mac) Paste: Ctrl+V or Shift+Insert (command+V on Mac) Cut: Ctrl+X or Shift+Delete (command+X on Mac) The information on the rest of this page is for Web developers and advanced users. Please do not try to modify this page. To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in Midas, which is Mozilla's rich text editor component. This means that the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To...
... If you have Quick Launch running (on Windows, this is an icon in the toolbar), quit that too. Find your Firefox profile directory. Open the user.js file from that directory in a text editor. If there's no user.js file, create one. Add these lines to user.js: user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org"); user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess"); user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess"); Change the URL https://www.mozilla.org to the site for which you want to enable this function. Save the file and restart Firefox. The Clipboard buttons in the demo, or similar buttons on the sites you listed, should now function. N...
...e", "allAccess"); Change the URL https://www.mozilla.org to the site for which you want to enable this function. Save the file and restart Firefox. The Clipboard buttons in the demo, or similar buttons on the sites you listed, should now function. Note: The preference is site as well as protocol specific. For example: user_pref("capability.policy.allowclipboard.sites", "http://www-archive.mozilla.org") is not the same as: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org") This is because the first uses HTTP while the second uses HTTPS. If you want to allow multiple URLs to access the Paste operation, separate the URLs with a space. ...
...s", "http://www-archive.mozilla.org") is not the same as: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org") This is because the first uses HTTP while the second uses HTTPS. If you want to allow multiple URLs to access the Paste operation, separate the URLs with a space. For example: user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org https://developer.mozilla.org") Again, keep in mind the security risks involved here and be sure to remove permission to access the clipboard once you no longer need it enabled. ...
NSPR build instructions
Building NSPR consists of three steps: run the configure script. You may override the compilers (the CC environment variable) or specify options. ...
... Prerequisites On Windows, the NSPR build system needs GNU make and a Unix command-line utility suite such as MKS Toolkit, Cygwin, and MSYS. The easiest way to get these tools is to install the MozillaBuild package. Introduction The top level of the NSPR source tree is the mozilla/nsprpub directory. Although nsprpub is a subdirectory under mozilla, NSPR is independent of the Mozilla client source tree. Building NSPR consists of three steps: run the configure script. ...
.../nsprpub directory. Although nsprpub is a subdirectory under mozilla, NSPR is independent of the Mozilla client source tree. Building NSPR consists of three steps: run the configure script. You may override the compilers (the CC environment variable) or specify options. build the libraries build the test programs For example, # check out the source tree from Mercurial hg clone https://hg.mozilla.org/projects/nspr # create a build directory mkdir target.debug cd target.debug # run the configure script ../nspr/configure [optional configure options] # build the libraries gmake # build the test programs cd pr/tests gmake On Mac OS X, use make, which is GNU make. Configure options Although NSPR uses autoconf, its configure script has two default values that are different from most open so...
...ize Specify these two options to generate an optimized (release) build. These two options can actually be used independently, but it's not recommended. --enable-64bit On a dual 32-bit/64-bit platform, NSPR build generates a 32-bit build by default. To generate a 64-bit build, specify the --enable-64bit configure option. --target=x86_64-pc-mingw32 For 64-bit builds on Windows, when using the MozillaBuild environment. --enable-win32-target=WIN95 This option is only used on Windows. NSPR build generates a "WINNT" configuration by default on Windows for historical reasons. We recommend most applications use the "WIN95" configuration. The "WIN95" configuration supports all versions of Windows. The "WIN95" name is historical; it should have been named "WIN32". To generate a "WIN95" configurati...
Build instructions for JSS 4.3.x
Build Instructions for JSS 4.3.x Newsgroup: mozilla.dev.tech.crypto Before building JSS, you need to set up your system as follows: Build NSPR/NSS by following the NSPR/NSS build instructions, To check that NSS built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html. Install a Java compiler and runtime. JSS supports Java version 1.5 or later. We suggest you use the latest. You must have Perl version 5.005 or later. Now you are ready to build JSS. Follow these steps: Switch to the appropriate directory and check out JSS from the root of your source tree. ...
...The JAVA_HOME variable indicates the directory containing your Java SDK installation. Note, on Windows platforms it is best to have JAVA_HOME set to a directory path that doest not have spaces. ...
...mputername.#/results.html. Install a Java compiler and runtime. JSS supports Java version 1.5 or later. We suggest you use the latest. You must have Perl version 5.005 or later. Now you are ready to build JSS. Follow these steps: Switch to the appropriate directory and check out JSS from the root of your source tree. cvs co -r JSS_4_3_1_RTM mozilla/security/jss or cvs co -r JSS_4_3_RTM mozilla/security/jss Setup environment variables needed for compiling Java source. The JAVA_HOME variable indicates the directory containing your Java SDK installation. Note, on Windows platforms it is best to have JAVA_HOME set to a directory path that doest not have spaces. Unix setenv JAVA_HOME /usr/local/jdk1.5.0 (or wherever your JDK is installed) Windows set JAVA_HOME=c:\progr...
...orical; it should have been named "WIN32". To generate a "WINNT" configuration, set OS_TARGET=WINNT and build NSPR/NSS/JSS WIN95. Mac OS X It has been recently reported that special build instructions are necessary to succeed building JSS on OSX. Please see HOWTO_successfully_compile_JSS_and_NSS_for_32_and_64_bits_on_OSX_10.6_(10.6.7) for contributed instructions. Build JSS. cd mozilla/security/jss gmake Sign the JSS jar. If you're intention is to modify and build the JSS source you need to Apply for your own JCE code-signing certificate If you made no changes and your goal is to build JSS you can use the signed binary release of the jss4.jar from ftp.mozilla.org. with your built jss4 JNI shared library. Next, you should read the instructions on usin...
JSS 4.4.0 Release Notes
Introduction The Java Security Services (JSS) team has released JSS 4.4.0, which is a minor release. Distribution information The hg tag is JSS_4_4_20170313. JSS 4.4.0 requires Netswork Security Services (NSS) 3.29.1 and Netscape Portable Runtime (NSPR) 4.13.1 or newer. JSS 4.4.0 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/JSS_4_4_0_RTM/src/ New in JSS 4.40 New Functionality New Functions New Macros Notable Changes in JSS 4.40 Picks up work done downstream for Fedora and RHEL and used by various Linux distributions with includes:. Support for IPv6. Support for TLS v1.1 and TLS v1.2 via NSS though JSS. Bugs fixed in JSS 4.4.0 This Bugzilla query returns a...
...SS_4_4_0_RTM/src/ New in JSS 4.40 New Functionality New Functions New Macros Notable Changes in JSS 4.40 Picks up work done downstream for Fedora and RHEL and used by various Linux distributions with includes:. Support for IPv6. Support for TLS v1.1 and TLS v1.2 via NSS though JSS. ...
... by various Linux distributions with includes:. Support for IPv6. Support for TLS v1.1 and TLS v1.2 via NSS though JSS. Bugs fixed in JSS 4.4.0 This Bugzilla query returns all the bugs fixed in NSS 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=JSS&target_milestone=4.4&target_milestone=4.4&bug_status=RESOLVED&resolution=FIXED Documentation Build instructions for JSS at https://hg.mozilla.org/projects/jss/file/tip/README Platform Information You can check out the source from mercurial via hg clone -r 055aa3ce8a61 https://hg.mozilla.org/projects/jss JSS 4.4.0 works with OpenJDK versions 1.7 or higher we suggest the latest - OpenJDK 1.8. JSS 4.4.0 requires NSS 3.12.5 or higher though NSS 3.28.3 is recommended. JSS 4.3.1 requires NSPR 4.7.1 or higher though NSPR 3.13 ...
... ...
NSS 3.12.9 release notes
<center> 2010-09-23</center> <center> Newsgroup: mozilla.dev.tech.crypto</center> Introduction Network Security Services (NSS) 3.12.9 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.9 are described in the "Bugs Fixed" section below. NSS 3.12.9 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.9 release is NSS_3.12.9_RTM. NSS 3.12.9 requires NSPR 4.8.7. See the Documentation section for the build instructions. NSS 3.12.9 source distribution is also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3.12.9_RTM/src/. You also need to download the NSPR 4.8.7 binary distributions to get the NSPR 4.8.7 header files and shared ...
... New in NSS 3.12.9 Removed functions New SSL options New error codes Bugs Fixed The following bugs have been fixed in NSS 3.12.9. ...
... New in NSS 3.12.9 Removed functions New SSL options New error codes Bugs Fixed The following bugs have been fixed in NSS 3.12.9. ...
...braries. A program linked with older NSS 3.x shared libraries will work with NSS 3.12.9 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with mozilla.org Bugzilla (product NSS). ...
NSS 3.14 release notes
aterial Exporters for TLS (RFC 5705) In addition to the above new features, the following major changes have been introduced: Support for certificate signatures using the MD5 hash algorithm is now disabled by default. The NSS license has changed to MPL 2.0. Previous releases were released under a MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. For more information about MPL 2.0, please see http://www.mozilla.org/MPL/2.0/FAQ.html. For an additional explantation on GPL/LGPL compatibility, see security/nss/COPYING in the source code. Export and DES cipher suites are disabled by default. Non-ECC AES and Triple DES cipher suites are enabled by default. NSS 3.14 source tarballs can be downloaded from https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_RTM/src/. The CVS tag is NSS_3_14...
... To better support TLS 1.1 and future versions of TLS, a new version range API was introduced to allow applications to specify the desired minimum and maximum versions. ...
...etter ensure interoperability with peers that support TLS 1.1, NSS has altered how it handles certain SSL protocol layer events. Such changes may present interoperability concerns when enabling TLS 1.1. When connecting to a server, the record layer version of the initial ClientHello will be at most { 3, 1 } (TLS 1.0), even when attempting to negotiate TLS 1.1 (https://bugzilla.mozilla.org/show_bug.cgi?id=774547) The choice of client_version sent during renegotiations has changed. See the "Changes" section below. Experimental Support for DTLS (RFC 4347) and DTLS-SRTP (RFC 5764) DTLS client and server support has been added in NSS 3.14. Because the test coverage and interoperability testing is not yet at the same level as other NSS code, this feature...
...s have been increased to 16K bits. Command line utilities tstclnt, strsclnt, and selfserv have changed. ...
NSS 3.18.1 release notes
Introduction Network Security Services (NSS) 3.18.1 is a patch release for NSS 3.18. The bug fixes in NSS 3.18.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_18_1_RTM. NSS 3.18.1 requires NSPR 4.10.8 or newer. NSS 3.18.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_18_1_RTM/src/ New in NSS 3.18.1 No new functionality is introduced in this release. This is a patch release to update the list of root CA certificates. Notable Changes in NSS 3.18.1 The following CA certificate had the Websites and Code Signing trust bits restored to their original state to allow more time to develop a better transition strategy...
...te verification errors attributed to this change. So, to give website administrators more time to update their web servers, we reverted the trust bits back to being enabled. OU = Equifax Secure Certificate Authority SHA1 Fingerprint: D2:32:09:AD:23:D3:14:23:21:74:E4:0D:7F:9D:62:13:97:86:63:3A The following CA certificate was removed after discussion about it in the mozilla.dev.security.policy forum. CN = e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi SHA1 Fingerprint: DD:E1:D2:A9:01:80:2E:1D:87:5E:84:B3:80:7E:4B:B1:FD:99:41:34 The following intermediate CA certificate has been added as actively distrusted because it was misused to issue certificates for domain names the holder did not own or control. CN=MCSHOLDING TEST, O=M...
...ed to issue certificates for domain names the holder did not own or control. CN=MCSHOLDING TEST, O=MCSHOLDING, C=EG SHA1 Fingerprint: E1:F3:59:1E:76:98:65:C4:E4:47:AC:C3:7E:AF:C9:E2:BF:E4:C5:76 The version number of the updated root CA list has been set to 2.4 Bugs fixed in NSS 3.18.1 This Bugzilla query returns all the bugs fixed in NSS 3.18.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.18.1 Compatibility NSS 3.18.1 shared libraries are backward compatible with all older NSS 3.18 shared libraries. A program linked with older NSS 3.18 shared libraries will work with NSS 3.18.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict t...
...s. A program linked with older NSS 3.18 shared libraries will work with NSS 3.18.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.30 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.30, which is a minor release. Distribution information The hg tag is NSS_3_30_RTM. NSS 3.30 requires Netscape Portable Runtime (NSPR); 4.13.1 or newer. NSS 3.30 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_30_RTM/src/ New in NSS 3.30 New Functionality In the PKCS#11 root CA module (nssckbi), CAs with positive trust are marked with a new boolean attribute, CKA_NSS_MOZILLA_CA_POLICY, set to true. Applications that need to distinguish them from other other root CAs, may use the exported function PK11_HasAttributeSet. Support for callback functions that can be used to monitor SSL/TLS al...
... key pair, for use in wrapping session ticket keys, used by the server. This function currently only accepts an RSA public/private key pair. New Macros in ciferfam.h PKCS12_AES_CBC_128, PKCS12_AES_CBC_192, PKCS12_AES_CBC_256 - cipher family identifiers corresponding to the PKCS#5 v2.1 AES based encryption schemes used in the PKCS#12 support in NSS in pkcs11n.h CKA_NSS_MOZILLA_CA_POLICY - identifier for a boolean PKCS#11 attribute, that should be set to true, if a CA is present because of it's acceptance according to the Mozilla CA Policy Notable Changes in NSS 3.30 The TLS server code has been enhanced to support session tickets when no RSA certificate (e.g. only an ECDSA certificate) is configured. RSA-PSS signatures produced by key pairs with a modulus bi...
... certificate (e.g. only an ECDSA certificate) is configured. RSA-PSS signatures produced by key pairs with a modulus bit length that is not a multiple of 8 are now supported. The pk12util tool now supports importing and exporting data encrypted in the AES based schemes defined in PKCS#5 v2.1. Bugs fixed in NSS 3.30 This Bugzilla query returns all the bugs fixed in NSS 3.30: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.30 Compatibility NSS 3.30 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.30 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.30 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.1 release notes
This is a patch release to fix regression bugs. ...
...This is a patch release to fix regression bugs. ...
... or PKCS#12 data, was increased to one million iterations. That change had caused an interoperability regression with operating systems that are limited to 600 K iterations. NSS 3.36.1 has been changed to use the same 600 K limit. Bugs fixed in NSS 3.36.1 Certain smartcard operations could result in a deadlock. This Bugzilla query returns all the bugs fixed in NSS 3.36.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.36.1 Compatibility NSS 3.36.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.2 release notes
This is a patch release to fix regression bugs. ...
...This is a patch release to fix regression bugs. ...
...o new functionality is introduced in this release. This is a patch release to fix regression bugs. Bugs fixed in NSS 3.36.2 Bug 1462303 - Connecting to a server that was recently upgraded to TLS 1.3 would result in a SSL_RX_MALFORMED_SERVER_HELLO error. Bug 1460673 - Fix a rare bug with PKCS#12 files. This Bugzilla query returns all the bugs fixed in NSS 3.36.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.36.2 Compatibility NSS 3.36.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.37.1 release notes
This is a patch release to fix regression bugs. ...
...This is a patch release to fix regression bugs. ...
...o new functionality is introduced in this release. This is a patch release to fix regression bugs. Bugs fixed in NSS 3.37.1 Bug 1462303 - Connecting to a server that was recently upgraded to TLS 1.3 would result in a SSL_RX_MALFORMED_SERVER_HELLO error. Bug 1460673 - Fix a rare bug with PKCS#12 files. This Bugzilla query returns all the bugs fixed in NSS 3.37.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.37.1 Compatibility NSS 3.37.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.37.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.37.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.47 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.47 on 18 October 2019, which is a minor release. The NSS team would like to recognize first-time contributors: Christian Weisgerber Deian Stefan Jenine Distribution Information The HG tag is NSS_3_47_RTM. NSS 3.47 requires NSPR 4.23 or newer. NSS 3.47 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_47_RTM/src/ Other releases are available in NSS Releases. Upcoming changes to default TLS configuration The next NSS team plans to make two changes to the default TLS configuration in NSS 3.48, which will be released in early December: TLS 1.3 will be the default maximum TLS version. ...
...f the cipher suites presented in ClientHello Bug 1570501 - Add CMAC to FreeBL and PKCS #11 libraries Bugs fixed in NSS 3.47 Bug 1459141 - Make softoken CBC padding removal constant time Bug 1589120 - More CBC padding tests Bug 1465613 - Add ability to distrust certificates issued after a certain date for a specified root cert Bug 1588557 - Bad debug statement in tls13con.c Bug 1579060 - mozilla::pkix tag definitions for issuerUniqueID and subjectUniqueID shouldn't have the CONSTRUCTED bit set Bug 1583068 - NSS 3.47 should pick up fix from bug 1575821 (NSPR 4.23) Bug 1152625 - Support AES HW acceleration on ARMv8 Bug 1549225 - Disable DSA signature schemes for TLS 1.3 Bug 1586947 - PK11_ImportAndReturnPrivateKey does not store nickname for EC keys Bug 1586456 - Unnecessary condition...
... FreeBL and PKCS #11 libraries Bug 657379 - NSS uses the wrong OID for signatureAlgorithm field of signerInfo in CMS for DSA and ECDSA Bug 1576664 - Remove -mms-bitfields from mingw NSS build. Bug 1577038 - add PK11_GetCertsFromPrivateKey to return all certificates with public keys matching a particular private key This Bugzilla query returns all the bugs fixed in NSS 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.47 Compatibility NSS 3.47 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.47 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.47 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.53 release notes
ction The NSS team released Network Security Services (NSS) 3.53 on 29 May 2020. NSS 3.53 will be a long-term support release, supporting Firefox 78 ESR. The NSS team would like to recognize first-time contributors: Jan-Marek Glogowski Jeff Walden Distribution Information The HG tag is NSS_3_53_RTM. NSS 3.53 requires NSPR 4.25 or newer. NSS 3.53 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_53_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.53 When using the Makefiles, NSS can be built in parallel, speeding up those builds to more similar performance as the build.sh/ninja/gyp system. (Bug 290526) SEED is now moved into a new ...
...stem. (Bug 290526) SEED is now moved into a new freebl directory freebl/deprecated (Bug 1636389). SEED will be disabled by default in a future release of NSS. At that time, users will need to set the compile-time flag (Bug 1622033) to disable that deprecation in order to use the algorithm. Algorithms marked as deprecated will ultimately be removed. Several root certificates in the Mozilla program now set the CKA_NSS_SERVER_DISTRUST_AFTER attribute, which NSS consumers can query to further refine trust decisions. (Bug 1618404, Bug 1621159) If a builtin certificate has a CKA_NSS_SERVER_DISTRUST_AFTER timestamp before the SCT or NotBefore date of a certificate that builtin issued, then clients can elect not to trust it. This attribute provides a more graceful phase-out for cer...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.53 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.53 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
nss tech note4
lue); Get decoded value of the subjectKeyID extension. This uses PR_Alloc to allocate buffer for the decoded value, The caller should free up the storage allocated in value->data. ...
... Get decoded value of the subjectKeyID extension. This uses PR_Alloc to allocate buffer for the decoded value, The caller should free up the storage allocated in value->data. ...
...yID extension. This uses PR_Alloc to allocate buffer for the decoded value, The caller should free up the storage allocated in value->data. ...
...lue, The caller should free up the storage allocated in value->data. ...
NSS tools : crlutil
Name crlutil -- List, generate, modify, or delete CRLs within the NSS security database file(s) and list, create, modify or delete certificates entries in a particular CRL. Synopsis crlutil [options] [[arguments]] STATUS This documentation is still work in progress. Please contribute to the initial review in Mozilla NSS bug 836477[1] Description The Certificate Revocation List (CRL) Management Tool, crlutil, is a command-line utility that can list, generate, modify, or delete CRLs within the NSS security database file(s) and list, create, modify or delete certificates entries in a particular CRL. The key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certut...
...The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #...
...[-u url] [-d keydir] [-P dbprefix] [-B] See also certutil(1) See Also Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. L...
...nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. License Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. References 1. Mozilla NSS bug 836477 - https://bugzilla.mozilla.org/show_bug.cgi?id=836477 Visible links 1. http://pki.fedoraproject.org/wiki/ 2. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : signtool
al FIPS PKCS #11 Module (this module is internally loaded) slots: 1 slots attached status: loaded slot: Netscape Internal FIPS-140-1 Cryptographic Services token: Communicator Certificate DB ----------------------------------------------- See Also signver (1) The NSS wiki has information on the new database design and how to configure applications to use it. ...
...oaded) slots: 1 slots attached status: loaded slot: Netscape Internal FIPS-140-1 Cryptographic Services token: Communicator Certificate DB ----------------------------------------------- See Also signver (1) The NSS wiki has information on the new database design and how to configure applications to use it. ...
...---------------- See Also signver (1) The NSS wiki has information on the new database design and how to configure applications to use it. o https://wiki.mozilla.org/NSS_Shared_DB_Howto o https://wiki.mozilla.org/NSS_Shared_DB Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Cop...
...s.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. ...
Small Footprint
tprint of Rhino for embeddings where space is at a premium. On a recent build, the length of js.jar was 603,127 bytes corresponding to 1,171,708 bytes of all uncompressed Rhino classes with debug information included. With various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes. ...
.... With various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes. Tools Most embeddings won't need any of the classes in org.mozilla.javascript.tools or any of its sub-packages. Optimizer It is possible to run Rhino with interpreter mode only, allowing you to remove code for classfile generation that include all the classes from <tt>org.mozilla.javascript.optimizer</tt> package. JavaAdapter Implementing the JavaAdapter functionality requires the ability to generate classes on the fly. Removing org.mozilla.javascript.JavaAdapter will disable this functionality, but Rhino will otherwise run correctly. Class generation library If you do not include Optimizer or JavaAdapter, nor do you use PolicySecurityController then you do not need R...
...Rhino will continue to run, although it will not be able to execute any regular expression matches. This change saves 47,984 bytes of class files. ...
...Rhino will continue to run, although it will not be able to execute any regular expression matches. This change saves 47,984 bytes of class files. Debug information Debug information in Rhino classes consumes about 25% of code size and if you can live without that, you can recompile Rhino to remove it. ...
Scripting Java
se this object as a class will an error be reported. External Packages and Classes External packages and classes can also be used as in Rhino. Make sure your .jar or .class file is on you classpath then you may import them into your JavaScript application. These packages are likely not in the java package, so you'll need to prefix the package name with "Packages." For example, to import the org.mozilla.javascript package you could use importPackage() as follows: $ java org.mozilla.javascript.tools.shell.Main js> importPackage(Packages.org.mozilla.javascript); js> Context.currentContext; org.mozilla.javascript.Context@bb6ab6 Occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importPackage() method. This is also acceptable, it ju...
...Main js> importPackage(Packages.org.mozilla.javascript); js> Context.currentContext; org.mozilla.javascript.Context@bb6ab6 Occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importPackage() method. This is also acceptable, it just takes more typing. Using a fully qualified name, the above example would look as follows: $ java org.mozilla.javascript.tools.shell.Main js> jsPackage = Packages.org.mozilla.javascript; [JavaPackage org.mozilla.javascript] js> jsPackage.Context.currentContext; org.mozilla.javascript.Context@bb6ab6 Alternatively, if you want to import just one class from a package you can do so using the importClass() method. ...
... as follows: $ java org.mozilla.javascript.tools.shell.Main js> jsPackage = Packages.org.mozilla.javascript; [JavaPackage org.mozilla.javascript] js> jsPackage.Context.currentContext; org.mozilla.javascript.Context@bb6ab6 Alternatively, if you want to import just one class from a package you can do so using the importClass() method. The above examples could be expressed as follows: $ java org.mozilla.javascript.tools.shell.Main js> importClass(Packages.org.mozilla.javascript.Context); js> Context.currentContext; org.mozilla.javascript.Context@bb6ab6 Working with Java Now that we can access Java classes, the next logical step is to create an object. This works just as in Java, with the use of the new operator: js> new java.util.Date() Thu Jan 24 16:18:17 EST 2002 If we store the new obje...
... java.awt.event, java.awt.Point, java.awt.Rectangle, java.awt.Dimension); ... with (SwingGui) { var mybutton = new JButton(test); var mypoint = new Point(10, 10); var myframe = new JFrame(); ... } Previously such functionality was available only to embeddings that used org.mozilla.javascript.ImporterTopLevel class as the top level scope. The class provides additional importPackage() and importClass() global functions for scripts but their extensive usage has tendency to pollute the global name space with names of Java classes and prevents loaded classes from garbage collection. See Bugzilla 245882 for details. Java Exceptions Exceptions thrown by Java methods can be cau...
Rhino serialization
ripts. However, serialization of code in compilation mode has some significant limitations. Serialization provides a way to save the state of an object and write it out to a file or send it across a network connection. Simple serialization example The Rhino shell has two new top-level functions, serialize and deserialize. They're intended mainly as examples of the use of serialization: $ java org.mozilla.javascript.tools.shell.Main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.Main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> Here we see a simple case of a function being serialized to a file and then read into a new instance of Rhino and called. Rhino serialization APIs Two new classes, ScriptableOutputSt...
...pes used in either ScriptableOutputStream or ScriptableInputStream. Rhino serialization in compilation mode Serialization works well with objects and with functions and scripts in interpretive mode. However, you can run into problems with serialization of compiled functions and scripts: $ cat test.jsfunction f() { return 3; } serialize(f, "f.ser"); g = deserialize("f.ser"); print(g()); $ java org.mozilla.javascript.tools.shell.Main -opt -1test.js 3 $ java org.mozilla.javascript.tools.shell.Main test.js js: uncaught JavaScript exception: java.lang.ClassNotFoundException:c1 The problem is that Java serialization has no built-in way to serialize Java classes themselves. (It might be possible to save the Java bytecodes in an array and then load the class upon deserialization, but at best that would ...
...lem is that Java serialization has no built-in way to serialize Java classes themselves. (It might be possible to save the Java bytecodes in an array and then load the class upon deserialization, but at best that would eat up a lot of memory for just this feature.) One way around this is to compile the functions using the jsc tool: $ cat f.js function f() { return 3; } $ java -classpath js.jarorg.mozilla.javascript.tools.jsc.Main f.js $ cat test2.js loadClass("f"); serialize(f, "f.ser"); g = deserialize("f.ser"); print(g()); $ java -classpath 'js.jar;.'org.mozilla.javascript.tools.shell.Main test2.js 3 Now the function f is compiled to a Java class, but that class is then made available in the classpath so serialization works. This isn't that interesting an example since compiling a function to a...
... ...
Rhino shell
-f script-filename-or-url Reads script-filename-or-url content and execute it as a JavaScript script. -opt optLevel / -O optLevel Optimizes at level optLevel, which must be -1 or an integer between 0 and 9. See Rhino Optimization for more details. ...
...ree times from the command line. (The system command prompt is shown as $.) The first invocation executes a script specified on the command line itself. The next invocation has no arguments, so the shell goes into interactive mode, reading and evaluating each line as it is typed in. Finally, the last invocation executes a script from a file and accesses arguments to the script itself. ...
...n as $.) The first invocation executes a script specified on the command line itself. The next invocation has no arguments, so the shell goes into interactive mode, reading and evaluating each line as it is typed in. Finally, the last invocation executes a script from a file and accesses arguments to the script itself. ...
...ped in. Finally, the last invocation executes a script from a file and accesses arguments to the script itself. $ java org.mozilla.javascript.tools.shell.Main -e "print('hi')" hi $ java org.mozilla.javascript.tools.shell.Main js> print('hi') hi js> 6*7 42 js> function f() { return a; } js> var a = 34; js> f() 34 js> quit() $ cat echo.js for (i in arguments) { print(arguments[i]) } $ java org.mozilla.javascript.tools.shell.Main echo.js foo bar foo bar $ spawn and sync The following example creates 2 threads via spawn and uses sync to create a synchronized version of the function test. js> function test(x) { print("entry"); java.lang.Thread.sleep(x*1000); print("exit"); } js> var o = { f : sync(test) }; js> spawn(function() {o.f(5);}); Thread[Thread-0,5,main] entry js> spawn(function...
SpiderMonkey 1.8.5
You can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (MD5 checksum: a4574365938222adca0a6bd33329cb32). SpiderMonkey 1.8.5 is the JavaScript engine that shipped in Firefox 4.0. It is much faster than SpiderMonkey 1.8, implements ES-5 (ECMA 262, 5th Edition), and contains many new language and API features, described in detail below. ...
... --22 March 2011 Platform support SpiderMonkey 1.8.5 is supported on all the platforms where Firefox 4 runs. SpiderMonkey 1.8.5 includes a just-in-time compiler (JIT) (several, actually) that compiles JavaScript to machine code, for a significant speed increase. ...
...8222adca0a6bd33329cb32). SpiderMonkey 1.8.5 is the JavaScript engine that shipped in Firefox 4.0. It is much faster than SpiderMonkey 1.8, implements ES-5 (ECMA 262, 5th Edition), and contains many new language and API features, described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or, file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. --22 March 2011 Platform support SpiderMonkey 1.8.5 is supported on all the platforms where Firefox 4 runs. SpiderMonkey 1.8.5 includes a just-in-time compiler (JIT) (several, actually) that compiles JavaScript to machine code, for a significant speed increase. It is supported only on x86, x86_64 and ARM architectures. On other platforms, t...
...\ $(filter -Wl%,$(JSAPI_LDFLAGS)) JSAPI_LDFLAGS := $(filter-out $(MOZJS_INSTALL_NAME_OPT),$(JSAPI_LDFLAGS)) endif JSAPI_LDFLAGS := $(filter-out %libffi.a,$(JSAPI_LDFLAGS)) LDFLAGS += $(JSAPI_LDFLAGS) Future Direction The SpiderMonkey 1.8.5 source release includes an experimental library versioning scheme. This versioning scheme will not be rolled back into the upstream Mozilla source tree(s), and may not be used in future source releases. Comments in bug 628723 with regard to its usefulness are appreciated. Bugs with the source release tar ball should be copied to wes@page.ca. SpiderMonkey embedders should also be aware that Mozilla has no plans to keep the JSAPI, nor the JSDBGAPI stable for embedders. We have chosen to concentrate on performance and correctness as p...
SpiderMonkey 1.8.7
You can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (MD5 checksum: a4574365938222adca0a6bd33329cb32). SpiderMonkey 1.8.5 is the JavaScript engine that shipped in Firefox 4.0. It is much faster than SpiderMonkey 1.8, implements ES-5 (ECMA 262, 5th Edition), and contains many new language and API features, described in detail below. ...
... --22 March 2011 Platform support SpiderMonkey 1.8.7 is supported on all the platforms where Firefox 10 runs. SpiderMonkey 1.8.7 includes type inference, which boosts the speed of the JagerMonkey JIT by about 30% over version 1.8.5. ...
...8222adca0a6bd33329cb32). SpiderMonkey 1.8.5 is the JavaScript engine that shipped in Firefox 4.0. It is much faster than SpiderMonkey 1.8, implements ES-5 (ECMA 262, 5th Edition), and contains many new language and API features, described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or, file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. --22 March 2011 Platform support SpiderMonkey 1.8.7 is supported on all the platforms where Firefox 10 runs. SpiderMonkey 1.8.7 includes type inference, which boosts the speed of the JagerMonkey JIT by about 30% over version 1.8.5. Type inference largely obviates TraceMonkey, so the TraceMonkey JIT has been removed. The JIT is supported onl...
...\ $(filter -Wl%,$(JSAPI_LDFLAGS)) JSAPI_LDFLAGS := $(filter-out $(MOZJS_INSTALL_NAME_OPT),$(JSAPI_LDFLAGS)) endif JSAPI_LDFLAGS := $(filter-out %libffi.a,$(JSAPI_LDFLAGS)) LDFLAGS += $(JSAPI_LDFLAGS) Future Direction The SpiderMonkey 1.8.5 source release includes an experimental library versioning scheme. This versioning scheme will not be rolled back into the upstream Mozilla source tree(s), and may not be used in future source releases. Comments in bug 628723 with regard to its usefulness are appreciated. Bugs with the source release tar ball should be copied to wes@page.ca. SpiderMonkey embedders should also be aware that Mozilla has no plans to keep the JSAPI, nor the JSDBGAPI stable for embedders. We have chosen to concentrate on performance and correctness as p...
SpiderMonkey 1.8.8
You can download full source code here: INSERT-ACTUAL-LINK-WHEN-THE-RELEASE-HAPPENS (MD5 checksum: INSERT-ACTUAL-HASH-HERE). SpiderMonkey 1.8.8 is the JavaScript engine that shipped in Firefox 10.0. ...
...key 1.8.8 is the JavaScript engine that shipped in Firefox 10.0. It continues to improve performance over previous SpiderMonkey releases, with ongoing JIT compilation work and with the introduction of type inference to enable faster JITted code. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. --INSERT-ACTUAL-RELEASE-DATE-HERE Platform support SpiderMonkey 1.8.8 is supported on all the platforms where Firefox INSERT-ACTUAL-FIREFOX-VERSION-NUMBER-HERE runs. SpiderMonkey 1.8.8 includes a just-in-time compiler (JIT) that compiles JavaScript to machine code, for a signifi...
...JSAPI and replaced with simpler alternatives. Including jsapi.h provides all these types, but more-specific headers also provide these types if you wish to use them in other code. ...
...*, where previously it also required a JSContext* in threadsafe builds. (The JS_GET_CLASS macro abstracting away this difference has accordingly been removed.) JavaScript shell changes Detail added/removed methods here... Known Issues Detail any known issues here... Future Direction INCLUDE-FOLLOWUP-ON-EXPERIMENTAL-LIBRARY-VERSIONING-SCHEME-HERE SpiderMonkey embedders should also be aware that Mozilla has no plans to keep the JSAPI, nor the JSDBGAPI stable for embedders. We have chosen to concentrate on performance and correctness as primary concerns instead. The team is considering the removal of TinyIDs JS_THREADSAFE is going away, with future versions supporting only thread-safe builds A new debugging API is on the way to replace JSD. Release Notes Errata This is a list of changes which...
SpiderMonkey 38
SpiderMonkey 38 is the JavaScript engine that shipped in Firefox 38. It continues to improve performance over previous SpiderMonkey releases, with XXX blah blah blah. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. ...
...Mozilla JavaScript team is pleased to announce the release of SpiderMonkey 38. SpiderMonkey 38 is the JavaScript engine that shipped in Firefox 38. It continues to improve performance over previous SpiderMonkey releases, with XXX blah blah blah. It also contains new language and API features described in detail below. ...
...piderMonkey 38. SpiderMonkey 38 is the JavaScript engine that shipped in Firefox 38. It continues to improve performance over previous SpiderMonkey releases, with XXX blah blah blah. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. -- Sep 17, 2015 The download url is outdated and SpiderMonkey not RELEASE alone! Get it here mozilla-esr38 You will find it in "Firefox Extended Support Release 38" package on hg release Platform support SpiderMonkey 38 is supported on all the platforms where Firefox 38 runs. Compiling it requires a C++ compiler, and the JSAPI can on...
...pt's [[PreventExtensions]] hook, which generally returns true or false to indicate whether subsequent attempts to add a new property will fail, yet also itself may throw in some cases. JavaScript shell changes Detail added/removed methods here... Known Issues Detail any known issues here... Future Direction ...insert details on future plans... SpiderMonkey embedders should be aware that Mozilla has no plans to keep the JSAPI, nor the JSDBGAPI, stable for embedders. We have chosen to concentrate on performance and correctness as primary concerns instead. JS_THREADSAFE is going away, with future versions supporting only thread-safe builds A new debugging API is on the way to replace JSD. Release Notes Errata This is a list of changes which need to be made to the release notes ASAP. F...
Setting up CDT to work on SpiderMonkey
Hence, here is a short-ish guide for doing just that. ...
...Hence, here is a short-ish guide for doing just that. ...
...If you want to use ccache, you can enable it by adding --with-ccache to the arguments list. Due to a bug in CDT, you have to make a small change to CDT's build configuration as explained in Step 3 below for that to work, though. Step 2 - Installing Eclipse and setting up the project The following run-down is a condensed and updated version of what is explained in much more detail for the entire Mozilla codebase. Luckily, improvements in CDT have reduced the basic process to manageable five steps: Download and extract "Eclipse IDE for C/C++ Developers" from the Eclipse downloads page. Start Eclipse and create a workspace somewhere. Select "New > Makefile Project with Existing Code" from the "File" menu. Give the project a name that you like ("SpiderMonkey" has a nice ring to it) and use th...
.... At this point, the indexer starts running and already produces a pretty decent index of much of SpiderMonkey. Still, there are a quite a few things that CDT does not pick up yet: For everything to be indexed, CDT has to be aware of the project's build details. Step 3 - Index all the code To let CDT know about the build, it has to invoke make itself (or, as is done in the guide for the whole Mozilla codebase on MDN, read a log of the build), which can be setup with these simple steps: Open the project's properties by selecting its root and clicking "Properties" in the "File" menu and select "C/C++ Build". Under the "Builder Settings" group tab, deactivate "Use default build command". Instead, change "Build command" to read make -w (this is required because CDT needs detailed information...
Web Replay
Learn more Web Replay allows Firefox content processes to record their behavior, replay it later, and rewind to earlier states. Replaying processes preserve all the same JS behavior, DOM structures, graphical updates, and most other behaviors that occurred while recording. DevTools' Debugger and Console can be used to inspect and control the replay. Getting Started To enable Web Replay (macOS and Firefox Nightly only), go to DevTools Settings and select "Enable WebReplay". Web Replay's features can only be used in a tab that is recording or replaying. ...
...Ref). A simpler way of telling that a redirection is needed for a function is that the replay tests crash inside it while replaying. New redirections can be added to toolkit/recordreplay/ProcessRedirectDarwin.cpp, adding just a few lines for functions with simple interfaces using the various RRFunction macros. Missing redirections can also be temporarily worked around by avoiding the call when mozilla::recordreplay::IsRecordingOrReplaying(). Recording events in disallowed areas GC marking and finalization may behave differently when recording and replaying, and recording events for a thread -- calling redirected library functions, using recorded locks or recorded atomics -- is disallowed at these times. There are some other areas where recorded events are also disallowed, such as during JS ...
...ctions, using recorded locks or recorded atomics -- is disallowed at these times. There are some other areas where recorded events are also disallowed, such as during JS interrupt callbacks. Recording an event in one of these areas will fail a !AreThreadEventsDisallowed() assertion. These failures usually result from accessing a recorded lock or atomic. Core xpcom and mozglue lock classes and mozilla::Atomic atomics are recorded by default, but many locks and atomics don't actually need to be recorded in order to correctly replay. Recording for a lock or atomic can be turned off by specifying recordreplay::Behavior::DontPreserve in either the lock's contructor argument or the atomic's template arguments. Interactions with the middleman process When recording or replaying an execution, ther...
... ...
compare-locales
Installation compare-locales needs to be installed, and it requires that you have Python 2.7 or 3.5+ installed on your machine. The easiest way is to just run $ pip install -U compare-locales Running it compare-locales gathers the directories to compare from a TOML file, usually found in $APP/locales/l10n.toml. ...
...arguments, followed by the locale codes of the locales you want to compare. ...
...To get a single result across the projects, specify the --unified flag: $ compare-locales --unified browser/locales/l10n.toml...
...n/ zh-TW To check mail, suite, calendar that lives on comm-central, you can either rely on the check-out of mozilla within comm-central repository that the regular comm-central build instructions generate: $ compare-locales ./comm-central/mail/locales/l10n.toml ./l10n/ zh-TW If you don't want to use a copy of mozilla-central in comm-central, you can run them separately: $ compare-locales -Dmozilla=$PWD/mozilla-central comm-central/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...
Secure Development Guidelines
The following content will likely see significant revision, though can be used as a reference for security best practices to follow when developing code for Mozilla. Introduction Provide developers with information on specific security issues Cover common coding mistakes and How they affect a product How to avoid making them How to mitigate them Everything is oriented toward C/C++ Introduction: Gaining Control Specifics about the underlying architecture, using x86 as an example 6 basic registers (EAX, EBX, ECX, EDX, EDI, ESI) 2 stack-related registers (ESP, EBP) Mark top and bottom of current stack frame Status register (EFLAGS) Contains various state information Instruction pointer (EIP) Points to register being executed; can't be modified di...
...y, strcat, gets, sprintf, vsprintf No bounds checking. strncpy Does not guarantee \0 termination. strncat Confusing size argument; can write 1 byte beyond the size. snprintf, vsnprintf Return value differs on various platforms. alloca Never use this. Calling alloca() with a user-controlled size == game over. Use malloc() instead. Using the Mozilla API Use C++ strings so C strings are possible Mozilla C safe string handling APIs Similar to libc str*cpy and str*cat Some are potentially dangerous Function name Comments PL_strcpy, PL_strcat These functions don't verify whether the destination buffer is large enough. PL_strncpy This function doesn't null terminate. PL_strncat This function...
... PL_strncat This function is confusing because the size argument is the maximum number of bytes being appended, not the size of the buffer. This can lead to security bugs. PL_strncpyz This function copies a string and guarantees null termination. PL_strcatn The size argument for this function is the size of the buffer and it guarantees zero termination. ...
...This function is confusing because the size argument is the maximum number of bytes being appended, not the size of the buffer. This can lead to security bugs. PL_strncpyz This function copies a string and guarantees null termination. PL_strcatn The size argument for this function is the size of the buffer and it guarantees zero termination. ...
A Web PKI x509 certificate primer
xtension exclusive for CA and indicates limits on the name space for its children. This is one of the most powerful extensions for businesses to have to help limit risk imposed by losing the private key of the CA. Authority information access This extension is primarily used to to describe the OCSP location for revocation checking. It is mandatory for certificates that chain up to a root in the Mozilla CA program. Self-signed certificates These are the steps to generate a certificate for www.example.com. Replace this value with the actual server name in the steps below. 1. Generate the key using the following command: openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 2048 is considered secure for the next 4 years. 2. Generate CSR using this command: openss...
... for various Certification Authorities (CAs). The root certificates included by default have their "trust bits" set to indicate if the CA's root certificates may be used to verify certificates for SSL servers, S/MIME email users, and/or digitally-signed code objects without having to ask users for further permission or information. CAs apply to have their root certificates included by default in Mozilla products by following the Mozilla CA Certificate Policy and applying for inclusion as per CA:How_to_apply. Users may override the default root certificate settings using the Certificate Manager. Some organizations make use of the set of CAs included in Mozilla's products. If you wish to do this, you should read the relevant part of the Mozilla CA FAQ before doing so. Running your Own CA If you...
...-generate the certificate with the appropriate key usage values SEC_ERROR_INVALID_ALGORITHM A certificate has been signed with an unknown algorithm Re-sign the certificate with a standardized certificate signing algorithm SEC_ERROR_INVALID_TIME A time field in a certificate has an invalid value Re-generate the certificate with valid encodings for time fields MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION A certificate contains an extension marked as critical that is not handled by mozilla::pkix Re-generate the certificate without the extension or with it not marked as critical SEC_ERROR_UNKNOWN_ISSUER Either a missing intermediate or root ce...
...NOWN_ISSUER Either a missing intermediate or root certificate is necessary to verify the certificate Import the root certificate into Firefox or have the server send the intermediate SEC_ERROR_INVALID_KEY SEC_ERROR_UNSUPPORTED_KEYALG SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE An issuer certificate is too old Re-issue the issuer certificate MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY A certificate with a basic constraints extension with cA:TRUE is being used as an end-entity certificate Re-generate the end-entity certificate without the basic constraints extension MOZILLA_PKIX_ERROR_INADEQUATE_KEY_SIZE A certificate has a key that is too small to be secure Re-generate a larger key and issue a certificate using that ke...
Embedded Dialog API
ver, it's nearly accurate to claim that the majority of all dialogs and alerts posed by Gecko do reside in a single generic component, nsIPromptService (nsIPromptService). An MFC example is implemented in PromptService.cpp. A PowerPlant example is implemented in PromptService.cpp. (TestGtkEmbed doesn't override PromptService; it uses the default dialogs.) Both are source for a library set up as a Mozilla component and factory. (Note to self: is there decent documentation on writing factories or components? I can't find any.) Both contain implementations of nsIPromptService as native dialogs. The replacement library should be installed during application initialization. The default dialog-posing library is a component (PromptService for instance is part of the embedding component), registered as a...
...n a separate DLL, and overrides the default PromptService only if it is able to load the override DLL at application startup. Its PromptService dialogs can be switched between default and overridden by moving the override DLL into or out of the library search path. Other sets of dialogs and alerts, implemented in other components,can be overridden in exactly the same fashion. Responsibilities of Mozilla/Gecko component authors Writing Replaceable Dialogs Dialogs Posed by the Browser ("up calls") Any component which may be included in an embedded browser distribution and wishes to pose a dialog must group its UI (code which runs its dialogs) into a unique interface built just for that purpose. Any such code which isn't already a component needs to be. All code which actually poses dialogs, if it ...
... print dialogs should be available soon.) Dialogs posed by the embedding app ("down calls") Some components will not pose dialogs directly, but maintain a database of information an embedding app may wish to display as a dialog. Preferences are the canonical example. In this case, we must be sure to have an API which an embedding app can use to populate its own dialog, should it decide to eschew Mozilla's XUL version. These components need build no dialog posing interface. Guidelines A few restrictions on each component's UI interface... Most if not all of these dialogs will need to be child/dependent/transient windows, so each method responsible for actually opening a window must take an nsIDOMWindow *aParent parameter, and use that window as the dialog's parent, if non-null. To make our embed...
...s the dialog's parent, if non-null. To make our embedding API as consistent as possible, we'd like to impose a few coding conventions on these dialog-posing interfaces. ...
Places utilities for JavaScript
By default its only included in browser.xul. Its not an interface, and as such it will never be frozen, but it provides some easy to use functions that can save you from reinventing the wheel and cluttering up your own classes/functions when you need it. Global Objects There are a few global objects and constants defined in utils.js. ...
...OR: "text/x-moz-place-separator", TYPE_X_MOZ_PLACE: "text/x-moz-place", TYPE_X_MOZ_URL: "text/x-moz-url", TYPE_HTML: "text/html", TYPE_UNICODE: "text/unicode", Services There's easy access to some of the common services used in bookmarks or history navigation here. For instance, normally in order to get access to the bookmarks service, you have to run something like: Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Components.interfaces.nsINavBookmarksService); With places utils all you need to write is: PlacesUtils.bookmarks This should save on the number of references to the service that are needed, and can help clean up interfaces that are already fairly cluttered. There are currently 11 services defined in here. bookmarks nsINavBookmarksServ...
...formed. Annotations These are functions that simplify annotating pages. Information like keywords, descriptions, and POST data is already stored as annotations by Firefox, but you can create additional ones. Using the functions can save you some implementation work. ...
...It also gives you more information that my hastily written (and probably incorrect) example up above. The annotation objects returned or send from/to all these functions all are arrays of objects which have the properties: name the annotation name flags annotation flags expires annotation expiration mimeType mimetype of the annotation, usual...
Retrieving part of the bookmarks tree
shing to quickly retrieve a portion of the bookmarks tree. Bookmarks are retrieved using the Places query system. For more basic bookmarks examples, see Manipulating bookmarks using Places. Get the query and options objects All querying is done through the history service. First, you need to get an empty query and options objects from the history service: var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsINavHistoryService); var options = historyService.getNewQueryOptions(); var query = historyService.getNewQuery(); Find the folder you want to get Known folder IDs are retrieved from the bookmarks service. Attributes defined in /toolkit/components/places/public/nsINavBookmarksService.idl are: bo...
... the folder you want to get Known folder IDs are retrieved from the bookmarks service. Attributes defined in /toolkit/components/places/public/nsINavBookmarksService.idl are: bookmarksMenuFolder, tagsFolder, unfiledBookmarksFolder and toolbarFolder. You can also get folder IDs from a previous query. This example will get the ID of the bookmarks toolbar: var bookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Components.interfaces.nsINavBookmarksService); var toolbarFolder = bookmarksService.toolbarFolder; The placesRoot is the root folder in the whole Places hierarchy. It contains administrative data as well as user data, and is therefore not recommended for use in querying. Configure the query To get a hierarchical b...
...// close a container after using it! rootNode.containerOpen = false; If you encounter a node with a type of RESULT_TYPE_FOLDER or another type of container, you can open these folders and descend into the hierarchy. You will want to read the section "Using the results" in Places:Query System to understand the different result types. ...
... in Places:Query System to understand the different result types. ...
Binary compatibility
When you see a @status FROZEN, note that this means it should work as long as the component and xpcom are built with the same compiler ABI. For more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_Reuse.html . ...
...When you see a @status FROZEN, note that this means it should work as long as the component and xpcom are built with the same compiler ABI. For more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_Reuse.html . ...
...When you see a @status FROZEN, note that this means it should work as long as the component and xpcom are built with the same compiler ABI. For more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_Reuse.html . ...
...omponent and it works fine in version 1.0 of Mozilla. If and when Mozilla upgrades the compiler they use, your component will have to be rebuilt against the same compiler. When you see a @status FROZEN, note that this means it should work as long as the component and xpcom are built with the same compiler ABI. For more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_Reuse.html . Comments and questions should be directed to the newsgroup, mozilla.dev.tech.xpcom, or the mailing list, mozilla-xpcom@mozilla.org. ...
XPCOM glue
Mozilla › Tech › XPCOM › Glue
dependent glue (dependent on xpcom.dll) XPCOM modules, i.e. extension or XULRunner application components, should use the dependent glue. Code which wishes to use only frozen symbols 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 ...
...lso 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 and xpcom_core.lib. In almost all cases embedders should *not* use internal linkage. Components using internal linkage will have shared-library dependencies against non-frozen symbols in the XPCOM libraries, and will not work with any other versions of XPCOM other than the one it was c...
...ue_s -lxpcom -lnspr4 Write it exactly as stated, see Notes. -L/path/to/sdk/lib -lxpcomglue Notes Never link against xpcomglue.lib and xpcomglue_s.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...QITableEnt...
...nux 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 work, if it's the first #include in .cpp, but preprocessor option is how it's usually included. For XULRunner 2.0, you also need to link against mozalloc. This is not a backwards-compatible change with 1.9.x and earlier. On Linux and Mac, add "-lmozalloc" exactly after "-lnspr4" in your linker invocation. On Windows, add "mozalloc.lib" after "nspr4.lib". Please see XPC...
XPCOM changes in Gecko 2.0
s 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 var NSGetModule = XPCOMUtils.generateNSGetModule([myComponent]); Binary components Binary components must be listed explicitly in a manifest using a binary-component direc...
...nt]); else var NSGetModule = XPCOMUtils.generateNSGetModule([myComponent]); Binary components Binary components must be listed explicitly in a manifest using a binary-component directive: binary-component components/mycomponent.dll C++ in the component must be changed: a binary component no longer exports a NSGetModule() function. Instead, it exports an NSModule data symbol which points to a mozilla::Module structure. For more information about the mozilla::Module structure, see the Module.h header file. For an up-to-date example of implementing a dynamic modules, see nsSampleModule.cpp. Note that nsIGenericFactory.h has been removed. References to nsIGenericFactory.h should be replaced with mozilla/ModuleUtils.h. It is possible for a binary component to be compatible with Mozilla 1.9.2 and ...
...::Module structure. For more information about the mozilla::Module structure, see the Module.h header file. For an up-to-date example of implementing a dynamic modules, see nsSampleModule.cpp. Note that nsIGenericFactory.h has been removed. References to nsIGenericFactory.h should be replaced with mozilla/ModuleUtils.h. It is possible for a binary component to be compatible with Mozilla 1.9.2 and Mozilla 2.0 by using the extra macro NS_IMPL_MOZILLA192_NSGETMODULE. See nsSampleModule.cpp for more details. Note: Binary XPCOM components must be recompiled for every new major release of Firefox starting with Firefox 4. Your life would be much easier over the long term if you switch to using js-ctypes instead. Also note that extensions using binary components must now use the unpack property in the in...
...s Using the delete operator on "expando" properties of an XPCNativeWrapper no longer throws a security exception. XPCOMUtils.jsm changes The XPCOMUtils.jsm code module has been updated to let you specify the application IDs of the applications you wish to register your component in. XPCOM service getters A number of commonly used XPCOM services now have service getter functions available in the mozilla::services namespace; these make it much easier to get access to these services from C++ code. ...
Component Internals
omponents to the local system. There are two types of manifests that XPCOM uses to track components: Component Manifests When XPCOM first starts up, it looks for the component manifest, which is a file that lists all registered components, and stores details on exactly what each component can do. XPCOM uses the component manifest to determine which components have been overridden. Starting with Mozilla 1.2, this file is named compreg.dat and exists in the components directory, but there are efforts to move it out of this location to a less application-centric (and thus more user-centric) location. Any Gecko-based application may choose to locate it elsewhere. XPCOM reads this file into an in-memory database. Component Manifests The component manifest is a mapping of files to components and c...
... be registered. There are two supported ways to go about registering your XPCOM component. The first is to use XPInstall, which is an installation technology that may or may not come with a Gecko application and provides interfaces for registering your component during installation. Another, more explicit way to register your component is to run the application regxpcom, which is built as part of Mozilla and is also available in the Gecko SDK. regxpcom registers your component in the default component registry. A Gecko embedding application may also provide its own way of registering XPCOM components using the interface that is in fact used by both XPInstall and regxpcom, nsIComponentRegistrar. An application, for example, could provide a "registration-less" component directory whose components ...
...hange without affecting the software. There is a slight footprint penalty to linking directly, but this gives your component freedom to work in any recent environment. If footprint is a big issue in your component or application, you can trim out the pieces you don't need. XPCOM String Classes The base string types that XPCOM uses are nsAString and nsACString. ...
...nsEmbedString and nsEmbedCString are available as very lightweight string implementations for component development, especially in small embedded applications. ...
Finishing the Component
em. Using Frozen Interfaces The core functionality of blocking sites is still missing, however. The interfaces needed to block certain URLs from loading are not frozen, and there is still some debate about how exactly this functionality should be exposed to embedders and component developers, so the APIs are not ready to be published. This puts you in the same situation as many developers using Mozilla - you want to use some specific functionality, but the interfaces seem to change on a daily basis. All of the Mozilla source code 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 flexibi...
...e the interface nsIFoo that isn't frozen. You build your component using this interface, and it works great with the version of Gecko that you have tested against. However, some point in the future, the nsIFoo interface requires a major change, and methods are reordered, some are added, others are removed. Moreover, since this interface was never supposed to be used by clients other than Gecko or Mozilla, the maintainers of the interface don't know that it's being used, and don't change the IID of the interface. When your component runs in a version of Gecko in which this interface is updated, your method calls will be routed through a different v-table than the one the component expected, most likely resulting in a crash. Below, the component is compiled against a version of the nsIFoo interfac...
...o acquire the nsIIOService. Since this object is going to be used for the life of the component, it can also be cached. A good place to get an nsIIOService is in the component's Observe() method, which already has a pointer to the Service Manager. ...
...String hostToLoad; contentLocation->GetHost(hostToLoad); // Assume failure. Do not allow this nsIURI to load. ...
Using XPCOM Utilities to Make Things Easier
CTOR(ConcreteClass) This results in a function called ConcreteClassConstructor that can be used in the nsModuleComponentInfo structure. #include "nsIGenericFactory.h" static const nsModuleComponentInfo components[] = { { "Pretty Class Name", SAMPLE_CID, "@company.com/sample", SampleConstructor } } NS_IMPL_NSGETMODULE(nsSampleModule, components) Most of the components in the Mozilla browser client use this approach. Common Implementation Macros Every XPCOM object implements nsISupports, but writing this implementation over and over is tedious. Unless you have very special requirements for managing reference counting or handling interface discovery, theimplementation macros that XPCOM provides can be used. Instead of implementing the nsISupports yourself, NS_IMPL_ISUPPORTS1...
...f time when you're writing the code, it can also save time if you make changes to your IDL file, since the C++ header file will then automatically include the updated list of methods to be supported. The NS_INIT_ISUPPORTS macro is also a bit of a special case. Historically, it gets called in the constructor for your class and sets mRefCnt to zero. However, a change in XPCOM that occurred before Mozilla 1.3 makes NS_INIT_ISUPPORTS no longer necessary: mRefCnt's type has been changed from an integer to a class that provides its own auto-initialization. If you are building with versions earlier than Mozilla 1.3, this macro is still required. The following table summarizes the macro usage in this portion of the weblock.cpp source file: Common XPCOM Macros NS_IMPL_ISUPPORTSn Implemen...
...s 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 handles double byte characters, and the latter tends to be used in more general circumstances, but both of these c...
...alFile will be null, and rv will be set to a specific error code corresponding to the reason for the failure. In this construct, the result code rv is an optional parameter. If you don't care what the error code is, you can simply drop it from the function call. From this point on, we'll be using nsCOMPtrs as much as possible in WebLock. For a complete listing of smart pointer functionality, see mozilla.org's nsCOMPtr documentationXXX this should be in devmo. Note: other-parts This section discusses the main parameters of this structure. For a complete listing of all available options you can look at the complete reference in the XPCOM API Reference. Note: nsISupports-warning Note that NS_DECL_ISUPPORTS doesn't obey the general rule in which every interface has a declaration macro of the for...
How to build a binary XPCOM component using Visual Studio
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. ...
...uilt 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, 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 ge...
...It also uses frozen linkage (dependent on XPCOM). I am not defining XPCOM_GLUE and I am linking against xpcomglue_s.lib Create an XPCOM Component A full tutorial of XPCOM is beyond the scope of this posting. Check out the resources at the end of the tutorial for more information on the world of XPCOM. O...
... var obj = Components.classes[cid].createInstance(); obj = obj.QueryInterface(Components.interfaces.ISpecialThing); } catch (err) { alert(err); return; } var res = obj.add(3, 4); alert('3+4 = ' + res); var name = obj.name; alert('Name = ' + name); obj.name = 'New Name'; name = obj.name; alert('Name = ' + name); } Other resources Creating XPCOM Components - Mozilla How to Build an XPCOM Component in Javascript - Mozilla An Introduction to XPCOM - IBM XPCOM Project Page - Mozilla ...
Components.Constructor
arguments given to Components.Constructor() when called. If only one argument is given, that argument is the contract ID of the XPCOM component to create. The component is then returned immediately, with only the base interface nsISupports available on it; you must call nsISupports.QueryInterface() on it to call methods on the object. ...
...d to nsIBinaryInputStream bis.setInputStream(someInputStream); } catch (e) { bis.QueryInterface(Components.interfaces.nsIBinaryInputStream); bis.setInputStream(someInputStream); // succeeds now } If two arguments are given, the created instance will be nsISupports.QueryInterface()'d to the XPCOM interface whose name is the second argument: var BinaryInputStream = Components.Constructor("@mozilla.org/binaryinputstream;1", "nsIBinaryInputStream"); var bis = new BinaryInputStream(); print(bis.toString()); // "[xpconnect wrapped nsIBinaryInputStream]" // someInputStream is an existing nsIInputStream bis.setInputStream(someInputStream); // succeeds If three arguments are given, then in addition to being nsISupports.QueryInterface()'d, the inst...
...am bis.setInputStream(someInputStream); // succeeds If three arguments are given, then in addition to being nsISupports.QueryInterface()'d, the instance will also have had an initialization method called on it. ...
...am bis = new BinaryInputStream(someInputStream); // succeeds var bytes = bis.readByteArray(someNumberOfBytes); // succeeds } Compare instance creation from base principles with instance creation using Components.Constructor(); the latter is much easier to read than the former (particularly if you're creating instances of a component in many different places): var bis = Components.classes["@mozilla.org/binaryinputstream;1"] .createInstance(Components.interfaces.nsIBinaryInputStream); bis.setInputStream(someInputStream); // assumes BinaryInputStream was initialized previously var bis = new BinaryInputStream(someInputStream); Components.Constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other co...
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 nsIDNSListener...
...cko 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. ...
... 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. ...
...cords, which would be unaffected by this method. void shutdown(); Parameters None. ...
nsIDOMParser
To create a DOMParser object from a web page or a chrome script running in a window, simply use new DOMParser(). When you create a DOMParser from a privileged script, you can pass parameters to the constructor, more on that below. To create a DOMParser when the constructor is not available (e.g., from a JS XPCOM component, a JS module, or an xpcshell test), use: var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"] .createInstance(Components.interfaces.nsIDOMParser); // optionally, call parser.init(principal, documentURI, baseURI); Principals, document and base URI Note: This section covers changes introduced to DOMParser in Gecko 1.9. (This section is only relevant to Firefox extensions--not to Web content.) To create a document, the parser needs to specify a princ...
...s), 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 the DOMParser constructor or calling parser.init(). Usually you don't need to do that. If you come across a situation when these matter, feel free to ask questions in mozilla.dev.tech.dom and update this documentation to mention these cases. When a DOMParser is instantiated by calling new DOMParser(), it inherits the calling code's principal (except that for chrome callers the principal is set to the null principal) and the documentURI and baseURI of the window the constructor came from. If the caller has UniversalXPConnect privileges, it can pass parameters to new D...
...ng Once you've created a DOMParser object, you can use its parseFromString method to parse XML or HTML as described in the Web platform documentation. ...
...rseFromString(aStr, "application/xml"); Outside of a window (e.g., a JS XPCOM component, a JS module, or an xpcshell test): var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"] .createInstance(Components.interfaces.nsIDOMParser); var doc = parser.parseFromString(aStr, "application/xml"); Using Components.Constructor(): const DOMParser = new Components.Constructor("@mozilla.org/xmlextras/domparser;1", "nsIDOMParser"); var parser = new DOMParser(); parser.init(principal, documentURI, baseURI); var doc = parser.parseFromString(aStr, "application/xml"); ...
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. ...
...it/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. ...
...y entries, only store in the temporary disk cache, etc.). This should be determined via PrivateBrowsingUtils.isWindowPrivate(someRelatedWindow) if the favicon may expose the user's private browsing data by performing a network request, otherwise FAVICON_LOAD_NON_PRIVATE may be used. aCallback Optional from Gecko 2.0 An nsIFaviconDataCallback. ...
...vicon may expose the user's private browsing data by performing a network request, otherwise FAVICON_LOAD_NON_PRIVATE may be used. aCallback Optional from Gecko 2.0 An nsIFaviconDataCallback. Example var ioservice = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var pageURI = ioservice.newURI("http://www.mozilla.org/", null, null); var faviconURI = ioservice.newURI("http://www.mozilla.org/favicon.ico", null, null); faviconService.setAndLoadFaviconForPage(pageURI, faviconURI, false); setFaviconData() 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 mozIAsyncFavicons.repla...
nsIIdleService
ation 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 working in other applications, the idle service will still consider the user to be active. Currently nsIIdleService implementations exist for Windows, Mac OS X, and Linux (via XScreenSaver). ...
...dle detection, not just application idle detection. In other words, even if the user is working in other applications, the idle service will still consider the user to be active. Currently nsIIdleService implementations exist for Windows, Mac OS X, and Linux (via XScreenSaver). Implemented by: @mozilla.org/widget/idleservice;1. ...
...erver will remove it once, for the idle time you specify. If you have added an observer multiple times, you will need to remove it just as many times. void removeIdleObserver( in nsIObserver observer, in unsigned long time ); Parameters observer The nsIObserver to be removed. time The amount of time they were listening for. ...
...for. Example Example 1 var idleService = Components.classes["@mozilla.org/widget/idleservice;1"] .getService(Components.interfaces.nsIIdleService) setTimeout(function() { alert(idleService.idleTime) }, 1000) // if you don't use the mouse or the keyboard after running this snippet, // you'll see a number around 1000 alerted. Example 2 var idleService = Components.classes["@mozilla.org/widget/idleservice;1"] .getService(Components.interfaces.nsIIdleService) var idleObserver = { observe: function(subject, topic, data) { alert("topic: " + topic + "\ndata: " + data); } }; idleService.addIdleObserver(idleObserver, 60); // one minute // ... // Don't forget to remove the observer using removeIdleObserver! idleService.removeIdleObserver(idleObserver, 60);...
nsIWindowWatcher
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. Windows must notify this component when they are created or destroyed, so only a weak reference is kept. Note that there is no interface for such notifications (not a public one, anyway). This is taken care of both in Mozilla and by common embedding code. Embedding clients need do nothing special about that requirement. This component must be initialized at application startup by calling setWindowCreator(). Method overview nsIWebBrowserChrome getChromeForWindow(in nsIDOMWindow aWindow); nsIAuthPrompt getNewAuthPrompter(in nsIDOMWindow aParent); nsIPrompt getNewPrompter(in nsIDOMWindow aPa...
...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. ...
...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. ...
...aObserver should implement an observe method, which will be called with the following parameters: aSubject - the win...
nsIXULAppInfo
It provides application name, application version, Gecko version and more. 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) In XULRunner applications nsIXULAppInfo obtains app-specific information from application.ini. Implemented by: @mozilla.org/xre/app-info;1. ...
...to distinguish between different Mozilla-based applications. It provides application name, application version, Gecko version and more. 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) In XULRunner applications nsIXULAppInfo obtains app-specific information from application.ini. 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.nsIXULAppInfo); The nsIXULRuntime interface is also implemented by "xre/app-info". It contains advanced information on the xul runtime. Attributes Attribute Type Description appBuildID ACString The appl...
...the XULRunner platform. Read only. platformVersion ACString The version of Gecko or XULRunner platform, for example "1.8.1.19" or "1.9.3pre". In "Firefox 3.7 alpha 1" the application version is "3.7a1pre" while the platform version is "1.9.3pre" Read only. vendor ACString The name of the application vendor. This must be ASCII, and is normally mixed-case, for example "Mozilla". Can be an empty string if vendor is not set. Read only. version ACString The XUL application's version, for example "0.8.0+" or "3.7a1pre". It is different than the version of Gecko or the XULRunner platform. Be careful about which one you want! Can be an empty string, but a valid value is required for XUL applications using the extension manager or update service. Read only. ...
...tion's version, for example "0.8.0+" or "3.7a1pre". It is different than the version of Gecko or the XULRunner platform. Be careful about which one you want! Can be an empty string, but a valid value is required for XUL applications using the extension manager or update service. Read only. ...
XPCOM reference
This reference describes the interfaces and functions provided by the XPCOM library. In addition, it details the various helper classes and functions, as well as the components, provided by the XPCOM glue library. The contents herein are oriented primarily toward extension developers and people embedding XPCOM in other projects. If you're working on a module in the Mozilla codebase that's compiled with the MOZILLA_INTERNAL_API flag set, some of these APIs -- the string functions and classes in particular -- are not the ones you should be using. See the XPCOM internal string guide for documentation of the internal string API used within the Mozilla codebase. Core XPCOM functionsXPCOM provides a number of global functions which are used to initialize and shut down the XPCOM library...
...acroNS_RELEASEMacroNS_WARNINGMacronsGetModuleProcThis function prototype provides the XPCOM entry-point into a module.nsIAbCard/Thunderbird3The nsIAbCard interface is used to represent and manipulate cards in the address book. In a big change from the original nsIAbCard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsICookie2 MOZILLA 1 8 BRANCHnsIMsgSearchValueDefined in comm-central/ mailnews/ base/ search/ public/ nsIMsgSearchValue.idl nsMsgMessageFlagsThe nsMsgMessageFlags interface describes possible flags for messages. Equivalent flags are also defined in nsMsgMessageFlags.h. nsMsgNavigationTypeThe nsMsgNavigationType interface contains constants used for message navigation in Thunderbird. For example to move forward...
...Grouping and category names were made by somewhat arbitrary decision by the author. (I'm fully aware that this will be a great po...
...tsThere are a number of components provided in the standard implementation of XPCOM; these are as follows.XPCOM glue classesThese "glue" classes are provided to make it easier to use XPCOM from C++ code.XPCOM Interface ReferenceThis is a reference to the XPCOM interfaces provided by the Mozilla platform.XPCOM Interface Reference by groupingThis page lists the current (as of Dec. 01, 2010) list of Mozilla interfaces as listed on the XPCom interface Reference Page Where that page lists items by alphabetical sorting, this page attempts to group them by function. Grouping and category names were made by somewhat arbitrary decision by the author. (I'm fully aware that this will be a great point of discussion and probably will end in tears, but since I'm the first person to apparently take a swing at t...
Troubleshooting XPCOM components registration
It is important to not misdiagnose the problem. You can be certain that a component has failed to register by going to the Error Console and evaluating Components.classes["contract-id"].name where contract-id is your contract ID. If the response is your contract ID instead of an error, the component was successfully registered and this is the wrong page. Load Failure of Binary Components On the Mozilla trunk (Firefox 3, XULRunner 1.9), components that fail to load will print an error to the Error Console. Chrome errors must be enabled. If the error appears, you can use NSPR logging to see additional information about the failure by running Firefox from a command prompt: rem Close all Firefox windows! set NSPR_LOG_MODULES=nsNativeModuleLoader:5 set NSPR_LOG_FILE=C:\Path\to\logfile "C:\Program F...
...k (Firefox 3, XULRunner 1.9), components that fail to load will print an error to the Error Console. Chrome errors must be enabled. If the error appears, you can use NSPR logging to see additional information about the failure by running Firefox from a command prompt: rem Close all Firefox windows! 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 JavaScrip...
...ld not occur if you uninstalled/installed your extension via the Extension Manager. When adding a component to a XULRunner application, change the BuildID in application.ini. If your component requires any external libraries, you may need to read Using Dependent Libraries In Extension Components Make sure you are compiling against the right version. If you are testing with a release from mozilla.org, use the Gecko 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 c...
...ed here. The dllmain code that MSVC 8 (and probably earlier versions too) generates for you doesn't need to be there, you can remove it. You may be able build your component using USE_STATIC_LIBS=1 in order to remove C runtime library dependencies. Linux-specific hints Check if you have missing dependent libraries: From your Firefox (/XULRunner) install directory, run "./run-mozilla.sh `which ldd` -r path/to/your/component.so". There should be no "not found" entries and no undefined symbols. (The -r switch from GNU ldd lists function relocations; adjust as suitable for your version) Trace shared library loading by setting the environment variable LD_DEBUG=all while launching Firefox (see `man ld.so` for details). Use strace to see if Firefox is trying to load your com...
xptcall FAQ
Why does xptcall exist? xptcall exists for two reasons: To support invoking arbitrary methods on XPCOM interfaces. To support dynamically impersonating any XPCOM interface. ...
...forward calls to a shared function whose job it is to use the typelib information to extract the parameters from the platform specific calling convention to build an array of variants to hold the parameters and then call an inherited method which can then do whatever it wants with the call. This code also does the platform specific cleanup as the call returns. This all works and is being used in Mozilla today on numerous platforms. Why can't xptcall just be implemented in C or C++? Neither of these two facilities can be done in a fully cross platform way. Nor can they generally be done fully in C or C++. Let's take them one at a time to see why. The invoke facility requires code that can build and invoke an arbitrary call frame. The C++ compiler builds such call frames all the time. But the c...
...mall generic stubs. This minimizes the platform specific code as much as possible. Again, you just can't write code in C to do all this. The varargs stuff goes part way, but is just not enough. If anyone has credible ideas about how to get the required functionality in a cross platform way and/or without resorting to assembly code I'd love to hear about it. Is xptcall a platform requirement for Mozilla? Yes. Mozilla will not run properly without a functioning port of xptcall. Non-functional stub code exists to allow building xptcall on non-supported platforms. But any browser feature that relies on XPConnect will fail. Any platform that does not do xptcall is in trouble. We need to get moving on getting xptcall working everywhere! What platforms are supported? The growing list: Porting st...
... xptcall on non-supported platforms. But any browser feature that relies on XPConnect will fail. Any platform that does not do xptcall is in trouble. We need to get moving on getting xptcall working everywhere! What platforms are supported? The growing list: Porting status Where can I find other resources? The code is at: xpcom/reflect/xptcall A new porting guide is at: https://developer.mozilla.org/En/Xptcall_Porting_Guide Pre-implementation proposals are here and here. Original Document Information Author(s): John Bandhauer <jband@netscape.com> Originally Published: 02 September 1999 ...
LDAP Support
It assumes you are already familiar with configuring preferences for deployed builds in addition to setting up Thunderbird to use an LDAP directory. It should be noted that all of this information applies to both Thunderbird and the SeaMonkey application suite. Mail Compose Typedown In mail compose, when typing a partial mail address, a typedown window appears listing possible matches against address books and LDAP directories. ...
...apping from LDAP attributes to Address Book. Consistent round tripping when editing Address Book attributes which are stored on an LDAP server. ...
...when editing Address Book attributes which are stored on an LDAP server. ...
... o Company company WorkCountry countryname _AimScreenName nscpaimscreenname WebPage1 workurl WebPage2 homeurl BirthYear birthyear Custom1 custom1 Custom2 custom2 Custom3 custom3 Custom4 custom4 Notes notes Notes description PreferMailFormat xmozillausehtmlmail LastModifiedDate modifytimestamp Custom LDAP Attributes Thunderbird supports custom LDAP attributes for various Address Book attributes. See Bug #119291 for more details. Original Document Information Author(s): Scott MacGregor Copyright Information: Portions of this content are (C) 1998-2010 by individual mozilla.org contributors; content available under a C...
Thunderbird Binaries
- and their downloaded locations. Additionally, ad-hoc packages called try builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports. Releases Thunderbird releases have been extensively tested and are made available for anyone to download and use it. Thunderbird current release can be downloaded from https://www.mozilla.org/thunderbird/ Past Thunderbird releases can be downloaded from https://releases.mozilla.org/pub/thunderbird/releases/ Early Preview Releases Whilst writing new versions of Thunderbird, developers release preview versions, known as Betas. These builds are made to get feedback from testers and extension developers. Note: While Beta builds have had some testing, they should be considered prev...
...ing new versions of Thunderbird, developers release preview versions, known as Betas. These builds are made to get feedback from testers and extension developers. Note: While Beta builds have had some testing, they should be considered preview only and should not be used in a production environment. Please read the release notes before downloading. Preview Releases are available from http://www.mozilla.org/thunderbird/channel/ Nightly Builds Nightly builds are cutting-edge builds. They are built every 24 hours by the tinderboxes from the very latest source code. There are various sorts of nightly builds available for download. If you wish to download nightly builds to help us test for the next release, please read the testing page for where we need help. Warning: Whilst developers try t...
... use a nightly build on your main profile, you should make sure you back up your profile. Nightly builds from the comm-central trunk The trunk is the central source code that is used for continuous and ongoing development. Trunk builds contain the very latest bleeding-edge changes and updates, as well as 64-bit builds for Windows. Latest English trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ Latest localized trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central-l10n/ Note: Please use http://ftp.stage.mozaws.net/pub/thunderbird/nightly/latest-comm-central/ because the above two links currently do not work. Frequently asked questions What is the trunk? The trunk is the central source ...
...nd implement correctly. Their changes will be made to the trunk 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". 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.
ctypes.open
otstrap or Add-on SDK addons, the JAR path must be used. Therefore, the path has to be converted and then the converted path is used for loading with ctypes.open. ...
..."); var cr = Components.classes['@mozilla.org/chrome/chrome-registry;1'].getService(Components.interfaces.nsIChromeRegistry); var chromeURI_myLib = Services.io.newURI('chrome://youraddon/content/mySubFolder/myCFunctionsForUnix.so', 'UTF-8', null); var localFile_myLib = cr.convertChromeURL(chromeURI_myLib); var jarPath_myLib = localFile_myLib.spec; // "jar:file:///C:/Users/Vayeate/AppData/Roaming/Mozilla/Firefox/Profiles/aecgxse.Unnamed%20Profile%201/extensions/youraddon@jetpack.xpi!/mySubFolder/myCFunctionsForUnix.so" var filePath_myLib = localFilemyLib.path; // "file:///C:/Users/Vayeate/AppData/Roaming/Mozilla/Firefox/Profiles/aecgxse.Unnamed%20Profile%201/extensions/youraddon@jetpack.xpi!/mySubFolder/myCFunctionsForUnix.so" If your add-on is a bootstrap add-on, then you don't need to use thi...
...f addon is unpacked, this will be the addon folder. ...
... var lib = ctypes.open(filePath_myLib); var add_with_c = lib.dec...
Introduction to DOM Inspector - Firefox Developer Tools
The DOM Inspector is a Mozilla extension that you can access from the Tools > Web Development menu in SeaMonkey, or by selecting the DOM Inspector menu item from the Tools menu in Firefox and Thunderbird, or by using Ctrl/Cmd+Shift+I in either application. DOM Inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own XULRunner app. DOM Inspector can serve as a sanity check to verify the state of the DOM, or it can be used to manipulate the DOM by hand, if desired. Note: Starting with Firefox 3, the DOM Inspector is not included in Firefox by default; instead, you must download and install it from the Mozilla add-ons web site. (Note: this is now a dead link.) When you first start the DOM Inspector, you are presented with a two-pane application wind...
...Like the browser, the DOM Inspector includes an address bar, and some of the same menus. In SeaMonkey additional global menus will be available. ...
...OM Inspector, simply access that window as you would normally and then choose its title from this dynamically updated menulist. Inspecting arbitrary URLs You may also inspect the DOM of arbitrary URLs by using the Inspect a URL menuitem in the File menu, or by just entering a URL into the DOM Inspector's address bar and clicking Inspect or pressing enter. For example, you can enter http://www.mozilla.org in the address bar and see the DOM structure of the mozilla.org home page. You should not use this approach to inspect chrome documents. Instead, ensure that the document loads via normal means and use the Inspect Chrome Document menupopup to select it for inspection. When you inspect a web page with this method, a browser pane at the bottom of the DOM Inspector window will open up, displ...
...e you get used to it, you may find that these structured views of web pages and interfaces were exactly the aspects of your own application development that were missing. The DOM Inspector not only presents all this information about pages in a clear and structured way, it gives you way to find and update those structures, and it's simple to access via shortcuts and menus already available in the Mozilla browser. Used in concert with Mozilla tools like Venkman, the JavaScript debugger, the DOM Inspector can give you a complete view of any web page or DOM-based application interface. ...
Browser Console - Firefox Developer Tools
r bootstrapped add-on, get it from the Console module. One exported symbol from Console.jsm is "console". Below is an example of how to access it, which adds a message to the Browser Console. Components.utils.import("resource://gre/modules/Console.jsm"); console.log("Hello from Firefox code"); //output messages to the console Learn more: console API reference Console.jsm source code in the Mozilla DXR HUDService There is also the HUDService which allows access to the Browse Console. The module is available at Mozilla DXR. We see we can not only access the Browser Console but also Web Console. Here is an example on how to clear the contents of the Browser console: Components.utils.import("resource://devtools/shared/Loader.jsm"); var HUDService = devtools.require("devtools/client/webcon...
... Note: You can restart the browser with the command Ctrl + Alt + R (Windows, Linux) or Cmd + Alt + R (Mac) This command restarts the browser with the same tabs open as before the restart. Modifying the browser UI Since the global window object is the browser's chrome window...
...as before the restart. Modifying the browser UI Since the global window object is the browser's chrome window, you can also modify the browser's user interface. ...
...ElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem"); makeTheTea.setAttribute("label", "A nice cup of tea?"); parent.appendChild(makeTheTea); On macOS, this similar code will add a new item to the "Tools" menu: var parent = window.document.getElementById("menu_ToolsPopup"); var makeTheTea = gBrowser.ownerDocument.defaultView.document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem"); makeTheTea.setAttribute("label", "A nice cup of tea?"); parent.appendChild(makeTheTea); ...
Basic animations - Web APIs
be reduced to a lower rate when running in background tabs. For more information about the animation loop, especially for games, see the article Anatomy of a video game in our Game development zone. An animated solar system This example animates a small model of our solar system. ...
...formation about the animation loop, especially for games, see the article Anatomy of a video game in our Game development zone. An animated solar system This example animates a small model of our solar system. ...
... Anatomy of a video game in our Game development zone. An animated solar system This example animates a small model of our solar system. ...
..."150"></canvas> ScreenshotLive sample A looping panorama In this example, a panorama is scrolled left-to-right. We're using an image of Yosemite National Park we took from Wikipedia, but you could use any image that's larger than the canvas. var img = new Image(); // User Variables - customize these to change the image being scrolled, its // direction, and the speed. ...
HTMLHyperlinkElementUtils.host - Web APIs
The HTMLHyperlinkElementUtils.host property is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. ...
... The HTMLHyperlinkElementUtils.host property is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. ...
...perty is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. ...
...if the port of the URL is nonempty, a ':', and the port of the URL. Syntax string = object.host; object.host = string; Examples var anchor = document.createElement("a"); anchor.href = "https://developer.mozilla.org/HTMLHyperlinkElementUtils.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/HTMLHyperlinkElementUtils.host" anchor.host == "developer.mozilla.org" // The port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/HTMLHyperlinkElementUtils.host" anchor.host == "developer.mozilla.org:4097" Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.host' in that specification. Living Standard Init...
Privileged features - Web APIs
ext menu defined by default and none of the standard keyboard shortcuts will work. The page is supposed to provide a user interface of its own, usually this feature is used to open XUL documents (standard dialogs like the JavaScript Console are opened this way). dialog The dialog feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. Mozilla 1.2+ and Netscape 7.1 will render the other menu system commands (in FF 1.0 and in NS 7.0x, the command system menu is not identified with the Firefox/NS 7.0x icon on the left end of the titlebar: that's probably a bug. You can access the command system menu with a right-click on the titlebar). Dialog windows are windows which have no minimize system command icon and no maximize/restore down syst...
... notify info and to be dismissed, closed. 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, thi...
...er 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 the new secondary window. Mozilla and Firefox users can force new windows to always render the titlebar by setting dom.disable_window_open_feature.titlebar to true in about:config or in their user.js file. alwaysRaised If on, the new window will always be displayed on top of other browser windows, regardless of whether it is active or not. alwaysLowered If on, the new created window floats below, under its own parent when t...
...splayed on top of all other windows (browser windows and otherwise), regardless of whether it is active or not. This was added in Firefox 66 (see bug 1519893). z-lock Same as alwaysLowered. close When set to no or 0, this feature removes the system close command icon and system close menu item. It will only work for dialog windows (dialog feature set). close=no will override minimizable=yes. Mozilla and Firefox users can force new windows to always have a close button by setting dom.disable_window_open_feature.close to true in about:config or in their user.js file. ...
-moz-image-rect - CSS: Cascading Style Sheets
es that comprise the complete image. The container looks like this: #container { width:267px; height:272px; top:100px; left:100px; position:absolute; font-size:16px; text-shadow:white 0px 0px 6px; text-align:center; } Then the four boxes defining the segments of the image are defined. Let's look at them one at a time. ...
...k at them one at a time. #box1 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 0%, 50%, 50%, 0%); width:133px; height:136px; position:absolute; } This is the top-left corner of the image. It defines a rectangle containing the top-left quarter of the image in the file firefox.jpg. #box2 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 0%, 100%, 50%, 50%); width:133px; height:136px; position:absolute; } This defines the top-right corner of the image. ...
...ining the top-left quarter of the image in the file firefox.jpg. #box2 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 0%, 100%, 50%, 50%); width:133px; height:136px; position:absolute; } This defines the top-right corner of the image. ...
... 50%, 50%); width:133px; height:136px; position:absolute; } This defines the top-right corner of the image. ...
background-image - CSS: Cascading Style Sheets
ges cannot be loaded--for instance, when the network is down--the background color will be used as a fallback. Syntax Each background image is specified either as the keyword none or as an <image> value. To specify multiple background images, supply multiple values, separated by a comma: background-image: linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://mdn.mozillademos.org/files/7693/catfront.png'); Values none Is a keyword denoting the absence of images. <image> Is an <image> denoting the image to display. There can be several of them, separated by commas, as multiple backgrounds are supported. Accessibility concerns Browsers do not provide any special information on background images to assistive technology. This is important primarily for scre...
...ML <div> <p class="catsandstars"> This paragraph is full of cats<br />and stars. ...
... Candidate Recommendation From CSS2 Revision 1, the property ...
... Candidate Recommendation From CSS2 Revision 1, the property has been extended to support multiple backgrounds and any <image> CSS data ...
A hybrid approach - Developer guides
s into a responsive design, but there are even ways to use the hybrid approach if your use cases for mobile and desktop are very different. You could, for example, increase the flexibility of your separate site designs by incorporating media queries and a flexible layout. You may even be able to make your mobile site design adaptable enough to extend comfortably to tablets as well. Examples For Mozilla's Web O' Wonder demo site, we tried out a basic version of the hybrid approach, with positive results. We used some elements of responsive web design to give the site a mobile layout, along with user-agent detection to provide mobile-friendly videos and to re-order the demos if the user is on a phone. Feel free to check out the source code on github. We could also be doing more development invol...
...approach, with positive results. We used some elements of responsive web design to give the site a mobile layout, along with user-agent detection to provide mobile-friendly videos and to re-order the demos if the user is on a phone. Feel free to check out the source code on github. We could also be doing more development involving this approach very soon! In fact, one potential path for the main Mozilla site is roughly outlined in the "The Good" section above: Using user-agent detection, route visitors to a landing page for the Firefox version for their device. Every page on the site should look great at a wide variety of resolutions, being built with responsive design in mind. Future plans include exploring serving images based on user-agent. So far there is not much to see for mobile, s...
... visitors to a landing page for the Firefox version for their device. Every page on the site should look great at a wide variety of resolutions, being built with responsive design in mind. Future plans include exploring serving images based on user-agent. So far there is not much to see for mobile, since things are still in the formative stages of development, but you can always watch the new mozilla.org grow up on github. Subscribe to the Mozilla Webdev blog for updates about our progress. Summary No approach is a one-size-fits-all solution. Web applications that want to heavily modify the content or user flow for mobile users should probably go for a separate mobile site. Content-oriented pages that don't need to modify their content for mobile users will be satisfied with responsive desi...
...d like to accomplish, and pick a practical approach while being aware of the tradeoffs. Good luck! Approaches to mobile Web development See the following articles for background and other approaches to developing for mobile platforms. What is mobile-friendliness? Separate sites Responsive design Original document information This article was originally published on 27 June 2011, on the Mozilla Webdev blog as "Approaches to Mobile Web Development Part 4 - A Hybrid Approach", by Jason Grlicky. ...
<input type="url"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › url
autocorrect A Safari extension, the autocorrect attribute is a string which indicates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. mozactionhint A Mozilla extension, supported by Firefox for Android, which provides a hint as to what sort of action will be taken if the user presses the Enter or Return key while editing the field. This information is used to decide what kind of label to use on the Enter key on the virtual keyboard. Note: This has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. To see the s...
...nly-used URLs more quickly. This also offers hints to autocomplete. The list attribute specifies the ID of a <datalist>, which in turn contains one <option> element per suggested value; each option's value is the corresponding suggested value for the URL entry box. ...
...urn contains one <option> element per suggested value; each option's value is the corresponding suggested value for the URL entry box. <input id="myURL" name="myURL" type="url" list="defaultURLs"> <datalist id="defaultURLs"> <option value="https://developer.mozilla.org/"> <option value="http://www.google.com/"> <option value="http://www.microsoft.com/"> <option value="https://www.mozilla.org/"> <option value="http://w3.org/"> </datalist> With the <datalist> element and its <option>s in place, the browser will offer the specified values as potential values for the URL; this is typically presented as a popup or drop-down menu containing the suggestions. While the specific user experience may vary from one browser to another, typically clicking in the edit box presents a drop-d...
...r types a custom value. Using labels for suggested values You can opt to include the label attribute on one or all of your <option> elements to provide textual labels. Some browsers may display only the labels, while others may display both the label and the URL. <input id="myURL" name="myURL" type="url" list="defaultURLs"> <datalist id="defaultURLs"> <option value="https://developer.mozilla.org/" label="MDN Web Docs"> <option value="http://www.google.com/" label="Google"> <option value="http://www.microsoft.com/" label="Microsoft"> <option value="https://www.mozilla.org/" label="Mozilla"> <option value="http://w3.org/" label="W3C"> </datalist> Validation There are two levels of content validation available for url inputs. First, there's the standard level of validation o...
Microformats - HTML: Hypertext Markup Language
nization u-uid universally unique identifier, preferably canonical URL p-street-address street number + name p-locality city/town/village p-country-name country name Nested h-card example <div class="h-card"> <a class="p-name u-url" href="http://blog.lizardwrangler.com/" >Mitchell Baker</a> (<a class="p-org h-card" href="http://mozilla.org/" >Mozilla Foundation</a>) </div> Parsed JSON: { "items": [{ "type": ["h-card"], "properties": { "name": ["Mitchell Baker"], "url": ["http://blog.lizardwrangler.com/"], "org": [{ "value": "Mozilla Foundation", "type": ["h-card"], "properties": { "name": ["Mozilla Foundation"], "url": ["http://mozilla.org/"] } }] } }] } Note: the n...
...ckthoughts.jgregorymcverry.com/profile/jgmac1106" ><img class="u-photo" src="https://quickthoughts.jgregorymcverry.com/file/2d6c9cfed7ac8e849f492b5bc7e6a630/thumb.jpg"/></a> <a class="p-name u-url" href="https://quickthoughts.jgregorymcverry.com/profile/jgmac1106">Greg McVerry</a></span> Replied to <a class="u-in-reply-to" href="/docs/Web/HTML/microformats">a post on <strong>developer.mozilla.org</strong> </a>: </p> <p class="p-name e-content">Hey thanks for making this microformats resource</p> <p> <a href="https://quickthoughts.jgregorymcverry.com/profile/jgmac1106">Greg McVerry</a> published this <a class="u-url url" href="https://quickthoughts.jgregorymcverry.com/2019/05/31/hey-thanks-for-making-this-microformats-resource"><time class="dt-published" datetime="2019-05-...
...ally embedded h-card Parsed h-event Example <div class="h-event"> <h2 class="p-name">IndieWeb Summit</h2> <time class="dt-start" datetime="2019-06-29T09:00:00-07:00">June 29, 2019 at 9:00am (-0700)</time><br>through <time class="dt-end" datetime="2019-06-30T18:00:00-07:00">June 30, 2019 at 6:00pm (-0700)</time><br> <div class="p-location h-card"> <div> <span class="p-name">Mozilla</span> </div> <div> <span class="p-street-address">1120 NW Couch St</span>, <span class="p-locality">Portland</span>, <span class="p-region">Oregon</span>, <span class="p-country">US</span> </div> <data class="p-latitude" value="45.52345"></data> <data class="p-longitude" value="-122.682677"></data> </div> <div class="e-content">Come join ...
...-29T09:00:00-07:00" ], "end": [ "2019-06-30T18:00:00-07:00" ], "published": [ "2019-05-25T18:00:00-07:00" ], "content": [ { "html": "Come join us", "value": "Come join us", "lang": "en" } ], "location": [ { "type": [ "h-card" ], "properties": { "name": [ "Mozilla" ], p-street-address: [ "1120 NW Couch St" ] "locality": [ "Portland" ], "region": [ "Oregon" ], "country": [ "US" ], "latitude": [ "45.52345" ], "longitude": [ "-122.682677" ] }, "lang": "en", "value": "Mozilla" } ] }, "lang": "en" } ], ...
Evolution of HTTP - HTTP
nguage, encoding, or type, has been introduced, and allows a client and a server 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. ...
...e, has been introduced, and allows a client and a server 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. ...
...equests, all through one single connection is now looking like this: GET /docs/Glossary/Simple_header 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 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, br Referer: https://developer.mozilla.org/docs/Glossary/Simple_header 200 OK Connection: Keep-Alive Content-Encoding: gzip Content-Type: text/html; charset=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-back...
... Connection: Keep-Alive Content-Encoding: gzip Content-Type: text/html; charset=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...
MathML
MathML reference MathML element reference Details about each MathML element and compatibility information for desktop and mobile browsers. ...
...hML attribute reference Information about MathML attributes that modify the appearance or behavior of elements. MathML examples MathML samples and examples to help you understand how it works. Authoring MathML Suggestions and tips for writing MathML, including suggested MathML editors and how to integrate their output into Web content. View All... ...
...avior of elements. MathML examples MathML samples and examples to help you understand how it works. Authoring MathML Suggestions and tips for writing MathML, including suggested MathML editors and how to integrate their output into Web content. View All... Getting help from the community View Mozilla forums... ...
... Related topics CSS HTML SVG ...
The building blocks of responsive design - Progressive web apps (PWAs)
ot are planned for a future date. Our desktop layout for Snapshot is three columns, containing the camera viewer, image capture view, and gallery, respectively. The markup is very simple: <x-deck selected-index="0"> <x-card> ... </x-card> <x-card> ... </x-card> <x-card> ... </x-card> </x-deck> Note: These weird x- elements may be unfamiliar; they are part of Brick, Mozilla's UI element library for mobile web apps. We have used Brick to create the mobile layout for Snapshot, which you will read more about below. To get these sitting side-by-side we have used the following rules: x-card { width: 100%; } x-card:nth-child(1), x-card:nth-child(2) { width: 30%; float: left; padding: 2rem; } x-card:nth-child(3) { width: 40%; float: left; height: 100%; ...
... x-card:nth-child(2) button:nth-of-type(2) { bottom: 5.9rem; } x-card:nth-child(1) button { font-size: 7vw; } x-card:nth-child(2) button { font-size: 7vw; } The next rules do some sizing on the buttons inside the first two cards, and give all card contents a top margin so that their content won't be lost under the navigation buttons (see below). This was necessary because Mozilla Brick (also see below) forces its components to be 100% of the screen width and height. We have used vw (viewport width) units for these -- 1vw is equivalent to 1% of the viewport width. This makes the dimensions scale up and down nicely along with the viewport width. Last for this section, we absolutely positioned all buttons at the bottom of the cards they are in, so the layout looks OK at dif...
... set to have a line-height of 2.5, in the default CSS at the top of the stylesheet (check if you don't believe me.) And 6.8 x 2.5 = 17. Last, we have used flex: 1; to make the buttons always take up the same proportion of space on the line. Let's have a look at the mobile layout, in the below image. But there are more tricks up our sleeves for this mobile app layout! As mentioned above, we used Mozilla Brick, a collection of ready-rolled mobile UI components, in the making of the mobile app layout. In particular, we used the deck component for the nice transition effect between cards when the buttons are pressed. For more on using Brick, read Mozilla Brick: ready made UI components. What's more relevant to this article is that we didn't want the Brick CSS and JavaScript files being applied to ...
...h are perfect for all situations, so you need to decide which one is right for your particular situation. Some available solutions are as follows: HiSRC A jQuery plugin that allows you to create small, medium, and large versions of an image, and then serves the appropriate one according to the browser's resolution and available network speed. Mobify.js capturing A very clever technique from Mozilla that allows you to capture the source of the page before it's parsed. This way, you can swap out image src values with JavaScript depending on browser features, circumventing browser preloading issues. This is promising, but doesn't work very well across older browsers. Picturefill A JavaScript-based polyfill for <picture>, which works nicely, but it does require a lot of custom markup. Adapti...
Transport Layer Security - Web security
The security of any connection using Transport Layer Security (TLS) is heavily dependent upon the cipher suites and security parameters selected. This article's goal is to help you make these decisions to ensure the confidentiality and integrity communication between client and server. The Mozilla Operations Security (OpSec) team maintains a wiki entry with reference configurations for servers. The Transport Layer Security (TLS) protocol is the standard for enabling two networked applications or devices to exchange information privately and robustly. Applications that use TLS can choose their security parameters, which can have a substantial impact on the security and reliability of data. This article provides an overview of TLS and the kinds of decisions you need to make when securing y...
... method that will be used to encrypt data. The cipher suite in TLS 1.3 primarily governs the encryption of data, separate negotiation methods are used for key agreement and authentication. Different software might use different names for the same cipher suites. For instance, the names used in OpenSSL and GnuTLS differ from those in the TLS standards. ...
...respondence table on the Mozilla OpSec team's article on TLS configurations lists these names as well as information about compatibility and security levels. Configuring your server Correctly configuring your server is crucial. In general, you should try to limit cipher support to the newest ciphers possible which are compatible with the browsers you want to be able to connect to your site. The Mozilla OpSec guide to TLS configurations provides more information on recommended configurations. ...
... security levels. Configuring your server Correctly configuring your server is crucial. In general, you should try to limit cipher support to the newest ciphers possible which are compatible with the browsers you want to be able to connect to your site. The Mozilla OpSec guide to TLS configurations provides more information on recommended configurations. ...
Introduction to using XPath in JavaScript - XPath
The main interface to using XPath is the evaluate function of the document object. document.evaluate This method evaluates XPath expressions against an XML based document (including HTML documents), and returns a XPathResult object, which can be a single node or a set of nodes. ...
...access to all the standard DOM interfaces on that node. After iterating through all the h2 elements returned from our expression, any further calls to iterateNext() will return null. Evaluating against an XML document within an Extension The following uses an XML document located at chrome://yourextension/content/peopleDB.xml as an example. ...
...ment : xmlDoc.ownerDocument.documentElement); var personIterator = xmlDoc.evaluate('//person', xmlDoc, nsResolver, XPathResult.ANY_TYPE, null ); Note When the XPathResult object is not defined, the constants can be retrieved in privileged code using Components.interfaces.nsIDOMXPathResult.ANY_TYPE (CI.nsIDOMXPathResult). Similarly, an XPathEvaluator can be created using: Components.classes["@mozilla.org/dom/xpath-evaluator;1"].createInstance(Components.interfaces.nsIDOMXPathEvaluator) Appendix Implementing a User Defined Namespace Resolver This is an example for illustration only. This function will need to take namespace prefixes from the xpathExpression and return the URI that corresponds to that prefix. For example, the expression: '//xhtml:td/mathml:math' will select all MathML exp...
...le node that matches the expression. The node is not necessarily the first node in the document that matches the expression. FIRST_ORDERED_NODE_TYPE 9 A result node-set containing the first node in the document that matches the expression. See also XPath XML Path Language from What is XSLT? by G. Ken Holman Original Document Information Based Upon Original Document Mozilla XPath Tutorial Original Source Author: James Graham. Other Contributors: James Thompson. Last Updated Date: 2006-3-25. ...
Testing the Add-on SDK - Archive of obsolete content
With CFX CFX tests use the deprecated sdk/loader/cuddlefish, which is being replaced by toolkit/loader. With cfx (which is part of the addon-sdk repo), we can run the first test suite which was produced for the Add-on SDK. This includes: cfx testcfx: a suite of python tests which test cfx itself (which is written in python). This suite basically tests cfx xpi's ability to produce the xpi files that we expect it to. cfx testex --filter <addon_example_folder_name>: a suite of tests which run test code for some example add-ons. ...
...r installing the addon-sdk's npm dependencies, we can run the latter three test suites mentioned for cfx with jpm using the following commands: gulp test:examples --filter <addon_example_folder_name> gulp test:addons --filter <addon_folder_name> gulp test:modules --filter <file_name>:<test_name> or run all of the tests with gulp test. ...
...folder_name> gulp test:modules --filter <file_name>:<test_name> or run all of the tests with gulp test. With Travis If you merely make a pull request for the mozilla/addon-sdk then all of the jpm tests mentioned above will be run on Travis-CI automatically and you will see the pass/fail results with a link to the log in the github pull request. Only on a linux machine at the moment. From Mozilla-Central repository With a checkout of the mozilla-central source code, one can always cd addon-sdk/source and use any of the methods described above, but in addtion to that there are a couple of mach commands available, and ofcourse there is the try server if you have access to that. With Mach There are two commands: ./mach mochitest -f jetpack-addon <optional_addon_path>: This runs the te...
ui/button/action - Archive of obsolete content
label opens a new tab sets a new label only for the new tab logs the result of accessing the global label, the window-specific label, and each of the 2 tab-specific labels var { ActionButton } = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = ActionButton({ id: "my-button", label: "default label", icon: "./firefox-16.png" }); tabs.open({ url: "https://mozilla.org/", onOpen: onNewTab }); function onNewTab(tab) { // Modify the label only for the new tab button.state(tab, { "label" : "tab-specific label" }); // access the global label -> "default label" console.log(button.label); // access the window's label -> "default label" console.log(button.state("window").label); // access the first tab's label -> "default label" console...
... setting. ...
...alue for tab B. To delete a tab- or window-specific state, assign null to the property. ...
ui/button/toggle - Archive of obsolete content
label opens a new tab sets a new label only for the new tab logs the result of accessing the global label, the window-specific label, and each of the 2 tab-specific labels var { ToggleButton } = require('sdk/ui/button/toggle'); var tabs = require("sdk/tabs"); var button = ToggleButton({ id: "my-button", label: "default label", icon: "./firefox-16.png" }); tabs.open({ url: "https://mozilla.org/", onOpen: onNewTab }); function onNewTab(tab) { // Modify the label only for the new tab button.state(tab, { "label" : "tab-specific label" }); // access the global label -> "default label" console.log(button.label); // access the window's label -> "default label" console.log(button.state("window").label); // access the first tab's label -> "default label" console...
... setting. ...
...alue for tab B. To delete a tab- or window-specific state, assign null to the property. ...
cfx - Archive of obsolete content
y. --binary-args=CMDARGS Pass extra arguments to the binary being executed (for example, Firefox). For example, to pass the -jsconsole argument to Firefox, which will launch the JavaScript Error Console, try the following: cfx run --binary-args -jsconsole To pass multiple arguments, or arguments containing spaces, quote them: cfx run --binary-args '-url "www.mozilla.org" -jsconsole' --extra-packages=EXTRA_PACKAGES Extra packages to include, specified as a comma-separated list of package names. -g CONFIG, --use-config=CONFIG Pass a set of options by referencing a named configuration. -p PROFILEDIR, --profiledir=PROFILEDIR Use an existing profile located in PROFILEDIR. PROFILEDIR may be specified as a full path or a...
...y. --binary-args=CMDARGS Pass extra arguments to the binary being executed (for example, Firefox). For example, to pass the -jsconsole argument to Firefox, which will launch the JavaScript Error Console, try the following: cfx run --binary-args -jsconsole To pass multiple arguments, or arguments containing spaces, quote them: cfx run --binary-args '-url "www.mozilla.org" -jsconsole' --dependencies Load and run any tests that are included with modules that your package depends on. For example: if your add-on depends on modules from the SDK, then cfx will run the unit tests for the SDK's modules as well as yours. -f FILENAME[:TESTNAME], --filter=FILENAME[:TESTNAME] Only run tests whose filenames match FILENAME and optionally mat...
...ROFILEMEMORY If this option is given and PROFILEMEMORY is any non-zero integer, then cfx dumps detailed memory usage information to the console when the tests finish. --test-runner-pkg=TEST_RUNNER_PKG Name of package containing test runner program. Defaults to test-harness. cfx xpi This tool is used to package your add-on as an XPI file, which is the install file format for Mozilla add-ons. Called with no options, this command looks for a file called package.json in the current directory and creates the corresponding XPI file. Once you have built an XPI file you can distribute your add-on by submitting it to addons.mozilla.org. updateURL and updateLink If you choose to host the XPI yourself you should enable the host application to find new versions of your add-on. To ...
jpm-mobile - Archive of obsolete content
le in every command prompt you start, as long as you installed it with the -g flag. Problems? If you don't see this, ask for help. SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network. Command reference There are currently two jpm commands: jpm-mobile run Launch an instance of Firefox with your add-on installed. jpm-mobile test Runs your add-on's unit tests. jpm-mobile run This command runs a new instance of Firefox with the add-on installed: jpm-mobile run jpm-mobile run accepts the following options: --adb /path/to...
... runs a new instance of Firefox with the add-on installed: jpm-mobile run jpm-mobile run accepts the following options: --adb /path/to/adb Provides the path to adb. -b --binary BINARY Use the package name of Firefox specified in BINARY. jpm-mobile run -b fennec You can get the package name by following command. $ adb shell pm list packages | grep org.mozilla package:org.mozilla.firefox $ jpm-mobile run -b firefox # the package name is firefox -v --verbose Verbose operation. jpm-mobile test jpm-mobile test See the tutorial on unit testing and the reference documentation for the assert module for more details on this. jpm-mobile test accepts the following options: --adb /path/to/adb Provides the path to adb.
... reference documentation for the assert module for more details on this. jpm-mobile test accepts the following options: --adb /path/to/adb Provides the path to adb. -b --binary BINARY Use the package name of Firefox specified in BINARY. jpm-mobile test -b fennec You can get the package name by following command. $ adb shell pm list packages | grep org.mozilla package:org.mozilla.firefox $ jpm-mobile run -b firefox # the package name is firefox -v --verbose Verbose operation. ...
Creating annotations - Archive of obsolete content
vation() { annotatorIsOn = !annotatorIsOn; activateSelectors(); return annotatorIsOn; } We'll be using this URL in all our screenshots. Because cfx run doesn't preserve browsing history, if you want to play along it's worth taking a note of the URL. Save the file and execute cfx run again. ...
...file and execute cfx run again. Activate the annotator by clicking the widget and load a page: the screenshot below uses http://blog.mozilla.com/addons/2011/02/04/ overview-amo-review-process/. You should see the highlight appearing when you move the mouse over certain elements: Click on the highlight and you should see something like this in the console output: info: show info: http://blog.mozilla.com/addons/2011/02/04/overview-amo-review-process/, post-2249,When you submit a new add-on, you will have to choose between 2 review tracks: Full Review and Preliminary Review. Annotation editor panel So far we have a page-mod that can highlight elements and send information about them to the main add-on code. Next we will create the editor panel, which enables the user to enter an annotat...
...tionEditor.show(); }); worker.on('detach', function () { detachWorker(this, selectors); }); } }); Execute cfx run again, activate the annotator, move your mouse over an element and click the element when it is highlighted. You should see a panel with a text area for a note: Enter the note and press the return key: you should see console output like this: info: http://blog.mozilla.com/addons/2011/02/04/overview-amo-review-process/, post-2249,When you submit a new add-on, you will have to choose between 2 review tracks: Full Review and Preliminary Review. info: We should ask for Full Review if possible. That's a complete annotation, and in the next section we'll deal with storing it. ...
Creating Event Targets - Archive of obsolete content
ng the Places API First, let's write some code using Places API that logs the URIs of bookmarks the user adds. Create a new directory called "bookmarks", navigate to it, and run jpm init, accepting all the defaults. ...
...apt this code into a separate module that exposes the SDK's standard event interface. To do this we'll use the event/core module. ...
... and visited events. ...
Drag & Drop - Archive of obsolete content
gers onto your XUL-based application. First, you need to hook up the basic drag event handlers: elem.addEventListener("dragover", _dragOver, true); elem.addEventListener("dragdrop", _dragDrop, true); Here, elem could be a window or an XUL element. ...
...Components.interfaces.nsIDragService); var dragSession = dragService.getCurrentSession(); var supported = dragSession.isDataFlavorSupported("text/x-moz-url"); if (!supported) supported = dragSession.isDataFlavorSupported("application/x-moz-file"); if (supported) dragSession.canDrop = true; } function _dragDrop(aEvent) { var dragService = Components.classes["@mozilla.org/widget/dragservice;1"].getService(Components.interfaces.nsIDragService); var dragSession = dragService.getCurrentSession(); var _ios = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService); var uris = new Array(); // If sourceNode is not null, then the drop was from inside the application if (dragSession.sourceNode) ...
...ragService.getCurrentSession(); var _ios = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService); var uris = new Array(); // If sourceNode is not null, then the drop was from inside the application if (dragSession.sourceNode) return; // Setup a transfer item to retrieve the file data var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable); trans.addDataFlavor("text/x-moz-url"); trans.addDataFlavor("application/x-moz-file"); for (var i=0; i<dragSession.numDropItems; i++) { var uri = null; dragSession.getData(trans, i); var flavor = {}, data = {}, length = {}; trans.getAnyTransferData(flavor, data, length); i...
HTML in XUL for rich tooltips - Archive of obsolete content
n of HTML into a XUL element. Specifically, we create a rich tooltip that uses HTML instead of plain text. Dynamic HTML in XUL Tooltip Insert the appropriate code from below into your XUL overlay. ...
...Our enhanced XUL tooltip is an element that ...
...ring, like JavaScript and iframes. Non-dynamic HTML in XUL tooltip It is also possible to avoid using dynamic HTML to accomplish this. You would have to have a separate XUL tooltip element assigned to each element that you wish to have a rich tooltip with. You should write the HTML straight into the XUL. ...
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. ...
...ion 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. ...
...illa.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 this in text/html for Mozilla as will return null return node.lookupPrefix(namespaceURI); } if (namespaceURI === null || namespaceURI === '') { return null; } switch (node.nodeType) { case 1: // Node.ELEMENT_NODE return _lookupNamespacePrefix(namespaceURI, node); case 9: // Node.DOCUMENT_NODE return _lookupNamespacePrefix(namespaceURI, node.documentElement); case 6: // Node.ENTITY_NODE case 12: // Node...
Code snippets - Archive of obsolete content
These examples demonstrate how to accomplish basic tasks that might not be immediately obvious. General Examples and demos from MDN articles A collection of examples and demos from articles. Window code Opening and manipulating windows Toolbar Toolbar related code Sidebar Sidebar related code Forms Forms related code XML Code used to parse, write, manipulate, etc. ...
... build full virtual machines in pure ECMAScript. Therefore, it is also possible, in theory, to use ECMAScript for a smaller task: parsing exotic programming languages (i.e., creating compilers). This snippets shows a possible way to start from. Browser-oriented code Tabbed browser code (Firefox/SeaMonkey) Basic operations, such as page loading, with the tabbed browser, which is the heart of Mozilla's browser applications Cookies Reading, writing, modifying, and removing cookies Page Loading Code used to load pages, reload pages, and listen for page loads Interaction between privileged and non-privileged code How to communicate from extensions to websites and vice-versa. Downloading Files Code to download files, images, and to monitor download progress Password Manager Code used to...
...ing XUL and JS Scrollbar Changing style of scrollbars. Applies to scrollbars in browser and iframe as well. Autocomplete Code used to enable form autocomplete in a browser Boxes Tips and tricks when using boxes as containers Tabbox Removing and manipulating tabs in a tabbox Windows-specific Finding Window Handles (HWND) (Firefox) How to use Windows API calls to find various kinds of Mozilla window handles. Window handles can be used for IPC and Accessibility purposes. Using the Windows Registry with XPCOM How to read, write, modify, delete, enumerate, and watch registry keys and values. External links The content at MozillaZine Example Code is slowly being moved here, but you can still find useful examples there for now. ...
Common Pitfalls - Archive of obsolete content
These are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort. The first couple of items deal with loading content from a URI. It's important to create the URI correctly, and then check that it's secure to load. This will shield you from loading <tt>javascript:</tt> or <tt>chrome:</tt> URIs when you shouldn't. ...
... a URI. It's important to create the URI correctly, and then check that it's secure to load. This will shield you from loading <tt>javascript:</tt> or <tt>chrome:</tt> URIs when you shouldn't. ...
...interface, like so: JavaScript: try { var ioServ = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uriObj = ioServ.newURI(uriString, uriCharset, baseURI); } catch (e) { // May want to catch NS_ERROR_MALFORMED_URI for some applications } C++: nsresult rv; nsCOMPtr<nsIIOService> ioServ = do_GetService("@mozilla.org/network/io-service;1"); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsIURI> uriObj; rv = ioServ->NewURI(uriString, uriCharset, baseURI, getter_AddRefs(uriObj)); if (NS_FAILED(rv)) { // May want to handle NS_ERROR_MALFORMED_URI for // some applications return rv; } or, if the code can include nsNetUtil.h: nsCOMPtr<nsIURI> uriObj; nsresult rv = NS_NewURI(getter_AddRefs(uri...
Developing add-ons - Archive of obsolete content
Mozilla based software is typically extensible through add-ons. There are three primary types of add-on: extensions, plugins, and themes. This page will help guide you to the information you need in order to create add-ons for Firefox, Thunderbird, or other software based on the Mozilla platform, as well as how to distribute your add-ons. Add-ons topics Submitting an add-on to AMO Provides helpful information for add-on developers to help them properly package and deliver their add-ons. This includes information about addons.mozilla.org, Mozilla's add-on distribution web site. Extensions Extensions add new functionality to Mozilla applications such as Firefox, SeaMonkey and Thunderbird. They can add anything from a toolbar button to...
... their add-ons. This includes information about addons.mozilla.org, Mozilla's add-on distribution web site. Extensions Extensions add new functionality to Mozilla applications such as Firefox, SeaMonkey and Thunderbird. They can add anything from a toolbar button to a completely new feature. Plugins Information about how to create plugins, which are binary components that let Mozilla based software display content they can't handle natively. Jetpack Browser extension development for everyone. Jetpack developers only need to know the tools of the modern web: HTML, CSS, and JavaScript. Themes Themes let users customize the appearance of the user interface presented by Mozilla-based applications. Search engine plugins Firefox suppo...
...ent for everyone. Jetpack developers only need to know the tools of the modern web: HTML, CSS, and JavaScript. Themes Themes let users customize the appearance of the user interface presented by Mozilla-based applications. Search engine plugins Firefox supports search engine plugins, which enable the search box to support different search engines. addons.mozilla.org (AMO) API Developers' Guide The AMO Developers' Guide describes how to use the AMO API to fetch information about add-ons from the addons.mozilla.org site. The Mozilla platform Information about the Mozilla platform, including all of its APIs and technologies, as well as how to use them in your own projects. Performance Performance guides and utilities to help you mak...
Enhanced Extension Installation - Archive of obsolete content
n is also prohibitively difficult/annoying for developers, who are forced to either dangerously hand-edit all the appropriate manifest files, or package their code as a XPI and install it that way every time they make a change. The State of the World Install Locations In Firefox 1.0 Extensions can be installed into only two locations: The Firefox user's profile directory directory, e.g. ~/.mozilla/firefox/abcdefgh.default/extensions/ The Firefox application directory, e.g. C:\Program Files\Mozilla Firefox\extensions Extension Metadata The Extension System stores metadata in both of the two locations, in the following files: <location>/extensions/Extensions.rdf - an XML/RDF datasource listing all the Extensions installed at that location. <location>/extensions.ini - an INI manifest ...
... an Extension is expressed throughout the code using a boolean value, often referred to as isProfile - true if the item is installed in the profile directory's extensions folder. This boolean relationship itself is not stored directly in the datasource. Rather, if the system needs to know where an item is located, it checks to see if the item is a member of the the appropriate type container (urn:mozilla:extension:root or urn:mozilla:theme:root) in each of the two datasources. This is clumsy. Item Type The Extension System in Firefox 1.0 supports only two item types, Extensions and Themes. This is a by-product of the fact that there are physical per-type containers in the datasource. Sections of UI that display installed items are rooted on these containers. Tracking Item Type Item type is tr...
... text file with a {GUID} name placed in one of the above locations, useful for developing extensions at another location, e.g. a NFS home directory and simply placing a text "link" file in the applicable directory above that links to the location of the extension in its installed state at the other location. Any location specified in a GUID-to-path registry key mapping, e.g. [HKLM|HKCU]\Software\Mozilla\Firefox\Extensions Given these goals, and the likelihood of future goals, such as potential for extensions to the XULRunner framework, common drop zones for XPIs etc it makes sense to have the set of install locations be customizable. By default, the application knows about and maintains three Install Locations: app-profile A directory-based install location for items living in the applica...
Extension Etiquette - Archive of obsolete content
y've declared, and return the object itself. For instance, calling jQuery.noConflict(true) will remove the window.jQuery and window.$ variables, and return the jQuery object itself, for future use by the caller. When available, these methods should always be used to prevent conflicts with third-party code. Names and Metadata Naming Be creative! Don't be redundant and include "extension," "Mozilla/Firefox/Thunderbird," or the version number in the name. Be original! Descriptions Use something that is descriptive, but that would fit in the default add-on manager width. The Mozilla extensions (Inspector/Reporter/Talkback) believe starting with a verb is the best way. For example, "Does an action in the browser." Documentation Assume that the vast majority of your users don't have inner w...
...," or the version number in the name. Be original! ...
... Internationalization Locales Always use locale DTDs and property files, even if providing your extension in one language. It will make translation of your extension to another language easier. It occurs more often than you would think. Options Firefox users like options. ...
Multiple item extension packaging - Archive of obsolete content
s a multiple item package, the em:type specified in your install.rdf must be 32 and specified as <em:type NC:parseType="Integer">32</em:type>. The XML namespace xmlns:NC="http://home.netscape.com/NC-rdf#" must also be declared in your install.rdf as shown below. ... <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- nsIUpdateItem type for a Multiple Item Package --> <em:type NC:parseType="Integer">32</em:type> ... For the Firefox and Thunderbird 2.0 Extension Manager you can use the above syntax or <em:type>32</em:type> as shown below. ... <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.
....org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- nsIUpdateItem type for a Multiple Item Package --> <em:type NC:parseType="Integer">32</em:type> ... For the Firefox and Thunderbird 2.0 Extension Manager you can use the above syntax or <em:type>32</em:type> as shown below. ... <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- nsIUpdateItem type for a Multiple Item Package --> <em:type>32</em:type> ... When specifying em:targetApplication the minVersion specified should be the highest minVersion and the maxVersion specified should be the lowest maxVersion from all of the installable bundles contained by the multiple item package for ...
... manager) is used, the manager will display the individual items contained by the multiple item package after the download completes in the same manner that it would if the user had chosen to install multiple individual items simultaneously. The manager will not display the multiple item package in the list of items after the download has completed. Signing All extensions now require signing by Mozilla. For multiple item packages, all internal add-ons need to be signed, but the container doesn't need to be signed. This means that the contained add-ons need to be submitted to AMO individually for signing. Additionally, the container add-on ID must not be the same as the ID of any of the contained add-ons. Official References for Toolkit API Official References. Do not add to this list without ...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
pts, and in the worst cases to privilege escalation which can leave a user's PC open to remote attack. Building DOM Trees In most cases, DOM trees should be built exclusively with DOM creation methods. The following methods will all safely create a DOM tree without risk of remote execution. ...
...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 support it. if (PARSER_UTILS in Cc) { let parser = Cc[PARSER_UTILS] .getService(Ci.nsIParserUtils); if ("parseFragment" in parser) return parser.parseFragment(html, allowStyle ? parser.SanitizerAllowStyle : 0, !!isXML, ba...
...rUtils on versions that support it. if (PARSER_UTILS in Cc) { let parser = Cc[PARSER_UTILS] .getService(Ci.nsIParserUtils); if ("parseFragment" in parser) return parser.parseFragment(html, allowStyle ? parser.SanitizerAllowStyle : 0, !!isXML, baseURI, doc.documentElement); } return Cc["@mozilla.org/feed-unescapehtml;1"] .getService(Ci.nsIScriptableUnescapeHTML) .parseFragment(html, !!isXML, baseURI, doc.documentElement); } The returned fragment may be appended to any element in the given document. document.body.appendChild(parseHTML(document, xhr.responseText, true, xhr.channel.URI)); See Also Displaying web content in an extension witho...
Local Storage - Archive of obsolete content
this: s435L.default (your profile directory) XULSchool log.txt somedbfile.sqlite The Directory Service and the nsIFile interface are used to create the local directory. Here's what we usually do: we have a function that returns a reference to our root directory and creates it if necessary. getLocalDirectory : function() { let directoryService = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties); // this is a reference to the profile dir (ProfD) now. let localDir = directoryService.get("ProfD", Ci.nsIFile); localDir.append("XULSchool"); if (!localDir.exists() || !localDir.isDirectory()) { // read and write permissions to owner and group, read-only for others. localDir.create(Ci.nsIFile.DIRECTORY_TYPE, 07...
... choose what to do in this case. The FUEL library has an uninstall event you can use to perform these operations. Logging Good logging is essential in all kinds of software projects. Any extension that is more complex than a Hello World needs some way to log errors and trace execution without having to fire up a debugger. It used to be the case that custom logging solutions were necessary, but Mozilla Labs have come up with a JavaScript implementation of a logger similar to the Log4J logger used in Java projects. The logger is called Log4Moz and it is implemented as a JavaScript Code Module, so it only works on Firefox 3 and above. To use this logger, you need to copy the log4moz.js file to your modules directory. In the initialization method of your one of your "common" or startup objects, a...
...u read it from the experts. There's a very detailed XUL Template Guide here. As mentioned before, it revolves around RDF, so you may need to take some time to understand how RDF works. There's a section about SQLite Templates in the guide, but there are some concepts in it that will require you to read at least some of the rest of it. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
The Box Model - Archive of obsolete content
r and CSS to mold XUL elements and layouts with great precision and flexibility. Most of the examples shown in the rest of this section were generated using the XUL Box Alignment Example. We recommend you play around with it for a while to get an idea of how the basic parts of the box model work. In order to use this page, you'll need to install the Remote XUL Manager extension and add developer.mozilla.org to the whitelist. Boxes A XUL box is very similar to an HTML div. It's an invisible rectangular container with no styling at all (divs may have some default styling, though). Their behavior is similar. However, one of the fundamental differences between XUL and HTML has been the fact that XUL boxes can be oriented vertically or horizontally (this behavior is being introduced into HTML stand...
...work on the labels so that the inner spacing in the text looks right. Another option is to take it up a notch and really use HTML. xulschoolhello.linkedText.label = Go to <html:a onclick="%S">our site</html:a> for more information To include HTML in a XUL document, you need to add the namespace for it in the document root: <overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> Then you can have an html:p (paragraph) element where you insert the result of parsing the property string. You can easily parse XML using the DOMParser object. Since XUL documents are strict XML, you can only use strict XHTML in XUL, and not the more loosely-formatted forms of HTML. Exercise Use the DO...
... ...
Firefox addons developer guide - Archive of obsolete content
ales, which have been translated to French since non-latin characters are not well supported). There are a few things that could be done to make this fit the site better, and for general cleaning up: Tables should use the "standard-table" CSS class so they're styled the same as those on the rest of MDC. There should be some introductory text on the table of contents page at https://developer.mozilla.org/En/Firefox_addons_developer_guide Obviously there are a number of FIXME items in the content that need dealing with, but those are already known. These should use the Previous, Next, and PrevNext templates to add quick routes to get from chapter to chapter. See the XUL Reference, for example. Each chapter should be tagged appropriately, based on content, and every chapter should include th...
...h chapter should be tagged appropriately, based on content, and every chapter should include the tag "Firefox addons developer guide". Instead of using footnotes, we should inline these notes into the body of the article. Apostrophes are being done using curly apostrophes instead of straight ones as is done everywhere else in MDC. The stuff about installing the DOM inspector (https://developer.mozilla.org/En/Firefox_addons_developer_guide/Let%27s_build_a_Firefox_extension#Install_the_DOM_Inspector) is not accurate for Firefox 3 or later, since it's no longer included in the Firefox installer and must be downloaded from AMO. Filenames should use <code> styling. This is available from the Style drop-down menu in the editor. Variable and function names use <code> styling. XPI should be in all...
..., since it's no longer included in the Firefox installer and must be downloaded from AMO. Filenames should use <code> styling. This is available from the Style drop-down menu in the editor. Variable and function names use <code> styling. XPI should be in all caps instead of written as ("xpi"). Method and function names should have parentheses after them. For example, here: https://developer.mozilla.org/En/Firefox_addons_developer_guide/Let's_build_a_Firefox_extension#init_method The text of the paragraph should begin "The <code>init()</code> method is as shown...". If you use the Interface template when mentioning interfaces by name, MDC will automatically format them and generate links to their documentation, like this: nsIConsoleService. If you prefer, you can just link to the articles...
Adding preferences to an extension - Archive of obsolete content
to watch for changes to our preferences, instantiate an object to use to manage our preferences, and install an interval routine to update the stock information periodically. ...
... false); window.addEventListener("unload", function(e) { StockWatcher.shutdown(); }, false); Design the preference dialog Now that we've written all the code, we need to build the XUL file for the options dialog. ...
... 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> Adding the context menu Adding the contextual menu is easy; all the work that needs doing is done in the stockwatcher2.xul file. The first step is to add the context attribute to the status bar panel: <statusbar id="status-bar"> <statusbarpanel id=...
XML data - Archive of obsolete content
contains an example of how you can use CSS with XML data. You create a sample XML document, and a stylesheet that you can use to display it in your browser. This is the 3rd section of Part II of the CSS tutorial. Previous section: SVG Next section: XBL binding Information: XML data XML (eXtensible Markup Language) is a general-purpose language for any kind of structured data. By default, your Mozilla browser displays XML in a format very similar to the original data in the XML file. You see the actual tags that define the data's structure. By linking a CSS stylesheet with the XML document, you can define other ways to display it. To do this, your stylesheet uses rules that map tags in the XML document to the display types used by HTML. Example Data in an XML document uses <INFO> ...
...st item, or like a component of a table. For the full list of display types, see The display property in the CSS Specification. Using CSS alone, the structure of the display must be the same as the structure of the document. Other technologies can modify the structure of the display--for example, XBL can add content, and JavaScript can modify the DOM. For more information about XML in Mozilla, see the XML page in this wiki. Action: An XML demonstration Make a new XML file, doc9.xml. Copy and paste the content from here, making sure that you scroll to get all of it: <?xml version="1.0"?> <!-- XML demonstration --> <?xml-stylesheet type="text/css" href="style9.css"?> <!DOCTYPE planet> <planet> <ocean> <name>Arctic</name> <area>13,000</area> <depth>1,200</depth> </ocean> ...
... ...
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
f you are a plug-in author, you may find this project saves you a lot of work! This page describes a control that implements the NP API and hosts most Netscape-compatible plug-ins. Now you can use your plug-ins in any recent version of IE or in any other ActiveX container for that matter. The control itself is implemented in a DLL called pluginhostctrl.dll which is standalone from the rest of the Mozilla project. If you're wondering how Microsoft used to support the NP API, look for a file called plugin.ocx in your Windows system directory. This 100k ActiveX control contains the entire NP API implementation and probably worked much like pluginhostctrl.dll does now. The sections below tell you how to fetch, build and use the pluginhostctrl.dll . Get the source You need CVS to get the source code.
... directory. This 100k ActiveX control contains the entire NP API implementation and probably worked much like pluginhostctrl.dll does now. The sections below tell you how to fetch, build and use the pluginhostctrl.dll . Get the source You need CVS to get the source code. Assuming you have CVS somewhere in your path, type this from a command prompt: C:\> set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot C:\> set HOME=\TEMP C:\> cvs login (Logging in to anonymous@cvs-mirror.mozilla.org) CVS password: anonymous C:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl This fetches the source for the control into mozilla\embedding\browser\activex\src\pluginhostctrl. You can also see the code online. Build it It is quite simple to build the control Locate the pluginhostct...
...t It is quite simple to build the control Locate the pluginhostctrl directory: Open pluginhostctrl.dsp Build "Win32 Debug" or another target Open some of the test files under pluginhostctrl\tests in Internet Explorer to verify the control has built and registered correctly. The control currently reads plug-ins from your most current Netscape 4.x and IE installations. There is no support for Mozilla or NS 6.x yet. A note to developers If you intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). This is necessary so that your control may coexist with the generic version and any other versions that other plug-ins vendors may have installed. It is...
Enabling the behavior - updating the status periodically - Archive of obsolete content
Now that we have code to retrieve tinderbox status and update the icon, we need to run it periodically. function loadTinderboxStatus() { gXMLHttpRequest = new XMLHttpRequest(); gXMLHttpRequest.onload = updateTinderboxStatus; gXMLHttpRequest.open("GET", "http://tinderbox.mozilla.org/SeaMonkey/panel.html"); gXMLHttpRequest.send(null); window.setTimeout(loadTinderboxStatus, 60000); } window.setTimeout(loadTinderboxStatus, 1000); window.setTimeout schedules functions to run at some future time. We use it inside the loadTinderboxStatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation. This allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slowi...
...loadTinderboxStatus, 1000); window.setTimeout schedules functions to run at some future time. We use it inside the loadTinderboxStatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation. This allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slowing down Mozilla with requests. Our code is now ready to run, but Mozilla doesn't know about it yet. To enable its functionality, we have to add a reference to our JavaScript code into navigator.xul, just as we put a reference to our CSS code into that file back in Specifying the appearance. Put the JavaScript code into a file called tinderstatus.js in the same directory as navigator.xul and reference it in navi...
...To confirm this state, go to Tinderbox and verify that the panel displays the current worst state of active tinderbox clients. << PreviousNext >> ...
Making it into a static overlay - Archive of obsolete content
Now that we have a working Mozilla extension that shows tinderbox status, we need to make it distributable to other users. The two ways of doing that are to integrate it into the Mozilla codebase (in which case it is no longer an extension but rather part of the default Mozilla distribution) and to package it into an installer that users can run from within Mozilla to add the extension to their Mozilla installation. Most extensions are distributed as installer packages, and that's how we'll distribute our extension. Integrating extensions into the Mozilla codebase is beyond the scope of this tutorial, but for more information see mozilla.org's hacking documentation. Mozilla installer packages are called XPIs (pronounced "zippies"), which stands for cross-platform installer. The packages a...
...A XUL overlay is a XUL file containing elements to be inserted into another XUL file when the other XUL file is rendered into an application interface. ...
... a static overlay, then we'll make it into a dynamic overlay. ...
Dehydra - Archive of obsolete content
tion and dependency info for Dehydra Using Dehydra Examples for getting started writing analysis scripts. Dehydra Function Reference Callback and utility functions for Dehydra scripts. Dehydra Object Reference Javascript objects and properties provided by Dehydra. ...
... Dehydra Object Reference Javascript objects and properties provided by Dehydra. ...
... Analyses being worked on for Mozilla 2 TODO Steps to Dehydra 1.0 release Community View Dehydra Forums... ...
Firefox Sync - Archive of obsolete content
Components and Services Sync refers to a family of related components and services which provide synchronization of data between Mozilla application instances. These components and services include: Firefox Sync Client The Sync client bundled with Mozilla products. It exists as a core JavaScript module providing generic functionality and UI components for each product. Server A server implementation of the Sync HTTP protocol. Clients communicate through it. Firefox Home An iOS application that functions as a Sync client. Mozilla Server Instance An instance of the server deployed and maintained by Mozilla. If you use Sync in your browser, this is what it talks to by default. Specifications There are numerous specifications concerning Sync. These include: ...
...server deployed and maintained by Mozilla. If you use Sync in your browser, this is what it talks to by default. Specifications There are numerous specifications concerning Sync. These include: An HTTP API for client-server interaction Storage formats used by the the clients Cryptographic model for encrypting client data The definitive source for these specifications is http://docs.services.mozilla.com/. Running a Server It is possible to run your own Sync Server instance. Full instructions are available at http://docs.services.mozilla.com/howtos/run-sync.html. Getting Involved and Status For information on the current development status of Sync including how to get involved, see https://wiki.mozilla.org/Services/Sync. Related Info JavaScript Client API (useful for interacting with Sync f...
.../. Running a Server It is possible to run your own Sync Server instance. Full instructions are available at http://docs.services.mozilla.com/howtos/run-sync.html. ...
Hidden prefs - Archive of obsolete content
This page has been flagged by editors or users as needing technical review. Until it is fully reviewed, it may contain inaccurate or incorrect information. Address book "Get Map" button pref ("mail.addr_book.mapit_url.format" ) The format for this pref is: @A1 == address, part 1 @A2 == address, part 2 @CI == city @ST == state @ZI == zip code @CO == country If the pref is set to "", no "Get Map" button will appear in the addressbook card preview pane. ...
... Contains:". This entity (SearchNameOrEmail.label) is defined in messenger.dtd. So if you change the quick search query to match based on phone number, the UI will not match the query. The default (defined in mailnews.js) is: pref("mail.addr_book.quicksearchquery.format","?(or(PrimaryEmail,c,@V)(DisplayName,c,@V)(FirstName,c,@V)(LastName,c,@V))"); "and", "or" and "not" are valid. See http://lxr.mozilla.org/mozilla/sourc...drDatabase.idl for the list of valid attributes "c" == contains. see nsAbQueryStringToExpression::CreateBooleanConditionString() for other operators. Mail composition "other header" pref ("mail.compose.other.header") The format for this a comma delimited list of mail headers, like "Approved,X-No-Archive" An example for your prefs.js would be: user_pref("mail.compose.other.h...
...o-Archive" An example for your prefs.js would be: user_pref("mail.compose.other.header", "Approved"); This will cause "Approved" to show up in the compose window address picker, under To:, Cc:, Bcc:, Newsgroup:, etc. For example: When that mail gets sent, Approved: test@test.com will be in the message in the headers. This is a useful trick for newsgroup moderators who want moderate from mozilla. Mail/News Prefs "autcollect addresses" prefs from mailnews.js: // by default, only collect addresses the user sends to (outgoing) pref("mail.collect_email_address_incoming", false); pref("mail.collect_email_address_outgoing", true); pref("mail.collect_email_address_newsgroup", false); // by default, use the Personal Addressbook for collection pref("mail.collect_addressbook","moz-abmdbdirector...
Java in Firefox Extensions - Archive of obsolete content
olicy(policy); policy.addPermission(new java.security.AllPermission()); for (var j=0; j < urls.length; j++) { policy.addURL(urls[j]); } }catch(e) { alert(e+'::'+e.lineNumber); } } //Get extension folder installation path... (this works in firefox 3.x, for firefox 4.x use AddonManager.getAddonByID) var extensionPath = Components.classes["@mozilla.org/extensions/manager;1"]. getService(Components.interfaces.nsIExtensionManager). getInstallLocation("test@yoursite"). // guid of extension getItemLocation("test@yoursite"); //The path logic would work if we include em:unpack for ff 4.x, for ff 3.x since things are unpacked by default things work // Get path to the JAR files (the following assumes your JARs...
... java.net.URLClassLoader.newInstance(urlArray); //Set security policies using the above policyAdd() function policyAdd(cl, urlArray); Now you can begin using LiveConnect, including referencing the classes in your JARs. Be aware that if you have added a namespace within your classes (via "package"), you will need to reference the namespace as well. ...
...One example seems to be the fact that the "java" global is not immediately available if the extension operates in a sidebar (using setTimeout solved it at least). I've had problems with stabilit...
Microsummary XML grammar reference - Archive of obsolete content
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. ...
...rm" version="1.0"> <output method="text"/> <template match="/"> <value-of select="id('download-count')"/> <text> Fx downloads</text> </template> </transform> </template> <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> Namespace The namespace URI for microsummary generator XML documents is: http://www.mozilla.org/microsummaries/0.1 All elements in a microsummary generator document should be in this namespace except the descendants of the <template> element, which should be in the XSLT namespace: http://www.w3.org/1999/XSL/Transform The <generator> element The <generator> element is the root tag for all microsummary generators, and should contain the remainder of the XML code describing the generator...
...into their microsummaries. Attributes: None. Child Elements: <stylesheet> or <transform> (required) The XSLT stylesheet which performs the transformation. Per XSLT, you may specify the stylesheet child element using either the <stylesheet> or the <transform> tag, which are interchangeable. Note: Although the <template> element must be in the microsummaries namespace (http://www.mozilla.org/microsummaries/0.1), its <stylesheet>/<transform> child element must be in the XSLT namespace (http://www.w3.org/1999/XSL/Transform). The <pages> element The <pages> element identifies the set of pages that the generator is able to summarize. Attributes: None. Child Elements: <include> (optional) A regular expression matching the URLs of pages that the generator is able to sum...
Microsummary topics - Archive of obsolete content
he nsIMicrosummaryService interface implemented by the nsIMicrosummaryService component, then call its installGenerator() method, passing it an XML document containing the generator. ...
... getService(Components.interfaces.nsIMicrosummaryService); var generator = microsummaryService.installGenerator(generatorDoc); The service installs the...
...sform> \ </template> \ <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> \ '; var domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"]. createInstance(Components.interfaces.nsIDOMParser); var generatorDoc = domParser.parseFromString(generatorText, "text/xml"); var microsummaryService = Components.classes["@mozilla.org/microsummary/service;1"]. getService(Components.interfaces.nsIMicrosummaryService); var generator = microsummaryService.installGenerator(generatorDoc); The service installs the generator by serializing its XML to a file in the user's profile directory and adding the generator to the service's in-memory generator cache. When programmatically installing generators, you should specify a uniq...
Modularization techniques - Archive of obsolete content
The mechanism we're using is based on the principles laid down by COM, so pretty much anything you know about COM can be applied here, and any reference on COM can provide you with more interesting and complex examples than the ones provided here. The Basics Interfaces The basic building blocks of modules are C++ pure virtual interfaces. ...
...THOD_(nsrefcnt) AddRef(void) = 0; NS_IMETHOD_(nsrefcnt) Release(void) = 0; }; The NS_IMETHOD and NS_IMETHOD_(type) macros are basically shorthand for virtual nsresult and virtualtype. On Windows they expand to virtual nsresult __stdcall and virtual type __stdcall for COM compatibility reasons. You don't have to use them in your interfaces unless you're concerned with COM compatibility. All Mozilla interfaces inherit from nsISupports. Inheriting from nsISupports allows any interface to be interrogated about other interfaces that its instance may support, and insures that reference counting facilities are always available. The IID for nsISupports is defined as NS_ISUPPORTS_IID. QueryInterface() has several important characteristics that must be maintained. If you perform a QueryInterface() ...
...veloped as needed. ...
When To Use ifdefs - Archive of obsolete content
The mozilla codebase is used for many different projects and products, including Firefox, Thunderbird, XULRunner, and many others. Sometimes the same basic code is used for multiple projects, but there are small differences needed. "ifdefs", or conditional instructions, are used to build different code What are ifdefs ifdefs are conditional directives to a text preprocessor which mark that certain blocks of code are used only in certain conditions. In this document, the term is used more loosely to discuss any kind of conditional that differentiates between different build configurations. ...
...sed to build different code What are ifdefs ifdefs are conditional directives to a text preprocessor which mark that certain blocks of code are used only in certain conditions. In this document, the term is used more loosely to discuss any kind of conditional that differentiates between different build configurations. When are ifdefs used? There are three major kinds of ifdefs in use in the mozilla tree: platform/widget ifdefs, feature ifdefs, and application-specific ifdefs: Platform/widget ifdefs The mozilla code will frequently need to differentiate between code for different platforms or widget sets. These ifdefs are generally always acceptable. The only time when they might be a problem is in cross-platform extension code and locales: since this code is downloaded on multiple platfo...
... to differentiate between code for different platforms or widget sets. These ifdefs are generally always acceptable. The only time when they might be a problem is in cross-platform extension code and locales: since this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question. For an example of platform-specfic ifdefs, see nsCRT.h. Feature ifdefs The mozilla code has many features that can be enabled or disabled by configure flags. For instance, it is possible to disable most of the XUL rendering engine by specifying --disable-xul when configuring the build. When adding ifdefs that implement these configure flags, care must be taken to obey the build dependencies. For instance, XPCOM, the SpiderMonkey JavaScript engine, and the networking engine do n...
Example Sticky Notes - Archive of obsolete content
fax - respond today.</p></div> <div class="sticker"><p>Don't forget the eggs!</p></div> <div class="sticker"><p>The new project - who's on charge?</p></div> <div class="sticker"><p>Learn more about XBL.</p></div> <p style="clear: left"><a href="http://validator.w3.org/check?uri...
... The others are only needed if you plan to handle XUL (XML User Interface Language) or/and SVG (Scalable Vector Graphics) in your bindings; xlink in XML also may come...
... The others are only needed if you plan to handle XUL (XML User Interface Language) or/and SVG (Scalable Vector Graphics) in your bindings; xlink in XML also may come useful sometimes. All namespaces above...
Dynamically modifying XUL-based user interface - Archive of obsolete content
This article discusses manipulating XUL interfaces, using DOM and other APIs. It explains the concept of DOM documents, demonstrates a few simple examples of using DOM calls to perform basic manipulations on a document, and then demonstrates working with anonymous XBL content using Mozilla-specific methods. 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 ...
...teElementNS() creates an element, but does not put it anywhere in the document. You need to use other DOM methods, such as appendChild() to insert the newly created element in the document. appendChild() appends the node after all other nodes, while insertBefore() inserts the node before the node referenced by its second parameter. ...
... appendChild() and insertBefore() to move existing elements. For example you could move the item labeled "First item" to the end of popup by adding this statement as a last line to the snippet above: popup.appendChild(first); This statement would remove the node from its current position in the document and re-insert it at the end of the popup. Anonymous content (XBL) XBL is the language used in Mozilla to define new widgets. Widgets defined in XBL may choose to define some content which is inserted to the bound element, when the binding is attached. This content, called anonymous content, is not accessible through normal DOM methods. You need to use the methods of nsIDOMDocumentXBL interface instead. For example: // gets the first anonymous child of the given node document.getAnonymousNodes(nod...
How to implement a custom XUL query processor component - Archive of obsolete content
ample, we will create a simple JavaScript XPCOM component. The component will hold a small array of JavaScript objects as its datasource. In practice, you would use your own custom source of data. ...
...l value="?eye"/> </row> </template> </rows> </grid> </window> A few things to note. We are not really using the datasources in our sample component, so we set it to a dummy value. An empty string would be ok too. The querytype is important. It is used to create an instance of our XPCOM object. The contract id of our XPCOM component should be of the form "@mozilla.org/xul/xul-query-processor;1?name=xxx", where the xxx is the querytype used in the XUL template block. Here is our sample JavaScript XPCOM query processor: Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); // basic wrapper for nsIXULTemplateResult function TemplateResult(aData) { this._data = aData; // just make a random number for the id this._id = Math.random(100000).
...e: 15, hair: "blond", eye: "blue"}, {name: "jimmy", age: 65, hair: "gray", eye: "dull"} ]; } TemplateQueryProcessor.prototype = { QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIXULTemplateQueryProcessor]), classDescription: "Sample XUL Template Query Processor", classID: Components.ID("{282cc4ea-a49c-44fc-81f4-1f03cbb7825f}"), contractID: "@mozilla.org/xul/xul-query-processor;1?name=simpledata", getDatasource: function(aDataSources, aRootNode, aIsTrusted, aBuilder, aShouldDelayBuilding) { // TODO: parse the aDataSources variable // for now, ignore everything and let's just signal that we have data return this._data; }, initializeForBuilding: function(aDatasource, aBuilder, aRootNode) { // perform any initialization t...
List of commands - Archive of obsolete content
vious cmd_wordNext cmd_selectWordPrevious cmd_selectWordNext cmd_scrollPageUp cmd_scrollPageDown cmd_scrollLineUp cmd_scrollLineDown cmd_movePageUp cmd_movePageDown cmd_selectPageUp cmd_selectPageDown Other commands The following list other commands (prefixed by cmd_ or Browser:) which have not been categorized here yet (though they are in the alphabetical list below): http://lxr.mozilla.org/seamonkey/sou...barOverlay.xul http://lxr.mozilla.org/seamonkey/sou...t/navigator.js http://lxr.mozilla.org/seamonkey/sou...torOverlay.xul http://lxr.mozilla.org/seamonkey/sou...onalToolbar.js http://lxr.mozilla.org/seamonkey/sou...rceOverlay.xul http://lxr.mozilla.org/seamonkey/sou...extOverlay.xul http://lxr.mozilla.org/seamonkey/sou...lityOverlay.js http://lxr.mozilla.org/seamonkey/...
...ul http://lxr.mozilla.org/seamonkey/sou...t/navigator.js http://lxr.mozilla.org/seamonkey/sou...torOverlay.xul http://lxr.mozilla.org/seamonkey/sou...onalToolbar.js http://lxr.mozilla.org/seamonkey/sou...rceOverlay.xul http://lxr.mozilla.org/seamonkey/sou...extOverlay.xul http://lxr.mozilla.org/seamonkey/sou...lityOverlay.js http://lxr.mozilla.org/seamonkey/sou...oomOverlay.xul http://lxr.mozilla.org/seamonkey/sou...torOverlay.xul http://lxr.mozilla.org/seamonkey/sou...ark.properties http://lxr.mozilla.org/seamonkey/sou...kmarks-temp.js http://lxr.mozilla.org/seamonkey/sou.../bookmarks.xml http://lxr.mozilla.org/seamonkey/sou...rksOverlay.xul http://lxr.mozilla.org/seamonkey/sou...okmarksTree.js List of commands (listed alphabetically) Browser:AddBookmark Browser:AddBookmarkA...
...lectAll cmd_SwitchDocumentDirection cmd_switchTextDirection cmd_textZoomEnlarge cmd_textZoomReduce cmd_textZoomReset cmd_undo cmd_viewcomponentbar cmd_viewlinktoolbar cmd_viewlinktoolbar_false cmd_viewlinktoolbar_maybe cmd_viewlinktoolbar_true cmd_viewnavbar cmd_viewpersonaltoolbar cmd_viewtaskbar cmd_zoomWindow Thanks for help of joe.user0 in compiling: http://readlist.com/lists/mozilla.or...l/3/15261.html . Also obtained from http://www.mozilla.org/unix/customizing.html ...
Providing Command-Line Options - Archive of obsolete content
myapp Opens a chrome window for My Application. firefox.exe -viewapp url Opens a chrome window for My Application and passes it an nsIURI object. ...
...IURI object. ...
...Typical command-line handlers use a // category that begins with the letter "m". entry: "m-myapp" }], QueryInterface: XPCOMUtils.generateQI([ Ci.nsICommandLineHandler ]), /* nsICommandLineHandler...
Textbox (XPFE autocomplete) - Archive of obsolete content
ibute 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 SeaMonkey 1.1 Type: space-separated list of values A space-separated list of search component names, each of which implements the nsIAutoCompleteSearch interface. The components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute. search-autocomplete Requires SeaMonkey 2.1 The user's default search engine's suggestions are searched. places-tag-autocomplete Requires SeaMonkey 2.1 The user's Places tags are searched. mydomain New in Thunderbird 3 Requires SeaMonkey 2.0 The user's email domain is suggested. ...
...script context at this point can only access the following things: Global Values/Functions i.e. ...
... the forcecomplete (or forceComplete) attribute. highlightNonMatches New in Thunderbird 1 Requires SeaMonkey 1.0 Type: boolean Gets and sets the value of the highlightnonmatches attribute. ignoreBlurWhileSearching Type: boolean Gets and sets the value of the ignoreblurwhilesearching (or ignoreBlurWhileSearching) attribute. inputField Type: textbox element In Mozilla, the XUL textbox is implemented as a wrapper around an HTML input element. This read only property holds a reference to this inner input element. isSearching Type: boolean This property is set to true while a search is occuring. isWaiting Type: boolean This property is set to true during the period while waiting for the timeout between the time when a user has pressed a key and a se...
Creating an Installer - Archive of obsolete content
ed and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. << PreviousNext >> This section will describe packaging a XUL application into an installer. XPInstall Packages Mozilla provides a mechanism which can be used to package XUL windows, scripts, skins and other files into single file installers. You can place this installer file somewhere for users to download. A simple script can be used to have the package downloaded and installed. This mechanism is called XPInstall (Cross platform Install). XPInstall installers are packaged into JAR files. Inside the JAR file, yo...
...ition, installers should contain an install script (a file named install.js) which can be used to script the installation process. This script has access to various install functions which can be used to install files and components. The JAR file installers typically have the extension .xpi (pronounced zippy) to distinguish them from other archives. The installers will be usually used to install Mozilla components such as new skins, plugins and packages. There are several steps involved in launching an installer and installing components. These are described step by step below. Create a Web page from which the user can download the software to be installed. This page will contain an install trigger which is a small piece of script which launches the install. The user is presented with a dia...
... are the files to be installed. These files will typically be placed inside a directory in the archive but they do not have to be. For chrome files, they might be structured like the chrome directory. Often, the only files placed in an XPI archive will be the install script (install.js) and a JAR file. This JAR file contains all of the files used by your application. The components provided with Mozilla are stored in this manner. Because the XPI file is just a special ZIP file, you can create it and add files to it using a zip utility. Our find files example For the find files dialog, we'll create a structure in the archive much like the following: install.js findfile content contents.rdf findfile.xul findfile.js skin contents.rdf findfile.css locale contents.r...
Introduction to RDF - Archive of obsolete content
XUL file. It would make it very difficult to modify the bookmarks if they were directly in the XUL file. The way to solve this is by using RDF datasources. RDF (Resource Description Framework) is a format that can be used to store resources such as bookmarks or mail. Alternatively, data in other formats can be used and code written that will read the file and create RDF data from it. This is how Mozilla works when it reads data such as bookmarks, the history or mail messages. Mozilla provides datasources for this common data so that you can easily use them. You can use any of the provided RDF datasources to populate trees with data or you can point to an RDF file stored in XML which contains the data. This makes it very convenient to display trees with lots of rows in them. RDF can also populate...
...> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> ... </RDF:RDF> This has some similarities to the XUL header. Instead of the window element, the RDF element is used. You can see the namespace for RDF was declared so that the RDF elements are recognized properly. Inside, the RDF element, you will place the data. To see some example RDF/XML files, look at those provided with Mozilla. They have the extension rdf. RDF database Let's take the example of a bookmarks list generated from RDF. A bookmarks list contains a set of records, each with a set of data associated with it, such as a URL, a bookmark title and a visited date. Think of the bookmarks as a database, which is stored as a large table with numerous fields. In the case of RDF however, the lists may be hierarchical as...
...ink of the bookmarks as a database, which is stored as a large table with numerous fields. In the case of RDF however, the lists may be hierarchical as well. This is necessary so that we can have folders or categories of bookmarks. Each of the fields in an RDF database is a resource, each with a name associated with it. The name is described by a URI. ...
RDF Datasources - Archive of obsolete content
Some of them are listed here with a few examples. They work very similarly to the bookmarks, although the fields will be different in each case. The History List The history datasource provides access to the user's history list which is the list of URLs the user has visited recently. The resource can be referred to using rdf:history as the datasource. The table below shows the resources (or fields) that you can retrieve from the history datasource. ...
...w> <treecell label="rdf:http://home.netscape.com/NC-rdf#Name"/> <treecell label="rdf:http://home.netscape.com/NC-rdf#URL"/> <treecell label="rdf:http://home.netscape.com/NC-rdf#Date"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> Other Datasources The tables below list some of the other datasources available with Mozilla. You can use any of the resources that you want. Bookmarks (rdf:bookmarks) The bookmarks are generated from the user's bookmark list. Resources Added Date http://home.netscape.com/NC-rdf#BookmarkAddDate Date the bookmark was added Description http://home.netscape.com/NC-rdf#Description Bookmark description ...
...or example, to display only the reptiles, use a value of http://www.some-fictitious-zoo.com/reptiles. Setting the ref Attribute Example The example below shows how to display a particular piece of an RDF datasource by setting the ref attribute. ...
Styling a Tree - Archive of obsolete content
real element in the tree body. The inner elements are just placeholders. Setting Properties Instead, you must use the properties attribute on the rows or cells to set one or more named properties. This can be used with trees with static content, RDF built content or with those with a custom view. Let's say we want a particular row to have a blue background color. This would be used to implement Mozilla Mail's labels feature. We'll use a property called 'makeItBlue'. You can use whatever name you want. You can set multiple properties by separating them with spaces. Set the property on a row or cell, as in the following example: <treerow properties="makeItBlue"> CSS Selectors for the Tree The style sheet can take this property and use it to change the appearance of the row for unread message...
...e 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,col,props){ if ((row %4) == 0){ var aserv=Components.classes["@mozilla.org/atom-service;1"]. getService(Components.interfaces.nsIAtomService); 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 'makeItBl...
...endElement() 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(Components.interfaces.nsIAtomService); props.AppendElement(aserv.getAtom("makeItBlue")); } else { return "makeItBlue"; } } } This function would be defined as part of a view object. It first checks to see which row is being requested and sets a property for cells in every fourth row. Example style sheet treechildren::-moz-...
Using Visual Studio as your XUL IDE - Archive of obsolete content
there is an easier way. If you already have a XML or XUL file opened, Visual Studio will add the menu item XML to the main menu. Just use XML > Schemas... to add the xul.xsd from the package that you have downloaded. The other xsd files will be added automatically. Visual Studio will use the schema based on the namespace, so make sure your window element uses the correct XUL namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul. 3. XBL If you are writing your own elements in XBL, you can download a XBL schema from mozilla.doslash.org/xblschema. Grab the XSD version and add it in the same way, you added the XUL schema. To combine both, you can also add your own XBL elements to the XUL schema to get autocompletion-support and validation for those in your XUL files. Mihailo posted...
...9, etc.) and add your extensions to the corresponding registry entries ExtJS and ExtXml. Make sure that Visual Studio is not running, when you do this. 5. Problems that need to be solved There are still some problems for which I did not find a solution yet. 5.1 Localization using DTD You will get validation errors in Visual Studio, if you are localizing your XUL files. That has to do with the way Mozilla implemented localization: < !DOCTYPE window SYSTEM "chrome://loomo/locale/main.dtd"> Visual Studio doesn't recognize the chrome URI prefix, what will give you an error at the previous line ("The URI prefix is not recognized"). As VS doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are ...
...EM "chrome://loomo/locale/main.dtd"> Visual Studio doesn't recognize the chrome URI prefix, what will give you an error at the previous line ("The URI prefix is not recognized"). As VS doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in this file. 5.2 Text preprocessor The Mozilla Build System includes a Text preprocessor. As preprocessor directives are not valid XML, Visual Studio will mark them as errors in your XUL files. 5.3 Javascript related You will get validation errors for Javascript code whenever using the keywords "const" and "let". These keywords are Mozilla-specific at the moment. VS just supports ECMAScript 3rd Edition and thus doesn't know these keywords. ...
XUL Accesskey FAQ and Policies - Archive of obsolete content
nstead of ALT. How is an accesskey added to a form control? An accesskey can be added to an HTML or XUL form control or label by using the accesskey attribute. For example, here's how we add an accesskey to a XUL button: <button label="Apply instantly" accesskey="A" /> Apply instantly - or - <button label="Apply instantly" accesskey="a" /> Apply instantly In Mozilla, we use DTD's for one more layer of abstraction, for purposes of internationalization. The above example should say: <button label="Apply instantly" accesskey="&applyInstantly.accesskey" /> (Always use accesskey instead of akey). If methods like confirm(), confirmEx() or prompt() are being used to create a dialog, use an & before the button or checkbox text to make the next character an accesske...
...re being used to create a dialog, use an & before the button or checkbox text to make the next character an accesskey. For example, "Do it &now" makes "n" the underlined accesskey. To insert a real ampersand, use &&. How do I pick an accesskey letter? Accesskey attribute is case sensitive! Notice that the difference between the button examples above is the case of the accesskey specified. Mozilla's accesskey implementation will first try to underline a letter of the same case, but if there isn't one it will fall back on a letter of the opposite case. Our preference is to underline the first letter of one of the words, so it's important to be aware of this quirk. Avoid duplicates Don't use the same accesskey letter twice in the same window. Be especially careful of drop down...
...l letters. Avoid: Letters with descenders, such as p, g, q, or y. Example: p, g, q, y. Letters next to a letter with a descender. Letters that are only one pixel wide, such as i or l. Example: i, l. Make it easy to remember Do the most important prompts first, so that they get the best accesskeys. See if a similar prompt has an accesskey elsewhere in Mozilla, and use the same accesskey. There are standard accesskeys used in Windows as well, like Properties. If not, try the first letter of the first word in the prompt. Next, try the first letter of another word in the prompt. Finally, use any non-silent letter in an action word (do these after the rest of the dialog has accesskeys chosen). Common elements that don't get accesskeys ...
XUL element attributes - Archive of obsolete content
nts are placed on the right or bottom edge of the box. If the box is larger than the total size of the children, the extra space is placed on the left or top side. persist Type: space-separated list of attribute names A space-separated list of attributes that are maintained when the window is closed. When the window is re-opened, the values of persistent attributes are restored. In Mozilla, persistent attributes are stored in the per-profile file xulstore.json. Persistence can also be stored using the document.persist function. In order for persistence to work, the element must also have an id. Persistence will not remember the absence of an attribute, so for boolean attributes like checked where absence means false, you will need to explicitly set the attribute to false before the...
...pear when the user clicks on the element. position Type: string (representing an integer) When an element is in an overlay, the position is an index where the child is inserted. The position is one-based, so use a value of 1 to place the element at the beginning. This attribute is ignored if either an insertbefore or insertafter attribute matches an element. preference-editable Mozilla 1.8 Type: boolean If true, the element may be used as one that modifies a preference in a prefwindow. The preference attribute may be used to connect to a preference element. This is useful for custom elements implemented in XBL. The element should fire change, command, or input event when the value is changed so that the preference will update accordingly. See the pref system documentation ...
.... Place this attribute on the same element as the datasources attribute. Use sortResource2 to specify a secondary sort key. sortResource2 Type: URI The value of this attribute is the URI of an RDF predicate that serves as a secondary key for sorted content. statustext Type: string Used to set the text that appears on the status bar when the user moves the mouse over the element. Mozilla doesn't adjust the status bar automatically however. This attribute serves only as a place to keep the text. In Firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. style Type: CSS inline style CSS style rules to be applied to the element. Syntax is as in the HTML style attribute. It is preferred to put style rules in style sheets. template ...
XML - Archive of obsolete content
styling or "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. ...
...ng 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. Gecko is a rendering engine that understands XUL and knows how to make it into pixels on the screen. Mozilla is a product made with all these technologies, but Gecko is the thing sitting inside that renders that product. Gecko was designed to be lightweight, standards-compliant and cross-platform, so rather than defining on its own how these widgets should be rendered, Gecko depends for all but the most basic behavioral and presentational aspects of the widgets upon Cascading Stylesheets. The combinati...
...than the chef. This arrangement creates new possibilities for truly cross-platform web applications, application serving, web appliances and embedded systems, and all sort of other things. Like all really good technologies, XUL and its XP cousins are already being used in ways not imagined by their creators and growing propitiously out of control. Author: Ian T. Oeschger Other Documents: XML in Mozilla Original Document Information Author(s): Ian T. Oeschger Last Updated Date: November 13, 2001 Copyright Information: Copyright (C) Ian T. Oeschger ...
browser - Archive of obsolete content
autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element.
... autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element. autoscroll Type: boolean Set to false to disable autoscroll for th...
... autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element. autoscroll Type: boolean Set to false to disable autoscroll for this browser. If this attribute is set to true or omitted, autos...
wizard - Archive of obsolete content
der and buttons along the bottom, and also handles navigation between the pages. Each page should be constructed using a wizardpage. The pages are displayed in the order that they are placed in the wizard, unless you use the next and pageid attributes on the pages to change the sequence. The wizard will rendered in a manner suitable for the user's selected theme and platform. In newer versions of Mozilla, a statusbar may be placed directly inside the wizard element which will be shared among all pages. More information is available in the XUL tutorial. Attributes firstpage, lastpage, pagestep, title, windowtype Properties canAdvance, canRewind, currentPage, onFirstPage, onLastPage, pageCount, pageIndex, pageStep, title, wizardPages Methods advance, cancel, extra1, extra2, getButton...
..., title, windowtype Properties canAdvance, canRewind, currentPage, onFirstPage, onLastPage, pageCount, pageIndex, pageStep, title, wizardPages Methods advance, cancel, extra1, extra2, getButton, getPageById, goTo, rewind Examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="theWizard" title="Secret Code Wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkCode(){ document.getElementById('theWizard').canAdvance = (document.getElementById('secretCode').value == "cabbage"); } </script> <wizardpage onpageshow="checkCode();"> <label value="Enter the secret code:"/> <textbox id="secretCode" onkeyup="checkCode();"/> </wizardpage> <wizardpage> <label value...
...user (by disabling the Cancel button) that they cannot can pagestep Type: integer The index of the current page. title Type: string The text to appear in the title bar of the window. windowtype Type: string Set to a string which can be used to identify the type of window. This might be used, for example, to distinguish between a browser window and an editor window. Some of Mozilla's window handling functions use this attribute to group windows of the same type together. Values for window type as found on MXR: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - Looks like if window has gBrowser it has this window type devtools:scratchpad - Scratchpad windows navigator:view-source - The view source windows Properties canAdva...
XUL - Archive of obsolete content
XUL applications are applications using XUL and other components of the platform). XUL Controls lists some of the common controls provided by XUL. ...
...XUL applications are applications using XUL and other components of the platform). XUL Controls lists some of the common controls provided by XUL. ...
...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 #xul on irc.mozilla.org Tools XUL online live editor (copy & paste snippets from here and run them) XUL Explorer (a lightweight XUL IDE) XULExplorer (Patched version of XUL explorer) Extension developer's e...
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
ter set the AppName and AppPublisher properties to the same values specified in your XULRunner application's application.ini file. My App's .iss file sample as follows: ; Script generated by the Inno Setup Script Wizard. ...
...ur XULRunner application's application.ini file. My App's .iss file sample as follows: ; Script generated by the Inno Setup Script Wizard. ...
...lows: ; Script generated by the Inno Setup Script Wizard. ...
Opening a Link in the Default Browser - Archive of obsolete content
XULRunner applications may have situation where they wish to open a URI in the default browser. This will often be an HTTP or HTTPS URI, but can use any scheme for which an external handler exists. ...
...ternal handler exists. This can be done using the nsIExternalProtocolService interface: // first construct an nsIURI object using the ioservice var ioservice = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var uriToOpen = ioservice.newURI("http://www.example.com/", null, null); var extps = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Components.interfaces.nsIExternalProtocolService); // now, open it! extps.loadURI(uriToOpen, null); By default, the external protocol service will warn the user about opening the link in another application. To suppress this warning for particular protocols that are safe to open in the default application, you must s...
...d sets the following prefs): // suppress external-load warning for standard browser schemes pref("network.protocol-handler.warn-external.http", false); pref("network.protocol-handler.warn-external.https", false); pref("network.protocol-handler.warn-external.ftp", false); You can also check whether an external handler for a scheme exists. ...
Mozprofile - Archive of obsolete content
In addition to creating profiles, mozprofile can install addons and set preferences. Mozprofile can be utilized from the command line or as an API. Command Line Usage mozprofile may be used to create profiles, set preferences in profiles, or install addons into profiles. ...
...prefs.json using a .ini file: mozprofile --preferences myprefs.ini via the command line: mozprofile --pref key:value --pref key:value [...] When setting preferences from an .ini file or the --pref switch, the value will be interpolated as an integer or a boolean (true/false) if possible. Setting Permissions mozprofile also takes care of adding permissions to the profile. ...
...nces myprefs.ini via the command line: mozprofile --pref key:value --pref key:value [...] When setting preferences from an .ini file or the --pref switch, the value will be interpolated as an integer or a boolean (true/false) if possible. Setting Permissions mozprofile also takes care of adding permissions to the profile. See https://github.com/mozilla/mozbase/b...permissions.py Resources Other Mozilla programs offer additional and overlapping functionality for profiles. There is also substantive documentation on profiles and their management. ProfileManager : XULRunner application for managing profiles. Has a GUI and CLI. python-profilemanager : python CLI interface similar to ProfileManager profile documentation : http://support.mozilla.com/kb/Profiles ...
reftest opportunities files - Archive of obsolete content
It is not always clear why particular files were checked in, but one presumes that something needed to be checked. Many of these were checked with the Layout Regression test tool, which has been described as difficult to use and it apparently reported a lot of regressions that were not errors. If you can look at the HTML in one of these pages, and can see a way to get the same visual ouptut, then that is an obvious reftest opportunity. For example, if some HTML is in an unexpected place and is supposed to be ignored, then we can match against an html file that is missing that extra mark-up. In other cases, the design of the reference page may take more subtlety. ...
...le that is missing that extra mark-up. In other cases, the design of the reference page may take more subtlety. For now, create a bug in the Core product, Testing component in the Bugzilla, if you can point to a file in this list and can attach the html reference that can be used to compare the output. Any assistance or comments here would be appreciated. If you have questions, please post to the mozilla.dev.quality newsgroup on news.mozilla.org (see at Google Groups). Layout bugs that needs a reftest Many of the Bugzilla bugs in the Core product, Layout components with the in-testsuite? flag needs one or more reftests. If you create a reftest for any of these bugs please attach the reftest to the bug and ask for review from the assignee (or anyone else that seems appropriate judging from comment...
.../dbaron.org/css/test/sec170503 http://dbaron.org/css/test/sec170504 http://dbaron.org/css/test/tborder1 http://dbaron.org/css/test/tborder2 http://dbaron.org/css/test/sec1706c http://dbaron.org/css/test/sec1801 http://dbaron.org/css/test/sec1802 http://dbaron.org/css/test/sec1803 http://dbaron.org/css/test/outline http://dbaron.org/css/test/sq_small http://dbaron.org/css/test/sq_large Tests from mozilla source tree parser/htmlparser/tests/html/xmp005.html parser/htmlparser/tests/html/value001.html parser/htmlparser/tests/html/utf8001.html parser/htmlparser/tests/html/usascii.html parser/htmlparser/tests/html/title01.html parser/htmlparser/tests/html/title.html parser/htmlparser/tests/html/tiny.html parser/htmlparser/tests/html/thead001.html parser/htmlparser/tests/html/text003.html parser/htmlp...
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. Deadline for feedback has passed. ...
...mmary: mozilla.dev.planning - July 17-23, 2006 Announcements Firefox 2/Gecko 1.8.1 bug approvals Starting on Friday July 21 at 10:00a PDT the release triage team will no longer be accepting bugs unless they meet one of the posted criteria. Criteria are included in the linked post. ...
.../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-11-22 - Archive of obsolete content
To join, send a blank email with subscribe in the subject field to: nvda...@freelists.org (Click here to view the original post and unmask the e-mail address) Michael would like to thank stormDragon for setting this up. Click here for more details. ...
...es, or if you wish to discuss new features or talk with other NVDA users. To join, send a blank email with subscribe in the subject field to: nvda...@freelists.org (Click here to view the original post and unmask the e-mail address) Michael would like to thank stormDragon for setting this up. Click here for more details. New mailing list for NVDA Steve Lee was pleased to announce that the Mozilla Foundation has approved a grant spearheaded by himself and Aaron Leventhal for "Improved Switch Access to Firefox". He expressed his gratitude and thanks everyone for being supportive during and after the Summit. Click here for more details. IDispatch support for JAWS scripting needed Aaron Leventhal stated that currently there is no IDispatch support for IAccessible's in Mozilla. If anyone...
...al for "Improved Switch Access to Firefox". He expressed his gratitude and thanks everyone for being supportive during and after the Summit. Click here for more details. IDispatch support for JAWS scripting needed Aaron Leventhal stated that currently there is no IDispatch support for IAccessible's in Mozilla. If anyone has experience with these issues, and is comfortable helping out in the mozilla/accessible module, would you please take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=166994 He stated that he almost had it working a couple of years ago. The bug has a very old patch which will no longer be easy to apply but may provide clues as to where they are going wrong. For more information click here. Discussions Image Labelling for Blind Help Machines Frank Hecker brought ...
2006-10-06 - Archive of obsolete content
Hence, they are looking for a Mac user to test out the new features by building a mac.rdf file with all of the various .mac account properties mentioned in the document here. Discussions Is Thunderbird using a valid W3C coding? Peter Lairo requested someone who are knowledgeable in W3C standards to confirm if the use of <blockquote type="cite"> is valid W3C code. ...
...account properties mentioned in the document here. Discussions Is Thunderbird using a valid W3C coding? Peter Lairo requested someone who are knowledgeable in W3C standards to confirm if the use of <blockquote type="cite"> is valid W3C code. ...
...ions Is Thunderbird using a valid W3C coding? Peter Lairo requested someone who are knowledgeable in W3C standards to confirm if the use of <blockquote type="cite"> is valid W3C code. Q & A Q: Walt experienced an unusual behaviour in his build and wanted to perform an experiment to figure out the problem, but he couldn't find the mozilla.org's config file. A: Robert Helmer pointed out the mozilla.org's config file could be found here and to look for -->mozconfig<---------------------------------------- -->end mozconfig<---------------------------------------- Updated: Developer documentation issues for Thunderbird 2 Eric Shepherd has requested feedback for any developer documentation issues that might need dealing with for Thunderbird 2. Discussion highlights: Ziga Sancin suggests ...
2006-10-20 - Archive of obsolete content
On October 18th Marcus responded to his original post and expanded on the original content of his question. Marcus claims that when he builds Firefox using CentOs he encounters crashes (segmentation faults) under Linux distributions such as gentoo, suse and fedora. He also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine. ...
...s/packages-static" Announcements Decommissioning sparky on Friday On October 17th J. Paul Reed announced that: Sparky, the Linux performance test machine for the 1.8 branchs, is being decommissioned. He also added that the Linux performance test data is now being provided by bl-bldlnx01. Paul would like to hear from anyone who is against this decision. He can be contacted via: Email: preed@mozilla.com IRC: preed on irc.mozilla.org Phone: 650.903.0800 x256 Uploading language packs to AMO On October 17th Benjamin Smedberg brought the following to the attention of the localizers and the build team: That he is planning to upload the Firefox 2 language packages currently located at http://releases.mozilla.org/pub/mozi...rc3/win32/xpi/ to addons.mozilla.org in the next few days. This wil...
...-term goal is to remove old incompatible hardware. On the same day Robert Kaiser responded to J. Paul Reed's post: Robert Kaiser shared the following information about comet and btek machines: comet and btek are used as machines that upload nightly gtk1 builds. comet and btek are currently the fastest-cycling tinderboxes available therefore they are quite fast to detect general fires on the mozilla tree. Robert Kaiser also suggested replacing luna, a machine used to create gtk1 builds, with a machine thats sole responsibility is to only the tests on builds from the official nightly machines. On October 20th J. Paul Reed responded to Robert Kaiser's post: J. Paul Reed replies to Robert Kaiser post and asks him to confirm the intention of his post. J. Paul Reed also questions why gtk1...
2006-11-3 - Archive of obsolete content
Check thread for complete details. MozillaTranslator 5.13 released MozillaTranslator 5.13 is available here. Opening l10n repository on MOZILLA_1_8_BRANCH for approved check-ins MOZILLA_1_8_BRANCH is opened for approved check-ins. Check-ins are limited to bug fixes filed in Bugzilla and should mention their bug, describe the change, and who approved the change. ...
... Summary: mozilla.dev.l10n - November 3, 2006 Announcements mozip.NET 1.2.0 released: the Should Have Been 1.0 release mozip.NET 1.2.0, a GUI (graphic) version of piaip's mozip command line utility, is available here. Check thread for complete details. MozillaTranslator 5.13 released MozillaTranslator 5.13 is available here. Opening l10n repository on MOZILLA_1_8_BRANCH for approved check-ins MOZILLA_1_8_BRANCH is opened for approved check-ins. Check-ins are limited to bug fixes filed in Bugzilla and should mention their bug, describe the change, and who approved the change. SeaMonkey 1.0.6 and 1.1 Beta upcoming The SeaMonkey projet is planning a security release of the stable 1.0 series as well as a beta for the 1.1 version, all possibly in the next days or week. Communi...
...n the next days or week. Community is advised to perform tests on both builds to ensure they work flawlessly. 1.0.6 build is located here, and 1.1 Beta build is located here. Discussions Last check-ins on sun-calendar-event-dialog.* files Last check-ins on sun-calendar-event-dialog.* files From 50 to 100 locales How to get from the 50 locales and releasing 40 to a hundred. Revisiting MozillaTranslator bugs in Bugzilla Revisiting MozillaTranslator bugs in Bugzilla dictionary packages There are some dictionaries at http://dictionaries.mozdev.org/installation.html which are not at https://addons.mozilla.org/en/dictionaries. Localization of AMO and some other pages of Mozilla.com Suggestion on localizing popular add-ons as well as web pages at Mozilla.com. Meetings None for ...
2006-12-08 - Archive of obsolete content
Discussions None for this week. Meetings None for this week. ...
... SeaMonkey 1.1b es-ES language and region packs language and region packs for SeaMonkey 1.1b is ready for downloading. New strings in Thunderbird New strings in Thunderbird new bugzilla-staging.mozilla.org a staging server for a new bugzilla upgrade. Discussions None for this week. Meetings None for this week. ...
... Discussions None for this week. Meetings None for this week. ...
2006-11-03 - Archive of obsolete content
More Tbox changes on the way, most hitting on Friday Preed discusses killing more tboxes. Cross-Product extension install improvements Simon Paquet points out how much easier it is to install an extension in firefox than it in any other product. ...
... More Tbox changes on the way, most hitting on Friday Preed discusses killing more tboxes. ...
... More Tbox changes on the way, most hitting on Friday Preed discusses killing more tboxes. Cross-Product extension install improvements Simon Paquet points out how much easier it is to install an extension in firefox than it in any other product. A discussion of how to get firefox to be able to install extensions for other products (e.g. Thunderbird, sunbird). button in the upp...
2006-11-03 - Archive of obsolete content
...
...Here is Brendan's Mozilla 2 roadmap. ...
... ...
2006-11-24 - Archive of obsolete content
Discussions Java versus Tamarin Discussion about possibility of implementing Java technology in Mozilla products. A user writes that the licensing incompatibilities between GPL and MPL would prevent Java code to be added in Mozilla. The license would need to be compatible with all three MPL/GPL/LGPL (used by Tamarin) to be considered for Mozilla. ...
...s Java versus Tamarin Discussion about possibility of implementing Java technology in Mozilla products. A user writes that the licensing incompatibilities between GPL and MPL would prevent Java code to be added in Mozilla. The license would need to be compatible with all three MPL/GPL/LGPL (used by Tamarin) to be considered for Mozilla. ...
... technology in Mozilla products. A user writes that the licensing incompatibilities between GPL and MPL would prevent Java code to be added in Mozilla. The license would need to be compatible with all three MPL/GPL/LGPL (used by Tamarin) to be considered for Mozilla. ...
JS-Engine FAQ - Archive of obsolete content
An alternative would be to use built-in E4X. Newly created threads in JS from MOZILLA_1_8_BRANCH causes to hang in Windows Patch from bug 351602 should fix the problem. After applying that patch, recompile JS and define JS_USE_ONLY_NSPR_LOCKS in the build. ...
... Spidermonkey How long are private pointers? 2-byte aligned. Check the JSVAL macros at the top of js/src/jsapi.h Can an embedded SpiderMonkey JS Engine use DOMParser extension of Mozilla? DOMParser is not part of JS but part of Mozilla browser which makes it available to script in the browser using XPConnect. An alternative would be to use built-in E4X. Newly created threads in JS from MOZILLA_1_8_BRANCH causes to hang in Windows Patch from bug 351602 should fix the problem. After applying that patch, recompile JS and define JS_USE_ONLY_NSPR_LOCKS in the build. Spidermonkey library loading mechanism? To write wrappers in pure JavaScript to interface with any C library on the system there are mechanisms such as xpcshell, wxjs, jsdb, JSNI Coding Spidermonkey in C check out this tuto...
...antly slower in run-time than native Java. Even when Rhino is pre-compiled with high optimization, it still is no match for a compiled Java program. How to determine Rhino version programatically? You can call getImplementationVersion() on a Context instance and it gives you a string, e.g. <tt>Rhino 1.6 release 2 2005 09 19</tt>. How to compile JavaScript into Java Invoking compiler: java org.mozilla.javascript.tools.jsc.Main [options] file1.js [file2.js...] This results in a class file. Compiler options can be vied here. Non-js-engine questions Can I call functions in Mozilla extensions from web page? No, accessing anything in the web page's script may lead to security problems. See XPCNativeWrapper. ...
2006-11-17 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. ...
NP_GetMIMEDescription - Archive of obsolete content
NP_GetMIMEDescription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file. Each MIME type description should be separated by a semicolon (;). Each MIME type description contains the MIME Type, an extensions list and a short description. ...
...IMEDescription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file. Each MIME type description should be separated by a semicolon (;). Each MIME type description contains the MIME Type, an extensions list and a short description. ...
...e dll resource file. Each MIME type description should be separated by a semicolon (;). Each MIME type description contains the MIME Type, an extensions list and a short description. One MIME type // example inside http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/plugin.cpp #define MIME_TYPE_DESCRIPTION "application/basic-plugin:bsp:Basic Example Plug-in for Mozilla" const char* NP_GetMIMEDescription(void) { return(MIME_TYPES_DESCRIPTION); } Two MIME types const char* NP_GetMIMEDescription(void) { return "application/basic-example-plugin:xmp1:Example 1;application/basic-example2-plugin:xmp2, xm2p:Example 2"; } Gnome Integration If you use GNOME VFS (gnome-vfs-2.0), you can get the MIME type description with a function. #include <libgnomevfs/gnome-vf...
XForms - Archive of obsolete content
sentation, strong data typing, the ability to submit XML data to servers instead of name/value pairs, and a descriptive way to author forms so that they can be displayed by a wide variety of devices. XForms is a W3C specification. XForms Tutorial and Cookbook XForms in Wikibook Format - Over 50 examples tested with Firefox. XForms support can be added to Firefox and SeaMonkey by installing the Mozilla XForms extension. This extension, while supporting a significant subset of the XForms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010. The last official release has been done for Firefox 3.6 and is available for download on addons.mozilla.org. For more details about the future of the Mozilla XForms extension see this blog post. Document...
...of the XForms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010. The last official release has been done for Firefox 3.6 and is available for download on addons.mozilla.org. For more details about the future of the Mozilla XForms extension see this blog post. Documentation Implementation status Implementation status of the Mozilla XForms extension Building Get started with building your own XForms extensions from source. Troubleshooting tips for XForms A small collection of tips for troubleshooting common problems with XForms forms. Mozilla XForms specials Explains where, and how, Mozilla XForms deviates or extends the XForms 1.0 specification. XForms custom controls...
...ms control through XBL, and create f.x. an SVG input control. XForms user preferences A description of the about:config variables that XForms uses. XForms API reference XForms interfaces documentation. XForms UI Elements reference XForms user interface elements documentation. View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed #xforms channel on irc.mozilla.org W3C Forms mailing list Other community links... Tools XForms validator XForms Buddy Related Topics Extensions, HTML, XHTML, XML, XPath ...
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
Summary: An obscure bug in Gecko causes list-item markers to be differently sizeed than the text of the list item, but there is a fix authors can use. Learn how to correctly size list item markers in Gecko 0.9.4, the basis of Netscape 6.2.x and CompuServe 7. 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. This is most obvious in ordered lists, where the number that precedes each list item may be obviously different than t...
...cedes each list item may be obviously different than the content that follows it. In fact, the markers were set to be a uniform size that did not change to match the content of the list items, so in rare cases the marker might actually appear to be smaller. See bug 110360, which explains the problem and shows when the fix was applied. ...
...ually appear to be smaller. See bug 110360, which explains the problem and shows when the fix was applied. In addition, when a document is displayed in "quirks" mode in Mozilla 0.9.4 and later, the markers of lists 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 th...
Popup Window Controls - Archive of obsolete content
Mozilla and Firefox allow users to control most unsolicited attempts to open new windows such as popup and popunder windows. Learn how to detect Popup Controls, how to ask your readers to enable popups for your site and how to get the benefits of popup windows without using popup windows. ...
...t Popup Controls, how to ask your readers to enable popups for your site and how to get the benefits of popup windows without using popup windows. ...
...Replacements for Popup Windows If your popup was created during the time the web page was loading, you may consider using document.write() to emit appropriate HTML which will contain the same information as the popup window. You can also use either the advanced features in the Document Object Model (DOM) or innerHTML to create the appropriate HTML. Example The example tag links to devedge-temp.mozilla.org This example illustrates detecting suppressed popup windows as well as an approach for replacing popup windows with inline HTML using innerHTML. Original Document Information Author(s): Bob Clary Last Updated Date: December 5th, 2002 Copyright (C) 2001-2003 Netscape. ...
Windows Media in Netscape - Archive of obsolete content
t therefore can not be used everywhere ActiveXObject is used. ActiveXObject is used by many web developers to detect the presence of Internet Explorer in much the same fashion as document.all is used. ...
...s has the general pattern: Mozilla/5.0 (Windows; U; <em>operating system version</em>; <em>language</em>; rv:1.4) Gecko/20030624 Netscape/7.1 (ax<em>[;optional comments]</em>) The "Vendor Comment" (ax) following the "Vendor Version" Netscape/7.1 is an indicator that the browser supports the Windows Media Player ActiveX control. For example on Windows XP, Netscape 7.1's user agent string may be: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) If the client was customized by a third party, additional information may be present in the "Vendor Comment" area of the user agent string. ...
.../7.1 is an indicator that the browser supports the Windows Media Player ActiveX control. For example on Windows XP, Netscape 7.1's user agent string may be: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) If the client was customized by a third party, additional information may be present in the "Vendor Comment" area of the user agent string. For example: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; PROMOSTRING) Although GeckoActiveXObject is currently available only in Netscape 7.1 on Windows, it may be the case in the future that it will be available in other Gecko-based browsers on other operating systems. Detecting the presence of the strings Gecko/ and (ax should provide for the ability to detect any Gecko...
Using CSS generated content - Learn web development
for a black queen ?. For details, see Referring to characters not represented in a character encoding and Characters and case in the CSS Specification. ...
...eferring to characters not represented in a character encoding and Characters and case in the CSS Specification. ...
...rs and case in the CSS Specification. Image content To add an image before or after an element, you can specify the URL of an image file in the value of the content property. ...
Styling links - Learn web development
The third rule uses the a sele...
...you get really stuck, press the Show solution button to insert the example we showed above. ...
...The last rule however is interesting -- here we are inserting a custom background image on external links in a similar manner to how we handled custom bullets on ...
Define terms with HTML - Learn web development
you probably go straight to a dictionary or glossary. Dictionaries and glossaries formally associate keywords with one or more descriptions, as in this case: Blue (Adjective) Of a color like the sky in a sunny day. The clear blue sky Of a subtle sadness, melancholy. I'm feeling blue But we're constantly defining keywords informally, as here: Firefox is the web browser created by the Mozilla Foundation. To deal with these use cases, HTML provides tags to mark descriptions and words described, so that your meaning gets across properly to your readers. How to mark informal description In textbooks, the first time a keyword occurs, it's common to put the keyword in bold and define it right away. We do that in HTML too, except HTML is not a visual medium and so we don't use bold. We...
...yword in bold and define it right away. We do that in HTML too, except HTML is not a visual medium and so we don't use bold. We use <dfn>, which is a special element just for marking the first occurrence of keywords. Note that <dfn> tags go around the word to be defined, not the definition (the definition consists of the entire paragraph): <p><dfn>Firefox</dfn> is the web browser created by the Mozilla Foundation.</p> Another use for bold is to emphasize content. Bold itself is a concept foreign to HTML, but there are tags for indicating emphasis. Special case: Abbreviations It's best to mark abbreviations specially with <abbr>, so that screen readers read them appropriately and so that you can operate on all abbreviations uniformly. Just as with any new keyword, you should define your ab...
...re's an implicit relationship between the <dfn> element and its container. If you want a more formal relationship, or your definition consists of only one sentence rather than the whole paragraph, you can use the aria-describedby attribute to associate a term more formally with its definition: <p> <span id="ff"> <dfn aria-describedby="ff">Firefox</dfn> is the web browser created by the Mozilla Foundation. </span> You can download it at <a href="http://www.mozilla.org">mozilla.org</a> </p> Assistive technology can often use this attribute to find a text alternative to a given term. You can use aria-describedby on any tag enclosing a keyword to be defined (not just the <dfn> element). aria-describedby references the id of the element containing the description. How to build a descr...
Getting started with HTML - Learn web development
te value, wrapped with opening and closing quote marks. Active learning: Adding attributes to an element Another example of an element is <a>. This stands for anchor. An anchor can make the text it encloses into a hyperlink. Anchors can take a number of attributes, but several are as follows: href: This attribute's value specifies the web address for the link. For example: href="https://www.mozilla.org/". title: The title attribute specifies extra information about the link, such as a description of the page that is being linked to. For example, title="The Mozilla homepage". This appears as a tooltip when a cursor hovers over the element. target: The target attribute specifies the browsing context used to display the link. For example, target="_blank" will display the link in a new tab. I...
... htmlSolution; solution.value = 'Show solution'; updateCode(); }); solution.addEventListener('click', function() { if(solution.value === 'Show solution') { textarea.value = solutionEntry; solution.value = 'Hide solution'; } else { textarea.value = userEntry; solution.value = 'Show solution'; } updateCode(); }); var htmlSolution = '<p>A link to my <a href="https://www.mozilla.org/" title="The Mozilla homepage" target="_blank">favorite website</a>.</p>'; var solutionEntry = htmlSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insert...
... If you look at code for a lot of other sites, you might come across a number of strange markup styles, including attribute values without quotes. This is permitted in certain circumstances, but it can also break your markup in other circumstances. For example, if we revisit our link example from earlier, we could write a basic version with only the href attribute, like this: <a href=https://www.mozilla.org/>favorite website</a> However, as soon as we add the title attribute in this way, there are problems: <a href=https://www.mozilla.org/ title=The Mozilla homepage>favorite website</a> As written above, the browser misinterprets the markup, mistaking the title attribute for three attributes: a title attribute with the value The, and two Boolean attributes, Mozilla and homepage. Obviously, t...
Manipulating documents - Learn web development
You can see here that each element and bit of text in the document has its own entry in the tree -- each one is called a node. You will also encounter various terms used to describe the type of node, and th...
... You can see here that each element and bit of text in the document has its own entry in the tree -- each one is called a node. You will also encounter various terms used to describe the type of node, and their position i...
...ng properties and methods available to it (these are defined on interfaces like HTMLAnchorElement in the case of <a> element, its more general parent interface HTMLElement, and Node -- which represents all nodes in a DOM). First of all, let's change the text inside the link by updating the value of the Node.textContent property. Add the following line below the previous one: link.textContent = 'Mozilla Developer Network'; We should also change the URL the link is pointing to, so that it doesn't go to the wrong place when it is clicked on. Add the following line, again at the bottom: link.href = 'https://developer.mozilla.org'; Note that, as with many things in JavaScript, there are many ways to select an element and store a reference to it in a variable. Document.querySelector() is th...
Accessibility API cross-reference
This cross-reference helps us see the difference between today's accessibility API's. All accessibility APIs to date define a list of possible object roles, or general types, such as button, menu item, text, etc. They also define a list of possible object states, such as focused, read-only, checked, etc. An interesting problem is that Mozilla, Safari/KHTML, Opera, StarOffice and other apps are cross-platform, but there is currently no cross-platform Accessibility API. The IPC mechanisms used by current generation API's are also not cross-platform, although communication for some cross-platform accessibility API of the future could be done through sockets. These tables describe how various accessibility APIs define possible roles of an object, and states. All accessibility APIs to date d...
...n MSAA. To do Fill out Mac API column.(Mac OS X - Carbon Accessibility API and Accessibility Constants) Finish ARIA column - add explanation of the term 'Abstract role' Fill out HTML column Create AOM column Fill out XUL column. ...
...ining a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys, e.g. a spreadsheet. gridcell A type of mouse pointer used for resizing windows GRIP n/a n/a n/a Probably a group box (titledbox in mozilla) GROUPING PANEL PANEL group <fieldset>, <div> A heading for a section of the page. In ARIA, the heading level is expressed with the aria-level attribute. heading <h1> ... <h6> <H1> ... <H6>. <H> is also available but its use is not recommended because of lack of suitable tools - and the heading level is undefined Click on t...
Accessibility information for UI designers and developers
t subheading would be a level 3, and never a level 4 or 5. Just like in contracts, if there is a 1.2.4 paragraph, you would expect there to be a paragraph 1.2, of which it is a subsection. Many screenreaders users navigate by headings. For them it is important that no levels are skipped in the HTML. Designers are encourage to also not skip levels in designs. See also: heading elements Join the Mozilla Accessibility Community Live Chat Both 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google ...
...C 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. ...
... good chance to find someone to chat with there, day or night. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. ...
Embedding API for Accessibility
This document lays out what we already have, and what we'll need later, in the embedding API to support accessibility. ...
...This document lays out what we already have, and what we'll need later, in the embedding API to support accessibility. ...
...This document lays out what we already have, and what we'll need later, in the embedding API to support accessibility. ...
Information for users
Since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google ...
...including a list of Firefox themes that have been specially designed for those with low vision: themes with high color constrast themes with big icons themes with extra large and bright icons themes with extra large and extra bold text Join the Mozilla Accessibility Community Live Chat Both 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. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. Purpose Newsgroup Mailing list Google group Developer discussion mozilla.dev.accessibilit...
... good chance to find someone to chat with there, day or night. Newsgroup and Mailing List We have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via Google groups. ...
Add-ons
u can see the APIs currently supported in Firefox and other browsers. Extension Workshop The Firefox Extension Workshop can help you develop extensions for Firefox and give your users simple, yet powerful ways to customize their browsing experience. You'll find: Overview of the Firefox extension features Tools and processes for developing and testing How to publish your extension on addons.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, ...
...We are currently building support for the WebExtensions API on GeckoView. ...
...e 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 development resources. For more information about transition support, please visit our wiki page. Publishing add-ons Addons.mozilla.org, commonly known as "AMO," is Mozilla's official site for developers to list add-ons, and for users to discover them. By uploading your add-on to AMO, you can participate in our community of users and creators and find an audience for your add-on. You are not required to list your add-on on AMO, but your add-on must be signed by Mozilla else users will not be able to install it. For an overv...
Testopia
s like trying to hit a moving target. This decision allows us to focus our time more on releasing new features often and early rather than back porting. However, this means that most major feature will not be back ported to earlier versions unless and until we have time to do so. Anyone wishing to help in this effort is more than welcome. Bugzilla 4.x Mysql 5.0 or PostgreSQL 8.3 Mozilla compatible browser ;-) Additional Perl Modules: Text::CSV XML::Schema Validator XML::Schema::Parser (for importer) and JSON 2.10 TODO User preferences Notification emails More Reports See the Roadmap and Bug List for more details. Links FAQ Wiki Docs Bugs (Please read the Bug Reporting Guide) Official Testopia Blog IRC: #testopi...
... Text::CSV XML::Schema Validator XML::Schema::Parser (for importer) and JSON 2.10 TODO User preferences Notification emails More Reports See the Roadmap and Bug List for more details. ...
...(for importer) and JSON 2.10 TODO User preferences Notification emails More Reports See the Roadmap and Bug List for more details. ...
Debugging JavaScript
It should give pointers to tools, aids and tricks which make debugging your code easier. Web Console This is the first place to go when you're debugging a web page; open the Web console using the Web Console option in the Web Developer menu. This shows any JavaScript errors in your app, as well as any logging calls from the console API. Browser Console The Browser Console lets you see all JavaScript errors and logging in the browser, including from Firefox code. ...
...ilds this also dumps a stack trace to the console, even when the debugger is not running. ...
... ...
Experimental features in Firefox
These nightly builds of Firefox typically include experimental or partially-implemented features, including those for proposed or cutting-edge Web platform standards. This page lists features that are in Nightly versions of Firefox along with information on how to activate them, if necessary. You can test your Web sites and applications before these features get released and ensure everything will still work with the latest Web technology capabilities. To test these experimental features, you need to download Firefox Nightly or Firefox Developer Edition. Which you need is described alongside each feature's description below. ...
...e message indicates that the request was upgraded, instead of showing a warning. Release channel Version added Enabled by default? Nightly 60 No Developer Edition 60 No Beta 60 No Release 60 No Preference name security.mixed_content.upgrade_display_content FTP support disabled For security reasons, Mozilla intends to remove support for FTP from Firefox in 2020, effective in Firefox 82. See bug 1622409 for implementation progress. The network.ftp.enabled preference must be enabled (set to true) to allow FTP to be used. Release channel Version added Enabled by default? Nightly 77 Yes Developer Edition 77 No Beta 77 No Release ...
...ee bug 1622409 for implementation progress. The network.ftp.enabled preference must be enabled (set to true) to allow FTP to be used. Release channel Version added Enabled by default? Nightly 77 Yes Developer Edition 77 No Beta 77 No Release 77 No Preference name network.ftp.enabled Developer tools Mozilla's developer tools are constantly evolving. We experiment with new ideas, add new features, and test them on the Nightly and Developer Edition channels before letting them go through to beta and release. The features below are the current crop of experimental developer tool features. Color scheme simulation Adds an option to simulate different color schemes allowing to test @prefers-color-scheme...
Message manager overview
Window message manager Description There's a window message manager for every browser window: two, in the diagram above. It operates on all content tabs in a given window. If you load a frame s...
... Parent process message manager Description There's one parent process message manager (PPMM) in the parent process for every child process, and its API is oriented to that one child pr...
... ...
Message manager overview
e given script into every <browser> in every browser window. broadcastAsyncMessage() sends the message to every <browser> in every browser window. ...
...y to load a script that executes just once per child process, which is something you might want to do if you are interacting with some global service (for example, adding listeners to observer notifications or registering components). ...
...ing process message managers You can access the global parent process manager with code like this: // parent process let parentProcessMessageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); You can also access it as the ppmm property of Services.jsm. ...
CustomizableUI.jsm
; //this is the html window of the currently selected tab thisWindowsSelectedTabsWindow.alert('alert from html window of selected tab'); thisDOMWindow.alert('alert from xul window'); } }); //end - use CustomizableUI.jsm to create the widget //start - use style sheet service to style our widget to give it an icon Cu.import('resource://gre/modules/Services.jsm'); var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); var css = ''; css += '@-moz-document url("chrome://browser/content/browser.xul") {'; css += ' #id_of_my_widget_within_customizableui_AND_dom {'; css += ' list-style-image: url("chrome://branding/content/icon16.png")'; //a 16px x 16px icon for when in toolbar css += ' }'; css += ' #id_of_my_widget_within_cust...
...should have the same ID as the id property described above, so that CustomizableUI can find the node again later. ...
...UI.createWidget({ id: 'navigator-throbber', //id in cui.jsm // SHOULD match id of that in dom (Line #11) type: 'custom', defaultArea: CustomizableUI.AREA_NAVBAR, onBuild: function(aDocument) { var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem'); var image = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'image'); image.setAttribute('src', 'chrome://branding/content/icon16.png'); var props = { id: 'navigator-throbber', //id in dom // SHOULD match id of that in cui.jsm (Line #2) title: 'Activity Indicator', align: 'center', pack: 'center', mousethrough: 'always', re...
Downloads.jsm
mmary object. Examples Downloading to a local file This example downloads an HTML file without showing progress, handling errors programmatically. Components.utils.import("resource://gre/modules/Downloads.jsm"); Components.utils.import("resource://gre/modules/osfile.jsm") Components.utils.import("resource://gre/modules/Task.jsm"); Task.spawn(function () { yield Downloads.fetch("http://www.mozilla.org/", OS.Path.join(OS.Constants.Path.tmpDir, "example-download.html")); console.log("example-download.html has been downloaded."); }).then(null, Components.utils.reportError); Observing downloads This example logs a message every time a change occurs in one of the global download lists. To demonstrate the logging, a new downloa...
...Close the message to stop."); } finally { yield list.remove(download); yield download.finalize(true); } } finally { yield list.removeView(view); } }).then(null, Components.uti...
...wnload, in a web page). ...
Following the Android Toasts Tutorial from a JNI Perspective
d, see toast documentation. Java code Let's start with the following Java code, which invokes a toast and says "Hello, Firefox!". Context context = getApplicationContext(); CharSequence text = "Hello, Firefox!"; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); NativeWindow code As mentioned earlier, toasts are a very popular feature, so Mozilla developers chose to bring it to the privileged JavaScript scope via the NativeWindow object. The Java code example above can be done with privileged JavaScript from Firefox for Android with the following code: window.NativeWindow.toast.show("Hello, Firefox!", "short"); Converting Java to JNI.jsm The first step is to look at the Java code and see all the different types, methods, constructors,...
...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.LoadClass(my_jenv, SIG.GeckoA...
...s tells us we don't even need the sig for CharSequence in our SIG object, so let's remove it. Final JNI ported code Here's converted code. ...
OS.File for the main thread
}); }; let promise = loop(0); // Enter the loop. promise = promise.then(function onSuccess() { // Once loop is complete, finalize. ...
...ile.writeAtomic to save to disk. var img = new Image(); img.onload = function() { var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); (canvas.toBlobHD || canvas.toBlob).call(canvas, function(b) { var r = Cc['@mozilla.org/files/filereader;1'].createInstance(Ci.nsIDOMFileReader); //new FileReader(); r.onloadend = function() { // r.result contains the ArrayBuffer. var writePath = OS.Path.join(OS.Constants.Path.desktopDir, 'savedImage.png'); var promise = OS.File.writeAtomic(writePath, new Uint8Array(r.result), { tmpPath: writePath + '.tmp' }); promise.then(...
...If the file does not exist, it is created. At the time of this writing, write does not support encoding option so the text to be written has to be encoded with TextEncoder. This example also s...
Localizing extension descriptions
Because a new method for doing so was implemented in Gecko 1.9 (Firefox 3), there are two sets of instructions below. Localizing in Gecko 1.9 Gecko 1.9 includes a new, more robust method for localizing add-on descriptions and other metadata. All of the different descriptions now appear in the install.rdf file using em:localized properties. Each has at least one em:locale property marking the locale that the information should be used for and then all the various strings for the locale. ...
...df file using em:localized properties. Each has at least one em:locale property marking the locale that the information should be used for and then all the various strings for the locale. ...
...ast one em:locale property marking the locale that the information should be used for and then all the various strings for the locale. ...
Localization technical reviews
hnical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress. The technical review process we use for new localizations can be confusing for any trying to start a new localization. We use this review process to perform quality assurance (QA) testing on your L10n efforts. This ensures that every user who downloads your localized Mozilla application receives all of your hard work in a functional product. Each QA review helps us in these ways: Ensures that your L10n work is visible and functional within the Mozilla application. Allows us to understand how each L10n team is performing their localization work. Allows us to discover potential bugs within L10n tools. Overview You've completed most, if not all, of your localiza...
... on technical accuracy and completion of L10n work, not translation quality. is only performed on the first revision a new locale wants to have released to the public. must be approved prior to migrating your revision from Aurora to Beta. Technical review evaluation criteria In principal, a technical review's criteria looks for localization issues common to localizing software but within the Mozilla context. Since it is performed on the first revision a L10n team proposes for release, this first revision requires a very detailed and comprehensive form of review. That being the case, there are some criteria in a technical review that will only ever be considered once, as all reviews after this only evaluate the changes you're adding on top of this revision from release to release. Here is so...
... ...
Basics
hows the i-th step of the multiplication of a matrix A by a vector x (notice how ai1 , ... , ain , x1 are on the same baseline, other alignments are possible): i-th row [ a11 a12 a13 ... a1n : : : ... : ai1 ai2 ai3 ... ain : : : : an1 an2 an3 ... a n n ] [ x1 x2 x3 : xn ] In Mozilla, MathML runs inside the main browser. So it responds to other browser operations such as the zoom (try View -> Text Zoom), and you can do links a 2 + b 2 = c 2 , apply stylistic effects a 2 + b 2 = c 2 , or use color a 2 + b 2 = c 2 in very strange ways p(x) q(x) = a0 + a1x + a2 x2 + ... + an-1 xn-1 b0 + b1x + b2 x2 + ... + bn-1 xn-1 . You ca...
...There are links to more samples, screenshots and instructions on how to download fonts for various platforms. These fonts are required to view other examples beyond the basic constructions illustrated here. MathML Background Image HTML Content <div class="background"></div> <math display="block"> <mrow> <msub> <mi>Z</mi> <mi>&alpha;</mi> </msub> <mrow> <mo>(</...
...>(</mo> <mi>i</mi> <mi>z</mi> <mo stretchy='false'>)</mo> <msup> <mrow> <mo>(</mo> <mo>-</mo> <mi>z</mi> <mo>)</mo> </mrow> <mi>&alpha;</mi> </msup> </mrow> <mrow> <msup> <mi>e</mi> <mrow> <mn>2</mn> <mi>&pi;</mi> <mi>z</mi> </mrow> </msup> <mo>-</mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mi>d</mi> <mi>z</mi> </mrow> </math> CSS Content [class="background"] { background-image: url(http://www.mozilla.org/images/mozilla-banner.gif); opacity: 0.2; position: absolute; left: 0; width: 100%; height: 58px; } ...
MathML Demo: <mtable> - tables and matrices
top ---... 1 22 333 4444 55555 x + 1 666666 a b c 7777777 11 cols arg is"r|c:l". External vertical align is bottom ---... 1 22 333 4444 55555 666666 x 2 a b c 7777777 11 cols arg is "r|cl". MathML doesn't specify how to only display certain sides of the table border, as in "|rcl", but these can be obtained in Mozilla using the 'border' property of CSS, e.g., "|rcl" can be achieved with the CSS declaration "mtable { border-left: solid thin }". Math axis test, using externally aligned arrays inside symmetric fences. ---... [ 1 666666 x 2 c axis ] [ 1 666666 x 2 c center ] + ? 1 55555 x + 1 c bottom ? + ? 1 4444 x c top...
... b b c c c d d d d ] [ a b b c c c d d d d ] . A table with align="axis2" to anchor the table externally w.r.t. the axis of the second row ---... ab ? ? abx yab ? ? ab ...--- , but this is subject to variances due to style changes, e.g., from the scriptlevel. ---... ab ? ? abx yab ? ? ab ...--- . Anyway, this is buggy in Mozilla because what you see above is a fallback to the rendering code used for the baseline case (see below). A table with align="baseline -1" to anchor the table externally w.r.t. the baseline of the last row ---... d+p ( ? ? ? ? ) ...--- , neat isn't it? This would be pretty hard to obtain otherwise. Contrast it with the following which has align="bottom" ---... d+p ( ? ? ? ? ) ...
... to obtain otherwise. Contrast it with the following which has align="bottom" ---... d+p ( ? ? ? ? ) ...--- , and with this one which has align="center -1" ---... d+p ( ? ? ? ? ) ...--- , but note that setting the baseline relative to a particular row is meaningless if the row doesn't have at least one cell with "rowalign=baseline" where to anchor the baseline (in which case Mozilla will behave as if it was align="center#rownumber"). These may sound like gimmicks until you want to get a damping effect such as this ---... ab ab ab ab ab ab , or perhaps the reverse ---... ab ab ab ab ab ab , modulo pixel roundoff errors. Here 'a' and 'b' can be other combinations of possibly irregular boxes. And making floating elements...
Profiling with the Firefox Profiler
ich threads to profile using MOZ_PROFILER_STARTUP_FILTERS, which is a comma separated list. Description of all available environment variables may be printed by starting Firefox with MOZ_PROFILER_HELP=1 set. If you want to profile Firefox for Android, you have to set this environment values by --es option of am command to launch Firefox. This example is for Firefox Nightly (package name is org.mozilla.fennec_aurora), and you have to allow storage access on permission settings before launching it. adb shell am start -n org.mozilla.fennec_aurora/.App \ --es env0 MOZ_PROFILER_STARTUP=1 \ --es env1 MOZ_PROFILER_SHUTDOWN=/sdcard/Download/profiler.json Then, if you select Quit menu, you can collect profiling data to MOZ_PROFILER_SHUTDOWN file. Profiling JS benchmark (xpcshell) To profile ...
...ad/profiler.json Then, if you select Quit menu, you can collect profiling data to MOZ_PROFILER_SHUTDOWN file. Profiling JS benchmark (xpcshell) To profile the script run.js with IonMonkey (-I), type inference (-n) and JaegerMonkey (-m). Thgis requires the following command: $ xpcshell -m -I -n -e ' const Ci = Components.interfaces; const Cc = Components.classes; var profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler); profiler.StartProfiler( 10000000 /* = profiler memory */, 1 /* = sample rate: 100us with patch, 1ms without */, ["stackwalk", "js"], 2 /* = features, and number of features. */ ); ' -f ./run.js -e ' var profileObj = profiler.getProfileData(); print(JSON.stringify(profileObj)); ' | tail -n 1 > run.cleo The xpcshell output...
...refox processes using lldb1. After the process has hung, attach lldb. Type in2, : p (void)profiler_save_profile_to_file("somepath/profile.txt") Clone mstange's handy profile analysis repository. Run: python symbolicate_profile.py somepath/profile.txt To graft symbols into the profile. mstange's scripts do some fairly clever things to get those symbols - if your Firefox was built by Mozilla, then it will retrieve the symbols from the Mozilla symbol server. If you built Firefox yourself, it will attempt to use some cleverness3 to grab the symbols from your binary. Your profile will now, hopefully, be updated with symbols. Upload it for further analysis! I haven't yet had the opportunity to try this, but I hope to next week. I'd be eager to hear people's experience giving this a...
TimerFirings logging
l library and address, which can be post-processed by tools/rb/fix_stacks.py. The following two lines show the output before and after being post-processed by that script. 2088737280[7f606bf68140]: [30710] fn timer (ONE_SHOT 16 ms): [from dladdr] #0: ???[/home/njn/moz/mi1/o64/dist/bin/libxul.so +0x2144f94] 2088737280[7f606bf68140]: [30710] fn timer (ONE_SHOT 16 ms): [from dladdr] #0: mozilla::RefreshDriverTimer::TimerTick(nsITimer*, void*) (/home/njn/moz/mi1/o64/layout/b Third, on other platforms dladdr is not implemented or doesn't work well, and the output will look like the followin. 711637568[7f3219c48000]: [6835] fn timer (ONE_SHOT 16 ms): ???[dladdr is unimplemented or doesn't work well on this OS] The ??? indicates that the function timer lacks an explicit name, ...
...appears, and then print them with the most common ones first. cat out | grep timer | sort | uniq -c | sort -r -n The following is sample output from this command. ...
... # strip process IDs sed 's/ \+[0-9]\+ ms//' # strip timer periods The following is the previous sample output with all three of these commands added into the pipeline. ...
TraceMalloc
TraceMalloc has been superseded by DMD and removed from the codebase. This documentation is only relevant to older versions of the codebase that still contain it. TraceMalloc captures stack traces of all malloc, calloc , realloc, and free calls (this currently covers all operator new and delete calls in Mozilla, too). To enable TraceMalloc in your build, configure with --enable-trace-malloc. The built Mozilla application will support the following additional command-line options: --trace-malloc filename The application will log allocation and deallocation events with stack traces in a binary format to the given file. If filename is -, nothing is written to a file, but TraceMalloc will be active and will track live allocations and their stack traces. --shutdown-leaks=filename On sh...
...her, attributing malloc blame up and down each graph. Bloatblame accumulates allocation counts and ignores free calls. If you run with --trace-malloc -, your code can call NS_TraceMallocDumpAllocations(pathname) at opportune times, and a human-readable listing of the current heap, including stack traces for every allocation, will be written to pathname. ...
... pointers that are nulled out by destructors may show up in leaksoup as cycles. However, despite that, it is probably the easiest way to determine what leak roots are present. Run using both the --trace-malloc and --shutdown-leaks options. Ignore the allocations log, and run leaksoup over the memory dump (which is a dump of all allocations still live at shutdown) with a command such as ./run-mozilla.sh ./leaksoup sdleak.log > sdleak.html. This generates a large HTML file as output. The output of leaksoup begins with all the leak roots, and then lists all the non-root allocations. The roots are either listed as single objects or as strongly connected components (minimal sets of nodes in the graph in which any node is reachable from all other nodes). (A strongly connected component with o...
Preferences
The preference system makes it possible to store data for Mozilla applications using a key/value pairing system. These articles provide information about how to use the preference system. Documentation Preferences system An introduction to using the preference system in Mozilla. XUL School: Handling preferences The XUL School tutorial chapter on preferences. Mozilla preference reference A reference guide to all Mozilla preferences; currently a work in progress. 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 Firef...
...references 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 snippets. Adding preferences to an extension How to add preferences ...
...s A guide to preferences that only truly elite geeks should play with. Examples Code snippets Preference-related code snippets. Adding preferences to an extension How to add preferences to an existing extension. Related Topics XUL, JavaScript, XPCOM, Extensions, Developing Mozilla ...
Patches and pushes
nical aspects behind productization by creating a productization patch. Below you'll find instructions on creating a patch and pushing it to your repository. Patchify Search plugins are found in browser/searchplugins. Each plugin is stored as an XML file, with list.txt containing the names of each plugin. Here is an example search plugin file using French Yahoo. ...
...'s XML filename (without extensions) on a new line and save. Note that if your team selects a local version of an already default plugin (e.g., Wikipedia), the XML filename should include the locale code (e.g., Wikipedia-es). Create a patch of the searchplugins directory by entering the following command in your command-line tool, where mypatch.diff is where you give your patch a name: $ hg add mozilla/browser/searchplugins/ $ hg diff mozilla/browser/searchplugins/ > mypatch.diff Attach your patch file to the bug by clicking the "Add an attachment" link. Once attached and labeled as a patch, open the attachment details. In the attachment details, select the ? from the dropdown menu next to the review flag. This will display a text box to assign the review to someone. Enter :flod as the Req...
... you have reviewed. Use a commit message that mentions the bug number, describes the change, and mentions the reviewer. For example: hg ci -m "bug 654321, copied the comment from the doc without reading, r=nobody" path-to-changed-files Close the bug, copying the url to your change in the closing comment. Write up something like this for your comment: Landed this on aurora, http://hg.mozilla.org/releases/l10n/mozilla-aurora/ab-CD/rev/adfe1234feac, marking FIXED. Update your sign-offs on the l10n dashboard to include the change into the next release. And that's it! It can be considered a bit complicated at first, but after you do it the first time, it gets easier and easier after that :-) ...
Research and prep
ess, as it goes beyond string translation. We believe that localization teams are in the best position to provide recommendations on what local providers we can use for web services because you're in the market, work in the language, and know your users. This is, therefore, meant to be a guideline for how you should be formulating your recommendations. Here's the basic process: File a bug under Mozilla Localizations>[your_locale] to request updates to your locale's productization preferences. If this is your first localization for a product, the l10n drivers will file this bug as part of the new product localization release process. It is your l10n team's responsibility to perform research and identify the most appropriate web services for your region and present them in your bug as your infor...
...ences. If this is your first localization for a product, the l10n drivers will file this bug as part of the new product localization release process. It is your l10n team's responsibility to perform research and identify the most appropriate web services for your region and present them in your bug as your informed recommendations. If there's no existing collaboration with the site provider and Mozilla, ask for permission from the site provider to include it. Ensure that your suggestions follow these parameters: Search There are typically five search plug-ins listed for Firefox desktop (only four for Firefox mobile): Generic search The default option should expose the quickest path to the best result on the world wide web for the user (indexing a large portion of the global www). ...
...two. Specific interest search Where users are using popular search engines to search more specific areas of interest that are very popular in your language or locale. There should be no more than two. In all cases, user experience should be taken into account and given preference for what is desired in that language/locale. If you have questions about what that means, please contact milos@mozilla.com or Milos on IRC. RSS Readers and Content handlers Productization for RSS readers and content handlers applies only to Firefox desktop. Your selections for default RSS readers and content handlers should follow these guidelines: Be translated in your language (because it makes the application unusable if it's not in your language Provide for the intended user experience (e.g., minimal to n...
Crash reporting
If you want to find a specific crash that you submitted, you first need to find the Crash ID that the server has assigned your crash. Type about:crashes into your location bar to get a page listing both submitted and unsubmitted crash reports. ...
...If you want to find a specific crash that you submitted, you first need to find the Crash ID that the server has assigned your crash. Type about:crashes into your location bar to get a page listing both submitted and unsubmitted crash reports. ...
...out:crashes into your location bar to get a page listing both submitted and unsubmitted crash reports. For more information, see How to get a stacktrace for a bug report. Reports and queries crash-stats has built-in reports of "topcrashes" for each release grouped by signature. There is also a custom query tool which allows users to limit searches on more precise information. Finally, a set of Mozilla employees have access to directly query the underlying data in either SQL summary or using mapreduce on the storage cluster. If you are interested in obtaining this advanced access, contact Gabriele Svelto. See also Understanding crash reports A guide to searching crash reports crash-stats Crash pings (Telemetry) and crash reports (Socorro/Crash Stats) Building Firefox with Debug Symbols ...
McCoy
McCoy is an application that allows add-on authors to provide secure updates to their users. Applications periodically look for and install updates to their add-ons. It's important that the update information retrieved has not been tampered with since being written by the add-on author. Specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels. ...
...To uninstall McCoy simply delete the applications files. The cryptographic keys and other McCoy data are kept in a profile folder separate from the application so you can uninstall and reinstall without losing your precious keys. Backing up data If you need to backup your data or move it from one machine to another you need to take a copy of the profile folder. This is located in: %APPDATA%\Mozilla\McCoy (Windows) ~/.mozilla/mccoy (Linux) ~/Library/Application Support/McCoy (Mac OS X) It is highly recommended that you back up your profile folder and store it in a safe location whenever you create a new key; without a backup, there is no way to recover your private keys if they are lost! Running McCoy To run McCoy simply run the mccoy executable (or the McCoy application on OS X). The ...
...This is in the form of the public part of a cryptographic key included in the original add-on you release. The first step is to create a cryptographic key. Simply click the "Create" toolbar butt...
NSPR Contributor Guide
eject contributions for a variety of reasons. Some of these reasons are not obvious to an outside observer. NSPR wishes to document some guidelines for those who would contribute to NSPR. These guidelines should help the contributor in crafting his contribution, increasing its likelihood for acceptance. General Guidelines Downward Compatibility Because many different applications, besides the mozilla client, use the NSPR API, the API must remain downward compatible across even major releases. This means that the behavior of an existing public API item in NSPR cannot change. Should you need to have a similar API, with some slightly different behavior or different function prototype, then suggest a new API with a different name. C Language API The NSPR API is a C Language API. Please do not ...
...some general guidelines to use when implementing new features: Don't export global variables Your code must be thread safe You must provide test cases that test all APIs you are adding. See: [#TestCases Test Cases] New Libraries All the guidelines applicable to [#NewFeatures New Features] applies to new libraries. For purposes of this paper, a "new library" is defined as a libary under the mozilla/nsprpub/lib directory tree and built as a separate library. These libraries exist, for the most part, as "legacy" code from NSPR 1.0. [Note that the current NSPR module owners do not now nor never have been involved with NSPR 1.0.]. Such is life. That said: There are some libraries that implement functions intended for use with applications using NSPR, such as ...nsprpub/lib/libc/plgetopt.*. ge...
...d/platform/*.c make rules in config/_platform.mk Documentation The files for NSPR's documentation are maintained using a proprietary word processing system [don't ask]. Document your work as described in [#NewFeatures New Features]. Use the style of other NSPR documentation. We will see that your documentation is transcribed into the appropriate word processor and the derived HTML shows up on mozilla.org Test Cases You should provide test cases for all new features and new libraries. Give consideration to providing a test case when fixing a bug if an existing test case did not catch a bug it should have caught. The new test cases should be implemented in the style of other NSPR test cases. Test cases should prove that the added API items work as advertized. Test cases should serve as an ex...
NSS 3.12.5 release_notes
NSS 3.12.5 release notes 2009-12-02 Newsgroup: mozilla.dev.tech.crypto Introduction Network Security Services (NSS) 3.12.5 is a patch release for NSS 3.12. The bug fixes in NSS 3.12.5 are described in the "Bugs Fixed" section below. NSS 3.12.5 is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. Distribution Information The CVS tag for the NSS 3.12.5 release is NSS_3_12_5_RTM. NSS 3.12.5 requires NSPR 4.8. You can check out the source from CVS by cvs co -r NSPR_4_8_RTM NSPR cvs co -r NSS_3_12_5_RTM NSS See the Documentation section for the build instructions. NSS 3.12.5 source is also available on ftp.mozilla.org for secure HTTPS download: Source tarball: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_5_RTM/src/. New in NSS 3.12.5 SSL3 & ...
...ncodeDERSubjectPublicKeyInfo and PK11_DEREncodePublicKey are duplicate Bug 522510: Add deprecated comments to key.h and pk11func.h Bug 522580: NSS uses PORT_Memcmp for comparing secret data. Bug 525056: Timing attack against ssl3ext.c:ssl3_ServerHandleSessionTicketXtn() Bug 526689: SSL3 & TLS Renegotiation Vulnerability Documentation For a list of the primary NSS documentation pages on mozilla.org, see NSS Documentation. New and revised documents available since the release of NSS 3.11 include the following: Build Instructions NSS Shared DB Compatibility NSS 3.12.5 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.12.5 shared libraries without recompiling or relinking. ...
...braries. A program linked with older NSS 3.x shared libraries will work with NSS 3.12.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with mozilla.org Bugzilla (product NSS). This document was generated by genma teruaki on November 28, 2010 using texi2html 1.82. ...
NSS 3.14.1 release notes
Introduction Network Security Services (NSS) 3.14.1 is a patch release for NSS 3.14. The bug fixes in NSS 3.14.1 are described in the "Bugs Fixed" section below. NSS 3.14.1 is licensed under the MPL 2.0. Distribution Information The CVS tag is NSS_3_14_1_RTM. NSS 3.14.1 requires NSPR 4.9.4 or newer. NSS 3.14.1 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_1_RTM/src/ New in NSS 3.14.1 New Functionality NSS now has the ability to create signed OCSP responses. The ability to create signed OCSP responses has been added in NSS 3.14.1. Note that this code is used primarily for purposes of testing. New Functions in ocspt.h CE...
...ac OS X, the NSS shared libraries will now only export the public NSS functions. Bug 810582 - TLS False Start is now only used with servers that negotiate a cipher suite that supports forward secrecy. Note: The criteria for False Start may change again in future NSS releases. Bugs fixed in NSS 3.14.1 The following Bugzilla query returns all of the bugs fixed in NSS 3.14.1: https://bugzilla.mozilla.org/buglist.cgi?list_id=5216669;resolution=FIXED;query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;target_milestone=3.14.1;product=NSS Compatability NSS 3.14.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.1 shared libraries without recompiling or relinking. Furthermore, ap...
... ...
NSS 3.14.3 release notes
Introduction Network Security Services (NSS) 3.14.3 is a patch release for NSS 3.14. The bug fixes in NSS 3.14.3 are described in the "Bugs Fixed" section below. Distribution Information The CVS tag is NSS_3_14_3_RTM. NSS 3.14.3 requires NSPR 4.9.5 or newer. NSS 3.14.3 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_3_RTM/src/ New in NSS 3.14.3 New Functionality No new major functionality is introduced in this release. This release is a patch release to address CVE-2013-1620. New Functions in pk11pub.h PK11_SignWithSymKey - Similar to PK11_Sign, performs a signing operation in a single operation. However, unlike PK11_Sign, which uses a SEC...
...al Holloway, University of London) for responsibly disclosing the issue by providing advance copies of their research. In addition, thanks to Adam Langley (Google) for the development of a mitigation for the issues raised in the paper, along with Emilia Kasper and Bodo Moller (Google) for assisting in the review and improvements to the initial patches. Bugs fixed in NSS 3.14.3 https://bugzilla.mozilla.org/buglist.cgi?list_id=5689256;resolution=FIXED;classification=Components;query_format=advanced;target_milestone=3.14.3;product=NSS Compatibility NSS 3.14.3 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.3 shared libraries without recompiling or relinking. Furthermore, applications th...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.14.4 release notes
Introduction Network Security Services (NSS) 3.14.4 is a patch release for NSS 3.14. The bug fixes in NSS 3.14.4 are described in the "Bugs Fixed" section below. Distribution Information The CVS tag is NSS_3_14_4_RTM. NSS 3.14.4 requires NSPR 4.9.5 or newer. NSS 3.14.4 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_4_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.14.4. Users are encouraged to upgrade immediately. Bug 894370 - (CVE-2013-1739) Avoid uninitialized data read in the event of a decryption failure. New in NSS 3.14.4 New Functionality No new major functionality is introduced in this release. Th...
...rity-relevant bugs have been resolved in NSS 3.14.4. Users are encouraged to upgrade immediately. Bug 894370 - (CVE-2013-1739) Avoid uninitialized data read in the event of a decryption failure. New in NSS 3.14.4 New Functionality No new major functionality is introduced in this release. This release is a patch release to address CVE-2013-1739. Bugs fixed in NSS 3.14.4 https://bugzilla.mozilla.org/buglist.cgi?bug_id=894370%2C832942%2C863947&bug_id_type=anyexact&list_id=8338081&resolution=FIXED&classification=Components&query_format=advanced&product=NSS Compatibility NSS 3.14.4 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.4 shared libraries without recompiling or relinking.
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.14.5 release notes
Introduction Network Security Services (NSS) 3.14.5 is a patch release for NSS 3.14. The bug fixes in NSS 3.14.5 are described in the "Bugs Fixed" section below. Distribution Information The CVS tag is NSS_3_14_5_RTM. NSS 3.14.5 requires NSPR 4.9.5 or newer. NSS 3.14.5 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_5_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.14.5. Users are encouraged to upgrade immediately. Bug 934016 - (CVE-2013-5605) Handle invalid handshake packets New in NSS 3.14.5 New Functionality No new major functionality is introduced in this release. This release is a patch release to address...
...Security Advisories The following security-relevant bugs have been resolved in NSS 3.14.5. Users are encouraged to upgrade immediately. Bug 934016 - (CVE-2013-5605) Handle invalid handshake packets New in NSS 3.14.5 New Functionality No new major functionality is introduced in this release. This release is a patch release to address CVE-2013-5605. Bugs fixed in NSS 3.14.5 https://bugzilla.mozilla.org/buglist.cgi?bug_id=934016&bug_id_type=anyexact&resolution=FIXED&classification=Components&query_format=advanced&product=NSS Compatibility NSS 3.14.5 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.5 shared libraries without recompiling or relinking. Furthermore, applications that re...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.14.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.15.1 release notes
Introduction Network Security Services (NSS) 3.15.1 is a patch release for NSS 3.15. The bug fixes in NSS 3.15.1 are described in the "Bugs Fixed" section below. Distribution Information NSS 3.15.1 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/ New in NSS 3.15.1 New Functionality TLS 1.2: TLS 1.2 (RFC 5246) is supported. HMAC-SHA256 cipher suites (RFC 5246 and RFC 5289) are supported, allowing TLS to be used without MD5 and SHA-1. Note the following limitations. The hash function used in the signature for TLS 1.2 client authentication must be the hash function of the TLS 1.2 PRF, which is always SHA-256 in NSS 3.15.1. AES GCM...
...token delay, leading to spurious failures. Bug 884072 - Fix a typo in the header include guard macro of secmod.h. Bug 876352 - certutil now warns if importing a PEM file that contains a private key. Bug 565296 - Fix the bug that shlibsign exited with status 0 even though it failed. The NSS_SURVIVE_DOUBLE_BYPASS_FAILURE build option is removed. Bugs fixed in NSS 3.15.1 https://bugzilla.mozilla.org/buglist.cgi?list_id=5689256;resolution=FIXED;classification=Components;query_format=advanced;target_milestone=3.15.1;product=NSS Compatibility NSS 3.15.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.1 shared libraries without recompiling or relinking. Furthermore, applications th...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.15.3.1 release notes
Introduction Network Security Services (NSS) 3.15.3.1 is a patch release for NSS 3.15. The bug fixes in NSS 3.15.3.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_15_3_1_RTM. NSS 3.15.3.1 requires NSPR 4.10.2 or newer. NSS 3.15.3.1 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_3_1_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.15.3.1. Users are encouraged to upgrade immediately. Bug 946351 - Misissued Google certificates from DCSSI New in NSS 3.15.3.1 New Functionality No new major functionality is introduced in this release. This is a patch release to revoke tr...
...5.3.1 New Functionality No new major functionality is introduced in this release. This is a patch release to revoke trust of a subordinate CA certificate that was mis-used to generate a certificate used by a network appliance. Bugs fixed in NSS 3.15.3.1 Bug 946351 - Misissued Google certificates from DCSSI A complete list of all bugs resolved in this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&target_milestone=3.15.3.1&product=NSS Compatibility NSS 3.15.3.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.3.1 shared libraries without recompiling or relinking. Furthermore, applications that restric...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.3.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.15.3 release notes
Introduction Network Security Services (NSS) 3.15.3 is a patch release for NSS 3.15. The bug fixes in NSS 3.15.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_15_3_RTM. NSS 3.15.3 requires NSPR 4.10.2 or newer. NSS 3.15.3 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_3_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.15.3. Users are encouraged to upgrade immediately. Bug 925100 - (CVE-2013-1741) Ensure a size is <= half of the maximum PRUint32 value Bug 934016 - (CVE-2013-5605) Handle invalid handshake packets Bug 910438 - (CVE-2013-5606) Return the correct resul...
...nctionality is introduced in this release. This release is a patch release to address CVE-2013-1741, CVE-2013-5605 and CVE-2013-5606. Bugs fixed in NSS 3.15.3 Bug 850478 - List RC4_128 cipher suites after AES_128 cipher suites Bug 919677 - Don't advertise TLS 1.2-only ciphersuites in a TLS 1.1 ClientHello A complete list of all bugs resolved in this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&target_milestone=3.15.3&product=NSS Compatibility NSS 3.15.3 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.15.4 release notes
Introduction Network Security Services (NSS) 3.15.4 is a patch release for NSS 3.15. The bug fixes in NSS 3.15.4 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_15_4_RTM. NSS 3.15.4 requires NSPR 4.10.2 or newer. NSS 3.15.4 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_4_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.15.4. Users are encouraged to upgrade immediately. Bug 919877 - (CVE-2013-1740) When false start is enabled, libssl will sometimes return unencrypted, unauthenticated data from PR_Recv New in NSS 3.15.4 New Functionality Implemented OCSP querying us...
...se start. In addition to enabling the SSL_ENABLE_FALSE_START option, an application must now register a callback using the SSL_SetCanFalseStartCallback function. When building on Windows, OS_TARGET now defaults to WIN95. To use the WINNT build configuration, specify OS_TARGET=WINNT. Bugs fixed in NSS 3.15.4 A complete list of all bugs resolved in this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&target_milestone=3.15.4&product=NSS Compatibility NSS 3.15.4 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.15.5 release notes
Introduction Network Security Services (NSS) 3.15.5 is a patch release for NSS 3.15. The bug fixes in NSS 3.15.5 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_15_5_RTM. NSS 3.15.5 requires NSPR 4.10.2 or newer. NSS 3.15.5 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_5_RTM/src/ New in NSS 3.15.5 New Functionality Added support for the TLS application layer protocol negotiation (ALPN) extension. Two SSL socket options, SSL_ENABLE_NPN and SSL_ENABLE_ALPN, can be used to control whether NPN or ALPN (or both) should be used for application layer protocol negotiation. Added the TLS padding extension. The extensio...
...ent (an array of PRIOVec structures) of ssl_WriteV (called via PR_Writev). Applications should still take care when converting struct iov to PRIOVec because the iov_len members of the two structures have different types (size_t vs. int). size_t is unsigned and may be larger than int. Bugs fixed in NSS 3.15.5 A complete list of all bugs resolved in this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&target_milestone=3.15.5&product=NSS Compatibility NSS 3.15.5 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.15.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16.4 release notes
Introduction Network Security Services (NSS) 3.16.4 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.4 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_4_RTM. NSS 3.16.4 requires NSPR 4.10.6 or newer. NSS 3.16.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_4_RTM/src/ New in NSS 3.16.4 This release consists primarily of CA certificate changes as listed below, and includes a small number of bug fixes. Notable Changes in NSS 3.16.4 The following 1024-bit root CA certificate was restored to allow more time to develop a better transition strategy for affected sites. It was removed in NSS 3.16.3, but discussi...
...rg/security/nss/releases/NSS_3_16_4_RTM/src/ New in NSS 3.16.4 This release consists primarily of CA certificate changes as listed below, and includes a small number of bug fixes. Notable Changes in NSS 3.16.4 The following 1024-bit root CA certificate was restored to allow more time to develop a better transition strategy for affected sites. It was removed in NSS 3.16.3, but discussion in the mozilla.dev.security.policy forum led to the decision to keep this root included longer in order to give website administrators more time to update their web servers. CN = GTE CyberTrust Global Root SHA1 Fingerprint: 97:81:79:50:D8:1C:96:70:CC:34:D8:09:CF:79:44:31:36:7E:F4:74 In NSS 3.16.3, the 1024-bit "Entrust.net Secure Server Certification Authority" root CA certificate...
...24-bit Entrust.net root certificate. ...
NSS 3.17.1 release notes
Introduction Network Security Services (NSS) 3.17.1 is a patch release for NSS 3.17. The bug fixes in NSS 3.17.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_17_1_RTM. NSS 3.17.1 requires NSPR 4.10.7 or newer. NSS 3.17.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_1_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.17.1. Users are encouraged to upgrade immediately. Bug 1064636 - (CVE-2014-1568) RSA Signature Forgery in NSS. See also MFSA 2014-73 for details. New in NSS 3.17.1 This patch release adds new functionality and fixes a bug that caused NSS to accep...
...proto.h TLS_FALLBACK_SCSV - a a signaling cipher suite value that indicates a handshake is the result of TLS version fallback. Notable Changes in NSS 3.17.1 Signature algorithms now use SHA-256 instead of SHA-1 by default. Added support for Linux on little-endian powerpc64. ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.17.2 release notes
Introduction Network Security Services (NSS) 3.17.2 is a patch release for NSS 3.17. The bug fixes in NSS 3.17.2 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_17_2_RTM. NSS 3.17.2 requires NSPR 4.10.7 or newer. NSS 3.17.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_2_RTM/src/ New in NSS 3.17.2 New Functionality No new functionality is introduced in this release. This is a patch release to fix a regression and other bugs. Notable Changes in NSS 3.17.2 Bug 1049435: Change RSA_PrivateKeyCheck to not require p > q. This fixes a regression introduced in NSS 3.16.2 that prevented NSS from importing some RSA private ke...
...161: Check that an imported elliptic curve public key is valid. Previously NSS would only validate the peer's public key before performing ECDH key agreement. Now EC public keys are validated at import time. Bug 1078669: certutil crashes when an argument is passed to the --certVersion option. Bugs fixed in NSS 3.17.2 This Bugzilla query returns all the bugs fixed in NSS 3.17.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.17.2 Compatibility NSS 3.17.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.17.3 release notes
Introduction Network Security Services (NSS) 3.17.3 is a patch release for NSS 3.17. The bug fixes in NSS 3.17.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_17_3_RTM. NSS 3.17.3 requires NSPR 4.10.7 or newer. NSS 3.17.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_3_RTM/src/ New in NSS 3.17.3 New Functionality Support for TLS_FALLBACK_SCSV has been added to the ssltap and tstclnt utilities. Notable Changes in NSS 3.17.3 The QuickDER decoder now decodes lengths robustly (CVE-2014-1569). The following CA certificates were Removed CN = GTE CyberTrust Global Root SHA1 Fingerprint: 97:8...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.17.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.17.4 release notes
Introduction Network Security Services (NSS) 3.17.4 is a patch release for NSS 3.17. The bug fixes in NSS 3.17.4 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_17_4_RTM. NSS 3.17.4 requires NSPR 4.10.7 or newer. NSS 3.17.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_4_RTM/src/ New in NSS 3.17.4 New Functionality No new functionality is introduced in this release. This is a patch release to fix multiple bugs. Notable Changes in NSS 3.17.4 Bug 1084986: If an SSL/TLS connection fails, because client and server don't have any common protocol version enabled, NSS has been changed to report error code SSL_ERR...
... the newest certificate, if multiple certificates match. Bug 1094492: fixed a memory corruption issue during failure of keypair generation. Bug 1113632: fixed a failure to reload a PKCS#11 module in FIPS mode. Bug 1119983: fixed interoperability of NSS server code with a LibreSSL client. Bugs fixed in NSS 3.17.4 This Bugzilla query returns all the bugs fixed in NSS 3.17.4: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.17.4 Compatibility NSS 3.17.4 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.17.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.18 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.18, which is a minor release. Distribution Information The HG tag is NSS_3_18_RTM. NSS 3.18 requires NSPR 4.10.8 or newer. NSS 3.18 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_18_RTM/src/ New in NSS 3.18 New Functionality When importing certificates and keys from a PKCS#12 source, it's now possible to override the nicknames, prior to importing them into the NSS database, using new API SEC_PKCS12DecoderRenameCertNicknames. The tstclnt test utility program has new command-line options -C, -D, -b and -R. Use -C one, two or three times to print information about the certificates rece...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.18 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.18 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.1 release notes
Introduction Network Security Services (NSS) 3.19.1 is a security release for NSS 3.19. The bug fixes in NSS 3.19.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_19_1_RTM. NSS 3.19.1 requires NSPR 4.10.8 or newer. NSS 3.19.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_1_RTM/src/ Security Fixes in NSS 3.19.1 Bug 1138554 / CVE-2015-4000 - The minimum strength of keys that libssl will accept for finite field algorithms (RSA, Diffie-Hellman, and DSA) have been increased to 1023 bits. New in NSS 3.19.1 New Functionality No new functionality is introduced in this release. This patch release includes a fix f...
...L_GetChannelInfo. The minimum size of keys that NSS will generate, import, or use has been raised: The minimum modulus size for RSA keys is now 512 bits The minimum modulus size for DSA keys is now 1023 bits The minimum modulus size for Diffie-Hellman keys is now 1023 bits Bugs fixed in NSS 3.19.1 This Bugzilla query returns all the bugs fixed in NSS 3.19.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.19.1 Acknowledgements The NSS development team would like to thank Matthew Green and Karthikeyan Bhargavan for responsibly disclosing the issue in bug 1138554. Compatibility NSS 3.19.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked...
... ...
NSS 3.19.2 release notes
Introduction Network Security Services (NSS) 3.19.2 is a patch release for NSS 3.19 that addresses compatibility issues in NSS 3.19.1. Distribution Information The HG tag is NSS_3_19_2_RTM. NSS 3.19.2 requires NSPR 4.10.8 or newer. NSS 3.19.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_RTM/src/ New in NSS 3.19.2 New Functionality No new functionality is introduced in this release. Notable Changes in NSS 3.19.2 Bug 1172128 - In NSS 3.19.1, the minimum key sizes that the freebl cryptographic implementation (part of the softoken cryptographic module used by default by NSS) was willing to generate or use was increased - for RSA keys, to 512 bits, and ...
...moved to libssl, and will now only affect the minimum keystrengths used in SSL/TLS. Note: Future versions of NSS may increase the minimum keysizes required by the freebl module. Consumers of NSS are strongly encouraged to migrate to stronger cryptographic strengths as soon as possible. Bugs fixed in NSS 3.19.2 This Bugzilla query returns all the bugs fixed in NSS 3.19.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.19.2 Compatibility NSS 3.19.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.3 release notes
Introduction Network Security Services (NSS) 3.19.3 is a patch release for NSS 3.19. The bug fixes in NSS 3.19.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_19_3_RTM. NSS 3.19.3 requires NSPR 4.10.8 or newer. NSS 3.19.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_3_RTM/src/ New in NSS 3.19.3 No new functionality is introduced in this release. This is a patch release to update the list of root CA certificates. Notable Changes in NSS 3.19.3 The following CA certificates were Removed CN = Buypass Class 3 CA 1 SHA1 Fingerprint: 61:57:3A:11:DF:0E:D8:7E:D5:92:65:22:EA:D0:56:D7:44:B3:23:71 ...
...A program linked with older NSS 3.19 shared libraries will work with NSS 3.19.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict t...
...s. A program linked with older NSS 3.19 shared libraries will work with NSS 3.19.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.19, which is a minor security release. Distribution Information The HG tag is NSS_3_19_RTM. NSS 3.19 requires NSPR 4.10.8 or newer. NSS 3.19 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_RTM/src/ Security Fixes in NSS 3.19 Bug 1086145 / CVE-2015-2721 - Fixed a bug related to the ordering of TLS handshake messages. This was also known as SMACK. New in NSS 3.19 New Functionality For some certificates, such as root CA certificates that don't embed any constraints, NSS might impose additional constraints such as name constraints. A new API (CERT_GetImposedNameConstraints) has been...
... more strictly validates TLS extensions and will fail a handshake that contains malformed extensions (bug 753136). In TLS 1.2 handshakes, NSS advertises support for the SHA512 hash algorithm in order to be compatible with TLS servers that use certificates with a SHA512 signature (bug 1155922). Bugs fixed in NSS 3.19 This Bugzilla query returns all the bugs fixed in NSS 3.19: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.19 Acknowledgements The NSS development team would like to thank Karthikeyan Bhargavan from INRIA for responsibly disclosing the issue in bug 1086145. Compatibility NSS 3.19 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.19 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.20 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.20, which is a minor release. Distribution Information The HG tag is NSS_3_20_RTM. NSS 3.20 requires NSPR 4.10.8 or newer. NSS 3.20 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_20_RTM/src/ New in NSS 3.20 New Functionality The TLS library has been extended to support DHE ciphersuites in server applications. New Functions in ssl.h SSL_DHEGroupPrefSet - Configure the set of allowed/enabled DHE group parameters that can be used by NSS for a server socket. SSL_EnableWeakDHEPrimeGroup - Enable the use of weak DHE group parameters that are smaller than default minimum size o...
...additional details. The size of the default PQG parameters used by certutil when creating DSA keys has been increased to use 2048 bit parameters. The selfserv utility has been enhanced to support the new DHE features. NSS no longer supports C compilers that predate the ANSI C standard (C89). Bugs fixed in NSS 3.20 This Bugzilla query returns all the bugs fixed in NSS 3.20: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.20 Compatibility NSS 3.20 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.20 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...aries. A program linked with older NSS 3.x shared libraries will work with NSS 3.20 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report at bugzilla.mozilla.org (product NSS). ...
NSS 3.21 release notes
s page has been updated to include additional information about the release. The sections "Security Fixes" and "Acknowledgements" have been added. Introduction The NSS team has released Network Security Services (NSS) 3.21, which is a minor release. Distribution Information The HG tag is NSS_3_21_RTM. NSS 3.21 requires NSPR 4.10.10 or newer. NSS 3.21 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_RTM/src/ Security Fixes in NSS 3.21 Bug 1158489 / CVE-2015-7575 - Prevent MD5 Downgrade in TLS 1.2 Signatures. New in NSS 3.21 New Functionality certutil now supports a --rename option to change a nickname (bug 1142209) TLS extended master secret extension (RFC 7...
... Compatibility NSS 3.21 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.21 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.22 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.22, which is a minor release. Distribution Information The HG tag is NSS_3_22_RTM. NSS 3.22 requires NSPR 4.11 or newer. NSS 3.22 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_22_RTM/src/ New in NSS 3.22 New Functionality RSA-PSS signatures are now supported (bug 1215295) New functions PK11_SignWithMechanism() and PK11_SignWithMechanism() are provided to allow RSA keys to be used with PSS. Pseudorandom functions based on hashes other than SHA-1 are now supported with PBKDF (bug 554827). PK11_CreatePBEV2AlgorithmID() now supports SEC_OID_PKCS5_PBKDF2 with cipherAlgTa...
...N_SSL in ssl.h SSL_ENABLE_SIGNED_CERT_TIMESTAMPS in sslt.h SSL_MAX_EXTENSIONS is updated to 13 Notable Changes in NSS 3.22 NSS C++ tests are built by default, requiring a C++11 compiler. Set the NSS_DISABLE_GTESTS variable to 1 to disable building these tests. Bugs fixed in NSS 3.22 This Bugzilla query returns all the bugs fixed in NSS 3.22: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.22 Compatibility NSS 3.22 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.22 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.22 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.23 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.23, which is a minor release. Distribution Information The HG tag is NSS_3_23_RTM. NSS 3.23 requires NSPR 4.12 or newer. NSS 3.23 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_23_RTM/src/ New in NSS 3.23 New Functionality ChaCha20/Poly1305 cipher and TLS cipher suites now supported (bug 917571, bug 1227905) Experimental-only support TLS 1.3 1-RTT mode (draft-11). This code is not ready for production use. New Functions in ssl.h SSL_SetDowngradeCheckVersion - Set maximum version for new ServerRandom anti-downgrade mechanism. Clients that perform a version downgrade (w...
...S 3.23 Bug 1245528 / CVE-2016-1950 - Fixed a heap-based buffer overflow related to the parsing of certain ASN.1 structures. An attacker could create a specially-crafted certificate which, when parsed by NSS, would cause a crash or execution of arbitrary code with the permissions of the user. Bugs fixed in NSS 3.23 This Bugzilla query returns all the bugs fixed in NSS 3.23: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.23 Acknowledgements The NSS development team would like to thank security researcher Francis Gabriel for responsibly disclosing the issue in Bug 1245528. Compatibility NSS 3.23 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with ol...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.23 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.24 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.24, which is a minor release. Distribution information The hg tag is NSS_3_24_RTM. NSS 3.24 requires Netscape Portable Runtime (NSPR) 4.12 or newer. NSS 3.24 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_24_RTM/src/ New in NSS 3.24 NSS 3.24 includes two NSS softoken updates, a new function to configure SSL/TLS server sockets, and two functions to improve the use of temporary arenas. New functionality NSS softoken has been updated with the latest National Institute of Standards and Technology (NIST) guidance (as of 2015): Software integrity checks and POST functions are executed...
... the symbol NSS_ALLOW_SSLKEYLOGFILE when building NSS. Update NSS to protect it against the Cachebleed attack. Disable support for DTLS compression. Improve support for TLS 1.3. This includes support for DTLS 1.3. Note that TLS 1.3 support is experimental and not suitable for production use. Bugs fixed in NSS 3.24 This Bugzilla query returns all the bugs fixed in NSS 3.24: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.24 Acknowledgements The NSS development team would like to thank Yuval Yarom for responsibly disclosing the Cachebleed attack by providing advance copies of their research. Compatibility NSS 3.24 shared libraries are backward-compatible with all older NSS 3.x shared libraries. A pro...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.24 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.25 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.25, which is a minor release. Distribution information The hg tag is NSS_3_25_RTM. NSS 3.25 requires Netscape Portable Runtime (NSPR) 4.12 or newer. NSS 3.25 source distributions are available on ftp.mozilla.org for secure HTTPS download at the following location. Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_25_RTM/src/ New in NSS 3.25 New Functionality Implemented DHE key agreement for TLS 1.3. Added support for ChaCha with TLS 1.3. Added support for TLS 1.2 ciphersuites that use SHA384 as the PRF. Removed the limitation that allowed NSS to only support certificate_verify messages that used the same signature hash algorithm as the PRF when using TLS 1.2 clien...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.25 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.25 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.27 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.27, which is a minor release. Distribution information The hg tag is NSS_3_27_RTM. NSS 3.27 requires Netscape Portable Runtime (NSPR) 4.13 or newer. NSS 3.27 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_RTM/src/ New in NSS 3.27 New Functionality Allow custom named group priorities for TLS key exchange handshake (SSL_NamedGroupConfig). Added support for RSA-PSS signatures in TLS 1.2 and TLS 1.3 New Functions in ssl.h SSL_NamedGroupConfig Notable Changes in NSS 3.27 UPDATE 2016-10-02: The maximum TLS version supported has been increased to TLS 1.3 (draft...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.27 shared libraries without recompiling or relinking. Applications that restrict their use of NSS APIs...
... shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.27 shared libraries without recompiling or relinking. Applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.28 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.28, which is a minor release. Distribution information The hg tag is NSS_3_28_RTM. NSS 3.28 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. NSS 3.28 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_RTM/src/ New in NSS 3.28 New Functionality NSS includes support for TLS 1.3 draft -18. This includes a number of improvements to TLS 1.3: The signed certificate timestamp, used in certificate transparency, is supported in TLS 1.3 (bug 1252745). Key exporters for TLS 1.3 are supported (bug 1310610). This includes the early key exporter, which can be used if 0-RTT is en...
...orted by a peer if there was no commonly supported signature scheme. NSS will now check if RSA-PSS signing is supported by the token that holds the private key prior to using it for TLS (bug 1311950). The certificate validation code contains checks to no longer trust certificates that are issued by old WoSign and StartCom CAs, after October 21, 2016. This is equivalent to the behavior that Mozilla will release with Firefox 51. Background information can be found in Mozilla's blog post. Bugs fixed in NSS 3.28 This Bugzilla query returns all the bugs fixed in NSS 3.28: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.28 Compatibility NSS 3.28 shared libraries are backward compatible with all older N...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.28 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.31 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.31, which is a minor release. Distribution information The hg tag is NSS_3_31_RTM. NSS 3.31 requires Netscape Portable Runtime (NSPR) 4.15 or newer. NSS 3.31 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_31_RTM/src/ New in NSS 3.31 New Functionality Allow certificates to be specified by RFC7512 PKCS#11 URIs. Allow querying a certificate object for its temporary or permanent storage status in a thread safe way. New Functions in cert.h CERT_GetCertIsPerm - retrieve the permanent storage status attribute of a certificate in a thread safe way. CERT_GetCertIsTemp - retrieve...
...rrected the encoding of Domain Name Constraints extensions created by certutil NSS supports a clean seeding mechanism for *NIX systems now using only /dev/urandom. This is used only when SEED_ONLY_DEV_URANDOM is set at compile time. CERT_AsciiToName can handle OIDs in dotted decimal form now. Bugs fixed in NSS 3.31 This Bugzilla query returns all the bugs fixed in NSS 3.31: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.31 Compatibility NSS 3.31 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.31 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.31 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.32 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.32, which is a minor release. Distribution information The hg tag is NSS_3_32_RTM. NSS 3.32 requires Netscape Portable Runtime (NSPR) 4.16, or newer. NSS 3.32 source distributions are available on ftp.mozilla.org, for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_32_RTM/src/ Notable Changes in NSS 3.32 Various minor improvements and correctness fixes. The Code Signing trust bit was turned off for all, included root certificates. The Websites (TLS/SSL) trust bit was turned off for the following root certificates. CN = AddTrust Class 1 CA Root SHA-256 Fingerprint: 8C:72:09:27:9A:C0:4E:27:5E:16:D0:7F:D3:B7:75:E8:01:54:B5:96:80:...
...00:A7:0C:11:01:1C:D8:59:77:C4:59:FB:5A:F9:6A:3D:F0:54:08:20:D0:F4:B8:60:78:75:E5:8F Bugs fixed in NSS 3.32 NSS versions 3.28.x, 3.29.x. 3.30.x and 3.31.x contained a bug in function CERT_CompareName, which caused the first RDN to be ignored. NSS version 3.32 fixed this bug. (CVE-2018-5149, Bug 1361197) This Bugzilla query returns all the bugs fixed in NSS 3.32: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.32 Compatibility NSS 3.32 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.32 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their u...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.32 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (select the product 'NSS'). ...
NSS 3.33 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.33, which is a minor release. Distribution information The hg tag is NSS_3_33_RTM. NSS 3.33 requires Netscape Portable Runtime (NSPR) 4.17, or newer. NSS 3.33 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_33_RTM/src/ Notable Changes in NSS 3.33 TLS compression is no longer supported. API calls that attempt to enable compression are accepted without failure. However, TLS compression will remain disabled. This version of NSS uses a formally verified implementation of Curve25519 on 64-bit systems. The compile time flag DISABLE_ECC has been removed. When NSS is compiled without NSS_FORC...
...ecport.h NSS_SecureMemcmpZero - check if a memory region is all zero in constant time. PORT_ZAllocAligned - allocate aligned memory. PORT_ZAllocAlignedOffset - allocate aligned memory for structs. in ssl.h SSL_GetExperimentalAPI - access experimental APIs in libssl. Bugs fixed in NSS 3.33 This Bugzilla query returns all the bugs fixed in NSS 3.33: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.33 Compatibility NSS 3.33 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.33 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their u...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.33 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (select product 'NSS'). ...
NSS 3.34.1 release notes
Introduction The Network Security Services (NSS) team has released NSS 3.34.1, which is a minor release. Distribution information The hg tag is NSS_3_34.1_RTM. NSS 3.34.1 requires Netscape Portable Runtime (NSPR) 4.17, or newer. NSS 3.34.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_34_1_RTM/src/ Notable Changes in NSS 3.34.1 The following CA certificate was Re-Added. It was previously removed in NSS 3.34, but now re-added with only the Email trust bit set. (bug 1418678) CN = Certum CA, O=Unizeto Sp. z o.o. SHA-256 Fingerprint: D8:E0:FE:BC:1D:B2:E3:8D:00:94:0F:37:D2:7D:41:34:4D:99:3E:73:4B:99:D5:65:6D:97:78:D4:D8:14:36:24 R...
...4:0F:37:D2:7D:41:34:4D:99:3E:73:4B:99:D5:65:6D:97:78:D4:D8:14:36:24 Removed entries from certdata.txt for actively distrusted certificates that have expired (bug 1409872). The version of the CA list was set to 2.20. New in NSS 3.34 New Functionality None New Functions Bugs fixed in NSS 3.34.1 This Bugzilla query returns all the bugs fixed in NSS 3.34.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.34.1 Compatibility NSS 3.34.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.34 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.34 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (select product 'NSS'). ...
NSS 3.35 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.35, which is a minor release. Distribution Information The HG tag is NSS_3_35_RTM. NSS 3.35 requires NSPR 4.18, or newer. NSS 3.35 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_35_RTM/src/ New in NSS 3.35 New Functionality TLS 1.3 support has been updated to draft -23. This includes a large number of changes since 3.34, which supported only draft -18. See below for details. New Types in sslt.h SSLHandshakeType - The type of a TLS handshake message. For the SSLSignatureScheme enum, the enumerated values ssl_sig_rsa_pss_sha* are deprecated in response to a change in TLS ...
...Ticket - send a session ticket (TLS 1.3 server only). Removed experimental APIs Note that experimental APIs might get removed from NSS without announcing removals in the release notes. This section might be incomplete. The experimental API SSL_UseAltServerHelloType has been disabled. Bugs fixed in NSS 3.35 This Bugzilla query returns all the bugs fixed in NSS 3.35: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.35 Compatibility NSS 3.35 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.35 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their u...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.35 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (select product 'NSS'). ...
NSS 3.36.4 release notes
This is a patch release to fix regression bugs. ...
...This is a patch release to fix regression bugs. ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.36, which is a minor release. Distribution Information The HG tag is NSS_3_36_RTM. NSS 3.36 requires NSPR 4.19 or newer. NSS 3.36 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_36_RTM/src/ (make a link) New in NSS 3.36 New Functionality Experimental APIs for TLS session cache handling. ...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.36 shared libraries without recompiling or relinking. ...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.37.3 release notes
This is a patch release to fix regression bugs. ...
...This is a patch release to fix regression bugs. ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.37.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.38 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.38, which is a minor release. Distribution Information The HG tag is NSS_3_38_RTM. NSS 3.38 requires NSPR 4.19 or newer. NSS 3.38 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_38_RTM/src/ New in NSS 3.38 New Functionality Added support for the TLS Record Size Limit Extension. When creating a certificate request (CSR) using certutil -R, an existing orphan private key can be reused. Parameter -k may be used to specify the ID of an existing orphan key. The available orphan key IDs can be displayed using command certutil -K. When using certutil -O to print the chain for a given certificate nic...
...ity fixes in the ASN.1 code. NSS automatically enables caching for SQL database storage on Linux, if it is located on a network filesystem that's known to benefit from caching. When repeatedly importing the same certificate into an SQL database, the existing nickname will be kept. Bugs fixed in NSS 3.38 This Bugzilla query returns all the bugs fixed in NSS 3.38: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.38 Compatibility NSS 3.38 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.38 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.38 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.39 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.39, which is a minor release. Distribution Information The HG tag is NSS_3_39_RTM. NSS 3.39 requires NSPR 4.20 or newer. NSS 3.39 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_39_RTM/src/ New in NSS 3.39 New Functionality The tstclnt and selfserv utilities added support for configuring the enabled TLS signature schemes using the -J parameter. NSS will use RSA-PSS keys to authenticate in TLS. Support for these keys is disabled by default but can be enabled using SSL_SignatureSchemePrefSet(). certutil added the ability to delete an orphan private key from an NSS key data...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.39 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.39 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.41.1 release notes
Introduction Network Security Services (NSS) 3.41.1 is a patch release for NSS 3.41. The bug fixes in NSS 3.41.1 are described in the "Bugs Fixed" section below. It was released on 22 January 2019. Distribution Information The HG tag is NSS_3_41_1_RTM. NSS 3.41.1 requires NSPR 4.20 or newer. NSS 3.41.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_41_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.41.1 New Functionality No new functionality is introduced in this release. This is a patch release to fix bugs. Bugs fixed in NSS 3.41.1 Bug 1507135 and Bug 1507174 - Add additional null checks to several CMS functions to fix a rare CMS crash. T...
...ctionality No new functionality is introduced in this release. This is a patch release to fix bugs. Bugs fixed in NSS 3.41.1 Bug 1507135 and Bug 1507174 - Add additional null checks to several CMS functions to fix a rare CMS crash. Thanks to Hanno Bock and Damian Poddebniak for the discovery and fixes. (CVE-2018-18508) This bugzilla query returns all bugs fixed in 3.41.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.41.1 Compatibility NSS 3.41.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.41.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.41.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.41 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.41 on 7 December 2018, which is a minor release. Distribution Information The HG tag is NSS_3_41_RTM. NSS 3.41 requires NSPR 4.20 or newer. NSS 3.41 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_41_RTM/src/ New in NSS 3.41 New Functionality Bug 1252891 - Implemented EKU handling for IPsec IKE. Bug 1423043 - Enable half-closed states for TLS. Bug 1493215 - Enabled the following ciphersuites by default: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_256_GCM_SHA384 New Functions none ...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.41 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.41 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.42.1 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.42.1 on 31 January 2019, which is a patch release. Distribution Information The HG tag is NSS_3_42_1_RTM. NSS 3.42.1 requires NSPR 4.20 or newer. NSS 3.42.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_42_1_RTM/src/ Other releases are available in NSS Releases. Bugs fixed in NSS 3.42.1 Bug 1507135 and Bug 1507174 - Add additional null checks to several CMS functions to fix a rare CMS crash. Thanks to Hanno Bock and Damian Poddebniak for the discovery and fixes. This was originally announced in NSS 3.42, but was mistakenly not included in the release. (CVE-2018-18508) This Bugzilla ...
.... Bugs fixed in NSS 3.42.1 Bug 1507135 and Bug 1507174 - Add additional null checks to several CMS functions to fix a rare CMS crash. Thanks to Hanno Bock and Damian Poddebniak for the discovery and fixes. This was originally announced in NSS 3.42, but was mistakenly not included in the release. (CVE-2018-18508) This Bugzilla query returns all the bugs fixed in NSS 3.42.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.42.1 Compatibility NSS 3.42.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.42.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.42.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.42 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.42 on 25 January 2019, which is a minor release. Distribution Information The HG tag is NSS_3_42_RTM. NSS 3.42 requires NSPR 4.20 or newer. NSS 3.42 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_42_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.42 New Functionality Bug 818686 - Support XDG basedir specification New Functions none Notable Changes in NSS 3.42 The following CA certificates were Added: None The following CA certificates were Removed: None Added support for some of the testcases from the Wycheproof project: ...
...veral CMS functions to fix a rare CMS crash. Thanks to Hanno Bock and Damian Poddebniak for the discovery and fixes. Note: This was mistakenly not in release 3.42, and is instead in NSS 3.42.1. Bug 1513913 - A fix for Solaris where Firefox 60 core dumps during start when using profile from version 52 This Bugzilla query returns all the bugs fixed in NSS 3.42: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.42 Compatibility NSS 3.42 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.42 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.42 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.43 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.43 on 16 March 2019, which is a minor release. Distribution Information The HG tag is NSS_3_43_RTM. NSS 3.43 requires NSPR 4.21 or newer. NSS 3.43 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_43_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.43 New Functionality New Functions in sechash.h HASH_GetHashOidTagByHashType - convert type HASH_HashType to type SECOidTag in sslexp.h SSL_SendCertificateRequest - allow server to request post-handshake client authentication. To use this both peers need to enable the SSL_ENABLE_POST_HANDSHAKE_AUTH option. Note...
...09 - Add manual for nss-policy-check Bug 1531074 - Fix a deref after a null check in SECKEY_SetPublicValue Bug 1517714 - Properly handle ESNI with HRR Bug 1529813 - Expose HKDF-Expand-Label with mechanism Bug 1535122 - Align TLS 1.3 HKDF trace levels Bug 1530102 - Use getentropy on compatible versions of FreeBSD. This Bugzilla query returns all the bugs fixed in NSS 3.43: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.43 Compatibility NSS 3.43 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.43 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.43 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.44.2 release notes
Introduction Network Security Services (NSS) 3.44.2 is a patch release for NSS 3.44. The bug fixes in NSS 3.44.2 are described in the "Bugs Fixed" section below. It was released on 2 October 2019. Distribution Information The HG tag is NSS_3_44_2_RTM. NSS 3.44.2 requires NSPR 4.21 or newer. NSS 3.44.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_44_2_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.44.2 No new functionality is introduced in this release. Bugs fixed in NSS 3.44.2 Bug 1582343 - Soft token MAC verification not constant time Bug 1577953 - Remove arbitrary HKDF output limit by allocating space as needed This Bugzilla quer...
...releases/NSS_3_44_2_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.44.2 No new functionality is introduced in this release. Bugs fixed in NSS 3.44.2 Bug 1582343 - Soft token MAC verification not constant time Bug 1577953 - Remove arbitrary HKDF output limit by allocating space as needed This Bugzilla query returns all the bugs fixed in NSS 3.44.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.44.2 Compatibility NSS 3.44.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.44.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.44.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.44 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.44 on 10 May 2019, which is a minor release. The NSS team would like to recognize first-time contributors: Kevin Jacobs, David Carlier, Alexander Scheel, and Edouard Oger. Distribution Information The HG tag is NSS_3_44_RTM. NSS 3.44 requires NSPR 4.21 or newer. NSS 3.44 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_44_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.44 New Functionality New Functions in lib/certdb/cert.h CERT_GetCertificateDer - Access the DER-encoded form of a CERTCertificate. Notable Changes in NSS 3.44 It is now possible to build NS...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.44 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.44 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.45 release notes
Network Security Services (NSS) 3.45 on 5 July 2019, which is a minor release. The NSS team would like to recognize first-time contributors: Bastien Abadie Christopher Patton Jeremie Courreges-Anglas Marcus Burghardt Michael Shigorin Tomas Mraz Distribution Information The HG tag is NSS_3_45_RTM. NSS 3.45 requires NSPR 4.21 or newer. NSS 3.45 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_45_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.45 New Functionality New Functions in pk11pub.h: PK11_FindRawCertsWithSubject - Finds all certificates on the given slot with the given subject distinguished name and returns them as DER bytes...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.45 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.45 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.46.1 release notes
Introduction Network Security Services (NSS) 3.46.1 is a patch release for NSS 3.46. The bug fixes in NSS 3.46.1 are described in the "Bugs Fixed" section below. It was released on 2 October 2019. Distribution Information The HG tag is NSS_3_46_1_RTM. NSS 3.46.1 requires NSPR 4.22 or newer. NSS 3.46.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_46_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.46.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.46.1 Bug 1582343 - Soft token MAC verification not constant time Bug 1577953 - Remove arbitrary HKDF output limit by allocating space as needed This Bugzilla quer...
...releases/NSS_3_46_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.46.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.46.1 Bug 1582343 - Soft token MAC verification not constant time Bug 1577953 - Remove arbitrary HKDF output limit by allocating space as needed This Bugzilla query returns all the bugs fixed in NSS 3.46.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.46.1 Compatibility NSS 3.46.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.46.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict the...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.46.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.46 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.46 on 30 August 2019, which is a minor release. The NSS team would like to recognize first-time contributors: Giulio Benetti Louis Dassy Mike Kaganski xhimanshuz Distribution Information The HG tag is NSS_3_46_RTM. NSS 3.46 requires NSPR 4.22 or newer. NSS 3.46 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_46_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.46 This release contains no significant new functionality, but concentrates on providing improved performance, stability, and security. Of particular note are significant improvements to AES-GCM performanc...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.46 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.46 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.47.1 release notes
ices (NSS) 3.47.1 is a patch release for NSS 3.47. The bug fixes in NSS 3.47.1 are described in the "Bugs Fixed" section below. It was released on 19 November 2019. The NSS team would like to recognize first-time contributors: Craig Disselkoen Distribution Information The HG tag is NSS_3_47_1_RTM. NSS 3.47.1 requires NSPR 4.23 or newer. NSS 3.47.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_47_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.47.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.47.1 CVE-2019-11745 - EncryptUpdate should use maxout, not block size Bug 1590495 - Fix a crash that could be caused by c...
... No new functionality is introduced in this release. Bugs fixed in NSS 3.47.1 CVE-2019-11745 - EncryptUpdate should use maxout, not block size Bug 1590495 - Fix a crash that could be caused by client certificates during startup Bug 1589810 - Fix compile-time warnings from uninitialized variables in a perl script This Bugzilla query returns all the bugs fixed in NSS 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.47 Compatibility NSS 3.47.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.47.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.47.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.48.1 release notes
Introduction Network Security Services (NSS) 3.48.1 is a patch release for NSS 3.48. The bug fixes in NSS 3.48.1 are described in the "Bugs Fixed" section below. It was released on 13 January 2020. Distribution Information The HG tag is NSS_3_48_1_RTM. NSS 3.48.1 requires NSPR 4.23 or newer. NSS 3.48.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_48_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.48.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.48.1 Bug 1606992 - Cache the most recent PBKDF2 password hash, to speed up repeated SDR operations, important with the increased KDF iteration counts. This Bugzil...
...ases/NSS_3_48_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.48.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.48.1 Bug 1606992 - Cache the most recent PBKDF2 password hash, to speed up repeated SDR operations, important with the increased KDF iteration counts. This Bugzilla query returns all the bugs fixed in NSS 3.48: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.48 Compatibility NSS 3.48.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.48.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.48.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.49.1 release notes
Introduction Network Security Services (NSS) 3.49.1 is a patch release for NSS 3.49. The bug fixes in NSS 3.49.1 are described in the "Bugs Fixed" section below. It was released on 13 January 2020. Distribution Information The HG tag is NSS_3_49_1_RTM. NSS 3.49.1 requires NSPR 4.24 or newer. NSS 3.49.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_49_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.49.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.49.1 Bug 1606992 - Cache the most recent PBKDF2 password hash, to speed up repeated SDR operations, important with the increased KDF iteration counts. This Bugzil...
...ases/NSS_3_49_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.49.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.49.1 Bug 1606992 - Cache the most recent PBKDF2 password hash, to speed up repeated SDR operations, important with the increased KDF iteration counts. This Bugzilla query returns all the bugs fixed in NSS 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.49 Compatibility NSS 3.49.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.49.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.49.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.49.2 release notes
Introduction Network Security Services (NSS) 3.49.2 is a patch release for NSS 3.49. The bug fixes in NSS 3.49.2 are described in the "Bugs Fixed" section below. It was released on 23 January 2020. Distribution Information The HG tag is NSS_3_49_2_RTM. NSS 3.49.2 requires NSPR 4.24 or newer. NSS 3.49.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_49_2_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.49.2 No new functionality is introduced in this release. Bugs fixed in NSS 3.49.2 Bug 1606992 - Cache the most recent PBKDF1 password hash, to speed up repeated SDR operations, important with the increased KDF iteration counts. NSS 3.49.1 sp...
...repeated SDR operations, important with the increased KDF iteration counts. NSS 3.49.1 sped up PBKDF2 operations, though PBKDF1 operations are also relevant for older NSS databases. Bug 1608327 - Fix compilation problems with NEON-specific code in freebl Bug 1608895 - Fix a taskcluster issue with Python 2 / Python 3 This Bugzilla query returns all the bugs fixed in NSS 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.49 Compatibility NSS 3.49.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.49.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.49.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.49 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.49 on 3 January 2020, which is a minor release. The NSS team would like to recognize first-time contributors: Alex Henrie Distribution Information The HG tag is NSS_3_49_RTM. NSS 3.49 requires NSPR 4.24 or newer. NSS 3.49 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_49_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.49 The legacy DBM database, libnssdbm, is no longer built by default when using gyp builds. See Bug 1594933 for details. Bugs fixed in NSS 3.49 Bug 1513586 - Set downgrade sentinel for client TLS versions lower than 1.2. Bug 1606...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.49 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.49 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.50 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.50 on 7 February 2020, which is a minor release. Distribution Information The HG tag is NSS_3_50_RTM. NSS 3.50 requires NSPR 4.25 or newer. NSS 3.50 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_50_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.50 Verified primitives from HACL* were updated, bringing performance improvements for several platforms. Note that Intel processors with SSE4 but without AVX are currently unable to use the improved ChaCha20/Poly1305 due to a build issue; such platforms will fall-back to less optimized algorithms. See Bug ...
... to 1.2.11 Bug 1609181 - Detect ARM (32-bit) CPU features on FreeBSD Bug 1602386 - Fix build on FreeBSD/powerpc* Bug 1608151 - Introduce NSS_DISABLE_ALTIVEC Bug 1612623 - Depend on NSPR 4.25 Bug 1609673 - Fix a crash when NSS is compiled without libnssdbm support, but the nssdbm shared object is available anyway. This Bugzilla query returns all the bugs fixed in NSS 3.50: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.50 Compatibility NSS 3.50 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.50 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.50 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.51 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.51 on 6 March 2020, which is a minor release. The NSS team would like to recognize first-time contributors: Dmitry Baryshkov Victor Tapia Distribution Information The HG tag is NSS_3_51_RTM. NSS 3.51 requires NSPR 4.25 or newer. NSS 3.51 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_51_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.51 Updated DTLS 1.3 implementation to Draft-34. See Bug 1608892 for details. Bugs fixed in NSS 3.51 Bug 1608892 - Update DTLS 1.3 implementation to draft-34. Bug 1611209 - Correct swapped PKCS11 values of CKM_AES_...
...A program linked with older NSS 3.x shared libraries will work with NSS 3.51 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.51 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.52 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.52 on 1 May 2020. The NSS team would like to recognize first-time contributors: zhujianwei7 Hans Petter Jansson Distribution Information The HG tag is NSS_3_52_RTM. NSS 3.52 requires NSPR 4.25 or newer. NSS 3.52 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_52_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.52 Bug 1603628 - Update NSS to support PKCS #11 v3.0. Note: This change modifies the CK_GCM_PARAMS struct to include the ulIvBits field which, prior to PKCS #11 v3.0, was ambiguously defined and not included in the NSS definition. If an...
...here testlib makefile build produced extraneous object files. Bug 1619959 - Properly handle multi-block SEED ECB inputs. Bug 1630925 - Guard all instances of NSSCMSSignedData.signerInfo to avoid a CMS crash Bug 1571677 - Name Constraints validation: CN treated as DNS name even when syntactically invalid as DNS name This Bugzilla query returns all the bugs fixed in NSS 3.52: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.52 Compatibility NSS 3.52 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.52 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.52 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.54 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.54 on 26 June 2020, which is a minor release. Distribution Information The HG tag is NSS_3_54_RTM. NSS 3.54 requires NSPR 4.26 or newer. NSS 3.54 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_54_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.54 Support for TLS 1.3 external pre-shared keys (Bug 1603042). Use ARM Cryptography Extension for SHA256, when available. (Bug 1528113). Certificate Authority Changes The following CA certificates were Added: Bug 1645186 - certSIGN Root CA G2 SHA-256 Fingerprint: 657CFE2FA73FAA38462571F332A23...
...123 - Support SSL_ExportEarlyKeyingMaterial with External PSKs. Bug 1643557 - Fix numerous compile warnings in NSS. Bug 1644774 - SSL gtests to use ClearServerCache when resetting self-encrypt keys. Bug 1645479 - Don't use SECITEM_MakeItem in secutil.c. Bug 1646520 - Stricter enforcement of ASN.1 INTEGER encoding. This Bugzilla query returns all the bugs fixed in NSS 3.54: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.54 Compatibility NSS 3.54 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.54 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.54 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.55 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.55 on 24 July 2020, which is a minor release. The NSS team would like to recognize first-time contributors: Danh Distribution Information The HG tag is NSS_3_55_RTM. NSS 3.55 requires NSPR 4.27 or newer. NSS 3.55 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_55_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.55 P384 and P521 elliptic curve implementations are replaced with verifiable implementations from Fiat-Crypto and ECCKiila. Special thanks to the Network and Information Security Group (NISEC) at Tampere University. PK11_FindCertInSlot is adde...
...S and 3DES. Bug 1067214 - Enforce minimum PKCS#1 v1.5 padding length in RSA_CheckSignRecover. Bug 1643528 - Fix compilation error with -Werror=strict-prototypes. Bug 1646324 - Advertise PKCS#1 schemes for certificates in the signature_algorithms extension. Bug 1652331 - Update NSS 3.55 NSPR version to 4.27. This Bugzilla query returns all the bugs fixed in NSS 3.55: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.55 Compatibility NSS 3.55 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.55 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.55 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
Utilities for nss samples
are adapted from those found in the sectool library used by the NSS security tools and other NSS test applications. It shows the following: Read DER from a file. Compile file size. Get seed From a noise gile. Generate random numbers. Get a module password. Extract the password from a text file. Print data as hexadecimal. util.h /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _UTIL_H #define _UTIL_H #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include "util.h" #include <prprf.h> #include <prerror.h> #include <nss.h> #include <pk11func.h> /* * These utility func...
...2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "util.h" /* * These utility functions are adapted from those found in * the sectool library used by the NSS security tools and * other NSS test applications. */ /* * Newline */ static void Newline(PRFileDesc* out) { PR_fprintf(out, "\n"...
...eFileName); /* * FileSize */ extern long FileSize(const char* filename); /* * ReadDERFromFile */ extern SECStatus ReadDERFromFile(SECItem *der, const char *inFileName, PRBool ascii); #endif /* _UTIL_H */ Util.c /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "util.h" /* * These utility functions are adapted from those found in * the sectool library used by the NSS security tools and * other NSS test applications. */ /* * Newline */ static void Newline(PRFileDesc* out) { PR_fprintf(out, "\n"); } /* * PrintAsAscii */ void PrintAsAscii(PRFileDesc* out, const unsigned char *data, unsigned int len) { char *b64...
NSS sources building testing
Find the directory that contains the highest version number. Because NSS depends on the base library NSPR, you should download the archive that combines both NSS and NSPR. ...
...u are a software developer and intend to contribute enhancements to NSS, you should obtain the latest development snapshot of NSS using mercurial/hg (a distributed source control management tool). In order to get started, anonymous read-only access is sufficient. Create a new directory on your computer that you will use as your local work area, and run the following commands. hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss After the above commands complete, you should have two local directories, named nspr and nss, next to each other. (Historical information: NSPR and NSS source code have recently been re-organized into a new directory structure. In past versions, all files were located in a directory hierarchy that started with the "mozilla" prefix. ...
...org/projects/nss After the above commands complete, you should have two local directories, named nspr and nss, next to each other. (Historical information: NSPR and NSS source code have recently been re-organized into a new directory structure. In past versions, all files were located in a directory hierarchy that started with the "mozilla" prefix. The NSPR base library was located in directory mozilla/nsprpub. The subdirectories dbm, security/dbm, security/coreconf, security/nss were part of the NSS sources.) The nss directory contains the following important subdirectories: nss/coreconf Contains knowledge for cross platform building. nss/lib Contains all the library code that is used to create the runtime libraries used by applications. nss/cmd Contains a set of various tool progr...
NSS release notes template
Introduction The NSS team has released Network Security Services (NSS) 3.XX, which is a minor release. or Network Security Services (NSS) 3.XX.y is a patch release for NSS 3.XX. The bug fixes in NSS 3.XX.y are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_XX_RTM. NSS 3.XX requires NSPR 4.XX or newer. NSS 3.XX source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_XX_RTM/src/ (make a link) New in NSS 3.XX New Functionality either: No new functionality is introduced in this release. This is a patch release to fix ... or: ... New Functions in ___.h function - description New Types in ___.h type - description. ...
...No new functionality is introduced in this release. This is a patch release to fix ... or: ... New Functions in ___.h function - description New Types in ___.h type - description. New Macros in ___.h macro - description Notable Changes in NSS 3.XX ... Bugs fixed in NSS 3.XX This Bugzilla query returns all the bugs fixed in NSS 3.XX: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.XX (make a link) Acknowledgements The NSS development team would like to thank ... for responsibly disclosing the issue by providing advance copies of their research. Compatibility NSS 3.XX.y shared libraries are backward compatible with all older NSS 3.x shared libraries. A program lin...
...ries. A program linked with older NSS 3.x shared libraries will work with NSS 3.XX.y shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
New NSS Samples
New NSS Sample Code 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. These new examples are a work in progress. ...
... New NSS Sample Code 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. These new examples are a work in progress. ...
... ...
Overview of NSS
pplication Security Architecture If you want to add support for SSL, S/MIME, or other Internet security standards to your application, you can use Network Security Services (NSS) to implement all your security features. NSS provides a complete open-source implementation of the crypto libraries used by AOL, Red Hat, Google, and other companies in a variety of products, including the following: Mozilla products, including Firefox, Thunderbird, SeaMonkey, and Firefox OS. AOL Instant Messenger (AIM) Open source client applications such as Evolution, Pidgin, Apache OpenOffice, and LibreOffice. Server products from Red Hat: Red Hat Directory Server, Red Hat Certificate System, and the mod_nss SSL module for the Apache web server. Server products from Oracle (formerly Sun Java Enterprise System)...
...ging Server and Oracle Directory Server Enterprise Edition. SUSE Linux Enterprise Server supports NSS and the mod_nss SSL module for the Apache web server. NSS includes a framework to which developers and OEMs can contribute patches, such as assembler code, to optimize performance on their platforms. NSS 3.x has been certified on 18 platforms. For more detailed information about NSS, see wiki.mozilla.org and NSS FAQ. Source code for a Java interface to NSS is available in the Mozilla CVS tree. For details, see Network Security Services for Java. NSS makes use of Netscape Portable Runtime (NSPR), a platform-neutral open-source API for system functions designed to facilitate cross-platform development. Like NSS, NSPR has been battle-tested in multiple products. For more information, see the N...
...g introductory material, API references, man pages for command-line tools, and sample code. NSS is available as source and shared (dynamic) libraries. Every NSS release is backward compatible with previous releases, allowing NSS users to upgrade to the new NSS shared libraries without recompiling or relinking their applications. Open-Source Licensing and Distribution NSS is available under the Mozilla Public License, version 2. The latest source code is available for free worldwide from https://www.mozilla.org and its mirror sites. ...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
CS #11? Only if you identify your token as the default random number generator. If you do, your token must be able to generate random numbers even when it is not logged in. NSS uses installed random number generators if PKCS11_MECH_RANDOM_FLAG is set in the installer script. For information on how to do this, see Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module. Can Mozilla provide a list of all PKCS #11 functions that NSS will use? Your token should expect to implement all the PKCS #11 functions that make sense for your token. NSS continues to evolve, and periodically enhances it's functionality by using a more complete list of PKCS #11 functions. You should have implementations for all the functions specified in the version of the PKCS #11 spec your token impleme...
... based client to do a keypair generation while a smartCard is attached? How is the private key stored to the smartCard, and how is the public key sent to the server (with wrapping?). The private key is created using C_GenerateKeyPair or stored using C_CreateObject (depending on who generates the key). NSS does not keep a copy of the generated key if it generates the key itself. Key generation in Mozilla clients is triggered either by the standard <KEYGEN> tag, or by the keygen functions off the window.crypto object. This is the same method used for generating software keys and certificates and is used by certificate authorities like VeriSign and Thawte. (Red Hat Certificate Server also uses this method). The public key is sent to the server base-64-DER-encoded with an (optional) signed challenge...
... have my smart card which has initial PIN set at '9999', I insert it into my reader and download with my certificate (keygen completed), can I issue 'Change Password' from the Firefox to set a new PIN to the smart card? Any scenario that you can give me similar to this process (a way to issue a certificate on an initialized new card)? Yes. First open the Tools/Options/Advanced/Security window in Mozilla and click Security Devices. Then select your PKCS #11 module, click View/Edit, select the token, and click Change Password. For this to work, you must supply a C_SetPIN function that operates as CKU_USER. Mozilla, Thunderbird, and Netscape products that use NSS have different UI to get the the Security Devices dialog. To get a key into an initialized token, go to your local Certificate Authority...
Build instructions
2-bit ABI. MOZ_DEBUG_SYMBOLS: tells NSS to build with debug symbols, even in an optimized build. On windows, in both DEBUG and optimized builds, when using MSVC, tells NSS to put symbols in a .pdb file. Required to build with MSVC 8 (2005 Express). Default is not to put debug symbols into optimized builds, and for MSVC, is to put symbols into the .exe or .dll file. NSDISTMODE: If set to 'copy', mozilla/dist/<OBJ_STUFF>/bin/* real files instead of symbolic links. These variables should be either undefined, or set to "1". Results are undefined for variables set to "0". For Windows, install the MozillaBuild environment and Microsoft Visual Studio 2010. (The free edition works, and other versions like Visual Studio 2008 and Visual Studio 2012 may also work.) Use start-shell-msvc2010.bat from Moz...
... new assembler by adding /usr/libexec/binutils220 to the beginning of your build path. This can be done in sh or bash as follows: export PATH=/usr/libexec/binutils220:$PATH The following build instructions should work for all platforms (with some platform-specific changes as noted). Build Instructions for Recent Versions (Mercurial) Clone the NSPR and NSS repositories. hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss If you want to build a releases other than the tips of these repositories, then switch to the release tags: cd nspr hg update NSPR_4_9_5_RTM cd ../nss hg update NSS_3_14_2_RTM cd .. Set environment variables: If you want a non-debug optimized build, set BUILD_OPT=1 in your environment. Otherwise, you get a debug build.
...t set the environment variable USE_PTHREADS to 1. cd nss gmake nss_build_all The output of the build will be in the dist directory alongside the nspr and nss directories. For information on troubleshooting the build system, see Troubleshooting NSS and JSS Build Systems. Build Instructions for Older Versions (CVS) Set the environment variable CVSROOT to :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs login (if you haven't before). Check out NSPR and NSS: cvs co -r NSPR_4_9_5_RTM NSPR cvs co -r NSS_3_14_2_RTM NSS Set environment variables as described in the Mercurial-based instructions. cd mozilla/security/nss gmake nss_build_all The output of the build will be in mozilla/dist subdirectory. For information on troubleshooting the build system, see Troubleshooting ...
FC_Initialize
a string that contains the library parameters. pReserved should be NULL. The library parameters string has this format: "configdir='dir' certPrefix='prefix1' keyPrefix='prefix2' secmod='file' flags= " Here are some examples. ...
...igdir='dir' certPrefix='prefix1' keyPrefix='prefix2' secmod='file' flags= " Here are some examples. ...
...h initializes NSS with no databases: "configdir='' certPrefix='' keyPrefix='' secmod='' flags=readOnly,noCertDB,noMod DB,forceOpen,optimizeSpace " Mozilla Firefox initializes NSS with this string (on Windows): "configdir='C:\\Documents and Settings\\wtc\\Application Data\\Mozilla\\Firefox\\Profiles\\default.7tt' certPrefix='' keyPrefix='' secmod='secmod.db' flags=optimizeSpace manufacturerID='Mozilla.org' libraryDescription='PSM Internal Crypto Services' cryptoTokenDescription='Generic Crypto Services' dbTokenDescription='Software Security Device' cryptoSlotDescription='PSM Internal Cryptographic Services' dbSlotDescription='PSM Private Keys' FIPSSlotDescription='PSM Internal FIPS-140-1 Cryptographic Services' FIPSTokenDescription='PSM FIPS-140-1 User Private Key Services' minPS=0" See PKCS ...
NSS tools : crlutil
Mozilla › Projects › NSS › tools › crlutil
The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC...
...eydir] [-P dbprefix] [-B] See also certutil(1) See Also Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyr...
...RC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://pki.fedoraproject.org/wiki/ 2. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : ssltap
Mozilla › Projects › NSS › tools › ssltap
to connect, the browser will complain that the host name you are trying to connect to is different from the certificate. If you are using the default BadCert callback, you can still connect through a dialog. If you are not using the default BadCert callback, the one you supply must allow for this possibility. ...
...efault BadCert callback, you can still connect through a dialog. If you are not using the default BadCert callback, the one you supply must allow for this possibility. See Also The NSS Security Tools are also documented at [1]http://www.mozilla.org/projects/security/pki/nss/. Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [2]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [3]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC...
...om and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://www.mozilla.org/projects/secu.../pki/nss/tools 2. http://pki.fedoraproject.org/wiki/ 3. http://www.mozilla.org/projects/security/pki/nss/ ...
Network Security Services
ned to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards. For detailed information on standards supported, see Overview of NSS. For a list of frequently asked questions, see the FAQ. NSS is available under the Mozilla Public License. For information on downloading NSS releases as tar files, see Download PKI Source. If you're a developer and would like to contribute to NSS, you might want to read the documents highlevel overview of internal details of NSS and getting started with NSS. Documentation Background Information Overview of NSS Provides a brief summary of NSS and it...
...t7.db database. PKCS #11 information Documentation on PKCS #11 modules Implementing PKCS #11 for NSS The strings NSS uses to load PKCS #11 modules PKCS #11 FAQ Using the JAR Installation Manager to Install a PKCS #11 Cryptographic Module PKCS #11 Conformance Testing - Archived version CA certificates pre-loaded into NSS Mozilla CA certificate policy List of pre-loaded CA certificates Consumers of this list must consider the trust bit setting for each included root certificate. More Information, Extracting roots and their trust bits NSS is built on top of Netscape Portable Runtime (NSPR) Netscape Portable Runtime NSPR project page. NSPR Reference ...
...documentation. Additional Information Using the window.crypto object from JavaScript Delegation of HTTP download for OCSP TLS Cipher Suite Discovery NSS Certificate Download Specification FIPS Mode - an explanation Format of key log files View all NSS-related articles on MDN Planning Information on NSS planning can be found at wiki.mozilla.org, including: FIPS Validation NSS Roadmap page NSS Improvement Project Community View Mozilla Security forums... Mailing list Newsgroup RSS feed View Mozilla Cryptography forums... Mailing list Newsgroup RSS feed Related Topics Security ...
Necko FAQ
TODO put links! How does PSM fit into this picture? Todo How does the proxy support work? Todo What about Proxy Auto Config? Todo What about SOCKS support? Todo When is the next stable release of this library going to be available? Todo I'd like to use this library for my project. ...
...TODO put links! How does PSM fit into this picture? Todo How does the proxy support work? Todo What about Proxy Auto Config? Todo What about SOCKS support? Todo When is the next stable release of this library going to be available? Todo I'd like to use this library for my project. ...
... ...
Pork
f macro expansions that contain any location. This information allows C++ to be automatically rewritten in a precise way. The inputs driving the rewriting would normally be provided by a program-analysis system outside of Pork. (See Dehydra, Treehydra). Pork has been tested mostly on Linux, but in theory it should be possible to make it work on other systems. Note: Pork is not presently used at Mozilla. Please refer to the oink link below for a more up-to-date toolchain. Pork is based on the Elsa (and Oink) tool chain, and the MCPP preprocessor. As of October 2009 Oink incorporates the Pork functionality into its standard distribution; look for files and tests having the prefix "xform". Documentation Installing Pork Download, installation and dependency info for ...
...f rewriting tools Pork Tool Development in progress page... ...
.... ...
Rhino JavaScript compiler
es JavaScript source into Java class files. The resulting Java class files can then be loaded and executed at another time, providing a convenient method for transferring JavaScript, and for avoiding translation cost. Note that the top-level functions available to the shell (such as print) are not available to compiled scripts when they are run outside the shell. Compiler command line java org.mozilla.javascript.tools.jsc.Main [options] file1.js [file2.js...] where options are: -extends java-class-name Specifies that a java class extending the Java class java-class-name should be generated from the incoming JavaScript source file. Each global function in the source file is made a method of the generated class, overriding any methods in the base class by the same name. -implements java-intf...
...geName must be composed of valid identifier characters optionally separated by periods. -version versionNumber Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, 140, 150, 160, or 170. ...
...n versionNumber Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, 140, 150, 160, or 170. See JavaScript Language Versions for more information on language versions. ...
Introduction to the JavaScript shell
m file to run, in which case the program is run automatically. After following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ If you get " symbol lookup error: ./js: undefined symbol: PR_SetCurrentThreadName" e.g. ...
...n which case the program is run automatically. After following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ If you get " symbol lookup error: ./js: undefined symbol: PR_SetCurrentThreadName" e.g. from a Bash console when using a pre-compiled binary, try <path to your Firefox's run-mozilla.sh>/run-mozilla.sh ./js -- that worked for me] If you'd like to run the JavaScript code in the file foo.js, you can use this command: js foo.js To run foo.js then drop into the interactive shell, do this: js -f foo.js -i Reference Note: Because the JavaScript shell is used as a test environment for the JavaScript engine, the available options and built-in functions can change over time. Command line o...
...nternal work on the JavaScript engine, for testing evalInSandbox-like environments in the shell. gc() Runs the garbage collector to free up memory. gcparam(name[, value]) Added in SpiderMonkey 1.8 Read or configure garbage collector parameters. The name must be one of the parameter keys (such as 'maxBytes', 'maxMallocBytes' or 'gcNumber') defined by FOR_EACH_GC_PARAM in https://searchfox.org/mozilla-central/source/js/src/builtin/TestingFunctions.cpp#464. If value is not specified, gcparam() returns the current value associated with GC parameter named name. If value is specified, it must be convertable to a positive uint32; gcparam() sets GC parameter name to value. For more information, see the C/C++ functions JS_GetGCParameter and JS_SetGCParameter. gczeal(level) Added in SpiderMonkey...
JSAPI User Guide
Many applications can benefit from scripting. These programs can execute JavaScript code from C++ using the SpiderMonkey API. Note: The FOSS wiki page contains a few links to other libraries and programs that can make life easier when using Spidermonkey and JSAPI. What SpiderMonkey does The JavaScript engine compiles and executes scripts containing JavaScript statements and functions. ...
...derMonkey does The JavaScript engine compiles and executes scripts containing JavaScript statements and functions. The engine handles memory allocation for the objects needed to execute scripts, and it cleans up--garbage collects--objects it no longer needs. The word JavaScript may bring to mind features such as event handlers (like onclick), DOM objects, window.open, and XMLHttpRequest. But in Mozilla, all of these features are actually provided by other components, not the SpiderMonkey engine itself. SpiderMonkey provides a few core JavaScript data types--numbers, strings, Arrays, Objects, and so on--and a few methods, such as Array.push. It also makes it easy for each application to expose some of its own objects and functions to JavaScript code. Browsers expose DOM objects. Your application...
...Script data from one type to another, create objects, and so on. Almost all JSAPI functions require a JSContext * as the first argument, just like most <stdio.h> functions require a FILE *. Global objects. Lastly, the global object contains all the classes, functions, and variables that are available for JavaScript code to use. Whenever JavaScript code does something like window.open("http://www.mozilla.org/"), it is accessing a global property, in this case window. JSAPI applications have full control over what global properties scripts can see. The application starts out by creating an object and populating it with the standard JavaScript classes, like Array and Object. Then it adds whatever custom classes, functions, and variables (like window) the application wants to provide; see Custom obj...
SpiderMonkey 31
SpiderMonkey 31 is the JavaScript engine that shipped in Firefox 31. It continues to improve performance over previous SpiderMonkey releases, with a significantly improved garbage collector and other features. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. ...
...Script engine that shipped in Firefox 31. It continues to improve performance over previous SpiderMonkey releases, with a significantly improved garbage collector and other features. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. The download url is outdated and SpiderMonkey not RELEASE alone! Get it here mozilla-esr31 You will find it in "Firefox Extended Support Release 31" package on hg release Platform support SpiderMonkey 31 is supported on all the platforms where Firefox 31 runs. Compiling it requires a C++ compiler, and the JSAPI can only be used from C...
...ed/removed methods here... On POSIX platforms, building a threadsafe shell no longer requires NSPR. Embedders still need to build with NSPR, as the new wrappers require using SpiderMonkey internal functions which are not exposed to the public API. Known Issues Detail any known issues here... Future Direction ...insert details on future plans... SpiderMonkey embedders should be aware that Mozilla has no plans to keep the JSAPI, nor the JSDBGAPI stable for embedders. We have chosen to concentrate on performance and correctness as primary concerns instead. JS_THREADSAFE is going away, with future versions supporting only thread-safe builds A new debugging API is on the way to replace JSD. Release Notes Errata This is a list of changes which need to be made to the release notes ASAP. Fe...
SpiderMonkey 45
You can download full source code from https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2 SHA256: 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee MD5: 2ca34f998d8b5ea79d8616dd26b5fbab SpiderMonkey 45 is the JavaScript engine that shipped in Firefox 45. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below. ...
...530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee MD5: 2ca34f998d8b5ea79d8616dd26b5fbab SpiderMonkey 45 is the JavaScript engine that shipped in Firefox 45. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. You may wish to make the bugs block bug 837921 (aliased as "sm.embedding"). -- Apr 14, 2016 Platform support SpiderMonkey 45 is supported on all platforms able to run Firefox 45. Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code. If you are c...
...nd JS_RemoveWeakPointerCompartmentCallback API changes JavaScript shell changes Detail added/removed methods here... Known Issues Detail any known issues here... Future Direction JSContext and JSRuntime are merging. (JSContext will be the only thing visible from within the API, there will be just one per runtime, and inheriting from JSRuntime.) SpiderMonkey embedders should be aware that Mozilla has no plans to keep the JSAPI stable for embedders. We have instead chosen to concentrate on overall performance and accuracy as our primary concerns. Release Notes Errata Feel free to fix any problems you spot, directly in the text above -- this is a Wiki! ...
TPS Tab Lists
A tabs asset list is an array of objects with the following keys: uri: the uri of the tab, required. title: the title of the tab, optional. If specified, only used during verify actions. profile: the name of the profile the tab belongs to. Required for verify actions. For example: var tabs1 = [ { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html", title: "Crossweave Test Page 1", profile: "profile1" }, { uri: "data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>", title: "Hello", profile: "profile1" } ]; Tab lists and phase actions Tabs cannot be modified or deleted, only added or verified with the following functions: Tabs.add - opens the specified tabs in the browser window. Tabs.ver...
...nd phase actions Tabs cannot be modified or deleted, only added or verified with the following functions: Tabs.add - opens the specified tabs in the browser window. ...
...window. Tabs.verify - verifies that the specified tabs can be found in the specified profile. Tabs.verifyNot - verifies that the specified tabs cannot be found in the specified profile. ...
Thread Sanitizer
No public builds are available at this time yet. Manual Build Build prerequisites Note: This section assumes you're using Linux to build. ThreadSanitizer does not work on Mac OSX yet. LLVM/Clang The TSan instrumentation is implemented as an LLVM pass and integrated into Clang. The version of Clang you need to use depends on what Firefox release you are compiling If you are building from mozilla-central, you must use Clang 3.6 or later. Clang 3.4 + TSan cannot compile Firefox due to an internal compiler error; some versions of Clang 3.5 packaged by Linux distros do not work for the same reason. You can check which version of clang you have by running the command: clang -v If you are not building from mozilla-central and are building Firefox 39 or earlier, you must use Clang 3.3. ...
... by running the command: clang -v If you are not building from mozilla-central and are building Firefox 39 or earlier, you must use Clang 3.3. You can find precompiled binaries for LLVM/Clang 3.3 on the LLVM releases page. We recommend using Clang 3.6 or later. Building Firefox Getting the source If you don't have a source code repository clone yet, you need to get yourself a clone of mozilla-central. ...
...se Clang 3.3. You can find precompiled binaries for LLVM/Clang 3.3 on the LLVM releases page. We recommend using Clang 3.6 or later. Building Firefox Getting the source If you don't have a source code repository clone yet, you need to get yourself a clone of mozilla-central. ...
Exploitable crashes
You want to look primarily for three things, in order: Look at the top frame of the stack trace. ...
...nd of memory safety bug. These crashes can often be exploited to run arbitrary code, but you can't be as certain as in the case where you see a bogus address at the top of the stack in step 1. Finding exploitable crashes Exploitable crashes are most often discovered through normal testing and usage, when developers recognize a crash stack in gdb or submitted to a bug as exploitable. Additionally, Mozilla developers make heavy use of two tools in particular to find exploitable situations before they show up as exploitable crash reports. The first tool is AddressSanitizer (ASAN). There is an MDN article documenting its use with Mozilla projects. The other tool is Valgrind. There is an MDN article documenting its use with Mozilla projects. Next steps Once you've determined that a crash is potentiall...
...ressSanitizer (ASAN). There is an MDN article documenting its use with Mozilla projects. The other tool is Valgrind. There is an MDN article documenting its use with Mozilla projects. Next steps Once you've determined that a crash is potentially exploitable, take the following steps. If you need help with any of the steps (e.g. perhaps you lack necessary bugzilla privileges) please email security@mozilla.org. Make sure a bug is on file. Mark the bug as security-sensitive by putting it into the "Security-Sensitive Core Bug" group. Do this before making comments or taking actions that expose exploitability publicly. Put a security severity rating in the bug's keywords. If you're not sure what rating to give, err on the higher side so the bug will get more attention. Explain in a comment why th...
AT APIs Support
access to DOM tree. IAccessible2 is a set of interfaces that overlay the MSAA (IAccessible) and DOM (ISimpleDOM*) interface support. Any object that supports IAccessible will also support IAccessible2 and possibly any of the other IA2 interfaces. Linux/Unix platform We support ATK/AT-SPI interfaces on Linux. Mac platform We currently support only a subset of Universal Access. The rest of the Mozilla Universal Access support is in progress. Accessible Web Standards Gecko exposes the number of XML languages including HTML to AT. Refer to accessible web specifications page to learn what and how markup languages are exposed. AT APIs Implementation Details Refer to implementation details page to see how Gecko supports interesting AT API. There you will find information how AT API interfaces, ...
...w markup languages are exposed. AT APIs Implementation Details Refer to implementation details page to see how Gecko supports interesting AT API. There you will find information how AT API interfaces, roles, states and etc are mapped into Gecko accessibility API and visa versa. Keyboard User Interface and API Fortunately, Gecko uses the standard keyboard API's for each supported platform. The Mozilla keyboard shortcuts for content are similar to what is used in other browsers. Here is a list of Firefox keyboard shortcuts. Test Tools Here you will find a list of tools to test accessibility Gecko-based applications. MSAA MSAA SDK tools - version 1.3 is recommended instead of 2.0 because it includes source code for the tools IAccessible2 Accessibility Probe -- includes MSA...
... Gecko DOM Inspector has an ability to test Gecko accessibility layer, supports base features. Firebug Screen Readers Here's a list of screen readers we are oriented to in the first place. Windows platform JAWS Windows Eyes NVDA Linux/Unix platform Orca OS X platform VoiceOver Contacts Please discuss accessibility issues on the Mozilla Accessibility groups or on the Mozilla Accessibility IRC channel. ...
Using the Places annotation service
database. Which one to use is usually dictated by the application. URI's are easier to use for services that want to annotate a web page loaded in the browser, while ID's are easier to use for services already working with the places database. Id's also offer the ability to add annotations to containers and queries of the database. Creating the annotation service The annotation contract ID is @mozilla.org/browser/annotation-service;1 var annotationService = Components.classes["@mozilla.org/browser/annotation-service;1"] .getService(Components.interfaces.nsIAnnotationService); Note that the annotation service is not thread-safe. You should only use it from the main thread. Naming your annotations For your annotation name, you should use the format <namespa...
... URI or ItemID: This is the nsIURI of the page to annotate, or for items in the places database, the id of the item. name: This is the name of the annotation. See the section on naming above. value: The value of the annotation. flags: Currently unused. Should be 0. expiration: The expiration time for the annotation (see "Lifetime of annotations" below). ...
...annotation. See the section on naming above. value: The value of the annotation. flags: Currently unused. Should be 0. expiration: The expiration time for the annotation (see "Lifetime of annotations" below). ...
Using the Places history service
To maintain backwards compatibility, each version has implemented the older interfaces, resulting in functionality spread across many interfaces. ...
...ssion ID as their referrer. This means that one "session" is comprised of going to a new page, and following a bunch of links or redirects. A session is ended when a new URL is typed in or selected from bookmarks. These session IDs allow the dotted lines separating related pages in the history view to be easily computed. ...
...w page, and following a bunch of links or redirects. A session is ended when a new URL is typed in or selected from bookmarks. These session IDs allow the dotted lines separating related pages in the history view to be easily computed. Creating the history service The Places history service's contract ID is "@mozilla.org/browser/nav-history-service;1": var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsINavHistoryService); It also responds to the old contract ID for URl bar autocomplete "@mozilla.org/autocomplete/search;1?name=history" and the contract ID for the old history system (since it is backwards-compatible) "@mozilla.org/browser/global-history;2". If database initialization complet...
XPCOM array guide
Mozilla › Tech › XPCOM › Guide › Arrays
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. The standard array classes are: nsIArray - a scriptable container for scriptable XPCOM objects. This array is read-only, and the interface does not provide any methods that will allow adding and removing members. nsIMutableArray - a scriptable container for scriptable XPCOM objects, which allows addition and removal of member objects. This interface actually derives from nsIArray. ...
... through interfaces or require a scriptable array. It can hold strong or weak references to its container objects. This basic interface only allows querying of existing elements in the array. The methods that modify the array have been broken out into nsIMutableArray. An nsIArray implementation can be created from C++ or JavaScript using nsIComponentManager.createInstance() and the contract ID "@mozilla.org/array;1". The created array implements nsIMutableArray and nsIArray. Since nsIMutableArray derives from nsIArray, the resulting array can be cast to a read-only array. C++ Example void GetList(nsIArray** aResult) { nsCOMPtr<nsIMutableArray> array = do_CreateInstance(NS_ARRAY_CONTRACTID); // append some elements ... // return it to the caller *aResult = array; NS_ADDREF(*aResul...
...utableArray derives from nsIArray, the resulting array can be cast to a read-only array. C++ Example void GetList(nsIArray** aResult) { nsCOMPtr<nsIMutableArray> array = do_CreateInstance(NS_ARRAY_CONTRACTID); // append some elements ... // return it to the caller *aResult = array; NS_ADDREF(*aResult); } JavaScript Example function getList() { var array = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray); // append some elements ... // return it to the caller return array; } Access to elements Since nsIArray is a regular XPCOM object, its interfaces follows the standard conventions of ownership. Access to specific elements is through QueryElementAt, which is similar to QueryInterface, but it t...
Creating XPCOM components
of the tools, techniques, and technologies that make up XPCOM. 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. For example, the introduction includes a discussion of components and what they are, and the first chapter - in which you compile the basic code and register it with Mozilla - prompts a discussion of the relationship between components and modules, of XPCOM interfaces, and of the registration process in general. Note: In general, you should try to avoid having to create XPCOM components. 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...
...he nsISupports Base Interface XPCOM Identifiers CID Contract ID Factories XPIDL and Type Libraries XPCOM Services XPCOM Types Method Types Reference Counting Status Codes Variable Mappings Common XPCOM Error Codes Using XPCOM Components Component Examples Cookie Manager The WebBrowserFind Component The WebLock Component Component Use in Mozilla Finding Mozilla Components Using XPCOM Components in Your Cpp XPConnect: Using XPCOM Components From Script Component Internals Creating Components in Cpp XPCOM Initialization XPCOM Registry Manifests Registration Methods in XPCOM Autoregistration The Shutdown Process Three Parts of a XPCOM Component Library XPCOM Glue The Glue Library XPCOM String Classes...
...vironment Implementing the nsIContentPolicy Interface Receiving Notifications Implementing the nsIContentPolicy Uniform Resource Locators Checking the White List Creating nsIURI Objects Building the WebLock UI User Interface Package List Client Code Overview XUL The XUL Document The Locking UI Site Adding UI weblock.xul Overlaying New User Interface Into Mozilla webLockOverlay.xul Other Resources weblock.css Image Resources Packaging WebLock Component Installation Overview Archiving Resources The WebLock Installation Script The WebLock Trigger Script Distributing Your Component Appendix A - Setting up the Gecko SDK Downloading and Setting the SDK Building a Microsoft Visual Cpp Project Creating a New Project Adding...
Detailed XPCOM hashtable guide
ata that need swift random access; with non-integral keys or non-contiguous integral keys; or where items will be frequently added or removed. Hashtables should not be used for Sets that need to be sorted; Very small datasets (less than 12-16 items); Data that does not need random access. In these situations, an array, a linked-list, or various tree data structures are more efficient. Mozilla's Hashtable Implementations Mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner complexities of hashtable implementations: PLDHash - low-level C API; stores keys and data in one large memory structure; uses the heap efficiently; client must declare an "entry class" and may not hold onto entry pointers. PLHashTable - low-level C API; entry clas...
... The appropriate entries are GetEntry and PutEntry. Future Plans nsISimpleEnumerator support The (obsolete) nsHashtable has a wrapper that exposes an nsISimpleEnumerator on its items. I will add this support to the various nsBaseHashtable classes as well, as needed. Hash Functions All of the above hashtables need a Hash Function. This function converts the key into a semi-unique integer. ...
... Original Document Information Author(s): Benjamin Smedberg <benjamin@smedbergs.us> ...
Interfacing with the XPCOM cycle collector
This is a quick overview of the cycle collector introduced into XPCOM for Firefox 3, including a description of the steps involved in modifying an existing C++ class to participate in XPCOM cycle collection. If you have a class that you think is involved in a cyclical-ownership leak, this page is for you. The intended audience is Mozilla C++ developers. What the cycle collector does The cycle collector spends most of its time accumulating (and forgetting about) pointers to XPCOM objects that might be involved in garbage cycles. This is the idle stage of the collector's operation, in which special variants of nsAutoRefCnt register and unregister themselves very rapidly with the collector, as they pass through a "suspicious" refcount event (from N+1 to N, for nonzero N). Periodically th...
...jects fields If your class needs to store a pointer to a JSObject then you need to tell the cycle collector about it. The approach you should take is as follows. Firstly it must be held in a JS::Heap<JSObject *> field. For example, suppose your class nsFoo has field mSomeObj: private: ... JS::Heap<JSObject*> mSomeObj; ... When you have something in the JS object pointer you need to use mozilla::HoldJSObjects to tell the GC to trace it and keep the object alive: ... mSomeObj = ... ; mozilla::HoldJSObjects(this); ... In the Unlink method (or destructor) you need to set the object pointer to NULL: NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsFoo) ... NS_IMPL_CYCLE_COLLECTION_UNLINK(mSomeMember) ... //if your class is a wrapper cache: //NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WR...
...bjects(this); ... In the Unlink method (or destructor) you need to set the object pointer to NULL: NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsFoo) ... NS_IMPL_CYCLE_COLLECTION_UNLINK(mSomeMember) ... //if your class is a wrapper cache: //NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER tmp->mSomeObj = nullptr; NS_IMPL_CYCLE_COLLECTION_UNLINK_END In the destructor, you should call mozilla::DropJSObjects(this); In your Traverse method you need to list members involved in the cycle collector, i-e no JS objects: NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsFoo) ... NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSomeMember) ... NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END Finally, you need to manually add the JS object to the Trace method: NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsFoo) //if your ...
nsACString (External)
Class Declaration <map id="classes" name="classes"><area alt="" coords="1005,6,1096,54" href="http://developer.mozilla.org/en/nsACString_(External)" shape="rect" title="nsACString_(External)"> <area alt="" coords="980,102,1121,150" href="http://developer.mozilla.org/en/nsCStringContainer_(External)" shape="rect" title="nsCStringContainer_(External)"> <area alt="" coords="571,198,707,246" href="http://developer.mozilla.org/en/nsCString_external" shape="rect" title="nsCString_external"> <area alt="" coords="731,198,955,246" href="http://developer.mozilla.org/en/nsDependentCSubstring_external" shape="rect" title="nsDependentCSubstring_external"> <area alt="" coords="979,198,1123,246" href="http://developer.mozilla.org/en/PromiseFlatCString_(External)" shape="rect" title="PromiseFlatCString_(...
...ring_external"> <area alt="" coords="731,198,955,246" href="http://developer.mozilla.org/en/nsDependentCSubstring_external" shape="rect" title="nsDependentCSubstring_external"> <area alt="" coords="979,198,1123,246" href="http://developer.mozilla.org/en/PromiseFlatCString_(External)" shape="rect" title="PromiseFlatCString_(External)"> <area alt="" coords="1147,198,1259,246" href="http://developer.mozilla.org/en/nsCAutoString_(External)" shape="rect" title="nsCAutoString_(External)"> <area alt="" coords="5,294,208,342" href="http://developer.mozilla.org/en/nsDependentCString_external" shape="rect" title="nsDependentCString_external"> <area alt="" coords="232,294,475,342" href="http://developer.mozilla.org/en/NS_ConvertUTF16toUTF8_external" shape="rect" title="NS_ConvertUTF16toUTF8_external"> <area...
...CAutoString_(External)"> <area alt="" coords="5,294,208,342" href="http://developer.mozilla.org/en/nsDependentCString_external" shape="rect" title="nsDependentCString_external"> <area alt="" coords="232,294,475,342" href="http://developer.mozilla.org/en/NS_ConvertUTF16toUTF8_external" shape="rect" title="NS_ConvertUTF16toUTF8_external"> <area alt="" coords="499,294,779,342" href="http://developer.mozilla.org/en/NS_LossyConvertUTF16toASCII_external" shape="rect" title="NS_LossyConvertUTF16toASCII_external"> <area alt="" coords="803,294,925,342" href="http://developer.mozilla.org/en/nsLiteralCString_(External)" shape="rect" title="nsLiteralCString_(External)"></map> Method Overview BeginReading EndReading CharAt operator[] First BeginWriting ...
nsIAppShellService
xpfe/appshell/nsIAppShellService.idlScriptable Provides the AppShellService. ...
... xpfe/appshell/nsIAppShellService.idlScriptable Provides the AppShellService. ...
...u want to communicate with via message manager, then append a browser element with remote attribute set to true. ...
nsIDOMGeoGeolocation
on 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. ...
..., 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. ...
...herits from: nsISupports Implemented by: @mozilla.org/geolocation;1. ...
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. ...
...name 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 PSL. See publicsuffix.org for more information. The methods below implement the Public Suffix algorithm ...
...ot 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 individual domains may be registered; it may therefore contain one or more dots. For example, the public suffix for www.bbc.co.uk is co.uk. Likewise, the public suffix for developer.mozilla.org is org. ACString getPublicSuffix( in nsIURI aURI ); Parameters aURI The URI to be analyzed. Return value An ACString containing the public suffix. Exceptions thrown NS_ERROR_INVALID_ARG This exception is thrown if the hostname in aURI is empty. NS_ERROR_HOST_IS_IP_ADDRESS This exception is thrown if aURI is a numeric IPv4 or IPv6 address. NS_ERROR_UNEXPECTED Or other erro...
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. ...
...string returned by Get() is empty or not. boolean exists( in AString aName ); Parameters aName The variable name to probe. Return value If the variable has been set, the value returned is PR_TRUE. ...
...ts( in AString aName ); Parameters aName The variable name to probe. Return value If the variable has been set, the value returned is PR_TRUE. If the variable was not defined in the environment PR_FALSE will be returned. ...
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. ...
...table 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. ...
...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); fp.init(window, "Dialog Title", nsIFilePicker.modeOpen); fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText); fp.open(function (rv) { if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) { var file = fp.file; // Get the path as string. Note that you usually won't // need to work with th...
nsIHttpServer
(not supported) * @param function callback optional callback */ listen: function(port, opt, callback) { if (arguments.length == 2 && "function" == typeof opt) { c...
...f (typeof port === "string" && port.indexOf(':') != -1){ [host, port] = port.split(':'); port = parseInt(port); server.identity.add('http', host, port); } server.wrappedJSObject._start(port, host); return true; }, registerFile: function(path, filePath) { var file = Components.classes['@mozilla.org/file/local;1'] .createInstance(Components.interfaces.nsILocalFile); file.initWithPath(filePath); return server.registerFile(path, file); }, registerDirectory : function(path, directoryPath) { var file = Components.classes['@mozilla.org/file/local;1'] .createInstance(Components.interfac...
... * * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws NS_ERROR_ALREADY_INITIALIZED * if this serve...
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. ...
... 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. ...
... Attributes Attribute Type Description diskSpaceAvailable PRInt64 The number of bytes available to non-superuser on the disk volume containing the nsILocalFile. Read only. followLinks PRBool Determines whether or not the nsILocalFile will automatically resolve symbolic links. By default, this value is false on all non-UNIX systems. As of Mozilla 1.7, this attribute is ignored on UNIX systems. persistentDescriptor ACString On some platforms, the value of nsIFile.path may be insufficient to uniquely identify the file on the local file system. The persistent descriptor is intended to be used whenever a nsILocalFile needs to be serialized to disk and later recovered. This string is not intended for display to users. ...
nsILoginManager
toolkit/components/passwordmgr/public/nsILoginManager.idlScriptable Used to interface with the built-in Password Manager 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Replaces nsIPasswordManager which was used in older versions of Gecko. Implemented by: @mozilla.org/login-manager;1. ...
... Used to interface with the built-in Password Manager 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Replaces nsIPasswordManager which was used in older versions of Gecko. Implemented by: @mozilla.org/login-manager;1. ...
...ol logins, specify the HTTP Realm for which the login applies; this is obtained from the WWW-Authenticate header (see RFC 2617). For form logins, this parameter should be null. An empty string ("") will match any value (except null). logins An array of nsILoginInfo objects. Example This method can be called from JavaScript like this: var logins = myLoginMgr.findLogins({}, 'https://bugzilla.mozilla.org', '', '', {}); getAllDisabledHosts() Returns a list of all hosts for which login saving is disabled. void getAllDisabledHosts( [optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames ); Parameters count The number of elements in the returned array. JavaScript callers can simply use the array's length property and supply a dummy argument for this...
nsIMsgMessageService
status feedback. aUrlListener An nsIUrlListener that is notified when url starts and stops. aConvertData If aConvertData is true, it will create a stream converter from message rfc2822 to */*. aAdditionalHeader Header added to the URI. ...
...2822 to */*. aAdditionalHeader Header added to the URI. ...
... code on a dialog: (taken from Mozillazine) var content = ""; var MessageURI = GetFirstSelectedMessage(); var MsgService = messenger.messageServiceFromURI(MessageURI); var MsgStream = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(); var consumer = MsgStream.QueryInterface(Components.interfaces.nsIInputStream); var ScriptInput = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(); var ScriptInputStream = ScriptInput.QueryInterface(Components.interfaces.nsIScriptableInputStream); ScriptInputStream.init(consumer); try { MsgService.streamMessage(MessageURI, MsgStream, msgWindow, null, false, null); } catch (ex) { alert("error: "+ex) } ScriptInputStream .available(); while (ScriptInputStream .available()) { ...
nsINavBookmarksService
Scriptable 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. ...
...f 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. ...
...rksHTML() Obsolete since Gecko 1.9 (Firefox 3) Saves the current bookmarks hierarchy to a bookmarks.html file. void exportBookmarksHTML( in nsIFile file ); Parameters file The nsIFile to export the bookmarks to. getBookmarkedURIFor() This method is used to see if the given URI is bookmarked, or any page that redirected to it is bookmarked. For example, if I bookmark "mozilla.org" by manually typing it in, and follow the bookmark, I will get redirected to "www.mozilla.org". Logically, this new page is also bookmarked. This function, if given "www.mozilla.org", will return the URI of the bookmark, in this case "mozilla.org". Note: Will only return bookmarks in the first 3 levels of redirection (1 -> 2 -> 3 -> aURI). nsIURI getBookmarkedURIFor( in nsIURI aURI ); P...
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. ...
...criptable 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. ...
... removeObserver( in nsIObserver anObserver, in string aTopic ); Parameters anObserver The nsIObserver instance to remove. aTopic The notification topic or subject. This string-valued key uniquely identifies the notification. This parameter must not be null. Example This notifies all nsIObservers watching the "myTopicID" topic with an additional data parameter. Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService) .notifyObservers(null, "myTopicID", "someAdditionalInformationPassedAs'Data'Parameter"); See also nsObserverService Observer Notifications provides an overview of observers and a list of built-in notifications fired by Mozilla. Usage examples are provided in the nsIObserver documentation. ...
nsIPluginHost
void UserAgent( in nativeChar resultingAgentString ); Parameters Examples List all plug-ins and associated mime types and get handler info This example here logs to Browser Console all the installed plug-ins and the associated mime types. Then using nsIHandlerService it gets the handler info. A handler is, default application that should open or deal with this file. ...
...t all plug-ins and associated mime types and get handler info This example here logs to Browser Console all the installed plug-ins and the associated mime types. Then using nsIHandlerService it gets the handler info. A handler is, default application that should open or deal with this file. ...
...nsole all the installed plug-ins and the associated mime types. Then using nsIHandlerService it gets the handler info. A handler is, default application that should open or deal with this file. ...
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. ...
... 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. ...
...Optional An observer that will be notified when the process exits. The observer will receive this nsIProcess instance as the subject and "process-finished" or "process-failed" as the topic. The observer will be notified on the main thread. holdWeak Optional If true, a weak reference is used to hold the observer. Example // create an nsIFile for the executable var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsIFile); file.initWithPath("c:\\myapp.exe"); // create an nsIProcess var process = Components.classes["@mozilla.org/process/util;1"] .createInstance(Components.interfaces.nsIProcess); process.init(file); // Run the process. // If first param is true, calling thread will be blocked until // cal...
nsIPushSubscription
ion has expired and must be renewed. A subscription expires if its service worker exceeds the quota, or if the desktop-notification permission for its origin is revoked. bool isExpired(); nsIPushSubscription.isExpired() always returns false for system subscriptions. Parameters None. ...
...ssion for its origin is revoked. bool isExpired(); nsIPushSubscription.isExpired() always returns false for system subscriptions. Parameters None. ...
... ...
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. ...
... 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. ...
...ess() Releases a lock on the minimum brightness of the screen, which was previously established through a corresponding call to lockMinimumBrightness(). void unlockMinimumBrightness( in unsigned long brightness ); Parameters brightness The brightness level to release; this must be one of the values specified in Screen brightness constants. ...
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, ...
... message with additional information In this example nsIScriptError, which implements nsIConsoleMessage, is used to log information to the console including information about the source file and line number of the error. ...
...nformation about the source file and line number of the error. function myLogToConsole(aMessage, aSourceName, aSourceLine, aLineNumber, aColumnNumber, aFlags, aCategory) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); var scriptError = Components.classes["@mozilla.org/scripterror;1"] .createInstance(Components.interfaces.nsIScriptError); scriptError.init(aMessage, aSourceName, aSourceLine, aLineNumber, aColumnNumber, aFlags, aCategory); consoleService.logMessage(scriptError); } Categories There are a lot of categories, and they're not all maintained in a single list anywhere in the code. This is an att...
nsITimer
ou 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. Method overview void cancel(); void init(in nsIObserver aObserver, in unsigned long...
...tants defined under Constants on this page. Remarks TYPE_REPEATING_SLACK timer is the preferable repeating timer type for most situations Example Using initWithCallback: // we need an nsITimerCallback compatible... // ... interface for the callbacks. var event = { notify: function(timer) { alert("Fire!"); } } // Now it is time to create the timer... var timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); // ... and to initialize it, we want to call event.notify() ... // ... one time after exactly ten seconds. timer.initWithCallback(event,10000, Components.interfaces.nsITimer.TYPE_ONE_SHOT); Using init, we fire an event every 10 seconds: var event = { observe: function(subject, topic, data) { dump("hello world\n"); } } var t...
...e(Components.interfaces.nsITimer); // ... and to initialize it, we want to call event.notify() ... // ... one time after exactly ten seconds. ...
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 void...
... Note: Currently, this can only be used on Windows (in order to support network principal information in drag operations). Constants kFlavorHasDataProvider (that title needs to be better) Constant Value Description kFlavorHasDataProvider 0 A description is needed here. Common MIME types Some of these need better descriptions, especially the Mozilla-specific ones. Constant Value Description kTextMime text/plain Plain text. kUnicodeMime text/unicode Unicode text. kMozTextInternal text/x-moz-text-internal Text data that isn't meant to be used by non-Mozilla code. kHTMLMime text/html HTML. kAOLMailMime AOLMAIL AOL mail. Need details. kPNGImag...
... HTML. kAOLMailMime AOLMAIL AOL mail. Need details. kPNGImageMime image/png PNG image. kJPEGImageMime image/jpeg JPEG image. kJPGImageMime image/jpg JPEG image. kGIFImageMime image/gif GIF image. kFileMime application/x-moz-file An arbitrary file (is this an nsIFile?) kURLMime text/x-moz-url A Mozilla URL object; this is a text string containing the URL, a newline (\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. kN...
nsIURL
\ \ / \ ----------------------- \ | / \ fileName / ---------------------------- | filePath You can get a nsIURL from an nsIURI, using the QueryInterface() method: var myURI = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService) .newURI("http://developer.mozilla.org", null, null); try { var myURL = myURI.QueryInterface(Components.interfaces.nsIURL); } catch(e) { // the URI is not an URL } Or using instanceof: if (myURI instanceof Components.interfaces.nsIURL) { // Your code here } Method overvie...
...mmon uri portion is the protocol, and any of these if present: login, password, host and port If no commonality is found, "" is returned. If they are identical, the whole path with file/ref/etc. is returned. For file uris, it is expected that the common spec would be at least "file:///" since '/' is a shared common root. ...
...tocol, and any of these if present: login, password, host and port If no commonality is found, "" is returned. If they are identical, the whole path with file/ref/etc. is returned. For file uris, it is expected that the common spec would be at least "file:///" since '/' is a shared common root. ...
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. 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) Implemented by: @mozilla.org/webnavigation-info;1 as a service: var webNavigationInfo = Components.classes["@mozilla.org/webnavigation-info;1"] .getService(Components.interfaces.nsIWebNavigationInfo); Method overview unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav); Constants Support type constants Constant Value Description UNSUPPORTED 0 Returned by isTypeSupported() to indicate lack of support for a type. ...
...hat are in their default state; otherwise, the result is determined based on the configuration of the specified object (that is, how it is configured by using nsIWebBrowserSetup). Return value Returns one of the Support type constants, indicating whether or not the specified MIME type is supported, and in what form that support exists. ...
nsIWinTaskbar
s, tab previews require most of the functionality of the nsITaskbarPreviewController interface be implemented. Warning: This API has undergone changes that are not yet documented. Among these is the addition of the method getOverlayIconController(). This method is currently known to crash if used under certain conditions. See bug 744992 for details and to track progress on a fix. ...
... implemented. Warning: This API has undergone changes that are not yet documented. Among these is the addition of the method getOverlayIconController(). This method is currently known to crash if used under certain conditions. See bug 744992 for details and to track progress on a fix. Implemented by: @mozilla.org/windows-taskbar;1. ...
... in nsITaskbarPreviewController controller ); Parameters shell An nsIDocShell object representing the top-level window from which to create the preview. controller An nsITaskbarPreviewController you implement. Return value An nsITaskbarTabPreview object for the new tab preview. ...
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. To create an instance, use: var zipReader = Components.classes["@mozilla.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)...
... This example uses findEntries, getEntry, getInputStream, open, and close. It also uses nsIScriptableInputStream to read the stream returned by getInputStream. XPI files are ZIP files, just Firefox needs the extension to be XPI. Change "PortableTester@jetpack.xpi" to the name of a XPI file in your extensions folder. Then you can copy and paste this code in scratchpad to run it. ...
... to be XPI. Change "PortableTester@jetpack.xpi" to the name of a XPI file in your extensions folder. Then you can copy and paste this code in scratchpad to run it. ...
Xptcall Porting Guide
Overview xptcall is a library that supports both invoking methods on arbitrary xpcom objects and implementing classes whose objects can impersonate any xpcom interface. It does this using platform specific assembly language code. This code needs to be ported to all platforms that want to support xptcall (and thus mozilla). ...
... Overview xptcall is a library that supports both invoking methods on arbitrary xpcom objects and implementing classes whose objects can impersonate any xpcom interface. It does this using platform specific assembly language code. This code needs to be ported to all platforms that want to support xptcall (and thus mozilla). ...
...e basic functionality as a port is coming together. Not all of the functionality is exercised, but it is a place to get started. xptcall/tests has an api level test for NS_InvokeByIndex, but no tests for the stubs functionality. Such a test ought to be written, but this has not yet been done. A full 'test' at this point requires building the client and running the XPConnect test called TestXPC in mozilla/js/src/xpconnect/tests. Getting these ports done is very important. Please let me know if you are interested in doing one. I'll answer any questions as I get them. Porting Status Original Author: John Bandhauer, 31 May 1999. ...
Address book sync client design
Warning: The content of this article may be out of date. It was imported from mozilla.org and last updated in 2000. by Richard H. Pizzarro <rhp@netscape.com> Contents Overview Client Side Sync Logic Public Interfaces Overview There is an component available in the mozilla tree for performing synchronization operations against a server based address book. The general architecture for the sync component is the following: Mozilla UI AB Sync Logic Mork AB Database Sync Protocol Encoding Sync Protocol Decoding HTTP "POST" API ...
...hitecture for the sync component is the following: Mozilla UI AB Sync Logic Mork AB Database Sync Protocol Encoding Sync Protocol Decoding HTTP "POST" API Mozilla Networking Client Side Sync Logic The client synchronization logic defers to the server peforming some intelligence in handling duplicate entries for the sync process. The static information that is held on the client for address book sync operations is stored in a file called absync.dat which is located in the root directory of the users profile information. /...
...he RET (retry) flag on all records. Then apply the server changes back // to the local database (updating the CRC's in the process). Save the changes to // the local database, clear the sync mapping table flags and save the new sync // mapping table. // Public Interfaces There is a very simple interface to the address book sync component. This interface is defined in mozilla/mailnews/addrbook/public/nsIAbSyncDriver.idl #include "nsrootidl.idl" #include "nsIAbSyncListener.idl" [scriptable, uuid(91FDFEE1-EFBC-11d3-8F97-000073757374)] interface nsIAbSyncDriver : nsIAbSyncListener { void KickIt(); }; As you can see, this is a very simple interface which allows for the starting of the address book sync operation. The interface of greater interest is the addres...
Cached compose window FAQ
Warning: The content of this article may be out of date. It was imported from mozilla.org and last updated in 2003. Seth Spitzer (sspitzer@mozilla.org) What is the "cached" compose window? Instead of destroying the mail compose window on send (or close) just to create a new one the next time, Mozilla Mail will "cache" the compose window on send (or close), and use that instead. The downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing. The upside is that is has been a major performance win Why did you do this? Back 0.9.7, we hit a wall with the compose window. Any new window performance problems that mozilla has are especially painful in mail compose, as we need to create a new compose window on every new mail message or...
...indow. If the user has this usage pattern, we wouldn't have to create a new window. We could just hide it on send, and then show it on the next compose. If the user opens (but never sends or closes compose windows), this trick will not apply to them. But this is not a common usage model. How do I test it? On window and mac, the cached compose window is on by default. To test it start mozilla do new message. this is a new compose window. notice how long it took. close or send the window. (the compose window is now cached) do new message again. this is the cached compose window. it should have been faster than in step 2. close or send the window. (the compose window is cached again) do new message again. this is the cached compose window. it should be as fast as in step 4. ...
...mpose window. it should be as fast as in step 4. ...
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. ...
...All Thunderbird builds are available from the ftp site. References and resources Tools and helper extensions There are many tools available that help with developing Thunderbird extensions. At a minimum you will need: Text editor: Any editor that is capable of writing plain text can be used to write extensions. However...
.... There are also a number of extension and applications that are useful for testing and debugging Thunderbird extensions, such as JavaScript consoles and XPCOM inspectors. These are described on the page "Setting up an extension development environment". Documentation Thunderbird extensions (documentation overview) Firefox addons developer guide (many topics are applicable to Thunderbird) Mozilla cross-reference source code browser ("comm-central" contains the Thunderbird code repository) Community The Thunderbird development community has a mailing list with an extensive searchable archive with an extensive searchable archive. You can also talk with the community on the #maildev IRC channel. Next >> ...
Building a Thunderbird extension 3: install manifest
See developer.thunderbird.net for newer information. The install.rdf file is an XML file that provides general information about the extension. ...
... The install.rdf file is an XML file that provides general information about the extension. ...
...se a new version of your extension. It is not the Thunderbird version number (which is stored in the minVersion and maxVersion fields). <em:creator>jenzed</em:creator>: This optional value is used to store the extension author's name. <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>: This element contains the version id of the application that this add on is developed for. It is defined by Mozilla. A list of valid application ids can be found here. Normally the id does not change and is always the same even for different versions of Thunderbird. <em:minVersion>1.5</em:minVersion>: This element indicates the earliest version of Thunderbird for which the extension is intended to work. Do not use a wildcard (such as "*"). See Valid Application Versions for a list of the supported version num...
Theme Packaging
on a theme in the Appearance section of the Add-ons Manager. It can be any size. icon.png is a 32x32 (max. 48x48) PNG (may contain alpha transparency) which will show up in the Appearance section of the Add-ons Manager. install.rdf Your install.rdf manifest will look something like this: <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:type>4</em:type> more properties </Description> </RDF> Required install.rdf Properties Your install.rdf file must have the following properties. See the install.rdf Reference for more information: em:id em:version em:type em:targetApplication em:name em:internalName Optional install.rdf Properties ...
...quired install.rdf Properties Your install.rdf file must have the following properties. ...
...cation em:name em:internalName Optional install.rdf Properties em:description em:creator em:contributor em:homepageURL em:updateURL Note that if your theme will be made available on the https://addons.mozilla.org website, it may not include an updateURL. Sample install.rdf File <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>{18b64b56-d42f-428d-a88c-baa413bc413f}</em:id> <em:version>1.0</em:version> <em:type>4</em:type> <!-- Target Application this extension can install into, with minimum and maximum supported versions. --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a...
customDBHeaders Preference
using the latest releases, the line should look like: // space-delimited list in the latest code! ...
...omColumnHandler() { gDBView.addColumnHandler("colSuperfluous",columnHandler); dump("column handler being added: " + columnHandler + "\n"); } var CreateDbObserver = { // Components.interfaces.nsIObserver observe: function(aMsgFolder, aTopic, aData) { dump("HERE HERE!"); addCustomColumnHandler(); } } function doOnceLoaded(){ var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); ObserverService.addObserver(CreateDbObserver, "MsgCreateDBView", false); window.document.getElementById('folderTree').addEventListener("select",addCustomColumnHandler,false); } window.addEventListener("load",doOnceLoaded,false); dump(" ~ ~ ~ ~ END SUPERFLUOUS ~ ~ ~ ~ \n"); IMPORTANT Be aware that only message...
... chrome/content/superfluous_overlay.xul \ install.rdf superfluous.xpi: ${DEPS} zip $@ ${DEPS} chrome.manifest: content superfluous chrome/content/ overlay chrome://messenger/content/messenger.xul chrome://superfluous/content/superfluous_overlay.xul install.rdf: <?xml version='1.0' encoding='UTF-8'?> <RDF xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:em='http://www.mozilla.org/2004/em-rdf#'> <Description about='urn:mozilla:install-manifest'> <em:id>superfluous@yoursite.com</em:id> <em:version>0.1.1</em:version> <em:type>2</em:type> <!-- 2 is type 'extension' --> <em:targetApplication> <Description> <!-- This next line identifies TBird as target --> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> ...
Using tab-modal prompts
Disabling tab-modal prompts You can disable tab-modal prompts and get back window-modal prompts by setting the prompts.tab_modal.enabled preference to false. Using tab-modal prompts from chrome code Currently, nsIPrompt defaults to using window-modal prompts. You can force a prompt to be tab-modal using code like this: var theWindow = gBrowser.contentWindow; let prompt = Components.classes["@mozilla.org/prompter;1"] .getService(Components.interfaces.nsIPromptFactory) .getPrompt(theWindow, Components.interfaces.nsIPrompt); let bag = prompt.QueryInterface(Components.interfaces.nsIWritablePropertyBag2); bag.setPropertyAsBool("allowTabModal", true); The var "theWindow" is a reference to the DOM window. Even if you set it to the browser window ("var theWindow = window...
...t.QueryInterface(Components.interfaces.nsIWritablePropertyBag2); bag.setPropertyAsBool("allowTabModal", true); The var "theWindow" is a reference to the DOM window. Even if you set it to the browser window ("var theWindow = window") the modal alert will be shown in the current tab. From then on, you can use the nsIPrompt object, prompt, as usual. ...
...dal prompts when necessary (such as in situations in which tab-modal prompts aren't supported, or for prompts displayed outside the context of a tab).le To use other forms of the prompts of nsIPromptService interface see the Example Code. ...
Add to iPhoto
es we used. Downloading the image The downloadImage() method handles actually downloading the image to a temporary file; it then returns the local pathname of the downloaded file to the caller. ...
...src.slice(src.lastIndexOf("/")+1); // Build the path to download to var dest = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("TmpD", Components.interfaces.nsIFile); dest.append(fileName); dest.createUnique(dest.NORMAL_FILE_TYPE, 0600); var wbp = Components.classes['@mozilla.org/embedding/browser/nsWebBrowserPersist;1'] .createInstance(Components.interfaces.nsIWebBrowserPersist); var ios = Components.classes['@mozilla.org/network/io-service;1'] .getService(Components.interfaces.nsIIOService); var uri = ios.newURI(src, document.characterSet, gBrowser.selectedBrowser.contentDocument.documentURIObject); wbp.persistFlags &= ~Components.inte...
...It gets the filename of the file being download by slicing it off the end of the specified image URL, then obtains the path to the temporary items folder and appends the image file's name to that path. Then we call createUnique() to create a unique file by that name (or a derivative thereof if the name is already in use), and download the contents of the image file to that local file. Clos...
Blocking By Domain - Plugins
as if the plugin were not installed. There are two versions of plugin blocking: First-party Plugin Blocking List Sites on this list may not use plugins. Third-party Plugin Block List Sites on this list may not use plugins when they are loaded into a third-party iframe in another site. Criteria In order to improve Firefox security and performance, there are two major categories of sites Mozilla may choose to add to plugin domain blocking: Sites commonly embedded in a 3rd-party context Web sites which are commonly embedded into other sites using iframes can have a large impact on browser security and also cause many sites to show plugin activation prompts. Sites in this category may include advertisers, social media sites, and other utilities. Top sites Many popular sites work prop...
...tes work properly without plugins, but still prompt users for activation. In order to improve site performance and reduce the number of plugin prompts that users see, popular sites that show unnecessary plugin prompts or slow the browser down with unnecessary plugins will be added to the plugin block list. List Contents and Updates The plugin block lists are freely-licensed lists maintained by Mozilla in github. The initial contents of the third-party plugin block list are based on Disconnect's open source blocklist. Subsequent updates to the list will be made using telemetry from Firefox experiments. In general, sites will not be removed from the list unless there is an error that renders a site in a seriously defective manner. Any concerns or questions about the plugin block lists should be...
... ...
Scripting plugins - Plugins
<< PreviousNext >> XXX: Dummy p element This document describes the new cross-browser NPAPI extensions, commonly called npruntime, that have been developed by a group of browser and plugin vendors, including the Mozilla Foundation, Adobe, Apple, Opera, and Sun Microsystems (see press release). This document also explains how to make a plugin use these new extensions to be scriptable as well as how to access objects in a browser. (A bit of history: NPAPI plugins that used to take advantage of being scriptable via LiveConnect in 4.x Netscape browsers lost this possibility in Mozilla (due to the JNI making the Netscape 4.x JRI obsolete). As an answer to this large gap in the Netscape Plugin API, an extension to the API has been developed that lets plugins be scriptable again, ind...
...he JNI making the Netscape 4.x JRI obsolete). As an answer to this large gap in the Netscape Plugin API, an extension to the API has been developed that lets plugins be scriptable again, independent of Java. This extension will also let plugins access the script objects in the browser, and is thus a much stronger and more flexible API.) The information in this section applies to Firefox 1.0 and Mozilla 1.7.5 and newer versions. How the DOM handles scripting The Mozilla DOM code now checks if a plugin supports this new scriptability API and if it exposes a scriptable object through this new mechanism. Mozilla does this by calling the old plugin API call NPP_GetValue with the new enumeration value that has been added to the NPPVariable enumeration. The new NPPVariable enumeration is defined i...
... new structs: NPString NPVariant NPN_ReleaseVariantValue NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetIntIdentifier NPN_IdentifierIsString NPN_UTF8FromIdentifier NPN_IntFromIdentifier NPObject NPN_Construct (since Firefox 3.0b1) NPN_CreateObject NPN_RetainObject NPN_ReleaseObject NPN_Invoke NPN_InvokeDefault NPN_Enumerate (since Mozilla 1.9a1) NPN_Evaluate NPN_GetProperty NPN_SetProperty NPN_RemoveProperty NPN_HasProperty NPN_HasMethod NPN_SetException NPClass << PreviousNext >> ...
Plugin Roadmap for Firefox - Plugins
The last remaining NPAPI plugin, Adobe Flash, has announced an end-of-life plan. To support the transition away from Flash, Firefox is working with other browsers to progressively and carefully make Flash usage less common. Below is the roadmap of past and future support for plugins in Firefox. Schedule June 2016 Starting with Firefox 47 in June 2016, all plugins other than Adobe Flash are click-to-activate. Users choose which sites are allowed to activate each plugin. ...
...pport Release 52 will continue to support non-Flash plugins until early 2018. August 2017 Starting with Firefox 55 in August 2017, users must choose which sites are allowed to activate the Flash plugin. Users will have the choice to remember the Flash setting per-site. This change will be rolled out progressively during August and September 2017. In order to improve security and performance, Mozilla will maintain a list of sites which cannot use any plugins. September 2017 Starting with Firefox 56 in September 2017, Firefox for Android will remove all support for plugins (bug 1381916). 2019 In September 2019, Firefox 69 will remove the "Always Activate" Flash option so we always ask for user permission before activating Flash on a website. 2020 In December 2020, Flash support will be c...
...roid will remove all support for plugins (bug 1381916). 2019 In September 2019, Firefox 69 will remove the "Always Activate" Flash option so we always ask for user permission before activating Flash on a website. 2020 In December 2020, Flash support will be completely removed from consumer versions of Firefox. Adobe will stop shipping security updates for Flash at the end of 2020. ...
Network request list - Firefox Developer Tools
an combine different filters together by separating them with a space. Keyword Meaning Examples status-code Shows resources that have the specific HTTP status code. status-code:304 method Shows resources that have were requested via the specific HTTP request method. method:post domain Shows resources coming from a specifc domain. domain:mozilla.org remote-ip Shows resources coming from a server with the specified IP. remote-ip:63.245.215.53 remote-ip:[2400:cb00:2048:1::6810:2802] cause Shows resources matching a specific cause type. The types can be found in the description of the cause column. cause:js cause:stylesheet cause:img transferred Shows resources having a specific transfer...
... Shows resources transferred via the given scheme. scheme:http has-response-header Shows resources that contain the specified HTTP response header. has-response-header:cache-control has-response-header:X-Firefox-Spdy set-cookie-domain Shows the resources that have a Set-Cookie header with a Domain attribute that matches the specified value. set-cookie-domain:.mozilla.org set-cookie-name Shows the resources that have a Set-Cookie header with a name that matches the specified value. set-cookie-name:_ga set-cookie-value Shows the resources that have a Set-Cookie header with a value that matches the specified value. set-cookie-value:true regexp Shows the resources having a URL that matches the given regular expression. ...
... Shows the resources that have a Set-Cookie header with a name that matches the specified value. set-cookie-name:_ga set-cookie-value Shows the resources that have a Set-Cookie header with a value that matches the specified value. set-cookie-value:true regexp Shows the resources having a URL that matches the given regular expression. regexp:\d{5} regexp:mdn|mozilla For example, to find all 404, not found, errors, you can type "404" into the search and auto-complete suggests "status-code:404" so you'll end up with something like this: Search in requests Use the Search panel to run a full-text search on headers and content. Click the Search icon in the toolbar. This opens the Search sidebar. Enter a string in the search field of the sidebar,...
Using the CSS Typed Object Model - Web APIs
<button>Styled Button</button> // get the element const button = document.querySelector( 'button' ); // Retrieve all co...
... We've created a blue button with a magic wand background image.
...(1px, 1px, 3px), the .get('transform') would have returned a CSSTranslate with CSSUnitValues for x, y, and z, and the readonly .is2D property would have been false. CSSImageValue Our button has one background image: a magic wand. let bgImage = allComputedStyles.get('background-image'); console.log( bgImage ); // CSSImageValue console.log( bgImage.toString() ); // url("https://mdn.mozillademos.org/files/16793/magicwand.png") When we get() the 'background-image', a CSSImageValue is returned. While we used the CSS background shorthand property, the inherited Object.prototype.toString() method, shows we returned only the image, 'url("https://mdn.mozillademos.org/files/16793/magicwand.png")'. Notice that the value returned is the absolute path to the image -- this is returned even i...
Pixel manipulation with canvas - Web APIs
yerY, then we look up the pixel data on that position in the pixel array that getImageData() provides us. Finally, we use the array data to set a background color and a text in the <div> to display the color. ...
... green and blue. You can also use a weighted average, given by the formula x = 0.299r + 0.587g + 0.114b, for example. See Grayscale on Wikipedia for more information. ...
...e imageSmoothingEnabled property (which needs prefixes for different browsers). ...
Document.createElementNS() - Web APIs
mation on how to use this parameter. The new element will be given an is attribute whose value is the custom element's tag name. Custom elements are an experimental feature only available in some browsers. Return value The new Element. ...
...s attribute whose value is the custom element's tag name. Custom elements are an experimental feature only available in some browsers. Return value The new Element. ...
...http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul XBL http://www.mozilla.org/xbl Example This creates a new <div> element in the XHTML namespace and appends it to the vbox element. ...
Element.setAttributeNodeNS() - Web APIs
setAttributeNodeNS adds a new namespaced attribute node to an element. Syntax replacedAttr = element.setAttributeNodeNS(attributeNode) replacedAttr is the replaced attribute node, if any, returned by this function. attributeNode is an Attr node. ...
... attribute node to an element. Syntax replacedAttr = element.setAttributeNodeNS(attributeNode) replacedAttr is the replaced attribute node, if any, returned by this function. attributeNode is an Attr node. ...
..."); var d2 = document.getElementById("two"); var a = d1.getAttributeNodeNS(myns, "special-align"); d2.setAttributeNodeNS(a.cloneNode(true)); alert(d2.attributes[1].value) // returns: `utterleft' Notes If the specified attribute already exists on the element, then that attribute is replaced with the new one and the replaced one is returned. Note that if you try to set without cloning the node, Mozilla gives an NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR "Attribute already in use" error, as the DOM requires cloning for Attr to be reused (unlike other Nodes which can be moved). DOM methods dealing with element's attributes: Not namespace-aware, most commonly used methods Namespace-aware variants (DOM Level 2) DOM Level 1 methods for dealing with Attr nodes directly (seldom used) DOM Level 2 namespace-a...
EventTarget.addEventListener() - Web APIs
quest). 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 itself. opt...
...s inherit the this binding of the containing function. That means that the variables and constants available to the containing function are also available to the event handler when using an arrow function. ...
...available to the event handler when using an arrow function. ...
History.replaceState() - Web APIs
sers currently ignore this parameter, although they may use it in the future. Passing the empty string here should be safe against future changes to the method. Alternatively, you could pass a short title for the state. url Optional The URL of the history entry. The new URL must be of the same origin as the current URL; otherwise replaceState throws an exception. ...
...s the current URL; otherwise replaceState throws an exception. Examples Suppose https://www.mozilla.org/foo.html executes the following JavaScript: const stateObj = { foo: 'bar' }; history.pushState(stateObj, '', 'bar.html'); The explanation of these two lines above can be found in the Example of pushState() method section of the Working with the History API article. Then suppose https://www.mozilla.org/bar.html executes the following JavaScript: history.replaceState(stateObj, '', 'bar2.html'); This will cause the URL bar to display https://www.mozilla.org/bar2.html, but won't cause the browser to load bar2.html or even check that bar2.html exists. Suppose now that the user navigates to https://www.microsoft.com, then clicks the Back button. At this point, the URL bar will display https:/...
...bar.html executes the following JavaScript: history.replaceState(stateObj, '', 'bar2.html'); This will cause the URL bar to display https://www.mozilla.org/bar2.html, but won't cause the browser to load bar2.html or even check that bar2.html exists. Suppose now that the user navigates to https://www.microsoft.com, then clicks the Back button. At this point, the URL bar will display https://www.mozilla.org/bar2.html. If the user now clicks Back again, the URL bar will display https://www.mozilla.org/foo.html, and totally bypass bar.html. Specifications Specification Status Comment HTML Living StandardThe definition of 'History.replaceState()' in that specification. Living Standard No change from HTML5. HTML5The definition of 'History.replaceState()' in t...
InstallTrigger - Web APIs
ature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The InstallTrigger interface is an interesting outlier in the Apps API; it's included in this API but are inherited from the old Mozilla XPInstall technology for installing add-ons. It is used for triggering the download and installation of an add-on (or anything packaged in an .xpi file) from a Web page, using JavaScript code to kick off the install process. Note: This article needs to be updated somewhat. Overview For very simple installations, the install methods on the InstallTrigger object...
...at XPI. The principal method on the InstallTrigger object is install, which downloads and installs one or more software packages archived in the XPI file format. The following is a basic example of an install trigger on a web page: xpi={'XPInstall Dialog Display Name':'simple.xpi'}; InstallTrigger.install(xpi); You can also use the InstallTrigger object to install Netscape 6/Mozilla skins and language packs, and perform multiple-package installations with install. compareVersion Compares the version of a file or package with the version of an existing file or package. enabled Indicates whether or not Software Installation is enabled for this client machine. getVersion Returns an object representing the version number f...
...n is enabled for this client machine. 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. install Installs one or more XPI files on the local machine. installChrome Installs new skin or locale packages in Netscape 6 and Mozilla. startSoftwareUpdate Triggers the downloading and installation of the software at the specified URL. ...
Location: host - Web APIs
Web › API › Location › host
The host property of the Location interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. ...
... The host property of the Location interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. ...
...the Location interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. Syntax string = object.host; object.host = string; Examples var anchor = document.createElement("a"); anchor.href = "https://developer.mozilla.org/Location.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/Location.host" anchor.host == "developer.mozilla.org" // The port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/Location.host" anchor.host == "developer.mozilla.org:4097" Specifications Specification Status Comment HTML Living StandardThe definition of 'host' in that specification. Living St...
Location - Web APIs
Web › API › Location
turns a USVString containing the whole URL. It is a synonym for HTMLHyperlinkElementUtils.href, though it can't be used to modify the value. ...
...be used to modify the value. ...
...ternative is to browse to the URL and use document.location or window.location var url = document.createElement('a'); url.href = 'https://developer.mozilla.org:8080/search?q=URL#search-results-close-container'; console.log(url.href); // https://developer.mozilla.org:8080/search?q=URL#search-results-close-container console.log(url.protocol); // https: console.log(url.host); // developer.mozilla.org:8080 console.log(url.hostname); // developer.mozilla.org console.log(url.port); // 8080 console.log(url.pathname); // /search console.log(url.search); // ?q=URL console.log(url.hash); // #search-results-close-container console.log(url.origin); // https://developer.mozilla.org:8080 Specifications Specification Status Comment HTML Living Standard...
RTCConfiguration.iceServers - Web APIs
ile a connection is already active by calling the the RTCPeerConnection method setConfiguration(), no immediate effect occurs. However, the new list of servers is used for any future renegotiation, such as while handling an ICE restart. Examples The configuration below opens a new peer connection, specifying two servers for the ICE agent to use for negotiation. ...
...nfiguration below opens a new peer connection, specifying two servers for the ICE agent to use for negotiation. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
... two servers for the ICE agent to use for negotiation. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
RTCConfiguration - Web APIs
generated automatically. One obvious benefit to providing your own is identity key continuity--if you use the same certificate for subsequent calls, the remote peer can tell you're the same caller. This also avoids the cost of generating new keys. <<<--- add link to information about identity --->>> Example The configuration below establishes two ICE servers. ...
...-- add link to information about identity --->>> Example The configuration below establishes two ICE servers. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
... The configuration below establishes two ICE servers. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
RTCIceServer - Web APIs
specification and should not be used. url This obsolete property is a string specifies a single ICE server's URL. Do not use this property; use urls instead. Because many older books and examples still use this, we include it to help developers update their code or make sense of older examples. Example The configuration below establishes two ICE servers. ...
...ate their code or make sense of older examples. Example The configuration below establishes two ICE servers. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
... The configuration below establishes two ICE servers. The first one, stun:stun.services.mozilla.com, requires authentication, so the username and password are provided. The second server has two URLs: stun:stun.example.com and stun:stun-1.example.com. ...
URL.host - Web APIs
Web › API › URL › host
The host property of the URL interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', followed by the port of the URL. Note: This feature is available in Web Workers. Syntax const host = url.host url.host = newHost Value A USVString. ...
...USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', followed by the port of the URL. Note: This feature is available in Web Workers. Syntax const host = url.host url.host = newHost Value A USVString. ...
...the URL is nonempty, a ':', followed by the port of the URL. Note: This feature is available in Web Workers. Syntax const host = url.host url.host = newHost Value A USVString. Examples let url = new URL('/docs/Web/API/URL/host'); console.log(url.host); // "developer.mozilla.org" url = new URL('https://developer.mozilla.org:443/docs/Web/API/URL/host'); console.log(url.host); // "developer.mozilla.org" // The port number is not included because 443 is the scheme's default port url = new URL('https://developer.mozilla.org:4097/docs/Web/API/URL/host'); console.log(url.host); // "developer.mozilla.org:4097" Specifications Specification Status Comment URLThe definition of 'URL.host' in that specification. Living Standard Initial definition ...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
#000000; text-decoration: underline; } #info { width: 180px; height: 150px; float: right; background-color: #eeeeff; padding: 4px; overflow: auto; font-size: 12px; margin: 4px; border-radius: 5px; /* visibility: hidden; */ } </style> </head> <body> <p id="copyleft" style="font-style: italic; font-size: 12px; text-align: center;">CopyLeft 2012 by <a href="https://developer.mozilla.org/" target="_blank">Mozilla Developer Network</a></p> <p id="controls" style="text-align: center;">[&nbsp;<span class="intLink" onclick="oTWExample1.play();">Play</span> | <span class="intLink" onclick="oTWExample1.pause();">Pause</span> | <span class="intLink" onclick="oTWExample1.terminate();">Terminate</span>&nbsp;]</p> <div id="info"> Vivamus blandit massa ut metus mattis in fringilla lectu...
...out() or setInterval(). The following IE-specific code demonstrates a method for overcoming this limitation. To use, simply add the following code to the top of your script. /*\ |*| |*| IE-specific polyfill that enables the passage of arbitrary arguments to the |*| callback functions of javascript timers (HTML5 standard syntax). ...
...upport for init and onstart functions declarable during the instantiation of the daemon. So the MiniDaemon framework remains the recommended way for simple animations, because Daemon without its collection of methods is essentially a clone of it. minidaemon.js /*\ |*| |*| :: MiniDaemon :: |*| |*| Revision #2 - September 26, 2014 |*| |*| /docs/Web/API/Window.setInterval |*| https://developer.mozilla.org/User:fusionchess |*| https://github.com/madmurphy/minidaemon.js |*| |*| This framework is released under the GNU Lesser General Public License, version 3 or later. |*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function MiniDaemon (oOwner, fTask, nRate, nLen) { if (!(this && this instanceof MiniDaemon)) { return; } if (arguments.length < 2) { throw new TypeError('MiniDaemon - n...
Sending and Receiving Binary Data - Web APIs
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 from a file. ...
...omatically: // Make a stream from a file. ...
...*/ req.setRequestHeader('Content-Type', mimeType); req.send(stream); ...
Resources - Web APIs
...
... ...
... ...
:where() - CSS: Cascading Style Sheets
Web › CSS › :where
s 0 specificity, whereas :is() takes on the specificity of the most specific selector in its arguments. Examples Comparing :where() and :is() This example shows how :where() works, and also illustrates the difference between :where() and :is(). Take the following HTML: <article> <h2>:is()-styled links</h2> <section class="is-styling"> <p>Here is my main content. This <a href="https://mozilla.org">contains a link</a>. </section> <aside class="is-styling"> <p>Here is my aside content. This <a href="https://developer.mozilla.org">also contains a link</a>. </aside> <footer class="is-styling"> <p>This is my footer, also containing <a href="https://github.com/mdn">a link</a>. </footer> </article> <article> <h2>:where()-styled links</h2> <section class="where-stylin...
... </aside> <footer class="where-styling"> <p>This is my footer, also containing <a href="https://github.com/mdn">a link</a>. ...
...is-styling"> <p>This is my footer, also containing <a href="https://github.com/mdn">a link</a>. </footer> </article> <article> <h2>:where()-styled links</h2> <section class="where-styling"> <p>Here is my main content. This <a href="https://mozilla.org">contains a link</a>. </section> <aside class="where-styling"> <p>Here is my aside content. This <a href="https://developer.mozilla.org">also contains a link</a>. </aside> <footer class="where-styling"> <p>This is my footer, also containing <a href="https://github.com/mdn">a link</a>. </footer> </article> In this somewhat-contrived example, we have two articles that each contain a section, an aside, and a footer. They differ by the classes used to mark the child elements. To make selecting the links inside them s...
@document - CSS: Cascading Style Sheets
Web › CSS › @document
y and Beta -- an experiment designed to mitigate potential CSS injection attacks (See bug 1035091). ...
... ...
... ...
Resizing background images with background-size - CSS: Cascading Style Sheets
ired. Tiling a large image Let's consider a large image, a 2982x2808 Firefox logo image. We want (for some reason likely involving horrifyingly bad site design) to tile four copies of this image into a 300x300-pixel element. To do this, we can use a fixed background-size value of 150 pixels. ...
...s that, regardless of the size of the containing box, the background image should be scaled so that each side is as large as possible while not exceeding the length of the corresponding side of the container. Try resizing the example below to see this in action. ...
...er The cover value specifies that the background image should be sized so that it is as small as possible while ensuring that both dimensions are greater than or equal to the corresponding size of the container. Try resizing the example below to see this in action. ...
background-repeat - CSS: Cascading Style Sheets
</li> <li>repeat-y <div class="four"></div> </li> <li>space <div class="five"></div> </li> <li>round <div class="six"></div> </li> <li>repeat-x, repeat-y (multiple images) <div class="seven"></div> </li> </ol> CSS /* Shared for all DIVS in example */ ol, li { margin: 0; padding: 0; } li { margin-bottom: 12px; } div { background-image: url(https://mdn.mozillademos.org/files/12005/starsolid.gif); width: 160px; height: 70px; } /* Background repeats */ .one { background-repeat: no-repeat; } .two { background-repeat: repeat; } .three { background-repeat: repeat-x; } .four { background-repeat: repeat-y; } .five { background-repeat: space; } .six { background-repeat: round; } /* Multiple images */ .seven { background-image: url(http...
... Specifications Specification Status Comment CSS Background...
... Specifications Specification Status Comment CSS Backgrounds and Borders Module Level 3The definition of 'background-repeat' in that specification. ...
image() - CSS: Cascading Style Sheets
dding allows only including background colors should an image fail to load, which means you can add a fall back color should a transparent PNG/GIF/WebP not load. Examples Directionally-sensitive images <ul> <li dir="ltr">Bullet is a right facing arrow on the left</li> <li dir="rtl">Bullet is the same arrow, flipped to point left.</li> </ul> ul { list-style-image: image(ltr 'https://mdn.mozillademos.org/files/16412/rightarrow.png'); } In the left-to-right list items -- those with dir="ltr" set on the element itself or inheriting the directionality from an ancestor or default value for the page -- the image will be used as-is. List items with dir="rtl" set on the <li> or inheriting the right-to-left directionality from an ancestor, such as documents set to Arabic or Hebrew, will have th...
...right-to-left directionality from an ancestor, such as documents set to Arabic or Hebrew, will have the bullet display on the right, horizontally flippled, as if transform: scalex(-1) had been set. The text will also be displayed left-to-right. Displaying a section of the background image <div class="box">Hover over me. What cursor do you see?</div> .box:hover { cursor: image("https://mdn.mozillademos.org/files/16411/sprite.png#xywh=32,64,16,16"); } When the user hovers over the box, the cursor will change to display the 16x16 px section of the sprite image, starting at x=32 and y=64. Providing fallback images .help::before { content: image("try.webp", "try.svg", "try.gif"); } In this example, the browser will display an image as generated content before the content of the element...
...of the element with the class of help. The image displayed will be a WebP image, if WebP is supported. If not, the SVG example will be shown. If SVG is not supported, the GIF version will display. Putting color on top of a background image .quarterlogo {height: 200px; width: 200px; border: 1px solid;} .quarterlogo { background-image: image(rgba(0, 0, 0, 0.25)), url("https://mdn.mozillademos.org/files/12053/firefox.png"); background-size: 25%; background-repeat: no-repeat; } <div class="quarterlogo">If supported, a quarter of this div has a darkened logo</div> The above will put a semi-transparent black mask over the Firefox logo background image. Had we used the background-color property instead, the color would have appeared behind the logo image instead of on top of it...
url() - CSS: Cascading Style Sheets
Web › CSS › url()
e attr() function. Depending on the property for which it is a value, the resource sought can be an image, font, or a stylesheet. The url() functional notation is the value for the <url> data type. ...
...s/16761/star.gif"); list-style-image: url('../images/bullet.jpg'); content: url("pdficon.jpg"); cursor: url(mycursor.cur); border-image-source: url(/media/diamonds.png); src: url('fantasticfont.woff'); offset-path: url(#path); mask-image: url("masks.svg#mask1"); /* Properties with fallbacks */ cursor: url(pointer.cur), pointer; /* Associated short-hand properties */ background: url('https://mdn.mozillademos.org/files/16761/star.gif') bottom right repeat-x blue; border-image: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* As a parameter in another CSS function */ background-image: cross-fade(20% url(first.png), url(second.png)); mask-image: image(url(mask.png), skyblue, linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* as part of a non-shorthand multiple value */ content: url(st...
... url() function may support specifying a modifier, an identifier or a functional notation, which alters the meaning of the URL string.This is not supported and not fully defined in the specification. ...
Demos of open web technologies
This page offers links to interesting demonstrations of these technologies. If you know of a good demonstration or application of open web technology, please add a link to the appropriate section here. ...
...den (source code) Multi touch in canvas demo (source code) SVG Bubblemenu (visual effects and interaction) HTML transformations using foreignObject (visual effects and transforms) Phonetics Guide (interactive) 3D objects demo (interactive) Blobular (interactive) Video embedded in SVG (or use the local download) Summer HTML image map creator (source code) Video Video 3D Animation "mozilla constantly evolving" Video 3D animation "Floating Dance" Streaming Anime, Movie Trailer and Interview Billy's Browser Firefox Flick Virtual Barber Shop Transformers Movie Trailer A Scanner Darkly Movie Trailer (with built in controls) Events firing and volume control Dragable and sizable videos 3D Graphics WebGL Web Audio Fireworks IoQuake3 (source code) Escher puzzle (source code...
...p Transformers Movie Trailer A Scanner Darkly Movie Trailer (with built in controls) Events firing and volume control Dragable and sizable videos 3D Graphics WebGL Web Audio Fireworks IoQuake3 (source code) Escher puzzle (source code) Kai 'Opua (source code) Virtual Reality The Polar Sea (source code) Sechelt fly-through (source code) CSS CSS Zen Garden CSS floating logo "mozilla" Paperfold CSS Blockout Rubik's cube Pure CSS Slides Planetarium (source code) Loader with blend modes Text reveal with clip-path Ambient shadow with custom properties Luminiscent vial CSS-based single page application (source code) Transformations Impress.js (source code) Games IoQuake3 (source code) Kai 'Opua (source code) Web APIs Notifications API HTML5 Notificat...
regexp:match() - EXSLT
Web › EXSLT › regexp › match
case insensitive fashion. Returns A node set of match elements, each of which has the string value equal to a portion of the first parameter string as captured by the regular expression. If the match isn't a global one, the first match element has the value of the portion of the string matched by the entire regular expression. ...
...string matched by the entire regular expression. ...
...select="regExp:match('http://developer.mozilla.org/en/docs/Firefox_3_for_developers', '(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> This code generates the following output: Part 1 = http://developer.mozilla.org/en/docs/Firefox_3_for_developers Part 2 = http Part 3 = developer.mozilla.org Part 4 = Part 5 = /en/docs/Firefox_3_for_developers Specifications EXSLT - REGEXP:MATCH ...
Event developer guide - Developer guides
Web › Guide › Events
events triggered by user interaction evolved during the early years of browser design and include a complicated system defining the sequence in which events will be called and the manner in which that sequence can be controlled. The different types of user interaction-driven events include: the original 'click' event, mouse events, mouse gesture events, and both touch events and the earlier mozilla experimental touch events, now deprecated. The modification of the web page in structure or content might trigger some events, as explained in the mutation events page, but the use of these events has been deprecated in favour of the lighter Mutation Observer approach. The media streams embedded in the HTML documents might trigger some events, as explained in the media events page. The networ...
... 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 and motion data explainedWhen using orie...
...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 orien...
contextmenu - HTML: Hypertext Markup Language
om/samples/a2/b601bdfc0c.png" contextmenu="ChangeImage" id="promoButton" /> <menu type="context" id="ChangeImage"> <menuitem label="Change Image" onclick="changeImage()"></menuitem> </menu> </li> </ol> </body> JavaScript function shareViaTwitter() { window.open("https://twitter.com/intent/tweet?text=" + "Hurray! ...
...> <menuitem label="Change Image" onclick="changeImage()"></menuitem> </menu> </li> </ol> </body> JavaScript function shareViaTwitter() { window.open("https://twitter.com/intent/tweet?text=" + "Hurray! ...
...?u=" + "https://developer.mozilla.org/en/HTML/Element/Using_HTML_context_menus"); } function incFont() { document.getElementById("fontSizing").style.fontSize = "larger"; } function decFont() { document.getElementById("fontSizing").style.fontSize = "smaller"; } function changeImage() { var index = Math.ceil(Math.random() * 39 + 1); document.images[0].src = "https://developer.mozilla.org/media/img/promote/promobutton_mdn" + index + ".png"; } Result Specifications Specification Status Comment HTML 5.1The definition of 'contextmenu' in that specification. Recommendation Snapshot of HTML Living Standard, initial definition. ...
Access-Control-Allow-Origin - HTTP
ull" header, and any origin can create a hostile document with a "null" Origin. ...
... CORS and caching If the server sends a response with ...
...n value. CORS and caching If the server sends a response with an Access-Control-Allow-Origin value that is an explicit origin (rather than the "*" wildcard), then the response should also include a Vary response header with the value Origin -- to indicate to browsers that server responses can differ based on the value of the Origin request header. Access-Control-Allow-Origin: https://developer.mozilla.org Vary: Origin Specifications Specification Status Comment FetchThe definition of 'Access-Control-Allow-Origin' in that specification. Living Standard Initial definition. ...
Referrer-Policy - HTTP
sheet's response. For <style> elements or style attributes, the owner document's referrer policy is used. ...
...example.com/page https://example.com/otherpage https://example.com/page https://mozilla.org https://example.com/page http://example.org (no referrer) origin https://example.com/page anywhere https://example.com/ origin-when-cross-origin https://example.com/page https://example.com/otherpage https://example.com/page https://mozilla.org https://example.com/ http://example.com/page https://example.com/ same-origin https://example.com/page https://example.com/otherpage https://example.com/page https://mozilla.org (no referrer) strict-origin https://example.com/page https://mozilla.org https://example.com/ http://example.org (no referrer) http:/...
... https://mozilla.org (no referrer) strict-origin https://example.com/page https://mozilla.org https://example.com/ http://example.org (no referrer) http://example.com/page anywhere http://example.com/ strict-origin-when-cross-origin https://example.com/page https://example.com/otherpage https://example.com/page https://mozilla.org https://example.com/ http://example.org (no referrer) unsafe-url https://example.com/page?q=123 anywhere https://example.com/page?q=123 Specifying a fallback policy If you want to specify a fallback policy in any case the desired policy hasn't got wide enough browser support, use a comma-separated list with the desired policy specified last: Referrer-...
X-DNS-Prefetch-Control - HTTP
nt, like this: <meta http-equiv="x-dns-prefetch-control" content="off"> You can reverse this setting by setting content to "on". ...
..."off"> You can reverse this setting by setting content to "on". Forcing lookup of specific hostnames You can force the lookup of specific hostnames without providing specific anchors using that hostname by using the rel attribute on the <link> element with a link type of dns-prefetch: <link rel="dns-prefetch" href="https://www.mozilla.org/contribute/"> In this example, the domain name "www.mozilla.org/contribute" will be pre-resolved. ...
...on the <link> element with a link type of dns-prefetch: <link rel="dns-prefetch" href="https://www.mozilla.org/contribute/"> In this example, the domain name "www.mozilla.org/contribute" will be pre-resolved. Similarly, the link element can be used to resolve hostnames without providing a complete URL, but only, by preceding the hostname with two slashes: <link rel="dns-prefetch" href="//www.mozilla.org/contribute/"> Forced prefetching of hostnames might be useful, for example, on the homepage of a site to force pre-resolution of domain names that are referenced frequently throughout the site even though they are not used on the home page itself. This will improve the overall performance of site even though the performance of the home page may not be affected. ...
A typical HTTP session - HTTP
Web › HTTP › Session
ion about what type of data is appropriate (e.g., what language, what MIME types), or other data altering its behavior (e.g., not sending an answer if it is already cached). These HTTP headers form a block which ends with an empty line. The final block is an optional data block, which may contain further data mainly used by the POST method. Example requests Fetching the root page of developer.mozilla.org, i.e. http://developer.mozilla.org/, and telling the server that the user-agent would prefer the page in French, if possible: GET / HTTP/1.1 Host: developer.mozilla.org Accept-Language: fr Observe that final empty line, this separates the data block from the header block. As there is no Content-Length provided in an HTTP header, this data block is presented empty, marking the end of the he...
...anguage: fr Observe that final empty line, this separates the data block from the header block. As there is no Content-Length provided in an HTTP header, this data block is presented empty, marking the end of the headers, allowing the server to process the request the moment it receives this empty line. For example, sending the result of a form: POST /contact_form.php HTTP/1.1 Host: developer.mozilla.org Content-Length: 64 Content-Type: application/x-www-form-urlencoded name=Joe%20User&request=Send%20me%20one%20of%20your%20catalogue Request methods HTTP defines a set of request methods indicating the desired action to be performed upon a resource. Although they can also be nouns, these requests methods are sometimes referred as HTTP verbs. The most common requests are GET and POST: The...
...(contains a site-customized page helping the user to find the missing r...
About JavaScript - JavaScript
ct construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for ... in), and source code recovery (JavaScript programs can decompile function bodies back into their source text). For a more in depth discussion of JavaScript programming follow the JavaScript resources links below. What JavaScript implementations are available? The Mozilla project provides two JavaScript implementations. The first ever JavaScript was created by Brendan Eich at Netscape, and has since been updated to conform to ECMA-262 Edition 5 and later versions. This engine, code named SpiderMonkey, is implemented in C/C++. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation written in Java. Like SpiderMonkey, Rhi...
...s used in the Google Chrome browser and recent versions of Opera browser. This is also the engine used by Node.js. The JavaScriptCore (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari. Carakan in old versions of Opera. The Chakra engine used in Internet Explorer (although the language it implements is formally called "JScript" in order to avoid trademark issues). Each of Mozilla's JavaScript engines expose a public API which application developers can use to integrate JavaScript into their software. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create host objects responsible for reflecting the DOM into JavaScript. Another common application for JavaScript is as a (Web) server side scripting languag...
...M into JavaScript. Another common application for JavaScript is as a (Web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages. Node.js is a popular example of this. JavaScript resources SpiderMonkey Information specific to Mozilla's implementation of JavaScript in C/C++ engine (aka SpiderMonkey), including how to embed it in applications. Rhino Information specific to the JavaScript implementation written in Java (aka Rhino). Language resources Pointers to published JavaScript standards. A re-introduction to JavaScript JavaScript guide and JavaScript reference. JavaScript(R) is a trademark or registered trademar...
Closures - JavaScript
ination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time. Lexical scoping Consider the following example code: function init() { var name = 'Mozilla'; // name is a local variable created by init function displayName() { // displayName() is the inner function, a closure alert(name); // use variable declared in the parent function } displayName(); } init(); init() creates a local variable called name and a function called displayName(). The displayName() function is an inner function that is defined inside init() and is available on...
...ibes how a parser resolves variable names when functions are nested. The word lexical refers to the fact that lexical scoping uses the location where a variable is declared within the source code to determine where that variable is available. Nested functions have access to variables declared in their outer scope. Closure Consider the following code example: function makeFunc() { var name = 'Mozilla'; function displayName() { alert(name); } return displayName; } var myFunc = makeFunc(); myFunc(); Running this code has exactly the same effect as the previous example of the init() function above. What's different (and interesting) is that the displayName() inner function is returned from the outer function before being executed. At first glance, it might seem unintuitive that thi...
...ts of any local variables that were in-scope at the time the closure was created. In this case, myFunc is a reference to the instance of the function displayName created when makeFunc is run. The instance of displayName maintains a reference to its lexical environment, within which the variable name exists. For this reason, when myFunc is invoked, the variable name remains available for use, and "Mozilla" is passed to alert. Here's a slightly more interesting example--a makeAdder function: function makeAdder(x) { return function(y) { return x + y; }; } var add5 = makeAdder(5); var add10 = makeAdder(10); console.log(add5(2)); // 7 console.log(add10(2)); // 12 In this example, we have defined a function makeAdder(x), that takes a single argument x, and returns a new function. The fun...
Destructuring assignment - JavaScript
portions of the string that matched each parenthesized group in the regular expression. Destructuring assignment allows you to unpack the parts out of this array easily, ignoring the full match if it is not needed. ...
...group in the regular expression. Destructuring assignment allows you to unpack the parts out of this array easily, ignoring the full match if it is not needed. ...
... let a, b; ({a, b} = {a: 1, b: 2}); Notes: The parenthes...
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
sources are used for the compatibility tables on SVG elements and attributes: 4 Content type NeedsTechnicalReview, SVG, Types, data types SVG makes use of a number of data types. This article lists these types along with their syntax and descriptions of what they're used for. 5 Linking Guide, SVG The target attribute on the SVG <a> element doesn't work in Mozilla Firefox 1.5. When SVG documents are embedded within a parent HTML document using the 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 name...
... Here is a list of additional resources on SVG: 9 Project SVG No summary! 10 Replaced Element SVG This page was auto-generated because a user created a sub-page to this page. 11 SVG 1.1 Support in Firefox Firefox, SVG You can find some basic examples of SVG syntax and usage in the W3C SVG test suite. 12 SVG 2 support in Mozilla Firefox, SVG SVG 2 is the next major version of the SVG standard, which is a complete rework of the SVG 1.2 draft. 13 SVG Attribute reference Drawing, Landing, NeedsHelp, Overview, Responsive Design, SVG, SVG Attribute, SVG Reference, Vector Graphics SVG elements can be modified using attributes that specify details about exactly how the element should be handled or...
...er 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. ...
Index - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Index
eb, XSLT Extensible Stylesheet Language Transformations (XSLT) is an XML-based language used, in conjunction with specialized processing software, for the transformation of XML documents. 2 Common XSLT Errors XSLT Your server needs to 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...
... 19 XSLT elements reference Element, Overview, Reference, XSLT There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either ...
...amazon.com/XSLT-Programme.../dp/0764543814 16 Resources Extensions, NeedsContent, NeedsExample, NeedsLiveSample, XML, xsl No summary! 17 The Netscape XSLT/XPath Reference Netscape, Reference, XSLT, axes No summary! 18 Using the Mozilla JavaScript interface to XSL Transformations XSLT This document describes the JavaScript interface in Mozilla 1.2 and up to the XSLT Processing Engine (TransforMiiX). 19 XSLT elements reference Element, Overview, Reference, XSLT There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either <xsl:stylesheet> or <xsl:transform>. An instruction, on the other hand, is associated with a template. A stylesheet may...
XUL Migration Guide - Archive of obsolete content
API, which is only available from Firefox 29 onwards. Finally, if none of the above techniques work for you, you can use the require("chrome") statement to get direct access to the Components object, which you can then use to load and access any XPCOM object. The following complete add-on uses nsIPromptService to display an alert dialog: var {Cc, Ci} = require("chrome"); var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); require("sdk/ui/button/action").ActionButton({ id: "xpcom-example", label: "Hello from XPCOM", icon: "./icon-16.png", onClick: function() { promptSvc.alert(null, "My Add-on", "Hello from XPCOM"); } }); It's good practice to encapsulate code which uses XPCOM by packaging it in its own module. For ex...
..."xpcom-example", label: "Hello from XPCOM", icon: "./icon-16.png", onClick: function() { promptSvc.alert(null, "My Add-on", "Hello from XPCOM"); } }); It's good practice to encapsulate code which uses XPCOM by packaging it in its own module. For example, we could package the alert feature implemented above using a script like: var {Cc, Ci} = require("chrome"); var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); exports.alert = function(title, text) { promptSvc.alert(null, title, text); }; If we save this as "alert.js" in our add-on's lib directory, we can rewrite main.js to use it as follows: require("sdk/ui/button/action").ActionButton({ id: "xpcom-example", label: "Hello from XPCOM", icon: "./icon-16.png", o...
context-menu - Archive of obsolete content
the user invokes the context menu on a link, image, or other non-text node, or while a selection exists. Declarative contexts You can specify some simple, declarative contexts when you create a menu item by setting the context property of the options object passed to its constructor, like this: var cm = require("sdk/context-menu"); cm.Item({ label: "My Menu Item", context: cm.URLContext("*.mozilla.org") }); Constructor Description PageContext() The page context. SelectionContext() This context occurs when the menu is invoked on a page in which the user has made a selection. SelectorContext(selector) This context occurs when the menu is invoked on a node that either matches selector, a CSS selector, or has an ancestor that matches. selecto...
...); Show an "Edit Image" item when the menu is invoked on an image: var cm = require("sdk/context-menu"); cm.Item({ label: "Edit Image", context: cm.SelectorContext("img"), contentScript: 'self.on("click", function (node, data) {' + ' self.postMessage(node.src);' + '});', onMessage: function (imgSrc) { openImageEditor(imgSrc); } }); Show an "Edit Mozilla Image" item when the menu is invoked on an image in a mozilla.org or mozilla.com page: var cm = require("sdk/context-menu"); cm.Item({ label: "Edit Mozilla Image", context: [ cm.URLContext(["*.mozilla.org", "*.mozilla.com"]), cm.SelectorContext("img") ], contentScript: 'self.on("click", function (node, data) {' + ' self.postMessage(node.src);' + ...
/loader - Archive of obsolete content
like this: let { Loader } = require('toolkit/loader'); let loader = Loader({ // Please note: Illustrated `paths` is expected to be a default base, // but depending on your use case you may have more mappings. paths: { // Resolve all non-relative module requirements to // `resource:///modules/` base URI. '': 'resource:///modules/', // Reserve `toolkit/` prefix for generic, mozilla toolkit modules // and resolve them to `resource://gre/modules/commonjs/toolkit/` URI. 'toolkit/': 'resource://gre/modules/commonjs/toolkit/' }, // Please note: Both `globals` and `modules` are just for illustration // purposes we don't suggest populating them with these values. globals: { // Provide developers with well known `console` object, hopefully // with a more adv...
...nload This pseudo module exposes an object that is unique per loader instance. It is used as a subject for observer notification to allow use of the observer service for defining hooks reacting on the unload of a specific loader. The SDK builds a higher level API on top of this for handling unloads and performing cleanup: let unloadSubject = require('@loader/unload'); let observerService = Cc['@mozilla.org/observer-service;1']. getService(Ci.nsIObserverService); let observer = { observe: function onunload(subject, topic, reason) { // If this module is unloaded then `subject.wrappedJSObject` will be // `unloadSubject`. `topic` will be `'sdk:loader:destroy'`, and // `reason` will be a string describing the reason (e.g. `'disable'`). if (subject.wrappedJSObject === u...
places/history - Archive of obsolete content
Access the user's browsing history. Usage This module exports a single function, search(), which synchronously returns a PlacesEmitter object which then asynchronously emits data and end or error events that contain information about the state of the operation. ...
...h then asynchronously emits data and end or error events that contain information about the state of the operation. Example let { search } = require("sdk/places/history"); // Simple query search( { url: "https://developers.mozilla.org/*" }, { sort: "visitCount" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit count }); // Complex query // The query objects are OR'd together // Let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascript' in the URL or title. // We'd compose the query with the following options let lastWeek = Date.now - (1000*60*60*24*7); search( // First que...
test/httpd - Archive of obsolete content
Usage The most basic usage is: var { startServerAsync } = require("sdk/test/httpd"); var srv = startServerAsync(port, basePath); require("sdk/system/unload").when(function cleanup() { srv.stop(function() { // you should continue execution from this point. }) }); This starts a server in background (assuming you're running this code in an application that has an event loop, such as Firefox). The server listens at http://localhost:port/ and serves files from the specified directory. ...
...{ srv.stop(function() { // you should continue execution from this point. }) }); This starts a server in background (assuming you're running this code in an application that has an event loop, such as Firefox). The server listens at http://localhost:port/ and serves files from the specified directory. You can serve static content or use SJS scripts, as described in documentation on developer.mozilla.org. You can also use nsHttpServer to start the server manually: var { nsHttpServer } = require("sdk/test/httpd"); var srv = new nsHttpServer(); // further documentation on developer.mozilla.org See HTTP server for unit tests for general information. ...
cfx to jpm - Archive of obsolete content
alled, you can just use it. Add-on incompatibilities In most respects, add-ons created with cfx will work fine with jpm. However, there are a few differences you have to know about. Add-on ID The add-on ID is a unique identifier for your add-on. In a built XPI, it's the ID field in the add-on's Install Manifest (install.rdf) file. The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on. ID handling with cfx When you use cfx, the ID is taken from the id field in the add-on's package.json file. You can edit this file to create your own ID, but if you don't, cfx will generate one for you, which will look so...
... them from npm into your add-on's directory tree, then requiring them. See the tutorial on using third-party modules with jpm. Mobile development jpm does not support the "--force-mobile" option, instead you will need to define engines in package.json and add "fennec" there. There is a known bug in simple options handling which may require the workaround described in https://bug635044.bugzilla.mozilla.org/show_bug.cgi?id=1243467 Commands and command options Permanently removed commands jpm has dropped support for all the "Internal" cfx commands. Permanently removed options jpm has dropped support for: --extra-packages --use-config --package-path --pkgdir --no-strip-xpi --harness-option --manifest-overload --output-file --templatedir --keydir --profiledir --overload-modules --static-args ...
Alerts and Notifications - Archive of obsolete content
Basic modal alert alert('hello'); Pop-ups The following code presents a non-modal pop-up, which automatically disappears after an appropriate delay. It uses nsIAlertsService. ...
...terfaces.nsIAlertsService) .showAlertNotification(null, title, text, false, '', null); } catch(e) { // prevents runtime error on platforms that don't implement nsIAlertsService } } If you need to display a comparable alert on a platform that doesn't support nsIAlertsService, you can do this: function popup(title, msg) { var image = null; var win = Components.classes['@mozilla.org/embedcomp/window-watcher;1'] .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null, 'chrome://global/content/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } Using notification box Another way of non-modal notification and furthe...
Boxes - Archive of obsolete content
e contents will wrap or adjust the layout. This does not happen with XUL BOX (or HBOX and VBOX) by default. However, you can easily add this capability with a style change. ...
...abel value="VVV"/> <label value="WWW"/> <label value="XXX"/> <label value="YYY"/> <label value="ZZZ"/> </hbox> </window> Images If you put IMAGE in the contents, you should probably add align="start" attribute to the BOX. ...
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). ...
...pe.prototype.lookupNamespaceURI = lookupNamespaceURI; } function lookupNamespaceURI (prefix) { return lookupNamespaceURIHelper(this, prefix); } function lookupNamespaceURIHelper (node, prefix) { // adapted directly from http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespaceURIAlgo var i, att, htmlMode = document.contentType, // Mozilla only xmlnsPattern = /^xmlns:(.*)$/; switch (node.nodeType) { case 1: // ELEMENT_NODE (could also just test for Node.ELEMENT_NODE, etc., if supported in all browsers) if (node.namespaceURI != null && node.prefix === prefix) { // Note: prefix could be "null" in the case we are looking for default namespace ret...
Running applications - Archive of obsolete content
There are two ways to run programs. Using nsIProcess The recommended way is to use the nsIProcess interface because it is crossplatform. Using nsILocalFile.launch() This method is not implemented on all platforms, especially not on Unix/Linux! See nsILocalFile.launch() for details and make sure that all your target platforms support this method! This method has the same effect as if you double-clicked the file, so for executable files--it will just run the file without any parameters. For more information on nsIFile/nsILocalFile, see File I/O. ...
...mplemented on all platforms, especially not on Unix/Linux! See nsILocalFile.launch() for details and make sure that all your target platforms support this method! This method has the same effect as if you double-clicked the file, so for executable files--it will just run the file without any parameters. For more information on nsIFile/nsILocalFile, see File I/O. var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile); file.initWithPath("c:\\myapp.exe"); file.launch(); References nsIProcess nsILocalFile If you need to launch an executable bundled in your XPI, see Code snippets:File I/O#Getting your extension's folder. Launching an executable process from a web page ...
StringView - Archive of obsolete content
|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function StringView (vInput, sEncoding /* optional (default: UTF-8) */, nOffset /* optional */, nLen...
...|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function StringView (vInput, sEncoding /* optional (default: UTF-8) */, nOffset /* optional */, nLength /* optional */) { var fTAView, aWhole, aRaw, fPutOutptCode, f...
Windows - Archive of obsolete content
n(). However, window.open() returns a Window object for content, not for the browser window itself, so you should get the chrome Window first. The simplest way to do that is to use nsIWindowMediator. Example window.open(); //This open a pop-up window that could be "blocked" client-side //The following code generate an error as describe in the following warning box var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var newWindow = wm.getMostRecentWindow("navigator:browser"); var b = newWindow.gBrowser; The code generate a TypeError from firefox console. In particular the Components.classes is undefined and The Components object is deprecated. It will soon be removed. Draggable windows To make a w...
...log will prevent multiple windows of that name from opening, each call will actually re-initialize the window and thus lose whatever state the user has put it in. Additionally, if the window is in the background, it may not be brought to the front. This code will check for a window of the provided name. If it finds one, it focuses it. If it doesn't, it opens one. ...
Default Preferences - Archive of obsolete content
Remember that preferences are held in two separate trees. One with user supplied prefs, another with default prefs. User supplied prefs are set using the GUI and also by modifying a profile's prefs.js file (which uses the user_pref() function). Default preferences are set similarly but inside an extension and use the pref() function. ...
...erences are set similarly but inside an extension and use the pref() function. Setting default preferences While most of an extension's directories can be named arbitrarily and mapped using a chrome manifest, default preferences must be in very particular spot: | Extension Root +--|content +--|skin +--|defaults +--|preferences To add preferences simply drop a .js file into that directory and Mozilla will read it and set the appropriate preferences. The actual file, despite having .js extension, is not a JavaScript file. You may not set variables inside of it, nor may do any kind of program flow control (ifs, loops etc.) nor even calculated values (i.e. 3600 * 24 * 5). Doing so will cause Mozilla to stop processing your preferences file without any notification, warning, error, or exception. ...
Deploying a Plugin as an Extension - Archive of obsolete content
ucture of the XPI file used for a browser plugin. RhapsodyPlayerEngine_Inst_Win.xpi install.rdf plugins/ license.rtf nprhapengine.dll The important file here is the install.rdf file. This contains information about our extension; all extensions have one. ...
...psodyPlayerEngine_Inst_Win.xpi install.rdf plugins/ license.rtf nprhapengine.dll The important file here is the install.rdf file. This contains information about our extension; all extensions have one. ...
Displaying web content in an extension without security issues - Archive of obsolete content
d insert into the extension window. The issue that is commonly overlooked here is that the RSS feed could contain some malicious JavaScript code and it would then execute with the privileges of the extension -- meaning that it would get full access to the browser (cookies, history etc) and to user's files. These issues can easily be avoided by making use of the existing security mechanisms in the Mozilla codebase. The following article explains these security mechanisms, ideally an extension that needs to display web content (which is always potentially dangerous) will use all of them. Displaying untrusted data as content In Firefox, there is a distinction between chrome and content documents. The top document in a window is always a chrome document. If you look at the frames it loads, those will...
...ew elements or attributes. But what if you have to display HTML rather than only text, e.g. an RSS feed entry? Extension authors will often come up with flawed attempts to sanitize HTML code. Instead, nsIScriptableUnescapeHTML.parseFragment() method should be used that is meant for just that scenario: var target = entry.getElementsByClassName("description")[0]; var fragment = Components.classes["@mozilla.org/feed-unescapehtml;1"] .getService(Components.interfaces.nsIScriptableUnescapeHTML) .parseFragment(description, false, null, target); target.appendChild(fragment); This will add the HTML code to the specified node -- minus all the potentially dangerous content. ...
Inline options - Archive of obsolete content
tension's detail view in the Add-on Manager. This functionality originally appeared in Firefox mobile and is now available in Firefox on the desktop as well. Options file The XUL allowed for the inline options is limited to a few new tags. Here is an example of an options.xul file: <?xml version="1.0"?> <!DOCTYPE mydialog SYSTEM "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="Boolean" desc="Stored as a boolean preference" /> </vbox> Note that it's limited to <setting> tags. The root <vbox> just acts as a container, it isn't merged into the main window. If you need script support, see the display notifications section. Setting types There are several types of <...
...ents (it might be all I havent really looked), support oninputchanged attribute. So like for the type="file", once a user browses and picks a file, when it updates the label it will trigger the oninputchanged attribute. So if you would like to do some changes to the XUL on the inline options page you can do so. The this value is the setting XUL element. See MXR for what all this holds: http://mxr.mozilla.org/mozilla-release/source/toolkit/mozapps/extensions/content/setting.xml for example you can fire this.inputChanged() etc etc. <setting pref="extensions.ThrobberRestored.showTxtOnToolbar" title="Show Text on Toolbar Button" type="bool" oninputchanged="alert('New value is = ' + this.value); this.style.backgroundColor='red';"> If labels on other toolbar buttons are visible (like by us...
Adding Events and Commands - Archive of obsolete content
to do any cleanup you may need. Please read Appendix A for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on Firefox. Another way to attach event handlers, just like HTML, is to place the handler in the XUL code: <overlay id="xulschoolhello-browser-overlay" onload="XulSchoolChrome.BrowserOverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> We prefer the first method because it keeps a better separation of content and behavior. Also, note that the addEventListener method receives the event name without the "on" prefix, while element attributes do have the prefix. There's a long list of events you can listen to, and which you use depend on the situation. Elements only implement the event...
... ...
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
ot be as easy to customize as the rest. The first thing you need to do is add your buttons to the toolbar palette. The toolbarpalette is a collection of all toolbar buttons and toolbar items in Firefox, including those added by extensions. To add your buttons, all you need to do is overlay the palette in your main browser overlay. ...
... ...
Adding sidebars - Archive of obsolete content
idebar('xulschoolhello-sidebar');" /> </menupopup> The example in the MDC page includes a shortcut key combination to toggle the new sidebar. Keyboard shortcuts are an essential feature of Firefox, and you can add your own into your extensions, which is also great. The problem is that choosing the right keyboard shortcuts is very, very hard, as explained by the creator of AdBlock Plus, and the Mozilla Keyboard Reference. To sum up both of these references: you can choose an obscure key combination that won't conflict with Firefox, such as Ctrl+Shift+(some letter), but there's no way of knowing if any other extension uses that same combination as well. Shortcut keys can be very valuable for advanced users, but don't rely on them. The XUL page for the sidebar can hold any content you want and i...
...emplates. This topic will be covered later when we look at different kinds of datasources and templates. Adding style to a tree can also be challenging, which is why there's a guide specifically covering how to Style a Tree. Looking at the Bookmarks and History sidebars should make it clear that trees are quite customizable with CSS. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
l is harder to parse for a human mind, is often pretty complex, and relies on assumptions that are not necessarily true in the future or even now. This article is aimed at presenting alternatives to common eval uses in add-ons and other Javascript code. ...
...d relies on assumptions that are not necessarily true in the future or even now. This article is aimed at presenting alternatives to common eval uses in add-ons and other Javascript code. Add-on authors are strongly encouraged to update their code to eliminate all instances of eval, no matter if the add-on is to be hosted in the Mozilla Add-ons Gallery or not. In order to host your add-on with Mozilla it is crucial to minimize or completely eliminate eval use in order to receive a positive review and have your add-on made public. If it cannot be easily proven that an eval() call is benign and necessary because there are no viable alternatives, a Mozilla Add-ons Gallery reviewer will generally reject the submission! Parsing JSON Mozilla provides native JSON support since Firefox 3. There is ...
Appendix D: Loading Scripts - Archive of obsolete content
he script "overlay.js" from the same directory as the overlay file into the window which it overlays. The script will be read with the UTF-8 encoding, based on the encoding of the overlay, and will execute as JavaScript version 1.8, based on the version specified in the script tag. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE overlay> <overlay id="script-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript;version=1.8" src="overlay.js"/> </overlay> evalInSandbox The Components.utils.evalInSandbox method may be used to load arbitrary code into Components.utils.Sandbox objects. JavaScript files or URLs may be loaded in this manner by first retrieving their contents into memory using an XMLHttpRequest. This is th...
...ry as the current script. The script will execute in the same security context as the current script and will have access to the same globals, but any new globals it creates will be accessible only to the script itself. Objects passed out of the sandbox will not be wrapped in XPCNativeWrappers but will still be wrapped in inter-compartment proxies. ...
Custom XUL Elements with XBL - Archive of obsolete content
dn't need to create a whole XUL structure that would require around 7 nodes every time a "Person" is created. XBL provides the encapsulation we needed to manage these nodes as a unit. As a bonus, you should look into the usage of nsIFilePicker to open a "Open File" dialog in a way that looks native for all systems. Now let's look into the XBL file, person.xml. <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> The bindings element is the root of the document, and it's a container for binding elements. Notice how the default namespace for the document is XBL, and the XUL namespace is defined as "xul". You'll need to keep this in mind when defining the content of the binding, ...
... ...
Intercepting Page Loads - Archive of obsolete content
(aWebProgress.DOMWindow != aWebProgress.DOMWindow.top) { // this is a frame. } In this case, the URL can be obtained from aRequest.name. Make sure you access it from inside the state validation if condition. There may be other cases where accessing this property will throw an exception. Canceling the request works just like with onLocationChange. See "Recognizing page load failure" at mozilla.dev.extensions for tips on detecting connection failures and HTTP response codes. XPCOM Solutions There are a couple more solutions you may be interested in trying if the previous ones are insufficient. These require creating XPCOM components that implement existing Firefox interfaces. They may be useful in case you have most of your application logic in XPCOM, or if you absolutely need a si...
... ...
User Notifications and Alerts - Archive of obsolete content
cific way, so their look is native. You can associate an action to the user clicking on the alert. Another advantage is that you use an XPCOM service to do this (nsIAlertsService), so you can easily trigger alerts from chrome and non-chrome code. ...
... ...
XUL School Tutorial - Archive of obsolete content
The project i...
...The project is now published here following its shar...
Security best practices in extensions - Archive of obsolete content
This document is intended as a guide for developers to promote best practices in securing your extension. Your goal is to keep your users safe. Some items mentioned are strict guidelines, meaning that if you don't follow them then your add-on will not be approved on Mozilla add-ons. Other items are recommendations. The difference will be clearly flagged. This is written from the perspective of a Firefox extension, but most items apply to extensions for other Mozilla-based applications such as Thunderbird or SeaMonkey. Web content handling In general the best way to ensure that the browser is not compromised when you load content is to make sure it does not have those privileges. A more detailed explanation of this process is in Displaying web content in an extension without security issues.
...re their integrity and safety for users. The first is to always get it from a trusted source. Another thing you should do is namespace it just in case other add-ons include it. For example, if you're using jQuery, there's jQuery.noConflict(). Conclusion Security can't be taken for granted, and for every release of your add-on, a new security audit should take place. A good place to keep up with Mozilla security announcements and security discussion is at the Mozilla Security Blog. ...
Using Dependent Libraries In Extension Components - Archive of obsolete content
r for an OS X extension. You will also need to make sure you are properly linking the XPCOM glue libraries. See XPCOM Glue for the proper flags on how to link to the glue libraries. /* * OS X Stubloader * Original stubloader code by Benjamin Smedberg <benjamin@smedbergs.us> Copyright (c) 2005 * Adapted for OS X by Walter Johnson <zinkyu@gmail.com>, Sept. 2008 */ //Include the stuff from Mozilla Glue that we need #include "nsILocalFile.h" #include "nsStringAPI.h" #include "nsCOMPtr.h" //Include things from the mach-o libraries that we need for loading the libraries. #include <mach-o/loader.h> #include <mach-o/dyld.h> static char const *const kDependentLibraries[] = { // dependent1.dll on windows, libdependent1.so on linux, libdependent1.dylib on Mac MOZ_DLL_PREFIX "dependent1" MOZ_...
...E_BY_INSTALLNAME); if (componentlib == NULL) return NS_ERROR_UNEXPECTED; //Find the NSGetModule procedure of the real component and "pass the buck". nsGetModuleProc getmoduleproc = (nsGetModuleProc)LookupSymbol(componentlib, "_NSGetModule"); if (!getmoduleproc) return NS_ERROR_FAILURE; return getmoduleproc(aCompMgr, aLocation, aResult); } // Convienience method grabbed from // http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/standalone/nsGlueLinkingOSX.cpp . // Deprecated API calls have been removed. static void* LookupSymbol(const mach_header* aLib, const char* aSymbolName) { NSSymbol sym = nsnull; if (aLib) { sym = NSLookupSymbolInImage(aLib, aSymbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); } if (!sym) return ns...
Search Extension Tutorial (Draft) - Archive of obsolete content
Changing Default Search Setting from Extensions Many add-ons, for monetization or other reasons, change several search-related settings at install time. While this is generally considered acceptable behavior, considerable care must be taken to avoid violating the Mozilla add-on guidelines or creating an adverse user experience. Due to the large volume of user complaints regarding hidden settings being changed against their will, and not being restored after the add-ons responsible are disabled, Mozilla will take any steps necessary to mitigate the impact of offending add-ons. In particular, changing the location bar search keyword URL in a way which is not automatically reset when the add-on is removed will result in a reset prompt for users. Other settings violations designed to restrict...
...In non-restartless extensions, the XML search description may instead simply be placed in the searchplugins/ directory in the root of your XPI, as em:unpack is specified in your install.rdf file. As above, install and uninstall code is only provided for restartless add-ons but can be adapted for traditional add-ons. search.xml <?xml version="1.0" encoding="UTF-8"?> <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> <ShortName>Example Engine</ShortName> <Description>Example search engine</Description> <InputEncoding>UTF-8</InputEncoding> <Image width="16" height="16" type="image/png">data:image/png;base64, ... </Image> <Url type="application/x-suggestions+json" template="https://api.example.com/suggestions"> <Param name="q" value="{searchTerm...
Add-ons - Archive of obsolete content
ipt APIs, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons. bookmarks.export() Exports bookmarks to an HTML bookmark file. bookmarks.import() Imports bookmarks from an HTML bookmark file. Bootstrapped extensions browser.bookmarks.export( function() {...} // optional function ) Code snippets ... Creating custom Firefox extensions with the Mozilla build system There is a wealth of material on creating extensions for Firefox. All of these documents currently assume, however, that you are developing your extension using XUL and JavaScript only. For complex extensions, it may be necessary to create components in C++ that provide additional functionality. Extension Etiquette This article describes best practices when making extensions, incl...
...an not only improve the performance and speed of your extension, but also of Firefox itself. Security best practices in extensions This document is intended as a guide for developers to promote best practices in securing your extension. Your goal is to keep your users safe. Some items mentioned are strict guidelines, meaning that if you don't follow them then your add-on will not be approved on Mozilla add-ons. Other items are recommendations. The difference will be clearly flagged. Setting up an extension development environment This article provides suggestions for how to set up your Mozilla application for extension development. These details apply to Firefox, Thunderbird, and SeaMonkey (version 2.0 and above). Tabbed browser Here you should find a set of useful code snippets to help you...
Beginner tutorials - Archive of obsolete content
This page includes archived beginners tutorials, from various places around MDN. Creating reusable content with CSS and XBLThis page illustrates how you can use CSS in Mozilla to improve the structure of complex applications, making code and resources more easily reusable.Underscores in class and ID NamesSummary: The use of the underscore character in CSS can lead to major display problems in multiple browsers. Learn why this is so, and how to keep your sites from being bitten by this problem. ...
...re character in CSS can lead to major display problems in multiple browsers. Learn why this is so, and how to keep your sites from being bitten by this problem. This technical note examines the use of underscores in CSS, and why they should be generally avoided in most circumstances.XML dataThis page contains an example of how you can use CSS with XML data.XUL user interfacesThis page illustrates Mozilla's specialized language for creating user interfaces. ...
Defining Cross-Browser Tooltips - Archive of obsolete content
at'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 of the alternate text is specifi...
...er 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 operation, for example s...
Environment variables affecting crash reporting - Archive of obsolete content
The following environment variables affect crash reporting: MOZ_CRASHREPORTER_URL Sets the URL that the crash reporter will submit reports to. MOZ_CRASHREPORTER_FULLDUMP Store full application memory in the minidump, so you can open it in a Microsoft debugger. Don't submit it to the server. (Windows only.) MOZ_CRASHREPORTER_NO_DELETE_DUMP Don't delete the crash report dump file after submitting it to the server. Minidumps will still be moved to the "Crash Reports/pending" directory. MOZ_CRASHREPORTER_NO_REPORT Save the minidump file but don't launch the crash reporting UI or send the report to the server. ...
.... MOZ_CRASHREPORTER The opposite of MOZ_CRASHREPORTER_DISABLE, force crash reporting on even if disabled in application.ini. You must use this to enable crash reporting on Linux debug builds. Additionally, on Mac OS X, you can set an application default setting to allow Apple's Crash Reporter tool to run alongside the Breakpad crash reporter. Run this on the command line: defaults write org.mozilla.firefox OSCrashReporter 1 Note that you will get two crash dialogs with this setting, one from the OS and one from Mozilla. ...
Images, Tables, and Mysterious Gaps - Archive of obsolete content
he document has been raised to a large amount. The navbar images now have space appearing above them, and the red spacer got even bigger. It's difficult to avoid this, because the images are (in this approach) still inline and so still participate in the creation of a line box. If that line box gets tall enough, space will begin to appear around the images. Looking Forward To a Fix Thanks to Mozilla's thorough implementation of CSS2, the problem of inline images in table cells forcing open unwanted space has come to the attention of the CSS Working Group. There have been many proposals to fix the problem, but one of the most promising approaches is the property line-box-contain, which has been proposed for inclusion in CSS3. Should this property be adopted, then any browser supporting it cou...
... 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. ...
Source Navigator - Archive of obsolete content
left of the dialog should contain no lines. Click "New Project". This shows the "Auto-Create Project" dialog: which allows you to decide your filename of the project file (which ends in .proj) and your source directory/directories that you want to import into the project. (You can always include more by pressing the "More" button.) In my case, I inputted the followings: Project File: <tt>~/snav-mozilla</tt> Add Directory (where your source files reside in -- I understand that the label here is not so self-explanatory...): <tt>~/moz1.9/mozilla</tt> (because I saved my source at ~/moz1.9/mozilla.) Remember to ensure that "Include Subdirectories" and "Build Cross-reference database" are checked. Then click "OK". The snavigator then begins to scan your source directories. This takes a few minu...
... Using Source Navigator (more later) Opening a Project Open a terminal. Type <tt>snavigator</tt> followed by striking Enter. This shows the "Source-Navigator Projects" dialog. Choose the project file that you've just created and then click "Open...". ...
Using content preferences - Archive of obsolete content
pecific sites or in the global preference space; global preferences are used whenever a site-specific preference isn't available. Site-specific content preferences are stored in the profile folder, in the database file "content-prefs.sqlite". Example: Setting and retrieving preferences This example demonstrates how to save a preference and then retrieve its value. ...
...specific content preferences are stored in the profile folder, in the database file "content-prefs.sqlite". Example: Setting and retrieving preferences This example demonstrates how to save a preference and then retrieve its value. var ioSvc = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var prefService = Components.classes["@mozilla.org/content-pref/service;1"] .getService(Components.interfaces.nsIContentPrefService); // Create a URI object referencing the site to save a preference for var uri = ioSvc.newURI("http://developer.mozilla.org/", null, null); // Set the value of the "devmo.somesetting" preference to "foo". prefService.setPref(uri, "devmo.somesetting", "foo"); ... // Retrieve the value of the...
Automated testing tips and tricks - Archive of obsolete content
TODO: check example code in to the tree somewhere How to quit the browser on all platforms window.close() of the last open window does not quit the application on Mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///Users/davel/Work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul How to create a new profile from the command line First, use the -CreateProfile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -CreateProfile "testprofile ${PROFILE_...
...created. ...
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
How Thunderbird and Firefox find their configuration files Thunderbird looks into the binary %APPDATA%\Thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %APPDATA%\Thunderbird\Profiles\profileName). Likewise, Firefox uses a similar file, located in %APPDATA%\Mozilla\Firefox\profiles.ini. ...
...Firefox\profiles.ini. The value contained in this key is a litteral value, no variables (such as %USERPROFILE%/MozProfile) allowed. We chose to point this to the user's home directory (H:\Thunderbird). The configuration itself is stored in the specified directory, in a file named prefs.js. This is a readable file of javascript commands. All other files in that directory are dynamically created by Mozilla on first start. Unlike Mozilla's binary registry.dat file, Thunderbird's and Firefox' profiles.ini file is a readable text file. Here is an example of what this may look like: [General] StartWithLastProfile=1 [Profile0] Name=default IsRelative=1 Path=Profiles/default.uda If you want to point this to a location of your choice (for example H:\Thunderbird), you need to perform to changes: Set IsR...
Introduction - Archive of obsolete content
In the scenario described described, a bunch of client workstations running Windows access a Linux Samba server, on which the user's home directories are stored (under drive H:). Our goal is to make it possible to automatically generate a Mozilla configuration on the server for each user as soon as he is created. ...
... Introduction These pages describes how to customize mozilla for multi-user community. In the scenario described described, a bunch of client workstations running Windows access a Linux Samba server, on which the user's home directories are stored (under drive H:). Our goal is to make it possible to automatically generate a Mozilla configuration on the server for each user as soon as he is created. Moreover, we want to lock certain settings, so that users cannot change them. ...
Automatically Handle Failed Asserts in Debug Builds - Archive of obsolete content
The handler receives the assert string, and sequentially attempts to match each word in the string (left to right) to registry DWORD names from HKLM\Software\mozilla.org\windbgdlg and HKCU\Software\mozilla.org\windbgdlg. At the first match, it will take the action specified by the DWORD's value. The valid values are: 0x5 Automatically ignore 0x4 Automatically retry 0x3 Automatically abort Note that you can also force windbgdlg to prompt, by setting a value of 0xfffffffe. To "comment out" a value, set its value to 0xffffffff. ...
...he action specified by the DWORD's value. The valid values are: 0x5 Automatically ignore 0x4 Automatically retry 0x3 Automatically abort Note that you can also force windbgdlg to prompt, by setting a value of 0xfffffffe. To "comment out" a value, set its value to 0xffffffff. As an example, consider the following failed assertion: ASSERTION: no document: 'mDocument != nsnull', file d:/cvs-1.11.4/mozilla/content/xul/content/src/nsXULElement.cpp, line 3173 (note that I have my source tree in d:/cvs-1.11.4/mozilla) If you have a DWORD in HKCU\Software\mozilla.org\windbgdlg\ named "d:/cvs-1.11.5/mozilla/content/xul/content/src/nsXULElement.cpp," (WITH the comma - matches are whole-word only) and value 0x5, the assert would automatically be ignored. If you also had a DWORD named "3173", it would have...
Bonsai - Archive of obsolete content
. It also includes tools for looking at checkin logs (and comments); doing diffs between various versions of a file; and finding out which person is responsible for changing a particular line of code ("cvsblame"). Start at the main Bonsai Query page or SeaMonkey Tree control page Here are some example queries that will give you a taste of what Bonsai is capable of: Today's checkins to the Mozilla Source Mainline. Checkins to any branch of XFE by Ramiro between 26-Feb-1998 and 12-May-1998 Differences between revisions 3.1 and 3.3 of the file mozilla/cmd/xfe/forms.c That's a small sample, but it should be enough to get you started. Play around with the various options on the main Bonsai Query page. If you're updating our cvs tree you'll need to learn about Hacking with Bonsai. Bonsai S...
...'re updating our cvs tree you'll need to learn about Hacking with Bonsai. Bonsai Source Code The source code to the Bonsai tool itself is also available, check out the information available at the Bonsai project page. Original Document Information Author(s): Jamie Zawinski Last Updated Date: September 8, 2004 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Chromeless - Archive of obsolete content
The aim is to enable developers to create full blown desktop applications using only Web technologies. Chromeless apps have access to a collection of JavaScript APIs that provide them with deep desktop integration. One of the core capabilities of the Chromeless platform is the ability to safely embed untrusted Web applications inside these applications. ...
... The aim is to enable developers to create full blown desktop applications using only Web technologies. Chromeless apps have access to a collection of JavaScript APIs that provide them with deep desktop integration. One of the core capabilities of the Chromeless platform is the ability to safely embed untrusted Web applications inside these applications. Chromeless vs Prism/WebRunner Prism (an ex-Mozilla Labs project, now discontinued but kept going independently of Mozilla under the [now discontinued] WebRunner name) was/is a way to make Web pages superficially appear to be native applications. Firefox users could choose to turn a Web page into a "Prism application" and have an icon added to their desktop to launch it without the Firefox user interface surrounding the page. However, Prism "appli...
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
rename the file later Delete the .cpp and .h and ReadMe files from the project and disk (if you did not create an empty project) Copy the npruntime sample plugin source code into the dir of the new VS project and add the files to the project using the VS GUI (.cpp files to "Source Files", .h files to "Header Files", .rc file to "Resource Files"). Samples can be obtained from: https://developer.mozilla.org/en/Plugins/Samples_and_Test_Cases Get the NPAPI SDK. Add the NPAPI SDK include path (example : C:\npapi-sdk\headers) to Project Properties|(all configurations)|C++|General|Additional Include Directories. Note: If your project is still empty, the C++ tree might not be visible. So, add some files first. Add the following preprocessor definitions to Project Properties|(all configurations)|C++...
...filename of your dll as VS sees it (without "np", if you decided to rename later) Optional: Edit the .rc file and and the top of npp_gate.cpp for the description, mimetype, file extension etc. to reflect your plugin Remove the function NPP_GetJavaClass from npp_gate.cpp Build Rename the resulting DLL so that the filename starts with "np" and ends with ".dll" (or "32.dll"? 8.3?) and copy it in Mozilla's "plugins" folder Start Mozilla and open about:plugins to verify the plugin is detected Open the file "test.html" and begin testing. Make sure the mimetypes of your html embed tags match the mimetype specified in your nprt.rc file and the top of your npp_gate.cpp file Version Issues If VC++ compiler throws you error C2664 on 'DrawText' function call, you may replace it by 'DrawTextA'. In ...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
Although it is designed to retrieve XML content and parse it into a DOM, it can retrieve (but not parse) other kinds of content as well. ...
...it work we have to add JavaScript code that changes its status when the tinderbox status changes. The first step is to write a function that queries the tinderbox server and retrieves the current status. var gXMLHttpRequest; function loadTinderboxStatus() { gXMLHttpRequest = new XMLHttpRequest(); gXMLHttpRequest.onload = updateTinderboxStatus; gXMLHttpRequest.open("GET", "http://tinderbox.mozilla.org/SeaMonkey/panel.html"); gXMLHttpRequest.send(null); } XMLHttpRequest is an interface in Mozilla for retrieving documents via HTTP. Although it is designed to retrieve XML content and parse it into a DOM, it can retrieve (but not parse) other kinds of content as well. In this case we use it to retrieve an HTML page containing a brief summary of the current tinderbox state. That document ge...
Prerequisites - Archive of obsolete content
In order to complete this tutorial you need to have and know how to use the following programs on your computer: an installation of Mozilla; zip and unzip utilities; a text editor. You should also understand tag-based languages like HTML as well as basic JavaScript, CSS, and the DOM. You might install Mozilla multiple times in the course of this tutorial, so you will find it handy to keep around a Mozilla installer. If you currently use Mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo. ...
...la multiple times in the course of this tutorial, so you will find it handy to keep around a Mozilla installer. If you currently use Mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo. ...
Specifying the appearance - Archive of obsolete content
b-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-busted.png"); } Mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have to add these rules to each set (and have our extension break when a new set gets installed), so we'll put this stylesheet in a file called tinderstatus.css in the same directory as navigator.xul and reference it at the top of that file right under the global stylesheet reference: <?xml-stylesheet href="chr...
... << PreviousNext >> ...
Getting Started - Archive of obsolete content
elp My_Theme jar:chrome/My_Theme.jar!/help/ skin navigator My_Theme jar:chrome/My_Theme.jar!/navigator/ skin editor My_Theme jar:chrome/My_Theme.jar!/editor/ Save the file and exit the text editor. install.rdf Make a copy of install.rdf and place it in the My_Theme directory, then open it up in your text editor. This file is a small XML database that describes the skin. <Description about="urn:mozilla:install-manifest"> <em:id>{Themes_UUID}</em:id> <em:version>Themes_Version</em:version> The first section requires that you establish a UUID for your theme and that you give your theme a version number. Once you've done this, insert the information as above, and scroll down. You will also have to update the minimum and maximum compatible versions for the target application (SeaMonkey) in the...
...n.jar Triggering the install from the web To install the theme's JAR file directly from the web, you need to run some JavaScript. <a href='javascript:InstallTrigger.installChrome(InstallTrigger.SKIN, "myskin.jar", "My Skin Theme")'>install My Skin</a> If you have JAR files on your hard drive and would like to install them, then download/use this form. You can also just open the themes window in Mozilla and drag and drop your .jar file onto it. Now to change your folder(s) back into a .jar Well it's easy! What you do is put your folder(s) into a .zip file and then when it's compressed make the .zip into a .jar ...
FAQ - Archive of obsolete content
If a message appears in the preferences window telling you that it's an old skin, you're going to have to look over the code to see what changed. ...
...If a message appears in the preferences window telling you that it's an old skin, you're going to have to look over the code to see what changed. ...
DTrace - Archive of obsolete content
DTrace has been largely supplanted by the Gecko Profiler and other tools, so this documentation has been archived. ...
...d to create a build with --enable-dtrace (on Mac OS X you also have to use at least the 10.5 SDK for --with-macos-sdk, unlike the common configuration that uses the 10.4 SDK). Trunk nightly builds with shark support (*-mac-shark.dmg here) are built with --enable-dtrace. Documentation Writing Scripts A general introduction to writing D scripts and using the built-in Mozilla probes. Optimizing JavaScript with DTrace A guide on profiling JavaScript code using DTrace. Adding Probes A guide on creating probes and the build system magic needed to add probes to your code. Pounce on DTrace A guide to using DTrace on Mac OS X 10.5. DTrace for Web Developers How to use DTrace to profile your web application. View All... ...
Drag and Drop - Archive of obsolete content
impler, portable API should be used in their place. 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. Event handlers are called when the user starts and ends dragging, and at various points in-between. Mozilla implements dragging by using a drag session. When a user requ...
...ion. When a user requests to drag something that can be dragged, a drag session should be started. The drag session handles updating the mouse cursor and where the object should be dropped. If something cannot be dragged, it should not start a drag session. Because the user generally has only one mouse, only one drag session is in use at a time. Note that drag sessions can be created from within Mozilla itself or from other applications. Mozilla will translate the data being dragged as needed. The list below describes the event handlers that can be called, which may be placed on any element. You only need to put values for the handlers where you need to do something when the event occurs. ondrag Called periodically throughout the drag and drop operation. ondraggesture Called when the use...
Layout System Overview - Archive of obsolete content
also required to provide compatibility with legacy browsers (Microsoft Internet Explorer and Netscape Navigator 4.x). The decision about when to apply CSS-specified formatting and when to apply legacy formatting is controlled by the document's DOCTYPE specification. These layout modes are referred to as 'Standards' and 'NavQuirks' modes. (DOCTYPE and modes are explained in more detail in article Mozilla's DOCTYPE sniffing. Galley and Page Presentations: The presentation generally is constrained by the width of the window in which the presentation is to be displayed, and a height that extends as far as necessary. This is referred to as the Galley Mode presentation, and is what one expects from a typical browser. Additionally, layout must support a paginated presentation, where the width of the pr...
...of text or other presentational elements. All layout happens in the context of a block, and all of the contents of a block are formatted into lines within that block. As the width of a block is changed, the contents of the lines must be reformatted. Consider for example a large paragraph of text sitting in paragraph: <p> We need documentation for users, web developers, and developers working on Mozilla. If you write your own code, document it. Much of the existing code <b>isn't very well documented</b>. In the process of figuring things out, try and document your discoveries. If you'd like to contribute, let us know. </p> There is one block that corresponds to the <p> element, and then a number of lines of text that correspond to the text. As the width of the block changes (due to the windo...
Gecko Coding Help Wanted - Archive of obsolete content
Huge, actually. Overwhelmingly large. You could spend years in it and still get lost. You're up for some adventure, though, and you're set to take the plunge. But where? Where's a good place to start? Someplace easy and straightforward, so you can get a feel for the lay of the code. Reports in Bugzilla can be deceptive, deceptively hard... or deceptively easy. So we've compiled a list of pointers --from the experts. There's plenty to do, and we sure could use the help. ...
...oc 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. ...
HTTP Class Overview - Archive of obsolete content
Warning: The content of this article may be out of date. It was last updated in 2002. This document provides an overview of the classes used by the Mozilla HTTP implementation. It's meant as a guide to developers wishing to understand or extend the Mozilla HTTP implementation. nsHttpHandler implements nsIProtocolHandler manages preferences owns the authentication cache holds references to frequently used services nsHttpChannel implements nsIHttpChannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nsHttpConnection implements nsIStreamListener & nsIStreamProvider talks to the socket transport service feeds data to its transaction object routes progress notifications nsHttpConnectionInfo identifies a...
... ...
Jetpack - Archive of obsolete content
Jetpack Jetpack is a project to make it easy to build Firefox add-ons using common web technologies. ...
.... ...
Overview of how downloads work - Archive of obsolete content
One way is to encounter a file with an unknown content type, the other is to choose "Save link target as" from the context menu of a link. Things like File|Save Page as, Save Image As, etc. are all part of the second codepath. This document describes both codepaths (See below for the second one). Click on the images to display them "stand-alone" in the browser, which may resize them to fit the browser window. Downloads via the helper app service This diagram is an UML sequence diagram, and was created using dia. Get the .dia file here: mozilla_downloads.dia Downloads via "Save link target as" and friends This diagram is an UML sequence diagram, and was created using dia. ...
...mages to display them "stand-alone" in the browser, which may resize them to fit the browser window. Downloads via the helper app service This diagram is an UML sequence diagram, and was created using dia. ...
Plug-n-Hack - Archive of obsolete content
Security researchers commonly use security tools in conjunction with browsers, but until now direct integration has required writing platform and browser specific extensions. Configuring a browser to work with a security tool can be a non-trivial process, and this can discourage people with less experience from using such tools. ...
...e work on and support gives our team an advantage, however we believe that opening up such capabilities to all browsers and all security tools is much more useful for security researchers and application developers and testers. As a result we have designed and developed the PnH protocol to be both browser and tool independent. The current protocol and Firefox implementation are released under the Mozilla Public License 2.0 which means it can be incorporated in commercial tools without charge. Plug-n-Hack topics Phase 1 This provides simplified integration and allows tools to advertize their capabilities to browsers Phase 2 This will allow browsers to advertize their capabilities to security tools Tools supporting PnH The browsers and tools known to suppo...
Extensions - Archive of obsolete content
Prism has support for extensions. Extensions are built using the same methods as any Mozilla-based extension. Since Prism is a totally separate host application, there are some Prism-specific issues that you need to handle when creating your extension. Most notably, the Prism application ID and the differences in the user interface (UI). Extensions typically overlay the host application's UI to add toolbar buttons, menus and other features. One of Prism's features is an extreme lack of UI elements, which means that trying to use the same overlays in Firefox and Prism is really not possible. The Basics In order to install an extension in Prism, you need to follow the guidelines for building a Mozilla-based extension. To support Prism specifically, you'll need to add Prism to the list of ta...
... not possible. The Basics In order to install an extension in Prism, you need to follow the guidelines for building a Mozilla-based extension. To support Prism specifically, you'll need to add Prism to the list of target applications in the extension's install.rdf file. The code snippet will look something like this: <em:targetApplication> <!- Prism -> <Description> <em:id>prism@developer.mozilla.org</em:id> <em:minVersion>0.8</em:minVersion> <em:maxVersion>1.0.0.*</em:maxVersion> </Description> </em:targetApplication> In addition to the install manifest changes, you may want to expose your extension into the Prism UI. Prism does have a few UI elements, such as a toolbox, toolbar, menubar, popup menus, statusbar and a container for the browser. You can use these UI elements to ...
FAQ - Archive of obsolete content
Archive › Mozilla › Prism › FAQ
What is Prism? Prism is an application that integrates web applications into the desktop environment. It lets users start web applications from their desktop, start menu, and dock, and it opens those applications in their own window separate from a web browser and without the browser interface (back and forward buttons, location bar, etc.). Is Prism a Mozilla product? No, Prism is not a Mozilla product. It is one of the experiments being conducted by Mozilla Labs to bridge the 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...
... Mozilla Labs to bridge the 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, ...
Prism - Archive of obsolete content
There are now no alternatives. Prism is a simple XULRunner-based browser that hosts web applications without the normal web browser user interface. Prism is based on a concept called Site-Specific Browsers (SSB). An SSB is designed to work exclusively with a single web application. It doesn't have the menus, toolbars and other accoutrements of a traditional web browser. An SSB also offers tighter integration with the operating system and desktop than a typical web application running through a web browser. Applications running in an SSB are therefore able to benefit from many of the advantages of the desktop and of the web at the same time. ...
...ow Prism provides a simple, scaled down browser window for running web applications. Using configuration files and webapp scripting, the host window can be modified. Installer Installing Prism. View All... ...
PyDOM - Archive of obsolete content
This allows you to use Python code (almost) anywhere you can use JavaScript. Globals and namespaces This is taken from a mail to the pyxpcom list - it should be expanded, but a copy-paste will do for now Normal module semantics don't exist here. The globals are 'bound' to the global object (i.e., the window), instead of to a module's __dict__ as you expect in the Python world. Note that we don't actually 'import' anything here - the scripts and event handlers do not exist in a Python module. The intent is to provide similar semantics to JS. For example, when a top-level window has something like: <window ... script="foo = 1" ... ...
...> Note that (a) we have stuck an arbitrary attribute on a DOM element and (b) in all cases (e.g., event handler and top-level script), the DOM node needs to be explicitly specified - the globals are the window itself. The event handler could also have used getElementById - the point is that both the event handler and top-level script share the same namespace. Using Python Ideally, you just tell Mozilla you are using Python, and magically you can use Python instead of JavaScript. Once you set the script type for a node, it is the default for that node and all children. This means that if you set the script-type to Python for the window, Python is the default script type for all child elements in the window. XUL Use a script-type attribute on your elements. For example, <window script-type="appl...
RDF Datasource How-To - Archive of obsolete content
This article is at least partially outdated. Help bring it up to date, if you can. The XPCOM registration parts and the "As of this writing, it is not currently possible to implement JavaScript XPCOM components" comment seem outdated didn't check the whole article. This document is a cookbook that describes how to create a native, client-side datasource that works with Mozilla's RDF implementation. It supersedes (and borrows from) the original document put together by Robert Churchill. What is a datasource? The "RDF universe" consists of a set of statements about Internet resources; for example, "my home page was last modified April 2nd", or "that news article was sent by Bob". In the most abstract sense, a datasource is a collection of such statements. More concretely, a datasource is a trans...
...ee control, a menu, or a toolbar. In fact, you can convert RDF to an arbitrary content model using XUL Templates. ...
Safe Browsing - Archive of obsolete content
...
... ...
Safe Browsing: Design Documentation - Archive of obsolete content
...
... ...
File object - Archive of obsolete content
urity holes, and not well tested. Getting Started In order to use the File object from your JavaScript programs, you must enable it by setting the make variable JS_HAS_FILE_OBJECT during the compilation of your Spidermonkey engine. If you are building a standalone version of Spidermonkey (see: SpiderMonkey Build Documentation), this variable can be added on the make command line, like so: cd mozilla/js/src make -f Makefile.ref JS_HAS_FILE_OBJECT=1 Alternatively, if you are building a larger product (such as a browser) and want to include the File object, you may need to perform minor Makefile surgery. Summary Non-Standard Server-Side Object This object lets you work files and directories on the local filesystem, and create OS pipelines. Creating a pipeline involves spawning arbitrary pr...
...xactly equivalent to giving the script access to the UNIX shell or DOS command interpreter. Filesystem access is implemented with NSPR I/O Functions, and as such shares many semantics. Pipelines are implemented with the popen() system call. There is currently no support for p2open()-like semantics. Here is the original proposal for this object, and a status update from December 1998: http://www.mozilla.org/js/js-file-object.html Created By The File constructor: new File(); new File(filename); Parameters filename Name of the file we want to work with. Directories and pipelines are considered special files. Pipelines either begin or end with the pipe (|) symbol. Description Filenames are specified as strings that have an implementation defined format. Use of standard "file:" URLs is en...
Tamarin Acceptance Test Template - Archive of obsolete content
You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under t...
...tab-width: 4 -*- */ /* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is [Open Source Virtual Machine.]. * * The Initial Developer of the Original Code is * Adobe System Incorporated. * Porti...
Running Tamarin acceptance tests - Archive of obsolete content
of the AVMPlus executable (avmshell). Note: the name of the avmshell executable varies among the build systems; use the name of the AVM shell produced from the build process you used, above. Set the BUILTINABC environment variable to the path of the generated/builtin.abc. You may build the .abc files build by downloading the latest asc.jar. The latest asc.jar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. Also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/Flex+SDK. Set the ASC environment variable, as described above. Set the SHELLABC environment variable to the path of the generated/shell_toplevel.abc. $ cd tamarin-redux/test/acceptance $ export ASC=/Users/build/hg/tamarin-redux/utils/asc.jar $ export BU...
...e. The /android-public/android-vars.sh script has commented-out examples of the environment settings for running tests on the android avm shell. To recap the other environment settings: - Set the BUILTINABC environment variable to the path of the generated/builtin.abc. - You may build the .abc files build by downloading the latest asc.jar. The latest asc.jar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. Also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. - Set the ASC environment variable, as described above. - Set the SHELLABC environment variable to the path of the generated/shell_toplevel.abc. adb 'adb' stands for Android Debug Bridge. adb is used to access your android device and can ru...
Running Tamarin performance tests - Archive of obsolete content
ariable to the path of the avmshell executable. Set the BUILTINABC environment variable to the path of the builtin.abc. (in the tamarin-redux/generated directory) Set the SHELLABC environment variable to the path of the shell_toplevel.abc. (in tamarin-redux/generated directory) Set the ASC environment variable to the path of the asc.jar compiler. You may download the latest asc.jar from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. Also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/Flex+SDK. (Optional) You may compare the performance of the avmshell to another avmshell. For example you may download or build the latest checked in avmshell to compare against a local change. To compare a build against another build set the AVM2 environ...
...e phone. The /android-public/android-vars.sh script has commented-out examples of the environment settings for running tests on the android avm shell. To recap the other environment settings: - Set the BUILTINABC environment variable to the path of the /generated/builtin.abc. - You may build the .abc files by downloading the latest asc.jar. The latest asc.jar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar. Also the source to asc.jar may be downloaded and rebuilt from http://opensource.adobe.com/wiki/dis...exsdk/Flex+SDK. - Set the ASC environment variable, as described above. - Set the SHELLABC environment variable to the path of the /generated/shell_toplevel.abc. adb 'adb' stands for Android Debug Bridge. adb is used to access your android device and can run bo...
The new nsString class implementation (1999) - Archive of obsolete content
ss is very lightweight since it gets its functionality from the nsStrImpl static library. In addition to the nsStrImpl API shown above, nsString, nsAutoString and nsCString all offer additional API's (that all degrade to those found in nsStrImpl) for construction, searching and comparison. Also note that the new nsString interface mimics fully the interface in the existing nsString class found in mozilla/base/src/nsString.h. nsAutoString We still offer an nsAutoString that provides its own stack based buffer. This very useful class allows programmers to take advantage of the nsString/nsStrImpl implementation, while eliminating heap based allocations. An additional improvement has been made to nsAutoString that allows it to use an arbitrarily sized stack based buffer rather than its own internal b...
... ...
Treehydra - Archive of obsolete content
tree.def and cp-tree.def in the GCC sources. Documentation Treehydra Build Instructions How to build Treehydra Treehydra Manual Usage instructions Static Analyses Analyses being worked on for Mozilla 2(Many use Treehydra) Interesting Papers ESP Path-Sensitive Program Verification in Polynomial Time Community View Treehydra Forums... Mailing list Newsgroup RSS feed #static on irc.mozilla.org Blogs ...
...ogram Verification in Polynomial Time Community View Treehydra Forums... Mailing list Newsgroup RSS feed #static on irc.mozilla.org Blogs Taras Glek David Mandelin Related Topics Pork C/C++ Refactoring Tools, Mozilla 2, SpiderMonkey Categories Interwiki Language Links ...
URIScheme - Archive of obsolete content
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 ... ...
...me/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 ... ...
Binding Attachment and Detachment - Archive of obsolete content
Inherited: no Percentages: N/A The value of the -moz-binding property is a set of URLs that identify specific bindings. An individual URL in the set consists of the binding document's URL and the binding's document-unique identifier. In the following example, a binding is referenced that will be attached to all HTML checkbox elements. input[type="checkbox"] { -moz-binding: url("http://www.mozilla.org/xbl/htmlBindings.xml#checkbox"); } Bindings attached through CSS will only remain on the bound element as long as the element continues to match the style rule. If at any time a resolution of style on the element determines that a different binding should be attached, the old binding (and all bindings that it explicitly extends in its inheritance chain) will be detached. No bindings will b...
...igning the element.style.MozBinding property. Respectively bindings can be detached by setting element.style.MozBinding to empty string. Note: Some older papers mentioned DOM methods document.addBinding and document.removeBinding; these were subsequently discarded as redundant and not implemented. var checkbox = document.getElementById("mycheckbox"); checkbox.style.MozBinding = "url(http://www.mozilla.org/xbl/htmlBindings.xml#checkbox)"; This attachment is not necessarily synchronous. Scripts that invoke this method should not assume that the binding is installed immediately after this method returns. See Binding Documents for more information. When a binding is attached using the DOM, it inherits from the current most derived binding that may already be attached to the element. Any binding...
XBL 1.0 Reference - Archive of obsolete content
ement, and anonymous content that is inserted around the bound element. There are numerous adjustments in the current implementation in comparison of earlier XBL proposals, and not all of them are reflected yet in this document. The documentation process is still in progress: please keep it in your mind while using the provided information. XBL Elements XBL 1.0 elements are in the http://www.mozilla.org/xbl namespace. bindings binding content children implementation constructor destructor field property getter setter method parameter body handlers handler resources stylesheet image Binding Attachment and Detachment Attachment using CSS Attachment using element.style property <constructor> call <destructor> call Binding Documents DOM Interfaces The nsIDOMDoc...
...or this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes. ...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
o The Annotated Browser XPI Installer and the XPInstall API Reference. What do we mean by engine code? The XPInstall engine processes installer packages by reading instructions from their install scripts to extract files and take other install actions. The same XPInstall engine is used by the browser and the stub installers on all platforms. The XPInstall engine source resides at: <http://lxr.mozilla.org/seamonkey/sou...xpinstall/src/> What do we mean by stub installer? The install wizards used to install mozilla are lightweight stubs targeted to be around 200 KB disk footprint. Users download the stub installers, choose which packages to install, choose the destination directory for the installation, and select from various other options. Subsequently, when users click the "Install" butto...
...c toolbox for the mac, and gtk for the unix version. To learn more about the three platform-specific versions of the stub installer follow the links below: Unix Stub Installer Mac Stub Installer Windows Stub Installer What do we mean by xpistub? The XPInstall engine is not called directly by the stub installer. The stub installer calls some glue code: xpistub which resides at: < http://lxr.mozilla.org/seamonkey/sou...pinstall/stub/> This "glue" code initialized XPCOM and registers the XPInstall engine and requisite components to prepare for use by the stub installer. The stub installer hands off one-by-one a series of xpis to install. What do we mean by libxpnet? Cross-platform functionality for making file transfers across a network is provide by the library libxpnet. Complete details ...
enumValueNames - Archive of obsolete content
key value being sought. ...
...a string if it succeeded; NULL if the referenced subkey does not exist. ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
is installer script is relatively short, but it exercises most of the important features of the XPInstall API, and it can easily be used as a template for other more general software installations. In this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports. About browser.xpi browser.xpi is the XPI archive in which the main components of the Mozilla browser are archived for installation. Mozilla cross-platform installations use the XPI format as a way to organize, compress, and automate software installations and software updates. A XPI is a PKZIP-compressed archive (like ZIP and JAR files) with a special script at the highest level that ...
...1: err = addDirectory("Program", "6.0.0.2000110807", "bin", // jar source folder communicatorFolder, // target folder "", // target subdir true ); // force flag logComment("addDirectory() returned: " + err); // create the plugins folder next to mozilla var pluginsFolder = getFolder("Plugins"); if (!fileExists(pluginsFolder)) { var ignoreErr = dirCreate(pluginsFolder); logComment("dirCreate() returned: " + ignoreErr); } else logComment("Plugins folder already exists"); In this case, the files are contained within a single directory, so calling the Install object's addDirectory method is sufficient to queue all the f...
XPInstall - Archive of obsolete content
ated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. <?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- properties --> </Description> </RDF> Cross-Platform Install (XPInstall) is a technology used by Mozilla Application Suite, Mozilla Firefox, Mozilla Thunderbird and other XUL-based applications for installing extensions. An XPI (pronounced "zippy" and derived from XPInstall) installer module is a ZIP file that con...
...ll.rdf) at the root of the file. Documentation XPInstall API Reference XPInstall API Reference. Learn XPI Installer Scripting by Example This article uses the installer script from browser.xpi install package as the basis for discussing XPI installations in general. Creating XPI Installer Modules This article describes the packaging scheme of the Mozilla and offers a tutorial for creating a new package that can then be redistributed, installed, and made available to users. Install Wizards (aka: Stub Installers) View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed Tools XPInstall trigger page Related Topics Extensions, XUL, XPI ...
showcaret - Archive of obsolete content
<< XUL Reference home showcaret Type: boolean Whether or not to cause a typing caret to be visible in the content area. ...
... << XUL Reference home showcaret Type: boolean Whether or not to cause a typing caret to be visible in the content area. ...
src - Archive of obsolete content
Archive › Mozilla › XUL › Attribute › src
<< XUL Reference home src Type: URI The URI of the content to appear in the element. ...
... << XUL Reference home src Type: URI The URI of the content to appear in the element. ...
Things I've tried to do with XUL - Archive of obsolete content
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/clientHeight properties (see http://www.mozilla.org/docs/dom/domr...entHeight.html); no equivalent exists for XUL. Enn: most people would use the box object width and height properties, or do you want something else? Vlad: the boxObject width/height are the actual width and height of the box, regardless of the actual visible portion of the box (clipped by the window borders, for example). This is assuming no scrolling is going on. Resize eve...
...- as you grow the content, when you shrink the window, the content will simply be clipped (because now it has a bigger size than the window). You have no way of finding out what the clipped size is, so you can never shrink the content. An ugly workaround for this problem might include nesting an invisible HTML-Element in order to access its "clientWidth" method: <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> ... <html:body id="invisible_element" flex="1" > <svg xmlns="http://www.w3.org/2000/svg" version="1.1"><!-- ...or _visible_ XUL content or whatever... --></svg> </html:body> ... var available_width = document.getElementById("invisible_element").clientWidth; ... XBL in listboxes Using XBL bindings in listbo...
Box Objects - Archive of obsolete content
The content tree stores the nodes as they are found in the source code. The layout tree holds a different tree of nodes for each individual component that can be displayed. ...
...The content tree stores the nodes as they are found in the source code. The layout tree holds a different tree of nodes for each individual component that can be displayed. ...
Commands - Archive of obsolete content
tion is suitable for that element. In addition, the menu commands would need to be enabled and disabled depending on whether the focused element had selected text or not, and for paste operations, whether there is something suitable on the clipboard to paste. As you can see, this becomes complicated. By using commands, much of the work is handled for you. You can use a command for any operation. Mozilla uses them for almost every menu command. In addition, text fields and other widgets have a number of commands which they already support that you can invoke. You should use them when the operation depends on which element is focused. A command is identified by its id attribute. Mozilla uses the convention that command id's start with 'cmd_'. You will probably want to use the same id if a command...
...otice that the Delete command on the browser's Edit menu is enabled and that selecting it will delete a row. (See Discussion about opening this example). The example below isn't completely polished. Really, we should ensure that the selection and focus is adjusted appropriately after a deletion. ...
Creating Dialogs - Archive of obsolete content
ou do need to supply code to perform the appropriate tasks when the user presses each button. This mechanism is necessary because different platforms have a specific order in which the buttons appear. ...
...ton egS defaultButton - button is activated when the Enter key is pressed Note: The label attributes are required by remote sites and are probably missing in the above examples due to bug 224996. ...
Creating a Wizard - Archive of obsolete content
oss the bottom and the page contents in between. The title across the top is created using the title attribute, much like one would use for regular windows. The navigation buttons are created automatically. ...
...ton is pressed. You can set an attribute onwizardfinish on the wizard element to accomplish this. Set it to a script which performs whatever task you want and then returns true. This script might be used to save the information that the user entered during the wizard. For example: <wizard id="example-window" title="Select a Dog Wizard" onwizardfinish="return saveDogInfo();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> When the user clicks the Finish button, the function saveDogInfo() will be called, which would be defined in a script file to save the information that was entered. If the function returns true, the wizard closes. If it returns false, then the wizard does not close, which might occur if the function saveDogInfo() encountered invalid input, for exampl...
Custom Tree Views - Archive of obsolete content
t you should implement are listed below. rowCount This property should be set to the total number of rows in the tree. getCellText( row , column ) This method should return the text contents at the specified row and column. This will be called to display data for each cell. The rows are supplied as numeric values starting at 0. The columns are TreeColumn objects. In the older versions of Mozilla (before Firefox 1.5 or Mozilla 1.8), the columns are supplied as the values of the id attribute on the columns. If you need a id attribute like older versions, the id property of TreeColumn can be used. setTree( tree ) This method is called once to set the tree element on the view. Here is an example of defining such as object, which can be called whatever you want: //Moz 1.8 var treeView = ...
...tElementById('my-tree').view = treeView; } The following presents the example together. An inline script has been used here to simplify the example. Normally, you would put the script in an external script file. ...
Element Positioning - Archive of obsolete content
ts, the calculation is slightly trickier. Flexible elements are those that have a flex attribute set to a value greater than 0. Recall that flexible elements grow and shrink to fit the available space. Their default size is still calculated the same as for inflexible elements. The following example demonstrates this: Example 2 : Source View <window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox> <button label="Yes" flex="1"/> <button label="No"/> <button label="I really don't know one way or the other"/> </hbox> </window> The window will initially appear like in the image earlier. The first two buttons will be sized at a suitable default width and the third button will be larger because it has a longer label. The first button ...
...ot to the elements themselves. For example, the first box below will have its children stretch, because that is the default. The second box has an align attribute, so its children will be placed centered. Example 5: Source View <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yesno" title="Question" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox> <button label="Yes"/> <button label="No"/> </hbox> <hbox align="center"> <button label="Maybe"/> <button label="Perhaps"/> </hbox> </window> You can also use the style properties -moz-box-pack and -moz-box-align instead of specifying attributes. You may find the Box Alignment Example useful for trying out the vario...
Install Scripts - Archive of obsolete content
he necessary files. It is important to note that during step two, you only indicate which files should be installed and any other operations you wish to have happen. No files get copied until step three. Because of this, you can easily specify a number of files to be installed, come across some kind of error, and abort the whole process without modifying the user's system. The Component Registry Mozilla maintains a file which is a registry of all the components that are currently installed. Components include new chrome packages, skins and plugins. When a new component is installed, the registry gets updated. The registry also stores the set of files and version information about the installed components. That way, it is easier to check if a version of your component is already present and only ...
...rChrome() will need to be called three times. registerChrome(Install.CONTENT | Install.DELAYED_CHROME, getFolder(findDir, "content")); registerChrome(Install.SKIN | Install.DELAYED_CHROME, getFolder(findDir, "skin")); registerChrome(Install.LOCALE | Install.DELAYED_CHROME, getFolder(findDir, "locale")); The DELAYED_CHROME flag is used to indicate that the chrome should be installed the next time Mozilla is run. Installation Completion The addDirectory() and addFile() functions don't copy any files. They only state which files should be installed. Similarly, registerChrome() only states that chrome should be registered. To complete the process and begin copying files, call the performInstall() function. It takes no arguments. The final script for installing the find files component is shown below...
Keyboard Shortcuts - Archive of obsolete content
ontrol alt" key="1"/> </keyset> The first key is invoked when the user presses their platform-specific shortcut key and C. The second is invoked when the user presses F3. The third is invoked on a press of the Ctrl key, the Alt key and 1. If you wanted to distinguish between keys on the main part of the keyboard and the numeric keypad, use the VK_NUMPAD keys (such as VK_NUMPAD1). Refer to the Mozilla Keyboard Planning FAQ and Cross Reference for more information about selecting keyboard shortcuts to use in applications. Using the Keyboard Shortcuts Now that we know how to define keyboard shortcuts, we'll find out how we can use them. There are two ways. The first way is the simplest and just requires that you use the command event handler on the key element. When the user presses the key,...
... the keyboard shortcut so that it cannot be invoked. It is useful to change the disabled attribute using a script. Our find files example Let's add keyboard shortcuts to the find files dialog. We'll add four of them, one for each of the Cut, Copy, and Paste commands and also one for the Close command when the user presses Esc. ...
Persistent Data - Archive of obsolete content
you would like to save and then save it to a file. However, that would be a pain to do for every application. Conveniently, XUL provides such a mechanism to save the state of a window. The information is collected and stored in a RDF file (localstore.rdf) in the same directory as other user preferences. It holds state information about each window. This method has the advantage that it works with Mozilla user profiles, so that each user can have different settings. XUL allows you to save the state of any element. You will typically want to save toolbar states, window positions and whether certain panels are displayed or not, but you can save almost anything. persist attribute To allow the saving of state, you simply add a persist attribute to the element which holds a value you want to save. The ...
...ibute. You might use unusual values if you adjust attributes using a script. Our Find Files Example Let's add the persist attribute to some of the elements in the find files dialog. To save the position of the window. To do this, we need to modify the window. <window id="findfile-window" title="Find Files" persist="screenX screenY width height" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> This will cause the x and y position of the window and the width and height of the window to be saved. We could extend it further to save the collapsed state of the splitter. It doesn't really make sense to save the current tab state. Find files example so far : Source View Next, we'll look at using style sheets with XUL files. << PreviousNe...
Simple Menu Bars - Archive of obsolete content
such as File or Edit. disabled This boolean attribute determines whether the menu is disabled. Although you can, there's rarely a need to disable an entire menu. This attribute can be set to either true or false. Of course, the latter is the default. accesskey This is the key that the user can press to activate the menu item. This letter is typically shown underlined on the menu title. Mozilla will look at the label attribute and add an underline character to the character specified here. For that reason, you should specify a character that exists in the text (although the key will still work if it doesn't). The menu element is normally placed on a menubar, although it does not have to be. However, it will be given a different look. The image here shows what the earlier example wou...
...er of the menu item. label The text to appear on the menu item, such as Open or Save. disabled This boolean attribute determines whether the menu item is disabled. This attribute can be set to either true or false where the latter is the default. accesskey This is the key that the user can press to activate the menu item. This letter is typically shown underlined on the menu title. Mozilla will look at the label attribute and add an underline character to the character specified here. For that reason, you should specify a character that exists in the text. acceltext This specifies the shortcut key text to appear next to the menu command text. It does not associate a key action with the menuitem however. We'll look at how to do this later. menuseparator element The menusepar...
Tree View Details - Archive of obsolete content
ould be in such a case. Example of Hierarchical Custom View Let's put this together into a simple example that takes an array and constructs a tree from it. This tree will only support a single parent level with an inner child level, but it could be extended to support additional levels without too much effort. We'll examine it piece by piece. <window onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="elementList" flex="1"> <treecols> <treecol id="element" label="Element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> </window> We use a simple tree here with no data in the treechildren. The 'init' function is called when the window is loaded to initialize the tree. It simply sets the custom view by retrieving t...
...idate the row. Complete Example There are several other view functions we can implement but they don't need to do anything in this example, so we can create functions that do nothing for those. ...
Trees and Templates - Archive of obsolete content
r for template generation instead of the normal content builder. This means that elements will not be created for every row in the tree, making it more efficient. The flags attribute set to the value dont-build-content, as used in the example above, indicates that the tree builder should be used. If you leave the attribute out, the content builder will be used. You can see the difference by using Mozilla's DOM Inspector on a tree with and without the flag. If you do use a content builder instead, note that the content won't generally get built until it is needed. With hierarchical trees, the children don't get generated until the parent nodes have been opened by the user. In the template, there will be one treecell for each column in the tree. The cells should have a label attribute to set the la...
...a container and be an empty one as well. However, this is different from a resource that is not a container. For example, a bookmark folder is a container but it might or might not have children. However a single bookmark or separator is not a container. You can combine these two elements with other attribute matches for more specific rules. Next, we'll look at some of the datasources provided by Mozilla. << PreviousNext >> ...
Updating Commands - Archive of obsolete content
controller to use. The command dispatcher handles that part. Also, we could just call doCommand without checking if the command was enabled or not, although we probably shouldn't do that. The code above is generic enough that it can be a function that takes a command as an argument and executes that command. This function could then be reused for all commands. In fact, this is common enough that Mozilla includes a library which does just that. If you include the script 'chrome://global/content/globalOverlay.js' in a XUL file, you can call the goDoCommand method which executes the command passed as the argument. The code for this function is only a few lines long so you could include it directly in your code if for some reason you didn't want to include the library. <script src="chrome://global/c...
...mmand updaters have a number of events which they can respond to which are listed below. It is also possible to create your own. focus: occurs when the focused element changes. select: occurs when the selected text changes. undo: occurs when the undo buffer changes. clipboard: occurs when the contents of the clipboard changes. The following example shows the command updaters used in the Mozilla browser to update the edit menu commands. The functions used can be found in the 'chrome://communicator/content/utilityOverlay.js' script. <commandset id="globalEditMenuItems" commandupdater="true" events="focus" oncommandupdate="goUpdateGlobalEditMenuItems()"/> <commandset id="selectEditMenuItems" commandupdater="true" events="select" ...
XBL Inheritance - Archive of obsolete content
binding> The XBL here extends from the XUL textbox element. The URL given in the extends attribute above is the URL of the textbox binding. This means that we inherit all of the content and behavior provided by the textbox binding. In addition, we add a handler which responds to the keypress event. Autocompleting TextBoxes The example above is similar to how the URL autocomplete feature works in Mozilla. A textbox that supports autocomplete is just one with a XBL binding that extends the basic textbox. The autocomplete textbox adds extra event handling so that when a URL is typed, a menu will pop up with possible completions. You can use it in your own applications too. Just create a textbox with two extra attributes. <textbox type="autocomplete" searchSessions="history"/> Set the type to autoc...
...ete" searchSessions="history"/> Set the type to autocomplete to add the autocomplete feature to an existing textbox. Set the searchSessions to indicate what type of data to look up. In this case, the value history is used, which looks up URLs in the history. (You can also use the value addrbook to look up addresses in the address book.) Firefox uses a different autocomplete mechanism than the Mozilla suite, see XUL:textbox (Firefox autocomplete) In the next section, we'll see an example XBL-defined widget. << PreviousNext >> ...
Using the standard theme - Archive of obsolete content
osen by the user of the base application (the so called "Global Skin"), you have to add the following line to your XUL file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> This imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard XUL widgets of your application use the selected chosen theme. You do not have to specify a specific file; Mozilla will determine by its own which files in the directory it needs to use. If you are only going to use these global style sheets, you of course do not need a <tt>skin</tt> directory in your extension package, and also do not have to register a style in the <tt>chrome.manifest</tt>. Adding custom styles In order to provide custom styling for some of your widgets (apart from the standard global skin...
...That is, depending on the theme currently selected by the user, you can provide different custom style sheets for your extensions. For this to work, you need to create an approriate directory structure, with directory names corresponding to the names of the themes you want to extend, and of ...
Writing Skinnable XUL and CSS - Archive of obsolete content
This package contains a special skin called theglobal skin. If you wish for your package to blend in with the other packages, then the skin for your package should inherit information from the global skin in order to reduce the amount of duplication across packages and in order to make the UI as a whole easier to skin. ...
...ys), the fonts/colors used should not be described by Messenger. This allows the button to blend in as much as possible regardless of where it is used. The importance of this rule cannot be overstated. Derived skin files should not contain any rules for colors, fonts, or borders. Exceptions to this rule must be approved in order to be allowed into the product. Note that in our current designed Mozilla skin (aside from global) every single CSS file is a derived skin file, so this applies to ALL OF YOU!!! Derived skin files should not attempt to change the default look for a widget. For example, there should never be any CSS rules of the form tagName {...}; in a derived skin file. In doing so, you have redefined the default look for the widget, which will make the UI in your window different ...
XUL Reference - Archive of obsolete content
adio 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 where window wizard wizardpage Categorical list of all XUL elements << XUL Reference << Windows window wiz...
...pup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (Firefox autocomplete) textbox (Mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query querys...
XUL Template Primer - Bindings - Archive of obsolete content
ust be found for each variable for the rule to match. If a <binding> can't be matched, the rule will still fire. Example To illustrate how <bindings> work, we'll examine this XUL document, which builds a simple content model an RDF/XML file. ...
...:Description> </rdf:li> <rdf:li> <rdf:Description nc:name="Lumpy"/> </rdf:li> </rdf:Seq> </nc:friends> </rdf:Description> <rdf:Description ID="home" nc:street="437 Hoffman"/> <rdf:Description ID="doghouse" nc:street="435 Hoffman"/> </rdf:RDF> The RDF model that this file creates can be represented with the following graph. When displayed in Mozilla, something like this appears: Note that even though poor Lumpy has no nc:address property, he still appears in the content model! Unlike the <conditions>, bindings do not affect whether or not a rule matches: they just "pull through" additional information if it is available. The <bindings> element The <bindings> element is optional in a XUL template, but if present, must appear as a sibling...
XUL Event Propagation - Archive of obsolete content
that events raised in the interface can be caught anywhere above the element that raised the event. This flexibility in the XUL event model is the focus of this article. ...
...e supply them. But in XUL, almost every element includes an "oncommand" event listener attribute for getting events. ...
iframe - Archive of obsolete content
without security issues. More information is available in the XUL tutorial. ...
...s. More information is available in the XUL tutorial. ...
prefwindow - Archive of obsolete content
ondialogdisclosure, ondialoghelp, onload, onunload, title, type Properties buttons, currentPane, defaultButton, lastSelected, preferencePanes, type Methods acceptDialog, addPane, cancelDialog, centerWindowOnScreen, getButton, openSubDialog, openWindow, showPane Examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="Backups"> <preferences> <preference id="pref-backup" name="myapp.mybackups" type="bool"/> <preference id="pref-backupduration" name="myapp.mybackups.duration" type="int"/> </preferences> <checkbox label="Automatically Save Backups" preference="pref-backup"/> <textbox label="Duration:" pref...
...window is activated using openWindow() } Closing a prefwindow Sometimes you need to do things when the prefwindow is closed, such as things that can't (or shouldn't) be handled as preferences, such as saving passwords or updating SQLite data. To do this, you can set the prefwindow's onunload attribute to a function that will be run when the prefwindow is closed. <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="my-config-dialog" title="My application: configuration" onunload="onUnload(event.target)"> </prefwindow> function onUnload(prefwindow) { // Do actions there like saving values, password setting (that is not handled as a preference), etc. return true; } Opening a modal sub dialog A sub dialog can only be opened via document.documentElem...
Building XULRunner - Archive of obsolete content
ner #Uncomment the following line if you don't want to build JavaXPCOM: #ac_add_options --disable-javaxpcom CVS tags and XULRunner versions Older XULRunner releases where tagged in CVS with (for instance XULRUNNER_1_8_0_5_RELEASE ) up to version 1.8.0.5 The CVS repository does not have specific tags for XULRunner anymore. Instead a XULRunner build is a just special build made from the Firefox/Mozilla tree, using the same tag as a Firefox build. There is a convention where a certain XULRunner version maps to a certain tag in the CVS. For instance XULRunner 1.8.1.3, the corresponding tag is CVS is : FIREFOX_2_0_0_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/A...
...ner 1.8.1.3, the corresponding tag is CVS is : FIREFOX_2_0_0_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 ". \...
XULRunner FAQ - Archive of obsolete content
The goal of XULRunner is to facilitate development and deployment of Internet applications. It is not meant to be a full-featured runtime; this allows XULRunner to maintain a smaller footprint and simpler deployment strategy than generic full-featured runtimes. If I use XULRunner do I have to write my application in XUL? No! You can write your application in any language supported by the Mozilla web platform, including HTML, XHTML, SVG, or XUL. So why is it called XULRunner, instead of HTMLRunner or something? XUL was always the original language of choice for UI in mozilla applications and the main library is called libXUL, mostly the name is a hangover from that that has now stuck. When will Firefox be based on XULRunner? There is no intention to do this for official re...
... do this. Why is installing XULRunner so painful? Why isn't there a nice installer? Because nobody has written that code yet! This is a developer preview release: additional features for installing and deploying XULRunner and applications based on XULRunner will be available in future releases. I'm writing a XUL application, how can I deploy that application to my users? Right now Mozilla recommends that XULRunner should be deployed privately with each application. See Deploying XULRunner 1.8 for more information. Where is the source code? Here. 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 t...
XULRunner Hall of Fame - Archive of obsolete content
XULRunner 5+ based applications These applications use XULRunner 5 or greater. AZARDI Free Win/Mac/Linux ePub 2/ePub 3 desktop reader using HTML5 and latest CSS features of Gecko for interactive e-books. 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. Source ChatZilla A standalone version of the ChatZilla IRC client. Conkeror A highly programmable web browser with a leopard-oriented design inspired by Emacs. ...
...tension or the stand-alone XUL application. OpenDocument Viewer Cross-platform viewer for OpenDocument files. TaskPool TaskPool is a little application to help keep track of time. You can add tasks to a pool, turn them on and off, and it will tick off seconds. SVGclock An SVG-based clock. Crowbar A web scraping environment based on the use of a server-side headless mozilla-based browser. 30b A XULRunner-based wrapper for 30boxes.com XUL Explorer "a lightweight XUL IDE... an easy way to experiment with XUL" XULExplorer A patched version of XUL Explorer to re-enable application and extension skeleton generation. Foxkeh Clock (for Japanese page) A clock application based charactor Foxkeh. Pyjamas-Desktop A Python Web Widget tool...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
ws: nsldap32v50.dll nsldappr32v50.dll On linux: libldap50.so libprldap50.so Those are the native LDAP library. If you copy as usual those files in the components directory of your XUL app, this can't work. Actually, the LDAP interfaces are available (for exemple, Components.interfaces.nsILDAPConnection is not null), but the components can't be loaded (for example, Components.classes["@mozilla.org/network/ldap-connection;1"] is null). This is due to the fact that the native LDAP library files are not found by the XULRunner process. The solution is to use the bsmedberg stub, described in Using Dependent Libraries In Extension Components: the component library is just a loader of the real library and all its dependencies, so as all the needed libraries are loaded. Create a subdirectory e...
...on;1"] is null). This is due to the fact that the native LDAP library files are not found by the XULRunner process. The solution is to use the bsmedberg stub, described in Using Dependent Libraries In Extension Components: the component library is just a loader of the real library and all its dependencies, so as all the needed libraries are loaded. Create a subdirectory extensions/ldapstub in the mozilla source code directory, containing two files, Makefile.in and LDAPStubLoader.cpp: Makefile.in: # Copyright (c) 2005 Benjamin Smedberg <benjamin@smedbergs.us> DEPTH = ../.. srcdir = @srcdir@ topsrcdir = @top_srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = mozldapstub LIBRARY_NAME = mozldap_stub IS_COMPONENT = 1 FORCE_SHARED_LIB = 1 REQUIRES = \ xpcom \ string \ $(NULL) ...
MacFAQ - Archive of obsolete content
already running, so: create a default preference of "browser.chromeURL" that points to your new "hiddenWindow" as such: "chrome://myXUL/content/hiddenWindow.xul" next take the code below and drop it in, to create the hiddenWindow.xul (Note: the debug function and nsICommandLine try/catch can be removed, all you need is the window.arguments[0]) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="myXUL_hidden" windowtype="myXUL:hiddenwindow" title="" width="0" height="0" persist="screenX screenY width height sizemode" > <!-- Load the Mozilla helpers --> <script type="application/javascript" src="chrome://global/content/nsUserSettings.js" /> <script><![CDATA[ function debug(aLogString) { var mConsoleS...
...e.is.only.xul" id="myXUL_hidden" windowtype="myXUL:hiddenwindow" title="" width="0" height="0" persist="screenX screenY width height sizemode" > <!-- Load the Mozilla helpers --> <script type="application/javascript" src="chrome://global/content/nsUserSettings.js" /> <script><![CDATA[ function debug(aLogString) { var mConsoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService) mConsoleService.logStringMessage("myXUL: " + aLogString + "\n"); } function checkOtherWindows() { var singletonWindowType = nsPreferences.copyUnicharPref("toolkit.singletonWindowType"); var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;...
Windows and menus in XULRunner - Archive of obsolete content
as well as to control its width and height. Although I have not seen it mentioned yet, I am assuming that you can only have one <window> element per XUL file. Here is an example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="text/css"?> <!DOCTYPE window SYSTEM "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ... </window> Notice the references to CSS and DTD files. The CSS is used to apply formatting to elements, just as it would in HTML. The DTD is used to create entity references so strings for titles and labels are not stored directly in the XUL file; this makes updating the text -- and localization of the application -- much...
...the application's available commands. XUL provides elements to support both menus and toolbars. ...
Mozprocess - Archive of obsolete content
Mozprocess aims to provide the ability to robustly terminate a process (by timeout or otherwise), along with any child processes, on Windows, OS X, and Linux. Mozprocess utilizes and extends subprocess.Popen to these ends. ...
...t of the process management. Basic usage: process = ProcessHandler(['command', '-line', 'arguments'], cwd=None, # working directory for cmd; defaults to None env={}, # environment to use for the process; defaults to os.environ ) exit_code = process.waitForFinish(timeout=60) # seconds See an example in https://github.com/mozilla/mozbase/b...profilepath.py ProcessHandler may be subclassed to handle process timeouts (by overriding the onTimeout() method), process completion (by overriding onFinish()), and to process the command output (by overriding processOutputLine()). TODO Document improvements over subprocess.Popen.kill ...
Mozrunner - Archive of obsolete content
mozrunner utilizes mozprofile for managing application profiles and mozprocess for robust process control. mozrunner may be used from the command line or programmatically as an API. Command Line Usage The mozrunner command will launch the application (specified by --app) from a binary specified with -b or as located on the PATH. ...
...ation (specified by --app) from a binary specified with -b or as located on the PATH. mozrunner takes the command line options from mozprofile for constructing the profile to be used by the application. Run mozrunner --help for detailed information on the command line program. API Usage mozrunner features a base class, mozrunner.runner.Runner which is an integration layer API for interfacing with Mozilla applications. mozrunner also exposes two application specific classes, FirefoxRunner and ThunderbirdRunner which record the binary names necessary for the Runner class to find them on the system. Example API usage: from mozrunner import FirefoxRunner # start Firefox on a new profile runner = FirefoxRunner() runner.start() ...
2006-10-06 - Archive of obsolete content
Read more... Discussions W3C Sets Road Map for Web App Accessibility The W3C introduced its WAI-ARIA (Web Accessibility Initiative for Accessible Rich Internet Applications) roadmap--a set of guidelines for developers to make accessible web content. This set of documents tackles some of the difficulties that AJAX has been causing with regards to accessibility. Read more... ...
... Authors Dean Woodside Sherman Fernandes ...
2006-09-29 - Archive of obsolete content
4. Updated L10n status for Sunbird 0.3 release According to Simon Paquet, we now have a full l10n comparison on the trunk between en-US and all locales with a calendar localization. Details are available for Calendar Only and for Calendar and Core. Discussions No Discussions available this week. Meetings Sept. 27 status meeting cancelled Most of the Mozilla Calendar participants were unavailable during Sept. 27, the meeting was cancelled and rescheduled for a later date. ...
...unbird 0.3 RC1 TEST DAY Oct.3 to Oct. 4. Updated L10n status for Sunbird 0.3 release According to Simon Paquet, we now have a full l10n comparison on the trunk between en-US and all locales with a calendar localization. Details are available for Calendar Only and for Calendar and Core. Discussions No Discussions available this week. Meetings Sept. 27 status meeting cancelled Most of the Mozilla Calendar participants were unavailable during Sept. 27, the meeting was cancelled and rescheduled for a later date. Sept 20 Brief Status Meeting The meeting consisted entirely of the status and details of Sunbird 0.3. The details of Subird 0.3 RC1 are available here. Authors Mark Paruzel Yi (Eric) Shen [| Back to Weekly Summaries ] ...
2006-10-06 - Archive of obsolete content
A wiki and IRC channel have been created to track their progress. Discussions Firefox trunk and rc1 slowdown using tabs Discussion regarding certain theme components (specifically alpha-transparency) creating a high CPU load on OS/2. Title case capitalization rules in Firefox Discussion regarding rules for capitalizing the first letter of Firefox menu items in the FF UI. ...
...runk and rc1 slowdown using tabs Discussion regarding certain theme components (specifically alpha-transparency) creating a high CPU load on OS/2. Title case capitalization rules in Firefox Discussion regarding rules for capitalizing the first letter of Firefox menu items in the FF UI. Engineering Student Project - Industry Coach Paul Betts from Ohio State University is looking for someone from Mozilla to be his "Industry Coach" for Engineering 494 - How Great Ideas Turn into Great Products. Mozilla is a great product afterall. Reload vs. reload from cache Discussion regarding the lack of user understanding regarding reloading and reloading from the cache and how to address it. Why Suggestions in search bar doesn't work for me? Discussion regarding suggestions in the search bar not functionin...
2006-10-20 - Archive of obsolete content
Myk will be paying close attention to features dealing with content filtering, manipulation and control in FF3. To contribute visit the wiki Discussions I wanna make an addon for Firefox A commonly asked question in many newsgroups. ...
... discussion. How to create firefox extension (chrome) to add images next to URLs ? Question regarding how to make a firefox extension that would insert an image next to all links in the loaded web pages similar to the McAfee SiteAdvisor extension. Adding support for new URI scheme Question regarding creating a new URI scheme for Firefox on Windows. Helpful information was found here on mozillaZine. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Summary List ...
2006-10-26 - Archive of obsolete content
Discussions Should be easier to import bookmark backups User asking for thoughts about having Bookmarks Manager's Import Wizard import from backups in the bookmarkbackups folder. No repiles yet. Fx 1.5.0.x (Linux) not building since 20-Oct-2006 17:45 PDT? Tony inquires why tinderbox is showing that the Fx 1.5.0.x (Linux) has failed since October 20. Gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." Learn the Traffic Magic of Search Engine Cloaking Mark describes the magic of Search Engine Cloaker. ...
...r 20. Gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." Learn the Traffic Magic of Search Engine Cloaking Mark describes the magic of Search Engine Cloaker. (what it is, how to use it) Cross-post-and followup fx2 announcment to support-firefox Request for when the announcement about Firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup. Firefox Killer features suggestion John describes his suggestions for "killer features" for firefox. Debug Minefield on Intel Mac An inqury about how to debug minefield on an intel mac. Rebuild FireFox after modifying source code An inqury about how to rebuild the code after making a minor change - the user is unfamiliar with how to use the command prompt. ...
2006-10-27 - Archive of obsolete content
Discussions Should be easier to import bookmark backups User asking for thoughts about having Bookmarks Manager's Import Wizard import from backups in the bookmarkbackups folder. No repiles yet. Fx 1.5.0.x (Linux) not building since 20-Oct-2006 17:45 PDT? Tony inquires why tinderbox is showing that the Fx 1.5.0.x (Linux) has failed since October 20. Gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." Learn the Traffic Magic of Search Engine Cloaking Mark describes the magic of Search Engine Cloaker. ...
...r 20. Gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." Learn the Traffic Magic of Search Engine Cloaking Mark describes the magic of Search Engine Cloaker. (what it is, how to use it) Cross-post-and followup fx2 announcment to support-firefox Request for when the announcement about Firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup. Firefox Killer features suggestion John describes his suggestions for "killer features" for firefox. Debug Minefield on Intel Mac An inqury about how to debug minefield on an intel mac. Rebuild FireFox after modifying source code An inqury about how to rebuild the code after making a minor change - the user is unfamiliar with how to use the command prompt. ...
2006-11-10 - Archive of obsolete content
Discussions site-specific search using our search box A discussion surrounding implementing a way to search a current page with the page's embedded search component and how to make this efficient and usable. Event in Firefox similar to OnDownloadComplete event in IE An inquiry about how to change the font of a web page before it is displayed using an extenstion. favicon as microsummary/feed/other stuff indicator Suggestion about making the favicon create a bookmark for the page with a microsummary. ...
...ement. what is the build date for Firefox 2? Quesiton about why a user using Firefox 2 RC3 didn't get a prompt for updating to Firefox 2 after the release date. improving the UE for content control Suggestion about how to improve user experience with options controlling the appearance of web content. Popup blockers..window handlers Inquiry of how to implement the pop-up blocker on the mozilla toolbar. No replies as of yet. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Summary List ...
2006-10-06 - Archive of obsolete content
Summary: mozilla.dev.builds - September 30th to October 6th 2006 TB MOZILLA_1_8_BRANCH build problem on Mac OS X (10.4.7, universal build) Ludwig Hugelschafer stated that he has been encountering an error when he executes a "make export" operation on ThunderBird (part of the MOZILLA_1_8_BRANCH) since September 15th. ../../dist/host/bin/host_xpidl -m header -w -I~mozilla/xpcom/base -I../../dist/idl -o _xpidlgen/nsIConsoleListener ~/mozilla/xpcom/base/nsIConsoleListener.idl gmake[2]: *** [_xpidlgen/nsIConsoleListener.h] Bus error gmake[2]: *** Deleting file `_xpidlgen/nsIConsoleListener.h' gmake[1]: *** [export] Error 2 make: *** [all] Error 2:: On Octorber 4th Ludwig Hugelschafer responded to his original post with the solution to his own problem. He found out that a b...
... ThunderBird. Ludwig Hugelschafer response to the posting. Announcements New SVG build dependency coming On October 2nd T Rowley announced that: Soon SVG on the trunk will be switching to use thebes directly (instead of the current choice of direct cairo or punching a hole through thebes to cairo). Once completed you will need to build cairo gfx in order to build SVG. https://bugzilla.mozilla.org/show_bug.cgi?id=354866 Taking moz180-linux-tbox down temporarily Oct 6th early afternoon (PDT) On October 5th Rob Helmer announced that: He will be taking the 1.8.0 branch (en-US and l10n) Linux tinderbox down tomorrow afternoon (Oct 6th, PDT) in order to clone the disks and create a staging server for the release automation work. ( see bug 355309. He also mentioned that he has filed b...
2006-11-17 - Archive of obsolete content
However he has been unsuccessful and gets the following errors: checking for GTK - version >= 1.2.0... no Could not run GTK test program, checking why... The test program failed to compile or link. See the file config.log for the exact error that occured. This usually means GTK was incorrectly installed or that you have moved GTK since it was installed. ...
...See the file config.log for the exact error that occured. This usually means GTK was incorrectly installed or that you have moved GTK since it was installed. In the latter case, you may want to edit the gtk-config script: /usr/bin/gtk-config configure: error: Test for GTK failed Bryan is asking for help as he is confused and has no idea what is causing the build process to fail. Announcements mozilla/configure regeneration down On November 13th J. Paul Reed announced that: There was a power outage at his office and the machines, which are responsible for running autoconf (configure.in -> configure), located in his office failed to boot up after power was restored. configure regeneration back up, but another outage tonight... On November 13th J. Paul Reed announced that: The machine i...
2006-12-01 - Archive of obsolete content
Meetings There were no meetings this week. ...
...his? November 27th: Rinaldi J. Montessi posted a link to a bug that he himself added to bugzilla. Announcements Automatic configure updated back On November 27th J. Paul Reed announced that: The server which performs the automatic autoconf/configure generation is back online. J. Paul Reed has also requested that if any problems are encountered he should be contacted via irc in #build @ irc.mozilla.org. Meetings There were no meetings this week. Summarized By: Vanessa Miranda & Mohammad Tirtashi ...
2006-10-06 - Archive of obsolete content
Firefox 2 sign-off procedure Localization team should begin intense QA as outlined here. FFx 2 RC2 testing today L10n builds were completed was completed and ready for test. test resumt will be found here Another Lightning localization update with some bad news Difference has been located between SUNBIRD_0_3_BRANCH (for Sunbird 0.3) and MOZILLA_1_8_BRANCH. Sunbird/Lightning localization update You need to update your localization if you want your locale to ship with Lightning 0.3 or Sunbird 0.3. MozillaTranslator 5.13 RFEs new version of MozillaTranslator will be relaesed in a few weeks. ...
...today L10n builds were completed was completed and ready for test. test resumt will be found here Another Lightning localization update with some bad news Difference has been located between SUNBIRD_0_3_BRANCH (for Sunbird 0.3) and MOZILLA_1_8_BRANCH. Sunbird/Lightning localization update You need to update your localization if you want your locale to ship with Lightning 0.3 or Sunbird 0.3. MozillaTranslator 5.13 RFEs new version of MozillaTranslator will be relaesed in a few weeks. Calendar localization update RC1 for Sunbird 0.3 is out now and ready for testing. L10n locked down - FF2 RC2 Code Freeze 9/29/2006 at 9AM PDT the l10n repository is locked down. Discussions status update fx2 status update for firefox 2. Meetings None for this week. Authors Paul Yanchun Gu (...
2006-10-13 - Archive of obsolete content
L10n freeze on SeaMonkey 1.1 code is imminent in the next days, as well as beta release. Do early testing using code from this link. Discussions MozillaTranslator 5.13 RFEs MozillaTranslator 5.13 is ready to be released in a few weeks. Author is declaring RFE (Request for Enhancement). A few bugs have been listed. Meetings None for this week. ...
... while ago Firefox 2 RC2 is out Firefox 2 RC2 is out, to download click here SUNBIRD_0_3_RELEASE tag being created SUNBIRD_0_3_RELEASE tag being created SeaMonkey 1.1 localization freeze and Beta upcoming There are no open blockers left. L10n freeze on SeaMonkey 1.1 code is imminent in the next days, as well as beta release. Do early testing using code from this link. Discussions MozillaTranslator 5.13 RFEs MozillaTranslator 5.13 is ready to be released in a few weeks. Author is declaring RFE (Request for Enhancement). A few bugs have been listed. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-11-10 - Archive of obsolete content
Latvian pellcheck dictionary for FF2.0 Newest OpenOffice dictionary files for FF 2.0 spell-checker is available. Trunk / 1_8 for Kurdish Firefox The Firefox translations of the Kurdish are only in trunk Translating the Firefox Privacy Policy The final and approved en-US version of Privacy Policy is available here and ready for localization team to translate. SeaMonkey 1.0.6 and 1.1 Beta upcoming SeaMonkey 1.0.6 and 1.1 Beta are both available here. ...
...h Firefox The Firefox translations of the Kurdish are only in trunk Translating the Firefox Privacy Policy The final and approved en-US version of Privacy Policy is available here and ready for localization team to translate. SeaMonkey 1.0.6 and 1.1 Beta upcoming SeaMonkey 1.0.6 and 1.1 Beta are both available here. Discussions Help about Firefox 3 A discussion on how to syncronise MOZILLA_1_8_BRANCH with the trunk, which tag should be used to check-in files on trunk, and when files will be pulled from trunk to create another branch (MOZILLA_1_9_BRANCH?) for Firefox 3. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-11-17 - Archive of obsolete content
Summary: mozilla.dev.l10n - November 17, 2006 Announcements SeaMonkey 1.1b in Russian (ru-RU) SeaMonkey 1.1b in Russian (ru-RU) is uploaded to ftp.mozilla.org SeaMonkey 1.0.6 in Russian (ru-RU) SeaMonkey 1.0.6 in Russian (ru-RU) is uploaded to ftp.mozilla.org SeaMonkey 1.0.6 in Czech (cs-CZ) SeaMonkey 1.0.6 in Czech (cs-CZ) is uploaded to ftp.mozilla.org SeaMonkey 1.0.6 he-IL SeaMonkey 1.0.6 he-IL is released. SeaMonkey 1.0.6 in French SeaMonkey 1.0.6 in French (fr-FR) is released. Discussions How to translate mozilla to a language called Quiche How to translate mozilla to a language called Quiche. How to start a localization How to start a localization PO format usage Discussion on how to make l10n easier due to expansion to 100 locales. Quick builds ...
...a localization PO format usage Discussion on how to make l10n easier due to expansion to 100 locales. Quick builds for localisers (full or partial) Discussion on moz-l10n-builder, which automates many of the functions required in localization process. Link is located here. Going to FOSDEM 2007 FOSDEM 2007 (Free and Open source Software Developers' European Meeting), February 24th - 25th. Mozilla developers will be having a room, and everyone is invited. Link to the event here. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-11-24 - Archive of obsolete content
Beta 2 Freeze around January 4th. Final Release date in in early 2007. approval queue for fx 2.0.0.1 closing Closing the approval queue for Firefox 2.0.0.1 Discussions Quality of localized builds and process requirements Quality of localized builds and process requirements The Translate Toolkit MDNto PO: its current state and how to use it Discussion on clarifications on Translate Toolkit to avoid confusion. Feedback on L10n:Ownership draft Feedback on the L10n:Ownership draft at Mozilla wiki site detailed here. Summary vs. ...
...1 closing Closing the approval queue for Firefox 2.0.0.1 Discussions Quality of localized builds and process requirements Quality of localized builds and process requirements The Translate Toolkit MDNto PO: its current state and how to use it Discussion on clarifications on Translate Toolkit to avoid confusion. Feedback on L10n:Ownership draft Feedback on the L10n:Ownership draft at Mozilla wiki site detailed here. Summary vs. Live Titles There seems to be a few locales that use "Summary" or a translation thereof instead of "Live Titles" to name the UI part of microsummaries. The lxr query is detailed here. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-12-01 - Archive of obsolete content
Summary: mozilla.dev.l10n - December 1, 2006 Announcements Langpacks for Sunbird nightly builds available for testing Langpacks for Sunbird nightly builds available for testing SeaMonkey 1.1 Late String Changes for mail content policy The fix to bug 360288 has landed. Details in the thread. Thunderbird Options Dialog String Changes a lot of string changes to the Thunderbird Options dialog was landed. Discussions Convert OOo .dic to .xpi Convert OOo .dic to .xpi MozillaTranslator and Sourceforge.net about the best way to organize things Creating a <locale>.jar file from the CVS structure Discussion on how to package a <locale>.jar from the CVS structure without having to download the entire mozilla source. At the moment there is no simple way of doing this. F...
...ngs Creating a <locale>.jar file from the CVS structure Discussion on how to package a <locale>.jar from the CVS structure without having to download the entire mozilla source. At the moment there is no simple way of doing this. From 50 to 100 locales Discussion continues on finding a better tool for localization. Feedback on L10n:Ownership draft Feedback on the L10n:Ownership draft at Mozilla wiki site detailed here continues. There's a question about the roles of Peer in the team Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-07-17 - Archive of obsolete content
Announcements sFirefox 2/Gecko 1.8.1 bug approvals Starting on Friday July 21 at 10:00a PDT the release triage team will no longer be accepting bugs unless they meet one of the posted criteria. 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. ...
.../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-12-01 - Archive of obsolete content
te - We Need Help! Jay Patael 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 agend...
...n 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.planning and dev news blog are suggested. Bon Echo Project Status: remaining "to-do" items Beltzner starts a discussion on when to offer 1.5.0.8+ users the chance to upgrade to ff2.x (now or when ff2.0.0.1 is released). Also discussed is the the MOZILLA_1_8_BRANCH's NPOTB (Not Part Of The Build) checkin policy. This newsgroup or "governance"? Mitchell Baker asks where should topics about organization and governance, moz.dev.planning or moz.governance? mozilla.org staff, project drivers, and technical oversight Mike Connor starts a discussion about the need for a "buck stops here" group and the replacement of drivers@mozilla.org. Three replac...
2006-11-03 - Archive of obsolete content
Alex Vinten and Neil help him out by figuring out exactly which environment he's running in. John Gaunt discusses a proposed XULRunner unit-tests like xpcshell. ...
...Alex Vinten and Neil help him out by figuring out exactly which environment he's running in. John Gaunt discusses a proposed XULRunner unit-tests like xpcshell. ...
2006-11-10 - Archive of obsolete content
Benjamin Smedberg crossposted a notice about Unit Testing For the Mozilla Toolkit, letting developers know about the importance of testing for the improvement of Mozilla 2, and asks for complete coverage. Several community members comment, backing up Benjamin's post. ...
... Summary: mozilla.dev.platform - November 4th - November 10th, 2006 Announcements No announcements this week Traffic beaufour moves the discussion about XulRunner unit-tests like xpcshell from mozilla.dev.platform to mozilla.dev.quality. Benjamin Smedberg crossposted a notice about Unit Testing For the Mozilla Toolkit, letting developers know about the importance of testing for the improvement of Mozilla 2, and asks for complete coverage. Several community members comment, backing up Benjamin's post. William VanderPol asks, regarding Remote XUL Applications, if is it possible (or does it exist?) to have an extension that will allow chrome access to certain specified URL's? James Leigh points out that resources are available at O'Reily, in the Creating Applications with Mozilla section. ...
2006-11-17 - Archive of obsolete content
Alex Vincent ran into some difficulty with XULRunner Extension manager not recognizing XULWidgets for Verbosio? However he found out that it was a result of his flat-chrome version of XUL Widgets and works fine with the jarred-chrome version. Boaz discuses the evolution of web browsers towards a more "application mode" whereas a web browser is loaded for the sole purpose of running a given website. ...
... Peter Naulls makes the suggestion in Use and maintenance of xlib code that he become the nominal maintainer of the xlib code. Meetings No meetings this week ...
2006-10-20 - Archive of obsolete content
There are a few concerns with the software updates, and a decision is required on this before a "Go" for RC3 release can be given. Announced by Tim on Friday October 13, 2006. Help required designing new Home for Quality.Mozilla.Org - Talented Web Designers and/or Artists interested in helping the design for Quality.Mozilla.Org please read this posting. If your theme is chosen you will be placed on the hall of fame and will receive a gift from Mozilla. Posted by Jay Patel on October 18th, 2006. ...
...Posted by Jay Patel on October 18th, 2006. ...
2006-11-10 - Archive of obsolete content
Stay tuned! Discussions XULRunner unit-tests like xpcshell - Allan hacked the xpcshell-simple harness so it fits his needs. ...
...Stay tuned! Discussions XULRunner unit-tests like xpcshell - Allan hacked the xpcshell-simple harness so it fits his needs. ...
2006-11-24 - Archive of obsolete content
robcee, rhelmer, and bsmedberg are the possible candidates. ...
...robcee, rhelmer, and bsmedberg are the possible candidates. ...
2006-09-29 - Archive of obsolete content
Discussions Discussion on how the Firefox 1.5.0.7 DOM generates XHTML inline elements using Wordpress. It was determined that the generated elements from Wordpress do not follow the WC3 guidelines in appendix C of XHTML 1.0. Although the W3 validation accepted the generated XHTML as valid, a bug identified within the HTML Working Group ignored the invalid elements. Details can be located at layout confusion Refactoring the nsHTMLReflowState(ComputeBlockBoxData, InitConstraints) and nsImageFrame::GetDesiredSize which uses NS_INRINSICSIZE, into the following method: /** * Compute the size that a frame will occupy. ...
...s concluded that a frame model change is utilized within a popup, not a layout change. On the reflow branch, check the DIRTY and DIRTY_CHILDREN framestate flags. That won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown. Details can be located at frame reflow Issues related to the ongoing implementation of MathML-in-HTML into Mozilla, which include: Exposing the MathML implementation to tag soup. CSS Matching rules. Details can be located at MathML-in-HTML5 Meetings No meetings for this week. ...
2006-11-10 - Archive of obsolete content
Discussions Developing an extension like XmlHttpRequest / nsIDocument / MOZILLA_INTERNAL_API A discussion on how to develop an extension similar to XmlHttpRequest but for a different protocol than Http, emulating the asynchronous aspect. Meetings None during this week. ...
... Meetings None during this week. ...
2006-11-24 - Archive of obsolete content
Summary: mozilla.dev.tech.xpcom - Nov 18-Nov 24, 2006 Announcements None during this week. ...
... Announcements None during this week. Discussions Tutorials: non C++ bindings for XPCOM Tutorials on how to interface with Firefox using XPCOM on a similar basis to how a developer can with Internet Explorer through it's COM interface Tutorals and References related to extension development Tutorials on developing extensions which use the third party libraries for firefox References to mozilla API Exposed JavaScript Component + XMLDocument not accessible A discussion on Error: uncaught exception: Permission denied to get property XMLDocument.textContent Creating XPCOM components A good discussion about "Components.classes[cid] has no properties" error Firefox HTTP Explanation about how Firefox handles the HTTP aspect Meetings None during this week. ...
2006-10-06 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-10-13 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-10-27 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-11-03 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-11-10 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-11-24 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
2006-12-01 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
... Discussions None during this week. Meetings None during this week. ...
Samples and Test Cases - Archive of obsolete content
ugin situation - better organization, updated build systems, get them building on all platforms. ...
...on, updated build systems, get them building on all platforms. However, even if one cannot build the samples they can still be very valuable as code references. ...
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
d 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. ...
...ad, 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. ...
Plugins - Archive of obsolete content
Important: Since Firefox 52, all plugin support except Flash has been dropped (see Plug-in support has been dropped other than Flash for more details). Flash usage is also set to be phased out in the future. Note: Plugins are now a legacy technology. They are not available on most mobile devices. Mozilla encourages website developers to avoid using plugins wherever possible and use standard Web APIs instead. If there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that Mozilla can prioritize web platform work to make those use cases possible. For more information about plugin roadmap, see non-archived plugin information. Plugins are shared libraries that users can install to di...
...tall 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 plugins have been using since the Netscape 3.x days. Categories Interwiki Language Links Join the plugin development community Choose your preferred method for joining the discussion: Mailing list Newsgroup RSS fee...
Developing cross-browser and cross-platform pages - Archive of obsolete content
ake updates to such code which attempts to narrow down the browser and browser version and to make the appropriate switches. Another major problem with this approach is that the browser identity can be "spoofed" because, in many modern browsers, the navigator.appVersion and navigator.userAgent string properties are user configurable strings. For example, Firefox 1.x users and users of any/all Mozilla-based browsers can customize the "general.useragent.*" string properties to any value. Opera 6+ allows users to set the browser identification string via a menu Internet Explorer uses the Windows registry Safari, Konqueror and Icab browsers can mask their browser identity under Internet Explorer or Netscape labels A user or browser distributor can put what they want in the navigator.userAgen...
...approach, you ensure that all browsers -- including future releases and browsers whose userAgent strings you do not know about -- will continue working with your code. More on object/feature support detection: A Strategy That Works: Object/Feature Detecting by comp.lang.javascript newsgroup FAQ notes Browser detection - No; Object detection - Yes by Peter-Paul Koch Also good http://developer.mozilla.org/docs...rowser_Support but outdated in my opinion ...
References - Archive of obsolete content
<- Previous section: Summary of Changes You can learn more on using web standards from these sites (listed in no particular order): What are web standards and why should I use them? What are the advantages of using web standards? ...
...re on using web standards from these sites (listed in no particular order): What are web standards and why should I use them? What are the advantages of using web standards? ...
Using workers in extensions - Archive of obsolete content
extensions to perform tasks in the background without blocking the user interface. If you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: Creating a status bar extension Creating a dynamic status bar extension Adding preferences to an extension Localizing an extension Updating an extension to support multiple Mozilla applications Download the sample You may download the complete example: Download the example. How this differs from previous versions This version of the stock ticker extension moves the XMLHttpRequest call that fetches updated stock information into a worker thread, which then passes that information back to the main body of the extension's code to update the display in the status bar. ...
...ed to access the user interface. The main thread The changes here are also relatively minor, but crucial. The startup() method This method is called when the extension is first loaded, and needs to be updated to start up and configure the worker. ...
New in JavaScript - Archive of obsolete content
This chapter contains information about JavaScript's version history and implementation status for Mozilla/SpiderMonkey-based JavaScript applications, such as Firefox. ECMAScript versions Language resources Learn more about the ECMAScript standards on which the JavaScript language is based on. ECMAScript 5 support Implementation status for the current standard ECMA-262 Edition 5.1 in Mozilla-based engines and products. ECMAScript 2015 support Implementation status for the draft ECMA-262 Edition 6 (ES2015) in Mozilla-based engines and products. ECMAScript Next support Implementation status for upcoming ECMA-262 features as per the yearly (ES2016/ES2017/ES2018/...) release schedule in Mozilla-based engines and products. JavaScript versions Deprecated ( ). The explicit versioning and ...
...Firefox 4 was the last version which referred to a JavaScript version (1.8.5). With new ECMA standards, JavaScript language features are now often mentioned with their initial definition in ECMA-262 Editions such as ECMAScript 2015. ...
Archived JavaScript Reference - Archive of obsolete content
h of the oldBuffer is used. This operation leaves oldBuffer in a detached state.Date.prototype.toLocaleFormat()The non-standard toLocaleFormat() method converts a date to a string using the specified formatting. Intl.DateTimeFormat is an alternative to format dates in a standards-compliant way. See also the newer version of Date.prototype.toLocaleDateString().ECMAScript 2016 to ES.Next support in MozillaExpression closuresExpression closures are a shorthand function syntax for writing simple functions.for each...inThe for each...in statement iterates a specified variable over all values of object's properties. For each distinct property, a specified statement is executed.Function.arityNot part of any standard.Function.prototype.isGenerator()The non-standard isGenerator() method used to determine ...
...ion a legacy generator, the function body should contain at least one yield expression.Microsoft JavaScript extensionsMicrosoft browsers (Internet Explorer, and in a few cases, Microsoft Edge) support a number of special Microsoft extensions to the otherwise standard JavaScript APIs.New in JavaScriptThis chapter contains information about JavaScript's version history and implementation status for Mozilla/SpiderMonkey-based JavaScript applications, such as Firefox.Number.toInteger()The Number.toInteger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.Object.getNotifier()The Object.getNotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.Object.obser...
LiveConnect - Archive of obsolete content
LiveConnect provides JavaScript with the ability to call methods of Java classes and vice-versa using the existing Java infrastructure. Older versions of Gecko included special support for the Java<->JavaScript bridge (such as the java and Packages global objects), but as of Mozilla 16 (Firefox 16 / Thunderbird 16 / SeaMonkey 2.13) LiveConnect functionality is provided solely by the Oracle's Java plugin. Documentation Java plugin - LiveConnect documentation This is likely the most up-to-date documentation of LiveConnect. Removal of java and Packages global objects in Mozilla 16 See bug 748343 for the rationale and workarounds. You can still embed Java applets and access their API from JavaScript. LiveConnect Overview An overview for Li...
...in Mozilla 16 See bug 748343 for the rationale and workarounds. You can still embed Java applets and access their API from JavaScript. LiveConnect Overview An overview for Liveconnect. LiveConnect reference The Java classes used for LiveConnect, along with their constructors and methods. Java in Firefox extensions Community View mozilla.dev.tech.java forums... Mailing list Newsgroup RSS feed Related Topics JavaScript, Plugins Older notes (Please update or remove as needed.) While the bloated LiveConnect code in the Mozilla source was removed in version 1.9.2 of the platform (see bug 442399), its former API has been restored (see also the specification and this thread) (buildi...
RDF: Resource Description Framework for metadata - Archive of obsolete content
Archive › Web › RDF
s about resources in the form of a subject-predicate-object expression, called a triple in RDF terminology. The subject is the resource, the "thing" being described. The predicate is a trait or aspect about that resource, and often expresses a relationship between the subject and the object. The object is the object of the relationship or value of that trait. Documentation Directions of the Mozilla RDF engine This presentation shows new developments in the Mozilla RDF engine. These include plans to expose the RDF API to public web content, as well as performance and correctness improvements. What is RDF Tim Bray's introduction to the Resource Description Framework, at XML.com. RDF Datasource How-To A cookbook-style document describing how to create a native, client-side datasourc...
...presentation shows new developments in the Mozilla RDF engine. These include plans to expose the RDF API to public web content, as well as performance and correctness improvements. What is RDF Tim Bray's introduction to the Resource Description Framework, at XML.com. RDF Datasource How-To A cookbook-style document describing how to create a native, client-side datasource that works with Mozilla's RDF implementation. View all... Community View Mozilla forums... Mailing list Newsgroup RSS feed RDF-Dev mailing list Tools RDF Editors and Tools RDF Validator Related topics XML Categories Interwiki Language Links ...
Standards-Compliant Authoring Tools - Archive of obsolete content
Currently the work done on NVu is being ported back to mozilla source code. ...
...wser code upfront will save you lots of time quality testing your web content. The following authoring tools adhere to the W3 standards. If you're using older versions of tools that rely on old browser bugs or generate browser-specific code, it may be time to upgrade: NVu is a standalone editor created from the remains of Mozilla Composer. Currently the work done on NVu is being ported back to mozilla source code. HTML-Kit is a full-featured, low priced editor designed to help HTML, XHTML and XML authors to edit, format, lookup help, validate, preview and publish web pages. Validation is done with HTML Tidy, so you can verify standards compliance. Macromedia(TM) Dreamweaver(TM) CS6 Style Master and Layout Master by Western Civilisation Some caveats: It appears that tools currently availab...
Implementation Status - Archive of obsolete content
The sections are marked with their current status: Supported, partial support, in progress, and not currently supported. We have listed the most relevant bugs here, but check out the Bugzilla XForms buglist for the complete list. 3. ...
...The sections are marked with their current status: Supported, partial support, in progress, and not currently supported. We have listed the most relevant bugs here, but check out the Bugzilla XForms buglist for the complete list. 3. ...
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
same size as the user's default settings, regardless of the CSS assigned to ancestor elements 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 ...
...l override the rule in quirk.css and thus allow the author to have reliable inheritance of font styles into tables when in "quirks" mode. It is also fully valid CSS2 and so will validate without incident. Recommendations In situations where authors must put a document into "quirks" mode but wish to enforce correct font inheritance into tables, use the demonstrated rule. Related Resources Mozilla's DOCTYPE sniffing Original Document Information Author(s): Eric A. Meyer, Netscape Communications Last Updated Date: Published 26 Nov 2002 Copyright Information: Copyright (C) 2001-2003 Netscape. All rights reserved. Note: This reprinted article was originally part of the DevEdge site. ...
The Business Benefits of Web Standards - Archive of obsolete content
s between the way Search Engines rank pages. There should be little need to plunge into the increasing costs and uncertain quality and integrity of proprietary Pay Per Click campaigns. Increase Website Traffic Maintain Contact With Your User On Multiple Platforms Standards-based code and cross-platform go hand in hand. While some browsers have quirks that cause different behavior by platform, Mozilla-based browsers are designed to behave identically on all supported platforms (Mac, Linux, Unix, Windows...) Web Content is increasingly being accessed by a growing number of user agents other than browsers, or by browsers on different platforms - for example mobile telephones. Feed content such as RSS and Atom simply will not work without being implemented by following the requisite standard. A...
...de significantly 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. 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 i...
Web Standards - Archive of obsolete content
g with these standards simplifies and lowers the cost of production, while delivering sites that are accessible to more people and more types of Internet devices. Sites developed along these lines will continue to function correctly as traditional desktop browsers evolve, and as new Internet devices come to market. [1] Documentation Migrate apps from Internet Explorer to Mozilla Ever have trouble getting your Internet Explorer-specific Web applications to work with Mozilla? This article covers common issues associated with migrating applications to the open source Mozilla-based browser. Using Web Standards in your Web Pages This article provides an overview of the process for upgrading the content of your web pages to conform to the W3C web standards. ...
...roprietary Practices In the development world, there is a need for standards because applications are designed across multiple development groups. The Business Benefits of Web Standards This article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals. Community View Mozilla forums... Mailing list Newsgroup RSS feed The Web Standards Project WebDev FeedHouse Other community links... Tools Firebug extension Web Developer extension Markup validation service (W3C) CSS validation service (W3C) Examples Mozilla 1.0 Demos - showing off what can be done with Web standards. ...
Using the DOM File API in chrome code - Extensions
his must be imported in like so: Cu.importGlobalProperties( [ "File" ] ) Accessing a file by hard-coded pathname To reference a file by its path, you can simply use a string literal: var file = File.createFromFileName("path/to/some/file"); Cross platform note: However using hard-coded paths raises cross platform issues since it uses a platform-dependent path separator (here "/"). In the XUL/Mozilla platform there isn't sadly an equivalent to Java File.pathSeparator (the system-dependent path-separator character). So the good practice is to avoid trying to determine and to use the path separator at all. Instead, use the nsIFile::append() method as explained in the next section. Accessing files in a special directory You can also use the directory service to obtain and build the path to a f...
...g to determine and to use the path separator at all. Instead, use the nsIFile::append() method as explained in the next section. Accessing files in a special directory You can also use the directory service to obtain and build the path to a file to access. For example, let's say your add-on needs to access a file in the user's profile. ...
Plug-in Development Overview - Gecko Plugin API Reference
ion practices, or install the plug-in to the system standard install locations. Windows Installation Using the Registry On Windows, plug-ins should be installed to a plug-in-specific directory such as C:\Program Files\Plugin Name\nppluginname.dll. ...
...y values should be added to the Windows registry (the plug-in-identifier should follow the specification): HKLM/Software/MozillaPlugins/plugin-identifier Descripton: REG_SZ "Description of the Plugin" Path: REG_SZ "C:\..Path to the plugin.dll" ProductName: REG_SZ "The Plugin Name" Vendor: REG_SZ "The Plugin Author/Vendor" Version: REG_SZ "0.5.whatever plugin version string" HKLM/Software/MozillaPlugins/plugin-identifier/MimeTypes Add a sub-key for each MIME type the plugin supports, with no values Install to Known Locations on Linux and Mac On Linux and Mac, plug-ins are installed to well-known locations: Linux: /usr/lib/mozilla/plugins or /usr/lib64/mozilla/plugins Mac: /Library/Internet Plug-Ins or ~/Library/Internet Plug-Ins ...
Certificate authority - MDN Web Docs Glossary: Definitions of Web-related terms
A certificate authority (CA) is an organization that signs digital certificates and their associated public keys. This certifies that an organization that requested a digital certificate (e.g., Mozilla Corporation) is authorized to request a certificate for the subject named in the certificate (e.g., mozilla.org). ...
...cates and their associated public keys. This certifies that an organization that requested a digital certificate (e.g., Mozilla Corporation) is authorized to request a certificate for the subject named in the certificate (e.g., mozilla.org). Web browsers come preloaded with a list of certificate authorities trusted to issue digital certificates. ...
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
message. Headers like Content-Length, Content-Language, Content-Encoding are entities headers. Even if they are neither request, nor response headers, entity headers are often included in such terms. ...
...ntent-Length, Content-Language, Content-Encoding are entities headers. Even if they are neither request, nor response headers, entity headers are often included in such terms. ...
CSS and JavaScript accessibility best practices - Learn web development
ypertext Markup Language">HTML</abbr>.</p> Again, you might want to style it in some simple way: abbr { color: #a60000; } The recognised styling convention for abbreviations is a dotted underline, and it is unwise to significantly deviate from this. For more on abbreviations, see Abbreviations. ...
...up Language">HTML</abbr>.</p> Again, you might want to style it in some simple way: abbr { color: #a60000; } The recognised styling convention for abbreviations is a dotted underline, and it is unwise to significantly deviate from this. For more on abbreviations, see Abbreviations. ...
Advanced styling effects - Learn web development
Here we'll present the same two <div>s, but each one is now sat on top of a simple <div> with...
...ly mix <div class="multiply-mix"> </div> <div> </div> </article> Here's the CSS we'll style this with: article { width: 280px; height: 180px; margin: 10px; position: relative; display: inline-block; } div { width: 250px; height: 130px; padding: 10px; margin: 10px; } article div:first-child { position: absolute; top: 10px; left: 0; background: url(https://mdn.mozillademos.org/files/13090/colorful-heart.png) no-repeat center 20px; background-color: green; } article div:last-child { background-color: purple; position: absolute; bottom: -10px; right: 0; z-index: -1; } .multiply-mix { mix-blend-mode: multiply; } This gives us the following results: You can see here that the multiply mix blend has blended together not only the two background im...
What are browser developer tools? - Learn web development
s and then click the Console tab. This will give you a window like the following: To see what happens, try entering the following snippets of code into the console one by one (and then pressing Enter): alert('hello!'); document.querySelector('html').style.backgroundColor = 'purple'; const myWordmark = document.createElement('img'); myWordmark.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png'); document.querySelector('h1').appendChild(myWordmark); Now try entering the following incorrect versions of the code and see what you get. alert('hello!); document.cheeseSelector('html').style.backgroundColor = 'purple'; const myWordmark = document.createElement('img'); myBanana.setAttribute('src','https://blo...
...rg/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png'); document.querySelector('h1').appendChild(myWordmark); Now try entering the following incorrect versions of the code and see what you get. alert('hello!); document.cheeseSelector('html').style.backgroundColor = 'purple'; const myWordmark = document.createElement('img'); myBanana.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png'); document.querySelector('h1').appendChild(myWordmark); You'll start to see the kind of errors that the browser returns. Often these errors are fairly cryptic, but it should be pretty simple to figure these problems out! Find out more Find more out about the JavaScript console in different browsers: Firefox Web Console IE ...
Advanced text formatting - Learn web development
For example: <time datetime="2016-01-20">20 January 2016</time> Why is this useful? Well, t...
...For example: <time datetime="2016-01-20">20 January 2016</time> Why is this useful? Well, there are many different ways ...
Debugging HTML - Learn web development
is <strong>not closed properly, then its effect can spread to areas you didn't intend <li>Badly nested elements: Nesting elements properly is also very important for code behaving correctly. <strong>strong <em>strong emphasised?</strong> what is this?</em> <li>Unclosed attributes: Another common source of HTML problems. Let's look at an example: <a href="https://www.mozilla.org/>link to Mozilla homepage</a> </ul> Let's review the problems: The paragraph and list item elements have no closing tags. Looking at the image above, this doesn't seem to have affected the markup rendering too badly, as it is easy to infer where one element should end and another should begin. The first <strong> element has no closing tag. This is a bit more problematic, as ...
...e us a good clue as to what element is at fault. "End of file seen and there were open elements": This is a bit ambiguous, but basically refers to the fact there are open elements that need to be properly closed. The line numbers point to the last few lines of the file, and this error message comes with a line of code that points out an example of an open element: example: <a href="https://www.mozilla.org/>link to Mozilla homepage</a> ? </ul>? </body>?</html> Note: An attribute missing a closing quote can result in an open element because the rest of the document is interpreted as the attribute's content. "Unclosed element ul": This is not very helpful, as the <ul> element is closed correctly. This error comes up because the <a> element is not closed, due to the missing closing quo...
From object to iframe — other embedding technologies - Learn web development
me>s (see Configure CSP directives, below.) This makes sense -- an entire MDN page doesn't really make sense to be embedded in other pages unless you want to do something like embed them on your site and claim them as your own -- or attempt to steal data via clickjacking, which are both really bad things to do. Plus if everybody started to do this, all the additional bandwidth would start to cost Mozilla a lot of money. Only embed when necessary Sometimes it makes sense to embed third-party content -- like youtube videos and maps -- but you can save yourself a lot of headaches if you only embed third-party content when completely necessary. A good rule of thumb for web security is "You can never be too cautious. If you made it, double-check it anyway. If someone else made it, assume it's danger...
...to discover, such as <canvas> for JavaScript-generated 2D and 3D graphics, and <svg> for embedding vector graphics. We'll look at SVG in the next article of the module. Previous Overview: Multimedia and embedding Next In this module Images in HTML Video and audio content From <object> to <iframe> -- other embedding technologies Adding vector graphics to the Web Responsive images Mozilla splash page ...
Multimedia and Embedding - Learn web development
iffering screen sizes, resolutions, and other such features -- and look at what tools HTML provides to help implement them. This helps to improve performance across different devices. ...
...e just one part of responsive design, a future CSS topic for you to learn. ...
Handling common HTML and CSS problems - Learn web development
S prefixes Another set of problems comes with CSS prefixes -- these are a mechanism originally used to allow browser vendors to implement their own version of a CSS (or JavaScript) feature while the technology is in an experimental state, so they can play with it and get it right without conflicting with other browser's implementations, or the final unprefixed implementations. ...
...ss, so if you want to use a mobile first layout and have the desktop layout then apply to old IE versions, you'll have to apply a media query polyfill to your page, like css3-mediaqueries-js, or Respond.js. Finding help There are many other issues you'll encounter with HTML and CSS, making knowledge of how to find answers online invaluable. Among the best sources of support information are the Mozilla Developer Network (that's where you are now!), stackoverflow.com, and caniuse.com. To use the Mozilla Developer Network (MDN), most people do a search engine search of the technology they are trying to find information on, plus the term "mdn", for example "mdn HTML5 video". MDN contains several useful types of content: Reference material with browser support information for client-side web te...
Command line crash course - Learn web development
L is the old location of the page. If you enter it in a new browser tab, you'll (eventually) get redirected to /docs/Web/API/WindowOrWorkerGlobalScope/fetch. Therefore, if you use curl to request /docs/Web/API/fetch, you won't get an output. Try it now: curl /docs/Web/API/fetch We need to explicitly tell curl to follow redirects using the -L flag. Let's also look at the headers that developer.mozilla.org returns using curl's -I flag, and print all the location redirects it sends to the terminal, by piping the output of curl into grep (we will ask grep to return all the lines that contain the word "location"). Try running the following, and you'll see that in fact there are three redirects happening before we reach the final page: curl /docs/Web/API/fetch -L -I | grep location Your output s...
...could take this result a little further and transform the location: line contents, adding the base origin to the start of each one so that we get complete URLs printed out. For that, we'll add awk to the mix (which is a programming language akin to JavaScript or Ruby or Python, just a lot older!). Try running this: curl /docs/Web/API/fetch -L -I | grep location | awk '{ print "https://developer.mozilla.org" $2 }' Your final output should look something like this: /docs/Web/API/fetch /docs/Web/API/GlobalFetch/GlobalFetch.fetch() /docs/Web/API/GlobalFetch/fetch /docs/Web/API/WindowOrWorkerGlobalScope/fetch By combining these commands we've customised the output to show the full URLs that the Mozilla server is redirecting through when we request the /docs/Web/API/fetch URL. Getting to know you...
Accessible Toolkit Checklist
The Work When implementing a new toolkit it's important to: Implement standard keyboard behavior, which can vary from platform to platform. Expose your UI - a way for assistive technologies such as screen readers, screen magnifiers and voice dictation software to understand your software. Provide theme compatibility with the operating system, at least as an option. Some low vision users will be running your software with high contrast or large font themes. Go beyond section 508. Implement true usability for everyone, and make your toolkit follow the guidelines for each platform. ...
...ften these kinds of toolkits don't use a separate window for each control; in that case remember to generate a unique 32 bit child ID for each control so that the MSAA event system can call back for the right IAccessible for each event. The Checklist This checklist is currently only for Microsoft Windows, but should be expanded to include information about Linux and OS X. It is maintained by the Mozilla Accessibility Community. Contributions are welcome. General Dialogs/windows/general Escape key cancels dialogs and refocuses the previously focused on the parent window. Alt+F4 closes windows, similar to Escape but even works on dialogs without Cancel button Alt+space opens window menu with Restore, Move, Size, Minimize, Maximize, Close The Move and Size options mu...
ZoomText
Read the release notes if you're interested. These builds are pretty stable considering they're only alpha, I'm having very good luck with them. It doesn't do us any good to get bug reports on older stuff right now. Our main focus is on the browser itself, so you you only need to install mailnews or address book if curious about the other apps. You will also need to install ZoomText 8.11.3. Happy testing! You may wish to read through the current issues on this page before reporting bugs. ...
...orting bugs. Send me email so that I'm aware that you're testing and let me know what bugs you're finding. My email address is aaronleventhal@moonset.net. Issues for AI Squared, from high to low priority DocReader and AppReader don't respect the structure of the document -- no support for columns. ZoomText text to speech doesn't always echo what it should -- need more details from testers. Mozilla issues Cannot tab into frames and iframes. Cannot customize the sidebar with the keyboard only. Comboboxes report incorrect bounds, causing ZoomText tracking to move to the wrong area of the screen. ...
Lightweight themes
How to create your own lightweight theme Lightweight themes are made up of a "header" graphic image file, which skins the default Firefox UI background. Finished Your Design? You can submit it right now! Creating a theme header image The header image is displayed as the background of the top of the browser window, nestling in behind the toolbars, address bar, search bar and the tab strip. It will be anchored to the top-right corner of the browser window. View a sample Theme Header here. ...
...! You can see all the themes you've authored on your profile page. Tip: to ensure that your theme is approved for the gallery, be sure it complies with the content guidelines and terms of service! Submit Your Theme Now Frequently asked questions For more information about Lightweight themes, including content guidelines, please see these Frequently Asked Questions. More tutorials Mozilla Themes Focal Point on Sizing - A tutorial on theming with a focus on sizing, by VanillaOrchids. ...
Adding a new event
What type of event do you want? Roughly, there are 3 types of event. First, you need to choose which type you need. A simple DOM event which can be implemented with WebIDL and WidgetEvent or something. This type of event is useful if the event isn't handled by C++ code. A DOM event which represents a native event like a user action such as keyboard or mouse input. This type of event allows C++ code to handle it easier. It's not a DOM event. However, C++ code may need to dispatch an event to DOM tree and handle it with C++ event handler. ...
... Define and create DOM event class manually Otherwise, you need to implement a DOM event class yourself. The best place to create FooEvent.h and FooEvent.cpp is in dom/events/. Otherwise, you need to specify the path to the header file in dom/bindings/Bindings.conf. When you create a DOM event class, its name should be same as the name defined in its standard specification. And it should be in mozilla::dom namespace. For example, KeyboardEvent which is defined in DOM Level 3 Events should be implemented as mozilla::dom::KeyboardEvent. And the header file should be exported as "mozilla/dom/FooEvent.h". Add the header file to EXPORTS.mozilla.dom in dom/events/moz.build. You probably need to implement a lot of methods to the event class, but this document doesn't explain all of them. Please ref...
Bugzilla
Documentation about B.m.o. What to do and what not to do in Bugzilla Tips for how to use Bugzilla, as well as things you should avoid. Bugzilla etiquette A guide to etiquette; this guide will help you understand how best to conduct yourself on b.m.o. and how using proper manners and civility will help ensure your problem gets solved sooner rather than later. How to tell if a bug has already been reported It's useful (but not mandatory) for you to check if the problem you're reporting has been already tracked. This guide will help you do so. ...
...en already tracked. This guide will help you do so. View All... Other materials An Introduction to Bugzilla Bugzilla for humans Bugzilla QuickSearch help page. QuickSearch is a quick, easy, and very effective way of quickly querying bugzilla. Testopia - test case management extension bugzilla.org - the project site wikipedia:Bugzilla - general description of Bugzilla (not specific to Mozilla projects) BMO on wiki.mozilla.org - information about Mozilla's customized Bugzilla installation, including how to contribute to it Tools Bugzilla Todos lists review and flag requests, patches to check in, unfulfilled requests you made of other people, and assigned bugs. Bz Kanban is a board to visualize the status of bugs within a milestone. ...
Choosing the right memory allocator
This article looks over some of them and tries to sort out which should be used under what circumstances. Allocating memory in XPCOM These are general purpose memory-management routines that you should use unless your code falls into one of the other categories below. Use these if you link against XPCOM or XPCOM Glue; this includes extensions with binary components. See the XPCOM string guide for additional information. ...
...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 ...
Creating reftest-based unit tests
If you built a debug version of the browser, there can be a lot of extra console output. The reftest.list file can be named whatever you want, not necessarily reftest.list (but it has to end with .list). More to do Create more r...
...checked in to be tested. Presumably, one was supposed to open the pages with a browser and look at them and see if they look right. It is hard to tell how many of these will be usable as reftests. If the file is associated with a bug, the bug should be examined. I have seen a case where the html file in the bug had a problem, but the checked-in version was "cleaned up" and not valid for testing. Mozilla has used HTML generation tools in the past. The htmlgen tool is an example of this. Tools like this may be more useful now that we have reftest to exercise the files. It would also be useful to generate files that combine HTML and CSS in interesting or unusual ways. Reftests and preferences In order to use preferences that are not listed in the browser's built-in preferences files such as al...
Adding APIs to the navigator object
y 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. Programmatically adding an object to navigator var categoryManager = Components.classes["@mozilla.org/categorymanager;1"] .getService(Components.interfaces.nsICategoryManager); categoryManager.addCategoryEntry("JavaScript-navigator-property", "myApi", MY_CONTRACT_ID, false, true); This adds a new object, myApi, to the window.navigator object. The newly added object is a reference to the component specified by the contract ID MY_CONTRACT_ID. You c...
...ed object is a reference to the component specified by the contract ID MY_CONTRACT_ID. You can learn more about Contract IDs are unique text identifiers for XPCOM components. Using a manifest to add an object to navigator You can also add an object to the window.navigator object by using the chrome manifest of an add-on: component {ffffffff-ffff-ffff-ffff-ffffffffffff} MyComponent.js contract @mozilla.org/mycomponent;1 {ffffffff-ffff-ffff-ffff-ffffffffffff} category JavaScript-navigator-property myComponent @mozilla.org/mycomponent;1 Generate a GUID and replace the "ffff" sections in both the component and contract lines with your GUID. This adds a new API, myComponent, to the navigator object, which you can then access as navigator.myComponent. Real-world example You can see an example o...
Makefile - variables
mobile binaries on GNU/Linux). Distribution/Release variables Variable Description DIST Top level distribution directory for install/packaging/repacking. DIST_FILES A list of files copied into the distribution archive(~application.ini). DIST_CHROME_FILES Exists in rules.mk but not referenced by mozilla-central. Deprecated? FINAL_TARGET Directory to install distributed content. default=$(DIST)/bin XPI_NAME If set FINAL_TARGET=$(DIST)/xpi-stage/$(XPI_NAME) DIST_SUBDIR If set FINAL_TARGET will be $(DIST)/bin/$(DIST_SUBDIR) [ metro build ] l10n.mk and localization Variable De...
...ALE A list of locale names to process MOZ_CHROME_FILE_FORMAT both, file, jar, omni, symlink PACKAGER_NO_LIBS Hack to allow one makefile to include another without pulling in libs:: target definitions. STAGEDIST Local staging directory for localization and packaging. Todo: xpcom/xpinstall variables: https://developer.mozilla.org/en/Adding_XPCOM_components_to_Mozilla_build_system ...
pymake
On other operating systems (Linux, OS X, etc), pymake itself only requires Python 2.6 or higher (but not Python 3). ...
...nstead of typing make mochitest-plain in the object directory, you would type python ../build/pymake/make.py mochitest-plain. Alternately, if you would like to simply type in pymake -f client.mk from within the MINGW32 shell. While in the shell type cd ~ (without quotes). Type touch .profile Using any appropriate text editor open .profile and add the following line in the file (assuming your mozilla-central is at C:/mozilla-central, if not, adjust your path accordingly.) alias pymake=C:/mozilla-central/build/pymake/make.py Save your .profile edit and close the shell, then restart the shell. Try typing just pymake into the shell and press enter. This should come back with "No makefile found." If it does, your pymake alias is connected and you are ready to type in pymake -f client.mk to s...
Commenting IDL for better documentation
This article will help you understand how you can format your comments to help ensure that the conversion process can be automated as much as possible in order to ensure that your interface gets properly documented. Happily, following these recommendations will also help ensure your comments are extremely human-readable, too. Don't worry! You don't need to write perfect documentation. That is why Mozilla has a couple of writers on-staff as well as a horde of happy volunteers. We will take your comments and notes and turn them into beautiful, easy to search and read documentation. But by following the guidelines here, you can help make sure that our tools can generate a "good start" version of the documentation for your interfaces, and that the writers will be able to easily figure out what the to...
...n about the interface as necessary. * * @see nsICookie * @see nsICookieManager */ /* * Take note that this is not a Doxygen style comment, there is only one * on * the line above. * This means that anything I mention here will not be used to generate * documentation. * * To make it easier to document I have included that you can create an instance * of this interface by implementing: @mozilla.org/cookie-monster;1 */ // I can also just use a comment like this here as well and it will not be used. [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsICookieMonster : nsICookieFan { // Cookie flavor constants /** * Simple sugar cookie. */ const integer COOKIE_FLAVOR_SUGAR = 1; /** * Chocolate chip cookie. */ const integer COOKIE_FLAVOR_CHOCOLATE_CHIP = 2; /** * P...
Interface development guide
XPCOM interfaces define classes that are implemented to provide key functionality in the Mozilla platform. The articles linked from this page offer guidelines for developing and using these interfaces. Documentation XPIDL The XPCOM Interface Description Language is used to specify XPCOM interface classes. IDL interface rules Design guidelines and rules when creating and changing XPCOM interfaces. If you're going to be changing an interface, be sure to read these first! Commenting IDL for better documentation A guide explaining how to properly comment your interface's IDL in order to ensure that not only can others understand your interface, but to ensure that the documentation here on MDC is as accurate as possible. Community View Mozilla embedding forums... Mailing list ...
...e first! ...
Reviewer Checklist
This article provides a list of best practices for your patch content that reviewers will check for or require. Following these best practices will lead to a smoother, more rapid process of review and acceptance. Good web citizenship Make sure new web-exposed APIs actually make sense and are either standards track or preffed off by default. In C++, wrapper-cache as needed. If your object can be gotten from somewhere without creating it in the process, it needs to be wrapper-cached. Correctness The bug being fixed is a valid bug and should be fixed. The patch fixes the issue. The patch is not unnecessarily complicated. ...
... IO [Fennec: Android may warn about this with strictmode]. Remove debug logging that is not needed in production. Threading issues Enormous: correct use of locking and volatility; livelock and deadlock; ownership. [Fennec: All view methods should be touched only on UI thread.] [Fennec: Activity lifecycle awareness (works with "never keep activities"). Also test with oom-fennec (https://hg.mozilla.org/users/blassey_mozilla.com/oom-fennec/)]. Compatibility Version files, databases, messages Tag messages with ids to disambiguate callers. IDL UUIDs are updated when the interface is updated. Android permissions should be 'grouped' into a common release to avoid breaking auto-updates. Android APIs added since Froyo should be guarded by a version check. Preffability If the feature ...
Linux compatibility matrix
The following table lists the available library versions for the mozilla.org-distributed Firefox builds dependencies, and/or to build Firefox. Distribution kernel glibc glib gtk+2 gtk+3 pixman stdc++ GCC clang python3 Released EOL Fedora 16 3.1 2.14 2.30 2.24 3.2 0.22 4.6 4.6 2.9 N/A Nov 2011 Feb 2013 Fedora 17 3.3 2.15 2.32 2.24 3.4 0.24 4.7 4.7 3.0 N/A May 2012 Jul 2013 Fedora 18 3.6 2.16 2.34 2.24 3.6 0.26 4.7 4.7 3.1 N/A Jan 2013 Jan 2014 Fedora 19 3.9 2.17 2.36 2.24 3.8 0.30 4.8.1 4.8 3.3 N/A Jul 2013 Jan 2015 Fedora 20 3.11 2.18 2.38 2.24 3.10...
...ng python3 Released EOL Notes Red backgrounds denote lack of compatibility with current versions of Firefox. In the EOL column, they denote distribution versions past their End of Life. Yellow backgrounds denote compatibility with ESR78 Green backgrounds denote compatibility with the current release (as of writing, 78) Greener backgrounds denote compatibility with the current mozilla-central (as of writing, 80). The table is generated with the script and data in https://github.com/glandium/firefox-linux-compat-matrix ...
Firefox and the "about" protocol
rovides links to documentation for each tool about:downloads Displays all downloads done within Firefox about:home Start page of Firefox when opening a new window about:license Displays licensing information about:logo Firefox logo about:memory Provides a way to display memory usage, save it as report and run the GC and CC about:mozilla Special page showing a message from "The Book of Mozilla" about:networking Displays networking information about:newtab Start page when opening a new tab about:performance Displays memory and performance information about Firefox subprocesses/add-ons/tabs about:plugins Displays information about installed plugins about:policies Lists ...
...alled about:sessionrestore Session restoration (displayed after a Firefox crash) about:support Troubleshooting information (also available through Firefox menu > ? ...
Firefox
With broad compatibility, the latest in Web technologies, and powerful development tools, Firefox is a great choice for both Web developers and end users. Firefox is an open source project; much of the code is contributed by our huge community of volunteers. 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. Learn how to create add-ons for Firefox, how to develop and build Firefox itself, and how the internals of Firefox and its subprojects work. ...
...o choose a destination to visit or a site to manage in some way. One example is the new tab page, which includes a "Top Sites" section showing sites you visit that Firefox thinks you're likely to want to visit again, as well as potentially some sites that have been pinned to always appear in that space. Linux compatibility matrixThe following table lists the available library versions for the mozilla.org-distributed Firefox builds dependencies, and/or to build Firefox.Multiple Firefox profilesA profile in Firefox is the collection of settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of Firefox. You can find details about profiles on Mozilla's end-user support site.Performance best practices for Firefox front-end engineersThis guide...
Using the Browser API
Mozilla › Gecko › Chrome › API › Browser API › Using
cally (or just download it directly if you don't do GitHub), open WebIDE, open the repo as a Packaged App, then run it either on a simulator or a real device if you have one. In any case, you should at least download the repo and refer to the code as you read the sections below. The HTML An <iframe> is turned into a browser iframe by setting the mozbrowser attribute on it: <iframe src="http://mozilla.org" mozbrowser> In addition, the <iframe> can be loaded in its own child process -- separate to the page embedding this frame -- by including the remote attribute. <iframe src="http://hostname.tld" mozbrowser remote> Warning: This last attribute is necessary for security reasons if you plan to load content from an untrusted/unknown origin. If you don't use it, you run the risk of your applic...
...ons we discussed earlier -- it makes sense to update the status of the back and forward buttons after each page reload. In addition, the background of the controls UI bar is changed to the background color of the site that has just loaded, to provide a more integrated experience -- this can be read out of the event object's e.detail.backgroundColor value. When the front page of https://developer.mozilla.org is loaded, for example, the e.detail.backgroundColor value reported is rgb(0, 83, 159). Back to the stop/reload button -- updating the icon is nice, but we also need to update the functionality that is invoked when each icon is displayed. We do this with the following function, which runs the HTMLIFrameElement.stop() method to stop the page loading if the button is displaying a cross, and th...
Gecko's "Almost Standards" Mode
As of Mozilla 1.0.1 and 1.1 beta, there is a new rendering mode referred to as "almost standards" mode. This is added to the long-standing "quirks" 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 treate...
...of IBM do not need to worry about the custom DOCTYPE that will also trigger "almost standards" mode. Recommendations For authors who are attempting to migrate to validated markup using either HTML 4.01 or XHTML 1.0, and who are still using image-in-table design concepts, make sure to use a DOCTYPE that will trigger "almost standards" mode. Also On MDC Images, Tables, and Mysterious Gaps Mozilla's DOCTYPE sniffing Mozilla's Quirks Mode Original Document Information Author(s): Eric A. Meyer, Netscape Communications Last Updated Date: Published 08 Nov 2002 Copyright Information: Copyright (C) 2001-2003 Netscape. All rights reserved. Note: This reprinted article was originally part of the DevEdge site. ...
HTTP Cache
g any particular limits. It is strongly encoraged to NOT USE the OLD cache API any more - nsICacheService et al. It will soon be completely obsoleted and removed (bug 913828). nsICacheStorageService The HTTP cache entry-point. Accessible as a service only, fully thread-safe, scriptable. //github.com/RealityRipple/UXP/blob/master/netwerk/cache2/nsICacheStorageService.idl "@mozilla.org/netwerk/cache-storage-service;1" Provides methods accessing "storage" objects - see nsICacheStorage below - giving further access to cache entries - see nsICacheEntry more below - per specific URL. Currently we have 3 types of storages, all the access methods return an nsICacheStorage object: memory-only (memoryCacheStorage): stores data only in a memory cache, data in...
... two such pools, one for memory-only entries actually representing the memory-only cache and one for disk cache entries for which we only keep the meta data. Each pool has a different limit checking - the memory cache pool is controlled by browser.cache.memory.capacity, the disk entries pool is already described above. The pool can be accessed and modified only on the cache background thread. "@mozilla.org/netwerk/cache-storage-service;1" ...
Infallible memory allocation
_xrealloc(); p = moz_xstrdup(); f = new Foo(); fArray = new Foo[]; n = ::operator new(...); nArray = ::operator new[](...); Explicitly fallible memory allocators These memory allocators are explicitly fallible, and will remain so. ...
... new(...); nArray = ::operator new[](...); Explicitly fallible memory allocators These memory allocators are explicitly fallible, and will remain so. When using these, you must check to ensure the resulting value isn't null before attempting to use the returned memory. ...
Interfacing with the Add-on Repository
resulting AddonRepository object. Enabling the recommendation feature In current builds of Firefox 4, the recommendation API doesn't work because the preference for the URL to query to get recommended add-ons is not included by default; see bug 628785. ...
... Starting a request To start a search of the repositor...
NetUtil.jsm
parameter: the nsresult status code for the copy operation. Return value Returns the nsIAsyncStreamCopier object that is handling the copy. Exceptions thrown This method throws an exception with the message "Must have a source and a sink" if either aSource or aSink is null. Example This example writes a string to a file; it comes from the test suite for the NetUtil module. var file = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties). get("TmpD", Ci.nsIFile); file.append("test-file.tmp"); file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666); // Then, we need an output stream to our output file. var ostream = Cc["@mozilla.org/network/file-output-stream;1"]. createInstance(Ci.nsIFileOutputStream); ostream.init(file, -1, -1, 0); //...
...append("test-file.tmp"); file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666); // Then, we need an output stream to our output file. var ostream = Cc["@mozilla.org/network/file-output-stream;1"]. createInstance(Ci.nsIFileOutputStream); ostream.init(file, -1, -1, 0); // Finally, we need an input stream to take data from. const TEST_DATA = "this is a test string"; let istream = Cc["@mozilla.org/io/string-input-stream;1"]. createInstance(Ci.nsIStringInputStream); istream.setData(TEST_DATA, TEST_DATA.length); 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 obtai...
Examples
.jsm"); var myPromise = myUserDefinedPromise(); myPromise.then( function(aSuccessReason) { alert('myPromise was SUCCESFUL and reason was = "' + aSuccessReason + '"'); }, function(aRejectReason) { alert('myPromise FAILED for reason = "' + uneval(aRejectReason) + '"'); } ); function myUserDefinedPromise() { try { var mySubPromises = []; var imagePaths = ['http://www.mozilla.org/media/img/firefox/favicon.png', 'https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png']; [].forEach.call(imagePaths, function(path) { let myImage = new Image(); let loadThisImagePromise = Promise.defer(); mySubPromises.push(loadThisImagePromise.promise); myImage.onload = function() { loadThisImagePromise.resolve('Succesfully loaded image at pa...
....onabort = function(e) { loadThisImagePromise.reject('Image load was aborted loading path = "' + path + '".'); } myImage.src = path; }); return Promise.all(mySubPromises); } catch(ex) { return Promise.reject(ex); } } To test and see what happens when you get an error. Change the array in the code above. Change this line: var imagePaths = ['http://www.mozilla.org/media/img/firefox/favicon.png', 'https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png']; Change it to: var imagePaths = ['http://www.mozilla.org/media/img/firefox/favicon.png', 'https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png', 'blah blah']; I added 'blah blah' to that array, it will cuase the whole promise to reject. The case of unhandled rejection...
Using JavaScript code modules
Code modules can only be loaded using a chrome: (), resource:, or file: URL. If you're writing an extension for Firefox 4 and already have a chrome.manifest with a content instruction in it, you can put the code module in your content folder and reference it like your other content files via chrome://<yourextension>/content/<yourmodule>.jsm. If your extension or application needs to support Mozilla 1.9.x (Firefox 3.x), you should register a new resource URL. Details on doing this are in the "Extending resource: URLs" section below. Sharing objects using code modules An extremely important behavior of Components.utils.import() is that modules are cached when loaded and subsequent imports do not reload a new version of the module, but instead use the previously cached version. This means t...
...presented as an nsILocalFile can be programmatically added as well. ...
source-editor.jsm
js" JavaScript source code. SourceEditor.MODES.TEXT "text" UTF-8 text document. SourceEditor.MODES.XML "xml" XML document. Theme constants These constants are used to identify the available themes that can be used by the syntax highlighter. Only one is provided by default at this time. Constant Value Description SourceEditor.THEMES.MOZILLA "mozilla" The default Mozilla syntax highlighter theme. Configuration defaults constants These constants represent the default values for each of the available configuration options. See The editor configuration object for details on configuring the editor. Constant Value SourceEditor.DEFAULTS.contextMenu "sourceEditorContextMenu" SourceEditor.DEFAU...
... Constant Value Description SourceEditor.EVENTS.BLUR "Blur" Fired when the editor loses focus. SourceEditor.EVENTS.BREAKPOINT_CHANGE "BreakpointChange" Fired when a new breakpoint is added, or wh...
L10n Checks
Installation (releases) L10n Checks needs to be installed. To do that, you must have Python 2.5, 2.6, or 2.7 installed on your machine. Once Python is installed, the easiest way to install L10n Checks (on Mac or Linux) is to just run: $ sudo easy_install -U l10n-checks or, if you're on Windows: $ easy_install -U l10n-checks Installation (development versions) L10n Checks needs to be installed, and it requires that you have Python and Mercurial installed on your machine. ...
...ine. Once Python is installed, the easiest way to install L10n Checks (on Mac or Linux) is to just run: $ sudo easy_install -U l10n-checks or, if you're on Windows: $ easy_install -U l10n-checks Installation (development versions) L10n Checks needs to be installed, and it requires that you have Python and Mercurial installed on your machine. The easiest way is to just run: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ sudo python setup.py install or, if you're on Windows: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ python setup.py install Running it Mercurial source (source) mode L10n Checks gathers the directories to compare from an ini file, usually found in $APP/locales/l10n.ini. You pass both ...
Localization and Plurals
instead of being hardcoded in the JavaScript code file. The following 3 file snippets show how to use PluralForm with your .xul, .properties, .js files. downloads.xul: <stringbundleset> <stringbundle id="strings" src="chrome://downloads.properties"/> </stringbundleset> downloads.properties: # LOCALIZATION NOTE (downloadsTitleFiles): Semi-colon list of plural forms. ...
...hardcoded in the JavaScript code file. The following 3 file snippets show how to use PluralForm with your .xul, .properties, .js files. downloads.xul: <stringbundleset> <stringbundle id="strings" src="chrome://downloads.properties"/> </stringbundleset> downloads.properties: # LOCALIZATION NOTE (downloadsTitleFiles): Semi-colon list of plural forms. ...
Localizing with Pontoon
Pontoon is a very simple and intuitive tool that requires little to no technical skill to use in the l10n workflow. Here we'll discuss how to use Pontoon to localize projects, from first sign-in to finalizing your contributions. Along the way, we'll point out some sweet features that will make you more efficient and make your l10n contributions easier. Are you a developer? Read about implementing Pontoon in your project or learn how to get involved on GitHub. ...
...ory, translation memory, machine translation and other locales are also available in the out-of-context translation panel. We call all of these translation helpers and here's how each of them will help you as you translate strings: History Displays previously suggested translations, including from other users. Machinery Displays matches from various services: internal translation memory, Mozilla Transvision, open source translation memory, Microsoft terminology and machine translation. Other locales Displays matching translations from other locales. Search Almost like machinery, but takes provided keyword as input parameter instead of the original string. By clicking a suggestion, it gets copied into translation area. Publishing your localization Suppose you now want to publish...
Patching a Localization
the source for the localization in question using its two or three character ISO language code. For our example, I'll use gl (Galician). Whenever you see gl in blue text, replace it with the locale code for your language. Next thing you need to know is which localization version you want to patch. All of our localizations work on the Aurora branch. The repository for this version is releases/l10n/mozilla-aurora. For more information about branches see L10n:Branches. Now let's get a little more detailed. Start bash and do the following: Create a clean directory for your work. For example, create a directory like localization-workdir (in this example it is located in your home directory): mkdir ~/localization-workdir Navigate to the directory you just created. cd ~/localization-wor...
...do the following: Create a clean directory for your work. For example, create a directory like localization-workdir (in this example it is located in your home directory): mkdir ~/localization-workdir Navigate to the directory you just created. cd ~/localization-workdir Clone the localization repository for your locale and for the version you want to patch: hg clone http://hg.mozilla.org/releases/l10n/mozilla-aurora/gl Now that you have the code and your working directory, edit the DTD and properties files to make your necessary changes. Creating a l10n patch You've made your changes, now create your patch. Navigate to your working localization directory. cd ~/localization-workdir/gl Create a patch (also known as a diff) using the diff command. hg diff This com...
Localization prerequisites
Tools A recent POSIX Shell Python 2.5 or newer. Perl 5.6 or higher Older perl versions may work if you upgrade File::Spec to version 0.8 GNU make 3.79.1 or higher. Other varieties of "make" will not work. autoconf-2.13 - Autoconf 2.5x will not work. zip 2.3 (or higher) Mercurial 1.2 or higher recommended. Needed for development of Firefox 3.5/SeaMonkey 2.0/Thunderbird 3.0 and later. A text editor. You can try one of these: Notepad++ or Notepad2 on Windows, vim, gedit or Kate on GNU/Linux, BBEdit on Mac OS X. ...
... Mercurial 1.2 or higher recommended. Needed for development of Firefox 3.5/SeaMonkey 2.0/Thunderbird 3.0 and later. A text editor. You can try one of these: Notepad++ or Notepad2 on Windows, vim, gedit or Kate on GNU/Linux, BBEdit on Mac OS X. To verify that they work, open a shell. Linux users should know, on the Mac, you find Terminal in Applications/Utilities. On Windows, MozillaBuild offers a start-shell-l10n.bat in c:\mozilla-build. Let's try our entry points: $ hg --version Mercurial Distributed SCM (version 1.3.1) Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE Great, hg works. $ make -version GNU M...
Localization quick start guide
Welcome to Mozilla localization (L10n for short)! Whether you're here to start up your own localization in the Mozilla project or to join the efforts of an existing localization, you've come to the right place. This guide is filled with all of the basic, technical information you need to get involved in the Mozilla l10n program. We will take you through the steps to get started, from the initial environment setup to testing and releasing your own localization. Along the way, you'll learn about the variety of projects you can contribute to and the tools used to localize them. When we get to specific examples, we'll take them from the Firefox project, as it is the most widely localized project within Mozilla. As you near the end of this guide, you should be able to make a change to Firefo...
...Visit the L10n Process page to learn about the whole process. Initial setup Tech prep work before localizing. Translation phase L10n tools tutorials for translation. QA phase L10n testing tutorials. Release phase Steps to shipping your localization work. These four stages make up tech side of the l10n program. ...
Creating localizable web content
ounced with only 100 words but it is actually content added to an existing page in English. Happens for things like Faq, or video pages for example. For video, use the code to display the video in an overlayed video player on the page instead of linking to a video section in English. Per-locale customizations Check if there are alternative links for localized pages (e.g., links to MDN, Addons.mozilla.org, or other external resources, are there translated equivalents we can use). If there are alternatives, use them by adding the $lang; parameter in the urls Evaluate the impact of new pages on all our web properties, especially links to community sites and redirects. Sometimes you can leave some freedom of modification for a block of text so that the localizers link to relevant local resources...
... can stay this way. Use localized screenshots if possible Screenshots are important informative graphics, often times explaining how to achieve something in a desktop or web application. As such, they should be perceived as an essential part of the content and should be localized. Image 1. Bad. If the screenshot shows the application that the website directly relates to (Firefox on mozilla.com/firefox, Personas on getpersonas.com), try to use screenshots from the localized version. Image 2. Acceptable. If however the screenshot shows a third-party application or website, it's acceptable to use the English version if it's not available in the target language. ...
Writing localizable code
For technical details please also look at XUL_Tutorial:Localization. About Localizers A few notes about localizers for developers who rarely deal with them: localizers like tools, and they don't like editors, localization tools are often based on key-value pairs, at least some localizers have their talents focused on language skills and are not savvy in programming, or even building applications. ...
... and is a good place for your files referenced as chrome://mod/locale/foo.dtd. Using a directory structure like this eases the localization process without the source code and is especcially recommended to extension authors. JAR Manifests can make this easy. l10n impact On frozen trees, there is the rule to not check in l10n-impact changes. So what does that mean? l10n-impact is any change to mozilla/@mod@/locales; Localizers find out if they have to catch up on changes by doing bonsai queries, just as everybody else does. No change means that this query result is empty. any changed or new use of existing localized strings; Anything that triggers a QA cycle on our 40+ localizations is l10n-impact. ...
Extras
They are not portable and are meant to showcase a few interesting upshots from building natively upon the browser environment. Other renderers are expected to ignore attributes that they don't understand while the behavior of undefined elements is well, undefined. ...
...ural log">ln</mi> <mo>&ApplyFunction;</mo> <mi>a</mi> </mrow> </mfrac> </mrow> </math> </p> CSS Content math.cue *[title] { color: blue; } Mixing with other markups HTML Content <math display="block"> <mrow> <mi>A</mi> <mo>=</mo> <mo>[</mo> <mtable> <mtr> <mtd><mn>1</mn></mtd> <mtd> <mtext> <img width="16" height="16" src="https://udn.realityripple.com/samples/3f/9341cbddc0.png" alt="mozilla-16" /> </mtext> </mtd> </mtr> <mtr> <mtd> <mtext><input value="type" size="4"/></mtext> </mtd> <mtd><mn>4</mn></mtd> </mtr> </mtable> <mo>]</mo> </mrow> </math> <math display="block"> <msqrt> <mpadded width="30px" height="15px" depth="15px" voffset="-15px"> <mtext> <svg width="30px" height="30px"> <defs> <radialGradient id="radGrad1" cx="50%" cy="50%" r="50%" fx="50%"...
Gecko Profiler FAQ
. Is it worth slowing down CPU to increase the profiler resolution? It depends on what you are trying to profile to some extent. Usually you should be really careful when changing the characteristics of the environment that you are trying to measure to avoid measuring the wrong thing. If the issue you are trying to avoid is not profiling on fast machines that Mozilla developers typically use to build Firefox on, a better solution may be using a less high-end machine that actually has lower spec'd hardware instead of artificially slowing down just the CPU. Another approach to get more precision is also raising the sampling frequency to sub-millisecond ranges (it won't work on Windows.) High frequency sampling may also be an area where native profi...
... percentage of overhead to the overall time and then study the change to that workload after replacing the allocator. You do want to think about various characteristics of an allocator which may have an impact on performance. For example, see Julian's great investigation on the impact of cache line sharing across multiple cores on jemalloc's multi-core performance in https://bugzilla.mozilla.org/show_bug.cgi?id=1291355#c26. What's the best way to measure the cost of new compiler flags (that affect all or most functions)? [ehsan] This is similar to the previous question to some extent, but the specific answer really depends on what kind of compiler flag we're talking about and what performance impact we're interested to study. But the short answer is picking ...
Intel Power Gadget
ionally useful. On Mac and Linux, tools/power/rapl is probably a better tool to use. Understanding the Power Gadget output The following screenshot (from the Mac version) demonstrates the available measurements. The three panes display the following information: Power: Shows power estimates for the package and the cores ("IA"). These are reasonably useful for power profiling purposes, but Mozilla's rapl utility provides these along with GPU and RAM estimates, and in a command-line format that is often easier to use. Frequency: Shows operating frequency measurements for the cores ("IA") and the GPU ("GT"). These measurements aren't particularly useful for power profiling purposes. Temperature: Shows the package temperature. This is interesting, but again not useful for power profiling pu...
...e 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. ...
powermetrics
104.19 54.89 26.66 com.apple.WebKit.Networking 84678 26.89 58.89 0.40 0.00 1.60 0.00 0.00 Safari 84676 1.56 55.74 0.00 0.00 2.59 1.40 0.00 com.apple.Safari.SearchHelper 84690 0.15 49.49 0.00 0.00 0.20 0.20 0.00 org.mozilla.firefox 482 76.56 124.34 63.47 0.00 firefox 84496 76.70 89.18 10.58 5.59 124.55 63.48 0.00 This sample was taken while the following programs were running: Firefox Beta (single process, invoked from the Mac OS dock, shown in the org.mozilla.firefox coalition.) Fi...
... 0.50 0.13 0.00 com.apple.WebKit.WebContent 67296 0.07 43.51 0.00 0.00 0.10 0.03 0.00 kernel_coalition 1 111.76 724.80 213.09 0.12 kernel_task 0 107.06 0.00 5.86 0.00 724.46 212.99 0.12 org.mozilla.firefox 498 92.17 212.69 75.67 1.81 firefox 63865 61.00 87.18 1.00 0.87 25.79 9.00 1.81 plugin-container 67269 31.49 72.46 1.80 0.00 186.90 66.68 0.00 com.apple.WebKit.Plugin.64 67373 55.55 74.38 0...
nglayout.debug.disable_xul_cache
To improve performance, Mozilla caches chrome XUL documents the first time they load for faster loading later. The effect is that the source XML file is not read and re-parsed each time the chrome in question is displayed. The XUL cache is serialized and saved between Mozilla sessions in the XUL FastLoad file, which saves a "compiled" version of the XUL and JavaScript in a document to disk for faster startup the next time the application runs. During development of XUL applications, it's convenient to disable the XUL cache so that changes you make to files on disk take effect the next time the window or dialog is loaded (instead of the next time Mozilla starts). Possible values and their effects: True: Do not cache parsed XUL documents and do not save the cache to the XUL FastLoad file on...
...ialog is loaded (instead of the next time Mozilla starts). ...
Preference reference
ctTechnical review completed.mail.tabs.drawInTitlebarStarting in Thunderbird 17.0, the tabs are drawn in the title bar. ...
...oadThe preference nglayout.debug.disable_xul_fastload controls whether or not XUL fastload is used.nglayout.debug.disable_xul_cacheTo improve performance, Mozilla caches chrome XUL documents the first time they load for faster loading later. The effect is that the source XML file is not read and re-parsed each time the chrome in question is displayed. The XUL cache is serialized and saved between Mozilla sessions in the XUL FastLoad file, which saves a "compiled" version of the XUL and JavaScript in a document to disk for faster startup the next time the application runs.reader.parse-on-load.force-enabledThe preference reader.parse-on-load.force-enabled controls if the reader mode used in Firefox Mobile should be enabled independent of the memory available in the device. By default, the reader mo...
Productization guide
Productization is the choice of ''default'' search engines, content and protocol handlers, bookmarks, links to recommended sites on the in-product pages, etc. The web services that make up the productization of Mozilla software are often specific to a local market. For example, a search provider can deliver a very good quality of search results -- but only in a specific country or language, and we have to take this into account when considering default search engines for a locale. ...
...ity of search results -- but only in a specific country or language, and we have to take this into account when considering default search engines for a locale. Hence there is a need to customize the set of default web services on a per-locale basis in order to ensure a good user experience across all locales. Purpose of productization There are two main purposes of adding default web services to Mozilla products: Provide users with useful and relevant content Demonstrate certain features of the product The first one (provide users with useful and relevant content) is obvious: we want to improve our users' experience on the Web, so we provide a couple of well-thought suggestions for different services. For example, we ship Firefox with 6 or 7 search engine plug-ins to make users' lives easi...
Profile Manager
The software is obsolete and no longer being maintained. See http://kb.mozillazine.org/Profile_Manager#Accessing_the_Profile_Manager for an alternative method of managing profiles. Firefox and other XULRunner applications store user settings and data in special folders, called profiles. Firefox provides a built-in applet to manage these profiles, but it will eventually be going away (see bug 214675), so a new standalone Profile Manager application has been created, which works with any XULRunner application, and has many features not found in Firefox's built-in version. Downloading Binaries You can download Profile Manager builds from https://ftp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ Note: There is no installer; just extract the files from the archive. Syst...
... Reporting Bugs Profile Manager bugs should be reported in Bugzilla, under Testing -> ProfileManager. Starting Profile Manager To start Profile Manager, just launch profilemanager.exe (on Windows) or profilemanager-bin (on Linux and Mac). ...
AsyncTestUtils extended framework
imes in your tests you need to wait for an operation to complete that does not occur synchronously (that is, it is not done when the function call you made to initiate the operation returns control to you). This is likely to happen when I/O is involved or a potentially expensive process wants to break itself up into smaller chunks (like a search operation) so that the UI stays responsive. In the Mozilla platform, the "top level" of a program is the event loop. It is a never-ending loop that dequeues pending events and runs them. This is how asynchronous callbacks get their chance to run again. When I/O results in newly read data it places an event in the queue. When a timer fires because the requested duration is up, it also places an event in the queue. In order to give these events a chance t...
...nt loop. AsyncTestUtils is currently implemented by the first method (yielding control to the top-level event loop). MozMill is an example of a testing framework that uses a nested event loop. In the future we will probably move the AsyncTestUtils framework to a nested event loop in a backwards-compatible fashion. How does this affect my tests? Thanks to JavaScript enhancements available on the Mozilla platform, it is possible for a function to yield control in such a way that the function stops running at the line where you use a yield statement and resumes execution on the next line when resumed. This allows you to write reasonably normal looking functions instead of having to chain together a whole bunch of functions and callbacks. Your test functions need to agree to the following contract:...
Leak And Bloat Tests
lar way to Firefox (using XPCOM_MEM_LEAK_LOG and --trace-malloc). The method of testing memory bloat and leaks will be the same sequence of events, using the same set of test data. Startup Main Mail Window Open Address Book and Message Composition windows Close Address Book and Message Composition windows Quit the application Future improvements will be discussed on the discussion page of the Mozilla wiki. Results Printed on tinderbox output, these consist of: Mail RLk Reference Count Leaks Mail Lk Total Bytes malloc'ed and not free'd Mail MH Maximum Heap size Mail A Allocations - number of calls to malloc and friends. There are currently no graphs for these results. Manually Running Tests Setting up Build Set up Build Thunderbird or SeaMonkey with your standard mozconfig...
...enable-debug ac_add_options --enable-trace-malloc Running the Tests In your <objdir> run the following command: make mailbloat This will run the tests and produce some result files. See Debugging Memory Leaks for more information on what to do with this data. TODO: add more information on processing output. ...
Creating a Cookie Log
s with Firefox's cookie handling. If you are reading this, you have probably been directed here from a bug report. Please follow the instructions below to run Firefox with cookie logging enabled. Enabling Cookie Logging Windows Open a command prompt (this is under Programs or Programs/Accessories in normal installations of Windows). Change to your Firefox directory (usually C:\Program Files\Mozilla Firefox) Type "set NSPR_LOG_FILE=C:\temp\cookie-log.txt", enter Type "set NSPR_LOG_MODULES=cookie:4" and press Enter Run Firefox by typing "firefox.exe" and pressing Enter. Linux Start a command shell (these instructions are for bash, if you use something else, you probably know how to modify these instructions already). Change to the installation directory for Firefox. Type "export NSP...
...og.txt file to the bug where it was requested (by clicking on Create New Attachment). It should be in C:\temp on Windows, your home directory on Linux, or the Desktop on Mac OS X. Thanks for helping us make Firefox better! Original Document Information Author(s): Mike Connor Last Updated Date: December 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. ...
NSPR release process
Set the NSPR version number. Five files need to be updated: configure.in, configure, repackage.sh, prinit.h, and vercheck.c. Look at their CVS histories for examples. Make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h. Make sure the NSS tinderboxes (which also build and test NSPR) are all green. The build+test cycles of the NSS tinderboxes are very long, so you usually need to wait half a day for them to cycle through. Create a BETA CVS tag. The naming convention is NSPR_x_y_z_BETAn for NSPR x.y.z Beta n. Push the BETA tag to mozilla-central for testing in Firefox trunk builds. Ideally you should test it for a week. Remove "Beta" from the NSPR version number for the final release. Usually you just need to update prinit.h. Make a dummy change (add or re...
... a day for them to cycle through. Create a BETA CVS tag. The naming convention is NSPR_x_y_z_BETAn for NSPR x.y.z Beta n. Push the BETA tag to mozilla-central for testing in Firefox trunk builds. Ideally you should test it for a week. Remove "Beta" from the NSPR version number for the final release. Usually you just need to update prinit.h. Make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h. Create a RTM CVS tag. The naming convention is NSPR_x_y_z_RTM for NSPR x.y.z. Upload a source tar file to https://ftp.mozilla.org/pub/mozilla....nspr/releases/ Write the release notes. Announce the release in the Mozilla NSPR newsgroup. ...
Building NSS
ore attempting to build. Build environment NSS needs a C and C++ compiler. It has minimal dependencies, including only standard C and C++ libraries, plus zlib. For building, you also need make. Ideally, also install gyp and ninja and put them on your path. This is recommended, as the build is faster and more reliable. Windows NSS compilation on Windows uses the same shared build system as Mozilla Firefox. You must first install the Windows Prerequisites, including MozillaBuild. You can also build NSS on the Windows Subsystem for Linux, but the resulting binaries aren't usable by other Windows applications. Get the source NSS and NSPR use Mercurial for source control like other Mozilla projects. To check out the latest sources for NSS and NSPR--which may not be part of a stable release-...
...quisites, including MozillaBuild. You can also build NSS on the Windows Subsystem for Linux, but the resulting binaries aren't usable by other Windows applications. Get the source NSS and NSPR use Mercurial for source control like other Mozilla projects. To check out the latest sources for NSS and NSPR--which may not be part of a stable release--use the following commands: hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss To get the source of a specific release, see NSS Releases. Build Build NSS using our build script: nss/build.sh This builds both NSPR and NSS. Build with make Alternatively, there is a make target called "nss_build_all", which produces a similar result. This supports some alternative options, but can be a lot slow...
NSS Certificate Download Specification
white space (excluding the End Of Line characters). Importing Certificate Chains Several of the formats described above can contain several certificates. When NSS's certificate decoder encounters one of these collections of multiple certificates they are handled in the following way: The first certificate is processed in a context specific manner, depending upon how it is being imported. For Mozilla browsers, this handling will depend upon the mime Content-Type that is used on the object being downloaded. For NSS-based servers it will depend upon the options selected in the server's administration interface. Subsequent certificates are all treated the same. If the certificates contain a BasicConstraints certificate extension that indicates they are CA certificates, and do not already exi...
...uent certificates are all treated the same. If the certificates contain a BasicConstraints certificate extension that indicates they are CA certificates, and do not already exist in the local certificate database, they are added as untrusted CAs. In this way they may be used for certificate chain validation, as long as there is a trusted CA somewhere along the chain. Importing Certificates into Mozilla browsers Mozilla browsers import certificates found in HTTP protocol responses. There are several mime content types that are used to indicate to the browser what type of certificate is being imported. These mime types are: application/x-x509-user-cert The certificate being downloaded is a user certificate belonging to the user operating the browser. If the private key associated with the cer...
Encrypt Decrypt MAC Keys As Session Objects
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS Sample Code 4: Encryption/Decryption and MAC Keys Using Session. Generates encryption/mac keys and uses session objects. /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include #include #include #include #include #include #include /* NSS headers */ #include #include /* our samples utilities */ #include "util.h" #define BUFFERSIZE 80 #define DIGESTSIZE 16 #define PTEXT_MAC_BUFFER_SIZE 96 #define CIPHERSIZE 96 #define BLOCKSIZE 32 #define CIPHER_HEADER "-----BEGIN CIPHER-----" #define CIPHER_TRAILER "-----END CIPHER-----" #define ENCKEY_HEADER ...
Encrypt and decrypt MAC using token
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS sample code 3: encryption/decryption and MAC using token object. Generates encryption/mac keys and uses token for storing. /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include #include #include #include #include #include #include /* NSS headers */ #include #include /* our samples utilities */ #include "util.h" #define BUFFERSIZE 80 #define DIGESTSIZE 16 #define PTEXT_MAC_BUFFER_SIZE 96 #define CIPHERSIZE 96 #define BLOCKSIZE 32 #define CIPHER_HEADER "-----BEGIN CIPHER-----" #define CIPHER_TRAILER "-----END CIPHER-----" #define ENCKEY_HEADER ...
NSS 3.15 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.15, which is a minor release. Distribution Information The HG tag is NSS_3_15_RTM. NSS 3.15 requires NSPR 4.10 or newer. NSS 3.15 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_RTM/src/ New in NSS 3.15 New Functionality Support for OCSP Stapling (RFC 6066, Certificate Status Request) has been added for both client and server sockets. TLS client applications may enable this via a call to SSL_OptionSetDefault(SSL_ENABLE_OCSP_STAPLING, PR_TRUE); Added function SECITEM_ReallocItemV2. It replaces function SECITEM_ReallocItem, which is now declared as obsolete. Support for single-operatio...
...mSideChannel and other OCSP caching behaviour. Bug 853285: Fixed bugs in AES GCM. Bug 341127: Fix the invalid read in rc4_wordconv. ...
NSS 3.16.1 release notes
Introduction Network Security Services (NSS) 3.16.1 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_1_RTM. NSS 3.16.1 requires NSPR 4.10.5 or newer. NSS 3.16.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_1_RTM/src/ New in NSS 3.16.1 New Functionality Added the "ECC" flag for modutil to select the module used for elliptic curve cryptography (ECC) operations. New Functions in pk11pub.h PK11_ExportDERPrivateKeyInfo and PK11_ExportPrivKeyInfo - exports a private key in a DER-encoded ASN.1 PrivateKeyInfo type or a SECKEYPrivateKeyInfo structure. O...
... in utilmodt.h SECMOD_ECC_FLAG - an NSS-internal mechanism flag for elliptic curve cryptography (ECC) operations. ...
NSS 3.16.2.1 release notes
Introduction Network Security Services (NSS) 3.16.2.1 is a patch release for NSS 3.16, based on the NSS 3.16.2 release. The bug fixes in NSS 3.16.2.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_2_1_RTM. NSS 3.16.2.1 requires NSPR 4.10.6 or newer. NSS 3.16.2.1 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_2_1_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.16.2.1. Users are encouraged to upgrade immediately. Bug 1064636 - (CVE-2014-1568) RSA Signature Forgery in NSS. See also MFSA 2014-73 for details. New in NSS 3.16.2.1 New Functionality No new fu...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.16.2.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16.2.2 release notes
Introduction Network Security Services (NSS) 3.16.2.2 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.2.2 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_2_2_RTM. NSS 3.16.2.2 requires NSPR 4.10.6 or newer. NSS 3.16.2.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_2_2_RTM/src/ New in NSS 3.16.2.2 New Functionality No new functionality is introduced in this release. This is a patch release to fix a regression. Notable Changes in NSS 3.16.2.2 Bug 1049435: Change RSA_PrivateKeyCheck to not require p > q. This fixes a regression introduced in NSS 3.16.2 that prevented NSS from importing some RSA...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.16.2.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16.2.3 release notes
Introduction Network Security Services (NSS) 3.16.2.3 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.2.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_2_3_RTM. NSS 3.16.2.3 requires NSPR 4.10.6 or newer. NSS 3.16.2.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_2_3_RTM/src/ New in NSS 3.16.2.3 This patch release fixes a bug and contains a backport of the TLS_FALLBACK_SCSV feature, which was originally made available in NSS 3.17.1. New Functionality TLS_FALLBACK_SCSV is a signaling cipher suite value that indicates a handshake is the result of TLS version fallback. New Macros in ssl.h ...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.16.2.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16.2 release notes
Introduction Network Security Services (NSS) 3.16.2 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.2 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_2_RTM. NSS 3.16.2 requires NSPR 4.10.6 or newer. NSS 3.16.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_2_RTM/src/ New in NSS 3.16.2 New Functionality DTLS 1.2 is supported. The TLS application layer protocol negotiation (ALPN) extension is also supported on the server side. RSA-OEAP is supported. Use the new PK11_PrivDecrypt and PK11_PubEncrypt functions with the CKM_RSA_PKCS_OAEP mechanism. New Intel AES assembly code for 32-bit and 64-bit Windows,...
... The pp command has a new command-line option -u, which means "use UTF-8". The default is to show a non-ASCII character as ".". ...
NSS 3.16.3 release notes
Introduction Network Security Services (NSS) 3.16.3 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_3_RTM. NSS 3.16.3 requires NSPR 4.10.6 or newer. NSS 3.16.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_3_RTM/src/ New in NSS 3.16.3 This release consists primarily of CA certificate changes as listed below, and fixes an issue with a recently added utility function. New Functions in cert.h CERT_GetGeneralNameTypeFromString - An utlity function to lookup a value of type CERTGeneralNameType given a human readable string. This function was already ad...
...urned off websites and code signing trust bits (1024-bit root) CN = NetLock Expressz (Class C) Tanusitvanykiado SHA1 Fingerprint: E3:92:51:2F:0A:CF:F5:05:DF:F6:DE:06:7F:75:37:E1:65:EA:57:4B Turned off websites and code signing trust bits (1024-bit root) Bugs fixed in NSS 3.16.3 This Bugzilla query returns all the bugs fixed in NSS 3.16.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.16.3 ...
NSS 3.16.5 release notes
Introduction Network Security Services (NSS) 3.16.5 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.5 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_5_RTM. NSS 3.16.5 requires NSPR 4.10.6 or newer. NSS 3.16.5 source distributions are also available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_5_RTM/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.16.5. Users are encouraged to upgrade immediately. Bug 1064636 - (CVE-2014-1568) RSA Signature Forgery in NSS. See also MFSA 2014-73 for details. New in NSS 3.16.5 New Functionality No new functionality is introduced in this release. This i...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.16.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16.6 release notes
Introduction Network Security Services (NSS) 3.16.6 is a patch release for NSS 3.16. The bug fixes in NSS 3.16.6 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_16_6_RTM. NSS 3.16.6 requires NSPR 4.10.6 or newer. NSS 3.16.6 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_6_RTM/src/ New in NSS 3.16.6 New Functionality No new functionality is introduced in this release. This is a patch release to fix a regression. Notable Changes in NSS 3.16.6 Bug 1049435: Change RSA_PrivateKeyCheck to not require p > q. This fixes a regression introduced in NSS 3.16.2 that prevented NSS from importing some RSA private keys (s...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.16.6 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.16 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.16, which is a minor release. Distribution Information The HG tag is NSS_3_16_RTM. NSS 3.16 requires NSPR 4.10.3 or newer. NSS 3.16 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_RTM/src/ New in NSS 3.16 New Functionality Supports the Linux x32 ABI. (This requires NSPR 4.10.4.) To build for the Linux x32 target, set the environment variable USE_X32=1 when building NSS. New Functions in cms.h NSS_CMSSignerInfo_Verify - verify the signature of a single SignerInfo. It just verifies the signature, assuming that the certificate has been verified already. New Macros in sslproto.h...
..., removes, and distrusts several certificates. The atob utility has been improved to automatically ignore lines of text that aren't in base64 format. ...
NSS 3.17 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.17, which is a minor release. Distribution Information The HG tag is NSS_3_17_RTM. NSS 3.17 requires NSPR 4.10.7 or newer. NSS 3.17 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_RTM/src/ New in NSS 3.17 New Functionality When using ECDHE, the TLS server code may be configured to generate a fresh ephemeral ECDH key for each handshake, by setting the SSL_REUSE_SERVER_ECDHE_KEY socket option to PR_FALSE. The SSL_REUSE_SERVER_ECDHE_KEY option defaults to PR_TRUE, which means the server's ephemeral ECDH key is reused for multiple handshakes. This option does not affect the TLS client code, whic...
...he manual pages for the certutil and pp tools have been updated to document the new parameters that had been added in NSS 3.16.2. ...
NSS 3.19.2.1 release notes
Introduction Network Security Services (NSS) 3.19.2.1 is a patch release for NSS 3.19.2. The bug fixes in NSS 3.19.2.1 are described in the "Security Advisories" section below. Distribution Information The HG tag is NSS_3_19_2_1_RTM. NSS 3.19.2.1 requires NSPR 4.10.10 or newer. NSS 3.19.2.1 and NSPR 4.10.10 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_1_RTM/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.19.2.1. Users are encouraged to upgrade immediately. Bug 1192028 (CVE-2015-7181) and Bug 1202868 (CVE-2015-7182): Several issues existed within the ...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.2.2 release notes
is a security patch release for NSS 3.19.2. The bug fixes in NSS 3.19.2.2 are described in the "Security Fixes" section below. (Current users of NSS 3.19.3 or NSS 3.19.4 are advised to update to NSS 3.20.2, NSS 3.21, or a later release.) Distribution Information The HG tag is NSS_3_19_2_2_RTM. NSS 3.19.2.2 requires NSPR 4.10.10 or newer. NSS 3.19.2.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_2_RTM/src/ Security Fixes in NSS 3.19.2.2 Bug 1158489 / CVE-2015-7575 - Prevent MD5 Downgrade in TLS 1.2 Signatures. New in NSS 3.19.2.2 New Functionality No new functionality is introduced in this release. Acknowledgements The NSS development team would like to...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.2.3 release notes
patch release for NSS 3.19.2. The bug fixes in NSS 3.19.2.3 are described in the "Security Fixes" section below. (Current users of NSS 3.19.3, NSS 3.19.4 or NSS 3.20.x are advised to update to NSS 3.21.1, NSS 3.22.2, or a later release.) Distribution Information The HG tag is NSS_3_19_2_3_RTM. NSS 3.19.2.3 requires NSPR 4.10.10 or newer. NSS 3.19.2.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_3_RTM/src/ New in NSS 3.19.2.3 New Functionality No new functionality is introduced in this release. Security Fixes in NSS 3.19.2.3 Bug 1245528 / CVE-2016-1950 - Fixed a heap-based buffer overflow related to the parsing of certain ASN.1 structures. An attacker coul...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.2.4 release notes
h release for NSS 3.19.2. The bug fixed in NSS 3.19.2.4 have been described in the "Security Fixes" section below. (Current users of NSS 3.19.3, NSS 3.19.4 or NSS 3.20.x are advised to update to NSS 3.21.1, NSS 3.22.2 or a later release.) Distribution Information The HG tag is NSS_3_19_2_4_RTM. NSS 3.19.2.4 requires NSPR 4.10.10 or newer. NSS 3.19.2.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_4_RTM/src/ New in NSS 3.19.2.4 New Functionality No new functionality has been introduced in this release. Security Fixes in NSS 3.19.2.4 The following security fixes from NSS 3.21 have been backported to NSS 3.19.2.4: Bug 1185033 / CVE-2016-1979 - Use-after-free ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.19.2.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict the use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.19.4 release notes
Introduction Network Security Services (NSS) 3.19.4 is a patch release for NSS 3.19. The bug fixes in NSS 3.19.4 are described in the "Security Advisories" section below. Distribution Information The HG tag is NSS_3_19_4_RTM. NSS 3.19.4 requires NSPR 4.10.10 or newer. NSS 3.19.4 and NSPR 4.10.10 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_4_RTM/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.19.4. Users are encouraged to upgrade immediately. Bug 1192028 (CVE-2015-7181) and Bug 1202868 (CVE-2015-7182): Several issues existed within the ASN.1 decoder us...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.19.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.20.1 release notes
Introduction Network Security Services (NSS) 3.20.1 is a patch release for NSS 3.20. The bug fixes in NSS 3.20.1 are described in the "Security Advisories" section below. Distribution Information The HG tag is NSS_3_20_1_RTM. NSS 3.20.1 requires NSPR 4.10.10 or newer. NSS 3.20.1 and NSPR 4.10.10 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_20_1_RTM/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ Security Advisories The following security-relevant bugs have been resolved in NSS 3.20.1. Users are encouraged to upgrade immediately. Bug 1192028 (CVE-2015-7181) and Bug 1202868 (CVE-2015-7182): Several issues existed within the ASN.1 decoder us...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.20.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.20.2 release notes
Introduction Network Security Services (NSS) 3.20.2 is a security patch release for NSS 3.20. The bug fixes in NSS 3.20.2 are described in the "Security Fixes" section below. Distribution Information The HG tag is NSS_3_20_2_RTM. NSS 3.20.2 requires NSPR 4.10.10 or newer. NSS 3.20.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_20_2_RTM/src/ Security Fixes in NSS 3.20.2 Bug 1158489 / CVE-2015-7575 - Prevent MD5 Downgrade in TLS 1.2 Signatures. New in NSS 3.20.2 New Functionality No new functionality is introduced in this release. Acknowledgements The NSS development team would like to thank Karthikeyan Bhargavan from INRIA for responsibly disclosing t...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.20.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.21.1 release notes
Introduction Network Security Services (NSS) 3.21.1 is a security patch release for NSS 3.21. The bug fixes in NSS 3.21.1 are described in the "Security Fixes" section below. Distribution Information The HG tag is NSS_3_21_1_RTM. NSS 3.21.1 requires NSPR 4.10.10 or newer. NSS 3.21.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_1_RTM/src/ New in NSS 3.21.1 New Functionality No new functionality is introduced in this release. Security Fixes in NSS 3.21.1 Bug 1245528 / CVE-2016-1950 - Fixed a heap-based buffer overflow related to the parsing of certain ASN.1 structures. An attacker could create a specially-crafted certificate which, when parsed by NSS, ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.21.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.21.2 release notes
Introduction Network Security Services (NSS) 3.21.2 is a security patch release for NSS 3.21.1. The bug fixes in NSS 3.21.2 are described in the "Security Fixes" section below. Distribution Information The HG tag is NSS_3_21_2_RTM. NSS 3.21.2 requires NSPR 4.10.10 or newer. NSS 3.21.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_2_RTM/src/ New in NSS 3.21.2 New Functionality No new functionality is introduced in this release. Security Fixes in NSS 3.21.2 Bug 1293334 / CVE-2016-9074 - Fixed a timing side channel in the TLS CBC code. Compatibility NSS 3.21.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.21.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.21.3 release notes
Introduction Network Security Services (NSS) 3.21.3 is a security patch release for NSS 3.21.2. The bug fixes in NSS 3.21.3 are described in the "Security Fixes" section below. Distribution Information The HG tag is NSS_3_21_3_RTM. NSS 3.21.3 requires NSPR 4.10.10 or newer. NSS 3.21.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_3_RTM/src/ New in NSS 3.21.3 New Functionality No new functionality is introduced in this release. Security Fixes in NSS 3.21.3 Bug 1306103 / CVE-2016-5285 - Fixed a possible DOS on NSS servers due to a missing NULL check. Bug 1221620 - Fixed a possible left-shift of a negative integer value when parsing DER. Bug 1206283 - ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.21.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.21.4 release notes
Introduction Network Security Services (NSS) 3.21.4 is a security patch release for NSS 3.21. The bug fixes in NSS 3.21.4 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_21_4_RTM. NSS 3.21.4 requires NSPR 4.12 or newer. NSS 3.21.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_4_RTM/src/ New in NSS 3.21.4 No new functionality is introduced in this release. Bugs fixed in NSS 3.21.4 Bug 1344380 / Out-of-bounds write in Base64 encoding in NSS (CVE-2017-5461) Bug 1345089 / DRBG flaw in NSS (CVE-2017-5462) Acknowledgements The NSS development team would like to thank Ronald Crane and Vladimir Klebanov for res...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.21.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.22.1 release notes
Introduction Network Security Services (NSS) 3.22.1 is a patch release for NSS 3.22. The bug fixes in NSS 3.22.1 are described in the "Notable Changes" section below. Distribution Information The HG tag is NSS_3_22_1_RTM. NSS 3.22.1 requires NSPR 4.12 or newer. NSS 3.22.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_22_1_RTM/src/ New in NSS 3.22.1 New Functionality No new functionality is introduced in this release. Notable Changes in NSS 3.22.1 bug 1194680: NSS has been changed to use the PR_GetEnvSecure function that was made available in NSPR 4.12 Compatibility NSS 3.22.1 shared libraries are backward compatible with all older NSS 3.22 shared libr...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.22.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.22.2 release notes
Introduction Network Security Services (NSS) 3.22.2 is a security patch release for NSS 3.22. The bug fixes in NSS 3.22.2 are described in the "Security Fixes" section below. Distribution Information The HG tag is NSS_3_22_2_RTM. NSS 3.22.2 requires NSPR 4.12 or newer. NSS 3.22.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_22_2_RTM/src/ New in NSS 3.22.2 New Functionality No new functionality is introduced in this release. Security Fixes in NSS 3.22.2 Bug 1245528 / CVE-2016-1950 - Fixed a heap-based buffer overflow related to the parsing of certain ASN.1 structures. An attacker could create a specially-crafted certificate which, when parsed by NSS, ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.22.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.22.3 release notes
Introduction Network Security Services (NSS) 3.22.3 is a patch release for NSS 3.22. The bug fixes in NSS 3.22.3 are described in the "Bugs fixed" section below. Distribution Information The HG tag is NSS_3_22_3_RTM. NSS 3.22.3 requires NSPR 4.12 or newer. NSS 3.22.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_22_3_RTM/src/ New in NSS 3.22.3 New Functionality No new functionality is introduced in this release. Bugs fixed in NSS 3.22.3 Bug 1243641 - Increase compatibility of TLS extended master secret, don't send an empty TLS extension last in the handshake Compatibility NSS 3.22.3 shared libraries are backward compatible with all older NSS 3.x sh...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.22.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.25.1 release notes
Introduction Network Security Services (NSS) 3.25.1 is a patch release for NSS 3.25. Distribution Information The HG tag is NSS_3_25_1_RTM. NSS 3.25.1 requires NSPR 4.12 or newer. NSS 3.25.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_25_1_RTM/src/ New in NSS 3.25.1 New Functionality No new functionality is introduced in this release. This is a patch release to address a TLS compatibility issue that some client applications experienced with NSS 3.25. Notable Changes in NSS 3.25.1 MD5 signature algorithms sent by the server in CertificateRequest messages are now properly ignored. Previously, with rare server configurations, an MD5 signature algorithm m...
...hared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.25.1 shared libraries without recompiling or relinking. Applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.26.2 release notes
Introduction Network Security Services (NSS) 3.26.2 is a patch release for NSS 3.26. Distribution Information The HG tag is NSS_3_26_2_RTM. NSS 3.26.2 requires NSPR 4.12 or newer. NSS 3.26.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_26_2_RTM/src/ New in NSS 3.26.2 New Functionality No new functionality is introduced in this release. This is a patch release to address a TLS compatibility issue that some client applications experienced with NSS 3.26.1. Notable Changes in NSS 3.26.2 MD5 signature algorithms sent by the server in CertificateRequest messages are now properly ignored. Previously, with rare server configurations, an MD5 signature algorithm...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.26.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.27.1 release notes
Introduction Network Security Services (NSS) 3.27.1 is a patch release for NSS 3.27. Distribution Information The HG tag is NSS_3_27_1_RTM. NSS 3.27.1 requires NSPR 4.13 or newer. NSS 3.27.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_1_RTM/src/ New in NSS 3.27.1 New Functionality No new functionality is introduced in this release. This is a patch release to address a TLS compatibility issue which some applications experienced with NSS 3.27. Notable Changes in NSS 3.27.1 Availability of the TLS 1.3 (draft) implementation has been re-disabled in the default build. Previous versions of NSS made TLS 1.3 (draft) available only when compiled with NSS_E...
...hared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.27.1 shared libraries without recompiling or relinking. Applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.27.2 Release Notes
Introduction Network Security Services (NSS) 3.27.2 is a patch release for NSS 3.27. Distribution Information The HG tag is NSS_3_27_2_RTM. NSS 3.27.2 requires NSPR 4.13 or newer. NSS 3.27.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_2_RTM/src/ New in NSS 3.27.2 New Functionality No new functionality is introduced in this release. This is a patch release to address a memory leak in the SSL_SetTrustAnchors() function. Notable Changes in NSS 3.27.2 The SSL_SetTrustAnchors() function is used to set the distinguished names that an NSS server includes in its TLS CertificateRequest message. If this function is not used, NSS will include the distinguish...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.27.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.28.1 release notes
Introduction Network Security Services (NSS) 3.28.1 is a patch release for NSS 3.28. The bug fixes in NSS 3.28.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_28_1_RTM. NSS 3.28.1 requires NSPR 4.13.1 or newer. NSS 3.28.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_1_RTM/src/ New in NSS 3.28.1 No new functionality is introduced in this release. This is a patch release to update the list of root CA certificates, and address a minor TLS compatibility issue, that some applications experienced with NSS 3.28. Notable Changes in NSS 3.28.1 The following CA certificates were Removed CN = Buypass Class 2...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.28.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.28.2 release notes
Introduction Network Security Services (NSS) 3.28.2 is a patch release for NSS 3.28. Distribution Information The HG tag is NSS_3_28_2_RTM. NSS 3.28.2 requires NSPR 4.13.1 or newer. NSS 3.28.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_2_RTM/src/ Incorrect version number Note the version numbers embedded in the NSS 3.28.2 are wrong (it reports itself as version 3.28.1). New in NSS 3.28.2 No new functionality is introduced in this release. This is a patch release includes bug fixes and addresses some compatibility issues with TLS. Bugs fixed in NSS 3.28.2 Bug 1334114 - NSS 3.28 regression in signature scheme flexibility, causes connectivity i...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.28.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.28.3 release notes
Introduction Network Security Services (NSS) 3.28.3 is a patch release for NSS 3.28. The bug fixes in NSS 3.28.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_28_3_RTM. NSS 3.28.3 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. NSS 3.28.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_28_3_RTM/src/ New in NSS 3.28.3 New Functionality No new functionality is introduced in this release. This is a patch release to fix binary compatibility issues. Bugs fixed in NSS 3.28.3 NSS version 3.28, 3.28.1 and 3.28.2 contained changes that were in violation with the NSS compatibility promise. ECParams, which is part of the ...
... ...
NSS 3.28.4 release notes
Introduction Network Security Services (NSS) 3.28.4 is a security patch release for NSS 3.28. The bug fixes in NSS 3.28.4 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_28_4_RTM. NSS 3.28.4 requires NSPR 4.13.1 or newer. NSS 3.28.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_4_RTM/src/ New in NSS 3.28.4 No new functionality is introduced in this release. Bugs fixed in NSS 3.28.4 Bug 1344380 / Out-of-bounds write in Base64 encoding in NSS (CVE-2017-5461) Bug 1345089 / DRBG flaw in NSS (CVE-2017-5462) Bug 1342358 - Crash in tls13_DestroyKeyShares Acknowledgements The NSS development team would like to...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.28.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.28.5 release notes
Introduction Network Security Services (NSS) 3.28.5 is a patch release for NSS 3.28. The bug fixes in NSS 3.28.5 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_28_5_RTM. NSS 3.28.5 requires NSPR 4.13.1 or newer. NSS 3.28.5 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_5_RTM/src/ New in NSS 3.28.5 No new functionality is introduced in this release. This is a patch release to update the list of root CA certificates. It backports the changes that were initially released in NSS version 3.30.2. Notable Changes in NSS 3.28.5 The following CA certificates were Removed: O = Japanese Government, OU = Applica...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.28.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.29.1 release notes
Introduction Network Security Services (NSS) 3.29.1 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_29_1_RTM. NSS 3.29.1 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. NSS 3.29.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_29_1_RTM/src/ New in NSS 3.29.1 New Functionality No new functionality is introduced in this release. This is a patch release to fix binary compatibility issues. Bugs fixed in NSS 3.29.1 NSS version 3.28, 3.28.1, 3.28.2 and 3.29 contained changes that were in violation with the NSS compatibility promise. ECParams, which is part o...
... ...
NSS 3.29.2 release notes
Introduction Network Security Services (NSS) 3.29.2 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.2 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_29_2_RTM. NSS 3.29.2 requires Netscape Portable Runtime (NSPR) 4.13.1 or newer. NSS 3.29.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_29_2_RTM/src/ New in NSS 3.29.2 New Functionality No new functionality is introduced in this release. Bugs fixed in NSS 3.29.2 NSS 3.29 and 3.29.1 included a change that reduced the time that NSS considered a TLS session ticket to be valid. This release restores the session ticket lifetime to the intended value. See Bug 1340841 fo...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.29.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.29.3 release notes
Introduction Network Security Services (NSS) 3.29.3 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.3 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_29_3_RTM. NSS 3.29.3 requires NSPR 4.13.1 or newer. NSS 3.29.3 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_29_3_RTM/src/ New in NSS 3.29.3 No new functionality is introduced in this release. Notable Changes in NSS 3.29.3 A rare crash when initializing an SSL socket fails has been fixed. Bugs fixed in NSS 3.29.3 Bug 1342358 - Crash in tls13_DestroyKeyShares Compatibility NSS 3.29.3 shared libraries are backward compatible with all older NSS 3.x s...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.29.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.29.5 release notes
Introduction Network Security Services (NSS) 3.29.5 is a security patch release for NSS 3.29. The bug fixes in NSS 3.29.5 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_29_5_RTM. NSS 3.29.5 requires NSPR 4.13.1 or newer. NSS 3.29.5 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_29_5_RTM/src/ New in NSS 3.29.5 No new functionality is introduced in this release. Bugs fixed in NSS 3.29.5 Bug 1344380 / Out-of-bounds write in Base64 encoding in NSS (CVE-2017-5461) Bug 1345089 / DRBG flaw in NSS (CVE-2017-5462) Acknowledgements The NSS development team would like to thank Ronald Crane and Vladimir Klebanov for r...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.29.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.30.1 release notes
Introduction Network Security Services (NSS) 3.30.1 is a security patch release for NSS 3.30. The bug fixes in NSS 3.30.1 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_30_1_RTM. NSS 3.30.1 requires NSPR 4.14 or newer. NSS 3.30.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_30_1_RTM/src/ New in NSS 3.30.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.30.1 Bug 1344380 / Out-of-bounds write in Base64 encoding in NSS (CVE-2017-5461) Acknowledgements The NSS development team would like to thank Ronald Crane for responsibly disclosing the issue by providing advance copies of their res...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.30.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.30.2 release notes
Introduction Network Security Services (NSS) 3.30.2 is a patch release for NSS 3.30. The bug fixes in NSS 3.30.2 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_30_2_RTM. NSS 3.30.2 requires NSPR 4.14 or newer. NSS 3.30.2 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_30_2_RTM/src/ New in NSS 3.30.2 No new functionality is introduced in this release. This is a patch release to update the list of root CA certificates. Notable Changes in NSS 3.30.2 The following CA certificates were Removed: O = Japanese Government, OU = ApplicationCA SHA-256 Fingerprint: 2D:47:43:7D:E1:79:51:21:5A:12:F3:C5:8E:51...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.30.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.31.1 release notes
This is a DRAFT document. This notice will be removed when completed. Introduction The Network Security Services (NSS) team has released NSS 3.31.1, which is a patch release for NSS 3.31. Distribution information The hg tag is NSS_3_31_1_RTM. NSS 3.31.1 requires Netscape Portable Runtime (NSPR) 4.15, or newer. NSS 3.31.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_31_1_RTM/src/ New in NSS 3.31.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.31.1 Bug 1381784 - Potential deadlock when using an external PKCS#11 token. Compatibility NSS 3.31.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A...
.... A program linked with older NSS 3.x shared libraries will work with NSS 3.31.1 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.5 release notes
Introduction Network Security Services (NSS) 3.36.5 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.5 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_36_5_RTM. NSS 3.36.5 requires NSPR 4.19 or newer. NSS 3.36.5 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_36_5_RTM/src/ New in NSS 3.36.5 New Functionality No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12384 Bugs fixed in NSS 3.36.5 Bug 1483128 - NSS responded to an SSLv2-compatible ClientHello with a ServerHello that had an all-zero random (CVE-2018-12384) Compatibility NSS 3.36.5 shared libraries are ba...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.6 release notes
Introduction Network Security Services (NSS) 3.36.6 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.6 are described in the "Bugs Fixed" section below. Distribution Information The HG tag is NSS_3_36_6_RTM. NSS 3.36.6 requires NSPR 4.19 or newer. NSS 3.36.6 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_36_6_RTM/src/ New in NSS 3.36.6 New Functionality No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12404 Bugs fixed in NSS 3.36.6 Bug 1485864 - Cache side-channel variant of the Bleichenbacher attack (CVE-2018-12404) Bug 1389967 and Bug 1448748 - Fixes for MinGW on x64 platforms. Compatibility NSS 3.3...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.6 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.7 release notes
Introduction Network Security Services (NSS) 3.36.7 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.7 are described in the "Bugs Fixed" section below. It was released on 19 January 2019. Distribution Information The HG tag is NSS_3_36_7_RTM. NSS 3.36.7 requires NSPR 4.19 or newer. NSS 3.36.7 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_36_7_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.36.7 New Functionality No new functionality is introduced in this release. This is a patch release to fix bugs. Bugs fixed in NSS 3.36.7 Bug 1507135 and Bug 1507174 - Add additional null checks to several CMS functions to fix a rare CMS c...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.7 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.36.8 release notes
Introduction Network Security Services (NSS) 3.36.8 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.8 are described in the "Bugs Fixed" section below. It was released on 21 June 2019. Distribution Information The HG tag is NSS_3_36_8_RTM. NSS 3.36.8 requires NSPR 4.19 or newer. NSS 3.36.8 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_36_8_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.36.8 New Functionality No new functionality is introduced in this release. This is a patch release to fix bugs. Bugs fixed in NSS 3.36.8 1554336 - Optimize away unneeded loop in mpi.c 1515342 - More thorough input checking (CVE-2019...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.8 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.40.1 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.40.1, which is a patch release for NSS 3.40 Distribution Information The HG tag is NSS_3_40_1_RTM. NSS 3.40.1 requires NSPR 4.20 or newer. NSS 3.40 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_40_1_RTM/src/ New in NSS 3.40.1 New Functionality No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12404 New Functions none Bugs fixed in NSS 3.40.1 Bug 1485864 - Cache side-channel variant of the Bleichenbacher attack (CVE-2018-12404) Compatibility NSS 3.40.1 shared libraries are backward compatible with all older NS...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.40.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.44.1 release notes
Security Services (NSS) 3.44.1 is a patch release for NSS 3.44. The bug fixes in NSS 3.44.1 are described in the "Bugs Fixed" section below. It was released on 21 June 2019. The NSS team would like to recognize first-time contributors: Greg Rubin Distribution Information The HG tag is NSS_3_44_1_RTM. NSS 3.44.1 requires NSPR 4.21 or newer. NSS 3.44.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_44_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.44.1 New Functionality 1546229 - Add IPSEC IKE support to softoken Many new FIPS test cases (Note: This has increased the source archive by approximately 50 megabytes for this release.) ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.44.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.44.4 release notes
SS team has released Network Security Services (NSS) 3.44.4 on 19 May 2020. This is a security patch release. Thank you to Cesar Pereida Garcia and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue. Distribution Information The HG tag is NSS_3_44_4_RTM. NSS 3.44.4 requires NSPR 4.21 or newer. NSS 3.44.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_44_4_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.44.4 No new functionality is introduced in this release. Bugs fixed in NSS 3.44.4 CVE-2020-12399 - Force a fixed length for DSA exponentiation Compatibility NSS 3.44.4 shared libraries are ...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.44.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.51.1 release notes
Introduction The NSS team has released Network Security Services (NSS) 3.51.1 on 3 April 2020. This is a minor release focusing on functional bug fixes and low-risk patches only. Distribution Information The HG tag is NSS_3_51_1_RTM. NSS 3.51.1 requires NSPR 4.25 or newer. NSS 3.51.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_51_1_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.51.1 Bug 1617968 - Update Delegated Credentials implementation to draft-07. Bugs fixed in NSS 3.51.1 Bug 1619102 - Add workaround option to include both DTLS and TLS versions in DTLS supported_versions. Bug 1619056 - Update README: TLS 1.3 i...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.51.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.52.1 release notes
SS team has released Network Security Services (NSS) 3.52.1 on 19 May 2020. This is a security patch release. Thank you to Cesar Pereida Garcia and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue. Distribution Information The HG tag is NSS_3_52_1_RTM. NSS 3.52.1 requires NSPR 4.25 or newer. NSS 3.52.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_52_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.52.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.52.1 CVE-2020-12399 - Force a fixed length for DSA exponentiation Compatibility NSS 3.52.1 shared libraries are backw...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.52.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS 3.53.1 release notes
Services (NSS) 3.53.1 on 16 June 2020. This is a security patch release. Thank you to Sohaib ul Hassan, Billy Bob Brumley, and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue and providing a patch. Distribution Information The HG tag is NSS_3_53_1_RTM. NSS 3.53.1 requires NSPR 4.25 or newer. NSS 3.53.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_53_1_RTM/src/ Other releases are available in NSS Releases. New in NSS 3.53.1 No new functionality is introduced in this release. Bugs fixed in NSS 3.53.1 CVE-2020-12402 - Use constant-time GCD and modular inversion in MPI. Compatibility NSS 3.53.1 shared libraries a...
...es. A program linked with older NSS 3.x shared libraries will work with NSS 3.53.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries. Feedback Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS). ...
NSS Developer Tutorial
th \x if there is no special escape such as \r, \n, and \t) and avoid defining string literals that use non-ASCII characters. One line comments starting with // are permitted. Check with nss-dev@ before using a language feature not already used, if you are uncertain. Please update this list if you do. These restrictions are different for C++ unit tests, which can use most C++11 features. The Mozilla C++ language features guide, and the Chromium C++ usage guide, list C++ features that are known to be widely available and compatible. You should limit features to those that appear in both guides. Ask on nss-dev@ if you think this is restrictive, or if you wish to prohibit a specific feature. NSS C ABI backward compatibility Functions Exported functions cannot be removed. The function protot...
...evelopers, who have broad understanding of NSS. One review is usually enough for the review to pass. For critical code reviews, such as a patch release of a stable branch, two reviews may be more reasonable. For new features, especially those that appear controversial, try to find a reviewer from a different company or organization than your own, to avoid any perceptions of bias. Update NSS in mozilla-inbound and mozilla-central The procedure is documented at https://developer.mozilla.org/docs/Updating_NSPR_or_NSS_in_mozilla-central. If it is necessary to apply private patches, please document them in <tree>/security/patches/README. ...
Enc Dec MAC Output Public Key as CSR
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS Sample Code 5: Encryption/Decryption and MAC and output Public as a CSR. Generates encryption/mac keys and outputs public key as certificate signing request /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include #include #include #include #include #include #include /* NSS headers */ #include #include #include #include #include #include #include #include #include #include #include #include /* our samples utilities */ #include "util.h" #define BUFFERSIZE 80 #define DIGESTSIZE 16 #define PTEXT_MAC_BUFFER_SIZE 96 #define CIPHERSIZE 96 #define BLOCKSIZE 32 #define ...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS Sample Code 6: Encryption/Decryption and MAC and output Public as a PKCS 11 CSR. Generates encryption/mac keys and outputs public key as pkcs11 certificate signing request /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* NSS headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* Constants */ #define BLOCKSIZE 32 #define MODBLOCKSIZE 128 #define DEFAULT_KEY_BITS 1024 /* Heade...
Encrypt Decrypt_MAC_Using Token
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS Sample Code 3: Encryption/Decryption and MAC Using Token Object. Generates encryption/mac keys and uses token for storing. /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include #include #include #include #include #include #include /* NSS headers */ #include #include /* Our samples utilities */ #include "util.h" #define BUFFERSIZE 80 #define DIGESTSIZE 16 #define PTEXT_MAC_BUFFER_SIZE 96 #define CIPHERSIZE 96 #define BLOCKSIZE 32 #define CIPHER_HEADER "-----BEGIN CIPHER-----" #define CIPHER_TRAILER "-----END CIPHER-----" #define ENCKEY_HEADER ...
NSS Sample Code Sample_3_Basic Encryption and MACing
2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * Gather a CKA_ID */ SECStatus GatherCKA_ID(PK11SymKey* key, SECItem* buf) { SECStat...
...7s For decrypt, it takes <ipfilename>.enc and <ipfilename>.header\n", ""); fprintf(stderr, "%-7s as input files and produces <opfilename> as a final output file.\n\n", ""); exit(-1); } /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * Gather a CKA_ID */ SECStatus GatherCKA_ID(PK11SymKey* key, SECItem* buf) { SECStatus rv = PK11_ReadRawAttribute(PK11_TypeSymKey, key, CKA_ID, buf); if (rv != SECSuccess) { PR_fprintf(PR_STDERR, ...
Hashing - sample 1
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... NSS sample code 1: hashing. The NSS same code below computes the hash of a file and saves it to another file, this illustrates the use of NSS message APIs. /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> /* NSS headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> #include <nss.h> typedef struct { const char *hashName; SECOidTag oid; } NameTagPair; /* The hash algorithms supported */ static const NameTagPair HASH_NAMES[] = { { "MD2", SEC_OID_MD2 }, { "MD5", SEC_OID_MD5 }, { "SHA1", SEC_OID_SHA...
EncDecMAC using token object - sample 3
2.0. ...
..._3_Hashing.">NSS Sample Code 3: Enc/Dec/MAC Using Token Object ID.</h2> <p class="summary">Computes the hash of a file and saves it to another file, illustrates the use of NSS message APIs.</p> <pre class="brush: cpp"> /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include #include #include #include #include #include #include /* NSS headers */ #include #include /* our samples utilities */ #include "util.h" #define BUFFERSIZE 80 #define DIGESTSIZE 16 #define PTEXT_MAC_BUFFER_SIZE 96 #define CIPHERSIZE 96 #define BLOCKSIZE 32 #define CIPHER_HEADER "-----BEGIN CIPHER-----" #define CIPHER_TRAILER "-----END CIPHER-----" #defi...
sample2
2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. ...
... /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* NSPR Headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* NSS headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* Constants */ #define BLOCKSIZE 32 #define MODBLOCKSIZE 128 #define DEFAULT_KEY_BITS 1024 /* Header file Constants */ #define ENCKEY_HEA...
NSS Sample Code
process of being replaced. ...
... Symmetric Encryption Sample Code 3: Hashing, MAC Sample Code 4: PKI Encryption Sample Code 5: PKI Encryption with a raw public & private key in DER format Sample Code 6: Persistent Symmetric Keys in NSS database These are very old examples in need of replacement. See https://bugzilla.mozilla.org/show_bug.cgi?id=490238 You are welcome to download the new samples via: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH The new samples: /docs/Mozilla/Projects/NSS/New_NSS_Samples ...
Installation guide
The build system of NSS originated from Netscape's build system, which predated the "configure; make; make test; make install" sequence that we're familiar with now. Our makefiles also have an "install" target, but it has a different meaning: our "install" means installing the headers, libraries, and programs in the appropriate directories under mozilla/dist. ...
...d to manually install the headers, libraries, and programs in the directories you want. If you install the libraries in a directory other than /usr/lib, you usually need to set the LD_LIBRARY_PATH environment variable. You can avoid that by installing the libraries in a directory that is $ORIGIN/../lib, where $ORIGIN is the directory where the programs are installed. ...
NSS tools : cmsutil
ssword] -r "recipient1,recipient2, ..." Certificate-only Example cmsutil -O [-i infile] [-o outfile] [-d dbdir] [-p password] -r "cert1,cert2, . . ." Sign Message Example cmsutil -S [-i infile] [-o outfile] [-d dbdir] [-p password] -N nickname[-TGP] [-Y ekprefnick] See also certutil(1) See Also Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag...
....com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://pki.fedoraproject.org/wiki/ 2. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : ssltab
hich you are trying to connect, the browser will complain that the host name you are trying to connect to is different from the certificate. If you are using the default BadCert callback, you can still connect through a dialog. If you are not using the default BadCert callback, the one you supply must allow for this possibility. See Also The NSS Security Tools are also documented at [1]http://www.mozilla.org/projects/security/pki/nss/. Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [2]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [3]http://www.mozilla.org/projects/security/pki/nss/. The NSS ...
...ailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://www.mozilla.org/projects/secu.../pki/nss/tools 2. http://pki.fedoraproject.org/wiki/ 3. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : ssltap
hich you are trying to connect, the browser will complain that the host name you are trying to connect to is different from the certificate. If you are using the default BadCert callback, you can still connect through a dialog. If you are not using the default BadCert callback, the one you supply must allow for this possibility. See Also The NSS Security Tools are also documented at [1]http://www.mozilla.org/projects/security/pki/nss/. Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [2]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [3]http://www.mozilla.org/projects/security/pki/nss/. The NSS ...
...ailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://www.mozilla.org/projects/secu.../pki/nss/tools 2. http://pki.fedoraproject.org/wiki/ 3. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : vfychain
thod type Sets method type for the test type it follows. Possible types are "crl" and "ocsp". -s method flags Sets revocation flags for the method it follows. Possible types are "doNotUse", "forbidFetching", "ignoreDefaultSrc", "requireInfo" and "failIfNoInfo". Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, I...
...ses. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. ...
NSS tools : vfyserv
Name vfyserv -- TBD Synopsis vfyserv Description The vfyserv tool verifies a certificate chain Options Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. ...
...ses. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. ...
troubleshoot.html
Troubleshooting NSS and JSS Builds Newsgroup: mozilla.dev.tech.crypto This page summarizes information on troubleshooting the NSS and JSS build and test systems, including known problems and configuration suggestions. If you have suggestions for this page, please post them to mozilla.dev.tech.crypto. Building NSS Having /usr/ucb/bin in the path before /usr/ccs/bin breaks the build on 64-bit Solaris. The Solaris compiler needs to be workshop-5.0 or greater. The 64-bit builds don't support gcc. ...
...ation suggestions. If you have suggestions for this page, please post them to mozilla.dev.tech.crypto. Building NSS Having /usr/ucb/bin in the path before /usr/ccs/bin breaks the build on 64-bit Solaris. The Solaris compiler needs to be workshop-5.0 or greater. The 64-bit builds don't support gcc. If the build fails early on the gmakein coreconf try updating your cvs tree with -P: cd mozilla cvs update -P Building a 32-bit version on a 64-bit may fail with: /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory In this case remember to set USE_64=1 Testing NSS The SSL stress test opens 2,048 TCP connections in quick succession. Kernel data structures may remain allocated for these connections for up to two minutes. Some systems may not...
NSS tools : cmsutil
Mozilla › Projects › NSS › tools › cmsutil
ipient2, ..." Certificate-only Example cmsutil -O [-i infile] [-o outfile] [-d dbdir] [-p password] -r "cert1,cert2, . . ." Sign Message Example cmsutil -S [-i infile] [-o outfile] [-d dbdir] [-p password] -N nickname[-TGP] [-Y ekprefnick] See also certutil(1) See Also Additional Resources NSS is maintained in conjunction with PKI and security-related projects through Mozilla dn Fedora. The most closely-related project is Dogtag PKI, with a project wiki at [1]http://pki.fedoraproject.org/wiki/. For information specifically about NSS, the NSS project wiki is located at [2]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: pki-devel@redhat.com and pki-users@redhat.com IRC...
...RC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape and now with Red Hat. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. http://pki.fedoraproject.org/wiki/ 2. http://www.mozilla.org/projects/security/pki/nss/ ...
NSS tools : vfychain
ssible types are "crl" and "ocsp". -s method flags Sets revocation flags for the method it follows. Possible types are "doNotUse", "forbidFetching", "ignoreDefaultSrc", "requireInfo" and "failIfNoInfo". Additional Resources For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates directly to NSS code changes and releases. Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Cop...
...s.mozilla.org/listinfo/dev-tech-crypto IRC: Freenode at #dogtag-pki Authors The NSS tools were written and maintained by developers with Netscape, Red Hat, and Sun. Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>. Copyright (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. References Visible links 1. ...
Necko Architecture
Necko has been designed to accommodate pluggable protocols so developers can contribute their own protocol libraries that can be dynamically loaded and used by applications utilizing Necko. Necko provides the following libraries: necko - core networking functionality. ...
... ...
Multithreading in Necko
In the future, Necko may be made thread safe to support changes to Gecko that would put some other processing work on background threads (eg. multithreaded image decoding). However, most Necko protocols utilize background threads. ...
..., Necko takes advantage of the platforms specific routines for DNS lookups. The default implementation does not spawn a worker thread, and instead simply calls PR_GetIPNodeByName (essentially equivalent to gethostbyname). Original Document Information Author(s): Darin Fisher Last Updated Date: December 10, 2001 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Necko
Necko is a network library that provides a platform-independent API for several layers of networking, ranging from transport to presentation layers. This API is used in many Mozilla-based client applications (including Firefox) and can be used for writing other networking clients. Currently the library is built as part of the Mozilla distribution. You can get the whole distribution as described in the Build Documentation. Eventually we'd like to move to a binary distribution mechanism for the networking library so that you can build your application that uses this library without having to build Mozilla. Browse our code in its latest state at netwerk/ Documents A necko code walkthrough Necko Architecture Necko multithreading Necko FAQ Necko Interfaces overview The Necko HTTP mo...
...ve to a binary distribution mechanism for the networking library so that you can build your application that uses this library without having to build Mozilla. Browse our code in its latest state at netwerk/ Documents A necko code walkthrough Necko Architecture Necko multithreading Necko FAQ Necko Interfaces overview The Necko HTTP module Proxies in Necko PAC files Community View Mozilla forums... Mailing list Newsgroup RSS feed ...
Tutorial: Embedding Rhino
Embedding Rhino can be done simply with good results. With more effort on the part of the embedder, the objects exposed to scripts can be customized further. This tutorial leads you through the steps from a simple embedding to more customized, complex embeddings. Fully compilable examples are provided along the way. The examples live in the rhino/examples directory in the distribution and in mozilla/js/rhino/examples in cvs. This document will link to them using lxr. In this document, JavaScript code will be in green, Java code will be in green, and shell logs will be in purple. In this document: RunScript: A simple embedding Entering a Context Initializing standard objects Collecting the arguments Evaluating a script Printing the result Exiting the Context E...
...xample The Counter example is a simple host object. We'll go through it method by method below. It's easy to try out new host object classes in the shell using its built-in defineClass function. We'll see how to add it to RunScript later. (Note that because the java -jar option preempts the rest of the classpath, we can't use that and access the Counter class.) $ java -cp "js.jar;examples" org.mozilla.javascript.tools.shell.Main js> defineClass("Counter") js> c = new Counter(7) [object Counter] js> c.count 7 js> c.count 8 js> c.count 9 js> c.resetCount() js> c.count 0 Counter's constructors The zero-argument constructor is used by Rhino runtime to create instances. For the counter example, no initialization work is needed, so the implementation is empty. public Counter () { } The method ...
Rhino history
Java and so it needed an implementation of JavaScript written in Java. When Netscape stopped work on "Javagator," as it was called, somehow Rhino escaped the axe (rumor had it that the executives "forgot" it existed). For a time, a couple of major companies (including Sun) licensed Rhino for use in their products and paid Netscape to do so, allowing work on Rhino to continue. Now Rhino is part of Mozilla's open-source repository. Originally, Rhino compiled all JavaScript code to Java bytecodes in generated classfiles. This produced the best performance (often beating the C implementation of JavaScript when run on a JIT), but suffered from two faults. First, compilation time was long since generating Java bytecodes and loading the generated classes was a heavyweight process. Also, the implementat...
...emory since most JVMs don't really collect unused classes or the strings that are interned as a result of loading a class file. So in fall of 1998, Rhino added an interpretive mode. The classfile generation code was moved to an optional, dynamically-loaded package. Compilation is faster and when scripts are no longer in use they can be collected like any other Java object. Rhino was released to mozilla.org in April 1998. Originally Rhino classfile generation had been held back from release. However the licensees of Rhino have now agreed to release all of Rhino to open source, including class file generation. Since its release to open source, Rhino has found a variety of uses and an increasing number of people have contributed to the code. ...
Rhino overview
revent optimization. The deprecated features are the __proto__ and __parent__ properties, and the constructors With, Closure, and Call. Attempts to invoke these constructors with the language version 1.4 will result in an error. For other versions, a warning will be generated. Internationalization The messages reported by the JavaScript engine are by default retrieved from the property file org/mozilla/javascript/resources/Messages.properties. If other properties files with extensions corresponding to the current locale exist, they will be used instead. JavaScript Language Versions Some behavior in the JavaScript engine is dependent on the language version. In browser embeddings, this language version is selected using the LANGUAGE attribute of the SCRIPT tag with values such as "JavaScript1.
...ipt code must do two things to enable the security features. First, every Context that is created must be supplied an instance of an object that implements the SecuritySupport interface. This will provide Rhino the support functionality it needs to perform security-related tasks. Second, the value of the property security.requireSecurityDomain should be changed to true in the resource bundle org.mozilla.javascript.resources.Security. The value of this property can be determined at runtime by calling the isSecurityDomainRequired method of Context. Setting this property to true requires that any calls that compile or evaluate JavaScript must supply a security domain object of any object type that will be used to identify JavaScript code. In a typical client embedding, this object might be a string...
Shumway
The project is not exactly a developer tool but it is something that content creators should test against (and report bugs or performance issues to). For even more information, please refer to the external links. The whats and whys of Shumway Shumway is a renderer for Adobe Flash built entirely in Web Standards (JavaScript, WebGL, and others). It is currently available as an extension and as a component in Firefox's Nightly builds that can be enabled through about:config (you need to find the shumway.disabled preference and set it to false). ...
...in Firefox's Add-ons menu (this will be listed as "Shockwave Flash" under the Plugins tab). This will be the experience met by your users who are running that version of Shumway. Hopefully, this displays your content with acceptable quality. The next step is to use the Inspector included as one of Shumway's examples. It can be run locally through a web server or you can use the version hosted on Mozilla's GitHub. Several methods exist to allow Inspector access to your SWF file. Once your Flash content is loaded, you can see how Shumway manages it in detail. Several buttons are available at the bottom of the screen to enable or disable various Shumway options. Note: If your applet runs at an abnormal speed, try toggling "Turbo" at the bottom of the inspector window. You may wish to do this befo...
Creating JavaScript jstest reftests
s of conformance to ECMAScript, and many of those tests remain in the js/src/non262 directory as regressions. test262 tests Test262 is the implementation conformance test suite for the latest drafts of ECMAScript Language Specification, as well as Internationalization API Specification and The JSON Data Interchange Format. It is maintained by TC39, the ECMAScript Standard's technical committee. Mozilla manually imports these tests into the js/src/tests/test262 directory. You should contribute directly to Test262 in the following scenarios: You are writing tests for the implementation of a new feature or feature proposal for ECMAScript. If tests for the new feature proposal do not yet exist in Test262 (they might!), contributing to Test262 will allow all other JavaScript implementors ...
...e implementation of a new feature or feature proposal for ECMAScript. If tests for the new feature proposal do not yet exist in Test262 (they might!), contributing to Test262 will allow all other JavaScript implementors to use your tests as well. You would like to contribute tests of an ECMAScript, Intl or JSON feature insufficiently covered by Test262. At the time of this writing, Mozilla imports Test262 tests in to the directory js/src/tests/test262. When importing Test262, the test file's in-file metadata is translated from Test262 format to a format readibly by the jstest harness. If you are contributing directly to Test262, you must submit the tests in the Test262 format, which you can see in the Test262 git repository and read about here. An update script exists in the js/s...
GCIntegration - SpiderMonkey Redirect 1
s a wrapper that's registered in the cross-compartment wrapper map. Now, on to the details... GC/CC interaction <To be done later.> Incremental GC Incremental GC divides GC marking into time slices. In between these slices, non-GC code is allowed to run. Done naively, this technique can lead to reachable object not being marked. Consider the following example. {{ Svg{source: "http://people.mozilla.org/~wmccloskey/incremental1.svg", embedding: "iframe", height:"130"} }} Assume object B is already marked, as in the leftmost frame, while objects A and C have not been marked yet. In the middle frame some code creates a pointer from B to C and destroys the pointer from A to C. In the last frame, A gets marked by the GC. The problem is that C is never marked even though it's reachable. This wil...
...of this article, a weak pointer is one that is not traced during GC. At the end of the GC, if the pointer refers to an object that is not reachable via some other path, then it will be nulled out or dropped in some way. If the object is still reachable, then the pointer will be left alone. To see how weak pointers can cause trouble, consider the following situation: {{ Svg{source: "http://people.mozilla.org/~wmccloskey/incremental2.svg", embedding: "iframe", height:"130"} }} In the left frame, A has a weak pointer to C. Assume that an incremental GC has already started, and A and B have been marked. C was not marked by A because weak pointers are not traced. Now let's assume, between the left and right frames, that some code has read the weak pointer to C and then created a regular (strong) ref...
Tracing JIT
The jstracer component consists of a monitor and a recorder. The monitor watches the executing SpiderMonkey interpreter. ...
...The jstracer component consists of a monitor and a recorder. The monitor watches the executing SpiderMonkey interpreter. ...
JS::DeflateStringToUTF8Buffer
This article covers features introduced in SpiderMonkey 38 Encode the given string as UTF8 into given buffer. Syntax // New in JSAPI 52 void DeflateStringToUTF8Buffer(JSFlatString* src, mozilla::RangedPtr<char> dst, size_t* dstlenp = nullptr, size_t* numcharsp = nullptr); // Obsolete in SpiderMonkey 49 void DeflateStringToUTF8Buffer(JSFlatString* src, mozilla::RangedPtr<char> dst); Name Type Description src JSFlatString * The pointer to the string to deflate. dst mozilla::RangedPtr<char> The ranged pointer to the buffer. dstlenp size_t* The pointer to receive the number of bytes written to the buffer. numcharsp size_t* The pointer to receive the number of Unicode characters...
...s[] = { 0xD83E, 0xDD8A, 0 }; JS::RootedString str(cx, JS_NewUCStringCopyN(cx, uchars, 2)); if (!str) return false; JS::Rooted<JSFlatString*> flatStr(cx, JS_FlattenString(cx, str)); if (!flatStr) return false; size_t length = JS::GetDeflatedUTF8StringLength(flatStr); char* buffer = static_cast<char*>(JS_malloc(cx, length + 1)); if (!buffer) return false; JS::DeflateStringToUTF8Buffer(flatStr, mozilla::RangedPtr<char>(buffer, length)); buffer[length] = '\0'; printf("utf8: [%s]\n", buffer); JS_free(cx, buffer); See Also JS::GetDeflatedUTF8StringLength bug 1034627 bug 1271014 -- Added dstlenp and numcharsp ...
JSPrincipals
Use JS_HoldPrincipals and JS_DropPrincipals. codebase char * Pointer to the codebase for the principal. Obsolete since JSAPI 13 getPrincipalArray void * (*)(JSContext *, JSPrincipals *) Pointer to the function that returns an array of principal definitions. Obsolete since JSAPI 12 globalPrivilegesEnabled JSBool (*)(JSContext *, JSPrincipals *) Flag indicating whether principals are enabled globally. ...
...d. ...
SpiderMonkey 1.8
You can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz (MD5 checksum: eaad8815dcc66a717ddb87e9724d964e). SpiderMonkey 1.8 is the JavaScript engine that shipped in Firefox 3.0. It is much faster than SpiderMonkey 1.7 and contains a few new language features and API features, described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or, file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. --9 March 2009 Known issues SpiderMonkey 1.8 has one known significant regression from 1.7. ...
...s and friends, bug 451729). js.mak, an old Windows-specific nmake file, has been deleted. It hasn't worked for a long time. It is fairly easy to create a Microsoft Visual Studio project file for SpiderMonkey 1.8 from scratch. (If you would like to contribute and maintain a project file, please feel free to contact the SpiderMonkey team via email, bugzilla, or IRC.) Alternatively, you can install MozillaBuild and run the command make -f Makefile.ref in the js/src directory. SpiderMonkey 1.8 does not include the new TraceMonkey JIT or the configure-based build system, both of which are (a) pretty darn awesome and (b) coming in SpiderMonkey 1.8.1. On to the fun stuff. New JavaScript language features JavaScript 1.8 adds Array.reduce() and reduceRight(), expression closures, and generator expre...
SpiderMonkey 52
You can download full source code from treeherder, by going to the mozilla-esr52 repository and clicking on the first SM(pkg) link you see. That will open a small window in the bottom left with a line like "artifact uploaded:mozjs-52.x.y.tar.bz2". SpiderMonkey 52 is the JavaScript engine that shipped in Firefox 52. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. ...
... will open a small window in the bottom left with a line like "artifact uploaded:mozjs-52.x.y.tar.bz2". SpiderMonkey 52 is the JavaScript engine that shipped in Firefox 52. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below. Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. You may wish to make the bugs block bug 837921 (aliased as "sm.embedding"). Platform support Migrating to SpiderMonkey 52 New JavaScript language features New C++ APIs Deleted APIs API Changes Known Issues ...
Running Automated JavaScript Tests
Most of the Spidermonkey shell jobs, labeled SM(...), will include JS shell runs of both jstests and jit-tests. Running jit-tests The jit-test suite uses a Python harness that is similar to the jstests shell harness, but with some minor differences. Basic usage is the same: jit_test.py PATH_TO_JS_SHELL D...
...es a list of tests that failed to the given filename. The next time it is run, it will run only the tests in the given filename, and then will write the list of tests that failed when it is done. Thus, you can keep retesting as you fix bugs and only the tests that failed the last time will run, speeding things up a bit. Running jit-tests on Treeherder When viewing Treeherder after a push to the Mozilla repositories, jit-tests are run by calling make check, and appear under B. Creating new tests for jit-tests Creating new tests for jit-tests is easy. Just add a new JS file to the tests/basic directory (or any appropriate directory under 'tests'). The test harness will automatically find the test and run it. The test is considered to pass if the exit code of the JS shell is zero (i.e., JS didn'...
Zest
The language is written in JSON, but we do not expect people to write Zest in this format - it is designed to be a visual language. The core language does not define any graphical representation - that is expected to be defined by the tools that integrate Zest. It is completely free, open source and can be included in any tool whether open or closed, free or commercial. ...
...p integration with security tools Runtimes The runtime environments that support Zest Tools The tools that include support Zest Implementation The state of Zest development Videos Simon demoed Zest at AppSec USA in November 2013, and the full video of my talk is available on YouTube. The Zest part of the talk starts at 23:47. More details https://github.com/mozilla/zest - the code on github http://groups.google.com/group/mozilla-zest - the group used for discussing Zest ...
Mozinfo
The current implementation exposes relevant key, values: os, version, bits, and processor. ...
... reader to wonder....is this specific check necessary for (e.g.) an operating system? Because information is not consolidated, checks are not done consistently, nor is it defined what we are checking for. Mozinfo proposes to solve this problem. MozInfo is a bridge interface, making the underlying (complex) plethora of OS and architecture combinations conform to a subset of values of relevance to Mozilla software. The current implementation exposes relevant key, values: os, version, bits, and processor. Additionally, the service pack in use is available on the windows platform. API Usage MozInfo is a python package. Downloading the software and running python setup.py develop will allow you to do import mozinfo from python. mozinfo.py is the only file contained is this package, so if you need ...
The Rust programming language
It prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax. In addition, Rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient C bindings, with a minimum runtime size. To learn more about Rust, you can: Watch the videos below for a closer look at the power and benefits Rust provides. ...
... book The Rust Programming Language online. Download the Rust compiler, check out examples, and learn everything you could possibly wish to know at the Rust official web site. Rust and the future of systems programming Unlocking the power of parallelism with Rust Rust for web developers Safe systems programming with Rust Growing the Rust community Putting Rust into production at Mozilla ...
Browser security
sign recommendations and testing guidelines. A Web PKI x509 certificate primerX.509 (in this document referred as x509) is an ITU standard to describe certificates. This article provides an overview of what these are and how they work.Exploitable crashesThis article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.Handling Mozilla Security BugsThis document describes how the new security organizational structure will work, and how security-related Mozilla bug reports will be handled.Pinning violation reportsIf a site makes use of key pinning, and your browser sees a certificate chain for that site which does not match the pin, Firefox will reject the connection and display an error page. Secure Development GuidelinesTh...
... ...
Feed content access API
quite easy to read and parse a feed. Use an XMLHttpRequest to load the feed, then pass its string to an nsIFeedProcessor to parse the feed. ...
...) { var httpRequest = null; function infoReceived() { var data = httpRequest.responseText; var ioService = Components.classes['@mozilla.org/network/io-service;1'] .getService(Components.interfaces.nsIIOService); var uri = ioService.newURI(feedUrl, null, null); if (data.length) { var parser = Components.classes["@mozilla.org/feed-processor;1"] .createInstance(Components.interfaces.nsIFeedProcessor); var listener = new FeedTestResultListener(); try { parser.listener = listener; parser.parseFromString(data, uri); } catch(e) { alert("Error parsing feed."); } } } httpRequest = new XMLHttpReques...
Using the Places livemark service
livemark service, offered by the nsILivemarkService interface, is used to create, edit, and reload livemarks. You can also use it to check whether an item is a livemark. Livemarks are bookmark folders that contain the most recent items from an RSS feed. Initiating the livemark service Before using the livemark service, you need to obtain an instance: var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"] .getService(Components.interfaces.nsILivemarkService); Creating a new livemark The nsILivemarkService.createLivemark() method creates a new livemark. var newLvmkId = livemarkService.createLivemark(parentFolderId, "Livemark name", uri("http://example.com/"), ...
... in the index to insert at, or -1 to append the new livemark to the end of the folder. You can convert a string into an nsIURI using nsIIOService. When creating livemarks during startup, you should use the nsILivemarkService.createLivemarkFolderOnly() to avoid HTTP traffic. This creates the encapsulating livemark without actually fetching the RSS feed's contents. var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]. getService(Components.interfaces.nsINavBookmarksService); var root = bmsvc.bookmarksMenuFolder; // Item ID of the Bookmarks Menu var newLvmkId = livemarkService.createLivemarkFolderOnly(bmsvc, root, "Livemark name", uri("http://example.com/"), ...
The Publicity Stream API
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. Accessing the API The publicity API can be enabled by including a javascript library. This library will detect whether native API support is enabled by the user's browser, if not it will shim in a pure HTML implementation. ...
...which their friends are using. It is not meant as a general application messaging system. Accessing the API The publicity API can be enabled by including a javascript library. This library will detect whether native API support is enabled by the user's browser, if not it will shim in a pure HTML implementation. [is this still doable?] The javascript library should be included from: https://myapps.mozillalabs.com/jsapi/publicity.js All APIs related to open web applications are accessed under the navigator.apps object. Publicity Stream API (navigator.apps.publicity.*) The publicity API is exposed as properties on the navigator.apps.publicity object. publicizeActivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): Applications should call this method when an user-in...
Components.utils.Sandbox
The security principal defined for a sandbox determines what code running in that sandbox will be allowed to do. The principal may be one of four types: the system principal, a content principal, an expanded principal, or a null principal. See Security checks for more information on security principals. ...
...M window, or a URI. So this can be simply an array with a single element. For example the content principal above can be made expanded/extended like so: var principal = [gBrowser.selectedTab.linkedBrowser.contentPrincipal]; // this is now an expanded (aka extended) principal var sandbox = Components.utils.Sandbox(principal); Null principal You can create a null principal using code like: Cc["@mozilla.org/nullprincipal;1"].createInstance(Ci.nsIPrincipal); From Firefox 37 onwards, you can also specify the null principal by simply passing null as the principal argument. options The constructor accepts an optional parameter. This parameter is an object with the following optional properties: freshZone If true creates a new GC region separate from both the calling context's and the sandbox...
JavaXPCOM
oved 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 Embedding forums... Mailing list Newsgroup RSS feed ...
...unner ships with the JavaXPCOM component, which allows Java code to interact with XPCOM objects. ...
PyXPCOM
en 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 Building PyXPCOM Th...
...een XPCOM and Python. This article gives you a head start to PyXPCOM. NOTE: The links to Part II and III of this series are broken and I cannot find them on the IBM site. Please update this page if/when the links can be found. History PyXPCOM was initially developed by ActiveState Tool Corporation, and came out of their Komodo project. Current releases are now integrated with the Mozilla build system. Other Resources PythonExt - extension that provides PyXPCOM Samples - demo applications using PyXPCOM Community Python-XPCOM bindings mailing list (ActiveState) #pyxpcom on irc.mozilla.org Source Code The PyXPCOM code is available here: http://hg.mozilla.org/pyxpcom/ To build PyXPCOM, see Building PyXPCOM. ...
nsIRegistry
rs.openWellKnownRegistry(2); // 2 signifies the ApplicationRegistry, if I understand right var st = rs.enumerateAllSubtrees(2); // 2 signifies "common", see libreg source (reg.h) for info Now you have an nsIEnumerator that can report the subtrees. ...
...with the rest of the nsIRegistry API (see MXR). Now, I know from visual inspection that there's a key called "directory" for each profile. I don't know how to get the other keys' names automatically, but I do know how to look up the directory for a particular profile. js> rs.getStringUTF8(530, "directory") // 530: key corresponding with Profiles/default The output is something like: /home/lion/.mozilla/default/awp83kud.slt Boo-yah! Can we change it? js> rs.setStringUTF8(530, "directory", "/home/lion/somewhere/else") js> rs.getStringUTF8(530, "directory") /home/lion/somewhere/else Yes! Now, the only puzzle is: how do you save it? js> rs.flush() // this is not enough... Perhaps if we quit with the XPConnect:appShellService, it will work. ...
Observer Notifications
cument-global-created nsIDOMWindow origin Sent immediately after a web content document window has been set up, but before any script code has been executed. This lets extensions inject API into content windows as needed (see nsIDOMGlobalPropertyInitializer for an alternative method of doing this). data is a string form of the origin (for use in security checks), eg "http://developer.mozilla.org". document-element-inserted Document null Sent immediately after the root element of a document has been created, but before executing any script on it. user-interaction-active nsIDOMWindow null Sent once every 5000ms while this chrome document sees some kind of user activity (for example, keyboard or mouse events), and at the exact moment of the state...
...n has been disabled. em-action-requested item-cancel-action A previous action has been cancelled. Idle Service This topic indicates when actions related to the Idle Service, provided by the nsIIdleService interface. Unlike the user-interaction-active and user-interaction-inactive topics listed above, the Idle Service monitors user activity in general, whether related to the Mozilla application or not (acting somewhat like the user activity/inactivity events a screen saver would be interested in). Topic Data Description idle The length of time the user has been idle, in milliseconds. Sent when the user becomes idle. idle-daily The length of time the user has been idle, in milliseconds. Sent once a day while the user is idle. ...
nsDirectoryService
<< XPCOM API Reference Summary The XPCOM Directory Service. This service returns the locations of "well known" directories in an OS-independent manner. For instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on. Class ID f00152d0-b40b-11d3-8c9c-000064657374 ContractID @mozilla.org/file/directory_service;1 Supported Interfaces nsIProperties nsIDirectoryService Remarks This component is a singleton and should therefore be accessed via the XPCOM Service Manager. Example Code #include "nsXPCOM.h" #include "nsCOMPtr.h" #include "nsDirectoryServiceDefs.h" #include "nsIServiceManager.h" #include "nsIProperties.h" /** * Get the location of the system's "temp" directory. */ nsresult GetTempDir(ns...
...ryServiceDefs.h" #include "nsIServiceManager.h" #include "nsIProperties.h" /** * Get the location of the system's "temp" directory. ...
nsScriptableInputStream
<< XPCOM API Reference Summary A component implementing nsIScriptableInputStream. Class ID 7225c040-a9bf-11d3-a197-0050041caf44 ContractID @mozilla.org/scriptableinputstream;1 Supported Interfaces nsIScriptableInputStream, nsIInputStream Remarks This component should be accessed via the XPCOM Component Manager. ...
...225c040-a9bf-11d3-a197-0050041caf44 ContractID @mozilla.org/scriptableinputstream;1 Supported Interfaces nsIScriptableInputStream, nsIInputStream Remarks This component should be accessed via the XPCOM Component Manager. Example Code const nsIScriptableInputStream = Components.interfaces.nsIScriptableInputStream; function consumeStream(inputStream) { var factory = Components.classes["@mozilla.org/scriptableinputstream;1"]; var sis = factory.createInstance(nsIScriptableInputStream); sis.init(inputStream); try { while (true) { var chunk = sis.read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the stream's data. // Do something with it! } } catch (e) { dump("Error: failed reading from stream:\n"...
nsresult
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. ...
...sresult was not strongly typed. ...
imgILoader
modules/libpr0n/public/imgILoader.idlScriptable Please add a summary to this article. ...
... modules/libpr0n/public/imgILoader.idlScriptable Please add a summary to this article. ...
inIDOMUtils
layout/inspector/inIDOMUtils.idlScriptable DOM utility functions. ...
... layout/inspector/inIDOMUtils.idlScriptable DOM utility functions. ...
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. ...
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. ...
... 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. ...
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. ...
...to 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
rn the result of isThirdPartyWindow() with arguments of the channel's bottommost window and the channel URI, respectively. Therefore, both the channel's URI and each level in the window hierarchy associated with the channel is tested. For example, if aURI is "http://mail.google.com/", aChannel has a URI of "http://google.com/", and its parent is the topmost content window with a URI of "http://mozilla.com", the result will be true. boolean isThirdPartyChannel( in nsIChannel aChannel, in nsIURI aURI Optional ); Parameters aChannel The channel associated with the load. aURI Optional A URI to test against. If null, the URI of the channel will be used. Return value true if aURI is third party with respect to the channel URI or any of the URIs associated with the same-type window hierarchy o...
...ttom URI. If so, return. Therefore, each level in the window hierarchy is tested. (This means that nested iframes with different base domains, even though the bottommost and topmost URIs might be equal, will be considered third party.) For example, if aURI is "http://mail.google.com/", 'aWindow' has a URI of "http://google.com/", and its parent is the topmost content window with a URI of "http://mozilla.com", the result will be true. boolean isThirdPartyWindow( in nsIDOMWindow aWindow, in nsIURI aURI Optional ); Parameters aWindow The bottommost window in the hierarchy. aURI Optional A URI to test against. If null, the URI of the principal associated with aWindow will be used. Return value true if aURI is third party with respect to any of the URIs associated with aWindow and its same-typ...
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. ...
... 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. ...
nsIAuthPrompt2
face allowing to prompt for a username and password. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is usually acquired using getInterface on notification callbacks or similar. It can be used to prompt users for authentication information, either synchronously or asynchronously. ...
...erits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is usually acquired using getInterface on notification callbacks or similar. 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. ...
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. ...
...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. ...
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. ...
... chrome/public/nsIChromeRegistry.idlScriptable Provides access to the chrome registry; you can use this to get information about chrome documents that have been registered. ...
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. ...
... 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. ...
nsIContentPrefService
ontentPrefService2 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. ...
...bsites. 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. ...
nsIControllers
Controller elements. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is used to manage instances of the nsIController interface. 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. ...
... 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. You should not normally need to create an instance, as you normally need to alter the window or element's existing list of controllers. ...
nsIConverterInputStream
pcom/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. ...
...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); Constants Constant Value Description DEFAULT_REPLACEMENT_CHARACTER 0xFFFD Default replacement character value. Methods init() Initi...
nsICryptoHMAC
m, 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 constant. Constant Value Description MD2 1 Message Digest Algorithm 2 MD5 2 Message-Digest algorithm 5 SHA1 3 Secure Hash Algorithm 1 SHA256 4 Secure Hash Algorithm 256 SHA384 5 Secure Hash Algorithm 384 SHA512 6 Secure Hash Al...
... This method must be called before any other method on this interface is called. void init( in unsigned long aAlgorithm, in nsIKeyObject aKeyObject ); Parameters aAlgorithm The algorithm type to be used. This value must be one of the above valid algorithm types. aKeyObject Object holding a key. To create the key object use for instance: var keyObject = Components.classes["@mozilla.org/security/keyobjectfactory;1"] .getService(Components.interfaces.nsIKeyObjectFactory) .keyFromString(Components.interfaces.nsIKeyObject.HMAC, rawKeyData); Exceptions thrown NS_ERROR_INVALID_ARG If an unsupported algorithm type is passed. reset() Reinitialize HMAC context to be reused with the same settings (the key and hash algorithm) but on differ...
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. ...
... 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. ...
nsIDOMMozNetworkStats
Read only. ...
...Read only. ...
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. ...
...iptable 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. ...
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. ...
... 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. ...
nsIDirectoryServiceProvider
the provider and use the cache. false if the provider will be asked for this prop each time it is requested. Return value The nsIFile represented by the property. Example This code creates a global, read-only string called currDir with the value of the current working directory. __defineGetter__("currDir", function getCurrDir() { return Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIDirectoryServiceProvider) .getFile("CurWorkD",{}).path; }); Test it with to see the magic happen. alert(currDir); See also nsDirectoryService nsIDirectoryService Additionally, see section 16.5.2 of the Rapid Application Development w...
... ...
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. ...
...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 is used to translate the text from its original format into Unicode. This attribute lets you: See what converter was used when retrieving the document's data. Override that character set for documents for which the specified fallback or auto-detected character set is incorrect. Reading this value re...
nsIDocumentLoader
der/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. ...
...t 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. ...
nsIDownloadManager
ents/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. ...
...ons 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. ...
nsIDragService
eption is getCurrentSession(), since there's currently no way to check for a drag in progress using standard DOM methods or properties. ...
...e 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 ); Parameters aEventMessage One of the event messages between eDragDropEventFirst and eDragDropEventLast defined in widget/EventMessageList.h getCurrentSession() Returns the current nsIDragSession. nsIDragSession getCurrentSession(); Parameters None. Return value The current drag session, or null if no drag is in progress. invokeDragSession() Starts a ...
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. ...
... 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. ...
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. ...
...xthandler/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. ...
nsIExternalProtocolService
human-readable description for the application responsible for handling a specific protocol. AString getApplicationDescription( in AUTF8String aScheme ); Parameters aScheme The scheme to look up. For example, "mms". Return value This code makes little sense and needs to be cleaned up. ...
...o look up. For example, "mms". Return value This code makes little sense and needs to be cleaned up. ...
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. ...
...le 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. ...
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. ...
nsIGSettingsService
xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
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
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. ...
...serve HTTP transport activity. This is primarily useful for debuggers and other traffic monitoring tasks. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsIHttpActivityObserver Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Implemented by: mozilla.org/network/http-activity-distributor;1 as a service: var httpActivityDistributor = Components.classes["@mozilla.org/network/http-activity-distributor;1"] .getService(Components.interfaces.nsIHttpActivityDistributor); Method overview void addObserver(in nsIHttpActivityObserver aObserver); void removeObserver(in nsIHttpActivityObserver aObserver); Methods addObserver() Begins delivery of notifications of HTTP transport activity. void addObserver( in nsIHttpActivityObs...
nsIIDNService
netwerk/dns/nsIIDNService.idlScriptable This interface provides support for Internationalized Domain Names, including methods for manipulating IDN hostnames according to IETF specification. ...
... netwerk/dns/nsIIDNService.idlScriptable This interface provides support for Internationalized Domain Names, including methods for manipulating IDN hostnames according to IETF specification. ...
nsIINIParserFactory
INIParser( in nsILocalFile aINIFile ); Parameters aINIFile The INI file to parse. Return value The nsIINIParser object you can use to parse the INI file. ...
...n nsIINIParser instance for an INI file, you may use the following code: // create an nsILocalFile var cl = "@mozilla.org/file/local;1"; var interf = Components.interfaces.nsILocalFile; var file = Components.classes[cl].createInstance(interf); // init the file with the path to your ini file var path = "c:\\temp\\example.ini"; file.initWithPath(path); // create the nsIINIParserFactory var cl = "@mozilla.org/xpcom/ini-parser-factory;1"; var interf = Components.interfaces.nsIINIParserFactory; var iniFact = Components.manager.getClassObjectByContractID(cl,interf); // get the INIParser for the ini file var iniParser = iniFact.createINIParser(file); See also nsIINIParser nsILocalFile ...
nsIIOService
iate 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. ...
...cko 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. ...
nsIJSON
decode JSON strings from JavaScript code. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Note: This interface may only be used from JavaScript code, with the exception of the legacyDecodeToJSVal() method. However, you should use native JSON instead if at all possible. ...
... Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Note: This interface may only be used from JavaScript code, with the exception of the legacyDecodeToJSVal() method. However, you should use native JSON instead if at all possible. Implemented by: @mozilla.org/dom/json;1. To create an instance, use: var nativeJSON = Components.classes["@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. JSObject decode(in AString str); Obsolete since Gecko 7.0 ...
nsILivemarkService
ublic/nsILivemarkService.idlScriptable This interface is used to create and reload livemarks. You can also use this check whether something is a livemark or not. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 22.0 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) This interface is obsolete. ...
...se this check whether something is a livemark or not. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 22.0 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) This interface is obsolete. 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. ...
... 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. ...
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. ...
... 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. ...
Using nsILoginManager
o securely store passwords to external sites, web applications, and so on. To do so securely, they can use nsILoginManager, which provides for secure storage of sensitive password information and nsILoginInfo, which provides a way of storing login information. Getting nsILoginManager To get a component implementing nsILoginManager, use the following: var passwordManager = Components.classes["@mozilla.org/login-manager;1"].getService( Components.interfaces.nsILoginManager ); Most Login Manager functions take an nsILoginInfo object as a parameter. An nsILoginInfo object contains the following attributes: hostname, form submit URL, HTTP realm, username, username field, password, and password field. The hostname, username and password attributes are mandatory, while the other fields are set ba...
...lm, username, username field, password, and password field. The hostname, username and password attributes are mandatory, while the other fields are set based on whether the login is for a web page form or an HTTP/FTP authentication site login. See the nsILoginInfo attribute definitions for more details. ...
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. ...
... 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. ...
nsILoginManagerStorage
re no logins in the login store, it must be an empty array, not null. getLoginSavingEnabled() Implement to report whether or not login saving has been disabled for a specific host. boolean getLoginSavingEnabled( in AString aHost ); Parameters aHost The hostname whose login saving status should be returned. This string will be in the origin URL format, without a pathname. For example, "http://mozilla.com". Return value Return true if login saving is enabled for the specified host; otherwise, return false. init() Implement this method to initialize the component. This is not called automatically; you must call it yourself if needed. void init(); Parameters None. initWithFile() Implement this method to initialize the component, overriding the default filename locations with those specified. T...
...ed for a host, the Login Manager will not propt the user for permission to store logins for that host. Existing logins for the host should not be affected when setting this. void setLoginSavingEnabled( in AString aHost, in boolean isEnabled ); Parameters aHost The host for which to enable or disable login saving. The argument is in origin URL format, without a pathname (for example: "http://mozilla.com"). isEnabled true if logins should be enabled for the host, or false if they should be disabled. Remarks For methods returning count, JavaScript callers can simply use the length property on the returned array to find out how many logins were returned in the array, for example: var logins = pwmgr.searchLogins({}, matchData); var numLogins = logins.length; See also Creating a Login Manager s...
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 the ...
...data-stream. May not be called once the stream has been started to be read. The cursor of the new stream should be located at the beginning of the stream if the implementation of the nsIMIMEInputStream also is used as an nsISeekableStream. ...
nsIMarkupDocumentViewer
e 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's bidi support 1 - Use Mozilla's bidi support 2 - Use the platform bidi support 3 - Disable bidi support. bidiTextDirection octet Options for Bidi presentation. Use these attributes to access the individual Bidi options. The default direction for the layout of bidirectional text. 1 - left to right 2 - right to left. bidiTextType octet The ordering of bid...
...terSet 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 ); Parameters node The nsIDOMNode of the node to make visible. sizeToC...
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. ...
...es 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. ...
nsIMicrosummaryService
vice.idlScriptable This interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
...the bookmarks they apply to. ...
nsIMsgIncomingServer
l is not removable, but an imported folder is. canEmptyTrashOnExit boolean Read only. canFileMessagesOnServer boolean canHaveFilters boolean Read only. canSearchMessages boolean Read only. canUndoDeleteOnServer boolean Read only. constructedPrettyName AString helper function to construct the pretty name in a server type specific way - for example, mail for foo@test.com, news on news.mozilla.org. Read only. defaultCopiesAndFoldersPrefsToServer boolean If the server supports Fcc/Sent/etc, default prefs can point to the server. Otherwise, copies and folders prefs should point to Local Folders. By default this value is set to true via global pref 'allows_specialfolders_usage' (mailnews.js). For Nntp, the value is overridden to be false. If ISPs want to modify this value, they should ...
...f the server supports Fcc/Sent/etc, default prefs can point to the server. Otherwise, copies and folders prefs should point to Local Folders. By default this value is set to true via global pref 'allows_specialfolders_usage' (mailnews.js). For Nntp, the value is overridden to be false. If ISPs want to modify this value, they should do that in their rdf file by using this attribute. Please look at mozilla/mailnews/base/ispdata/aol.rdf for usage example. displayStartupPage boolean doBiff boolean downloadMessagesAtStartup boolean Read only. downloadOnBiff boolean downloadSettings nsIMsgDownloadSettings emptyTrashOnExit boolean filterScope nsMsgSearchScopeValue Read only. hostName ACString hostname of the server. incomingDuplicateAction long isDeferredTo boolean Read on...
nsIMsgSendLater
The nsIMsgSendLater interface provides functions for managing the unsent folder of a messaging account. Inherits from: nsIStreamListener Implemented by: @mozilla.org/messengercompose/sendlater;1. ...
... The nsIMsgSendLater interface provides functions for managing the unsent folder of a messaging account. Inherits from: nsIStreamListener Implemented by: @mozilla.org/messengercompose/sendlater;1. ...
nsINavBookmarkObserver
parent, in PRInt32 index ); Parameters parent The id of the separator's parent. index The separator's old index in its parent. ...
...temRemoved() in Gecko 1.9.1 If you wish to support onBeforeItemRemoved() in applications based on Gecko 1.9.1, you must implement your observer's QueryInterface() method to match on both nsINavBookmarkObserver and nsINavBookmarkObserver_MOZILLA_1_9_1_ADDITIONS, as shown below. ...
nsINavHistoryObserver
i belongs to them. If no such query exists, the history result creates a new query node dynamically. It is used in places views only and can be ignored. ...
...nBeforeDeleteURI() in Gecko 1.9.1 If you wish to support onBeforeDeleteURI() in applications based on Gecko 1.9.1, you must implement your observer's QueryInterface() method to match on both nsINavHistoryObserver and nsINavHistoryObserver_MOZILLA_1_9_1_ADDITIONS, as shown below. ...
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". ...
...Service.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". ...
nsIObserver
otifications for a list of built-in topics possible. Observing preferences works slightly differently. See Code snippets:Preferences - Using preference observers for an example. function myObserver() { this.register(); } myObserver.prototype = { observe: function(subject, topic, data) { // Do your stuff here. ...
... observe: function(subject, topic, data) { // Do your stuff here. }, register: function() { var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.addObserver(this, "myTopicID", false); }, unregister: function() { var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.removeObserver(this, "myTopicID"); } } Instantiation - this should be fired once you're ready to start observing (for example a window's load event). observer = new myObserver(); Destruction - this should be fired once you're done observing (for example a window's...
nsIParentalControlsService
g 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. ...
...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. ...
nsIParserUtils
dlScriptable 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. ...
... 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. ...
nsIPasswordManager
netwerk/base/public/nsIPasswordManager.idlScriptable Used to interface with the built-in Password Manager 66 Introduced Gecko 1.0 Deprecated Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.0 See Using nsIPasswordManager for examples. Implemented by: @mozilla.org/passwordmanager;1. ...
... netwerk/base/public/nsIPasswordManager.idlScriptable Used to interface with the built-in Password Manager 66 Introduced Gecko 1.0 Deprecated Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.0 See Using nsIPasswordManager for examples. Implemented by: @mozilla.org/passwordmanager;1. ...
nsIPlacesImportExportService
Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) In the past, this interface also offered methods for importing Places data, but those methods are now part of the BookmarkHTMLUtils.jsm JavaScript code module. The interface name has been kept for compatibility reasons for code using the export service. ...
...4.0 / SeaMonkey 2.11) In the past, this interface also offered methods for importing Places data, but those methods are now part of the BookmarkHTMLUtils.jsm JavaScript code module. The interface name has been kept for compatibility reasons for code using the export service. ...
nsIProcess2
This interface represents an executable process. This expands upon the nsIProcess interface. 1.0 66 Introduced Gecko 1.9.1 Obsolete Gecko 1.9.2 Inherits from: nsIProcess Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note This interface was removed in Gecko 1.9.2 and its method added to nsIProcess. ...
.... 1.0 66 Introduced Gecko 1.9.1 Obsolete Gecko 1.9.2 Inherits from: nsIProcess Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note This interface was removed in Gecko 1.9.2 and its method added to nsIProcess. Implemented by: @mozilla.org/process/util;1. ...
nsIPropertyBag
name The name to return the matching property. Return value The property matching the given name. Exceptions thrown NS_ERROR_FAILURE If a property with that name doesn't exist. Examples Get User Agent Information (Operating System Specifics. The window scope is not always accessible so the window.navigator cannot be accessed. ...
...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.getPro...
nsIProtocolHandler
is attribute is -1. Read only. protocolFlags unsigned long Protocol-specific flags. Read only. Note: Starting with Firefox 3, one of URI_LOADABLE_BY_ANYONE, URI_DANGEROUS_TO_LOAD, URI_IS_UI_RESOURCE, or URI_IS_LOCAL_FILE must be set on every protocol handler. Current versions of Firefox assume that the URI has URI_LOADABLE_BY_ANYONE set, but this will not work starting with the Mozilla 2 platform. scheme ACString The scheme for this protocol ("file", "http", and so forth). Read only. Constants Constant Value Description URI_STD 0 A standard full URI with authority component and understanding relative URIs; this includes http and ftp, for example. URI_NORELATIVE 1<<0 The protocol doesn't support relative URI...
...o character transformation is not performed. aBaseURI If null, aSpec must specify an absolute URI. ...
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. ...
... 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. ...
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. ...
... 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. ...
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. ...
...ach 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. ...
nsISHistory
4 / Thunderbird 3.3 / SeaMonkey 2.1) In an embedded browser environment, the nsIWebBrowser object creates an instance of session history for each open window. 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. ...
...ect creates an instance of session history for each open window. 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. Implemented by: @mozilla.org/browser/shistory;1. ...
nsIScriptableInputStream
I and read file contents. Remember: The nsIScriptableInputStream has a contract where `init` should only be called once, and should always be closed. Excerpt of the stream for this stream article is here, this is only an excerpt so cannot copy paste this code into scratchpad. ...
...tream(name)); try { // Use readBytes to get binary data, read to read a (null-terminated) string let contents = stream.readBytes(entry.realSize); } finally { stream.close(); } Example usage in onDataAvailable Remember: The nsIScriptableInputStream has a contract where `init` should only be called once, and should always be closed. ...
nsIScriptableUnescapeHTML
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. ...
...ed 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. ...
nsIScriptableUnicodeConverter
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. ...
...onents.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. ...
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. ...
... 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. ...
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. ...
.../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. ...
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. ...
...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. ...
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. ...
... 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. ...
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. ...
...ocketProvider.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. ...
nsISound
rovides a way to play sounds. Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Warning: This interface should not be used to play custom sounds in modern code. 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. ...
...9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Warning: This interface should not be used to play custom sounds in modern code. 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. ...
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. ...
...he 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 Control whether or not this URL can be modified. Protocol handlers can set this flag be...
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. ...
... 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. ...
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. ...
...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. ...
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. ...
....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. ...
nsITelemetry
toolkit/components/telemetry/nsITelemetry.idlScriptable A service to gather performance data that can be tracked over time to allow generating histograms. ...
...ents/telemetry/nsITelemetry.idlScriptable A service to gather performance data that can be tracked over time to allow generating histograms. ...
nsIURIFixup
docshell/base/nsIURIFixup.idlScriptable Interface implemented by objects capable of fixing up strings into URIs. ...
... docshell/base/nsIURIFixup.idlScriptable Interface implemented by objects capable of fixing up strings into URIs. ...
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 gene...
...lace it in the provided nsID pointer instead of allocating a new nsID. void generateUUIDInPlace( in nsNonConstIDPtr id ); Parameters id An existing nsID pointer where the UUID will be stored. ...
nsIVersionComparator
ty". Numbers are base-10, and are zero if left out. Strings are compared bytewise. For additional backwards compatibility, if "string-b" is "+" then "number-a" is incremented by 1 and "string-b" becomes "pre". ...
...b" becomes "pre". 1.0pre1 < 1.0pre2 < 1.0 == 1.0.0 == 1.0.0.0 < 1.1pre == 1.1pre0 == 1.0+ < 1.1pre1a < 1.1pre1 < 1.1pre10a < 1.1pre10 Implemented by: @mozilla.org/xpcom/version-comparator;1. The service can be accessed directly via Services.vc after loading Services.jsm or with the following code: var versionComparator = Components.classes["@mozilla.org/xpcom/version-comparator;1"] .getService(Components.interfaces.nsIVersionComparator); Method overview long compare(in ACString A, in ACString B); Methods compare() Compare two version strings. long compare( in ACString A, in ACString B ); Parameters A The first version. B The second version. Return value If A and B are t...
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. ...
... 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. ...
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. browserTabsRemoteAutostart...
...ITTEST 3 IPDL unit testing subprocess. Methods invalidateCachesOnRestart() Signal the apprunner to invalidate caches on the next restart. This will cause components to be auto registered and all fast load data to be re-created. void invalidateCachesOnRestart(); Parameters None. Example Display the user's operating system in an alert box: var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime); alert(xulRuntime.OS); See also nsIXULAppInfo - a related interface providing information about the host application, it's also implemented by xre/app-info. ...
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. ...
... 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. ...
XPCOM Interface Reference
This is a reference to the XPCOM interfaces provided by the Mozilla platform. Component; nsIPrefBranchExtensionManager (Toolkit)IAccessible2IAccessibleActionIAccessibleApplicationIAccessibleComponentIAccessibleEditableTextIAccessibleHyperlinkIAccessibleHypertextIAccessibleImageIAccessibleRelationIAccessibleTableIAccessibleTable2IAccessibleTableCellIAccessibleTextIAccessibleValueIDispatchIJSDebuggeramIInstallCallbackamIInstallTriggeramIWebInstallInfoamIWebInstallListeneramIWebInstallPromptamIWebInstallerimgICacheimgIContainerimgIContainerObserverimgIDecoderimgIDecoderObserverimgIEncoderimgILoaderimgIRequestinIDOMUtilsjsdIStackFramemozIAsyncFaviconsmozIAsyncHistorymozIColorAnalyzermozIJSSubScriptLoadermozIPersonalDictionarymozIPlaceInfomozIPlacesAutoCompletemozIRegistrymozIRepresentativeCo...
...IAccessibleRolensIAccessibleScrollTypensIAccessibleSelectablensIAccessibleStateChangeEventnsIAccessibleStatesnsIAccessibleTablensIAccessibleTableCellnsIAccessibleTableChangeEventnsIAccessibleTextnsIAccessibleTextChangeEventnsIAccessibleTreeCachensIAccessibleValuensIAccessibleWin32ObjectnsIAlertsServicensIAnnotationObservernsIAnnotationServicensIAppShellnsIAppShellServicensIAppStartupnsIAppStartup_MOZILLA_2_0nsIApplicationCachensIApplicationCacheChannelnsIApplicationCacheContainernsIApplicationCacheNamespacensIApplicationCacheServicensIApplicationUpdateServicensIArraynsIAsyncInputStreamnsIAsyncOutputStreamnsIAsyncStreamCopiernsIAsyncVerifyRedirectCallbacknsIAuthInformationnsIAuthModulensIAuthPromptnsIAuthPrompt2nsIAuthPromptAdapterFactorynsIAuthPromptCallbacknsIAuthPromptProvidernsIAuthPromptWrapp...
Performance
y use indices and primary keys, which are fast. sqlite> explain query plan select * from moz_historyvisit where session = 12; 0|0|TABLE moz_historyvisit In this example, you can see that it is not using an index, so this query would be slow. You can download the command line tool from the sqlite download page. Be sure you have a version of the command line tool that is at least as recent as what Mozilla uses. As of April 10, 2006, Mozilla uses sqlite 3.3.4, but the latest precompiled version of the command line tools is not available for all platforms. This will lead to errors that say "database is encrypted" because the tool is not able to recognize the file format. You may want to check the SQLITE_VERSION definition in db/sqlite3/src/sqlite3.h for the current version if you are having problems...
...lite3 olddb .dump | sqlite3 newdb; mv newdb olddb. On some networked drives, vacuuming a 10MB database has been timed at over one minute. Therefore, you should avoid vacuuming whenever possible. Some items in databases are privacy sensitive, such as deleted history items. Users have the expectation that deleting items in their history will remove the traces of that from the database. As a result, Mozilla enables the SQLITE_SECURE_DELETE preprocessor flag in db/sqlite3/src/Makefile.in. This flag causes deleted items to be filled with 0s on disk. This eliminates the need to vacuum except to reclaim disk space, and makes many operations much faster. Zero-filling can have significant performance overhead in some situations. For example, the history service used to delete many database items at shutdo...
Storage
me as the DOM:Storage feature which can be used by web pages to store persistent data or the Session store API (an XPCOM storage utility for use by extensions). Getting started This document covers the Storage API and some peculiarities of SQLite. It does not cover SQL or "regular" SQLite. You can find some very useful links in the See also section however. For Storage API help, you can post to mozilla.dev.apps.platform on the news server news.mozilla.org. To report bugs, use Bugzilla. The overall procedure for use is: Get the Storage service - mozIStorageService. Open a connection to the database of your choice - mozIStorageConnection. Create statements to execute on the connection - mozIStorageStatement. Bind parameters to a statement as necessary. Execute the statement. Check for er...
...t. Multiple statements can be executed in a transaction by calling mozIStorageConnection.executeAsync() on the connection and passing in an array of statements. Both of these methods have similar signatures that accept an object as input that receives notifications the execution of the statement(s). A C++ example is omitted here because it would be verbose, but real-world code can be found in the Mozilla source tree (MXR ID Search for mozIStorageStatementCallback). After you create and bind a statement, your JavaScript should look something like this to execute a statement asynchronously: statement.executeAsync({ handleResult: function(aResultSet) { for (let row = aResultSet.getNextRow(); row; row = aResultSet.getNextRow()) { let value = row.getResultByName("colum...
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. 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++ v...
...onent 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 vtable format and calling conventions of the virtual methods may vary from compiler to compiler). The Gecko ABI is therefore compiler sensitive. (<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. (Ports of this guide are welcome.) A "frozen" interface or function is guaranteed to be supported by future versions of same major version of the platform. The SDK contains headers for all of the frozen interfaces and functions, and it also contains headers...
XPCOM ABI
ample: Firefox built with the GNU C++ Compiler 4.0.0 for the Intel Pentium processor would have XPCOM ABI of x86-gcc3 The XPCOM ABI string can be retrieved programmatically by using the nsIXULRuntime interface. To retrieve the ABI of your Firefox or Thunderbird, open the Error Console (accessible through Tools | Error Console) and evaluate the following JavaScript code: Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime) .XPCOMABI If either the CPU architecture or the C++ Compiler are unknown, the application wouldn't have an XPCOM ABI string and attempts to get it will result in error NS_ERROR_NOT_AVAILABLE. It would still be a distinct ABI, but we just wouldn't have a name for it. Note: Platforms This is not an exhausti...
...unknown, the application wouldn't have an XPCOM ABI string and attempts to get it will result in error NS_ERROR_NOT_AVAILABLE. It would still be a distinct ABI, but we just wouldn't have a name for it. Note: Platforms This is not an exhaustive list of possible CPU architectures and compiler ABIs. Newest information can always be found by exploring the build system. Note: TARGET_XPCOM_ABI In the Mozilla build system, the variable storing the XPCOM ABI is named TARGET_XPCOM_ABI. (This is an internals detail and should be of no concern to an extension developer.) Extension Installation When the application (e.g. Firefox) is built, the name of the ABI it supports is embedded into it. Later on, it could use this value to check compatibility with third-party binary XPCOM components. A common point...
XPCOM tasks
e out of date. It was last edited in 2003 and is probably of historical interest only. The Role of XPCOM The XPCOM module roughly parallels the C/C++ standard libraries. It overlaps them significantly, but goes beyond them in capabilities. XPCOM sits above the standard libraries. Its role is to extend them with facilities tailored to XPCOM development in general, and specifically the needs of Mozilla. Like the standard libraries, XPCOM must be a fairly self-contained library, so as not to encumber clients with any unnecessary external dependencies. Changes to the Build Hierarchy There are things in XPCOM that don't belong there. There is likely to be code outside of XPCOM that should be in it. There is code above XPCOM that should be below it. P3 I/O functionality (except for the filespe...
... ...
Test-Info
The test-info task group runs per-commit, only on mozilla-central. Each task generates one or more json-formatted data files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component. Data files are typically consumed by dashboards, like www.arewefissionyet.com. Running test-info locally "test-info" is a mach command and can be run from any source tree. ...
...atted data files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component. Data files are typically consumed by dashboards, like www.arewefissionyet.com. Running test-info locally "test-info" is a mach command and can be run from any source tree. test-info has several sub-commands; the "report" sub-command is used by the test-info tasks mozilla-central$ mach help test-info report To reproduce test-info(all): mozilla-central$ mach test-info report --show-tests --show-summary --show-activedata Running test-info on try To run these tasks on try, use something like: mach try fuzzy -q test-info Contact information test-info is maintained by :gbrown. Bugs should be filed in Testing :: General. ...
The Valgrind Test Job
ks best on Linux. It also works on Mac, though sometimes not as well. Building You need a Valgrind-enabled build of Firefox. Add the following lines to your mozconfig file. ac_add_options --enable-valgrind ac_add_options --disable-jemalloc Running To run the Valgrind test job locally, run the following command. mach valgrind-test See also the general instructions for using Valgrind with Mozilla code. Understanding errors For each problem that Valgrind finds, it emits a message describing the problem, along with a stack trace indicating where the problem occurs. It also prints a suppression, which is a sequence of text that can be put in a suppression file (and specified via Valgrind's --suppressions option) if you want Valgrind to ignore such errors in future runs. For example, we h...
... deliberate but inconsequential memory leaks in the codebase that have corresponding suppressions. But generally errors should be fixed rather than suppressed. When running locally, you may see errors that do not occur on the test machines. Errors in system libraries can generally be ignored, because they are out of our control and the kind of thing we suppress on the test machines. Errors in Mozilla code should probably be reported in bugs! If you need help or experience problems If you need help with the Valgrind test job, please contact Nicholas Nethercote or Gary Kwong. Julian Seward can also help with Valgrind issues. Alternatively, bugs relating to the test job can be filed in the "Testing" product, under the "General" component. Please CC :njn and :gkw on any such bugs. ...
Creating a gloda message query
w 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. Creating your first message query... Import gloda Gloda's API is exposed in the "Gloda" object that is contributed to your namespace. You can find the file, which includes doxygen markup of sorts, here: https://hg.mozilla.org/comm-central/file/tip/mailnews/db/gloda/modules/gloda.js Components.utils.import("resource:///modules/gloda/public.js"); Create the query let query = Gloda.newQuery(Gloda.NOUN_MESSAGE); Add constraints to the query Each constraint function takes one or more arguments which are "OR"ed together. So if we had a "color" constraint such as query.color("red", "green", "blue") would mean any o...
...g): Perform a full-text search against plaintext message bodies. query.attachmentTypes(mimeType1, mimeType2, ...): Constrain to messages with attachments among the given mime types. In theory, providing no arguments should result in finding messages with any attachment, but this is somewhat untested. More constraints can be found in the three js files given further below. From https://developer.mozilla.org/docs/Mozilla/Thunderbird/Thunderbird_extensions/Demo_Addon, Demo3, it seems that the attributeName given in these files is the constraintname to be used (e.g. query.subjectMatches(searchString) for message subject (compare fundattr.js line 145 ). Create a collection from the query Your listener is notified as messages are added to the collection as the database query completes. You may ...
Mail composition back end
by Richard H. ...
...text conversion. CreateAndSendMessage The QuoteMessage method is the primary interface for message quoting. NS_IMETHOD QuoteMessage( const PRUnichar *msgURI, - the URI of the message to be quoted nsIOutputStream *outStream) = 0; - the consumer output stream for the quoted data Sample Programs The mozilla/mailnews/compose/tests/ directory contains sample test programs for all of the above described interfaces. Use at your own risk and beware of bitrot! compose - this program shows the use of the CreateAndSendMessage interface (CreateAndSendMessage) compose2 - this program shows the use of the CreateAndSendMessage interface (SendMessageFile) sendlater - this program shows the use of the nsIMsg...
Adding items to the Folder Pane
this._children = []; for (var i = 1; i <= this._NUMBERS; i++) this._children.push(new numberRow(i)); } return this._children; }, getProperties: function gne_getProps() { // Put your css attributes here }, command: function gne_command() { // Just going to alert, to do something here Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService) .alert(window, null, this.text); } }; Second, our child items (the numbers 1, 2, and 3) are copies of the following prototype: function numberRow(aNumber) { this._number = aNumber; } numberRow.prototype = { get id() { return "numbers-child-ro...
...Thus, our _insert function becomes _insert: function gne__i...
Creating a Custom Column
reside in "threadCols". To attach our column we add another treecol tag ("colReplyTo") with the settings that we would like to use. Don't forget to add in a splitter before the column to ensure that the user can easily resize and drag our column around. ...
... something similar to: gDBView.addColumnHandler("colReplyTo", columnHandler); Setting the Custom Column Handler We've added a special event that gets fired whenever a view is created. When that event fires, you should set up the custom column handler on the new view. ...
FAQ
...
... ...
Filter Incoming Mail
Components.interfaces.nsIMsgDBHdr from where you can modify the mail. By example, to modify the mail subject : var newMailListener = { msgAdded: function(aMsgHdr) { if( !aMsgHdr.isRead ) { // Here we are, a new mail has popped // let get a Javascript string object from the subject property // Querying mime conversion interface var mimeConvert = Components.classes["@mozilla.org/messenger/mimeconverter;1"] .getService(Components.interfaces.nsIMimeConverter); var subject = mimeConvert.decodeMimeHeader(aMsgHdr.subject, null, false, true); // Here with have a string to modify with Javascript. By example, setting it to lower case subject = subject.toLocaleLowerCase(); // Then we rebuild a subject objet by rencoding the string // and...
...Javascript. By example, setting it to lower case subject = subject.toLocaleLowerCase(); // Then we rebuild a subject objet by rencoding the string // and assign it to the message headers and we're done aMsgHdr.subject = mimeConvert.encodeMimePartIIStr_UTF8(subject, false, "UTF-8", 0, 72); } } }; function init() { var notificationService = Components.classes["@mozilla.org/messenger/msgnotificationservice;1"] .getService(Components.interfaces.nsIMsgFolderNotificationService); notificationService.addListener(newMailListener, notificationService.msgAdded); } addEventListener("load", init, true); Have a look to nsIMsgDBHdr to get the full list of properties to be modified. You can take a look at a working code in the CapsKiller add-on repository. ...
Get Thunderbird version
On Thunderbird version 3.0b3pre and later, you can use the following snippet to get the Thunderbird version. ...
...(Version 3.0b3pre was the first build to include STEEL.) var versionChecker = Components.classes["@mozilla.org/xpcom/version-comparator;1"].getService(Components.interfaces.nsIVersionComparator); if (versionChecker.compare(Application.version, "3.0b4") >= 0) // code for >= 3.0b4 else // code for < 3.0b4 For versions prior to 3.0b3pre, you can use something like this: var version; if ( "@mozilla.org/xre/app-info;1" in Components.classes ) version = Components.classes["@mozilla.org/xre/app-info; 1"].getService(Components.interfaces.nsIXULAppInfo).version; else version = Components.classes["@mozilla.org/preferences-service; 1"].getService(Components.interfaces.nsIPrefBranch).getCharPref ("app.version"); var versionChecker = Components.classes["@mozilla.org/xpcom/version- comparator;1"...
Use SQLite
getService(Ci.mozIStorageService); var dbConnection; if (!dbFile.exists()) dbConnection = this._dbCreate(dbService, dbFile); else { dbConnection = dbS...
... { attachments:"id INTEGER PRIMARY KEY, \ name TEXT \ encoded TEXT NOT NULL" } }, dbInit: function() { var dirService = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties); var dbFile = dirService.get("ProfD", Ci.nsIFile); dbFile.append("tbird.sqlite"); var dbService = Cc["@mozilla.org/storage/service;1"]. getService(Ci.mozIStorageService); var dbConnection; if (!dbFile.exists()) dbConnection = this._dbCreate(dbService, dbFile); else { dbConnection = dbService.openDatabase(dbFile); } this.dbConnection = dbConnection; }, _dbCreate: function(aDBService, aDBFile) { var dbConnection = aDBService.openDatabase(aDBFile); this._d...
Thunderbird extensions
count types Useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant API rewrite over the past years making most techniques considerably easier) Thunderbird API docs (mostly a collection of out-of-date pages, relevance is rather dubious) General links Finding the code for a feature Mozillazine articles on Thunderbird Community / Communications Thunderbird specific : Add-ons section on developer.thunderbird.net Thunderbird communication channels Add-on Developers forum/mailing list #maildev IRC channel More general : MozillaZine Extension Development forum General developer channels Related Topics ...
...ity / Communications Thunderbird specific : Add-ons section on developer.thunderbird.net Thunderbird communication channels Add-on Developers forum/mailing list #maildev IRC channel More general : MozillaZine Extension Development forum General developer channels Related Topics XUL, JavaScript, XPCOM, Themes, Developing Mozilla Categori ...
Using MAPI with Thunderbird's Windows 7 developer builds
MAPI (Messaging Application Programming Interface) is a Windows feature that allows applications to send files via a system's default mail application. The Thunderbird installer sets the installed build as the default mapi/mail client. If you want to set a debug build as the default mail client, you need configure it manually: In the objdir/mozilla/dist/bin directory, copy mozMapi32.dll to mozMapi32_InUse.dll and MapiProxy to MapiProxy_InUse.dll. (Be sure to copy - not move - these files.) In the uninstall sub-directory of the bin directory, run these two commands: helper.exe /SetAsDefaultAppGlobal helper.exe /SetAsDefaultAppUser Create an elevated shell and register the MAPI proxy.dll as a COM server. (One way to create an elevated shell is to invoke the command prompt from the S...
...n the uninstall sub-directory of the bin directory, run these two commands: helper.exe /SetAsDefaultAppGlobal helper.exe /SetAsDefaultAppUser Create an elevated shell and register the MAPI proxy.dll as a COM server. (One way to create an elevated shell is to invoke the command prompt from the Start menu, right click, and select Run as Administrator.) In the elevated shell, change to the objdir/mozilla/dist/bin directory and enter this command: regsvr32 MapiProxy_InUse.dll ...
Standard OS Libraries
Gnome and KDE are "Desktop Environments" (known as "DE"s). WMs on Ubuntu work a little differently but we'll revisit this topic later in this article (Did you know they have a *special* Firefox build for Ubuntu?). So DEs are a stack over WMs. There is also a layer known as shell, GnomeShell is the shell used in Gnome 3, it is the outter shell. GTK+ is the framework used under Firefox (and other Mozilla applications like Thunderbird). The other framework used in Unix systems is Qt. Firefox is officially supported only for GTK+ at the moment, therefore GTK+ is required for Firefox to run. Attempting to install Firefox on a a non-GTK+ based Linux build such as KaOSx, which is Qt based (details on KaOSx at the time of this writing: KDELibs version 4.1.4.3, Qt version 4.8.6, 64bit) would install GTK...
...objc - Objective-C js-ctypes snippets that can be copied and pasted to scratchpad Android Android runs on Java and can be used by js-ctypes through the JNI libraries. Thankfully all the js-ctypes was abstracted away into JNI.jsm. Undrestanding js-ctypes is import...
Flash Activation: Browser Comparison - Plugins
evelopers can provide the best user experience. In each browser, the decision to enable Flash is made by users on a per-site basis. When a site attempts to use Flash, the browser will prompt the user in some way and give the user an opportunity to enable Flash for that site. Flash-blocking extensions are no longer necessary because this functionality is now built into the browser. ...
... no Enabling Flash automatically reloads the page no yes yes Other features related to Flash Domain Blocking Plugin Power Saver Peripheral Content Pause Each of the browser vendors has a roadmap about the future of Flash and changes to the user experience. The Firefox Flash roadmap includes links to roadmaps and posts from other vendors. UI Comparison Mozilla Firefox In-page UI is displayed when the site attempts to use Flash. An icon also appears on the left side of the location bar. The user can click on the Flash object or the location bar icon to activate Flash: Users have the choice to allow Flash just for the current session, or to remember their choice: Google Chrome In-page UI is displayed when the site attempts to use Flash without fa...
Plug-in Development Overview - Plugins
ion practices, or install the plug-in to the system standard install locations. Windows Installation Using the Registry On Windows, plug-ins should be installed to a plug-in-specific directory such as C:\Program Files\Plugin Name\nppluginname.dll. ...
...y values should be added to the Windows registry (the plug-in-identifier should follow the specification): HKLM/Software/MozillaPlugins/plugin-identifier Descripton: REG_SZ "Description of the Plugin" Path: REG_SZ "C:\..Path to the plugin.dll" ProductName: REG_SZ "The Plugin Name" Vendor: REG_SZ "The Plugin Author/Vendor" Version: REG_SZ "0.5.whatever plugin version string" HKLM/Software/MozillaPlugins/plugin-identifier/MimeTypes Add a sub-key for each MIME type the plugin supports, with no values Install to Known Locations on Linux and Mac On Linux and Mac, plug-ins are installed to well-known locations: Linux: /usr/lib/mozilla/plugins or /usr/lib64/mozilla/plugins Mac: /Library/Internet Plug-Ins or ~/Library/Internet Plug-Ins ...
DOM Inspector internals - Firefox Developer Tools
le.xul tasksOverlay-sb.xul tasksOverlay-tb.xul tasksOverlay.xul toolboxOverlay.xul utils.js venkmanOverlay.xul ViewerRegistry.js Overlays You will notice that there are a lot of overlays. Some overlays can be described as host-integration overlays, and others as shared structure overlays. Host-integration overlays DOM Inspector is a general-purpose extension, suitable for use with any Mozilla toolkit host application. In order for DOM Inspector to be useful with its host application, though, there should be a way to launch DOM Inspector within it, e.g., by a menu item and an optional keyboard shortcut such as Ctrl+Shift+I (or Cmd+Shift+I). Either the host applications must provide these themselves (usually bundling DOM Inspector with the application, too), or DOM Inspector must explic...
...within it, e.g., by a menu item and an optional keyboard shortcut such as Ctrl+Shift+I (or Cmd+Shift+I). Either the host applications must provide these themselves (usually bundling DOM Inspector with the application, too), or DOM Inspector must explicitly support them by providing its own menu items and keyboard shortcuts with host-integration overlays. DOM Inspector explicitly supports several Mozilla project applications by providing its own host-integration overlays. These overlays are: browserOverlay.xul tasksOverlay-cz.xul tasksOverlay-ff.xul tasksOverlay-mobile.xul tasksOverlay-sb.xul tasksOverlay-tb.xul tasksOverlay.xul venkmanOverlay.xul prefs/prefsOverlay.xul Further examination of the chrome manifest will reveal that DOM Inspector also uses conditional overlays on its pri...
DOM Inspector - Firefox Developer Tools
an add-on for XUL-based applications such as Firefox and Thunderbird. If you are looking for the DOM inspector that's built into Firefox, see the documentation for the Page Inspector. Documentation Introduction to DOM Inspector A guided tutorial that will help you get started with DOM Inspector. DOM Inspector FAQ Answers to common questions on DOM Inspector. DOM Inspector page at MozillaZine More information on the DOM Inspector. How to build the DOM Inspector Blog post on building the DOM Inspector from source. Getting DOM Inspector Firefox & Thunderbird You may download and install the DOM Inspector from the AMO web site. (Thunderbird users browsing AMO in Firefox should save the installation link, or visit the DOM Inspector for Thunderbird page.) Thunderbird 2 DO...
...from the AMO web site. (Thunderbird users browsing AMO in Firefox should save the installation link, or visit the DOM Inspector for Thunderbird page.) Thunderbird 2 DOM Inspector for Thunderbird 2 is available from Thunderbird Add-ons. Or, build Thunderbird yourself with the following options: ac_add_options --enable-extensions="default inspector" ac_add_options --enable-inspector-apis Mozilla Suite and SeaMonkey Select Tools > Web Development > DOM Inspector. You can install the Sidebar panel via Edit > Preferences > Advanced > DOM Inspector, then simply open up the inspector panel and visit a website. Report a bug in DOM Inspector Use the conveniently named "DOM Inspector" component in Bugzilla. To find out who knows DOM Inspector code and where it lives, see the DOM Inspector m...
CanvasPattern.setTransform() - Web APIs
you set it as the current fillStyle and gets drawn onto the canvas when using the fillRect() method, for example. ...
... the canvas: Playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <svg id="svg1" style="display:none"></svg> <div class="playable-buttons"> <input id="edit" type="button" value="Edit" /> <input id="reset" type="button" value="Reset" /> </div> <textarea id="code" class="playable-code" style="height:120px"> var img = new Image(); img.src = 'https://mdn.mozillademos.org/files/222/Canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createPattern(img, 'repeat'); pattern.setTransform(matrix.rotate(-45).scale(1.5)); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 400, 400); };</textarea> var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var textarea = document.getElementById('code'); var reset = docu...
Using images - Web APIs
drawImage(image, x, y, width, height) This adds the width and height parameters, which indicate the size to which to scale the image when drawing it onto the canvas. Exa...
...s://udn.realityripple.com/samples/6e/d8d545e955.jpg"></td> <td><img src="https://udn.realityripple.com/samples/b7/86ecdc3e8d.jpg"></td> </tr> </table> <img id="frame" src="https://udn.realityripple.com/samples/57/952c634159.png" width="132" height="150"> </body> </html> And here's some CSS to make things look nice: body { background: 0 -100px repeat-x url(https://mdn.mozillademos.org/files/5415/bg_gallery.png) #4F191A; margin: 10px; } img { display: none; } table { margin: 0 auto; } td { padding: 15px; } Tying it all together is the JavaScript to draw our framed images: function draw() { // Loop through all images for (var i = 0; i < document.images.length; i++) { // Don't add a canvas for the frame image if (document.images[i].getAttribut...
Document.domain - Web APIs
Web › API › Document › domain
const currentDomain = document.domain; Closing a window If a document, such as www.example.xxx/good.html, has the domain of "www.example.xxx", this example attempts to close the window. const badDomain = "www.example.xxx"; if (document.domain === badDomain) { // Just an example: window.close() sometimes ha...
...d <iframe> The document has no browsing context The document's effective domain is null The given value is not equal to the document's effective domain (or it is not a registerable domain suffix of it) The document-domain Feature-Policy is enabled Examples Getting the domain For the URI http://developer.mozilla.org/docs/Web, this example sets currentDomain to the string "developer.mozilla.org". const currentDomain = document.domain; Closing a window If a document, such as www.example.xxx/good.html, has the domain of "www.example.xxx", this example attempts to close the window. const badDomain = "www.example.xxx"; if (document.domain === badDomain) { // Just an example: window.close() sometimes has no effect window.close(); } Specifications Specification Sta...
Document - Web APIs
Web › API › Document
l property. transitionend Fired when a CSS transition has completed. Also available via the ontransitionend property. transitionrun Fired when a CSS transition is first created. Also available via the ontransitionrun property. transitionstart Fired when a CSS transition has actually started. Also available via the ontransitionstart property. Non-standard extensions Firefox notes Mozilla defines a set of non-standard properties made only for XUL content: Document.currentScript Returns the <script> element that is currently executing. Document.documentURIObject (Mozilla add-ons only!) Returns the nsIURI object representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect privileges). Document.popupNode ...
... Document.getBoxObjectFor() Use the Element.getBoundingClientRect() method instead. ...
Using the W3C DOM Level 1 Core - Web APIs
What is a DOM tree? A DOM tree is a kind of tree whose nodes represent an HTML or XML document's contents. Each HTML or XML document has a unique DOM tree representation. ...
...M Level 1 Core specification from the W3C. It's a reasonably clear spec, although it is formal. ...
Element.outerHTML - Web APIs
Web › API › Element › outerHTML
Working Draft ...
... Working Draft ...
Element.removeAttributeNS() - Web APIs
The removeAttributeNS() method of the Element interface removes the specified attribute from an element. Syntax element.removeAttributeNS(namespace, attrName); Parameters namespace is a string that contains the namespace of the attribute. attrName is a string that names the attribute to be removed from the current node. ...
...ttrName); Parameters namespace is a string that contains the namespace of the attribute. attrName is a string that names the attribute to be removed from the current node. ...
Event.explicitOriginalTarget - Web APIs
For example, mouse events are retargeted to their parent node when they happen over text nodes (see bug 185889), and in that case currentTarget will show the parent and explicitOriginalTarget will show the text node. explicitOriginalTarget differs from originalTarget in that it will never contain anonymous content. Example This property can be used with <command> to get the event details of the original object calling the command. ...
...> to get the event details of the original object calling the command. function myCommand(ev) { alert(ev.explicitOriginalTarget.nodeName); // returns 'menuitem' } <xul:command id="my-cmd-anAction" oncommand="myCommand(event);"/> <xul:menulist> <xul:menupopup> <xul:menuitem label="Get my element name!" command="my-cmd-anAction"/> </xul:menupopup> </menulist> Specifications This is a Mozilla-specific property. Defined in /dom/public/idl/events/nsIDOMNSEvent.idl This event property is not defined in the W3.org DOM Level 2 Events ...
HTMLHyperlinkElementUtils.origin - Web APIs
on of the origin of the represented URL; that is: for URL using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for URL using file: scheme, the value is browser dependant; for URL using the blob: scheme, the origin of the URL following blob:. ...
...ted URL; that is: for URL using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for URL using file: scheme, the value is browser dependant; for URL using the blob: scheme, the origin of the URL following blob:. E.g "blob:https://mozilla.org" will have "https://mozilla.org". Note: This feature is available in Web Workers. Syntax string = object.origin; Examples // On this page, returns the origin var result = window.location.origin; // Returns:'https://developer.mozilla.org' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.origin' in that specification. Living Stand...
HTMLHyperlinkElementUtils.toString() - Web APIs
The HTMLHyperlinkElementUtils.toString() stringifier method returns a USVString containing the whole URL. It is a read-only version of HTMLHyperlinkElementUtils.href. ...
...USVString containing the whole URL. It is a read-only version of HTMLHyperlinkElementUtils.href. ...
HTMLInputElement.setSelectionRange() - Web APIs
ting to the end of the value. selectionDirection Optional A string indicating the direction in which the selection is considered to have been performed. Possible values: "forward" "backward" "none" if the direction is unknown or irrelevant. Default value. ...
... indicating the direction in which the selection is considered to have been performed. Possible values: "forward" "backward" "none" if the direction is unknown or irrelevant. Default value. Example Click the button in this example to select the third, fourth, and fifth characters in the text box ("zil" in the word "Mozilla"). HTML <input type="text" id="text-box" size="20" value="Mozilla"> <button onclick="selectText()">Select text</button> JavaScript function selectText() { const input = document.getElementById('text-box'); input.focus(); input.setSelectionRange(2, 5); } Result Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLInputElement.setSelectionRange()' in that specification. Living Standard...
Using IndexedDB - Web APIs
Therefore, it is not recommended to use it in production code. It may be preferable to not support a browser than to claim to support it and fail: if (!window.indexedDB) { console.log("Your browser doe...
...ete, even with normal browser shutdown. See bug 870645. As a workaround for this normal shutdown notification, you might track your transactions and add a beforeunload event to warn the user if any transactions have not yet completed at the time of unloading. At least with the addition of the abort notifications and IDBDatabase.onclose, you can know when this has happened. Locale-aware sorting Mozilla has implemented the ability to perform locale-aware sorting of IndexedDB data in Firefox 43+. By default, IndexedDB didn't handle internationalization of sorting strings at all, and everything was sorted as if it were English text. For example, b, a, z, a would be sorted as: a b z a which is obviously not how users want their data to be sorted -- Aaron and Aaron for example should go next...
installChrome - Web APIs
Method of InstallTrigger object Syntax int installChrome( TYPE, url, name ) Parameters The installChrome method has the following parameters: TYPE TYPE can be InstallTrigger.SKIN or InstallTrigger.LOCALE. url url is a string containing a full or relative URL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. ...
...is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. Description installChrome is a special method for installing new chrome in Netscape 6 and Mozilla. The method performs a simplified installation of language packs or Netscape 6/Mozilla skins, and saves you the trouble of writing separate installation scripts in the XPI files or using the more sophisticated methods of the Install and File objects. ...
Location: toString() - Web APIs
Web › API › Location › toString
The toString() stringifier method of the Location interface returns a USVString containing the whole URL. It is a read-only version of Location.href. ...
... the Location interface returns a USVString containing the whole URL. It is a read-only version of Location.href. ...
PaymentAddress.addressLine - Web APIs
ss that is not covered by one of the other properties of PaymentAddress. These lines may include the street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box. Syntax var paymentAddressLines = PaymentAddress.addressLine; Value An array of DOMString objects, each containing one line of the address. ...
... Candidate Recommendation Initial definition. ...
Using the Resource Timing API - Web APIs
formance entry buffer is full. The following code example sets a onresourcetimingbufferfull event callback in the init() function. ...
... in the init() function. function buffer_full(event) { console.log("WARNING: Resource Timing Buffer is FULL!"); set_resource_timing_buffer_size(200); } function init() { // load some image to trigger "resource" fetch events var image1 = new Image(); image1.src = "https://developer.mozilla.org/static/img/opengraph-logo.png"; var image2 = new Image(); image2.src = "http://mozorg.cdn.mozilla.net/media/img/firefox/firefox-256.e2c1fc556816.jpg" // Set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } Coping with CORS When CORS is in effect, many of the timing properties' values are returned as zero unless the server's access policy permits these values to be shared. This requires the server providing the resource to send th...
URL.origin - Web APIs
Web › API › URL › origin
represented URL. The exact structure varies depending on the type of URL: For http or https URLs, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified). For file: URLs, the value is browser dependant. ...
...s depending on the type of URL: For http or https URLs, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified). For file: URLs, the value is browser dependant. for blob: URLs, the origin of the URL following blob: will be used, e.g "blob:https://mozilla.org" will be returned as "https://mozilla.org". Note: This feature is available in Web Workers. Syntax const originString = url.origin Value A USVString. Examples const url = new URL("blob:https://mozilla.org:443/") console.log(url.origin); // Logs 'https://mozilla.org' Specifications Specification Status Comment URLThe definition of 'URL.origin' in that specification. Living Standard Initial def...
URLUtilsReadOnly.host - Web APIs
Living Standard Initial definition. ...
... Living Standard Initial definition. ...
URLUtilsReadOnly.hostname - Web APIs
Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
... Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
URLUtilsReadOnly.href - Web APIs
Living Standard Initial definition. ...
... Living Standard Initial definition. ...
Starting up and shutting down a WebXR session - Web APIs
ally, it is updated to maintain compatibility with browsers as their support for WebXR and other technologies related to it and to the implementation of the polyfill change over time. Be sure to read the readme carefully; the polyfill comes in several versions depending on what degree of compatibility with newer JavaScript features your target browsers include. WebXR API Emulator extension The Mozilla WebXR team has created a WebXR API Emulator browser extension, compatible with both Firefox and Chrome, which emulates the WebXR API, simulating a variety of compatible devices such as the HTC Vive, the Oculus Go and Oculus Quest, Samsung Gear, and Google Cardboard. With the extension in place, you can open up a developer tools panel that lets you control the position and orientation of the heads...
... sure you're aware of the limitations before you begin. Important: You should always test your code on actual AR and/or VR hardware before releasing or shipping a product! Emulated, simulated, or polyfilled environments are not an adequate substitute for actual testing on physical devices. Getting the extension Download the WebXR API Emulator for your supported browser below: Google Chrome Mozilla Firefox The source code for the extension is also available on GitHub. Emulator issues and notes While this isn't the place for a full article about the extension, there are some specific things worth mentioning. Version 0.4.0 of the extension was announced on March 26, 2020. It introduced support for augmented reality (AR) through the WebXR AR Module, which has is approaching a stable state...
window.location - Web APIs
Web › API › Window › location
cation; Examples Basic Example alert(location); // alerts "/docs/Web/API/Window/location" Example #1: Navigate to a new page Whenever a new value is assigned to the location object, a document will be loaded using the URL as if location.assign() had been called with the modified URL. Note that security settings, like CORS, may prevent this to effectively happen. ...
...ation); // alerts "/docs/Web/API/Window/location" Example #1: Navigate to a new page Whenever a new value is assigned to the location object, a document will be loaded using the URL as if location.assign() had been called with the modified URL. Note that security settings, like CORS, may prevent this to effectively happen. ...
Obsolete features - Web APIs
een 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. ...
...d 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 Personal Toolbar/Bookmarks toolbar by setting dom.disable_window_open_feature.personalbar to true in about:config or in their user.js file. ...
WorkerGlobalScope.navigator - Web APIs
ator object. ...
...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" 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__: ...
Using XMLHttpRequest - Web APIs
ace a complete (yet didactic) framework, able to use all four ways to submit, and to upload files: <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Sending forms with pure AJAX &ndash; MDN</title> <script type="text/javascript"> "use strict"; /*\ |*| |*| :: XMLHttpRequest.prototype.sendAsBinary() Polyfill :: |*| |*| https://developer.mozilla.org/docs/DOM/XMLHttpRequest#sendAsBinary() \*/ if (!XMLHttpRequest.prototype.sendAsBinary) { XMLHttpRequest.prototype.sendAsBinary = function(sData) { var nBytes = sData.length, ui8Data = new Uint8Array(nBytes); for (var nIdx = 0; nIdx < nBytes; nIdx++) { ui8Data[nIdx] = sData.charCodeAt(nIdx) & 0xff; } /* send as ArrayBufferView...: */ this.send(ui8Data); /* ...o...
...|*| https://www.gnu.org/licenses/gpl-3.0-standalone.html |*| |*| Syntax: |*| |*| AJAXSubmit(HTMLFormElement); \*/ var AJAXSubmit = (function () { function ajaxSuccess () { /* console.log("AJAXSubmit - Success!"); */ console.log(this.responseText); ...
XMLHttpRequest.onreadystatechange - Web APIs
is every time the readyState property of the XMLHttpRequest changes. Warning: This should not be used with synchronous requests and must not be used from native code. Syntax XMLHttpRequest.onreadystatechange = callback; Values callback is the function to be executed when the readyState changes. ...
... must not be used from native code. Syntax XMLHttpRequest.onreadystatechange = callback; Values callback is the function to be executed when the readyState changes. ...
Using the link role - Accessibility
the fake link has been visited before, and therefore use :visited styles (e.g. the default purple color for visited links). Opening a page using the open() method counts as being a popup, and certain browsers may issue a warning when you try to activate it, or make you explicitly agree to allowing popups form the domain it exists on. ...
...age using the open() method counts as being a popup, and certain browsers may issue a warning when you try to activate it, or make you explicitly agree to allowing popups form the domain it exists on. ...
Community - Accessibility
This document provides links to mailing lists, newsgroups, forums, and other communities related to Accessbility. If you know of other useful resources, please link to them here. ...
... This document provides links to mailing lists, newsgroups, forums, and other communities related to Accessbility. If you know of other useful resources, please link to them here. ...
Accessibility FAQ - Accessibility
For interface design with XUL, follow the Accessibile XUL Authoring Guidelines (archive.org). ...
...For interface design with XUL, follow the Accessibile XUL Authoring Guidelines (archive.org). I'm interested in helping promote the fine accessibility features that Firefox provides, what can I do? Join the Firefox Accessibility Advocates ...
Using multiple backgrounds - CSS: Cascading Style Sheets
ground, background-attachment, background-clip, background-image, background-origin, background-position, background-repeat, background-size. ...
... background-origin, background-position, background-repeat, background-size. ...
background-attachment - CSS: Cascading Style Sheets
Formal syntax <attachment>#where <attachment> = scroll | fixed | local Examples Simple example HTML <p> There were doors all round the hall, but they were all locked; and when Alice had been all the way down one side and up the other, trying every door, she walked sadly down the middle, wondering how she was ever to get out again. </p> CSS p { background-image: url("https://mdn.mozillademos.org/files/12057/starsolid.gif"); background-attachment: fixed; } Result Multiple background images This property supports multiple background images. You can specify a different <attachment> for each background, separated by commas. Each image is matched with the corresponding attachment type, from first specified to last. HTML <p> There were doors all round the hall, but they we...
...s! either the locks were too large, or the key was too small, but at any rate it would not open any of them. However, on the second time round, she came upon a low curtain she had not noticed before, and behind it was a little door about fifteen inches high: she tried the little golden key in the lock, and to her great delight it fitted! </p> CSS p { background-image: url("https://mdn.mozillademos.org/files/12057/starsolid.gif"), url("https://mdn.mozillademos.org/files/12059/startransparent.gif"); background-attachment: fixed, scroll; background-repeat: no-repeat, repeat-y; } Result Specifications Specification Status Comment CSS Backgrounds and Borders Module Level 3The definition of 'background-attachment' in that specification. Candidat...
background-position - CSS: Cascading Style Sheets
*/ .examplethree { background-image: url("https://mdn.mozill...
...v> CSS /* Shared among all <div>s */ div { background-color: #FFEE99; background-repeat: no-repeat; width: 300px; height: 80px; margin-bottom: 12px; } /* These examples use the `background` shorthand property */ .exampleone { background: url("https://mdn.mozillademos.org/files/11987/startransparent.gif") #FFEE99 2.5cm bottom no-repeat; } .exampletwo { background: url("https://mdn.mozillademos.org/files/11987/startransparent.gif") #FFEE99 left 4em bottom 1em no-repeat; } /* Multiple background images: Each image is matched with the corresponding position, from first specified to last. */ .examplethree { background-image: url("https://mdn.mozillademos.org/files/11987/startransparent.gif"), url("https://mdn.mozillademos.org/files/7693/catfront.png"); ...
box-align - CSS: Cascading Style Sheets
Web › CSS › box-align
retchApplies toelements with a CSS display value of box or inline-boxInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax start | center | end | baseline | stretch Examples Setting box alignment <!DOCTYPE html> <html> <head> <title>CSS box-align example</title> <style> div.example { display: box; /* As specified */ display: -moz-box; /* Mozilla */ display: -webkit-box; /* WebKit */ /* Make this box taller than the children, so there is room for the box-pack */ height: 400px; /* Make this box wider than the children so there is room for the box-align */ width: 300px; /* Children should be oriented vertically */ box-orient: vertical; /* As specified */ -moz-box-orient: vertical; /* M...
...o there is room for the box-align */ width: 300px; /* Children should be oriented vertically */ box-orient: vertical; /* As specified */ -moz-box-orient: vertical; /* Mozilla */ -webkit-box-orient: vertical; /* WebKit */ /* Align children to the horizontal center of this box */ box-align: center; /* As specified */ -moz-box-align: center; /* Mozilla */ -webkit-box-align: center; /* WebKit */ /* Pack children to the bottom of this box */ box-pack: end; /* As specified */ -moz-box-pack: end; /* Mozilla */ -webkit-box-pack: end; /* WebKit */ } div.example > p { /* Make children narrower than their parent, so there is room for the box-align */ width: 200px; } </style> </head> <body...
box-pack - CSS: Cascading Style Sheets
Web › CSS › box-pack
king is set using the element's pack attribute, then the style is ignored. ...
...s div.example { border-style: solid; display: -moz-box; /* Mozilla */ display: -webkit-box; /* WebKit */ /* Make this box taller than the children, so there is room for the box-pack */ height: 300px; /* Make this box wide enough to show the contents are centered horizontally */ width: 300px; /* Children should be oriented vertically */ -moz-box-orient: vertical; /* Mozilla */ -webkit-box-orient: vertical; /* WebKit */ /* Align children to the horizontal center of this box */ -moz-box-align: center; /* Mozilla */ -webkit-box-align: center; /* WebKit */ /* Pack children to the bottom of this box */ -moz-box-pack: end; /* Mozilla */ -webkit-box-pack: end; /* WebKit */ } div.example p { /* Make children narrower than their parent...
<color> - CSS: Cascading Style Sheets
. ThreeDShadow The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border. Window Window background. Should be used with the WindowText foreground color. WindowFrame Window frame. WindowText Text in windows. Should be used with the Window background color. Mozilla System Color Extensions -moz-ButtonDefault The border color that goes around buttons that represent the default action for a dialog box. -moz-ButtonHoverFace The background color of a button that the mouse pointer is over (which would be ThreeDFace or ButtonFace when the mouse pointer is not over it). Should be used with the -moz-ButtonHoverText foreground color. -moz-ButtonHoverT...
...ediatext 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 the start menu, taskbar, title bars, etc. -moz-win-accentcolortext Used to access the color of text placed over the Windows 10 custom accent color in the start menu, taskbar, title bars, etc. Mozilla Color Preference Extensions -moz-activehyperlinktext User's preference for text color of active links. Should be used with the default document background color. -moz-default-background-color User's preference for the document background color. -moz-default-color User's preference for the text color. -moz-hyperlinktext User's preference for the text color of unvisited li...
mask-image - CSS: Cascading Style Sheets
Candidate Recommendation Initial definition ...
... Candidate Recommendation Initial definition ...
width - CSS: Cascading Style Sheets
Web › CSS › width
oPercentagesrefer to the width of the containing blockComputed valuea percentage or auto or the absolute lengthAnimation typea length, percentage or calc(); Formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> Examples Default width p.goldie { background: gold; } <p class="goldie">The Mozilla community produces a lot of great software.</p> Pixels and ems .px_length { width: 200px; background-color: red; color: white; border: 1px solid black; } .em_length { width: 20em; background-color: white; color: red; border: 1px solid black; } <div class="px_length">Width measured in px</div> <div class="em_length">Width measured in em</div> Percentage .percent { widt...
....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> Specifications Specification Status Comment CSS Box Sizing Module Level 4Th...
WAI ARIA Live Regions/API Support - Developer guides
These features will help screen reader developers improve the quality and performance of live region support, both for pages that are marked up with ARIA live region markup, and for pages where the author did not add any additional markup. Please read the ARIA spec or the live region report to learn about ARIA live region markup. ...
...l now provide information about whether the event was caused by user input, or was something that the web page caused. This information is retrieved differently on each platform, because some platforms use asynchronous events. In IAccessible2, this is retrieved from the object attribute "event-from-input", which will be set to "true" or "false". If it is not present, then something went wrong and Mozilla was not able to provide this information. This information is available only for EVENT_SHOW, EVENT_HIDE, IA2_EVENT_TEXT_INSERTED and IA2_EVENT_TEXT_REMOVED. For ATK/AT-SPI, this information is retrieved by checking the event name. If the event name has ":system" appended to it, then it is /not/ from user input. The ":system" string is calculated for children-changed and text-changed events. Why i...
Separate sites for mobile and desktop - Developer guides
d CSS to phones and PCs. Another case where you may be forced to use this approach is if you cannot, for whatever reason, modify your existing desktop site, and need to have a 100% separate mobile site. Though it's not ideal, at least you have this option. Examples Most of the major Web applications you see in the wild have chosen this path, including Facebook, YouTube, Digg, and Flickr. In fact, Mozilla picked this strategy for the mobile versions of addons.mozilla.org (AMO) and support.mozilla.org (SUMO). If you'd like to see the source code behind an example of this approach in action, feel free to check out the github repository for AMO or SUMO. Approaches to mobile Web development See the following articles for background and other approaches to developing for mobile platforms. What is mo...
...mple of this approach in action, feel free to check out the github repository for AMO or SUMO. Approaches to mobile Web development See the following articles for background and other approaches to developing for mobile platforms. What is mobile-friendliness? Responsive design A hybrid approach Original document information This article was originally published on 13 May 2011, on the Mozilla Webdev blog as "Approaches to Mobile Web Development Part 2 - Separate Sites", by Jason Grlicky. ...
<a>: The Anchor element - HTML: Hypertext Markup Language
Web › HTML › Element › a
Permitted ARIA roles When href attribute is present: button checkbox menuitem menuitemcheckbox menuitemradio option radio switch tab treeitem When href attribute is not present: any DOM interface HTMLAnchorElement Examples Linking to an absolute URL HTML <a href="https://www.mozilla.com"> Mozilla </a> Result Linking to relative URLs HTML <a href="//example.com">Scheme-relative URL</a> <a href="/docs/Web/HTML">Origin-relative URL</a> <a href="./p">Directory-relative URL</a> CSS a { display: block; margin-bottom: 0.5em } Result Linking to an element on the same page <!-- <a> element links to the section below --> <p><a href="#Section_further_down"> Jump to ...
...</p> <!-- Heading to link to --> <h2 id="Section_further_down">Section further down</h2> Note: You can use href="#top" or the empty fragment (href="#") to link to the top of the current page, as defined in the HTML specification. Linking to an email address To create links that open in the user's email program to let them send a new message, use the mailto: scheme: <a href="mailto:nowhere@mozilla.org">Send email to nowhere</a> For details about mailto: URLs, such as including a subject or body, see Email links or RFC 6068. Linking to telephone numbers <a href="tel:+49.157.0156">+49 157 0156</a> <a href="tel:+1(555)5309">(555) 5309</a> tel: link behavior varies with device capabilities: Cellular devices autodial the number. Most operating systems have programs that can make calls, ...
<dl>: The Description List element - HTML: Hypertext Markup Language
Web › HTML › Element › dl
w content. Implicit ARIA role No corresponding role Permitted ARIA roles group, list, none, presentation DOM interface HTMLDListElement Attributes This element only includes the global attributes. Examples Single term and description <dl> <dt>Firefox</dt> <dd> A free, open source, cross-platform, graphical web browser developed by the Mozilla Corporation and hundreds of volunteers. </dd> <!-- Other terms and descriptions --> </dl> Multiple terms, single description <dl> <dt>Firefox</dt> <dt>Mozilla Firefox</dt> <dt>Fx</dt> <dd> A free, open source, cross-platform, graphical web browser developed by the Mozilla Corporation and hundreds of volunteers. </dd> <!-- Other terms and descriptions -->...
... </dd> <dd> The Red Panda also known as the Lesser Panda, Wah, Bear Cat or Firefox, is a mostly herbivorous mammal, slightly larger than a domestic cat (60 cm long). ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
Web › HTML › Element › input
t id="numbersxx"> <option>0</option> <option>2</option> <option>4</option> <option>8</option> <option>16</option> <option>32</option> <option>64</option> </datalist> <datalist id="fruitsxx"> <option>cherry</option> <option>banana</option> <option>mango</option> <option>orange</option> <option>blueberry</option> </datalist> <datalist id="urlsxx"> <option>https://developer.mozilla.org</option> <option>https://caniuse.com/</option> <option>https://mozilla.com</option> <option>https://mdn.github.io</option> <option>https://www.youtube.com/user/firefoxchannel</option> </datalist> <p><label for="textx">Text</label> <input type="text" list="fruitsxx" id="textx"/></p> <p><label for="colorx">Color</label> <input type="color" list="colorsxx" id="colorx"/></p> <p><label fo...
...your code to update the search results in real time as the user edits the search. If incremental is not specified, the search event is only sent when the user explicitly initiates a search (such as by pressing the Enter or Return key while editing the field). The search event is rate-limited so that it is not sent more more frequently than an implementation-defined interval. mozactionhint A Mozilla extension, supported by Firefox for Android, which provides a hint as to what sort of action will be taken if the user presses the Enter or Return key while editing the field. This information is used to decide what kind of label to use on the Enter key on the virtual keyboard. Note: This has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. To see the s...
Identifying resources on the Web - HTTP
single URL (Uniform Resource Locator, a kind of URI). There are sometimes reasons identity and location are not given by the same URI: HTTP uses a specific HTTP header, Alt-Svc when the resource requested wants the client to access it at another location. URLs and URNs URLs The most common form of URI is the Uniform Resource Locator (URL), which is known as the web address. https://developer.mozilla.org https://developer.mozilla.org/docs/Learn/ https://developer.mozilla.org/search?q=URL Any of those URLs can be typed into your browser's address bar to tell it to load the associated page (resource). A URL is composed of different parts, some mandatory and others are optional. A more complex example might look like this: http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#...
...a larger document -- you should only use the HTTP and HTTPS schemes. Increasingly, browsers are removing support for using FTP to load subresources, for security reasons. ...
Resource URLs - HTTP
irefox, including the default preferences, which could be a serious security and privacy issue. For example, a script on Browserleaks highlights what Firefox reveals when queried by a simple script running on the site (you can find the code in https://browserleaks.com/firefox#more). The file firefox.js passes preference names and values to the pref() function. For example: http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/browser/app/profile/firefox.js#575 Web sites can easily collect Firefox default preferences by overriding this pref() function and using the script resource:///defaults/preferences/firefox.js. Furthermore, some default values of preferences differ between build configurations, such as platform and locale, which means web sites could identify ...
...js#575 Web sites can easily collect Firefox default preferences by overriding this pref() function and using the script resource:///defaults/preferences/firefox.js. Furthermore, some default values of preferences differ between build configurations, such as platform and locale, which means web sites could identify individual users using this information. Solution In order to fix this problem, Mozilla changed the behavior of loading resource: URIs in bug 863246, which landed in Firefox 57 (Quantum). In the past, web content was able to access whatever resource: URIs were desired -- not only Firefox's internal resources, but also extensions' assets. Now this behavior is prohibited by default. It is however still necessary for Firefox to load resources in web content under certain circumstanc...
An overview of HTTP - HTTP
Web › HTTP › Overview
, and receive an answer. The client may open a new connection, reuse an existing connection, or open several TCP connections to the servers. Send an HTTP message: HTTP messages (before HTTP/2) are human-readable. With HTTP/2, these simple messages are encapsulated in frames, making them impossible to read directly, but the principle remains the same. For example: GET / HTTP/1.1 Host: developer.mozilla.org Accept-Language: fr Read the response sent by the server, such as: HTTP/1.1 200 OK Date: Sat, 09 Oct 2010 14:28:02 GMT Server: Apache Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT ETag: "51142bc1-7449-479b075b2891b" Accept-Ranges: bytes Content-Length: 29769 Content-Type: text/html <!DOCTYPE html... (here comes the 29769 bytes of the requested web page) Close or reuse the connection f...
...defines the operation the client wants to perform. Typically, a client wants to fetch a resource (using GET) or post the value of an HTML form (using POST), though more operations may be needed in other cases. The path of the resource to fetch; the URL of the resource stripped from elements that are obvious from the context, for example without the protocol (http://), the domain (here, developer.mozilla.org), or the TCP port (here, 80). The version of the HTTP protocol. Optional headers that convey additional information for the servers. Or a body, for some methods like POST, similar to those in responses, which contain the resource sent. Responses An example response: Responses consist of the following elements: The version of the HTTP protocol they follow. A status code, indicatin...
HTTP
Web › HTTP
/domainb.foo/image.jpg) via the img element. Web pages today very commonly load cross-site resources, including CSS stylesheets, images, scripts, and other resources. CORS allows web developers to control how their site reacts to cross-site requests. Evolution of HTTP A brief description of the changes between the early versions of HTTP, to the modern HTTP/2, the emergent HTTP/3 and beyond. Mozilla web security guidelines A collection of tips to help operational teams with creating secure web applications. HTTP Messages Describes the type and structure of the different kind of messages of HTTP/1.x and HTTP/2. A typical HTTP session Shows and explains the flow of a usual HTTP session. Connection management in HTTP/1.x Describes the three connection management models available in HT...
... CSP directives The Content-Security-Policy response header fields allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. Tools & resources Helpful tools and resources for understanding and debugging HTTP. Firefox Developer Tools Network monitor Mozilla Observatory A project designed to help developers, system administrators, and security professionals configure their sites safely and securely. RedBot Tools to check your cache-related headers How Browsers Work A very comprehensive article on browser internals and request flow through HTTP protocol. A MUST-READ for any web developer. ...
JavaScript language resources - JavaScript
ECMA-262 3rd Edition PDF December 1999 ECMAScript Language Specification. This is the third revision of the ECMAScript standard; corresponds to JavaScript 1.5. See also the errata ECMA-262 5th Edition PDF December 2009 ECMAScript Language Specification. This is the fifth revision of the ECMAScript standard. See also the ES5 errata and ECMAScript 5 support in Mozilla ECMA-357 PDF June 2004 ECMAScript for XML (E4X). See also the E4X errata. ECMA-262 5.1 Edition PDF, HTML June 2011 This version is fully aligned with the 3rd edition of the international standard ISO/IEC 16262:2011. It includes ES5 errata fixes, no new features. ECMA-402 1st Edition PDF, HTML December 2012 ECMAScript Internationalizati...
...CMAScript entry for more information on ECMAScript history. You can participate in or just track the work on the next revisions of the ECMAScript Language Specification, code-named "Harmony", and the ECMAScript Internationalization API Specification via public wiki and the es-discuss mailing list linked from ecmascript.org. Implementations SpiderMonkey - the JavaScript engine used in various Mozilla products, including Firefox; Rhino - the JavaScript engine is written in Java; Tamarin - the ActionScript virtual machine (used in the Adobe(R) Flash(R) Player); Other implementations (Wikipedia). ...
String length - JavaScript
myString.length = 4; co...
...myString.length = 4; console.log(myString); // expected output: "bluebells" console.log(myString.length); // ex...
Strict mode - JavaScript
ents, interface, let, package, private, protected, public, static, and yield. In strict mode, then, you can't name or use variables or arguments with these names. function package(protected) { // !!! 'use strict'; var implements; // !!! interface: // !!! while (true) { break interface; // !!! } function private() { } // !!! } function fun(static) { 'use strict'; } // !!! Two Mozilla-specific caveats: First, if your code is JavaScript 1.7 or greater (for example in chrome code or when using the right <script type="">) and is strict mode code, let and yield have the functionality they've had since those keywords were first introduced. But strict mode code on the web, loaded with <script src=""> or <script>...</script>, won't be able to use let/yield as identifiers. Second, whi...
...g the right <script type="">) and is strict mode code, let and yield have the functionality they've had since those keywords were first introduced. But strict mode code on the web, loaded with <script src=""> or <script>...</script>, won't be able to use let/yield as identifiers. Second, while ES5 unconditionally reserves the words class, enum, export, extends, import, and super, before Firefox 5 Mozilla reserved them only in strict mode. Second, strict mode prohibits function statements, not at the top level of a script or function. In normal mode in browsers, function statements are permitted "everywhere". This is not part of ES5 (or even ES3)! It's an extension with incompatible semantics in different browsers. Note that function statements outside top level are permitted in ES2015. 'use str...
JavaScript shells - JavaScript
ps and was formerly called wxJavaScript. jspl - A standalone JavaScript shell enhanced by Perl. Can use Perl modules directly from JavaScript: DBI for database integration, GTK2 for GUI apps, POSIX for system programming, etc. The best of CPAN now for JavaScript programmers. ShellJS - Portable Unix shell commands for Node.js List of JavaScript shells The following JavaScript shells work with Mozilla. Firefox has a built-in JavaScript console, which support multi-line editing. JavaScript Shell (js) - A command line interpreter for JavaScript xpcshell is an XPConnect - enabled shell, sometimes useful for Mozilla development. Babel REPL - A browser-based REPL for experimenting with future JavaScript. ES6Console.com - An open-source JavaScript console to test ECMAScript 2015 code inside t...
...ipt console to test ECMAScript 2015 code inside the browser. jsconsole.com -- An open-source JavaScript console with the ability to easily link to particular expressions JavaScript Shell (web page) - also available as part of the Extension Developer's Extension Jash: JavaScript Shell - a DHTML based shell that gives you command line access to a web page. MozRepl - Connect to Firefox and other Mozilla apps, explore and modify them from the inside, while they're running. Execute JS - (No longer maintained) - Firefox-Extension which provides an enhanced JavaScript-Console, where you can comfortably enter and execute arbitrary JavaScript-Code and modify functions. xqjs - Simple console for Firefox. ...
Image file type and format guide - Web media technologies
s per component refers to the number of bits used to represent each color component. For example, an RGB color depth of 8 indicates that each of the red, green, and blue components are represented by an 8-bit value. Bit depth, on the other hand, is the total number of bits used to represent each pixel in memory. APNG (Animated Portable Network Graphics) APNG is a file format first introduced by Mozilla which extends the PNG standard to add support for animated images. Conceptually similar to the animated GIF format which has been in use for decades, APNG is more capable in that it supports a variety of color depths, whereas animated GIF supports only 8-bit indexed color. APNG is ideal for basic animations that do not need to synchronize to other activities or to a sound track, such as progress...
...cators, activity throbbers, and other animated sequences. For example, APNG is one of the formats supported when creating animated stickers for Apple's iMessage application (and the Messages application on iOS). They're also commonly used for the animated portions of web browsers' user interfaces. ...
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
es the width and height attribute information, meaning that if the image has not loaded for some reason, its height will be set to 0. When the image finally loads, the same jank will occur as the page layout is shifted to make space for it. A new way of sizing images before loading completes Recognizing the problem, a WICG community group formed to propose an intrinsicsize attribute. ...
... Due to this work, browsers are working on adding a new mechanism for sizing images before the actual image is loaded. ...
OpenSearch description format
an be installed programmatically as described in Adding search engines from web pages. OpenSearch description file The XML file that describes a search engine follows the basic template below. Sections in [square brackets] should be customized for the specific plugin you're writing. ...
...omatically update. To support this, include an extra Url element with type="application/opensearchdescription+xml" and rel="self". The template attribute should be the URL of the OpenSearch document to automatically update to. For example: <Url type="application/opensearchdescription+xml" rel="self" template="https://example.com/mysearchdescription.xml" /> Note: At this time, addons.mozilla.org (AMO) doesn't support automatic updating of OpenSearch plugins. If you want to put your search plugin on AMO, remove the auto-updating feature before submitting it. Troubleshooting Tips If there is a mistake in your Search Plugin XML, you could run into errors when adding a discovered plugin. If the error message isn't be helpful, the following tips could help you find the problem. Your ...
Media - Progressive web apps (PWAs)
Example This rule sets the page margins to one inch on all four sides: @page {margin: 1in;} This rule ensures that every H1 element starts on a new page: h1 {page-break-before: always;} More details For full details of CSS support for paged media, see Paged media in the CSS Specification. Like other features of CSS, printing depends on browser choice and its settings. For example, the Mozilla browser supplies default margins, headers, and footers for printing. Keep in mind that you can't completely control the printed format. It is impossible to anticipate every user's browser choice and settings at the time of printing. User interfaces CSS has some special properties for devices that support a user interface, like computer displays. These properties dynamically change the appearan...
...fully functional button also has a dark outline around the entire button when it is the default, and a dotted outline on the face of the button when it has keyboard focus. It might also have a hover effect when the pointer is over it. More details For more information about user interfaces in CSS, see User interface in the CSS Specification. In Part II of this tutorial, there is an example of Mozilla's markup language for user interfaces. Action: Printing a document Note: This snippet only works on Firefox since it erroneously increments the CSS counter for fix-position elemnts. It shouldn not work in other browsers. See issue on css3-page. Make a new HTML document, doc4.html. Copy and paste the content from here: <!DOCTYPE html> <html> <head> <title>Print sample</title> ...
in - SVG: Scalable Vector Graphics
Web › SVG › Attribute › in
L <div style="width: 420px; height: 220px;"> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="backgroundMultiply"> <!-- This will not work. --> <feBlend in="BackgroundImage" in2="SourceGraphic" mode="multiply"/> </filter> </defs> <image xlink:href="https://developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#backgroundMultiply);" /> </svg> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="imageMultiply"> <!-- This is a workaround. --> ...
..."10%" y="10%" width="80%" height="80%"/> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#backgroundMultiply);" /> </svg> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="imageMultiply"> <!-- This is a workaround. ...
xChannelSelector - SVG: Scalable Vector Graphics
The xChannelSelector attribute indicates which color channel from in2 to use to displace the pixels in in along the x-axis. ...
...0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementFilter"> <feImage xlink:href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <feDisplacementMap in2="abc" in="SourceGraphic" scale="30" xChannelSelector="R"/> </filter> <filter id="displacementFilter2"> <feImage xlink:href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <feDisplacementMap in2="abc" in="SourceGraphic" scale="30" xChannelSelector="B"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementFilter)">Some displaced text</text> <text x="10" y="120" font-size="50" filter="url(#displacementFilter2)">Some displaced te...
yChannelSelector - SVG: Scalable Vector Graphics
The yChannelSelector attribute indicates which color channel from in2 to use to displace the pixels in in along the y-axis. ...
...0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementFilter"> <feImage xlink:href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <feDisplacementMap in2="abc" in="SourceGraphic" scale="30" yChannelSelector="R"/> </filter> <filter id="displacementFilter2"> <feImage xlink:href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <feDisplacementMap in2="abc" in="SourceGraphic" scale="30" yChannelSelector="B"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementFilter)">Some displaced text</text> <text x="10" y="120" font-size="50" filter="url(#displacementFilter2)">Some displaced te...
Scripting - SVG: Scalable Vector Graphics
Web › SVG › Scripting
this.rect.addEventListener("click",this,false) this.handleEvent= function(evt){ switch (evt.type){ case "click": alert(this.message) break; } } } Inter-document scripting: referencing embedded SVG When using SVG within HTML, Adobe's SVG Viewer 3.0 automatically includes a window property called svgDocument that points to the SVG document. This is not the case for Mozilla's native SVG implementation; therefore, using window.svgDocument does not work in Mozilla. Instead, you can use var svgDoc=document.embeds["name_of_svg"].getSVGDocument(); to get a reference to an embedded SVG document instead. The best way to get access to the Document representing an SVG document is to look at HTMLIFrameElement.contentDocument (if the document is presented in an <iframe>) o...
...sion 6 preview plugin. The suggested workaround is to use "top" instead of "parent". Since it is a beta version of their plugin, we can probably safely ignore this. More information and some examples can be found on the SVG wiki inter-document scripting page. setProperty has three parameters The function svgElement.style.setProperty("fill-opacity", "0.0") throws a DOMException - SYNTAX ERR in Mozilla. This behaviour is specified by the W3C in the DOM Level 2 Style Specification. The function setProperty is defined as a function with three parameters. The above can be replaced with 'svgElement.style.setProperty("fill-opacity", "0.0", "")', which is standards compliant. Links SVG wiki on Scripting and Programming ...
SVG and CSS - SVG: Scalable Vector Graphics
erent styles to them you should use CSS custom properties. Example Make a new SVG document as a plain text file, doc8.svg. ...
...rs support the :hover pseudo-class and other more complex CSS selectors on elements referenced via <use> elements, at the moment. There is some discussion about what rules apply to such referenced elements. See below how the structure then looks like. ...
SVG: Scalable Vector Graphics
Web › SVG
tation SVG element reference Details about each SVG element. SVG attribute reference Details about each SVG attribute. SVG DOM interface reference Details about the SVG DOM API, for interaction with JavaScript. Applying SVG effects to HTML content SVG works together with HTML, CSS and JavaScript. Use SVG to enhance a regular HTML page or web application. View All... ...
...avaScript. Use SVG to enhance a regular HTML page or web application. View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed Tools SVG Test Suite Markup Validator More Tools... Other resources: XML, CSS, DOM, Canvas Examples Google Maps (route overlay) & Docs (spreadsheet charting) SVG bubble menus SVG authoring guidelines An overview of the Mozilla SVG Project Frequently asked questions regarding SVG and Mozilla SVG as an image SVG animation with SMIL SVG art gallery Animation and interactions Like HTML, SVG has a document model (DOM) and events, and is accessible from JavaScript. This allows developers to create rich animations and interactive images. Some real eye-candy SVG at svg-wow.org Firefox extension (Grafox) to add a sub...
Using shadow DOM - Web Components
There are some bits of shadow DOM terminolo...
... There are some bits of shadow DOM terminology to be aware...
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
...
... ...
XSLT: Extensible Stylesheet Language Transformations
Web › XSLT
L schemas or to convert XML data into web pages or PDF documents. Documentation XSLT Element Reference Reference. Transforming XML with XSLT XSLT allows a stylesheet author to transform a primary XML document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format. Using the Mozilla JavaScript interface to XSL Transformations This document describes the JavaScript interface to the XSLT processing engine in Mozilla 1.2 and up. Specifying parameters using processing instructions Firefox allows stylesheet parameters to be specified when using the <?xml-stylesheet?> processing instruction. This is done using the <?xslt-param?> PI described in this document. XSLT & XPath Tuto...
...ransform XML documents into other formats, like XHTML. What is XSLT? This extensive introduction to XSLT and XPath assumes no prior knowledge of the technologies and guides the reader through background, context, structure, concepts and introductory terminology. Common XSLT Errors This article lists some common problems using XSLT in Firefox. XSLT 2.0 (new) View All... Community View Mozilla forums... Mailing list Newsgroup RSS feed Related Topics XML, XPath, XQuery ...
Builder - Archive of obsolete content
The Add-on Builder tool was retired on April 1, 2014. The Add-on Builder was a web-based development environment that allowed developers to create add-ons using the SDK APIs, but without needing to use the jpm command line tool. It was retired on April 1, 2014, and the "builder.addons.mozilla.org" domain now redirects to this page. ...
Communicating using "port" - Archive of obsolete content
on(): listen to a message. removeListener(): stop listening to a message. once(): listen to only the first occurrence of a message. Accessing port Accessing port in the Content Script Note that the global self object is completely different from the self module, which provides an API for an add-on to acce...
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. ...
Modules - Archive of obsolete content
known as Components, to the global scope. This object forms the central access point for all functionality provided by the host application. A complete explanation of how to use Components is out of scope for this document. However, the following example shows how it can be used to load scripts from other locations: const { classes: Cc interfaces: Ci } = Components; var instance = Cc["@mozilla.org/moz/jssubscript-loader;1"]; var loader = instance.getService(Ci.mozIJSSubScriptLoader); function loadScript(url) { loader.loadSubScript(url); } When a script is loaded, it is evaluated in the scope of the global object of the script that loaded it. Any property defined on the global object will be accessible from both scripts: // index.js: loadScript("www.foo.com/a.js"); foo; // => 3 ...
Program ID - Archive of obsolete content
The Program ID is a unique identifier for your add-on. When you package your add-on for distribution using jpm xpi, it will become the ID field in the add-on's Install Manifest. The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on. When you create an XPI with jpm xpi: if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@". if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on ID. if the package.json does include an id field, and it does not contain ...
SDK API Lifecycle - Archive of obsolete content
, and the Jetpack Google group. The deprecation notice should point developers at a migration guide. Migration The deprecation period defaults to 18 weeks (that is, three releases) although in some cases, generally those out of our control, it might be shorter than this. During this time, the module will be in the deprecated state. The SDK team will track usage of deprecated modules on addons.mozilla.org and support developers migrating their code. The SDK will continue to provide warnings: API documentation will inform users that the module is deprecated. Attempts to use a deprecated module at runtime will log an error to the error console. The AMO validator will throw errors when deprecated modules are used, and these add-ons will therefore fail AMO review. All warnings should includ...
simple-storage - Archive of obsolete content
mally, then simple storage will not be notified that the session is finished, and will not write your data to the backing store. Accessing storage from the console In the Add-on Debugger, you can access your add-on's simple-storage programmatically from the console using the following: loader.modules['resource://gre/modules/commonjs/sdk/simple-storage.js'].exports.storage Clarification from Mozilla needed: Writing the above line in Add-on Debugger console results in "ReferenceError: loader is not defined". Constructing arrays Be careful to construct array objects conditionally in your code, or you may zero them each time the construction code runs. For example, this add-on tries to store the URLs of pages the user visits: var ss = require("sdk/simple-storage"); ss.storage.pages = []; r...
system - Archive of obsolete content
tion. See nsIXULAppInfo's version. var system = require("sdk/system"); console.log("version = " + system.version); platformVersion The version of XULRunner that underlies the host application. See nsIXULAppInfo's platformVersion. var system = require("sdk/system"); console.log("XULRunner version = " + system.platformVersion); vendor The name of the host application's vendor, for example: "Mozilla". var system = require("sdk/system"); console.log("vendor = " + system.vendor); ...
widget - Archive of obsolete content
ontent using a URL with the contentURL property. Upon creation, the widget is automatically added to the add-on bar. You can set the width of a widget, but the height is fixed so as to fit in the add-on bar. If the content is an image, it is automatically scaled to be 16x16 pixels. For example, this widget contains an image, so it looks like a simple icon: require("sdk/widget").Widget({ id: "mozilla-icon", label: "My Mozilla Widget", contentURL: "http://www.mozilla.org/favicon.ico" }); You can make contentURL point to an HTML or icon file which you have packaged inside your add-on. Just save the file in your add-on's data directory, and reference it using the data.url() method of the self module: var data = require("sdk/self").data; require("sdk/widget").Widget({ id: "my-widget", ...
chrome - Archive of obsolete content
This module should not be confused with the "chrome" global variable that WebExtensions can use to access APIs. The chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs. ...
frame/hidden-frame - Archive of obsolete content
frame, preparing it to load content. remove unregisters a frame, unloading any content that was loaded in it. The following code creates a hidden frame, loads a web page into it, and then logs its title: var hiddenFrames = require("sdk/frame/hidden-frame"); let hiddenFrame = hiddenFrames.add(hiddenFrames.HiddenFrame({ onReady: function() { this.element.contentWindow.location = "http://www.mozilla.org/"; let self = this; this.element.addEventListener("DOMContentLoaded", function() { console.log(self.element.contentDocument.title); }, true, true); } })); See the panel module for a real-world example of usage of this module. Globals Constructors HiddenFrame(options) Creates a hidden frame. Parameters options : object Required options: Name Type ...
platform/xpcom - Archive of obsolete content
dule, you can provide your own implementations of XPCOM interfaces. "Unknown" is named after the "IUnknown" interface in COM. For example, the add-on below implements the nsIObserver interface to listen for and log all topic notifications: var { Class } = require('sdk/core/heritage'); var { Unknown } = require('sdk/platform/xpcom'); var { Cc, Ci } = require('chrome') var observerService = Cc['@mozilla.org/observer-service;1']. getService(Ci.nsIObserverService); var StarObserver = Class({ extends: Unknown, interfaces: [ 'nsIObserver' ], topic: '*', register: function register() { observerService.addObserver(this, this.topic, false); }, unregister: function() { observerService.removeObserver(this, this.topic); }, observe: function observe(subject...
system/xul-app - Archive of obsolete content
string The upper bound of the version range to compare. The range does not include this bound. Returns boolean : True if version falls in the given range and false otherwise. 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}". ...
Low-Level APIs - Archive of obsolete content
at are called when a module is unloaded. system/xul-app Information about the application on which your add-on is running. tabs/utils Functions for working with XUL tabs and the XUL tabbrowser object. test/assert Implements the assert interface defined in the CommonJS Unit Testing specification version 1.1. test/harness Test harness setup and execution. test/httpd An HTTP server for the Mozilla platform, which can be used in unit tests. test/runner Sets up unit tests. test/utils Helper methods used in the CommonJS Unit Testing suite. ui/button/action Add a button to the Firefox user interface. ui/button/toggle Add a toggle button to the Firefox user interface. ui/frame Create HTML iframes, using bundled HTML, CSS and JavaScript, that can be added to a designated area of the Fi...
Chrome Authority - Archive of obsolete content
, the module can do pretty much anything the browser is capable of. To obtain these privileges, the module must declare its intent with a statement like the following: var {Cc, Ci} = require("chrome"); The "chrome" built-in pseudo module is provided by the "toolkit/loader" module. The object returned by require("chrome"), when unpacked with the destructuring assignment feature available in the Mozilla JS environment, will provide the usual Components.* aliases: Cc An alias for Components.classes. Ci An alias for Components.interfaces. Cu An alias for Components.utils. Cr An alias for Components.results. Cm An alias for Components.manager. components An alias for Components itself (note the lower-case). From this you can access less-frequently-used properties like Components.stack a...
List Open Tabs - Archive of obsolete content
tabs = require("sdk/tabs"); for (let tab of tabs) console.log(tab.url); } Note: to get this working, you will need to save an icon for the button to your add-on's "data" directory as "icon-16.png". You can download the icon here: . Run the add-on, load a couple of tabs and click the button. You'll see output in the command line console that looks something like this: info: http://www.mozilla.org/about/ info: http://www.bbc.co.uk/ You don't get direct access to any content hosted in the tab. To access tab content, you need to attach a script to the tab using tab.attach(). This add-on attaches a script to all open tabs. The script adds a red border to the tab's document: require("sdk/ui/button/action").ActionButton({ id: "list-tabs", label: "List Tabs", icon: "./icon-16.png", ...
Developing for Firefox Mobile - Archive of obsolete content
d-ons on Android You can develop your add-on as normal, as long as you restrict yourself to the supported modules. When you need to run the add-on, first ensure that Firefox is not running on the device. Then execute jpm-mobile run with some extra options: jpm-mobile run --adb /path/to/adb In the command shell, you should see something like: Launching mobile application with intent name org.mozilla.fennec Pushing the addon to your device Starting: Intent { act=android.activity.MAIN cmp=org.mozilla.fennec/.App (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system Could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'. info: starting info: starting zerdatime 1329258528988 - browser chrome startup finished. This will be foll...
Modifying the Page Hosted by a Tab - Archive of obsolete content
/action").ActionButton({ id: "style-tab", label: "Style Tab", icon: "./icon-16.png", onClick: function() { require("sdk/tabs").activeTab.attach({ contentScript: 'document.body.style.border = "5px solid red";' }); } }); To run this example, save an icon file named "icon-16.png" in add-on's "data" directory. You could download this icon: . This add-on creates a button with Mozilla favicon as an icon. It has a click handler which fetches the active tab and loads a script into the page hosted by the active tab. The script is specified using the contentScript option, and just draws a red border around the page. Then open any web page in the browser window, and click the button . You should see a red border appear around the page, like this: Keeping Content Scripts in a Se...
Troubleshooting - Archive of obsolete content
iling list. You can also browse the list of known issues or search for specific keywords. Contact the Project Team and User Group SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network. And if you'd like to report a bug in the SDK, that's always welcome! You will need to create an account with Bugzilla, Mozilla's bug tracker. ...
Bootstrapped extensions - Archive of obsolete content
nd disabling then re-enabling the add-on. XUL and HTML Files - Using Entities from DTD Files Many times HTML pages are used, however they cannot be localized with DTD files. ...
Canvas code snippets - Archive of obsolete content
event. Once the remote page has loaded, the remotePageLoaded method fires. This method gets a reference to the iframe's window and draws this window to a canvas object. Note that this only works if you are running the page from chrome. If you try running the code as a plain webpage, you will get a 'Security error" code: "1000' error. ...
Customizing the download progress bar - Archive of obsolete content
This is required since it contains platform-specific directives, as we will see. The myextension.css file will look something like this: richlistitem progressmeter { %ifdef XP_WIN min-height: 17px !important; %else %if...
Embedding SVG - Archive of obsolete content
ofile="full" width="150" height="150"> <svg:rect x="10" y="10" width="100" height="100" fill="red"/> <svg:circle cx="50" cy="50" r="30" fill="blue"/> </svg:svg> <p>world</p> </body> </html> Embedding into XUL Make sure you use the right namespace when embedding <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- XUL and SVG go here --> </window> Example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/...
Forms related code snippets - Archive of obsolete content
ted code snippets. Date picker (before implementing it in a working environment, please read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>DatePicker Example - MDN</title> <script type="text/javascript"> /*\ |*| |*| DatePicker Example MDNDeveloper Network |*| |*| https://developer.mozilla.org/docs/Code_snippets/Forms |*| https://developer.mozilla.org/User:fusionchess |*| |*| This snippet is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ (function () { function DatePicker (oTarget) { const oTable = document.createElement("table"), oHRow = document.createElement("tr"), oTHead = docum...
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); } ...
JavaScript Debugger Service - Archive of obsolete content
key 2.30), the JavaScript Debugger Service (or simply JSD) used to be an XPCOM component that allows the tracking of JavaScript while it was being executed in the browser. 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. var jsd = Components.classes["@mozilla.org/js/jsd/debugger-service;1"] .getService(Components.interfaces.jsdIDebuggerService); jsd.on(); // enables the service till firefox 3.6, for 4.x use asyncOn if (jsd.isOn) jsd.off(); // disables the service Hooks JSD operates using the events hook mechanism. Next, we add code to the various hooks. jsd.scriptHook = { onScriptCreated: function(script) { // your function here }...
Modules - Archive of obsolete content
The use of eval() will probably not be of concern because it is only being used on the EXPORTED_SYMBOLS array which should not depend on user input. function importModule (thatObj) { thatObj = thatObj || window; var EXPORTED_SYMBOLS = [ // Put the symbols here ]; // Your code here... ...
Post data to window - Archive of obsolete content
ream. Most of the time, POST data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before 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-T...
QuerySelector - Archive of obsolete content
or); }; HTML example: <h1><a>Test!<a/></h1> <script> Element.prototype.$ = function (selector) { return this.querySelector(selector); }; alert(document.getElementsByTagName('h1')[0].$('a').nodeName); // 'A' XUL example: <hbox><vbox/></hbox> <script type="text/javascript"><![CDATA[ Element.prototype.$ = function (selector) { return this.querySelector(selector); }; var XULNS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'; alert(document.getElementsByTagNameNS(XULNS, 'hbox')[0].$('vbox').nodeName); // vbox ]]></script> XML example: <foo xmlns="someNS"><bar/></foo> in document earlier var foo = document.getElementsByTagNameNS('someNS', 'foo')[0]; alert(foo.$('bar')); Note that for plain XML, the # 'id' selector will not work with an 'id' attribute (since a such-named a...
Rosetta - Archive of obsolete content
this allows us to manually parse them. For a fast overview on the code proposed here you can git clone https://github.com/madmurphy/rosetta.js, or, at your choice, directly download this .zip file. rosetta.js: Library "use strict"; /*\ |*| |*| :: rosetta.js :: |*| |*| A possible, extensible collection of compilers to native ECMAScript. |*| |*| November 12, 2014 |*| |*| https://developer.mozilla.org/Add-ons/Code_snippets/Rosetta |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| Syntax: |*| |*| rosetta.appendCompiler([ "text/x-csrc", "text/x-c" ], yourCompiler); |*| \*/ var rosetta = new (function () { function createScript (oScript, oXHR200...
Scrollbar - Archive of obsolete content
ke an extra override: override chrome://global/skin/nativescrollbars.css chrome://app-global/skin/scrollbars.css Change some color values inside the app/chrome/skin/global/scrollbars.css to test that the css is used. Example xul window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="sampleWindow" width="320" height="240" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <hbox flex="1"> <browser type="content" src="http://mozilla.org" flex="1"/> <scrollbar orient="vertical"/> </hbox> </window> ...
Tabbox - Archive of obsolete content
odes[currentIndex]); tabs.removeItemAt(currentIndex); /*Work around If last tab is removed, widget fails to advance to next tab*/ if(-1 == tabbox.selectedIndex && tabs.childNodes.length>0){ tabbox.selectedIndex=0; } } Creating a close tab button To have a tab close button, you must configure the style. Examples: .tabs-closebutton { list-style-image: url(http://mozilla.org/favicon.ico); } .tabs-closebutton { list-style-image: url("chrome://global/skin/icons/Close.gif"); } ...
Delayed Execution - Archive of obsolete content
In instances where setTimeout() and setInterval() are unavailable, or insufficient, tasks can be scheduled with delays using nsITimer instances. Note: If an nsITimer is garbage collected, it will be deactivated and its callbacks will not fire. A reference to the timer objects must be explicitly kept alive until that point. Some example usages include: const Timer = Components.Constructor("@mozilla.org/timer;1", "nsITimer", "initWithCallback"); function delay(timeout, func) { let timer = new Timer(function () { // Remove the reference so that it can be reaped. delete delay.timers[idx]; func(); }, timeout, Ci.nsITimer.TYPE_ONE_SHOT); // Store a reference to the timer so that it's not reaped before it fires. let idx = delay.timers.push(timer) - 1; re...
URI parsing - Archive of obsolete content
h the facilities of nsIURI, the task of parsing a URI can still require additional work. It's advised that you use the nsIEffectiveTLDService. Grabbing the main domain using the EffectiveTLDService Even using the ETLDService, you're unable to get just the base domain sans TLD. So, here's some sample code to determine the base domain without any suffixes: var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"]. getService(Components.interfaces.nsIEffectiveTLDService); var suffix = eTLDService.getPublicSuffix(aURI); var basedomain = eTLDService.getBaseDomain(aURI); // this includes the TLD basedomain = basedomain.substr(0, (basedomain.length - suffix.length - 1)); // - 1 to remove the period before the tld ...
XML-related code snippets - Archive of obsolete content
E4X ...
Communication between HTML and your extension - Archive of obsolete content
ly and following the complete instructions for Building an Extension I was able to get an extension that could display something on the status bar. What I wanted to do was have an extension "look" for something on an HTML page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation. With a lot of help from irc://irc.mozilla.org#js and irc://irc.mozilla.org#extdev I was able to get it running pretty well, but I still would rather have the client less responsible for pinging the extension to "look" for what is on the page. What I tried My first attempt was trying to create an XBL component. From what I gather, XBL components are more designed for creating custom components and their specific component behavior rath...
Custom about: URLs - Archive of obsolete content
OUTPAGE_WORD = 'myaboutpage' const ABOUTPAGE_URI = 'data:text/html,hi this is the page that is shown when navigate to about:myaboutpage'; // const ABOUTPAGE_URI = 'chrome://myaboutaddon/content/index.html'; class AboutPage { static get classID() { return Components.ID(`{${ABOUTPAGE_ID}}`); } static get classDescription() { return ABOUTPAGE_DESCRIPTION; } static get contractID() { return `@mozilla.org/network/protocol/about;1?what=${ABOUTPAGE_WORD}`; } static get QueryInterface() { return XPCOMUtils.generateQI([Ci.nsIAboutModule]); } constructor() { Object.freeze(this); } getURIFlags(aURI) { return Ci.nsIAboutModule.ALLOW_SCRIPT; } newChannel(aURI, aSecurity_or_aLoadInfo) { let channel; if (Services.vc.compare(Services.appinfo.version, '47.*') > 0) { ...
Installing Extensions and Themes From Web Pages - Archive of obsolete content
Seamonkey. Themes Pretty much everything I've described applies to themes too, except you'll use the installChrome function. Because so many sites installed extensions by direct-linking the XPI file and relying on content handling to invoke the confirmation UI, many sites are (incorrectly) doing so for theme JAR files too and wondering why they aren't auto-detected and installed. Well, XPI is a Mozilla-specific extension and so we can have special handling for it, but JAR is not - not all .jar files are Firefox themes, so if you click on a .jar link you'll be shown the Save As decision dialog. For this reason you should always use the InstallTrigger API to install themes. A Note on updateEnabled() InstallTrigger exposes a function called updateEnabled that some of you may be calling before yo...
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
ods only work on the appropriate string class. You need to supply the appropriate conversion yourself. The Adopt and getter_Copies methods do not work on abstract strings. Instead of passing getter_Copies(aString) to a method expecting a character pointer out parameter, you will need to use a temporary variable and copy the result.Missing Headers Some headers are included from IDL files only when MOZILLA_INTERNAL_API is defined (actually, they shouldn't be there at all). For errors about undeclared do_CreateInstance: #include "nsComponentManagerUtils.h" For errors about undeclared do_GetService: #include "nsServiceManagerUtils.h" For errors about undeclared NS_GetSpecialDirectory: #include "nsDirectoryServiceUtils.h" Utility Classes Some utility classes could previously be created with NS_New*...
Offering a context menu for form controls - Archive of obsolete content
nsion, which was created specifically to demonstrate how to do this. There is ongoing discussion about this topic; please see bug 433168 for the latest information. Overlay the content The first thing to do is to establish an overlay over the chrome for the window in which you want to allow context menus on form controls. <overlay id="formcontrolcontextmenu-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://formcontrolcontextmenu/content/overlay.js"/> </overlay> Change the right-click behavior The overlaid code is responsible for adjusting the behavior of right-clicking on form controls. window.addEventListener("load", function() { let setTargetOriginal = nsContextMenu.prototype.setTarget; ...
Chapter 1: Introduction to Extensions - Archive of obsolete content
e quickly localized by anyone interested. This lowers the threshold both to using and to developing extensions; that fact, combined with Firefox's rapidly growing popularity, has created a positive feedback loop, with the number of extension users and extension developers growing explosively--there are now more than 7000 extensions and themes published at the Firefox Add-ons site (https://addons.mozilla.org). What you can do with extensions Let's look at what features extensions can add, and some actual examples of extensions. Single feature extensions FIXME: Update this. These are relatively simple extensions that add a single feature. Text Link Makes it so that double-clicking on an unlinked URL follows that URL. Undo Closed Tabs Button Adds a toolbar button to re-open the most rece...
Firefox addons developer guide - Archive of obsolete content
These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach. ...
Adding menus and submenus - Archive of obsolete content
when remote images are used. Menu items are not dynamically updated while they are open. For example, you could have a menuitem that tells you the current time and is updated every second. On other systems you would be able to see the item update itself without having to close the menu and then reopen. This is not the case on Mac OS. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Extensions support in SeaMonkey 2 - Archive of obsolete content
u may need to do different things depending on which application is running the extension. In JavaScript code You can use the following technique to detect the application: const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}"; const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}"; var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULAppInfo); if(appInfo.ID == FIREFOX_ID) { // running under Firefox } else if(appInfo.ID == THUNDERBIRD_ID) { // running under Thunderbird } else if(appInfo.ID == SEAMONKEY_ID) { // running under SeaMonkey } else { // another app } See Using nsIXULAppInfo for more details. In manifest file SeaMonkey uses...
Signing an extension - Archive of obsolete content
See Signing and distributing your add-on. This article describes how to digitally sign your extension for Firefox and Thunderbird, with a code signing certificate for Object Signing. The following instructions also apply to a theme and other XPI files. These instructions assume you're working on Mac and you've already got a valid certificate from CA. Get the signing tool We use NSS to sign an extension. This can be easily installed with MacPorts. ...
Supporting search suggestions in search plugins - Archive of obsolete content
not supported in Firefox, and are ignored. This enhancement request - the handling of a selected suggestion, namely calling of a full specified URL as proposed in the opensearch standard - is tracked in bug 386591. For example, if the search term is "fir", and you don't need to return descriptions or alternate query URLs, you might return the following JSON: ["fir", ["firefox", "first choice", "mozilla firefox"]] Note that in this example, only the query string and completion array are specified, leaving out the optional elements. Your completion list can include as many suggestions as you like, although it should be kept manageable, given that the display will be updating live while the user is typing their search string. In addition, the method you use to select suggestions is entirely up ...
Case Sensitivity in class and id Names - Archive of obsolete content
gns a name to an element. This name must be unique in a document. class = cdata-list [CS] This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters. The marker "[CS]" means "case sensitive," as defined in section 6.1 of the specification. Thus, the Mozilla team, committed to following open standards as closely as possible, implemented both class and id names as case-sensitive values. As of this writing, Netscape 6 is the only browser to honor this defined behavior; other browsers treat both class and id names as case-insensitive. ID Uniqueness There is a further restriction, however, on the use of id names. Section 12.2.1 makes it illegal for th...
Creating a dynamic status bar extension - Archive of obsolete content
"status-bar-sample-1", with the name of the new sample, "stockwatcher". If you need to brush up, visit the Chrome Manifest section. ...
MozBeforeResize - Archive of obsolete content
type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. ...
Install.js - Archive of obsolete content
ts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension. To make your extension install in Mozilla Suite, SeaMonkey, Mozilla Firefox pre-0.9 and Mozilla Thunderbird pre-0.7, you need to have an install.js file in the root of your XPI file. If you want your extension to install in Firefox 0.9 and later and/or Thunderbird 0.7 and later only, you don't need install.js, you need an install.rdf instead. See also this article from XulPlanet's Main Tutorial. There is a different sample install.js te...
Monitoring WiFi access points - Archive of obsolete content
This object is des...
Notes on HTML Reflow - Archive of obsolete content
L box. Its purpose is to convert HTML reflows their box analog. nsBoxToBlockAdaptor nsBoxToBlockAdaptor is a XUL box that wraps an HTML block frame, used to convert changes in the box layout into HTML reflows. Original Document Information Author(s): Chris Waterson Last Updated Date: December 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. ...
Blackwood - Archive of obsolete content
The Blackwood project, started by engineers at Sun Microsystems, is an attempt to better integrate the Java platform with the Mozilla browser. Blackwood consists of a series of Java-based extensions to Mozilla. Blackwood's mission is to put Java support in Mozilla on a par with JavaScript support. Active Subprojects Webclient Java DOM API Java Pluglet API Defunct Subprojects BlackConnect -- Blackconnect was superseeded by JavaXPCOM ...
Adding the structure - Archive of obsolete content
"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="BrowserPageInfo(null, 'securityTab')"/> </statusbar> The statusbar XUL element defines a horizontal status bar where informative messages about an application's state can be displayed. It can contain both text messages (i.e. "Done" in Mozilla when a document finishes loading) and graphical messages (f.e. the lock icon in Mozilla that shows whether or not a loaded document was encrypted with SSL). Status bars comprise a series of panels, each one defined by a statusbarpanel XUL element. Each status bar panel displays a different kind of status information. Graphical panels (like the one we are creating here that displays an icon) are ...
Enabling the behavior - updating the status bar panel - Archive of obsolete content
ibute("status", "success"); else icon.setAttribute("status", ""); } updateTinderboxStatus() retrieves a reference to the statusbarpanel element then searches through the retrieved HTML document (stored in the responseText property of the XMLHttpRequest instance) for one of several color references. The color red (represented by the RGB code EE0000) means a tinderbox client failed to build Mozilla. The color orange ("FFAAOO") means a client successfully built Mozilla, but the build failed tests. The color green ("11DD11") means the client successfully built and tested Mozilla. When it finds a color, it sets the panel's status attribute to the corresponding status, which causes the previously defined CSS rules to switch to the icon appropriate for that status. Because our conditional looks ...
Tinderbox - Archive of obsolete content
Tinderbox is a web tool for tracking the status of the Mozilla source code. It consists of a set of client machines that continuously build and test Mozilla and report their results back to a server that makes those results available via a web page. The tool enables mozilla.org to be immediately notified of changes to the code that prevent Mozilla from compiling and running (or compromise performance and footprint) so they can get someone to fix the problem or reverse the changes. Mozilla engineers regularly check Tinderbox before changing the code because changes are prohibited while the codebase is broken. The Mozilla sheriff, a rotating position responsible for watching the code and getting engineers to fix breakage, checks Tinderbox even more regularly. While it isn't difficult to loa...
install.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "install.rdf": <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>author@oftheme.com</em:id> <em:version>2.0b1</em:version> <!-- SeaMonkey --> <em:targetApplication> <Description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minVersion>2.0b1pre</em:minVersion> <em:maxVersion>2.0b2pre</em:maxVersion> </Description> </em:targetApplication> <!-- Front End MetaData --> <em:name>My_Theme</em:name> <em:description>My first theme</em:description> <!-- Front End Integration Hooks (used by Them...
Creating regular expressions for a microsummary generator - Archive of obsolete content
(as in our example URL) as well as when there are some characters between them. Matching another eBay URL We now have a regular expression that matches auction item URLs, including those with multiple query parameters in any order. But eBay uses a different style of URL in some cases (f.e. on its search results page). Here's a URL for the same item in that different style: http://cgi.ebay.com/Mozilla-Firefox-logo-1-inch-pin-badge-button-browser_W0QQitemZ280018439106QQihZ018QQcategoryZ2036QQcmdZViewItem To accommodate these URLs, we can create a second regular expression that matches them. As before, we should distinguish the components of the URL which are unique to the item from those which are common to all auction item URLs of this style. Here are several other URLs of this style: htt...
Dehydra Frequently Asked Questions - Archive of obsolete content
C++ codebase. If you encounter bugs or crashes, report them. Where does one report Dehydra bugs? Use this link to file bugs. For crashes reports attach a minimized input file. Use either a source files that rely on standard headers or a compressed .ii file (pass -save-temps to GCC to get .ii files). Where can I find JS code for real-life analyses for dehydra? Please see static checking scripts on mozilla-central. Note that some of the analyses may require Treehydra. Please see Building with static checking for more information about static checking builds in Mozilla. Does Dehydra provide any ADTs such as Map/Set? Yes. See libs/ directory in the Dehydra source ...
Drag and Drop Example - Archive of obsolete content
m flavour for the data instead of text. The problem with using text is that if the text from an external drag just happens to be set to button, a button will be created on the board. A custom type means that the board will only accept drags from the palette. ...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
element is available from the event object's target property. The event object is passed as the first argument to onDragStart. We create a TransferData object which can be used to hold all the data to be dragged. We add two pieces of data to the transfer data. The first is a string of HTML text and the second is a string of plain text. If the user drops onto an area which can accept HTML (such as Mozilla's editor window), the HTML flavour will be used and the text will appear bold. Otherwise, the plain text version will be used instead. Usually you will want to provide a text version of the data so that more applications can accept the data. The order that you define the flavours should be from the best match to the weakest match. In this case above, the HTML flavour (text/html) comes first and t...
Error Console - Archive of obsolete content
It reports JavaScript-related errors and warnings, CSS errors and arbitrary messages from chrome code. ...
Extension Frequently Asked Questions - Archive of obsolete content
ick set of answers to the most common issues with extension development. They are currently written with mostly Firefox in mind, but most if not all should easily translate to SeaMonkey, Thunderbird or any of the other applications. For Thunderbird, you may also find the extension HowTo or FAQ pages helpful. If you're looking for a place to get started, try our tutorial, Building an Extension or MozillaZine's Getting started tutorial. Use the Extension Wizard to generate a template to start with. Be sure to set the development preferences. TODO: Add content. Where can I get more help? Please see Extensions:Other Resources and Extensions:Community. Before asking for help, be sure to set the debugging prefs and check the Error Console for related messages. Also, don't forget to do at least a ...
Block and Line Layout Cheat Sheet - Archive of obsolete content
he PerFrameData of the inline frame that "owns" the span, or null if this is the root span. mFrame is initialized to the containing inline frame's PerFrameData when a new PerSpanData is pushed in nsLineLayout::BeginSpan. Original Document Information Author(s): Chris Waterson Last Updated Date: December 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. ...
Layout FAQ - Archive of obsolete content
Instructions are available at Jprof Readme On more recent linux versions sysprof can also be used. also lists some profiles. How do you find out if there are any reflows that are pending and wait to show the view until afterwards, but if none are pending, show the view immediately? What is the best way to determine whether there are any pending changes? On the reflow branch you could check the DIRTY and DIRTY_CHILDREN framestate flags. That won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown. ...
Style System Overview - Archive of obsolete content
searching the rule tree (only one rule this time) instead of rebuilding it. Lots of room for optimization here. (but beware DidSetStyleContext) The style system Style sheets & rules ? Rule tree ? Style context interface Original Document Information Author(s): David Baron Last Updated Date: June 6, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Firefox - Archive of obsolete content
One sees them on IRC or in bugs. ...
Help Viewer - Archive of obsolete content
Help Viewer: Allows information to be shown to the user inside Mozilla. Introduction Computers and software are incredibly complex. Naturally, then, everyone needs a little help now and then, and getting that help to the user is critical to making applications useful. Consequently, the Mozilla platform provides a cross-platform help viewer along with a framework for providing built-in help documentation. Mozilla's help viewer makes providing documentation an easy job, and this document will describe how you can use it. Help Viewer Project Page Articles & Tutorials Creating a Help Content Pack task-oriented, as opposed to spec-type stuff like the link below will be Other Resources Content Pack Specification a technical description of it, meant primarily to solidify the idea ...
Helper Apps (and a bit of Save As) - Archive of obsolete content
t for mailcap syntax. Possible KDE integration. Possibly reflecting the OS settings in our helper app preferences (readonly? writable?). Have a way for users to override things in the "not overridable" built-in list. Original Document Information Author(s): Boris Zbarsky Last Updated Date: September 12, 2002 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
CRMF Request object - Archive of obsolete content
e 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 the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. RFC 4211, the Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF), defines a certReqMessage. The object returned by generateCRMFRequest() contains one of those. ...
generateCRMFRequest() - Archive of obsolete content
e 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 the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. crmfObject = crypto.generateCRMFRequest("requestedDN", "regToken", "authenticator", "escrowAuthorityCert", "CRMF Generation Done Code", keySize1, "keyParams1", "keyGenAlg1...
importUserCertificates - Archive of obsolete content
e 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 the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. resultString = crypto.importUserCertificates("nicknameString","certString",forceBackup); Argument Description "nicknameString" This is the nickname that will be used to describe the certificate in the client's ...
popChallengeResponse - Archive of obsolete content
e 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 the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: The features mentioned in this article are deleted proprietary Mozilla extensions, and are not supported in any other browser. They won't work in Firefox 34 or later. Use <keygen> or the future Web Crypto API instead. resultString = crypto.popChallengeResponse("challengeString"); Argument Description "challengeString" A base-64 encoded CMMF POPODecKeyChallContent message. The current implementation does not conform to that defined in the CM...
Basics - Archive of obsolete content
displays important information to the user. The namespace for this class is jetpack.notificaitons. Methods show(titlestringbodystringiconstring)Draws a notification box. titleThe head of the notification message.string bodyThe messagestringfalse iconThe URL of an .ico file.string jetpack.notifications.show("hello world");var myBody = " My first message body on Jetpack";var myIcon = "http://www.mozilla.com/favicon.ico";jetpack.notifications.show({title: "My first message on jetpack", body: myBody, icon: myIcon}); Class Tabs In this class you can find information about the tabs in your Firefox window. The namespace for this class is jetpack.tabs. blah(lengthstringfocusedstringtoStringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text l...
Notifications - Archive of obsolete content
on to the user. The namespace for this class is jetpack.notifications. Methods show(titlestring, [body as string] iconstring)Draws a notification box. ...
slideBar - Archive of obsolete content
tent for the featureuri widthwidth of the content area and the selected slide sizeint persistdefault slide behavior when being selectedbool autoReloadautomatically reload content on selectbool onClickcallback when the icon is clickedfunction onSelectcallback when the feature is selectedfunction onReadycallback when featured is loadedfunction An example: jetpack.slideBar.append({ url: "http://mozilla.com", width: 150, onClick: function(slide){ slide.icon.src = "chrome://branding/content/icon48.png"; }}); ...
Litmus tests - Archive of obsolete content
If you're interested in automated testing, see Mozilla automated testing. Smoke Tests There are types of litmus tests. Smoke tests were the first developed. These were developed before litmus, but then pulled in. A "smoke test" is a quick check, done to verify the basic functionality of a certain feature, or a sanity check of the build process. BFTs, or Basic Functionality Tests This set of tests would take longer to run, but will cover an entire release. It may not cover it at much depth, but it does try to cover the major features. ...
Metro browser chrome tests - Archive of obsolete content
browser chrome test suite is an automated testing framework designed to allow testing of the immersive version of Firefox for Windows 8 and above using JavaScript. It currently allows you to run JavaScript code in the same scope as the immersive browser and report results using the same functions as the Mochitest test framework. Running the metro browser chrome tests To run Mochitest, first build Mozilla with your changes; then run ./mach mochitest-metro This will launch metro browser chrome tests in the default immersive browser. For information on setting your local build as the default, visit the Windows 8 Integration wiki page. It is possible to run individual tests as well. As with Mochitest, the path given as an argument is the path to a test file within the Mozilla source tree. If the path...
Nanojit - Archive of obsolete content
It's in the nanojit directory. The input for Nanojit is a stream of Nanojit LIR instructions. ...
Plug-n-Hack Get Involved - Archive of obsolete content
While this project has been started by the Mozilla Security Team and has been validated with Firefox and OWASP ZAP, this is an open project and we welcome involvement from anyone, especially people working on other browsers and security tools. If you would like to add PnH support to a browser or tool, or even get involved in onward PnH development, then please get in touch and we will give you whatever assistance we can. To contribute or keep up to date with Plug-n-Hack changes please joion the Mozilla Plug-n-Hack Google Group. You can also talk to the Mozilla Security Team about this project on the #websectools irc channel. Related links Plug-n-Hack Overview ...
Plug-n-Hack Phase1 - Archive of obsolete content
disble origin checks completely, or 'noport' to disable only port checks. Security tool commands manifest An example commands manifest (for OWASP ZAP) is: https://code.google.com/p/zap-extensions/source/browse/branches/beta/src/org/zaproxy/zap/extension/plugnhack/resource/service.json Firefox UI In Firefox the tool commands will be made available via the Developer Toolbar (GCLI) https://developer.mozilla.org/docs/Tools/GCLI A example of how the ZAP commands are currently displayed is: Note that user specified parameters can be specified for commands, which can either be free text, a static pull down list of options or a dynamic list of options obtained from the tool on demand. So if you select the "zap scan" command then you will be prompted to select a site from the list of sites currently know...
Plugin Architecture - Archive of obsolete content
ObjectLoadingContent::hasNewFrame). That function will post an event and when that fires, asks the frame to instantiate the plugin. ...
BlogPosts - Archive of obsolete content
Just Browsing: Mozilla Prism Update ThansCorner: Mozilla Prism - Webrunner with Pazzaz Mozilla Prism - A Revolution in Web Apps ThansCorner: Mozilla WebRunner 0.7 Site Specific Browsers WebRunner Using WebRunner WebRunner + Gears = Offline Desktop Reader WebRunner 0.5 WebRunner 0.5 - Mac Support WebRunner 0.5 - Linux Install WebRunner, Google Reader, and Google Notebook Distraction Free GTD - 32+ web app files for online todo lists Mozilla WebRunner: a one-window, tabless browser with no URL bar WebRunner becomes Prism - A Mozilla Labs Project Mozilla Labs: Prism Alex Faaborg: Prism Mozilla Prism: Bringing Web Apps to the Desktop Everyone should use Site Specific Browsers Mozilla Prism Portable (Spanish) Prism, l'avenir des applications Web selon Mozilla (French) Mozilla Prism : bundle cu...
Configuration - Archive of obsolete content
ified web profile and install the webapp to your Prism profile folder. ...
Styling - Archive of obsolete content
atform-specific styles. In this scenario, the CSS file is specific to an OS. This allows Prism webapps to take on an OS-specific look. To use platform-specific styles, create a folder in the bundle archive for each supported OS and place a webapp.css file in the folder. The folder names MUST match the following: Windows - winnt Mac OS X - darwin Linux - linux The folder names are pulled from Mozilla and are the same as those used in other Mozilla projects, such as extension and XUL applications. NOTE: you can also include a root level webapp.css which will be used if a platform-specific version is not found. ...
Hacking wiki - Archive of obsolete content
To be able to hack the MDC wiki software, you'll need a local webserver install, which can run MediaWiki. Checking out First, check out the <tt>developer.mozilla.org</tt> project from SVN. For anonymous access use: svn co http://svn.mozilla.org/projects/deve...lla.org/trunk/ To see the skins properly, you'll need to also check out <tt>mozilla-org/css</tt> to get the CSS files needed: export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>) Setting up Copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (Note: the folder itself) into the <tt>www</tt> directory on your server. The contents of the <tt>trunk</tt> directory you just checked out is a slightly modif...
Proxy UI - Archive of obsolete content
g an enabled item sets the menu selection and the proxy mode (network.proxy.type) Selecting a disabled item is not allowed. Selecting "Proxy Configuration..." opens the Preferences panel to "Advanced > Proxies" (TBdescribed: changing the prefs values). Unfiled bug: changing proxy mode does not update the menu. Mouseover When online, the tooltip will include the current proxy mode: Code http://mxr.mozilla.org/seamonkey/sou...ityOverlay.xul Bugs Bug 243624 Reference network.proxy.type ...
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. The Remote XUL Manager extension lets you manage this whitelist, which is maintained using nsIPermissionManager, by creating entries of type "allowXULXBL", like this: Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager) .add(uri, 'allowXULXBL', Components.interfaces.nsIPermissionManager.ALLOW_ACTION); See Using Remote XUL. OReillyNet Article, Part 1 OReillyNet Article, Part 2 Restrictions See Remote XUL bugs for needless restrictions, features which don't work in remote XUL (but in chro...
Remotely debugging Firefox for Metro - Archive of obsolete content
able remote tabs" for each open tab, and clicking it will attach the debugging tools to the web content hosted by that tab. If you want to debug your web content, you'll choose the relevant content tab. You'll see one entry under "Available remote processes": this is the browser process itself. You'll choose this option if you want to debug the browser's own code. Let's choose to attach to the mozilla.org website. The Toolbox will open in its own window, attached to the Firefox for Metro tab that's currently hosting mozilla.org: The Toolbox, and the tools it hosts (including the Console, Debugger, Style Editor, Profiler, etc.), work in just the same way as they do when attached to local content. ...
Remote debugging - Archive of obsolete content
a core file or can reproduce the crash as many times as needed. The developer can give you appropriate commands to type into the debugger. Examples: 367650, 374356, 393325, 418139 Debugging over IRC Find the developer on IRC and explain that you've caught the bug in a debugger. Since debugging usually requires printing many objects, this is much faster than debugging over Bugzilla. Use pastebin.mozilla.org for anything too long to paste into IRC. Examples: 391851 Share your computer with remote desktop Offer to let a developer control your computer using Remote desktop software such as VNC or Fog Creek Copilot. Share your computer in person If you happen to live in Mountain View, California, you can probably hand your laptop to a Mozilla developer for a bit. Examples: 496391, 476241 ...
Rsyncing the CVS Repository - Archive of obsolete content
Optionally, the --progress option will show the progress for each file, and a percentage of the total files that are transferred. At the time of this writing, this will take 2.8 GB of disk space. Note that for using this copy, the NoLocks line in CVSROOT/config will need to be commented out, as it requires a modified CVS binary. ...
Running Windows Debug Builds Downloaded From Tinderbox - Archive of obsolete content
because the application configuration is incorrect..." This is because the debug builds need the msvc80 crt debug dlls. You can see this by looking in at firefox.exe with http://www.dependencywalker.com/. Unfortunately these DLLs are not redistributable. To get these DLLs you only have to install the Visual C++ compilers from the Windows Vista SDK. No other packages are necessary. If you are a Mozilla employee or contractor, click for more instructions. To run tests of the tests package you can, for example, run the reftests as follows: python reftest/runreftest.py --appname=firefox/firefox.exe --utility-path=bin --extra-profile-file=bin/plugins reftest/tests/layout/reftests/reftest.list ...
SXSW 2007 presentations - Archive of obsolete content
Presentations about the Mozilla project given at the SXSW 2007 event in Austin, Texas. The Open Web - Brendan Eich Brendan Eich discusses the various issues related to the openness of the web and web standards, and explains Mozilla's position on the subject. ...
Safely loading URIs - Archive of obsolete content
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. ...
Same origin policy for XBL - Archive of obsolete content
The same origin policy used for XBL documents is different from the policy used for other content. This article provides a description of how the same origin policy for XBL works. When Mozilla needs to decide whether or not XBL is allowed to be loaded, it looks at the nsIPrincipal originating the load and the nsIURI to be loaded. Determining the originating principal The principal originating the load is determined using the following steps: For external stylesheets (<link>, <?xml-stylesheet?>, user sheets, and UA sheets), it depends on where the sheet is loaded from, just like it would for an HTML document loaded from a similar source. For inline stylesheets (<style> and style attributes), the principal of the element node involved (meaning the <style> element or the element whose style attrib...
Archived SpiderMonkey docs - Archive of obsolete content
This section contains old SpiderMonkey documentation. File objectNon-Standard Server-Side ObjectMerging TraceMonkey RepoThese are the steps to merge the TraceMonkey repository to mozilla-central. Between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.SpiderMonkey coding conventionsThe SpiderMonkey project owners enforce coding conventions pretty strictly during code reviews. ...
Standard Makefile Header - Archive of obsolete content
This header sets variables which tell the makefile where it is and where the source directory is, and then include autoconf.mk, to pick up makefile variables which are set during configuration. DEPTH = ../../../.. ...
String Quick Reference - Archive of obsolete content
...
Table Cellmap - Archive of obsolete content
At outside nsCellMap.cpp The border collapse code relies on the cellmap. The collapsing of rows and columns uses the cellmap. and finally the line iterator methods which are used for arrow navigation through a table. Original Document Information Author(s): Bernd Mielke Last Updated Date: September 27, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Table Layout Strategy - Archive of obsolete content
idth="40%"><col width="80%"><tbody></tbody>foobar <col width="40%"><col><tbody></tbody>foobar <table border width="200px"> <col width="40%"><col width="80%"> <tbody> <tr><td>foo</td><td>bar</td></tr> </tbody> </table> The algorithm tries to satisfy the requirements on a first come first serve base. The second table has <col width="40%"><col>. IE and Opera handle this pretty much the same as mozilla. Original Document Information Author(s): Bernd Mielke Last Updated Date: September 27, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Abc Assembler Tests - Archive of obsolete content
eleaseDebugger configurations. COMPARE_NUMBEREQ(name:String, expected:*, actual:*, fractionDigits:int=-1):void - Compare 2 Numbers up to FractionDigits This is to be used for high precision numbers that may vary slightly due to platform differences. Sample abcasm test /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limita...
The life of an HTML HTTP request - Archive of obsolete content
to do the drawing on. The rendering context implementation is a native class (nsGtkRenderingContext on unix) that knows how to draw in a window. TODO: Views, ViewManager, EventStateManager? Diagram created with DIA. Original Document Information Author(s): Alexander Larsson Last Updated Date: October 8, 1999 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
TraceVis - Archive of obsolete content
nsitions. The log can be postprocessed into a visualization that can be used to rapidly diagnose many tracing-related performance issues. So far, most of the documentation on TraceVis is contained in the announcement blog post. Prerequisites The visualization scripts require PIL (Python Imaging Library). Building with TraceVis These are the steps to build a JS shell with TraceVis, starting from a Mozilla source directory. These directions create an optimized build, because optimized builds are usually better for performance analysis. cd js/src autoconf213 mkdir opt-tracevis cd opt-tracevis ../configure --enable-tracevis make -j2 The resulting binary will be at dist/bin/js relative to the current directory. Running with TraceVis To run a shell with TraceVis: dist/bin/js -j -T /tmp/tracevis.log myp...
Tuning Pageload - Archive of obsolete content
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. ...
URIs and URLs - Archive of obsolete content
...
Uriloader - Archive of obsolete content
Uriloader: Responsible for the dispatch of content to content handlers as it comes in from the network. Overview of a URI load up though dispatch to a content handler Helper application tech talk MIME Type determination in Mozilla Overview of how downloads work ...
Venkman Internals - Archive of obsolete content
cation to set the breakpoint, and |parentBP| is an optional "future breakpoint" object to use as the parent for this breakpoint. If you set the breakpoint right from the jsdScript instead, you wouldn't see it in the Venkman UI, and you might confuse Venkman when the actual breakpoint was hit and it couldn't find a matching breakpoint object. You can see the prototype for this object at http://lxr.mozilla.org/mozilla/sourc...ebugger.js#914 scriptWrapper.jsdScript is the reference to the jsdIScript object for the function. sourceContext is the 5 lines of source text before the last instance of the word "function" on the line where this function starts. (not in 2006, seems to be computed on the fly in getSourceContext()). The full text of the file can be found in an array located at scriptWrapper.sc...
Binding Implementations - Archive of obsolete content
gs define the same method or property, then the most derived binding's method or property will be used. Because bindings extend DOM elements, they can override any built-in methods or properties on the DOM element. For example, a binding could override the setAttribute method on Element or the retrieval of the value property for an HTMLInputElement. The following is currently not implemented in Mozilla, it seems. See bug #373652 for some details. Implementations can be named using a name attribute specified on the implementation element. When an implementation has a name, that name can be used to disambiguate the desired method or property. Note: The following paragraphs suggest a syntax for how JavaScript might enable access to base class methods and properties. This is an open issue. Shoul...
DOM Interfaces - Archive of obsolete content
nymous children for. Return Value NodeList - The return value of getAnonymousNodes is a NodeList that represents the children of an element after insertion points from its own binding have been applied. This means that, depending on the details regarding the insertion points of the binding, it's possible that some non-anonymous nodes appear in the list. See "Not so anonymous nodes" on mozilla.dev.platform for some discussion about this. getAnonymousElementByAttribute The getAnonymousElementByAttribute methods retrieves an anonymous descendant with a specified attribute value. Typically used with an (arbitrary) anonid attribute to retrieve a specific anonymous child in an XBL binding. Parameters elt - The element to retrieve anonymous children for. attrName - The a...
confirm - Archive of obsolete content
NO_BUTTONS: Use this instead of the constants above to have standard 'Yes' and 'No' buttons. Warning: do not make any assumptions on the button placement - the underlying implementation can freely decide where each of the three buttons is placed. The following examples show the result of calling confirm() with three buttons 0='A', 1='B' and 2='C'. Firefox on Linux Mozilla Application Suite on Win32 It is therefore recommended to only use two buttons wherever possible, and to keep in mind that button 1 has the same return value as "window closed" (see below). aButton0Title Custom title for button 0. aButton1Title Custom title for button 1. aButton2Title Custom title for button 2. aCheckMsg A str...
deleteRegisteredFile - Archive of obsolete content
Method of Install object Syntax int deleteRegisteredFile (String registryName); Parameters The deleteRegisteredFile method has the following parameter: registryName The pathname in the Client Version Registry for the file that is to be deleted. Returns An integer error code. For a list of possible values, see Return Codes. Description The deleteRegisteredFile method deletes the specified file and removes the file's entry from the Client Version Registry. ...
execute - Archive of obsolete content
points into the XPI itself.) args A parameter string that is passed to the executable. (Ignored on Mac OS). See note below. blocking A boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes. Default is false. See note below. The blocking parameter is not available as part of this method in versions of Netscape before 6.1/Mozilla 0.9.3. Returns An integer error code. For a list of possible values, see Return Codes. Description The execute method extracts the named file from the XPI file to a temporary file name. Your code must call the performInstall method to actually execute the file. You can use this method to launch an InstallShield installer or any install executable file stored in a XPI file. Executing Instal...
getFolder - Archive of obsolete content
tFolder. Returns A FileSpecObject representing one of Netscape's standard directories, or NULL in case of error or if subDirectory refers to a file that already exists. Description The getFolder method obtains an object representing one of Netscape's standard directories, for use with the addFile and getWinProfile methods. ...
Return Codes - Archive of obsolete content
Name Code Explanation SUCCESS 0 Success. REBOOT_NEEDED 999 The files were installed, but one or more components were in use. Restart the computer and the application to complete the installation process. On Windows NT, you may only need to restart the application as long as you did not replace operating system files. ...
getValue - Archive of obsolete content
Retrieves the value of an arbitrary key. Method of WinReg object Syntax WinRegValue getValue ( String subkey, String valname); Parameters The getValue method has the following parameters: subkey The key path to the appropriate location in the key hierarchy, such as "Software\\Netscape\\Navigator\\Mail". valname The name of the value-name/value pair whose value you want. Returns A WinRegValue object representing the value of the named value-name/value pair or null if there is no value or if there is an error. See WinRegValue for information about these values. Description The getValue method retrieves the value of an arbitraty key. ...
keyExists - Archive of obsolete content
Exists ( string key); Parameters The method has the following parameter: key A string representing the path to the key Returns Boolean value Description If the user does not have read access to the given key, this will also return false. Example winreg = getWinRegistry(); if ( winreg != null ) { winreg.setRootKey( winreg.HKEY_LOCAL_MACHINE); if(winreg.keyExists("SOFTWARE\\mozilla")) { //keyExists returned true } else { //keyExists returned false } } ...
setValue - Archive of obsolete content
Sets the value of an arbitrary key. Method of WinReg object Syntax String setValue ( String subkey, String valname, WinRegValue value); Parameters The setValue method has the following parameters: subkey The key path to the appropriate location in the key hierarchy, such as "Software\\Netscape\\Navigator\\Mail". valname The name of the value-name/value pair whose value you want to change. value A WinRegValue object representing the new non-string value. See WinRegValue for information about these values. Returns 0 if it succeeded; a nonzero number if it failed to schedule the action. For a list of possible values, see Return Codes. ...
valueExists - Archive of obsolete content
e following parameters: key A string representing the path to the key. ...
Installer Script - Archive of obsolete content
"6.0.0.2000110807", 28. "bin", // jar source folder 29. communicatorFolder, // target folder 30. "", // target subdir 31. true ); // force flag 32. logComment("addDirectory() returned: " + err); 33. // create the plugins folder next to mozilla 34. var pluginsFolder = getFolder("Plugins"); 35. if (!fileExists(pluginsFolder)) 36. { 37. var ignoreErr = dirCreate(pluginsFolder); 38. logComment("dirCreate() returned: " + ignoreErr); 39. } 40. else 41. logComment("Plugins folder already exists"); 42. var cf = getFolder("Chrome"); 43. registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"t...
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 ...
XTech 2006 Presentations - Archive of obsolete content
into its UI, starting with bookmark labels. SVG and Canvas: Graphics for Web Apps - Vladimir Vukicevic This presentation examines some of the strengths and weaknesses of the HTML 'canvas' and SVG for adding rich graphical capabilities to web applications. 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 Disruptiv...
autocompletesearch - Archive of obsolete content
<< XUL Reference home autocompletesearch New in Thunderbird 2Requires SeaMonkey 1.1 Type: space-separated list of values A space-separated list of search component names, each of which implements the nsIAutoCompleteSearch interface. The components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute. search-autocomplete Requires SeaMonkey 2.1 The user's default search engine's suggestions are searched. places-tag-autocomplete Requires SeaMonkey 2.1 The user's Places tags are searched. mydomain New in Thunderbird 3 Requires SeaMonkey 2.0 The user's email domain is suggested. history Requires SeaMonkey 2.0 The user's URL history is searched. form...
icon - Archive of obsolete content
Archive › Mozilla › XUL › Attribute › icon
Some platforms display these buttons with a small icon indicating their usage. This should be used in place of the image attribute. Possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. If you are using a button that matches one of these common usages, use the icon attribute to indicate this. ...
onchange - Archive of obsolete content
script context at this point can only access the following things: Global Values/Functions i.e. ...
persist - Archive of obsolete content
Persistence can also be stored using the document.persist function. ...
preference-editable - Archive of obsolete content
The preference attribute may be used to connect to a preference element. This is useful for custom elements implemented in XBL. The element should fire change, command, or input event when the value is changed so that the preference will update accordingly. ...
statustext - Archive of obsolete content
This attribute serves only as a place to keep the text. In Firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. ...
treecol.type - Archive of obsolete content
text The content of the columns is text. If you are using type="checkbox", then the tree and each treecol must be editable. ...
wait-cursor - Archive of obsolete content
true to have the cursor switch to a waiting cursor while the mouse is hovering over the element. Usually, you would only use this on the window element or other top-level elements. ...
windowtype - Archive of obsolete content
<< XUL Reference home windowtype Type: string Set to a string which can be used to identify the type of window. This might be used, for example, to distinguish between a browser window and an editor window. Some of Mozilla's window handling functions use this attribute to group windows of the same type together. Values for window type as found on MXR: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - Looks like if window has gBrowser it has this window type devtools:scratchpad - Scratchpad windows navigator:view-source - The view source windows ...
Deprecated and defunct markup - Archive of obsolete content
(old/experimental and unsupported XUL tags) <treerows> (internal use only; part of XBL for <tree>) Attributes @debug="true" provided struts and springs around boxes to facilitate identification of flex issues but does not seem to work now You need a special DEBUG_LAYOUT build --Neil 03 March 2011 References XUL Element Reference by Neal Deakin Rapid Application Development With Mozilla, by Nigel McFarlane ...
How to Quit a XUL Application - Archive of obsolete content
getService(Components.interfaces.nsIAppStartup); // eAttemptQuit will try to close each XUL window, but the XUL window can cancel the quit // process if there is unsaved data. eForceQuit will quit no matter what. ...
appendNotification - Archive of obsolete content
function testNotificationBoxWithButtons() { //Create some common variables if they do not exist. // This should work from any Firefox context. // Depending on the context in which the function is being run, // this could be simplified. if (typeof window === "undefined") { //If there is no window defined, get the most recent. ...
Other Resources - Archive of obsolete content
Demostrates flexing, layouts, set up of trees and such. Very useful. ...
ContextMenus - Archive of obsolete content
The triggerNode is retrieved and examined to see if it is an image. The nsIImageLoadingContent interface is implemented by all types of images. This is useful instead of comparing the tag, as several different tags support images. The test also checks to ensure that the element ha...
Panels - Archive of obsolete content
element The panel element is used to create panels. The panel will display whatever elements are placed as children of the panel element. For example, the following panel displays a textbox for entering a name. Note that the panel is not placed in a separate file and is instead placed inside another window. <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="Details" type="panel"> <panel id="search-panel"> <label control="name" value="Name:"/> <textbox id="name"/> </panel> </button> </window> Many panels will be associated with a button, as in this example. When the button is pressed, the panel is opened. Clicking outside the panel or pressing Escape will close the panel. You...
builderView - Archive of obsolete content
<< XUL Reference builderView Type: nsIXULTreeBuilder A reference to the tree builder which constructed the tree data. The builder provides access to the RDF resources for each row in the tree, and allows sorting the data by column. In newer versions of Mozilla, the builderView property is actually a synonym for the view property, since the two interfaces are flattened together into a single interface in JavaScript. This property is read-only. ...
contentView - Archive of obsolete content
- that is, those that do not have flags set -- the contentView will be a reference to the nsITreeContentView for the tree. This interface lets you retrieve the DOM element corresponding to a given a row index and vice versa. For trees that are not built with a content builder, the functions of nsITreeContentView will not be available, since there are no DOM nodes to retrieve. In newer versions of Mozilla, the contentView property is actually a synonym for the view property, since the two interfaces are flattened together into a single interface in JavaScript. This property is read-only. ...
controllers - Archive of obsolete content
<< XUL Reference controllers Type: nsIControllers A controllers list attached to the element. The controllers are used to respond to commands. The document's command dispatcher will locate controllers to handle a command by using the focused element's list. ...
datasources - Archive of obsolete content
...
inputField - Archive of obsolete content
<< XUL Reference inputField Type: textbox element In Mozilla, the XUL textbox is implemented as a wrapper around an HTML input element. This read only property holds a reference to this inner input element. ...
selstyle - Archive of obsolete content
...
Notes - Archive of obsolete content
A blog post. ...
Sorting and filtering a custom tree view - Archive of obsolete content
example RDF-backed or ones created with DOM methods. For the sake of simplicity, strings are not localized and the data loaded is hard coded. Because of bug 340478, this code will only work from privileged script. ...
Additional Navigation - Archive of obsolete content
to any part of the RDF data that is necessary in order to get the right results. Usually, however you will want to iterate only over the children of a node using a member tag and instead use a triple or binding for each predicate of each child that you wish to display. This is the way that the template system was originaly designed to be used and many of the datasources used by Firefox and other Mozilla products work with datasources in this way. Retrieving Parents A very uncommon form of navigation you can also do is to navigate upwards using a member tag, that is to get all the parents of a node, as in this example: <query> <content uri="?start"/> <member container="?parent" child="?start"/> </query> This might be used, for instance, to start at a particular photo and find all of the c...
Attribute Substitution - Archive of obsolete content
is that this code path for bindings doesn't handle the textnode element properly. Thus, if you use a variable set in a binding, you must ensure the datasource is loaded before the template is built, or just rebuild the template. Another possibilty is to rearrange the RDF such that the values, in this example, the descriptions, are specified before the containers. This issue is fixed in Firefox 3 (Mozilla 1.9) and later. << PreviousNext >> ...
Introduction - Archive of obsolete content
cifies the datasource 'http://www.xulplanet.com/ds/sample.rdf', using the datasource type rdf as indicated by the querytype attribute'. We'll look at RDF datasources first. The template builder loads an RDF datasource using the RDF service in the same way as you would create a datasource through the RDF service directly. The datasource is loaded via its URL. Some RDF datasources are provided with Mozilla -- their URL's start with 'rdf:'. Otherwise, the datasource is loaded as any other URL is loaded. If the datasource is already loaded and cached, the template builder can begin work right away. Otherwise, there isn't anything to do until the data is loaded. Actually, this isn't quite true. The RDF service starts the loading of the datasource in the background, and the template builder goes throug...
RDF Modifications - Archive of obsolete content
ditional types may support automatic updating. There are two main situations when the notifications are made. The first is when the modification functions on the datasource are called. There are four such functions: 'Assert', to add a new triple (or arrow) to the RDF graph, 'Unassert' to remove a triple, 'Change' to adjust the target of a triple, and 'Move' to adjust the source of a 'triple'. For Mozilla's datasources, the latter two just Unassert the old triple and add a new one, creating the effect of changing the value. However, only one notification is made. For instance, an Assert call looks like the following: var source = RDF.GetResource("http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"); var predicate = RDF.GetResource("http://purl.org/dc/elements/1.1/description"); var target = RD...
Sorting Results - Archive of obsolete content
similar to using a variable but any predicate may be used, not just one that is used in the template. Changing the Sort To change the sorting for a template's generated contents, you can either change the sort related attributes and rebuild the template, or you can call the sort method of the sort service: var listbox = document.getElementById("aListBox"); var sortService = Components.classes["@mozilla.org/xul/xul-sort-service;1"]. getService(Components.interfaces.nsIXULSortService); sortService.sort(listbox, "?gender", "descending"); This code will sort a listbox by title in a descending order. The arguments to the sort method specify the root node (the listbox), the sort key and the sort direction. << PreviousNext >> ...
Template Builder Interface - Archive of obsolete content
te-guide-photos5.rdf template-guide-streets.rdf"> Sometimes, you will want to calculate the datasource to be used and attach it to the template later. You can do this using the composite datasource's AddDataSource method. You can add as many datasources as you wish, and you can remove them using the RemoveDataSource method. A common pattern is to use the following: var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); var ds = RDF.GetDataSource("http://www.xulplanet.com/ndeakin/tests/xul/template-guide-streets.rdf"); var tree = document.getElementById("theTree"); tree.database.AddDataSource(ds); tree.builder.rebuild(); This is the typical way to add a datasource to an element, in this case to the tree with the id 'theTree'...
XML Templates - Archive of obsolete content
An XML document will be loaded and XPath expressions may be used to take portions of the XML document and generate content from these. When an XML source is desired, specify a querytype attribute on the root node of the template to the value xml. This indicates to the template builder that an XML source is being used as that the queries use syntax that is specific to XML. The datasources attribute should be set to the URL of an XML document, either a local file or a remote web site. ...
Adding Buttons - Archive of obsolete content
ndfile.xul example Let's add this code to the file findfile.xul that we created in the previous section. The code needs to be inserted in-between the window tags. The code to add is shown in red below: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button id="find-button" label="Find"/> <button id="cancel-button" label="Cancel"/> </window> You'll notice that the Cancel button was added also. The window has been given a horizontal orientation so that the two buttons appear beside each other. If you open the file in Mozilla, you should get something like the image shown here. Note: You...
Adding Methods to XBL-defined Elements - Archive of obsolete content
be escaped because otherwise it would look like the start of a tag. You can also use a CDATA section to escape the entire block of code. You can call the method by using code such as element.getMaximum(5, 10) where element is a reference to an element defined by the XBL containing the getMaximum method. (The bound element.) The parameter tag allows you to define parameters for a method. Because Mozilla uses JavaScript as its scripting language, and JavaScript is a non-typed language, you do not need to specify the types of the parameters. However, in the future, other languages may be used with XBL. Methods are only available to call after the page is rendered, which may cause problems if using createElement. For example, the following code will probably fail: var element = document.createEle...
Additional Install Features - Archive of obsolete content
error occured during the last operation. If an error occurs, you will likely want to abort the installation. You may also want to display an error message to the user. For example, you might put the following as the last section of your script: if (getLastError() == SUCCESS) { performInstall(); } else { cancelInstall(); } Error codes that could be returned by getLastError() are listed in the Mozilla source file nsInstall.h. During installation, a log file is created that contains the operations that are performed. It will also show any errors that occured. The log file can be found in the file 'install.log' in the Mozilla installation directory. A block of text will be added to this file for each installation that occurs. The logComment() function can be used to write a string of text to the...
Box Model Details - Archive of obsolete content
will be centered in the box in both directions. This example will work with a vertical box as well, although the second button will be underneath the first one, instead of beside it. ...
Features of a Window - Archive of obsolete content
at 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/gatekeeper/there.is.only.xul"> In this example, the window will open with a width of 400 pixels and a height of 450 pixels. Even if there aren't enough elements to fit this size, the window will still open at this size and there will be blank space in the remaining area. If there are too many elements, the window will not be large enough to fit the elements. The user will have to r...
Focus and Selection - Archive of obsolete content
e focus related features of the command dispatcher. You can retrieve the command dispatcher from a window using the document's commandDispatcher property. From there, you can get the focused element with the dispatcher's focusedElement property. The example below shows this. ...
Groupboxes - Archive of obsolete content
> <description value="Kiwi"/> </groupbox> This will cause four pieces of text to be displayed surrounded by a box with the label Answer. Note that the groupbox has a vertical orientation by default which is necessary to have the text elements stack in a single column. More complex captions You can also add child elements inside the caption element to create a more complex caption. For example, Mozilla's Font preferences panel uses a drop-down menu as a caption. Although any content can be used, usually you would use a checkbox or dropdown menu. Example 2 : Source View <groupbox flex="1"> <caption> <checkbox label="Enable Backups"/> </caption> <hbox> <label control="dir" value="Directory:"/> <textbox id="dir" flex="1"/> </hbox> <checkbox label="Compress archived files"...
List Controls - Archive of obsolete content
ot enter your own text by typing it in. A variant of the menulist allows editing the text in the field. For example, the URL field in the browser has a drop-down for selecting previously typed URLs, but you can also type them in yourself. To create an editable menulist, add the editable attribute as follows: Example 6 : Source View <menulist editable="true"> <menupopup> <menuitem label="www.mozilla.org" /> <menuitem label="www.xulplanet.com" /> <menuitem label="www.dmoz.org" /> </menupopup> </menulist> The URL field created here has three pre-populated choices that the user can select or they can enter one of their own by typing it into the field. The text the user enters is not added as a new choice. Because the label attribute was not used in this example, the default value wi...
Modifying the Default Skin - Archive of obsolete content
n by default, and you may download others. The XUL for any skins is the same, however the style sheets and images used are different. For a simple personalized look to a Firefox window, you can easily change the style sheets associated with it. Larger changes can be done by creating an entirely new skin. Firefox has a Theme Manager for changing the default skin. (Although the underlying code for Mozilla calls them skins and the user interface calls them themes, they're both referring to the same thing). A skin is described using CSS, allowing you to define the colors, borders and images used to draw elements. The file classic.jar contains the skin definitions. The global directory within this archive contains the main style definitions for how to display the various XUL elements. By changing th...
More Wizards - Archive of obsolete content
checkCode() is called whenever the first page is shown as indicated by the onpageshow attribute. It is also called whenever a key is pressed in the textbox, to determine whether the Next button should be enabled again. ...
Open and Save Dialogs - Archive of obsolete content
displaying a dialog in one of the three modes. You can set a number a features of the dialog by using the interface. When the dialog is closed, you can use the interface functions to get the file that was selected. Creating a file picker To begin, you need to create a file picker component and initialize it. var nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init(window, "Select a File", nsIFilePicker.modeOpen); First, a new file picker object is created and stored in the variable 'fp'. The 'init' function is used to initialize the file picker. This function takes three arguments, the window that is opening the dialog, the title of the dialog and the mode. The mode here is modeOpen which is used ...
Scrolling Menus - Archive of obsolete content
If the available space is too small, arrows will appear on each end of the menu. ...
Splitters - Archive of obsolete content
You can also hide the sidebar by clicking the notch. Splitter element This feature is accomplished using an element called a splitter. It creates a skinny bar between two sections which allows these sections to be resized. ...
Stacks and Decks - Archive of obsolete content
s the result of drawing the same text 'Shadowed' again but slightly offset from the other. The second description element is drawn in red so the effect is more visible. This method has advantages over using text-shadow because you could completely style the shadow apart from the main text. It could have its own font, underline or size. (You could even make the shadow blink). It is also useful as Mozilla doesn't currently support CSS text shadowing. A disadvantage is that the area taken up by the shadow makes the size of the stack larger. Shadowing is very useful for creating the disabled appearance of buttons: Example 2 : Source View <stack style="background-color: #C0C0C0"> <description value="Disabled" style="color: white; padding-left: 1px; padding-top: 1px;"/> <description value="Disab...
Toolbars - Archive of obsolete content
<< PreviousNext >> A toolbar is usually placed along the top of a window and contains a number of buttons that perform common functions. XUL has a method to create toolbars. Adding a Toolbar Like a number of elements, XUL toolbars are a type of box. Usually, a row of buttons would appear in the toolbar, but any element can be placed in a toolbar. For example, the Mozilla browser window contains a textbox that displays the page URL. Toolbars may be placed on any side of the window, either horizontally or vertically. Of course you wouldn't normally put a textbox in a vertical toolbar. Actually, because toolbars are just boxes they can actually go anywhere you want, even in the middle of a window. Typically however, a set of toolbars would appear along the top of a window. When more t...
XBL Attribute Inheritance - Archive of obsolete content
t will update the textbox and button also. You can add the inherits attribute to as many elements as you wish, to inherit any number of attributes. Note how the inherits attribute has been placed in the XBL namespace, by prefixing it with 'xbl:'. The namespace should be declared somewhere earlier, usually on the bindings element. The next example demonstrates this. <bindings xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <xbl:binding id="buttonBinding"> <xbl:content> <xul:button label="OK" xbl:inherits="label"/> </xbl:content> </xbl:binding> In this example, the button inherits the label attribute, but this attribute is also given a value directly in the XBL. This technique is used to set the default value if t...
XUL Tutorial - Archive of obsolete content
This tutorial describes XUL, the XML User-interface Language. This language was created for the Mozilla application and is used to describe its user interface. Introduction Introduction XUL Structure The Chrome URL Manifest Files Simple Elements Creating a Window Adding Buttons Adding Labels and Images Input Controls Numeric Controls List Controls Progress Meters Adding HTML Elements Using Spacers More Button Features The Box Model The Box Model Element Positioning Box Model Details Groupboxes Adding More Elements More Layout Elements Stacks and Decks Stack Positioning Tabboxes Grids Content Panels Splitters Toolbars and Menus Toolbars Simple Menu Bars More Menu Features Popup Menus Scrolling Menus Events and Scripts Adding Event Handl...
Using the Editor from XUL - Archive of obsolete content
r> element is really just an <iframe> which takes over some of the task of creating the editor from JavaScript. Editor creation So let's trace through the process of editor creation when bringing up the composer window. You can find the relevant XUL parts in editor.xul, the JavaScript parts in editor.js, and the XBL binding for the editor element in editor.xml. Something, somewhere, tells Mozilla to open the composer window. editor.xul is loaded. In editor.xul, the <window> tag has an onload handler: onload="EditorOnLoad()". That causes the EditorOnLoad() JavaScript function to get executed when the XUL is done loading. The XUL contains an <editor> tag, e.g.: <editor type="content-primary" id="content-frame" src="about:blank" flex="1"/> The attribute type="content-primary" identi...
XUL Changes for Firefox 1.5 - Archive of obsolete content
h support several panels, each of which may be contained in the same file or a separate file. A set of icons will appear across the top of the dialog allowing the user to switch panels. Along with the new preference elements and some additional attributes for existing elements, they make it easy to set preferences without having to use code. For more information, see Preferences System. bfcache Mozilla now caches the page's DOM, so that navigating back and forward does not reload the page, making navigation much more efficient. The pageshow and pagehide events are used when switching from a page in the cache, while the load and unload events are used only when the page is loaded or unloaded. For more information see Using Firefox 1.5 caching. tabIndex The tabIndex property is now applied to ...
XUL FAQ - Archive of obsolete content
Other FAQs you may be interested in: Extension FAQ, ... If your question is not answered here, you can try looking for the answer in the XUL documentation or ask in the XUL newsgroup. Are there decent visual editors for laying out XUL applications? There are no production-quality visual editors available for XUL. The recommended way is to edit XUL by hand, possibly with the help of a good text or XML editor. Ted Mielczarek's Live XUL Editor (also part of Extension Developer's Extension) often proves useful. ...
XUL Parser in Python/source - Archive of obsolete content
Source code for the XUL Parser in Python. import sys, glob, xmllib import os, re el_list = {} w = open('res.html', 'w') # Unfortunately, I had to put this hack in here to suppress the printing out of the resolved namespace: # "xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul window", etc. def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class XULParser(xmllib.XMLParser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = XULParser() cmd = 'dir /s /b *.xul' CHROME_DIR = 'C:\Program Files\Netscape\Netscape 6\chrome' os.chdir(CHROME_DIR) files = os.popen(cmd).readlines() for file in f...
The Implementation of the Application Object Model - Archive of obsolete content
ree. In other words, it makes sense to have two parallel languages, one for describing applications, and the other for describing documents that can be used by those applications. It does not make sense to confuse or obscure the purpose of HTML by adding in a whole slew of new functionality that hasnothing to do with the display of Web pages. What content developers want from the next release of Mozilla is a standards-compliant browser. If we ship a browser that does not have 100% support for CSS2, for example, but we've extended HTML by adding 20-30 new tags, people are going to put down their blinders and see only the fact that we were off adding a whole slew of new stuff to HTML when we could have been firming up our standards story. By making XUL a separate beast, this is less of an issue. S...
XUL Coding Style Guidelines - Archive of obsolete content
JavaScript code shall be moved out of XUL. DTD declaration. predefined Entities. Other guidelines mentioned in XHTML 1.1 Recommendation. See details here. Making XUL localizable -- mandatory In the past, UI (display) related resource descriptions are stored in *.rc (for Windows client) or *.ad (for UNIX client) so that they can be localized for a specific language or culture. In the new world, Mozilla 5.0, this is not true any more. Most of the windows and dialogs in Mozilla will be described using XUL. To make XUL stream/file localizable, several guidelines are to be adopted to make the translation work easier and less error-prone. The issues are discussed in details here: What is localizable? Widget resources Content data Style info Layout geometry How to make them localizable? Localizat...
bindings - Archive of obsolete content
More information is available in the Template Guide. ...
button - Archive of obsolete content
sclosure triangle. extra1 An optional additional button. extra2 A second optional additional button. group Type: string group name Buttons with type="radio" and the same value for their group attribute are put into the same group. Only one button from each group can be checked at a time. If the user selects one the buttons, the others in the group are unchecked. icon Mozilla 1.8 Type: string This attribute should be used to set the usage for common buttons. Some platforms display these buttons with a small icon indicating their usage. This should be used in place of the image attribute. Possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-colo...
colorpicker - Archive of obsolete content
script context at this point can only access the following things: Global Values/Functions i.e. window, document, or any of the functions/objects/variables bound to the window object Event object Example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myFunction(e){ /* Do something cool here or just say the below */ alert(e.target.nodeName); } </script> <textbox id="find-text" onchange="return myFunction(event);"/> </window> preference Type: id Connects the element to a corresponding preference. This attribute only has any ...
conditions - Archive of obsolete content
efine conditions for the rule. Within the conditions can be placed content, member and triple elements. These may have attributes whose value is a variable name beginning with a question mark (?). When evaluating the rule for a particular RDF resource, the variables are replaced with values from the resource. If all variables can be replaced, the rule matched. This element is used with Firefox 2/Mozilla 1.8 and earlier instead of the query element. More information is available in the XUL tutorial. Examples (example needed) Attributes Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, l...
datepicker - Archive of obsolete content
alue property may be used to retrieve and set the date using a Date object. In addition, the date, month and year properties may be used to retrieve and modify each component of the date separately. !!Attention: there is also a datepicker in TB-calendar with differing definitions for members (value is a Date there) The change event is fired whenever the date is changed. However, as described in Mozilla bug #799219, a change event handler may encounter erratic behavior when the date is changed using the keyboard instead of the mouse. To avoid this, you can use the workaround described here, i.e., use window.setTimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers. A monthchange event is fired for the grid and popup ...
dialog - Archive of obsolete content
uttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultButton, title Properties buttons, defaultButton Methods acceptDialog, cancelDialog, centerWindowOnScreen, getButton, moveToAlertPosition Examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="Dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="Cancel" buttonlabelaccept="Save"> <dialogheader title="Options" description="My preferences"/> <groupbox> <caption label="Colour"/> <radiogroup> <radio label="Red"/> <radio label="Green" selected="true"/> <radio label="Blue"/> </radiogroup> <label value="Nickname"/> ...
dialogheader - Archive of obsolete content
tes | Properties | Methods | Related ] A heading row for a dialog box. This element should be placed inside a dialog element. The header may have a title and a description. Attributes crop, description, title Examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="Dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <dialogheader title="My dialog" description="Example dialog"/> <!-- Other widgets --> </dialog> Attributes crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cr...
editor - Archive of obsolete content
The editor does not provide any editing user interface; you would supply that yourself. However, text editing, image resizing, and table row and cell editing capabilities are provided. ...
grid - Archive of obsolete content
Archive › Mozilla › XUL › grid
If you are looking for information on CSS Grids, you should go to our CSS Grid Layout page instead. << XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] A grid is a layout type that arranges elements in rows and columns. The grid is expected to contain both a columns element as a child which defines the structure of the columns and a rows element as child to define the rows. The size and attributes defined on columns and rows will affect the size and placement of elements in each cell. Elements placed within both the columns and rows will be displayed, although usually only elements will be placed inside one of these. ...
menuitem - Archive of obsolete content
"checkbox" or "radio". checked Type: boolean Indicates whether the element is checked or not. Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. Note: if the checked attribute is set to true, and you persist its value via the persist attribute, Mozilla will fail to persist its value when the menuitem is unchecked because of bug 15232. A workaround is to set the autocheck attribute to false, then programmatically set the checked attribute when the user selects the item, and set it to false instead of removing the attribute (i.e. do menuitem.setAttribute("checked", "false") instead of menuitem.removeAttribute("checked")) when the user unchecks th...
menupopup - Archive of obsolete content
onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top Properties accessibleType, anchorNode, popupBoxObject, position, state, triggerNode Methods hidePopup, moveTo, openPopup, openPopupAtScreen, setConsumeRollupEvent, showPopup, sizeTo Examples The following example shows how a menupopup may be attached to a menulist. <menulist> <menupopup> <menuitem label="Mozilla" value="http://mozilla.org"/> <menuitem label="Slashdot" value="http://slashdot.org"/> <menuitem label="Sourceforge" value="http://sf.net"/> <menuitem label="Freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> The following example shows how a menupopup can be used as a context menu for an element. When the label is right-clicked, the menu will be displayed. <men...
notificationbox - Archive of obsolete content
rrent context's window object Here, chromeWin is the XUL window (usually just window), and notifyWindow is the web content window for the tab you want to find the notification box for. Also it is possible to call function with the same name (they are different) of global object gBrowser: notifyBox = gBrowser.getNotificationBox() Examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> There is a more complex code available in the Code Snippets area. Properties currentNotification, allNotifications, notificationsHidden Methods appendNotification, getNotificationWithValue, removeAllNotifications, removeCurrentNotification, removeNotification, removeTransientNotifications, Attributes Inherited from XUL element align, alloweven...
preference - Archive of obsolete content
script context at this point can only access the following things: Global Values/Functions i.e. window, document, or any of the functions/objects/variables bound to the window object Event object Example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myFunction(e){ /* Do something cool here or just say the below */ alert(e.target.nodeName); } </script> <textbox id="find-text" onchange="return myFunction(event);"/> </window> readonly Type: boolean If set to true, then the user cannot change the value of the element. However...
resizer - Archive of obsolete content
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. ...
textbox - Archive of obsolete content
yText 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. increment Type: integer Gets and sets the value of the increment attribute. inputField Type: textbox element In Mozilla, the XUL textbox is implemented as a wrapper around an HTML input element. This read only property holds a reference to this inner input element. label Type: string Sets the label attribute. Gets the label attribute if it is present and not empty. Otherwise it returns the value of the associated label element, if applicable. Otherwise it returns the placeholder or emptyText property. The ge...
timepicker - Archive of obsolete content
etrieved and changed using the value property or the dateValue property. The former specifies the time as a string of the form HH:MM:SS whereas the latter specifies the time as a Date object. In addition, the hour, minute and second properties may be used to retrieve and modify each component of the time separately. The change event is fired whenever the time is changed. However, as described in Mozilla bug #799219, a change event handler may encounter erratic behavior when the time is changed using the keyboard instead of the mouse. To avoid this, you can use the workaround described here, i.e., use window.setTimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers. Attributes disabled, hideseconds, increment, re...
titlebar - Archive of obsolete content
e. If you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element. The titlebar will send a command event after the move is complete. Examples This XUL file will create a HUD-style window that can be moved with the mouse. It will close if the mouse button is released. ...
toolbox - Archive of obsolete content
utorial. If you'd like to detect when toolbars in a toolbox are changed, see Toolbar customization events. ...
treecol - Archive of obsolete content
fy a label for use in the column picker if ignoreincolumnpicker is not true and hidecolumnpicker is not true on the tree. type Type: one of the values below The type of tree column. The default is a text column that displays the content as text. checkbox The content of 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 acce...
Components - Archive of obsolete content
istered. Registration Most initial problems with components are due to registration. For new components or interface changes of existing ones to be noticed at all, you need to change the buildID in application.ini to trigger a re-registration of the components. Alternatively, you can delete compreg.dat and xpti.dat in the user profile directory - that of your XULRunner app, not that of Firefox/Mozilla. It's named after your vendor and app name in application.ini, e.g. Linux: ~/.yourcompany/yourapp/oihizuf.default/ Windows: %AppData%\Yourcompany\Yourapp\Profiles\jhfdfdi.default\ ...
Make your xulrunner app match the system locale - Archive of obsolete content
alled DemocracyCLH, and then creating a new object of our PyBridge component. The code described lives in the PyBridge component's onStartup method which gets called automatically. The second step is to figure out the system locale. To be finished later. Then set the locale preference. The following is python code to set this preference. ...
XUL Application Packaging - Archive of obsolete content
deploying your applications see Deploying XULRunner. application.ini The application.ini manifest is located at the root of the extension and provides metadata that allows XULRunner to launch the application properly. It is parsed as a Windows-style INI file with [Headings] and Key=Value pairs. Lines beginning with ; or # are treated as comments. A sample application.ini file can be found in the mozilla source tree. The [App] section The App section specifies metadata about the application Name Specifies the application name. REQUIRED Name Example: Name=TestApplication Version Specifies the application version number. REQUIRED See Toolkit version format for version numbering details Example: Version=0.1 BuildID Specifies a unique build identifier. This is typic...
application/http-index-format specification - Archive of obsolete content
...
nsIContentPolicy - Archive of obsolete content
ck an IMAGE because it is served from goatse.cx (even if you don't necessarily block other types from that server/domain). Note: This rejection only applies to the current request on this server, not to future requests of the same type. REJECT_OTHER -4 Returned from shouldLoad() or shouldProcess() if the load/process is rejected based on some other criteria. Mozilla callers will handle this like REJECT_REQUEST; third-party implementors may, for example, use this to direct their own callers to consult the extra parameter for additional details. Note: This rejection only applies to the current request on this server, not to future requests of the same type. ACCEPT 1 Returned from shouldLoad() or shouldProcess() if the load or ...
xbDesignMode.js - Archive of obsolete content
You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is Netscape Cross Browser Design Mode code. ...
2006-11-10 - Archive of obsolete content
Publication for the first issue is expected in Fall 2007. W4A 2007 First Call for Papers The Fourth International Cross-Disciplinary Cofnerence on Web Accessibility (W4A 2007) Co-Located with the Sixteenth International World Wide Web Conference (WWW2007), in Banff, Canada. ...
2006-10-06 - Archive of obsolete content
Sunbird Release Notes Lightning Release Notes SUNBIRD_0_3_RELEASE tag being created lilmatt announced the Sunbird 0.3 realse tag being created. Sun Microsystems contributes to Lightning to combine it with OpenOffice.org Sun Microsystems provide users with an alternative open source choice by combining OpenOffice.org respectively StarOffice and Thunderbird/Lightning. Discussions dialogs on app startup Discussion regarding improvement of dialog of app window What are tasks? What are events? Discussion regarding tasks and events Meetings None this week. ...
2006-09-29 - Archive of obsolete content
Binding tab bar to new theme Discussion about how to bind a new theme to a tab bar without losing its original binding. ...
2006-11-03 - Archive of obsolete content
Discussions Google Adsense plugin for firefox A user post a link to a plugin for displaying "Adsense Earning" within the status bar of the browser without logging into Google. Request to add option for removal of Firefox profiles during setup or uninstall A user suggests an option to remove profiles during setup or uninstall. Does Firefox provide any classes/objects or events to Windows WMI ? A user asks if firefox provides any classes/objects or events to Windows WMI. No replies yet. source code for the nsinstall contained in moztools A user asks for advice about building nsinstall on Windows. No replies yet. ...
2006-11-04 - Archive of obsolete content
Discussions Adsense plugin for firefox A user post a link to a plugin for displaying "Adsense Earning" within the status bar of the browser without logging into Google. to add option for removal of Firefox profiles during setup or uninstall A user suggests an option to remove profiles during setup or uninstall. Firefox provide any classes/objects or events to Windows WMI ? A user asks if firefox provides any classes/objects or events to Windows WMI. No replies yet. code for the nsinstall contained in moztools A user asks for advice about building nsinstall on Windows. No replies yet. ...
2006-11-17 - Archive of obsolete content
No replies as of yet. Firefox 2.0 - window.focus() User questions where the change in behaviour in window.focus() is a bug or was intented. Firefox 2.0 JavaScript Popup Issue User seeks advice about a line of JavaScript code that worked in Firefox 1.5.0.x, but not in Firefox 2.0 Balloon Help User inquires if anyone can explain how to disable the balloon help in Firefox 2.0. ...
2006-11-24 - Archive of obsolete content
Discussions Microsummary w/ Script A user created patch that will allow script to run in a sandbox during the update of a microsummary. They would like to discuss the use of it in bug 361026 rich results for searches A proposal for a search tool that gives users a quicker path to specific information they are looking for. ...
2006-12-01 - Archive of obsolete content
Discussions Firefox 2.0 should re-implement modal window.open to support Web 2.0 A plea to re-implement the option to show modal windows, using window.open(), from inside an untrusted script. This implementation was removed in 2002 to fight against popups. XML in Firefox is a Major Problem A major debate surrounding the use of xml for customizing RSS feeds. Devs say this is the way its supposed to be, others say its a bug! The debate continues. Discussion of support for Modal windows within Firefox 2.0 A lengthy post regarding the re-implementation of modal windows into firefox. ...
2006-09-29 - Archive of obsolete content
He is also asking if there are developers out there who know the TB core and are willing to help him out. Discussions Developer documentation issues for Thunderbird 2 Eric Shepherd has requested feedback for any developer documentation issues that might need dealing with for Thunderbird 2. Meetings None for this week. ...
2006-10-13 - Archive of obsolete content
Discussions Shared training.dat & message filters Jon-Mikel is looking for suggestions on sharing spam filter data and message filters between machines easily. Currently, the only recommendation is to use a server-side solution. Meetings None for this week. ...
2006-10-20 - Archive of obsolete content
Discussions How to use the TB/AB lastModifiedDate Item and how to solve the problem regarding to this item. There is a link provided might solve the stated problem. However, detail info of the problem is not clear, no futher suggestion or solution is provided thus far. Stefan Goppert suspect Thunderbird inserts a wrong char("") in the BCC-field and want to confirm this issue. No respond posted for this discussion yet. Meetings None for this week. ...
2006-10-27 - Archive of obsolete content
Discussions Effect of Eudora/Thunderbird re-write JoeS is voicing a concern about the recent announcement regarding the Eudora/Thunderbird rewrite: "Is Thunderbird destined to become a hybrid of the existing code and Eudora?". Jonathan Pritchard has clarified that announcement does not mean Thunderbird will be changing direction, just certain areas of development that are of interest to the Eudora developers will have more attention paid to them. Calling TB with a specific message to be displayed There's a new question by Guenter about calling TB from an external program (eg. Firefox) to display a message. Meetings None for this week. ...
2006-11-03 - Archive of obsolete content
Discussions What is the 'lastModifiedDate' item used for in TB? There are some code example given and also further discussion on lastModifiedDate. TB Storage-idea TB is planning to change from mbox-format storage to database-based storage. However, user wonder both storage method could exist in TB at the same time without crashing. Suggestion made for e-mail popup It suggested that the e-mail popup duration should depends on number of messages and examples of this idea is provided. XUL Overlay question -- How to replace an existing element? No respond thus far. ...
2006-11-10 - Archive of obsolete content
Discussions Violation of SMTP protocol in Thunderbird Hector reports two bugs: Thunderbird ignores the SMTP protocol state machine by ignoring the 501 response codes. This has been filed as bug 360118. Thunderbird doesn't seem to have an option to set the client domain name (ELHO/HELO). This is already addressed in bug 244030. Interfacing with Thunderbird Mark Bannister is looking for directions on interfacing Thunderbird with their project management database. Guenter has provided some sample code using the 'mailto:' method. ...
2006-11-17 - Archive of obsolete content
A few suggestion is posted. What file format is TB's address book using? TB's address book uses Mork (file format). There are also some perl code provided in this link. How to get review for work-in-progress patch? Answer: CC whoever you need review from, but don't post a formal review. Steps for posting a formal review is provided also. ...
2006-11-24 - Archive of obsolete content
Additional links: bug 22687 and original newsgroup thread. Thunderbird losing emails TB seems to be deleting mail folders when they reach 4GB in size. Exact cause is unknown but may be related to multiprocessor platforms. ...
2006-12-01 - Archive of obsolete content
Why is there a hidden item called <category> in the card-item? Some good discussion on the <category> items are posted. ...
2006-09-29 - Archive of obsolete content
Nick Thomas, who's IRC nickname is (CF), responded to Peter's question. The solutions are listed in the posting. Announcements There were no announcements this week. Discussions There were no discussions this week. Meetings There were no meetings this week. ...
2006-10-13 - Archive of obsolete content
He gets an error in the middle of his build. He has disabled Xft and has tried looking at related postings by Benjamin Smedberg gcc-40-workarounds and gcc-and-visibility-one-step-forward-hit-a-brick-wall Announcements Please help us test the new Tinderbox and Bonsai server installations Paul Reed announced that they are setting up a new installation of the Tinderbox and Bonsai servers onto new, supported hardware. Some testing and validation has been done, but they would like other people to look at the installations and complete the setup before they switch over. ...
2006-10-27 - Archive of obsolete content
The question Tony posted was that he wanted to know what was wrong with Fx 1.5.0.x (Linux) tinderbox because it has been failing since October 22 at around 5:45 PM PDT. Gavin responded to Tony's posting saying that the log file shows a "no space left on device" error when trying to link the final executable. On the same day Tony replied to Gavin's posting stating the possible choices to solve the problem. ...
2006-11-24 - Archive of obsolete content
However he has been unsuccessful and a bunch of errors. To view the Joe's error please check the posting. He is using make 3.80, working with the source tarball for xulrunner 1.8.4,running "make -f client.mk distclean" followed by "make -f client.mk build_all". Joe is asking for help on a possible solution to fix his problem. Building XPCOM components with MSVS 2005 November 21st: Buffaloaf is having trouble getting a personal XPCOM component to work under XulRunner when compiled with MSVS 2005. ...
2006-09-29 - Archive of obsolete content
Discussions None during this week Meetings None during this week. ...
2006-10-06 - Archive of obsolete content
Discussions None during this week Meetings None during this week. ...
2006-10-13 - Archive of obsolete content
Discussions None during this week Meetings None during this week. ...
2006-10-20 - Archive of obsolete content
Discussions None during this week Meetings None during this week. ...
2006-10-27 - Archive of obsolete content
Discussions None during this week Meetings None during this week. ...
2006-11-03 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-11-10 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-11-17 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-11-24 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-12-01 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-12-08 - Archive of obsolete content
Return to mozilla-dev-extensions Announcements None during this week Discussions None during this week Meetings None during this week. ...
2006-09-22 - Archive of obsolete content
Summary: mozilla.dev.i18n - Feb 2nd - Sep 22nd, 2006 Announcements Testing a dummy Greek Bon Echo NSIS installer Bug #69230: Accelerators should not be affected by keyboard group/level Proposal of code changes for l10n in Firefox 3 Discussions Thai language support: How can we add Thai as an official localized build? Thai issue for 2.0 timeframe Arabic Support & Uniscribe: details nsTextFrame: re-design and impact on i18n Native Unicode converter Editing and selection: Should editing and selection operate on grapheme clusters? Meetings No meeting information available for this period. Authors Dean Woodside Sherman Fernandes ...
2006-10-20 - Archive of obsolete content
Summary: mozilla.dev.l10n - October 20, 2006 Announcements sign-off for zh-TW firefox 2 Sign-off for zh-TW firefox 2 sign off of Chinese Simplified firefox 2.0 Sign off of Simplified Chinese firefox 2 attention dictionary providers, or: warning, AMO sucks There was at AMO (addons.mozilla.org), which has been being fixed. People who want to upload dictionaries should be advised and check #amo at irc.mozilla.org. Feedback from localizers regarding Sunbird/Lightning 0.3 release The Sunbird/Lightning developers are requesting feedback on release 0.3. Uploading language packs to AMO Benjamin Smedberg is ready to upload languange packs from here to addons.mozilla.org. If there are issues or questions, contact mozilla.dev.builds. Firefox RC 3 is there, staging servers, ...
2006-10-27 - Archive of obsolete content
Update check failing in Firefox 2.0 if add-on type is 8 Testing a custom update.rdf file for a langpack using the official version of Firefox 2.0 RC 3. Discussions Developing a spelling Dictionary Developing a spelling Dictionary. Alternative German locale While the alternative locale is active, the auto update of Firefox stops working. ...
2006-10-20 - Archive of obsolete content
Firefox 2 Release Candidate 3 is now available for download FF2 RC3 available for download. Completed RC3 Testing Key testing activities for FF2 RC3 are done. Discussions Sparky AND comet going away on Friday Preed wants to get rid of Sparky and comet (both older desktop class linux boxes). Robert Kaiser gave some background on the boxes. Decommissioning sparky on Friday Preed wants to get 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). ...
2006-11-17 - Archive of obsolete content
Announcements 1.5.0.9/2.0.0.1 code freeze - Friday, November 24 Code Freeze for 1.5.0.9 and 2.0.0.1 on Friday Nov. 24. configure regeneration back up, but another outage tonight... Preed reports that the machine with autoconf is back up. But there is another outage scheduled so the tinderboxen will be down early. Mozilla Scheduled Downtime - 11/14/2006, 9:30pm - 1:00am PST A number of machines are going to go down. A full list can be found here mozilla/configure regeneration down Preed says that the machine that does autoconf went down during a power outage. Preed and IT are working on it. Discussion From 50 to 100 locales Continuation of the discussion of how to make l10n easier and increase the number of locals with which mozilla products ship. Version numbering changes Co...
2006-09-29 - Archive of obsolete content
When he runs xulrunner from the command line, it fails silently without any errors. This happens with all his xulrunner ports, with xulrunner 1.8.0.1, 1.8.0.4 and nightly 1.8. Benjamin Smedberg was able to point out one possible flaw. Instead of using /path/to/xulrunner-bin.ini (which Will was doing) applications on a mac must be in an application bundle (Foo.app). ...
2006-10-06 - Archive of obsolete content
Summary: mozilla.dev.platform - September 30th to October 6th 2006 Announcements Mike Schroepfer is attending a Vista Compatibility Lab with some other people this week. They are testing Firefox and Thunderbird on Vista. They are tracking issues on http://wiki.mozilla.org/VistaLab , and on #vista on IRC. Other Traffic There was no traffic on mozilla.dev.platform this week. Please see the FAQ instead ...
2006-10-13 - Archive of obsolete content
Summary: mozilla.dev.platform - October 7th to October 13th 2006 Announcements No announcments this week Other Traffic JavaScript package system for 1.9/FF3 On Sun, Oct 8 2006 Robert Sayre inquires about the JavaScript package system for 1.9 for Firefox 3, Robert would like to know if there is any chance we'll get this? as he know's it's planned for JS2. Meetings No meetings this week ...
2006-10-20 - Archive of obsolete content
Traffic October 14, 2006, 6:53pm - Ed notes that, on Windows, Composer 0.1's reccomended install directory needs to be different than those noted in the Release Notes. This is a Xulrunner 1.8.0.4 application. Benjamin Smedberg would like to know what paths were used. Started Wed, Oct 18 2006 9:38 am - A XulRunner developer, Frank, discusses his desire to make xul/browser based applications. He wants to be able to build applications that will run inside the browser. ...
2006-10-27 - Archive of obsolete content
Traffic Status of XPCOM cycle collector Graydon Hoare provides the XPCOM patch which experiments with implementing a general-purpose garbage-cycle collector for XPCOM. ...
2006-12-01 - Archive of obsolete content
Lorne Kates replies, pointing to the existing FAQ for this newsgroup. ...
2006-18-24 - Archive of obsolete content
Summary: mozilla.dev.platform - November 18th - November 24th, 2006 Announcements No announcements this week Traffic XULRunner: <browser> not allowing javascript popup windows B notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement. Please see mozilla.dev.platform FAQ for solution. Meetings No meetings this week ...
2006-09-29 - Archive of obsolete content
Zach Lipton is working to get us back in working order. Litmus should be back up and running soon. Discussions Extension Based Testing - Someone is in the process of writing a small extension that tests Firefox's help in terms of table-of-contents and search Looking for Firefox triagers to evaluate a triage tool - A PhD student is working on a way to assist triagers. He is looking for an approach to recommend to whom a bug report should be assigned (i.e. which developer(s) has/have the correct expertise for a particular bug report). ...
2006-10-06 - Archive of obsolete content
There were a few problems found where FF was hanging on shutdown and some weird behaviors in the download manager. Update checker was run; all failures found were expected. Build is Go for launch. Vista Testers - needed to test Firefox and Thunderbird in Vista. Any test case ideas specific to Vista are welcomed. Check posting for details. FireFox 2 RC2 testing - Tim Riley announced the L10n builds were completed last night. To help out with testing meet in IRC chat room #qa. Test results will be posted here. ...
2006-10-13 - Archive of obsolete content
Summary: mozilla.dev.quality - October 6-October 13, 2006 Announcements None Discussions Appropriate for me to assign a bug? - He just permission to confirm bugs, but he still needs help with how to do things - such as how to assign bugs. Meetings None Authors Mark D'Souza (mdsouza) Mohamed Attar (mojo) ...
2006-10-27 - Archive of obsolete content
Discussions Need to unit test innerHTML - Someone needs to unit test innerHTML. He recommends that a non-XPCShell environment is needed really badly, but the big issue is that the XPCShell doesn't have an event loop, so nothing asynchronous can be tested. ...
2006-11-03 - Archive of obsolete content
Discussions None Meetings Community Test Day - on Friday, November 3, 2006 another community test day focusing on security and stability release, and you can help by verifying bugs, and by running the Litmus test cases under the FFTs or the BFTs. ...
2006-11-17 - Archive of obsolete content
Summary: mozilla.dev.quality - November 10-November 17, 2006 Announcements None Discussions None Meetings None Authors Mark D'Souza (mdsouza) Mohamed Attar (mojo) ...
2006-12-01 - Archive of obsolete content
Discussions None Meetings Gecko 1.0a1 Community Test Day - There will be a community test day to test an early alpha of the next Firefox release. ...
2006-09-29 - Archive of obsolete content
Discussions file: vs resource: vs chrome: from a security point of view Boris Zbarsky gives a summary the current setup for CheckLoadURI (which type of security principal can load what) and asks for comments about whether that is the desired behaviour. Meetings None during this week. ...
2006-10-06 - Archive of obsolete content
Discussions Protocol Handlers Boris Zbarsky posed the question, Should random webpages have access to the following protocols: feed, pcast, moz-bookmark, webcal, swebcal. As well as any protocols that you have implemented and are NOT in the list of protocols nsScriptSecurityManager::CheckLoadURI feed: Consensus is that it should be allowed and treated as an ordinary link. pcast: Similar to feed: just differentiating between different types of feeds and should be allowed access. moz-bookmark: Protocol is defunct, apparently Ben Goodger disabled it back in 12/2003, shortly after he added it. ...
2006-10-13 - Archive of obsolete content
Discussions Extended Privileges Prompt Mitchi asked if it was possible to revoke the checkbox auto approving some scripts. Boris Zbarsky replyied, stating that you have to edit the prefs.js file. Meetings None during this week. ...
2006-10-20 - Archive of obsolete content
Discussions MP3's Considered a Malicious File Type? JoeS noticed that mp3 files are no longer allowed to be opened directly from email attachments in trunk builds of Thunderbird and Seamonkey. They must be first saved to the drive. --------------010306060708080008030904 Content-Type: audio/mpeg; name="Eternals - Babalus's Wedding DayFinal.mp3" Content-Transfer-Encoding: base64 Content-ID: <part1.00030607.05030...@gmail.com> Content-Disposition: inline; filename="Eternals - Babalus's Wedding DayFinal.mp3" He wonders why this is. Meetings None during this week. ...
2006-10-27 - Archive of obsolete content
Discussions Extending Javascript Mitchi is working on a CSP (Cryptographic Service Provider) that works on a USB flash drive. She is hoping to incorporate it into Firefox for use with signature files. ...
2006-11-03 - Archive of obsolete content
Discussions Extended Validation Certificates Major discussion this week started by Gervase Markham about security certificates, more specifically Extended Validation Certificates. The aim of the group is to develop a new, higher standard for the validation which is done before certificate issuance, called Extended Validation. The idea was that such certs would be presented differently in the UI, to give the CAs a reason to go to the extra effort, and to give customers a reason to buy them. In IE 7 at least, the use of an EV certificate is tied to the green background in the URL bar. ...
2006-11-10 - Archive of obsolete content
Discussions Why now? (Was: Extended Validation Certificates) A continuation of last week's discussion on Extended Validation Certificates, the there post was getting unruly at 147 replies. Good Ideas A splinter off of the Extended Validation Certificates discussion going over whether or not fraudulent websites may get these certificates and if so how to prevent this from happening. Meetings None during this week. ...
2006-11-17 - Archive of obsolete content
Discussions How to Detect Firefox Updates Externally? micahc asked if there is an easier way to detect if Firefox is installed and fully patched on any given machine, externally. Extended Validation Certificates A note as to how Opera is handling Extended Validation Certificates http://labs.opera.com/news/2006/10/09/ Fwd: RE: Mozilla questions regarding the EV standard Gervase Markham posted a summary of questions emailed to Kelvin Yiu about the Extended Validation Certificates. Meetings None during this week. ...
2006-11-24 - Archive of obsolete content
Discussions Continuing Discussions on the Extended Validation Certificates Large amount of activity this week regarding the Extended Validation certificates, Duane posted several snippets of interesting debates as to whether or not the protocol should be introduced. Mozilla backing off from "extended validation"? Yet more people disgruntled by EV proposal Mozilla, Opera and co only tout open standards as it suits them In addition Eddy Nigg posted an alternative proposal for the use of Extended Validation certificates EV certificates / another proposal Meetings None during this week. ...
2006-12-01 - Archive of obsolete content
Discussions Protocol Security Daniele Rizzo posted a question as to whether or not it is possible to enable/disable the privilege of UniversalXpConnect in a 'entire' protocol (http://, file://). Problem with downloading signed script components in a Firefox extension Andrew Groom is having problems getting an extension to download a signed script and would appreciates some help with his problem. Meetings None during this week. ...
2006-09-22 - Archive of obsolete content
Announcements Java port of jsDriver.pl for Rhino available David P. Caldwell submitted a patch for Rhino (filed under bug #353501) with a number of improvements. Discussions mozilla.org/js points to wrong newsgroup David P. Caldwell has noted that the main JavaScript site on mozilla.org is sending people to the wrong newsgroup. Meetings JAOO conference meeting in Aarhus, Denmark - 2006/10/1 to 2006/10/6 ...
2006-10-27 - Archive of obsolete content
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. ...
2006-11-03 - Archive of obsolete content
David Baron announced that he merged the reflow branch to a new branch (REFLOW_20061031_BRANCH) off of the trunk. Discussions HTML5 @ W3C Discussion of the official announcement from W3C on the development of HTML5 and how MathML should be included in it. Firefox Table Captions Discussion on how IE displays captions depending on the size of the content while FF uses a default setting. Captions in FF also exceed the table length and become hidden if it's surrounded by a bounding div element. A test case is pending. ...
2006-11-10 - Archive of obsolete content
Discussions How to know the full height and width of a webpage Discussion on how to determine the full height and width of a web page when embedding a browser into an application. Using window.innerHeight and window.scrollMaxY should resolve this issue. Block Images Discussion on how where to change source code so that images could be blocked in Mozilla. This can be defined within the nsIContentPolicy. Applying site- and page-specific settings during layout Discussion on the best possible solution for integrating Firefox 3 with the ability to apply site- and page-specific user settings during layout. ...
2006-11-17 - Archive of obsolete content
Summary: mozilla.dev.tech.layout - November 11 - November 17, 2006 Announcements None this week. Discussions Testing accesskey conflicts Discussion about the complexity of access keys and how to detect conflicts there in the l10n community. Bug #360589 describes this ongoing issue. Site 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...
2006-11-24 - Archive of obsolete content
Discussions backed out view manager hierarchy unification Discussion aboutthe view manager hierarchy unification and the problems with TP regressions that occuring whenever update batching interacts it. See BigID 360789 New linebreaker interface New linebreaker current interface is unworkable when it comes to using Thai and UAX#14. Meetings None this week. ...
2006-12-24 - Archive of obsolete content
Discussions [Reset issue for overflow='hidden' In IE and Opera there is a very modest horizontal shift of the document due to reflow associated with the removal of the vertical scroll bar (because the document content is using a horizontal centering style). But in Firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally. ...
2006-12- 02 - Archive of obsolete content
Discussions [Reset issue for overflow='hidden' In IE and Opera there is a very modest horizontal shift of the document due to reflow associated with the removal of the vertical scroll bar (because the document content is using a horizontal centering style). But in Firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally. ...
2006-12- 08 - Archive of obsolete content
Discussions [Further ComputeSize changes L. David Baron is planning to make an additional change to the ComputeSize API onthe reflow branch to resolve a number of float-related bugs (359135,360093), and some others. ...
2006-09-06 - Archive of obsolete content
Discussions Windows gecko-SDK and g++ components Discussion on the problems and possible solutions running cygwin/g++ compiled XPCOM components with Windows-based Gecko-SDK/XULRunner DLL/EXEs. Threading in XPCOM Rules on threading in XPCOM or to Firefox extensions. ...
2006-09-22 - Archive of obsolete content
Discussions Java vs. XPCOM discussion of the limitation and merits of Java in place of XPCOM. xpidl.exe crashes on Windows problem with creating header files from IDL's in 1.8 branch due to wrong compiler. Meetings None during this week. ...
2006-09-30 - Archive of obsolete content
Summary: mozilla.dev.tech.xpcom - Sept 30- Oct 5, 2006 Announcements Build a xpcom component on Mac OS X Benjamin Smedberg confirmed that this tutorial http://www.iosart.com/firefox/xpcom/ is misleading as it uses the standalone glue (-DXPCOM_GLUE) for components, which is not recommended. Developers should use this sample instead: http://developer.mozilla.org/en/docs/XPCOM_Glue Discussions Dynamic load overlay A short discussion about the possibilities of loading and unloading xul overlay runtime Reading binary data from file Discusses about the code to read binary data from file How to build xpcom component on Mac OS X Discusses about the Make file code used to build xpcom components on Mac OS X successfully Meetings None during this week. ...
2006-10-13 - Archive of obsolete content
Discussions wxMozilla and FF1.5 XPCOM problems updating wxMozilla to use it with Firefox 1.5.7 Browser elements, Opening links in a new window Using javascript to open window in new window. General XPCOM and nsCOMPtr questions nsCOMPtr basics regarding myIComponent usage. Fedora security blocking XPCOM registration Fedora Core 5.0 security settings impeding xpcom registration. Meetings None during this week. ...
2006-10-27 - Archive of obsolete content
Discussions evalInSandbox and XMLHttpRequest A discussion about writing something that calls a function defined by the page that the user is currently on Chrome files and last modified date Ways to retrieve the last modified date of a chrome file that may be in a jar or on the file system. Meetings None during this week. ...
2006-11-17 - Archive of obsolete content
Discussions XPIDL crashes IMyComp.h problems: "xpidl.exe has encountered a problem and needs to close" Meetings None during this week. ...
2006-11-3 - Archive of obsolete content
Discussions Problem linking libraries to XPCOM component A discussion involving a problem with linking third party library to XPCOM component. Meetings None during this week. ...
2006-12-01 - Archive of obsolete content
Discussions nsIContentPolicy and user interaction The proper way to get user confirmation before trying to load certain file types. debugging firefox extesnion? A tip on how to debug Firefox extensions using a debugger. segmentation fault while running the browser Browser crashes after installation of subjects extension. Meetings None during this week. ...
2006-12-08 - Archive of obsolete content
Discussions XPCOM cpp to js callback Engaging discussion on a problem with trying to call back from C++ to a JavaScript object using an interface the developer created with an idl. However, the C++ call that's supposed to be invoking the method on the JavaScript object is returning with 0x80004005 (NS_ERROR_FAILURE). Saving binary data from nsIXmlHttpRequest A discussion on how to use nsIXmlHttpRequest object to query data from a url in an extension implemented in Javascript Meetings None during this week. ...
2006-09-22 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
2006-09-29 - Archive of obsolete content
Discussions None during this week. Meetings None during this week. ...
2006-10-20 - Archive of obsolete content
Discussions October 16, 2006, 5:10pm - David Marteau notes that using "persist" on templatized content prevents from restoring values for the persistent attributes. Neil notes that the format of localstore has changed from previous versions and that "persist" is not functioning properly using the new format. This is an unexpected result and David has said he will post a bug. The bug number has not been posted to the newsgroup and searching in BugZilla was unsuccessful. Meetings None during this week. ...
2006-10-13 - Archive of obsolete content
Sunbird Release Notes Lightning Release Notes Inter-operability test day on Tuesday October 17 Interoperability testing for Sunbird on Tuesday. Test importing and exporting Sunbird calendars to/from other calendar applications. Discussions How to change between Lightning and mail Discussion about how to view Folder pane and Lightning pane again after you closed them. Lightning 0.3 - Event List/Search? Discussion about the ability to list and search all the events in a calendar. ...
2006-10-20 - Archive of obsolete content
Discussions Lightning 0.3 - Event List/Search ? Discussion about the missing ability to list and search all the events in a calendar in Lightning 0.3. Location of files Discussion about Where are the calendar files stored and can they be moved. Handling of Multiple Calendars Discusstion regarding the bug when handling multiple calendars Calendar Views Improving the looking of calendar view. For example improving the left pane, so that user can switch between mail and calendar. ...
2006-10-27 - Archive of obsolete content
More information can be found here. Discussions Importing Outlook Address Files A discussion was started to attempt the export of Outlook Datae from MS Outlook. Storage Calendar Optimization A general discussion on optimization of widgets, Java and the core of Calendar's Database. Meetings No Meetings were scheduled this week. ...
2006-11-03 - Archive of obsolete content
aborting a new event/edit event dialog Discussions about behaves of new event/edit event. wcap calendar subscription Discussions about calendar subscriptions. Last check-ins on sun-calendar-event-dialog.* files Discussions about some localization issues with sun-calendar-event-dialog. Meetings No Meetings were scheduled this week. ...
2006-11-10 - Archive of obsolete content
Discussions Hunting down the "Sunbird fails to start" bug -- please help Discussion about a crash when starting Sunbird 0.2. Calendar:Improving the Calendar Views Discussion about improving the layout of Calendar. next steps for 24 hours view Discussion about the improving of some features of Calendar ex. configurable start/end hours, optimal size of grid boxes in 24 hours view. Meetings No Meetings were scheduled this week. ...
2006-11-17 - Archive of obsolete content
Discussions iTIP and iMIP new designs for sending invitations available for comment Discussion about the new interface designs for iTIP. view performance Discussion about tests on view performance. webdav server A discussion related to remote calendar modifications. Calendar XPCOM Component Discussion about a debug error of AddItem function from calICalendar. Meetings No Meetings were scheduled this week. ...
2006-11-24 - Archive of obsolete content
Discussions What display events in the month view ? Discussions about functions that display the events/tasks of the calendars in month view. Filing bugs for prototype implementations Discussions about explicitly address bugs in the prototype implementations. Proposal for an Event Summary Dialog Discussions about design for an event summary dialog. Proposal for (WCAP) Calendar Subscription A proposal shows a possible integration into Lightning. Treating calendars as tags Discussions concerning about the layout of calendar list in Lightning/Sunbird. Meetings No Meetings were scheduled this week. ...
2006-12-01 - Archive of obsolete content
Discussions cancellable async requests Discussions about a bug of calICalendar's async methods. Lightning, broken accessibility Discussions refering several accessibility issues regarding interface of the Sunbird client and the Lightning plug-in for Thunderbird. Tasks in Sunbird & Lightning Discussion about how to accessing the Tasks in View in Sunbird and Lightning. Universal binary or Mac Intel version of SB/Lightning? Discussions about Universal binaries for Sunbird. Override a method (XBL) Discussions about how to override a js function in a js file. ...
Newsgroup summaries - Archive of obsolete content
FormatMozilla.dev.apps.firefox-2006-09-29Mozilla.dev.apps.firefox-2006-10-06mozilla.dev.apps.calendarmozilla.dev.tech.js-enginemozilla-dev-accessibilitymozilla-dev-apps-calendarmozilla-dev-apps-firefoxmozilla-dev-apps-thunderbirdmozilla-dev-buildsmozilla-dev-embeddingmozilla-dev-extensionsmozilla-dev-i18nmozilla-dev-l10nmozilla-dev-planningmozilla-dev-platformmozilla-dev-qualitymozilla-dev-securitymozilla-dev-tech-js-enginemozilla-dev-tech-layoutmozilla-dev-tech-xpcommozilla-dev-tech-xul ...
External resources for plugin creation - Archive of obsolete content
ialised UIs and for handling graphics and sound. Supported development environments are XCode, Visual Studio, GCC (and probably any other modern C++ compiler) Browser plugins can be built as NPAPI (Mac/Windows), or ActiveX (Windows). ...
NPAPI plugin developer guide - Archive of obsolete content
an install to display content that the application itself can't display natively. For example, the Adobe Flash plug-in is used to access Flash content (including videos and certain interactive applications), and the QuickTime and RealPlayer plugins are used to play special format videos in a web page. Important: Plugins are now a legacy technology. They are not available on most mobile devices. Mozilla encourages website developers to avoid using plugins wherever possible. If there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that Mozilla can prioritize web platform work to make those use cases possible. Plugins are written using NPAPI, the cross-browser API for plugins. The main sourc...
Logging Multi-Process Plugins - Archive of obsolete content
ions to wherever you wish to save the log. Your safest bet is your home directory (C:\Users\username on Windows Vista and above, C:\Documents and Settings\username on Windows XP, and ~ (home directory) on Mac OS X and Linux). Windows Make sure Firefox is not running. From within a command prompt: C:\> set NSPR_LOG_MODULES=IPCPlugins:5 C:\> set NSPR_LOG_FILE=c:\plugins.log C:\> cd C:\Program Files\Mozilla Firefox C:\> firefox.exe The log file will be saved to C:\plugins.log (or wherever NSPR_LOG_FILE is set). Linux Make sure Firefox is not running. From within a bash shell: $ export NSPR_LOG_MODULES=IPCPlugins:5 $ export NSPR_LOG_FILE=~/plugins.log $ /usr/bin/firefox The file will be saved to ~/plugins.log (or wherever NSPR_LOG_FILE is set). ...
NPClass - Archive of obsolete content
onPtr getProperty; NPSetPropertyFunctionPtr setProperty; NPRemovePropertyFunctionPtr removeProperty; NPEnumerationFunctionPtr enumerate; NPConstructFunctionPtr construct; }; Warning: Don't call these routines directly. You should instead use the appropriate API functions. Fields structVersion The version number of the structure. This is set to NP_CLASS_STRUCT_VERSION, which is 1 in Mozilla 1.8.*, 2 since Mozilla 1.9a1, and 3 since Firefox 3.0b1. allocate Returns a pointer to a newly allocated NPObject. Called by NPN_CreateObject() if non-NULL, otherwise the browser calls malloc(). This function is expected to allocate and return enough storage to hold the NPObject that is being created. deallocate Called by NPN_ReleaseObject() when an object's reference count reaches zero. If t...
NPN_SetValue - Archive of obsolete content
que or transparent. To specify an opaque mode, the plugin calls NPN_SetValue with NPPVpluginTransparentBool for the variable parameter and FALSE for the value parameter. To specify a transparent mode, the value parameter should be set to TRUE. NPPVjavascriptPushCallerBool sets whether you are pushing or popping the appropriate JSContext off the stack (see the two-way scriptability article on the Mozilla Plugins project page for more details). NPPVpluginKeepLibraryInMemory specifies that the plugin does not want to be unloaded from memory after the page which initiated it has gone. Normally, when the browser navigates away from the page containing the plugin, all plugin instances get an NPP_Destroy call, and if there are no more instances of the plugin active, the plugin calls its NP_Shutdown me...
NPP - Archive of obsolete content
<< Gecko Plugin API Reference << Plug-in Side Plug-in API Summary Represents a single instance of a plug-in. 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. 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. Descriptio...
Writing a plugin for Mac OS X - Archive of obsolete content
article is adapted from Josh Aas's blog post Writing an NPAPI plugin for Mac OS X. Before you go on reading this article, you may wish to grab the sample code located here, as it will be referenced during this tutorial. The sample is posted under a BSD-style license that means you can use it for anything, even if you don't plan to release your source code. Getting started If you check out the Mozilla source code in Mac OS X, you can simply open BasicPlugin.xcodeproj in Xcode, click Build, and you're done. Xcode will create a "build" directory next to the project file, and if you built it in release mode, that folder in turn contains a "Release" directory with the plugin inside it. To install the plugin, just copy it into one of these two locations: /Library/Internet Plugins/ ~/Library/I...
How RSS Works - Archive of obsolete content
S Syndication is the part of the system that produces the RSS feed. A news website would be at the server end of RSS syndication. A blog would be at the server end of RSS syndication. An IPradio show would be at the server end of RSS syndication. An IPTV show would be at the server end of RSS syndication. The client end of RSS syndication is the part of the system that consumes the RSS feed. The Mozilla Firefox web browser would be at the client end of the RSS syndication. A desktop RSS aggregator would be at the client end of the RSS syndication. A web-based RSS aggregator would be at the client end of the RSS syndication. ...
Why use RSS - Archive of obsolete content
amount of momentum -- everyone is using it. RSS has a huge amount of momentum. People are using it to syndicate all sorts of things: news articles, blogs, bookmarks, Internet Radio shows, Internet Television shows, software updates, e-mails, mailing lists, music playlists, and more. If it is episodic, it can be syndicated with RSS. Software that reads and can make use of RSS is also everywhere. Mozilla Firefox has some support for RSS (with it's Live Bookmark technology.). There are too many desktop and web-based RSS aggregators out there to list them all. Also, custom-made software is also making use of RSS. RSS Aggregators are Everywhere One reason to use RSS to syndicate is because there are an enormous amount of desktop and web-based RSS aggregators out there. (Too many to list.) And if y...
RSS - Archive of obsolete content
Iliya Krempeaux talks about the RSS Well-Formed Web Module, why it is popular among some, and how it is used to link to your comments. Atomic RSS Tim Bray talks about using Atom 1.0 as a micro format and extension module for RSS 2.0; keeping RSS 2.0 as your sydication format but bringing in and using selected Atom 1.0 elements. View All... Community View Mozilla XML forums... Mailing list Newsgroup RSS feed Related Topics RDF, XML ...
SAX - Archive of obsolete content
ted API for XML in Java, and later implemented in several other programming language environments. Starting with Firefox 2, a SAX parser is available to XUL applications and extensions. For more information, please see SAX homepage. Quick start The SAX parser functionality is available through the XML reader component. To create one, use the following code: var xmlReader = Components.classes["@mozilla.org/saxparser/xmlreader;1"] .createInstance(Components.interfaces.nsISAXXMLReader); After you created the SAX parser, you need to set the handlers for the events you're interested in and fire off the parsing process. All functionality is available through the nsISAXXMLReader interface. Set the handlers Handlers are user-defined objects implementing SAX handler interf...
NSPR Release Engineering Guide - Archive of obsolete content
MDIST=<dir>/MDist BUILD_NUMBER=vx.y.z [BUILD_OPT=1 | USE_DEBUG_RTL=1] Copy the bits from MDist to /share/builds/components/nspr20/.vx.y.z In /share/builds/components/nspr20/ run the following scripts: explode.pl rename.sh symlink.sh RTM Bits Rename the .vx.y.z directory to vx.y.z (remove the hidden directory 'dot'). Copy /share/builds/components/nspr20/vx.y.z/* to /share/systems/mozilla/pub/nspr/vx.y.z/ Original Document Information Author: larryh@netscape.com Last Updated Date: September 20, 2000 1 Copying files to /share/builds/components requires that one be logged on to a machine named "smithers" as user "svbld". The password to this account is restricted to a small set of designated release engineers. ...
Solaris 10 Build Prerequisites - Archive of obsolete content
The installer must install additional Sun-provided packages from the OS install DVD, so that DVD has to be available. The installer will try to install the SUNWsmbaS package, which is not available in newer versions of SXDE. ...
Create Your Own Firefox Background Theme - Archive of obsolete content
Submit Theme button, and see how it looks instantly. Submit your theme -- if everything looks right, click the Submit Theme button, and you're done! You can see all the themes you've authored on your profile page. Tip: to ensure that your theme is approved for the gallery, be sure it complies with the content guidelines and terms of service! Submit Your Theme Now More Tutorials Mozilla Themes Focal Point on Sizing - A tutorial on theming with a focus on sizing, by VanillaOrchids. ...
UUID - Archive of obsolete content
UUID: Universal Unique Identifier A UUID can be obtained by visiting http://www.famkruithof.net/uuid/uuidgen or by typing "firebot: uuid?" on irc.mozilla.org in a channel where nickname "firebot" is present. Or you can also type "/query firebot uuid?" in any tab connected to the irc.mozilla.org (or, with ChatZilla, "moznet") network. See also Generating_GUIDs ...
install.rdf - Archive of obsolete content
Copy the following text and paste it into a text file, then save that file as "install.rdf": <?xml version="1.0"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>{Themes_UUID}</em:id> <em:version>Themes_Version</em:version> <!-- Target Application this extension can install into, with minimum and maximum supported versions. --> <em:targetApplication> <Description> <!-- Firefox's UUID --> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>Min_FF_Version</em:minVersion> <em:maxVersion>Max_FF_Version</em:maxVersion> </Description> </em:targetApplication> <!-- Front End MetaData --> <!-- My_Theme --> ...
Theme changes in Firefox 2 - Archive of obsolete content
The second is for themes. The third is for locales, the fourth is for plugins, the fifth is for updates, and the sixth is for installs. mozapps/pref This entire directory is no longer used in Firefox 2 and should be removed. Changes in browser bookmarks/addBookmark.css The addBookmarks.css file should have the following lines added to the top: @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); Some microsummary-related CSS also needs to be added, to provide formatting for the microsummary picker. These are used to make the picker look like a regular text box instead of like an editable menu list when there are no microsummaries available. menulist#name[droppable="false"] menulist#na...
Theme changes in Firefox 3.5 - Archive of obsolete content
ue"]) menubar>menu:nth-child(1n) { color:threedshadow } Private browsing: show private browsing state by coloring the URL bar, or by adding an icon to the toolbox/tabbrowserbar. See Private browsing for theme designers for details. Native hyperlink color: use -moz-nativehyperlinktext, to select the computer's native hyperlink color. All known changes For a list of all the known changes see: MozillaZine's Forum: Theme changes for Firefox 3.5 ...
Using Firebug and jQuery (Screencast) - Archive of obsolete content
log/hacking-digg-w...ug-and-jquery/ This is an adaptation of a presentation that I gave while at Mashup Camp Boston. We're going to take an introductory look at the Firebug Firefox Extension and the jQuery JavaScript Library - combining the two to build a reusable bookmarklet that can manipulate Digg Posts and Comments. Click the video link to begin (14:39 Minutes long, 59MB): http://developer.mozilla.org/presentations/screencasts/jresig-digg-firebug-jquery.mp4 Download: Right-click this link and select Save As... in order to download a copy of your own. (59MB) Bookmarklets: In the presentation, I refer to a bookmarklet that you can use to introduce jQuery into a web page. Drag these bookmarklets found on this page into the bookmarks toolbar of your browser, in order to use them. Rel...
Summary of Changes - Archive of obsolete content
http://www.w3.org/TR/2004/REC-DOM-Le...e3-textContent IE5+ ElemRef.style.pixelTop DOM level 2: parseInt(ElemRef.style.top, 10) IE5+ ElemRef.style.pixelLeft = x; ElemRef.style.pixelTop = y; DOM level 2: ElemRef.style.left = x + "px"; ElemRef.style.top = y + "px"; IE5+ new ActiveXObject("Microsoft.XMLHTTP") new ...
Using the W3C DOM - Archive of obsolete content
eger from the string by using parseInt(). Conversely, if you want to set the element's inline STYLE settings for left and top, make sure to construct a string that includes the unit (such as "140px") by appending the unit string to the integer value. CSS 1 and CSS 2.x specifications require that non-zero values must be specified with a length unit; otherwise, the css declaration will be ignored. Mozilla-based browsers, MSIE 6+, Opera 7+ and other W3C standards-compliant browsers enforce such handling of parsing error. CSS 1 Forward-compatible parsing CSS 2.1 Rules for handling parsing errors Changing an Element's Text Using the DOM The text of an element is available as the textContent or innerText property (some browsers support both). The textContent property was introduced in the W3C DOM...
Using Web Standards in your Web Pages - Archive of obsolete content
...
Browser Feature Detection - Archive of obsolete content
ly on any information here. Browser Sniffing via API Name Detection The following tables list the API names defined for specific W3C DOM APIs and lists the percentage of names that your browser actually defines followed by a list of each of the API names tested along with an indication of whether the name was defined for your browser. It is clear from these test results that Netscape 7.0x and Mozilla Firefox have the greatest DOM support although Internet Explorer, Safari, and Opera have sufficient DOM CSS 1 and DOM Level 1 & 2 document property and method support to enable cross browser web development. Test Summary Standard Netscape 7.0x Firefox 1.5 Safari 2 Opera 7 / 8.5-9.0 Internet Explorer 6 / 7 DOM Core 1 100% 100% 100% 75% / 91% 75...
-moz-binding - Archive of obsolete content
Syntax /* <url> value */ -moz-binding: url(http://www.example.org/xbl/htmlBindings.xml#checkbox); /* Global values */ -moz-binding: inherited; -moz-binding: initial; -moz-binding: unset; Values <url> The URL for the XBL binding (including the fragment identifier). none No XBL binding is applied to the element. ...
-moz-border-bottom-colors - Archive of obsolete content
/* Single <color> value */ -moz-border-bottom-colors: #f0f0f0; /* Multiple <color> values */ -moz-border-bottom-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* Global values */ -moz-border-bottom-colors: inherit; -moz-border-bottom-colors: initial; -moz-border-bottom-colors: unset; When an element has a border that is larger than a single CSS pixel, each line of pixels uses the next color specified in this property, from the outside in. This eliminates the need for nested boxes. If the border is wider than the number of specified colors, the remaining part of the border is the innermost color specified. ...
-moz-border-left-colors - Archive of obsolete content
/* Single <color> value */ -moz-border-left-colors: #f0f0f0; /* Multiple <color> values */ -moz-border-left-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* Global values */ -moz-border-left-colors: inherit; -moz-border-left-colors: initial; -moz-border-left-colors: unset; When an element has a border that is larger than a single CSS pixel, each line of pixels uses the next color specified in this property, from the outside in. This eliminates the need for nested boxes. If the border is wider than the number of specified colors, the remaining part of the border is the innermost color specified. ...
-moz-border-right-colors - Archive of obsolete content
/* Single <color> value */ -moz-border-right-colors: #f0f0f0; /* Multiple <color> values */ -moz-border-right-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* Global values */ -moz-border-right-colors: inherit; -moz-border-right-colors: initial; -moz-border-right-colors: unset; When an element has a border that is larger than a single CSS pixel, each line of pixels uses the next color specified in this property, from the outside in. This eliminates the need for nested boxes. If the border is wider than the number of specified colors, the remaining part of the border is the innermost color specified. ...
-moz-border-top-colors - Archive of obsolete content
/* Single <color> value */ -moz-border-top-colors: #f0f0f0; /* Multiple <color> values */ -moz-border-top-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* Global values */ -moz-border-top-colors: inherit; -moz-border-top-colors: initial; -moz-border-top-colors: unset; When an element has a border that is larger than a single CSS pixel, each line of pixels uses the next color specified in this property, from the outside in. This eliminates the need for nested boxes. If the border is wider than the number of specified colors, the remaining part of the border is the innermost color specified. ...
-moz-text-blink - Archive of obsolete content
Firefox, which was the only major browser supporting it, dropped support for this property in Firefox 26. It is now unsupported on all browsers. Initial valuenoneApplies toall elementsInheritednoComputed valueas specifiedAnimation typediscrete Syntax Values none Produces no blinking. blink Text blinks. Note that not blinking the text is one technique to satisfy checkpoint 3.3 of WAI-UAAG. Formal syntax none | blink Example .example { -moz-text-blink: blink; } Specifications This property was defined in an old draft of the CSS 3 Text specification. ...
:-moz-full-screen-ancestor - Archive of obsolete content
The :-moz-full-screen-ancestor CSS pseudo-class is a Mozilla extension that represents all ancestors of the full-screen element, except containing frames in parent documents, which are the full-screen element in their own documents. However, those elements' ancestors have this pseudo-class applied to them. This pseudo-class was removed in Firefox 50. ...
E4X for templating - Archive of obsolete content
createBundle('chrome://myeExt/locale/myExt.properties'); if (args){ args = Array.prototype.slice.call(arguments, 1); return STRS.formatStringFromName(msg,args,args.length); } return STRS.GetStringFromName(msg); } For example, <toolbarbutton label={$S('myToolbar.label')...
Namespaces - Archive of obsolete content
ts from a variety of namespaces. You can declare the default namespace for your E4X objects by placing the statement: default xml namespace = "http://www.w3.org/1999/xhtml"; within the same scope as your E4X. You can also change namespaces at any time, by repeating the statement. default xml namespace = "http://www.w3.org/1999/xhtml"; var a = <p>Some text</p>; default xml namespace = "http://www.mozilla.org/keymaster/gat...re.is.only.xul"; var b = <label>More text</label>; a.appendChild(b); gives <p xmlns="http://www.w3.org/1999/xhtml"> Some text <label xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul">More text</label> </p> name() Using name() on an XML object returns a QName object (Qualified Name). QName is a global constructor available in JavaScript implementations support...
New in JavaScript 1.8 - Archive of obsolete content
der 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). The features that require the use of the new keywords "yield" and "let" require you to specify version 1.7 or higher because existing code might use those keywords as variable or function names. The features that do not introduce new keywords (such as generator expressions) can be used without specifying the JavaScript version. New features i...
LiveConnect Overview - Archive of obsolete content
vaScript 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 forName method throws an exception ...
Sharp variables in JavaScript - Archive of obsolete content
This feature has been removed in bug 566700, Firefox 12. Form Sharp variables have the form of a sharp sign (#) immediately followed by one or more digits. ...
Writing JavaScript for XHTML - Archive of obsolete content
If the content is sent as HTML, an XML declaration would break IE's Doctype switch, so we don't want it there. ...
Community - Archive of obsolete content
If you know of useful mailing lists, newsgroups, forums, or other communities related to XForms, please link to them here. View Mozilla forums... Mailing list Newsgroup RSS feed IRC Channel W3C Forms mailinglist XForms Development Blog ...
Troubleshooting XForms Forms - Archive of obsolete content
e, and select View Page Info. The Type field should say application/xhtml+xml. Anything else, and something is wrong. If your are loading your file directly from the filesystem, make sure that has .xhtml or .xml as the file ending. If you are loading the form from a server, make sure that it serves the files as either application/xhtml+xml or text/xml. Check the XHTML 1.0 Namespace Declaration Mozilla XForms is built upon the XHTML 1.0 specification, which is located at http://www.w3.org/1999/xhtml . Ensure that your <html> element contains the supported namespace declaration: xmlns="http://www.w3.org/1999/xhtml" (instead of the newer, unratified version, XHTML 2.0, located at http://www.w3.org/2002/06/xhtml2 ) Inline Instance, No Controls Get Bound Have you remembered to use the correct n...
Other Resources - Archive of obsolete content
All Other Resources Offical Mozilla XForms project page W3C Test Suite xformstest.org ...
RFE to the Custom Controls - Archive of obsolete content
, please file it here. This page could be of particular interest to people using custom controls in XUL documents for the following reason. XUL, in many cases, is much better suited for application development than XHTML. Therefore the control set may need to be more extensive to address the wider spectrum of requirements that a XUL application will have on its controls. Note: XUL is a feature of Mozilla only and custom control authors should be aware their controls won't work on other browser platforms. RFE Put your requests here. output that shows the DOM If output contains CDATA section or text node and its data is any Mozilla known language like XHTML/XUL/SVG then output should parse and display it (see bug 316817). output should show data in current locale format The bug 331585 addr...
RFE to the XForms API - Archive of obsolete content
Archive › Web › XForms › RFE › XForms API
s elements directly. This means those interfaces available to be queried from the XForms element that resides in the DOM. For example, every visual XForms element exposes the nsIXFormsDelegate interface. If you need some additional functionality that shouldn't be exposed from the XForms element directly, then you should think which interface of the XForms element is more appropriate to expose it. Mozilla XForms doens't offer any service you can get via XPCOM. As an example, the nsIXFormsAccessors interface which allows a user to get/set the value of an instance node and get the state of an instance node, is exposed by the nsIXFormsDelegate interface using the accessors property. XForms DOM Put here your requirements how to improve XForms DOM API. Reflect attributes to properties For the ele...
XForms Output Element - Archive of obsolete content
nder simple text of an instance node (xhtml/xul). Characteristics text is presented to the user when there is no type given for the bound node or a type is specified that is not handled by one of the other widgets (as documented below). analogous widgets are <xhtml:span/> and <xul:description/> calendar A form author may notice a XForms output element represented by a calendar widget in the Mozilla XForms processor if the control meets the following criteria (xhtml/xul). Characteristics the bound instance node is of type xsd:date or a type derived from it in addition, the appearance attribute must also contain the value "full" firefox 2.0 doesn't currently have any similar widgets available for use with XHTML or XUL. image If the bound instance node contains an image then you are fre...
Archived open Web documentation - Archive of obsolete content
t discussing how to create and use private variables in objects, which is great if you want to protect the various properties within an object from being poked at accidentally. I also just read a document on proper inheritance using apply(). Well if you combine the two, you can have inherited private variables: Scope Cheatsheet JavaScript with Mozilla extensions has both function-scoped vars and block-scoped lets. Along with hoisting and dynamic behavior, scope in JavaScript is sometimes surprising. Server-Side JavaScript Here's a radical idea: Use one language to write entire Web apps -- the same language which billions of web pages already use, every day. Sharp variables in JavaScript A shar...
Displaying a graphic with audio samples - Archive of obsolete content
The following example shows how to take samples from an audio stream and display them behind an image (in this case, the Mozilla logo), giving the impression that the image is built from the samples. <!DOCTYPE html> <html> <head> <title>JavaScript Spectrum Example</title> </head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getElementById('fft'), ctx = canvas.getContext('2d'), channels, rate, frameBufferLength, fft; function loadedMetadata() { channels...
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
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:hover {color: red;} a.nav:hover {color: red;} In an attempt to avoid causing problems for legacy documents, browsers based on Mozilla 1.0 and later (Netscape 7+) include code that causes bare pseudo-classes to be restricted only to links if the document is rendered in "quirks" mode. In browsers based on the engine found in Mozilla 1.3b and later, this quirk is extended to cover selectors that combine a bare class selector with the :hover pseudo-class (see bug 169078 for details). Named Anchor Problems In addition to the effec...
Styling Abbreviations and Acronyms - Archive of obsolete content
n: dotted underline; } The Solution If authors wish to remove the underline from abbr and acronym elements, this can be done with the following rule: abbr[title], acronym[title] { text-decoration: none; } It may be better to lessen the visual weight of the border without actually removing it. The underline tells readers that the word in question has extra information associated with it. In Mozilla, placing the mouse pointer over the element and leaving it for a moment will cause the contents of the title attribute to appear as a tooltip next to the mouse pointer. Removing the underline from these elements will rob readers of an indication that there is extra information available. Related Links Web Content Accessibility Guidelines 1.0 Original Document Information Author(s): Eric...
XUL Booster - Archive of obsolete content
nsion packaging. Extension Quick Start XUL Booster makes creating and packaging an extension very easy. It supports exporting XPI files or registering a file system based project. Create an extension You'll need an extension ID; see Generating GUIDs. Add an Overlay You'll need the chrome address of the content you wish to overlay, ex. chrome://browser/content/browser.xul. Learn more at Creating_a_Mozilla_Extension:Finding_the_file_to_modify To create an XUL:overlay, create a XUL fragment with a top level node that has an ID matching an existing element, ex. menupopup id="menu_ToolsPopup". Learn more at Creating_a_Mozilla_Extension:Adding_the_structure. Download Visit XULBooster at SourceForge.net ...
Examples - Game development
sliding number tiles puzzle game. BananaBread A multiplayer, 3D first-person shooter game developed using Emscripten, WebGL, and WebRTC. Monster Madness A WebGL and asm.js-based multiplayer online shooter, developed by Nom Nom Games and Trendy entertainment. Auralux WebGL and asm.js-based strategy game: capture all the suns to win! BrowserQuest A MMORPG created by the Little Workshop and Mozilla. Shoot The Rocks A canvas 2D single-player shooter in the style of Atari's classic Asteroids arcade game from 1979. Star Citadel A new take on Star Castle, Cinematronics' classic 1980 arcade game, built with canvas 2D. Classic Platformer Canvas 2D game based on `Visual-ts game engine` - physics based on Matter.js Commercial games Oort Online A MMO exploration, building, and battle g...
Index - Game development
generate and render dynamic 3D graphics with JavaScript that is hardware accelerated. 16 Building up a basic demo with A-Frame 3D, A-Frame, VR, Virtual Reality, Web, WebGL The WebXR and WebGL APIs already enable us to start creating virtual reality (VR) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier. Mozilla's A-Frame framework provides a markup language allowing us to build 3D VR landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of JavaScript or GLSL. This article explains how to get up and running with A-Frame, and how to use it to build up a...
Building up a basic demo with A-Frame - Game development
The WebXR and WebGL APIs already enable us to start creating virtual reality (VR) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier. Mozilla's A-Frame framework provides a markup language allowing us to build 3D VR landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of JavaScript or GLSL. This article explains how to get up and running with A-Frame, and how to use it to build up a simple demo. High level overview The current version of A-Frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the browser. It runs on...
WebVR — Virtual Reality for the Web - Game development
our games and other applications. Note: There are of course other APIs useful for creating games, for example The Gamepad API for control inputs, and the Device Orientation API for handling display orientation on mobile. Browser support and spec status Currently browser support for the WebVR API is still experimental -- it works in nightly builds of Firefox and experimental builds of Chrome (Mozilla and Google teamed up to work on the implementation together), but sooner rather than later we'll see it in regular builds. The WebVR spec is in Editor's Draft status which means it is still subject to change. The development is led by Vladimir Vukicevic from Mozilla and Brandon Jones from Google. For more info be sure to visit the MozVR.com and WebVR.info websites. Using the WebVR API The WebV...
Game development
...
Browser - MDN Web Docs Glossary: Definitions of Web-related terms
A Web browser or browser is a program that retrieves and displays pages from the Web, and lets users access further pages through hyperlinks. A browser is the most familiar type of user agent. Learn more Download a browser Mozilla Firefox Google Chrome Microsoft Edge Opera Browser ...
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
communicating securely. ...
DNS - MDN Web Docs Glossary: Definitions of Web-related terms
DNS (Domain Name System) is a hierarchical and decentralized naming system for Internet connected resources. DNS maintains a list of domain names along with the resources, such as IP addresses, that are associated with them. The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric IP address (such as 151.106.5.172); this process of mapping a domain name to the appropriate IP address is known as a DNS lookup. By contrast, a reverse DNS lookup (rDNS) is used to determine the domain name associated with an IP address. Learn more General knowledge Understanding domain names Domain Name System on Wikipedia ...
Digital certificate - MDN Web Docs Glossary: Definitions of Web-related terms
A digital certificate is a data file that binds a publicly known cryptographic key to an organization. A digital certificate contains information about an organization, such as the common name (e.g., mozilla.org), the organization unit (e.g., Mozilla Corporation), and the location (e.g., Mountain View). Digital certificates are most commonly signed by a certificate authority, attesting to the certificate's authenticity. Learn more Digital certificate on Wikipedia ...
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
n authority within the internet that controls its own resources. Its "domain name" is a way to address this authority as part of the hierarchy in a URL - usually the most memorable part of it, for instance a brand name. A fully qualified domain name (FQDN) contains all necessary parts to look up this authority by name unambigously using the DNS system of the internet. For example, in "developer.mozilla.org": "org" is called a top-level domain. They are registered as an internet standard by the IANA . Here, "org" means "organization" which is defined in a top-level domain registry. "mozilla" is the domain. If you like to own a domain you have to register it with one of the many registrars who are allowed to do so with a top-level domain registry. "developer" is a "sub-domain", something you...
Firefox OS - MDN Web Docs Glossary: Definitions of Web-related terms
Firefox OS consists mainly of Gaia, Gecko, and Gonk. ...
Fuzz testing - MDN Web Docs Glossary: Definitions of Web-related terms
Jesse's blog posts about fuzzing Wikipedia: Fuzz testing fuzzdb jsfuzz - coverage guided javascript fuzzer ...
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
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. ...
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
ia documents on the Web, typically between a browser and a server so that humans can read them. The current version of the HTTP specification is called HTTP/2. As part of a URI, the "http" within "http://example.com/" is called a "scheme". Resources using the "http" schema are typically transported over unencrypted connections using the HTTP protocol. The "https" scheme (as in "https://developer.mozilla.org") indicates that a resource is transported using the HTTP protocol, but over a secure TLS channel. HTTP is textual (all communication is done in plain text) and stateless (no communication is aware of previous communications). This property makes it ideal for humans to read documents (web sites) on the world wide web. However, HTTP can also be used as a basis for REST web services from serve...
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
cal set of headers: 304 Not Modified Access-Control-Allow-Origin: * Age: 2318192 Cache-Control: public, max-age=315360000 Connection: keep-alive Date: Mon, 18 Jul 2016 16:06:00 GMT Server: Apache Vary: Accept-Encoding Via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (CloudFront) X-Amz-Cf-Id: TOl0FEm6uI4fgLdrKJx0Vao5hpkKGZULYN2TWD2gAWLtr7vlNjTvZw== X-Backend-Server: developer6.webapp.scl3.mozilla.com X-Cache: Hit from cloudfront X-Cache-Info: cached ...
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
dogs" makes no sense when translated literally) use of register (e.g., in Japanese respectful speech differs exceptionally from casual speech) number format (e.g., 10 000,00 in Germany vs. 10,000.00 in the U.S.) date format currency cultural references paper size color psychology compliance with local laws local holidays personal names Learn more General knowledge Localization at Mozilla on MDN Localization on Wikipedia ...
MIME type - MDN Web Docs Glossary: Definitions of Web-related terms
rves the same purpose as filename extensions traditionally do on Windows. ...
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
: text/html; charset=utf-8 Date: Mon, 18 Jul 2016 16:06:00 GMT Etag: "c561c68d0ba92bbeb8b0f612a9199f722e3a621a" Keep-Alive: timeout=5, max=997 Last-Modified: Mon, 18 Jul 2016 02:36:04 GMT Server: Apache Set-Cookie: mykey=myvalue; expires=Mon, 17-Jul-2017 16:06:00 GMT; Max-Age=31449600; Path=/; secure Transfer-Encoding: chunked Vary: Cookie, Accept-Encoding X-Backend-Server: developer2.webapp.scl3.mozilla.com X-Cache-Info: not cacheable; meta data too large X-kuma-revision: 1085259 x-frame-options: DENY ...
SLD - MDN Web Docs Glossary: Definitions of Web-related terms
An SLD (Second Level Domain) is the domain name that is located right before a TLD. For example, in mozilla.org, mozilla is the second-level domain of the .org TLD. A domain name is not limited to a TLD and an SLD. Additional subdomains can be created in order to provide additional information about various functions of a server or to delimit areas under the same domain. For example, www is a commonly used subdomain to indicate the domain points to a web server. As another example, in developer.mozilla.org, the developer subdomain is used to specify that the subdomain contains the developer section of the Mozilla website. ...
Second-level Domain - MDN Web Docs Glossary: Definitions of Web-related terms
An SLD (Second Level Domain) is the domain name that is located right before a TLD. For example, in mozilla.org, mozilla is the second level domain of the .org TLD. A domain name is not limited to a TLD and an SLD. Additional subdomains can be created in order to provide additional information about various functions of a server or to delimit areas under the same domain. For example, www is a commonly used subdomain to indicate the domain points to a web server. As another example, in developer.mozilla.org, the developer subdomain is used to specify that the subdomain contains the developer section of the mozilla website. Learn more General knowledge SLD on Wikipedia ...
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
A TLD (top-level domain) is the most generic domain in the Internet's hierarchical DNS (domain name system). A TLD is the final component of a domain name, for example, "org" in developer.mozilla.org. ICANN (Internet Corporation for Assigned Names and Numbers) designates organizations to manage each TLD. Depending on how strict an administrating organization might be, TLD often serves as a clue to the purpose, ownership, or nationality of a website. Consider an example Internet address: https://developer.mozilla.org Here org is the TLD; mozilla.org is the second-level domain name; and developer is a subdomain name. All together, these constitute a fully-qualified domain name; the addition of https:// makes this a complete URL. IANA today distinguishes the following groups of top-level...
URL - MDN Web Docs Glossary: Definitions of Web-related terms
Uniform Resource Locator (URL) is a text string that specifies where a resource (such as a web page, image, or video) can be found on the Internet. In the context of HTTP, URLs are called "Web address" or "link". Your browser displays URLs in its address bar, for example: https://developer.mozilla.org Some browsers display only the part of a URL after the "//", that is, the Domain name. URLs can also be used for file transfer (FTP) , emails (SMTP), and other applications. Learn more General knowledge URL on Wikipedia Learn about it Understanding URLs and their structure Specification The syntax of URLs is defined in the URL Living Standard. ...
WHATWG - MDN Web Docs Glossary: Definitions of Web-related terms
Learn more General Knowledge WHATWG on Wikipedia WHATWG website ...
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
WebExtensions is a cross-browser system for developing browser extensions in Firefox. This system provides APIs, which to a large extent are supported across different browsers like Mozilla Firefox, Google Chrome, Opera Browser, and Microsoft Edge . Learn more Technical reference Browser extensions on MDN ...
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
one loads a plain XML document with XLinks and attempts to click on the relevant points in the XML tree. For those who may have found XLink 1.0 cumbersome for regular links, XLink 1.1 drops the need to specify xlink:type="simple" for simple links. XLink is used in SVG, MathML, and other important standards. Specification XLink 1.0 XLink 1.1 (currently a Working Draft) See also XML in Mozilla Code snippets:getAttributeNS - a wrapper for dealing with some browsers not supporting this DOM method Code snippets:xml:base function - a rough attempt to find a full XLink-based on an xlink:href attribute (or <xi:include href=>) and its or an ancestor's xml:base. ...
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
s can be cached, these are the following constraints for an HTTP response to be cached: The method used in the request is itself cacheable, that is either a GET or a HEAD method. A response to a POST or PATCH request can also be cached if freshness is indicated and the Content-Location header is set, but this is rarely implemented. (For example, Firefox does not support it per https://bugzilla.mozilla.org/show_bug.cgi?id=109553.) Other methods, like PUT or DELETE are not cacheable and their result cannot be cached. The status code of the response is known by the application caching, and it is considered cacheable. The following status code are cacheable: 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501. There are specific headers in the response, like Cache-Control, that prevents ca...
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
en identifies the browser, its version number, and 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 ...
WebM - MDN Web Docs Glossary: Definitions of Web-related terms
WebM is royalty-free and is an open web video format natively supported in Mozilla Firefox. Learn more General knowledge WebM on Wikipedia ...
MDN Web Docs Glossary: Definitions of Web-related terms
markup MathML Media Media (Audio-visual presentation) Media (CSS) Metadata Method Microsoft Edge Microsoft Internet Explorer Middleware mime MIME type minification MitM Mixin Mobile First Modem Modern web apps Modularity Mozilla Firefox Mutable MVC N Namespace NaN NAT Native Navigation directive Netscape Navigator Network throttling NNTP Node Node (DOM) Node (networking) Node.js non-normative Normative Null Nullish value Number ...
About Scriptable Interfaces - Interfaces
Interfaces are written in an Interface Description Language. ...
Debugging CSS - Learn web development
erienced developer might be able to quickly spot the problem and point you in the right direction, and even if not, your reduced test case will enable them to have a quick look and hopefully be able to offer at least some help. In the instance that your problem is actually a bug in a browser, then a reduced test case can also be used to file a bug report with the relevant browser vendor (e.g. on Mozilla's bugzilla site). As you become more experienced with CSS, you will find that you get faster at figuring out issues. However even the most experienced of us sometimes find ourselves wondering what on earth is going on. Taking a methodical approach, making a reduced test case, and explaining the issue to someone else will usually result in a fix being found. Previous Overview: Building bloc...
CSS FAQ - Learn web development
Learn › CSS › Howto › CSS FAQ
efixed standard version afterwards so it can automatically override the prefixed versions where supported. For example: -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); Note: For more information on dealing with prefixed properties, see Handling common HTML and CSS problems -- Handling CSS prefixes from our Cross-browser testing module. Note: See the Mozilla CSS Extensions page for more information on the Mozilla-prefixed CSS properties. How does z-index relate to positioning? The z-index property specifies the stack order of elements. An element with a higher z-index/stack order is always rendered in front of an element with a lower z-index/stack order on the screen. Z-index will only work on elements that have a specified position (position:abs...
What software do I need to build a website? - Learn web development
ac OS Cyberduck Chrome OS ShiftEdit (All OS) Browsing websites As you already know, you need a web browser to view websites. There are dozens of browser options for your personal use, but when you're developing a website you should test it at least with the following major browsers, to make sure your site works for most people: Mozilla Firefox Google Chrome Microsoft Internet Explorer Apple Safari If you're targeting a specific group (e.g., technical platform or country), you may have to test the site with additional browsers, like Opera, Konqueror, or UC Browser. But testing gets complicated because some browsers only run on certain operating systems. Apple Safari runs on iOS and Mac OS, while Internet Explorer runs only...
HTML forms in legacy browsers - Learn web development
ommon patterns, it helps to read browser documentation. If you are reading this on MDN, you are at the right place to start. Just check the support of the elements (or DOM interface) you want to use. MDN has compatibility tables available for most elements, properties and APIs that can be used in a web page. There are other resources that can be amazingly helpful: Browser vendor documentation Mozilla: You're in the right place, just browse MDN Microsoft: Internet Explorer Standards Support Documentation WebKit: Because there are several different editions of this engine, things are a little trickier. The WebKit blog and Planet WebKit aggregate the best articles by WebKit core developers. Chrome platform status site is also important. As well as the Apple web site. Make th...
Styling web forms - Learn web development
m. We will build a fancy-looking "postcard" contact form; see here for the finished version. If you want to follow along with this example, make a local copy of our postcard-start.html file, and follow the below instructions. The HTML The HTML is only slightly more involved than the example we used in the first article of this guide; it just has a few extra IDs and a heading. ...
How the Web works - Learn web development
orable strings you type into your address bar to find your favorite websites. They are special numbers that look like this: 63.245.215.20. This is called an IP address, and it represents a unique location on the web. However, it's not very easy to remember, is it? That's why Domain Name Servers were invented. These are special servers that match up a web address you type into your browser (like "mozilla.org") to the website's real (IP) address. Websites can be reached directly via their IP addresses. You can find the IP address of a website by typing its domain into a tool like IP Checker. Packets explained Earlier we used the term "packets" to describe the format in which the data is sent from server to client. What do we mean here? Basically, when data is sent across the web, it is sent as ...
Publishing your website - Learn web development
ting and a domain name To have more control over content and website appearance, most people choose to buy web hosting and a domain name: Web hosting is rented file space on a hosting company's web server. You put website files on the web server. The web server provides website content to website visitors. A domain name is the unique address where people find your website, such as http://www.mozilla.org or http://www.bbc.co.uk. You can rent your domain name for as many years as you want from a domain registrar. Many professional websites go online this way. In addition, you will need a File Transfer Protocol (FTP) program (see How much does it cost: software for more details) to actually transfer the website files over to the server. FTP programs vary widely, but generally, you have to c...
Images in HTML - Learn web development
That's all for now. ...
Responsive images - Learn web development
ing the same picture. Use srcset/size to create a resolution switcher example, either to serve the same size image at different resolutions, or different image sizes at different viewport widths. Test your skills! You've reached the end of this article, but can you remember the most important information? You can find a detailed assessment that tests these skills at the end of the module; see Mozilla splash page. Summary That's a wrap for responsive images -- we hope you enjoyed playing with these new techniques. As a recap, there are two distinct problems we've been discussing here: Art direction: The problem whereby you want to serve cropped images for different layouts -- for example a landscape image showing a full scene for a desktop layout, and a portrait image showing the main sub...
Making asynchronous programming easier with async and await - Learn web development
These features basically act as syntactic sugar on top of promises, making asynchronous code easier to write and to read afterwards. They make async code look more like old-school synchronous code, so they're well worth learning. This article gives you what you need to know. ...
Drawing graphics - Learn web development
ears that followed. As you'll see below, canvas provides many useful tools for creating 2D animations, games, data visualizations, and other types of app, especially when combined with some of the other APIs the web platform provides. The below example shows a simple 2D canvas-based bouncing balls animation that we originally met in our Introducing JavaScript objects module: Around 2006-2007, Mozilla started work on an experimental 3D canvas implementation. This became WebGL, which gained traction among browser vendors, and was standardized around 2009-2010. WebGL allows you to create real 3D graphics inside your web browser; the below example shows a simple rotating WebGL cube: This article will focus mainly on 2D canvas, as raw WebGL code is very complex. We will however show how to use ...
Aprender y obtener ayuda - Learn web development
mber everything! Professional web developers use tools like MDN Web Docs to look up things they have forgotten all the time. As you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes. Videos There are also a number of sites that have video learning content on them. YouTube is an obvious one, with channels such as Mozilla Layout Land, MozillaDeveloper, and Google ChromeDevelopers providing many useful videos. Many people prefer textual articles for more in-depth learning and reference material, and videos for quick explanations of concepts and new features, but it is really up to you what you prefer to learn from. There is no right and wrong answer here. Interactive code playgrounds You might be the kind of pers...
Server-side web frameworks - Learn web development
t to do "out of the box". Because everything is included, it all works together, follows consistent design principles, and has extensive and up-to-date documentation. It is also fast, secure, and very scalable. Being based on Python, Django code is easy to read and to maintain. Popular sites using Django (from Django home page) include: Disqus, Instagram, Knight Foundation, MacArthur Foundation, Mozilla, National Geographic, Open Knowledge Foundation, Pinterest, Open Stack. Flask (Python) Flask is a microframework for Python. While minimalist, Flask can create serious websites out of the box. It contains a development server and debugger, and includes support for Jinja2 templating, secure cookies, unit testing, and RESTful request dispatching. It has good documentation and an active communit...
Website security - Learn web development
redentials, cookies, POST requests data and header information are not easily available to attackers. Keep track of the most popular threats (the current OWASP list is here) and address the most common vulnerabilities first. Use vulnerability scanning tools to perform automated security testing on your site. Later on, your very successful website may also find bugs by offering a bug bounty like Mozilla does here. Only store and display data that you need. For example, if your users must store sensitive information like credit card details, only display enough of the card number that it can be identified by the user, and not enough that it can be copied by an attacker and used on another site. The most common pattern at this time is to only display the last 4 digits of a credit card number. W...
Handling common JavaScript problems - Learn web development
ing causes all kind of interesting bugs, like bug 1308462. Handling JavaScript prefixes In the previous article, we included quite a lot of discussion about handing CSS prefixes. Well, new JavaScript implementations sometimes use prefixes too, although JavaScript uses camel case rather than hyphenation like CSS. ...
ChromeWorkers and the Chrome worker loader
That makes it available not only to the application itself, but also to add-ons. This documentation covers chrome Workers and the chrome worker module loader. Note: If you're contributing content to this section, create subpages using the "New sub-page" option in the "This page" menu. Once you've saved your new page, come back to this one and force-refresh this page. That will regenerate the table of contents below for all readers. Chrome Worker ModulesThe preferred way to define and load modules for Chrome Workers is to use the Chrome Worker Module Loader. ...
Theme concepts
However, please feel free to update your themes to use any of the new features described here. Static themes Static themes are specified using the same resources as a browser extension: a manifest.json file to define the theme components with those components stored in the same folder as the manifest.json file or a sub folder. These resources are then packed in a zip for publication on addons.mozilla.org (AMO) or for self-distribution. For more information on self-distribution, visit Signing and distributing your add-on. You can also use the theme generator on AMO to create a static theme. Additionally, Firefox Color can be used to preview customizations to the browser's theme with options to share and export a theme. A theme and browser extension functionality cannot be defined in one pac...
Android-specific test suites
well as 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 Bug...
Browser chrome tests
ork designed to allow testing of application chrome windows using JavaScript. It currently allows you to run JavaScript code in the same scope as the main Firefox browser window and report results using the same functions as the Mochitest test framework. As all tests, they won't work in a build with tests disabled (--disable-tests). Running the browser chrome tests To run Mochitest, first build Mozilla with your changes; then run ./mach mochitest -f browser This will launch your build and open a "browser chrome tests" window, and report the results in the UI and to stdout. It is possible to run specific groups of tests. As with Mochitest, the path given as an argument is the path to a test or directory within the Mozilla source tree. If the path points to a directory, then the tests in that ...
C++ portability guide
...
Continuous Integration
This document will help you understand all the pieces that comprise Mozilla's continuous integration systems. TaskCluster and Treeherder TaskCluster, Mozilla's continuous integration (CI) system picks up changes pushed to Hg. TaskCluster generate binary builds for Firefox and Firefox for Android across a variety of operating sytems. After the builds are completed, they are used to run a series of correctness and performance tests. The results of TaskCluster jobs (both builds and tests) are displayed in Treeherder. ...
Creating JavaScript callbacks in components
hes parsing a word found in the raw string data. Here is an example of how to use the callback system: var wordHandler = { onWord : function(word) { alert(word); } }; var stringParser = /* get a reference to the parser somehow */ stringParser.addObserver(wordHandler); stringParser.parse("pay no attention to the man behind the curtain"); You can find examples of this pattern all over the Mozilla codebase. In fact, there is even a specific interface for this form of push callbacks, nsIObserverService. JavaScript functions as callbacks Another common use of the pattern is found in addEventListener / removeEventListener. A nice feature of addEventListener is that you can pass a JavaScript function in place of the callback listener interface. Remember (or discover) that addEventListener is a...
Creating a Login Manager storage module
generateQI([Ci.nsILoginManagerStorage]), // This registers the category for overriding the built-in nsILoginManagerStorage _xpcom_categories: [ { category: "login-manager-storage", entry: "nsILoginManagerStorage" } ], // Console logging service, used for debugging. __logService : null, get _logService() { if (!this.__logService) this.__logService = Cc["@mozilla.org/consoleservice;1"]. getService(Ci.nsIConsoleService); return this.__logService; }, log: function (message) { dump("SampleLoginManager: " + message + "\n"); this._logService.logStringMessage("SampleLoginManager: " + message); }, // Logs function name and arguments for debugging stub: function(arguments) { var args = []; for (let i = 0; ...
Capturing a minidump
ss are fine. Capture a minidump Connect Firefox to the debugger. If Firefox is not already running, then open WinDbg from the Start menu (Start->All Programs->Debugging Tools for Windows->WinDbg). Next, open the "File" menu and choose "Open Executable...". In the file chooser window that appears, open the firefox.exe executable in your Firefox program folder (C:\Program Files\Mozilla Firefox). If Firefox is already running, open WinDbg from the Start menu (Start->All Programs->Debugging Tools for Windows->WinDbg). Next, open the "File" menu and choose "Attach to a Process...". In the file chooser window that appears, find the firefox.exe executable process with the lowest PID. You should now see a "Command" text window with debug output at the top an...
Debugging Frame Reflow
...
Debugging OpenGL
flushes out each call, essentially turning OpenGL into a synchronous API. This makes debugging crashes caused by an OpenGL call much easier, since the stack you see will match where the call was issued, rather than some time in the future when it happens to run and crash. If an OpenGL error occurred when executing the call, an error message is output. Note: You can download debug builds from Mozilla Taskcluster -- click an appropriate platform's debug build on the left, e.g. linux64-debug, then find the build link on the right hand side (this would be target.tar.bz2 for Linux, target.dmg for macOS, and target.zip for Windows). If you need more verbose debug output, you can enable the verbose debug mode by defining the environment variable MOZ_GL_DEBUG_VERBOSE. With this enabled, messages a...
Debugging update problems
You can do this using the Live HTTP Headers addon to determine the URL of the update request. That URL might look something like: https://aus3.mozilla.org/update/3/Firefox/12.0a1/20120106040225/Darwin_x86_64-gcc3-u-i386-x86_64-shark/nightly-profiling/Darwin%2010.8.0/default/default/update.xml?force=1 You can then request this URL manually to see what's inside. ...
Articles for new developers
When first getting started as a contributor to the Mozilla project, there's a lot of information to sort through and understand. To help you find the most critical stuff as quickly as possible, we've created this list of the articles you'll find most useful as you get yourself oriented and make your first contributions to the project. Also, before you go any further, we'd like to welcome you to the Mozilla community of developers! We look forward to your input! Contributing to the Mozilla code base This page should guide you through the initial steps of contributing to Mozilla. Welcome, we're delighted to see you! :) ...
Building Firefox with Debug Symbols
This value takes precedence over the flags set in MOZ_DEBUG_FLAGS Note that this will override the values provided for CFLAGS and CXXFLAGS. Breakpad symbol files After the build is complete, run the following command to generate an archive of Breakpad symbol files: mach buildsymbols The tinderbox uses an additional uploadsymbols target to upload symbols to a socorro server. See https://dxr.mozilla.org/mozilla/source/toolkit/crashreporter/tools/upload_symbols.sh for more information about the environment variables used by this target. make package If you use make package to package your build, symbols will be stripped. If you want to keep the symbols in the patches, you need to add this to your mozconfig: ac_add_options --disable-install-strip ...
Gmake vs. Pymake
Path issues on Windows On Windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir. Gmake uses MSYS paths ("/c/dev/foo"), while pymake uses native Windows paths ("C:\dev\foo"). If you try to switch from gmake to pymake or pymake to gmake the build will fail unless you did a relative configure. A relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake. To configure relatively, invoke configure or client.mk from your objdir. ...
Linux Prerequisites
Doc moved in-tree https://firefox-source-docs.mozilla.org/setup/linux_build.html ...
Building Firefox for macOS
Moved in-tree: https://firefox-source-docs.mozilla.org/setup/macos_build.html ...
Linux build preparation
Documentation moved in-tree: https://firefox-source-docs.mozilla.org/setup/linux_build.html ...
Building Firefox
Page moved in-tree https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html ...
Building Firefox for Windows
Documentation moved in-tree: https://firefox-source-docs.mozilla.org/setup/windows_build.html ...
Windows SDK versions
If it does, several features will be disabled if you build with an SDK older than the default, which means that you'll have to specify a non-default SDK version explicitly. Quick start Follow the instructions for whichever version of Visual C++ you're using. Visual Studio Professional 2013 This comes with the Windows 8.1 SDK included. Visual Studio Express 2013 for Windows Desktop This comes with the Windows 8.1 SDK included. Visual Studio Professional 2012 This comes with the Windows 8.0 SDK included. Visual Studio 2012 Express for Windows Desktop This comes with the Windows 8.0 SDK included. ...
The Firefox codebase: CSS Guidelines
re browser preconceptions - I want a blank sheet', so that's more visual. However -moz-appearance values aren't implemented and don't behave consistently across platforms, so idealism aside -moz-appearance should always be in theme CSS. [2] However there is probably a better way than using absolute positioning. Colors For common areas of the Firefox interface (panels, toolbar buttons, etc.), mozilla-central often comes with some useful CSS variables that are adjusted with the correct values for different platform configurations, so using those CSS variables can definitively save some testing time, as you can assume they already work correctly. Using the currentcolor keyword or inheriting is also good practice, because sometimes the needed value is already in the color or on the parent eleme...
Callgraph
This can be used for performing static analysis based on the relationship between functions and methods. For instance, given the C++ code: int foo() { return good(); } int good() { return evil() ? 0 : 1; } The callgraph would be foo() -> good() -> evil(). Given the knowledge that evil() does evil things, one could then determine foo() also does evil things. The Callgraph project uses gcc and Treehydra to generate information about function and method calls at compile time, and aggregates it into a sqlite database. ...
Customizing Firefox
...
Eclipse
There are versions of eclipse for several of the different languages that are used by Mozilla. For documentation on using Eclipse CDT for Mozilla C/C++ development, see the Eclipse CDT page. ...
SVG Guidelines
SVG editors) ship without being cleaned up and can contain a ton of junk that bloats the file size and slows down rendering. In general the best way to combat this is to first run SVG files through a linter such as svgo (see the Tools section below). However, when authoring SVGs by hand here are some best practices to help keep them lightweight. These rules are based on some real examples seen in Mozilla's code. Basics Two spaces indenting No useless whitespaces or line breaks (see below for more details) Adding a license header Use double quotes Whitespace and line breaks Whitespace In addition to trailing whitespace at the end of lines, there are a few more cases more specific to SVGs: Trailing whitespaces in attribute values (usually seen in path definitions) Excessive whitespa...
Multiple Firefox profiles
Reasons to have multiple profiles The casual user may want to have different profiles for work and personal use, or different family members. Having different profiles would help separate work and personal life, or allow each family member to have his or her own set of bookmarks, settings, and add-ons. ...
Communicating with frame scripts
sage managers disconnect (for example because the user closed the tab): function myObserver() { } myObserver.prototype = { observe: function(subject, topic, data) { var index = messageManagers.indexOf(subject); if (index != -1) { console.log("one of our message managers disconnected"); mms.splice(index, 1); } }, register: function() { var observerService = Cc["@mozilla.org/observer-service;1"] .getService(Ci.nsIObserverService); observerService.addObserver(this, "message-manager-disconnect", false); console.log("listening"); }, unregister: function() { var observerService = Cc["@mozilla.org/observer-service;1"] .getService(Ci.nsIObserverService); observerService.removeObserver(this, "mess...
Process scripts
or that event. The solution in these cases is to use a process script instead of a frame script. You can load a process script by accessing a parent process message manager and calling its loadProcessScript() function. The following code uses the global parent process message manager, which will load the script into the the chrome process and any child processes: // chrome code let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIProcessScriptLoader); ppmm.loadProcessScript("chrome://whatever/process-script.js", true); ppmm.addMessageListener("Hello", function(msg) { ... }); The process script's global is a child process message manager, which enables the process script to receive messages from the chrome side, and to send messages to the chrome side: // process-sc...
Firefox UI considerations for web developers
epresented by an icon and, below it, a name for the site. While both of these can be edited by the user, you may wish to ensure that your site provides a good icon to use in places like this. How an icon is selected The new tab page chooses icons to use for top sites by trying a series of methods until it obtains an icon to use: A global "top sites" list is checked. This list is created by a Mozilla service called Tippy Top. The data store provided by Tippy Top includes an optimized icon for each of the sites in the list; if the site is on this list, that icon is used. If Tippy Top doesn't include the site, Firefox looks in its Places data store for icons specified in the page's <head> element; If an SVG icon is available, that icon is selected. Otherwise, bitmapped icons which are...
mozbrowserloadend
example. Example In this example the mozbrowserloadstart and mozbrowserloadend events are used to change the icon shown on the stop/reload button between stop (x) and reload (R), as appropriate. In addition, the background of the controls UI bar is changed to the background color of the site that has just loaded, to provide a more integrated experience. When the front page of https://developer.mozilla.org is loaded, for example, the e.detail.backgroundColor value reported is rgb(0, 83, 159). var browser = document.querySelector("iframe"); browser.addEventListener('mozbrowserloadend',function(e) { stopReload.textContent = 'R'; console.log(e.detail.backgroundColor); controls.style.background = e.detail.backgroundColor; }); browser.addEventListener('mozbrowserloadend',function() { stop...
Browser API
the <iframe>'s content. Utility methods Last, there are some utility methods, useful for apps that host a browser <iframe>. HTMLIFrameElement.getStructuredData() Retrieves any structured microdata (and hCard and hCalendar microformat data) contained in the HTML loaded in the browser <iframe> and returns it as JSON. Browser API methods removed in Firefox 65 In Firefox 65, several of the Mozilla Browser API methods were removed in an effort to cut down on DOMRequest usage in the browser, and remove the parts of the Browser API that are no longer needed (it is used only by the Firefox DevTools at this point). See bug 1503070 for more details. The methods removed in Firefox 65 are: HTMLIFrameElement.addNextPaintListener() Defines a handler to listen for the next MozAfterPaint event in...
::-moz-tree-image
Activated by the properties attribute. Associated elements <xul:treeitem> <xul:treecell> Style properties margin list-style position Examples Bookmark icons in the Places window - Mozillazine Forum ...
MozScrolledAreaChanged
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 only DOMString The type of event. bubbl...
smartcard-insert
typeRead only DOMString The type of event. bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. ...
smartcard-remove
typeRead only DOMString The type of event. bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. ...
Script security
example, a normal DOM window has a content principal defined by the window's origin. A content principal subsumes only other content principals with the same origin. It is subsumed by the system principal, any expanded principals that include its origin, and any other content principals with the same origin. Expanded principal An expanded principal is specified as an array of origins: ["http://mozilla.org", "http://moz.org"] The expanded principal subsumes every content principal it contains. The content principals do not subsume the expanded principal, even if the expanded principal only contains a single content principal. Thus ["http://moz.org"] subsumes "http://moz.org" but not vice versa. The expanded principal gets full access to the content principals it contains, with Xray vision by ...
Gecko versions and application versions
Gecko 2 Firefox 4, Thunderbird 3.3, SeaMonkey 2.1 Gecko 1.9.2 Firefox 3.6, Thunderbird 3.1 Gecko 1.9.1 Firefox 3.5, Thunderbird 3, SeaMonkey 2.0 Gecko 1.9 Firefox 3 Gecko 1.8.1 Firefox 2, Thunderbird 2, SeaMonkey 1.1 Gecko 1.8 Firefox 1.5, Thunderbird 1.5, SeaMonkey 1.0 Gecko 1.7 Firefox 1.0, Thunderbird 1.0, Nvu 1.0, Mozilla Suite 1.7 older versions of Gecko match the Mozilla Suite versions ...
Hacking with Bonsai
The original Navigator code base had large sections that were shared across multiple platforms. Many times, code checked in would compile or run on a handful of platforms. Also, with as many as 100 engineers, it was very difficult to determine what happened in the tree that caused the instability. Bonsai was created to solve these problems. The Process Everyone who checks into the tree, joins a group called "the hook" At 8:00 AM PST every weekday morning, the source tree is closed. The build team will then pull the 8:00 AM tree, and build it on a subset of the platforms, Linux, Win32 & MacPPC. ...
How test harnesses work
The python harness communicates with the browser by inserting an extension in the testing profile or uses marionette's wire protocol to drive the browser. ...
How to add a build-time test
test to a module, do the following: Copy tools/test-harness/xpcshell-simple/example to yourmoduledir/tests_type, wheretests_type is something that describes your tests. You can of course use unit or test if you're not feeling creative. In <tt>yourmoduledir/tests_type/Makefile.in</tt> change DEPTH, MODULE, and XPCSHELL_TESTS appropriately: DEPTH should be a relative path pointing to <tt>mozilla/</tt>, e.g. if you're in <tt>netwerk/test</tt>, set DEPTH = ../.. MODULE should be defined to test_yourmodule or just yourmodule -- either will work fine. XPCSHELL_TESTS be a list of subdirectories of the current directory which contain xpcshell tests. You can of course just use the onetests_type directory here, but if you want to subdivide your tests by functionality, separate directories ...
How to get a process dump with Windows Task Manager
depending on what you are doing when the snapshot is taken. It is advisable to create a new, blank profile to use when reproducing the hang and capturing the memory dump. Please ask for help doing this! Requirements Windows To get a process dump, you need to be using Windows Vista or above. A Firefox nightly or release You need a Firefox version for which symbols are available from the Mozilla symbol server. You can use any official nightly build or released version of Firefox from Mozilla. You can find the latest trunk nightly builds under http://ftp.mozilla.org/pub/mozilla.o.../latest-trunk/. Creating the Dump File Ensure that Firefox is not already running. Run Firefox, reproduce the hang Start Firefox and perform whatever steps are necessary to cause Firefox to hang. Once the ...
How to investigate Disconnect failures
r the bridge or when Firefox crashes. Usually disconnects happens when a modal dialog freezes and we cannot close it sp we close Firefox with the modal frozen. We cannot investigate failures via mozmill, because we do not catch the crashes, so the crashes' information is not logged; we have to go to ci machines and investigate directly. Check if Firefox crashed: Windows: [user]/AppData\Roaming\Mozilla\Firefox\Crash Reports Ubuntu: [user/home]/.mozilla/firefox/Crash Reports And there we can check by timestamp if Firefox crashed when we had the disconnect. Check the Event Viewer to check if an OS event interfered with the test run. The event viewer can be found on Windows: Computer Management > Event Viewer > Windows Logs > Application And here we look for errors that overlap...
Creating a New Protocol
This is a quick-start on details of how to add a new IPDL protocol to the build. You should know how IPDL works first! Create the Protocol File The protocol file should live in the same directory as the code which will implement it. Protocol names start with P, and protocol files must be named PProtocolName.ipdl. IPDL protocols should be in the mozilla namespace or a sub-namespace. To hook up the file to the build, you need to add your IPDL file to IPDL_SOURCES in the nearest moz.build file. See dom/ipc/moz.build for an example. The Protocol Hierarchy Unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs. The toplevel protocol for plugins is PPluginModule. The toplevel protocol for tabs is PContent. You should ...
IPC Protocol Definition Language (IPDL)
All messages for multi-process plugins and tabs in Firefox are declared in the IPDL language. ...
Implementing QueryInterface
lse if ( aIID.Equals(NS_GET_IID(nsISupports)) ) // ... Thanks Special thanks to Heikki Toivonen, Chris Waterson, and John Bandhauer for valuable feedback that significantly improved the implementations presented here. Original Document Information Author(s): Scott Collins Last Updated Date: May 8, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Add-on Manager
These pages show you how to load pages such as services page etc. ...
Add-on Repository
Its API provides URLs that can be visited to browse the repository's add-ons. The API also offers two ways to search for and retrieve an array of Addon instances: retrieveRecommendedAddons(), which returns a list of recommended add-ons, and searchAddons(), which performs a search of the repository. These searches are asynchronous; results are passed to the provided SearchCallback object when the search is completed. ...
JavaScript OS.Constants
getService(Components.interfaces.nsIOSFileConstantsService). init(); From a chrome worker No initialization is required. ...
PromiseWorker.jsm
es but it is not limited to that. There is no XPCOM access, similar to ChromeWorker. This answers the question "When should I use a PromiseWorker?", and the answer is, whenever you would normally use a ChromeWorker, but want postMessage to return promises. The PromiseWorker object is used to deliver all of the OS.File functionality to the main thread. Here is the test case from Firefox codebase: Mozilla DXR :: test_Promise.js. PromiseWorker module consists of two JavaScript files, PromiseWorker.jsm and PromiseWorker.js. PromiseWorker.jsm Path: resource://gre/modules/PromiseWorker.jsm A JavaScript code module used by the main thread to create a worker thread and communicate with it. PromiseWorker.jsm provides BasePromiseWorker. PromiseWorker.js Path: resource://gre/modules/workers/PromiseWo...
Using workers in JavaScript code modules
sing 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 interface: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); var worker = workerFactory.newChromeWorker('script_url.js'); This will create a new chrome worker that will immediately begin to run the script at the specified URL (in this case, "script_url.js"). For example, "script_url.js" can be "chrome://extension_name/content/script.js...
WebChannel.jsm
e send() Sends messages over the WebChannel id using the "WebChannelMessageToContent" event. Parameters message The message object that will be sent senderContext The senderContext parameter passed to the .listen method. ...
XPCOMUtils.jsm
anager instance to use for managing the component. fileSpec An nsIFile instance for... what? componentsArray The array of components passed to generateModule(). This function doesn't need to return a value. ...
openLocationLastURL.jsm
omatically handles private browsing mode for you. The value preserved across accesses is not preserved when the user exits private browsing mode. Using the OpenLocationLastURL object To get or set the value of the Open Location edit box, simply read the value of, or set the value of, the OpenLocationLastURL.value field: var url = OpenLocationLastURL.value; OpenLocationLastURL.value = "http://www.mozilla.org/"; To reset the value of the edit box to the default (which is an empty string), you can call the reset() method: Method overview reset() Methods reset The reset() method resets the saved URL to the default, which is an empty string. reset(); Parameters None. ...
JavaScript code modules
ould be used by Firefox itself as well as by extensions, in order to avoid code duplication. General topics Using JavaScript code modules An introduction to how to use JavaScript code modules. Components.utils.import How to import a JavaScript code module. Components.utils.unload How to unload a JavaScript code module. Code snippets: Modules Examples of how to use code modules. Mozilla Labs JS Modules This page features a list of JavaScript modules, along with download links and documentation, that extension developers can use in their code. Standard code modules AddonManager.jsm An interface to install, manage, and uninstall add-ons. AddonRepository.jsm Provides a search of add-ons in the repository. Assert.jsm Implements the CommonJS Unit Testing specification ...
Encodings for localization files
There are a few exceptions, though. Installer The Windows installer can't handle UTF-8, but only the codepages provided by Windows. This is tricky to hook up in the build process, so here it goes: File Encoding Notes toolkit/installer/windows/charset.mk ASCII The WIN_INSTALLER_CHARSET variable must be set to an encoding which matches toolkit/installer/windows/install.it CHARSET= parameter. See the table below for appropriate values. toolkit/installer/windows/install.it A Windows codepage. ...
Localizing XLIFF files for iOS
y if you're already familiar with XML. This tutorial will walk you through the steps you need to take to translation strings within an XLIFF file. String repository for Firefox on iOS The firefox-ios.xliff file is located in SVN. Decide where on your local computer you will store your copy of the github repo and navigate there in your terminal. Enter the command git clone https://github.com/mozilla-l10n/firefoxios-l10n/your-locale-code/ You should now see the firefox-ios project in your selected directoy with the firefox-ios.xliff file in it. Translating the XLIFF file Open the firefox-ios.xliff file in your favorite text editor. In the <file> tag, add the target-language attribute with your locale code as the value (e.g., target-language="xx-XX"). Be aware that there may be many <fi...
Localization sign-off reviews
w of why we do sign-off reviews of localizations, the details on the criteria used for the sign-off reviews, and the process for requesting a review and for following its progress. The sign-off review process has been notoriously shrouded in mystery. We use this review process to perform quality assurance (QA) testing on your L10n efforts. This ensures that every user who downloads your localized Mozilla application receives all of your hard work in a functional product. Each QA review helps us in these ways: Ensures that your L10n work is visible and functional within the Mozilla application. Allows us to understand how each L10n team is performing their localization work. Allows us to discover potential bugs within L10n tools. Overview You've done some localization work and are ready for i...
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
...
MathML Torture Test
Link to test: MathML Torture Test demo ...
MathML Demo: <mfrac> - fractions
i</mi> <mi>z</mi> <mo stretchy='false'>)</mo> <msup> <mrow> <mo>(</mo> <mo>-</mo> <mi>z</mi> <mo>)</mo> </mrow> <mi>&alpha;</mi> </msup> </mrow> <mrow> <msup> <mi>e</mi> <mrow> <mn>2</mn> <mi>&pi;</mi> <mi>z</mi> </mrow> </msup> <mo>-</mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mi>d</mi> <mi>z</mi> </mrow> </math> CSS Content [class="background"] { background-image: url(http://www.mozilla.org/images/mozilla-banner.gif); opacity: 0.2; position: absolute; left: 0; width: 100%; height: 58px; } ...
Using the viewport meta tag to control layout on mobile browsers
meta name="viewport">' in that specification. Working Draft Non-normatively describes the Viewport META element There is clearly demand for the viewport meta tag, since it is supported by most popular mobile browsers and used by thousands of web sites. It would be good to have a true standard for web pages to control viewport properties. As the standardization process proceeds, we at Mozilla will work to keep up to date with any changes. ...
Adding a new Telemetry probe
...
Investigating leaks using DMD heap scan mode
st go through and mark off the things that are easily categorizable, and repeat until you have a small list of things to analyze. Example analysis of block_analyzer.py results In one debugging session where I was investigating the leak from bug 1451985, I eventually reduced the list of entries until this was the most suspicious looking entry: 0x7f0892f29630 size = 392 bytes at byte offset 56 mozilla::dom::ScriptLoader::ProcessExternalScript[...] [...] I went to that line of ScriptLoader::ProcessExternalScript(), and it contained a call to ScriptLoader::CreateLoadRequest(). Fortunately, this method mostly just contains two calls to new, one for ScriptLoadRequest and one for ModuleLoadRequest. (This is where an unoptimized build comes in handy, as it would have pointed out the exact line. U...
Investigating CSS Performance
Two counts are collected which allow for an estimation of the amount of work being done during restyle: resolveStyleForCount this is incremented everytime that we do style resolution on an element ContentEnumFuncCount this is incremented roughly for every rule that we test against Time during restyle can be spent in a bunch of places. For example, HasStateDependentStyle will compute a hint that determines how many elements we'll restyle. If we get a eRestyle_Subtree we will restyle more elements. ...
Memory Profiler
...
Profiling with Xperf
st versions of the Windows Performance Toolkit, you can modify the symbol path directly from within the program via the Trace menu. Just make sure you set the symbol paths before enabling "Load Symbols" and before opening a summary view. You can also modify the _NT_SYMBOL_PATH and _NT_SYMCACHE_PATH environment variables to make these changes permanent. The standard symbol path that includes both Mozilla's and Microsoft's symbol server configuration is as follows: _NT_SYMCACHE_PATH: C:\symbols _NT_SYMBOL_PATH: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;srv*c:\symbols*http://symbols.mozilla.org/firefox/ To add symbols from your own builds, add C:\path\to\objdir\dist\bin to _NT_SYMBOL_PATH. As with all Windows paths, the symbol path uses semicolons (;) as separators. Make sure you s...
Profiling with the Gecko Profiler and Local Symbols on Windows
eta or Release channel version, and you want proper C++ callstacks in your profiles, add ac_add_options --enable-profiling to your Firefox .mozconfig file. You don't need to do this if you're building Nightly, because --enable-profiling is the default on Nightly. Build Firefox as usual, e.g. using ./mach build. Generate the Breakpad symbol files by running ./mach buildsymbols: https://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols#Breakpad_symbol_files This will have created symbols under $OBJDIR/dist/ , named after the binary name, architecture and version, so something like "firefox-40.0a1.en-US-win32.crashreporter-symbols.zip" Point talos to this zipfile by passing its path to the --symbolsPath flag. ...
Scroll-linked effects
animations in JavaScript, with an additional proposal to map scroll position to time and use that as a timeline for the animation. CompositorWorker: Allows JavaScript to be run on the compositor thread in small chunks, provided it doesn't cause the framerate to drop. Scroll Customization: Introduces a new API for content to dictate how a scroll delta is applied and consumed. As of this writing, Mozilla does not plan to support this proposal, but it is included for completeness. Call to action If you have thoughts or opinions on: Any of the above proposals in the context of scroll-linked effects. Scroll-linked effects you are trying to implement. Any other related issues or ideas. Please get in touch with us! You can join the discussion on the public-houdini mailing list. ...
tools/power/rapl
These are machine-wide estimates, so if you want to estimate the power consumption of a single program you should minimize other activity on the machine while measuring. Note: The power profiling overview is worth reading at this point if you haven't already. It may make parts of this document easier to understand. Invocation First, do a standard build of Firefox. Mac On Mac, rapl can be run as follows. $OBJDIR/dist/bin/rapl Linux On Linux, rapl can be run as root, as follows. ...
javascript.options.strict
rst Name</label> <p id ="sample"></p> <script> "use strict" name1= "John" ; // This will cause and an error as variable not declared . var name2= "Peter"; document.getElementById("sample").innerHTML = name1; </script> </body> </html> Possible values and their effects: True: Show JavaScript errors and warnings. False: Show JavaScript errors only. (Default) See also: http://kb.mozillazine.org/Javascript.options.strict ...
Preferences system
rough a few XUL elements and attributes. Reference information about them is available below: Preferences System documentation: Introduction: Getting Started | Examples | Troubleshooting Reference: prefwindow | prefpane | preferences | preference | XUL attributes Use Code for a typical preferences window may look like this: <prefwindow id="appPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> .. UI elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pan...
A guide to searching crash reports
This guide to searching through crash reports may help you locate the crash reports that will help you find and fix the Firefox bug you're working on. Specifically, crash-stats offers two basic functions: Searching You can search the crash reports database by over 100 criteria: crash signature, date, platform, product, version, etc. Grouping You can cluster the results of each search into groups using the same criteria. ...
Debugging out-of-memory problems
s encountered. 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. ...
Firefox Sync
browser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices. The exact types of information synced is user-configurable in the browser's preferences or options page. It uses Firefox Accounts for account, authentication and key management. All data is encrypted and decrypted on each device; no Sync data is ever transmitted to a server without being encrypted. Mozilla does not hold any keys to your Sync data. Your data can only be decrypted by someone who is able to log in to your Firefox Account (ie, that knows your Firefox Accounts password and has access to your email for the verification required during the initial login). Documentation This document serves as an index for all technical documentation related to Sync. It is not designed for use by end-use...
Installing JSHydra
t need to worry about obtaining the right version of SpiderMonkey. Building JSHydra JSHydra requires, as part of its build process, SpiderMonkey. By default, the configure script will obtain a known working copy of SpiderMonkey; it is possible via the --moz-src and --moz-obj configure arguments to tell JSHydra to use existing copies of the source and build. cd $HOME/jshydra hg clone http://hg.mozilla.org/users/Pidgeot18_gmail.com/jshydra/ cd jshydra ./configure make # run jshydra tests make check Processing input files JSHydra requires the files it processes to be correct JS files. Converting HTML, XUL, or XBL files into a readable JS equivalent is a work in progress, as is accounting for the preprocessing that Mozilla files sometimes use. There is not yet a repository for this informatio...
JSHydra
In its back-end, it uses the parse tree created by the SpiderMonkey engine. All analysis is performed by running JavaScripts. ...
L20n
documentation please see our documentation on GitHub. A JavaScript localization framework to unleash your natural language's power with simple code. Introducing L20n L20n reinvents software localization. Users should be able to benefit from the entire expressive power of the natural language. L20n keeps simple things simple, and at the same time makes complex things possible. Through L20n, Mozilla is creating a new generation of technology that places more power in localizers' hands. L20n lets localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic. It allows to adapt your web application not only to languages and cultures, but also contextual data, user gender and screen dimensions. What L20n looks like Here is a...
Leak Monitor
Leak Monitor is a Firefox extension by L. ...
Programs Using NSPR
Most of these are derived from Netscape servers. ...
PRBool
Use standard C++ bool instead. Otherwise, use PRBool for variables and parameter types. ...
PRUnichar
An unsigned 16-bit type, like char in Java or the "characters" of a JavaScript string defined in /mozilla/xpcom/base/nscore.h. Syntax #if defined(NS_WIN32) typedef wchar_t PRUnichar; #else typedef PRUInt16 PRUnichar; #endif ...
PR ImportTCPSocket
...
Thread Synchronization Sample
This page has no content. Enrich Mozilla Developer Center by contributing. ...
Certificate functions
The NSS version column indicates which versions of NSS support the function. ...
Cryptography functions
The NSS version column indicates which versions of NSS support the function. ...
Deprecated SSL functions
The following SSL functions have been replaced with newer versions. The deprecated functions are not supported by the new SSL shared libraries. Applications that want to use the SSL shared libraries must convert to calling the new replacement functions listed below. Each function name is linked to its entry in the old SSL Reference. The Mozilla Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. Function name/documentation Source code Replacement in NSS 3.2 SSL_Enable MXR SSL_OptionSet SSL_EnableCipher MXR SSL_CipherPrefSetDefault SSL_EnableDefault MXR SSL_OptionSetDefault SSL_R...
HTTP delegation
he callback functions as a thin layer that forwards requests from NSS to the HTTP client library. To learn about all the details, please read the documentation contained in the NSS C header files. Look for function SEC_RegisterDefaultHttpClient and all functions having names that start with SEC_Http. To find an example implementation, you may look at bug 111384, which tracks the implementation in Mozilla client applications. Specifying an OCSP proxy The remainder of this document is a short HOWTO. One might expect the API defines a simple function that accepts the URI and data to be sent, and returns the result data. But there is no such simple interface. The API should allow NSS to use the HTTP client either asynchronously or synchronously. In addition, during an application session with OCSP en...
HTTP delegation
he callback functions as a thin layer that forwards requests from NSS to the HTTP client library. To learn about all the details, please read the documentation contained in the NSS C header files. Look for function SEC_RegisterDefaultHttpClient and all functions having names that start with SEC_Http. To find an example implementation, you may look at bug 111384, which tracks the implementation in Mozilla client applications. Specifying an OCSP proxy The remainder of this document is a short HOWTO. One might expect the API defines a simple function that accepts the URI and data to be sent, and returns the result data. But there is no such simple interface. The API should allow NSS to use the HTTP client either asynchronously or synchronously. In addition, during an application session with OCSP en...
Introduction to Network Security Services
functions. For information on which static libraries in NSS 3.1.1 are replaced by each of the above shared libraries in NSS 3.2 , see Migration from NSS 3.1.1. Figure 1, below, shows a simplified view of the relationships among the three shared libraries listed above and NSPR, which provides low-level cross platform support for operations such as threading and I/O. ...
Build instructions for JSS 4.4.x
...
NSS Memory allocation
of the use of PLArenaPools that affect leak analysis. They are: 1. At the end of execution of a program, all the arenas in the free list will appear to have been leaked. This makes it difficult to tell arenas that are truly leaked from those that are merely in the free list. There is a function named PL_ArenaFinish that really frees all the arenas on the free list. See the prototype at http://mxr.mozilla.org/nspr/source/n.../ds/plarenas.h A program should call that function at the very end, after having shutdown NSS and NSPR, to really free the contents of the free list. After that function returns, any arenas that still appear to be leaked have truly been leaked, and are not merely on the free list. 2. Leak analysis tools will frequently report the wrong call stack for the allocation of leaked a...
NSS API Guidelines
These guidelines will familiarize you with some of the ways things can be done in the NSS code. This will help you understand existing NSS code. It should also help you understand how to write new code, and where to place it. Some of the guidelines in this document, are more forward-looking than documentary. These rules are here to help us all immediately achieve more consistent and usable code, but some existing code won't follow all these rules. ...
Release notes for recent versions of NSS
...
nss tech note5
Note: This document contains code snippets that focus on essential aspects of the task and often do not illustrate all the cleanup that needs to be done. Also, this document does not attempt to be an exhaustive survey of all possible ways to do a certain task; it merely tries to show a certain way. ...
NSS Tech Notes
TN1: How to use the NSS ASN.1 and QuickDER decoders. TN2: Using the PKCS #11 Module Logger. TN3: All About Certificate Extensions. TN4: Pulling certificate extension information out of SSL certificates. TN5: Using NSS to perform miscellaneous cryptographic operations. TN6: NSS .chk Files for the FIPS Mode. TN7: RSA Signing and Encryption with NSS. ...
NSS PKCS11 Functions
he same password again. Failing to terminate when the retry argument is PR_TRUE can result in an endless loop. Several functions in the NSS libraries use the password callback function to obtain the password before performing operations that involve the protected information. The third parameter to the password callback function is application-defined and can be used for any purpose. For example, Mozilla uses the parameter to pass information about which window is associated with the modal dialog box requesting the password from the user. When NSS SSL libraries call the password callback function, the value they pass in the third parameter is determined by SSL_SetPKCS11PinArg. See Also For examples of password callback functions, see the samples in the Samples directory. ...
PKCS11 Implement
NOTE: This document was originally for the Netscape Security Library that came with Netscape Communicator 4.0. This note will be removed once the document is updated for the current version of NSS. This document supplements the information in PKCS #11: Cryptographic Token Interface Standard, version 2.0 with guidelines for implementors of cryptographic modules who want their products to work with Mozilla client software: How NSS Calls PKCS #11 Functions. Function-specific information organized in the same categories as the PKCS #11 specification. Functions for Different Kinds of Tokens. Summarizes the support NSS expects from different kinds of tokens. Installation. Installing modules and informing the user of changes in the Cryptographic Modules settings. Semantics Unique to NSS. Miscellane...
PKCS 12 functions
The NSS version column indicates which versions of NSS support the function. ...
PKCS 7 functions
The NSS version column indicates which versions of NSS support the function. ...
Sample manual installation
The NSS build system does not include a target to install header files and shared libraries in the system directories, so this needs to be done manually. After building NSS with "gmake nss_build_all", the resulting build can be found in the NSS source tree as follows: NSS header files: mozilla/dist/public/nss NSPR header files: mozilla/dist/<OBJ-DIR>/include NSPR/NSS shared libs: mozilla/dist/<OBJ-DIR>/lib NSS binary executables: mozilla/dist/<OBJ-DIR>/bin. where <OBJ-DIR> would vary according to the type of build and the platform. For example, <OBJ-DIR> for a debug build of NSS on the x86 platform with a Linux kernel version 2.6 with glibc would be: Linux2.6_x86_glibc_PTH_DBG.OBJ From these directories, you can copy the files to any system (or other) directory. If the destination...
FC_GetInfo
meter: pInfo points to a CK_INFO structure Description FC_GetInfo returns general information about the PKCS #11 library. On return, the CK_INFO structure that pInfo points to has the following information: cryptokiVersion: PKCS #11 interface version number implemented by the PKCS #11 library. The version is 2.20 (major=0x02, minor=0x14). manufacturerID: the PKCS #11 library manufacturer, "Mozilla Foundation", padded with spaces to 32 characters and not null-terminated. flags: should be 0. libraryDescription: description of the library, "NSS Internal Crypto Services", padded with spaces to 32 characters and not null-terminated. libraryVersion: PKCS #11 library version number, for example, 3.11 (major=0x03, minor=0x0b). A user may call FC_GetInfo without logging into the token (to assum...
FC_GetTokenInfo
pInfo points to a CK_TOKEN_INFO structure Description FC_GetTokenInfo returns information about the token in the specified slot. On return, the CK_TOKEN_INFO structure that pInfo points to has the following information: label: the label of the token, assigned during token initialization, padded with spaces to 32 bytes and not null-terminated. manufacturerID: ID of the device manufacturer, "Mozilla Foundation", padded with spaces to 32 characters and not null-terminated. model: model of the device, "NSS 3", padded with spaces to 16 characters and not null-terminated. serialNumber: the device's serial number as a string, "0000000000000000", 16 characters and not null-terminated. flags: bit flags indicating capabilities and status of the device. CKF_RNG (0x00000001): this device has a ran...
FC_InitToken
KR_SLOT_ID_INVALID: slot ID is invalid. CKR_TOKEN_WRITE_PROTECTED we don't have a reference to the key database (we failed to open the key database or we have released our reference). CKR_DEVICE_ERROR: failed to reset the key database. Application usage FC_InitToken() is used to reset the password for the key database when the user forgets the password. The "Reset Password" button of the Mozilla Application Suite and SeaMonkey (in Preferences->Privacy & Security->Master Passwords) calls FC_InitToken(). The "-T" (token reset) command of certutil calls FC_InitToken(). Note: Resetting the password clears all permanent secret and private keys. You won't be able to decrypt the data, such as Mozilla's stored passwords, that were encrypted using any of those keys. See also FC_InitPIN, NSC_...
NSC_InitToken
ase is in slot 2. Slot 1 doesn't have a key database.) we don't have a reference to the key database (we failed to open the key database or we have released our reference). CKR_DEVICE_ERROR: failed to reset the key database. Examples Application usage NSC_InitToken() is used to reset the password for the key database when the user forgets the password. The "Reset Password" button of the Mozilla Application Suite and SeaMonkey (in Preferences->Privacy & Security->Master Passwords) calls NSC_InitToken(). The "-T" (token reset) command of certutil calls NSC_InitToken(). Note: Resetting the password clears all permanent secret and private keys. You won't be able to decrypt the data, such as Mozilla's stored passwords, that were encrypted using any of those keys. See also NSC_InitPIN, F...
NSS environment variables
MOZ_DEBUG_FLAGS String When MOZ_DEBUG_SYMBOLS is set, you may use MOZ_DEBUG_FLAGS to specify alternative compiler flags to produce symbolic debugging information in a particular format. 3.12.8 NSDISTMODE String On operating systems other than Windows, this controls whether copies, absolute symlinks, or relative symlinks of the output files should be published to mozilla/dist. The possible values are: copy: copies of files are published absolute_symlink: symlinks whose targets are absolute pathnames are published If not specified, default to relative symlinks (symlinks whose targets are relative pathnames). On Windows, copies of files are always published. Before 3.0 NS_USE_GCC Boolean (1 to enable) On systems wh...
OLD SSL Reference
OLD SSL Reference We are migrating this SSL Reference into the format described in the MDN Style Guide. If you are inclined to help with this migration, your help would be very much appreciated. Upgraded documentation may be found in the Current NSS Reference SSL Reference Newsgroup: mozilla.dev.tech.crypto Writer: Sean Cotter Manager: Wan-Teh Chang Chapter 1 Overview of an SSL Application SSL and related APIs allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications. This chapter introduces some of the basic SSL functions. Chapter 2, "Getting Started With SSL" illustrates their use in sample client and server applications. Initialization Initializing Caches ...
SSL functions
s, and Utility functions described below on this page. Other sources of information: The NSS_reference documents the functions most commonly used by applications to support SSL. The NSS home page links to additional SSL documentation. If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozilla Cross Reference (DXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function. Function name/documentation Source code NSS versions NSS_GetClientAuthData MXR 3.2 and later NSS_SetDomesticPolicy MXR 3.2 and later ...
S/MIME functions
The NSS version column indicates which versions of NSS support the function. ...
NSS Tools
NSS Security Tools Newsgroup: mozilla.dev.tech.crypto Overview The NSS Security Tools allow developers to test, debug, and manage applications that use NSS. The Tools Information table below describes both the tools that are currently working and those that are still under development. The links for each tool take you to the source code, documentation, plans, and related links for each tool. The links will become active when information is available. Currently, you must download the NSS 3.1 source and build it to create binary files for the NSS tools. For information about downloading the NSS source, see https://developer.mozilla.org/NSS/Building. If you have feedback or questions, please feel free to post to mozilla.dev.tech.crypto. This newsgroup is the preferred forum for all que...
Utility functions
The NSS version column indicates which versions of NSS support the function. ...
modutil-tasks.html
NSS Security Tools: modutil Tasks Newsgroup: mozilla.dev.tech.crypto Task List The jar installation script is very fragile with respect to platform definitions (especially version numbers). A fix was made for "HPUX B.11.00," but issues may still arise for platforms like "Linux 2.2.12-20." Documentation needs to be explicit about the use of Fo ...
NSS Tools certutil-tasks
Most certutil errors provide no detail. Mistakes with command-line options just print a usage message. Improve certificate listings. Allow for sorting by name and trust. Sorting by trust will return CA certs first. Allow listing and lookup of keys by index and nickname. Improve coherence of key and certificate nicknames. Remove keys "stranded" without a certificate (except for the imminent (????) encryption key for password files). Support importing keys from a file. Improve hardware token support. (bugfix) Some certificate extensions cause certutil to crash. ...
NSS Tools cmsutil
Syntax To run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section. Each command takes one option. Each option may take zero or more arguments. To see a usage string, issue the command without options. Options and Arguments Options specify an action. Option arguments modify an action. The options and arguments for the cmsutil command are defined as follows: Options -DDecode a message. -C Encrypt a message. ...
NSS Tools crlutil
The key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation. This document discusses certificate revocation list management. ...
NSS Tools dbck-tasks
This file could be mailed to a mail alias to assist in finding the source of database corruption. The dbck tool should be able to repair a currupted database. There should be command-line options and, perhaps, an interactive mode to allow determine which certificates to keep. ...
NSS Tools modutil-tasks
NSS Security Tools: modutil Tasks Newsgroup: mozilla.dev.tech.crypto Task List The jar installation script is very fragile with respect to platform definitions (especially version numbers). A fix was made for "HPUX B.11.00," but issues may still arise for platforms like "Linux 2.2.12-20." Documentation needs to be explicit about the use of Fo ...
NSS Tools modutil
You can use the tool to add and delete PKCS #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable FIPS 140-2 compliance, and assign default providers for cryptographic operations. This tool can also create key3.db, cert8.db, and secmod.db security database files. ...
NSS Tools pk12util-tasks
NSS Security Tools: pk12util Tasks Newsgroup: mozilla.dev.tech.crypto Task List Need to migrate code to use an up-to-date version of NSS. Use NSS functions in pcertdb for handling older database ...
NSS Tools pk12util
The tool allows you to import certificates and keys from pkcs #12 files into NSS or export them and also list certificates and keys in such files. Availability See the release notes for the platforms this tool is available on. ...
NSS Tools signver-tasks
NSS Security Tools: signver Tasks Newsgroup: mozilla.dev.tech.crypto Task List Remove private hash algortihms and replace with code in lib/hash, lib/crypto, and ...
NSS Tools ssltap
It watches TCP connections and displays the data going by. If a connection is SSL, the data display includes interpreted SSL records and handshaking. Availability This tool is known to build on Solaris 2.5.1 (SunOS 5.5.1) and Windows NT 4.0. Description The ssltap command opens a socket on a rendezvous port and waits for an incoming connection from the client side. Once this connection arrives, the tool makes another connection to the specified host name and port on the server side. It passes any data sent by the client to the server and vice versa. ...
The Necko HTTP module
rning what is cached and for how long. ...
Necko Interfaces Overview
...
Proxies in Necko
tion 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 maybe some more details about SOCKS proxies. Original Document Information Author(s): Christian Biesinger Last Updated Date: April 8, 2005 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Pork Tool Development
o". Then any post-location variables refer to "Foo" and pre-location variables refer to "MY_FOO". CPPSourceLoc wraps SourceLoc, providing information about macro expansion. CPPSourceLoc will change the previously provided location information (in variable cpp_source_loc._loc) from post-location to pre-location. All values from the AST refer to the post-location. Notes The #static channel on irc.mozilla.org is for discussion of Pork, Dehydra, and other static analysis tools. ...
Rhino community
Have a question that you can't find answer to in the Rhino documentation? Here are some additional resources for help: Mailing List Rhino discussions happen on the mozilla-rhino group on Google Groups. There is a much older group, mozilla.dev.tech.js-engine.rhino, that is no longer actively used. Please use the new group instead, but the old one may be of historical interest. The mozilla.dev.tech.js-engine newsgroup answers questions about the C implementation of JavaScript, and was also used for answering questions about Rhino until September 27, 2007. To view archived messages earlier than September 27, 2007, try Google group for the earlier newsgroup. Bug System The best way to enter Rhino bugs to enter an issue in GitHub. If you have the inclination to fix it, you are also enc...
Rhino Debugger
The Rhino JavaScript debugger is a GUI that allows debugging of interpreted JavaScript scripts run in Rhino. Note that this debugger will not work with JavaScript scripts run in the mozilla browser since Rhino is not the engine used in such environments. Current limitations: No breakpoint menu Using the Rhino JavaScript Debugger The Mozilla Rhino JavaScript engine includes a source-level debugger for debugging JavaScript scripts. The debugger is itself a Java program which you may run as java org.mozilla.javascript.tools.debugger.Main [options] [filename.js] [script-arguments] where the options are the same as the shell. The Rhino JavaScript Debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view va...
Running the Rhino tests
Test results can be viewed in HTML format in file build/test/report/index.html. ...
Download Rhino
download older Rhino versions, see the Rhino downloads archive. License Rhino is open source. As of release 1.7R4 Rhino is available under MPL 2.0. Previous versions were released under MPL 1.1/GPL 2.0 license. See Rhino license for further information. Source In addition to getting the source from the zip files above, the source code for Rhino can be found in github at https://github.com/mozilla/rhino. To get the source, use the command git clone https://github.com/mozilla/rhino.git Rhino uses Gradle as its build system. Running the ./gradlew tasks command at the top directory of the Rhino distribution will print the list of available build targets. ...
Rhino downloads archive
See also Rhino downloads. You can download binary distributions of Rhino from http://ftp.mozilla.org/pub/mozilla.org/js/. Release Release Date Change log Download link Rhino 1.7R4 2012-06-18 New in Rhino 1.7R4 rhino1_7R4.zip Rhino 1.7R3 2011-05-09 New in Rhino 1.7R3 rhino1_7R3.zip Rhino 1.7R2 2009-03-22 New in Rhino 1.7R2 rhino1_7R2.zip Rhino 1.7R1 2008-03-06 New in Rhino 1.7R1 rhino1_7R1.zip Rhino 1.6R7 2007-08-20 New in Rhino 1.6R7 rhino1_6R7.zip Rhino 1.6R6 2007-07-30 New in Rhino 1.6R6 rhino1_6R6.zip Rhino 1.6R5 2006-11-19 Same code as 1.6R4, but relicensed under MPL/GPL. rhino1_6R5.zip Rhino 1.6R4 2006-09-10 bug 343976 rhi...
Rhino Examples
Sample Scripts The unique.js script allows printing unique lines from a file. The liveConnect.js script shows a sample usage of LiveConnect (Java-to-JavaScript connectivity). The jsdoc.js script is a JavaScript analog to Java's javadoc. It makes heavy use of regular expressions. The checkParam.js script is a useful tool to check that @param tags in Java documentation comments match the parameters in the corresponding Java method. ...
Rhino FAQ
types is slightly different: you must use the TYPE field. For example, creating an array of seven ints can be done with the code var intArray = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 7); When I try to execute a script I get the exception Required security context missing. What's going on? You've likely missed placing the Security.properties file in your class path at org.mozilla.javascript.resources. Can I use Rhino in a web browser? Rhino is a library for Java use, and not for general web browsers. However, a Java-based browser may use Rhino with scripts from a page in the same manner that any other Java program would. ...
Rhino license
All Rights Reserved. ...
New in Rhino 1.7R4
...
The JavaScript Runtime
eton object defined by Context.getUndefinedType() Null null Boolean java.lang.Boolean Number java.lang.Number, that is, any of java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Float, or java.lang.Double. Not java.lang.Long, since a double representation of a long may lose precision. String java.lang.CharSequence (java.lang.String or org.mozilla.javascript.ConsString) Object org.mozilla.javascript.Scriptable In addition, ECMA refers to objects that implement [[Call]] as functions. These object types are represented by implementing the Function interface. Since JavaScript is a dynamically typed language, the static Java type of a JavaScript value is java.lang.Object. The behavior of the JavaScript engine is undefined ...
FOSS
rMonkey http://www.jsdb.org/ - a JS Shell with native objects for files, networks, databases, compression, email, etc. http://code.google.com/p/gpsee/ - commonJS platform, native-language module interoperability methods, modules, etc. for SpiderMonkey. Designed to supplement existing embeddings, GPSEE ships with a sample trivial embedding, a scripting host, and an augmented version of Mozilla's JS Shell. Bundled modules include support for ByteArray, ByteString, CGI, POSIX Signals, FFI, and more. http://javalikescript.free.fr/ - a general-purpose JavaScript platform that aims to provide an extensible tooling framework http://www.synchro.net/ - a telnet/SSH bulletin board system (BBS) and internet server (HTTP/SMTP/FTP) with extra Internet services written in JavaScript (IR...
Future directions
es. See http://hsivonen.iki.fi/vendor-prefixes/ for an extended argument. Disable the feature before the Beta channel. Nightly and Aurora are the good channels for experimental work. NSPR The plan is to make SpiderMonkey not depend on NSPR. No fundamental blockers currently exist, but ctypes is still using NSPR's runtime library loading facilities. Directories and filenames See https://wiki.mozilla.org/JS_engine_modularization. ...
How to embed the JavaScript engine
s-31 -lz [Linux] g++ -std=c++11 -I<objdir>/dist/include -L<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz -lpthread -ldl It should print "helloworld, it is TIME" (here TIME is the current time). Make sure the build computer has the prerequisites for building SpiderMonkey: Linux, Windows, Mac OS X, others. For Windows, the following steps will assume that you have installed the MozillaBuild package. Get the SpiderMonkey source code. You can download a source archive or use Mercurial (hg) to pull the SpiderMonkey repository. On Windows, do not install the SpiderMonkey source code under the MSYS root directory (which is usually c:\mozilla-build\msys). Instead use something like c:\mozjs-31.2.0 Compile SpiderMonkey using the build instructions at SpiderMonkey Build Documentation...
Functions
the function can be implemented as a flat closure. When a flat closure is created, all the closed-on values are copied from the stack into reserved slots of the function object. To evaluate a name, instead of walking the scope chain, we just take the value from the reserved slot. The function object's parent is the global object. Flat closures and Null closures have been removed: https://bugzilla.mozilla.org/show_bug.cgi?id=730497 https://bugzilla.mozilla.org/show_bug.cgi?id=739808 Name lookups In order of speed, fastest to slowest. ARG and LOCAL instructions. If a name definitely refers to an argument or local variable of the immediately enclosing function, it can be accessed using JSOP_{GET,SET,CALL}{ARG,LOCAL} instructions. Some of these can even be fused with other operations into combo ...
SpiderMonkey Internals
ccurately. prmjtime.c, prmjtime.h Time 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::PersistentRooted
PersistentRootedScript; typedef PersistentRooted<JSString*> PersistentRootedString; typedef PersistentRooted<JS::Symbol*> PersistentRootedSymbol; // Added in SpiderMonkey 38 typedef PersistentRooted<Value> PersistentRootedValue; } Example Following example allocates PersistentRootedValue, and provides two functions for setting and getting it from JavaScript. // To use Maybe. #include <mozilla/Maybe.h> // Declare global variable. // [SpiderMonkey 31] JS::PersistentRootedValue itself cannot be a global variable. mozilla::Maybe<JS::PersistentRootedValue> persistentVal; // You can also declare it just as a pointer, instead of using Maybe. // JS::PersistentRootedValue* persistentVal; // [SpiderMonkey 38] JS::PersistentRootedValue itself can be a global variable. // JS::PersistentRoote...
JSClass.flags
cal OR of zero or more of the following constants: Flag Meaning JSCLASS_HAS_PRIVATE This class uses private data. If this flag is set, each instance of the class has a field for private data. The field can be accessed using JS_GetPrivate and JS_SetPrivate. MXR ID Search for JSCLASS_HAS_PRIVATE JSCLASS_PRIVATE_IS_NSISUPPORTS Mozilla extension. The private field of each object of this class points to an XPCOM object (see nsISupports). This is only meaningful if SpiderMonkey is built with XPConnect and the JSCLASS_HAS_PRIVATE flag is also set. MXR ID Search for JSCLASS_PRIVATE_IS_NSISUPPORTS JSCLASS_IS_DOMJSCLASS Added in SpiderMonkey 17 Objects are DOM. MXR ID Search for JSCLASS_IS_DOMJ...
JS_DoubleIsInt32
Type Description d double A double value to compare ip int32_t * A pointer to int32_t value to compare Description JS_DoubleIsInt32 returns true if d i sequal to *ip. (comment from mozilla::NumberEqualsInt32) Casting a floating-point value that doesn't truncate to int32_t, to int32_t, induces undefined behavior. We should definitely fix this (bug 744965), but as apparently it "works" in practice, it's not a pressing concern now. See Also MXR ID Search for JS_DoubleIsInt32 JS_DoubleToInt32 JS_DoubleToUint...
JS_LookupProperty
he property name appeared to the right of a dot, as in alert(obj.name). JSRESOLVE_ASSIGNING Behave as though the property name appeared on the left-hand side of an assignment. JSRESOLVE_DETECTING Behave as though the name appeared in an idiom like "if (obj.name) ..." or "obj.name ? ... : ...". Objects may pretend that the property does not exist when this flag is set. For example, Mozilla's document.all property is hidden in this way. JSRESOLVE_DECLARING Behave as though the name were being declared in a var, const, or function declaration. JSRESOLVE_CLASSNAME Search for the initial value of a standard class such as Object, Array, or Error. Do not automatically infer and enable other flags by looking at the currently executing bytecode. Notes JS_LookupProperty doe...
JS_SetInterruptCallback
it re-enters the JS engine. The embedding must ensure that the callback is disconnected before attempting such re-entry. JS_SetInterruptCallback sets a callback that can be called asynchronously. Some common uses for an interrupt callback are: To run garbage collection periodically, by calling JS_MaybeGC; To periodically take a break from script execution to update the UI (though note that Mozilla does not do this, by design); To enforce application limits on the amount of time a script may run. (In this case, the callback may terminate the script by returning false.) JS_GetInterruptCallback returns the currently installed interrupt callback, or NULL if none is currently installed. JS_RequestInterruptCallback requests a callback set using JS_SetInterruptCallback. See Also MXR ID Se...
JS_SetOperationCallback
it re-enters the JS engine. The embedding must ensure that the callback is disconnected before attempting such re-entry. JS_SetOperationCallback sets a callback that can be called asynchronously. Some common uses for an operation callback are: To run garbage collection periodically, by calling JS_MaybeGC; To periodically take a break from script execution to update the UI (though note that Mozilla does not do this, by design); To enforce application limits on the amount of time a script may run. (In this case, the callback may terminate the script by returning JS_FALSE.) JS_GetOperationCallback returns the currently installed operation callback, or NULL if none is currently installed. JS_TriggerOperationCallback triggers a callback set using JS_SetOperationCallback. JS_ClearOperationC...
JS_SetOptions
ables object". This flag is recommended. Without it, the two scripts "x = 1" and "var x = 1", where no variable x is in scope, do two different things. The former creates a property on the global object. The latter creates a property on obj. With this flag, both create a global property. MXR ID Search for JSOPTION_VAROBJFIX JSOPTION_PRIVATE_IS_NSISUPPORTS Mozilla extension. The context's private data points to an XPCOM object (see nsISupports). This is only meaningful if SpiderMonkey is built with XPConnect. MXR ID Search for JSOPTION_PRIVATE_IS_NSISUPPORTS JSOPTION_COMPILE_N_GO Caller of JS_CompileScript et al promises to execute the compiled script once only, in the same scope object used for compilation. The caller ma...
Running Parsemark
Download the suite of parse tests from Bug 548621 and decompress them. ...
Split object
lit object always has a pointer to the other half. Inner objects implement the JSExtendedClass.outerObject hook, which returns a pointer to the corresponding outer object. Outer objects implement the JSExtendedClass.innerObject hook. But the association is not fixed. An outer object may be associated with different inner objects at different times. This feature is complicated. Programs other than Mozilla that embed SpiderMonkey should avoid using split objects. The window object Split objects were introduced to resolve a problem posed by the window object. Three interrelated requirements on the window object seemed to conflict. The window object is the global object for scripts in Web pages. Firefox has to maintain this for Web compatibility. For performance, access to global properties must...
TPS Bookmark Lists
A bookmark asset list is an object with one or more key-value pairs. Each key is the full path for the array of contents specified in the key's value. For example: var bookmarks_after_second_modify = { "menu": [ { uri: "http://www.getfirefox.com/", title: "Get Firefox" } ], "menu/foldera": [ { uri: "http://mozilla.com", title: "Mozilla" }, ] }; This describes two bookmarks, one in the "menu" folder, and the other in the "folder1" subfolder of "menu". All bookmark paths must begin with one of the following: "menu": the normal bookmarks menu "toolbar": the bookmarks toolbar "tags": the tags folder "unfiled": the unfiled bookmarks folder "places": the places root folder ("menu", "toolbar", and "unfiled" are all children of this) Sub-folders are preceded with f...
TPS Formdata Lists
Note 2, Sync currently does not sync Formdata dates, so the date field is ignored when performing verify and verify-not actions. See bug 552531. ...
TPS History Lists
history, and the other for deleting history. The history list used for operations other than delete has the following properties: uri: required. title: optional. The page title for this uri. visits: required. An array of objects representing visits to the page, each object has the following properties: type: required. An integer value from one of the transition types listed at https://developer.mozilla.org/en/nsINavHistoryService#Constants. date: required. An integer representing when the visit took place, expressed in hours from the present. For example, 0 is now, -24 is 24 hours in the past. For example: var history_initial = [ { uri: "http://www.google.com/", title: "Google", visits: [ { type: 1, date: 0 }, { type: 2, date: -1 } ] }, { uri: "http://www.cnn.co...
Zest runtimes
As Zest is written in JSON it requires a runtime in order to be evaluated. The following runtimes are available: Java https://github.com/mozilla/zest - this is the reference implementation The following runtimes are planned or an an early stage of implementation: https://github.com/mozilla/zest/tree/master/js Javascript https://github.com/darkowlzz/zest-runner https://github.com/darkowlzz/zest-cli - this is the zest-cli of js based runner. Python No code available yet If you are interested in working on an existing or new Zest runtime then please get in touch via the Zest group. Related links Zest Overview ...
Supported build targets
Page moved to the in-tree documentation: https://firefox-source-docs.mozilla.org/build/buildsystem/supported-configurations.html ...
Animated PNG graphics
Mozilla › Tech › APNG
y safe, renamed them to acTL, fcTL and adAT From 0.9 Split render_op into dispose_op and blend_op From 0.10 No changes Test Encoder and Sample Images Sample images are available from the APNG implementation page at http://littlesvr.ca/apng/ An encoder (open source) is available in versions of the Gecko engine starting with version 1.9 alpha 4. An application (open source) using the Mozilla encoder to assemble APNGs available here: http://littlesvr.ca/apng/apngedit.html See also Portable Network Graphics (PNG) Specification (Second Edition) Extensions to the PNG Specification, Version 1.2.0 Graphics Interchange Format 89a ...
AT Development
y? The 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. Guidelines AT APIs Implementation by Gecko AT vendors guide to support 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 specif...
Accessibility API Implementation Details
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. 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. ...
Using the Places favicon service
The favicon service, implemented by the nsIFaviconService interface, stores the favicons for pages in bookmarks and history. For an overview of the database design, see The Places database. Creating the favicon service The favicon service's contract ID is @mozilla.org/browser/favicon-service;1, so to gain access to the favicon service, you should do something like this: var faviconService = Components.classes["@mozilla.org/browser/favicon-service;1"] .getService(Components.interfaces.nsIFaviconService); Caching The favicon service stores an expiration time for each favicon. This time is used by nsIFaviconService.setAndLoadFaviconForPage() to determine if the data is fresh or needs reloading from the server. If you are manually loading favicon data, ...
Using the Places tagging service
The tagging service, offered by the nsITaggingService interface, provides methods to tag and untag a URI, to retrieve URIs for a given tag, and to retrieve all tags for a URI. Initiating the tagging service Before using the tagging service, you need to obtain a reference to an instance of it: var taggingSvc = Components.classes["@mozilla.org/browser/tagging-service;1"] .getService(Components.interfaces.nsITaggingService); Tagging a URI The nsITaggingService.tagURI() method tags a URL with the given set of tags. Current tags set for the URL persist, and tags which are already set for the given URL are ignored. taggingSvc.tagURI(uri("http://example.com/"), ["tag 1"]); //First argument = URI //Second Argumen...
Places
e bookmarks and history management system introduced in Firefox 3. It offers increased flexibility and complex querying to make handling the places the user goes easier and more convenient. It also includes new features including favicon storage and the ability to annotate pages with arbitrary information. It also introduces new user interfaces for managing all this information; see Places on the Mozilla wiki. Places stores its data in an SQLite database using the mozStorage interfaces. Documentation Places migration guide Migrating existing code to use the Places API. Manipulating bookmarks using Places Examples for how to work with bookmarks using the Places API. Using the Places tagging service How to use the tagging service. Using the P...
FUEL
extISessionStorage fuelIApplication Objects fuelIAnnotations fuelIApplication fuelIBookmark fuelIBookmarkFolder fuelIBookmarkRoots fuelIBrowserTab fuelIWindow XPCOM Although the FUEL Application object is preloaded into XUL scripts, it is not preloaded into JavaScript XPCOM code. The object needs to be accessed like any other XPCOM service: var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication); ...
SMILE
xtIExtensions extIPreference extIPreferenceBranch extISessionStorage smileIApplication Objects smileIBookmarkRoots smileIWindow smileIBrowserTab smileIApplication XPCOM Although the extIApplication object is preloaded into XUL scripts, it is not preloaded into JavaScript XPCOM code. The object needs to be accessed like any other XPCOM service: var Application = Components.classes["@mozilla.org/smile/application;1"].getService(Components.interfaces.smileIApplication); ...
STEEL
bug 408370 bug 1278067 ...
extIApplication
tart was successful. getExtensions(aCallback) Calls aCallback with the list of installed extensions. void getExtensions(extIExtensionsCallback aCallback) Return value none. ...
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 XULR...
Generic factory
...
Making cross-thread calls using runnables
Typically, thread activities are triggered and managed using an XPCOM event-passing framework that uses the nsIRunnable interface. Each runnable represents a task which can then be dispatched to another thread for execution. Note: JavaScript code cannot use the techniques described in this article. Chrome JavaScript should instead use workers. In general, threading and message passing should be asynchronous. ...
Receiving startup notifications
PR_TRUE, PR_TRUE, getter_Copies(previous)); With "service," specified, the component is instantiated using nsIComponentManager.getService(). In either case, there's no need to additionally register for the startup notifications. Simply registering with the Category Manager is enough. What happens next Once you've registered with the Category Manager, at Mozilla startup time (or when the embedding application's NS_InitEmbedding() function is called), the AppStartupNotifier component is instantiated, and its Observe() method is called; this in turn enumerates all components in the app-startup category and sends them the appropriate notifications. ...
How To Pass an XPCOM Object to a New Window
A more useful example is available in the source code: toolkit/components/help/content/contextHelp.js#61 If you want to be able to call functions within an XPCOM object from a XUL window's code, you can do so if you pass the XPCOM object as one of the arguments to the window creation method. For example: var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]. getService(Components.interfaces.nsIWindowWatcher); var win = ww.openWindow(null, "chrome://myextension/content/debug.xul", "debug history", "chrome,centerscreen,resizable", myObject); Note in this example that myObject is passed to the openWindow() method; you can pass any XPCOM object (or any other value, for that matter) in this way. To access the XPCOM object from the window's...
Components.isSuccessCode
de) { copyInProgress = false; // did the copy fail? ...
Components.returnCode
Usage Components.returnCode is a property that can be used to indicate to an XPCOM caller of the JavaScript method that the method is returning a specific nsresult code. Generally, XPConnect does a fine job of making it unnecessary for JavaScript code to worry about nsresult codes. ...
Components.stack
...
Components.utils.createObjectIn
r. Note that this function is now mostly obsolete when you are using Sandbox, because you can create an object in a different compartment using new. For example, to create a new object in the compartment identified by contentWindow: var newObject = new contentWindow.Object(); But it is really needeed from Firefox 30 onwards when trying to manipulate the DOM window. See details in https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/. Syntax var newObject = Components.utils.createObjectIn(obj, options); Parameters obj An object indicating the compartment in which the new object should be created; the new object will be created in the scope of this object's compartment. options An object containing a single option defineAs, which determines the name o...
Components.utils.forceGC
This mechanism doesn't account for any native (C++) XPCOM objects hanging off JavaScript objects though. In many cases a JavaScript application will have internal knowledge of JavaScript objects referencing large (trees of) XPCOM objects and know when they are no longer reachable. In this case it can be important to be able to force a garbage collection cycle from JavaScript. Another instance where it can be useful to force garbage collection is before cleaning out dead reference from a hash of weak JavaScript references. ...
Components.utils.import
e only once, in its own scope. For example: var scope1 = {}, scope2 = {}; Components.utils.import("resource://gre/modules/JSON.jsm", scope1); Components.utils.import("resource://gre/modules/JSON.jsm", scope2); assert(scope2.XPCOMUtils === scope1.XPCOMUtils); ...returns true, whereas: var someURL = "resource://gre/modules/JSON.jsm"; var obj1 = {}, obj2 = {}; var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); loader.loadSubScript(someURL, obj1); loader.loadSubScript(someURL, obj2); assert(obj2 === obj1); ...returns false. This means Components.utils.import is better suited for efficient sharing of code (and data?) between JS scripts running in different scope. Additional Resources Com...
Components.utils.importGlobalProperties
complete then the objects can be used. For example this is how to ues the File object. ...
Components.utils.reportError
ing and reported as a new error. This means you can use Components.utils.reportError to report debugging messages to the Error Console, just like dump() can be used to print messages to the native console. However you should use nsIConsoleService for logging, as it logs the messages with normal severity, unlike reportError. function myDump(aMessage) { var consoleService = Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService); consoleService.logStringMessage("My component: " + aMessage); } Firefox 3: The Error Console will not display chrome errors by default. To show them, set the preference 'javascript.options.showInConsole' to true, or use nsConsoleService instead to show a message. Firefox 4: The prefe...
Development
Build Instructions The build instructions are available here: Building JavaXPCOM. Bugs All JavaXPCOM bugs are tracked in Bugzilla, using the "Core" product and "Java to XPCOM Bridge" component. ...
Examples
...
Other Resources
Other Resources Embedding Mozilla XPConnect - Javascript-XPCOM bridge BlackConnect - Java-XPCOM bridge (no longer supported) XPIDL to Java types - from Blackconnect ...
Community
If you know of useful mailing lists, newsgroups, forums, or other communities related to PyXPCOM, please link to them here. ActiveState Python XPCOM bindings mailing list Discussion of the bindings between the Python language and the XPCOM (cross-platform COM) technology from the Mozilla project. #pyxpcom on irc.mozilla.org Chat with other PyXPCOM developers on Mozilla's IRC network. ...
Architecture basics
XPCOM is like COM, for Windows. It lets you get pointers to components inside Mozilla, and it lets you talk about their interfaces as well. XPConnect is what lets JavaScript talk with Mozilla guts, the XPCOM system. You can imagine it like a bridge between JavaScript code, and Mozilla guts. xpcshell is a command line interface to Mozilla JavaScript. It's an interactive interpreter -- it gives you a shell that talks straight to Mozilla, via JavaScript's XPConnect bridge into it. ...
Using components
Commonly, we start our scripts like so: var Cc = Components.classes; var Ci = Components.interfaces; If we want to get a hold of a component, we then do something like: var rc = Cc["@mozilla.org/registry;1"]; var rs = rc.getService(Ci.nsIRegistry); See also: xpcshell -- how to get a command line interface to JavaScript More Info As was already stated, it is common to start addon scripts like: var Cc = Components.classes; var Ci = Components.interfaces; There is also another way to start, which is exactly equivalent to the above. var {Cc: classes, Ci: interfaces} = Components; There are many more than just classes and interfaces. ...
appShellService
Quitting Mozilla: var Cc = Components.classes; var Ci = Components.interfaces; shell = Cc["@mozilla.org/appshell/appShellService;1"]; shell = shell.getService(Ci.nsIAppShellService); shell.quit(3); // eForceQuit Bam! There goes Mozilla. Then again, there's a much easier way; One of the xpcshell extensions is a quit function: quit(3) ...
Profiling XPCShell
e a more reproducible testcase. In those cases, an xpcshell script can help. You can just call the code you want to test. But then, you can't use the Venkman UI. XPCTools There is profiler in the tree that can profile xpcshell scripts. To use it, you need to enable it in your mozconfig: ac_add_options --enable-xpctools Now you can profile an entire script by setting the environment variable <tt>MOZILLA_JS_PROFILER_OUTPUT</tt> to a filename where you want the output file. For example, on Linux or MacOSX you do: export MOZILLA_JS_PROFILER_OUTPUT=/tmp/profile.txt Now, run the script using xpcshell. After running has finished, the output file will contain a profile. A profile will look like this: file:///Users/michiel/Mozilla/tree1/...js/calUtils.js [2,25420] createDateTime() {60-62} 579 {mi...
XPCShell Reference
nd-line argument for more information. quit(exitCode) quit() exits the shell. You can specify arguments that will get translated to an exit code. quit(5) will exit XPCShell with a result code of 5. Original Document Information Author: David Bradley <dbradley@netscape.com> Last Updated Date: 17 March 2003 Copyright Information: Portions of this content are (C) 1998-2008 by individual mozilla.org contributors; content available under a Creative Commons license. ...
Language bindings
lready), so it's guaranteed to behave predictably. This is useful for privileged code, such as add-on code, to access variables and APIs defined in web content.Components.utils.exportFunctionThis function provides a safe way to expose a function from a privileged scope to a less-privileged scope.Components.utils.forceGCComponents.utils.forceGC lets scripts force a garbage collection cycle. The Mozilla JavaScript engine will perform garbage collection automatically when the JavaScript heap grows beyond a certain size. This mechanism doesn't account for any native (C++) XPCOM objects hanging off JavaScript objects though. In many cases a JavaScript application will have internal knowledge of JavaScript objects referencing large (trees of) XPCOM objects and know when they are no longer reachable.
Monitoring HTTP activity
sponse header break; case nsIHttpActivityObserver.ACTIVITY_SUBTYPE_RESPONSE_COMPLETE: // received complete HTTP response break; } } } }; Then you need to install your activity observer. This is done using the nsIHttpActivityDistributor.addObserver() method in nsIHttpActivityDistributor: var activityDistributor = Components.classes["@mozilla.org/network/http-activity-distributor;1"] .getService(Components.interfaces.nsIHttpActivityDistributor); activityDistributor.addObserver(httpObserver); Observable activities There are two classes of observable activities: those that occur at the socket level and those that occur at the HTTP transaction level. Observable socket activities When the activity type...
nsCategoryManager
<< XPCOM API Reference Summary The XPCOM Category Manager. Class ID 16d222a6-1dd2-11b2-b693-f38b02c021b2 ContractID @mozilla.org/categorymanager;1 Supported Interfaces nsICategoryManager Remarks This component is a singleton and should therefore be accessed via the XPCOM Service Manager. ...
nsLocalFile
<< XPCOM API Reference Summary A component implementing nsILocalFile. Class ID 2e23e220-60be-11d3-8c4a-000064657374 ContractID @mozilla.org/file/local;1 Supported Interfaces nsILocalFile, nsIFile Remarks This component should be accessed via the XPCOM Component Manager. Example Code function getFileSize(path) { var file = Components.classes["@mozilla.org/file/local;1"]. createInstance(Components.interfaces.nsILocalFile); file.initWithPath(path); return file.fileSize; } See also Components, nsIComponentManager ...
nsObserverService
<< XPCOM API Reference The XPCOM Observer Service. Class ID D07F5195-E3D1-11d2-8ACD-00105A1B8860 ContractID @mozilla.org/observer-service;1 Supported interfaces nsIObserverService Remarks This component is a singleton and should therefore be accessed via the XPCOM Service Manager. It should be used from the main thread only. ...
NS_Alloc
to allocate. Return Values This function returns a pointer to the allocated block of memory, which is suitably aligned for any kind of variable, or null if the allocation failed. Remarks This function provides a convenient way to access the XPCOM memory manager. It is equivalent to calling alloc on the nsIMemory instance returned from NS_GetMemoryManager. History This function was finalized for Mozilla 1.8. See bug 267767 for details. See also NS_Free, nsIMemory, NS_GetMemoryManager ...
NS_Free
ees a block of memory using the XPCOM memory manager. #include "nsXPCOM.h" void NS_Free( void* aPtr ); Parameters aPtr [in] A pointer to the block of memory to free. Remarks This function provides a convenient way to access the XPCOM memory manager. It is equivalent to calling free on the nsIMemory instance returned from NS_GetMemoryManager. History This function was finalized for Mozilla 1.8. See bug 267767 for details. See Also NS_Alloc, nsIMemory, NS_GetMemoryManager ...
NS_GetComponentManager
Parameters aResult [out] A reference to the XPCOM Component Manager. Return Values The NS_GetComponentManager function returns NS_OK if successful. Otherwise, it returns an error code. Remarks The object returned is a singleton that is valid until NS_ShutdownXPCOM is called. The interface pointer should be Release'd when it is no longer needed. History This function was finalized for Mozilla 0.9.6. See bug 99147 for details. See Also nsIComponentManager ...
NS_GetComponentRegistrar
arameters aResult [out] A reference to the XPCOM Component Registrar. Return Values The NS_GetComponentRegistrar function returns NS_OK if successful. Otherwise, it returns an error code. Remarks The object returned is a singleton that is valid until NS_ShutdownXPCOM is called. The interface pointer should be Release'd when it is no longer needed. History This function was finalized for Mozilla 0.9.6. See bug 99147 for details. See Also nsIComponentRegistrar ...
NS_GetMemoryManager
Parameters aResult [out] A reference to the XPCOM Memory Manager. Return Values The NS_GetMemoryManager function returns NS_OK if successful. Otherwise, it returns an error code. Remarks The object returned is a singleton that is valid until NS_ShutdownXPCOM is called. The interface pointer should be Release'd when it is no longer needed. Any code, intended to be used exclusively with Mozilla 1.8 and above, may use NS_Alloc, NS_Realloc, and NS_Free instead to access the XPCOM Memory Manager's methods. History This function was finalized for Mozilla 0.9.7. See bug 112262 for details. See Also nsIMemory, NS_Alloc ...
NS_GetServiceManager
); Parameters aResult [out] A reference to the XPCOM service manager. Return Values The NS_GetServiceManager function returns NS_OK if successful. Otherwise, it returns an error code. Remarks The object returned is a singleton that is valid until NS_ShutdownXPCOM is called. The interface pointer should be Release'd when it is no longer needed. History This function was finalized for Mozilla 0.9.6. See bug 99147 for details. See Also nsIServiceManager ...
NS_InitXPCOM2
tXPCOM3) before proceeding to use XPCOM in a process. The one exception is that you may call NS_NewLocalFile or NS_NewNativeLocalFile to create a nsIFile needed for the aBinDirectory parameter to NS_InitXPCOM2. Many of the XPCOM glue functions and classes are also available prior to XPCOM initialization, including for example nsEmbedCString and nsCOMPtr. History This function was finalized for Mozilla 0.9.6. See bug 999147 for details. See Also NS_InitXPCOM3, NS_ShutdownXPCOM ...
NS_InitXPCOM3
See bug 296561 for details. See Also NS_InitXPCOM2, NS_ShutdownXPCOM ...
NS_NewLocalFile
See bug 129279 for details. See Also nsILocalFile, nsIFile ...
NS_NewNativeLocalFile
See bug 129279 for details. See Also nsILocalFile, nsIFile ...
NS_Realloc
ed. Return Values This function returns a pointer to the allocated block of memory, which is suitably aligned for any kind of variable, or null if the allocation failed. Remarks This function provides a convenient way to access the XPCOM memory manager. It is equivalent to calling realloc on the nsIMemory instance returned from NS_GetMemoryManager. History This function was finalized for Mozilla 1.8. See bug 267767 for details. See Also nsIMemory, NS_GetMemoryManager ...
NS_ShutdownXPCOM
on returns NS_OK if successful. Otherwise, it returns an error code. Remarks You must call this method once you are finished using XPCOM. Calling this method triggers the "xpcom-shutdown" notification to be dispatched to observers. Once this function has been called, the nsIComponentManager and nsIServiceManager will refuse to return object instances. History This function was finalized for Mozilla 0.9.6. See bug bug 99147 for details. See Also NS_InitXPCOM2, NS_InitXPCOM3 ...
Core XPCOM functions
...
NS_OVERRIDE
If there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile. NS_OVERRIDE is declared in nscore.h, beginning with Gecko 2.0. It was introduced in bug 500870. ...
nsCStringEncoding
nversion between UTF-8 and UTF-16 is non-lossy. NS_CSTRING_ENCODING_NATIVE_FILESYSTEM Conversion from UTF-16 to the native filesystem charset may result in a loss of information. No attempt is made to protect against data loss in this case. The native filesystem charset applies to strings passed to the "Native" method variants on nsIFile and nsILocalFile. History This enumeration was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringToUTF16, NS_UTF16ToCString ...
XPCOM glue classes
If there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.NS_POSTCONDITIONMacroNS_PRECONDITIONMacronsACStringThe nsACString abstract class represents a character string composed of single-byte storage units. This class is typically used to represent ASCII or UTF-8 cha...
IJSDebugger
ctwork/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 is if you need t...
imgICache
is no longer a single image cache. That means that using getService in order to obtain it will yield incorrect results. Use the following snippet to obtain a relevant image cache for a given document or channel (where relevantDocument is a Document object that contains images you care about, or relevantChannel is an nsIChannel that is used for fetching images): var tools = Components.classes["@mozilla.org/image/tools;1"].getService(Components.interfaces.imgITools); var cache = tools.getImgCacheForDocument(relevantDocument); // alternatively, tools.getImgCacheForChannel(relevantChannel) If there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie. any images from windows in private browsing mode will not ...
imgIContainer
rnally, 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: ?????????????????????????????????????. ...
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); ...
mozISpellCheckingEngine
extensions/spellcheck/idl/mozISpellCheckingEngine.idlScriptable This interface represents a spelling checker. Implement this interface to add support for a new spell checking engine. Inherits from: nsISupports Last changed in Gecko 1.7 This interface represents a spell checking engine. The built in Hunspell engine has contract ID "@mozilla.org/spellchecker/engine;1". Extensions can use this interface to check spelling or provide its own spell checker to editors. Method overview void addDirectory(in nsIFile dir); boolean check(in wstring word); void getDictionaryList([array, size_is(count)] out wstring dictionaries, out PRUint32 count); void removeDirectory(in nsIFile dir); void suggest(in wstring word...
mozIStorageAggregateFunction
nsCOMPtr<mozIStorageFunction> func = new standardDeviationFunc(...
mozIStorageFunction
rst, create our class that will represent our function. class squareFunction : public mozIStorageFunction { public: NS_IMETHOD OnFunctionCall(mozIStorageValueArray *aArguments, nsIVariant **_result) { PRInt32 value; nsresult rv = aArguments->GetInt32(&value); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsIWritableVariant> result = do_CreateInstance("@mozilla.org/variant;1"); NS_ENSURE_TRUE(result, NS_ERROR_OUT_OF_MEMORY); rv = result->SetAsInt64(value * value); NS_ENSURE_SUCCESS(rv, rv); NS_ADDREF(*_result = result); return NS_OK; } }; // Now, register our function with the database connection. nsCOMPtr<mozIStorageFunction> func = new squareFunction(); NS_ENSURE_TRUE(func, NS_ERROR_OUT_OF_MEMORY); nsresult rv = dbConn->Create...
nsIAccessible
erface 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. 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 attribut...
nsIAccessibleEvent
of accessible object -- this is a layout occurrence and is thus asynchronous. ...
nsIAccessibleRetrieval
tants. Return value Accessible role as a string. ...
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 ns...
nsIBidiKeyboard
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 ...
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 th...
nsIClassInfo
ay be accessed by any thread. MAIN_THREAD_ONLY 1 << 2 The class may only be accessed by the main application thread. DOM_OBJECT 1 << 3 The class is a DOM object. PLUGIN_OBJECT 1 << 4 The class is a plugin object. CONTENT_NODE 1 << 6 Specifies that this class implements nsIContent. Note: This flag is private and is for use by the Mozilla codebase only. RESERVED 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 ...
nsIClipboardCommands
The webshell implements this interface. ...
nsIContentFrameMessageManager
It enables these scripts to receive messages from the chrome process and send messages back to the chrome process. Frame scripts can send either synchronous or asynchronous messages to the chrome process: for details on these messaging APIs see the documentation for the nsIContentFrameMessageManager's parent classes nsISyncMessageSender and nsIMessageSender. ...
nsIContentPrefService2
ion to associate arbitrary data, or "preferences", with specific domains, or web "content". 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. (See nsIContentPref below.) For example, if you want to remember the user's preference for a certain zoom level on www.mozilla.org pages, you might store a preference whose domain is "www.mozilla.org", whose name is "zoomLevel", and whose value is the numeric zoom level. A preference need not have a domain, and in that case the preference is called a "global" preference. This interface doesn't impart any special significance to global preferences; they're simply name-value pairs that aren't associated with any particular...
nsIContentSniffer
The content type. Example How to read content from aData. ...
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: ?????????????????????????????????????. ...
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 before...
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 n...
nsICookieService
netwerk/cookie/public/nsICookieService.idlScriptable Provides methods for setting and getting cookies in the context of a page load. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) See nsICookieManager and nsICookieManager2 for methods to manipulate the cookie database directly. This separation of interface is mainly historical. var cookieSvc = Components.classes["@mozilla.org/cookieService;1"] .getService(Components.interfaces.nsICookieService); Notifications This service broadcasts the following notifications when the cookie list is changed, or a cookie is rejected: Topic Subject Data cookie-changed Broadcast whenever the cookie list changes in some way. There are four possible data strings for this notifica...
nsIDBFolderInfo
o! 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: ?????????????????????????????????????. ...
nsIDNSRecord
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 getNextAddr( in PRUint16 aPort ); Parameters aPort A port number to initialize the PRNetAddr with. Return value The value of the next IP address. getNextAddrAsString() This f...
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 ...
nsIDOMMozNetworkStatsManager
NOTE: Gecko is a fast evolving project. Please check dom/network/interfaces/nsIDOMNetworkStatsManager.idl to make sure this data is accurate. dom/network/interfaces/nsIDOMNetworkStatsManager.idlScriptable Interface that provides access to network usage statistics. Inherits from: nsISupports Last changed in Gecko 18.0 (Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15) Implemented by: @mozilla.org/networkStatsManager;1. 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. If the object exists, you can use the Network St...
nsIDOMNSHTMLDocument
lags clear() Used to reset a document to blank, but deprecated since Gecko 1.0 and provided for compatibility with Netscape 4.x; use open() and close() instead. void clear(); Parameters None. execCommand() boolean execCommand( in DOMString commandID, in boolean doShowUI, in DOMString value ); Parameters commandID The name of the command to execute. See Rich-Text Editing in Mozilla for a list of supported commands. doShowUI This is not implemented in Gecko. value Some commands require an argument. You can pass null for those commands that do not need an argument. Return value true if the command was recognized, false otherwise. execCommandShowHelp() Obsolete since Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) This m...
nsIDOMSimpleGestureEvent
dom/interfaces/events/nsIDOMSimpleGestureEvent.idlScriptable This interface describes a mouse or trackpad gesture 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) The nsIDOMSimpleGestureEvent interface is the datatype for all Mozilla-specific simple gesture events in the Document Object Model. The following events are generated: MozSwipeGesture - Generated when the user completes a swipe across across the input device. MozMagnifyGestureStart - Generated when the user begins the magnify ("pinch") gesture. The "delta" value represents the initial movement. MozMagnifyGestureUpdate - Generated periodically while the user is continuing the magnify ("pinch") gesture. Th...
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 owne...
nsIDOMWindowUtils
g garbageCollect() Force a garbage collection followed by a cycle collection. Will throw a DOM security error if called without UniversalXPConnect privileges in non-debug builds. Available to all callers in debug builds. void garbageCollect( in nsICycleCollectorListener aListener Optional ); Parameters aListener Optional Listener that receives information about the CC graph (see @mozilla.org/cycle-collector-logger;1 for a logger component) getCursorType() Get current cursor type from this window. short getCursorType(); Parameters None. Return value The current value of nsCursor. getDocumentMetadata() Function to get metadata associated with the window's current document. Will throw a DOM security error if called without UniversalXPConnect privileges. AString getDocum...
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 to ...
nsIDebug2
This is normally zero in release builds, but does include calls to nsIDebug.assertion(). Read only. isDebugBuild boolean Whether XPCOM was compiled with DEBUG defined. ...
nsIDownloadProgressListener
ad Manager to monitor downloads. aRequest The nsIRequest that changed state. This parameter will not be null. aStatus The new state information for the download. See nsIWebProgressListener.onStateChange() for details. aMessage A user-readable status message intended to be displayed visibly on the screen. aDownload The download whose status changed. ...
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. ...
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, array,...
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. ...
nsIFeedTextConstruct
dlScriptable 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 nsIDOMElement element); AString plainText(); Attribu...
nsIFile
this attribute is the number of bytes corresponding to the data represented by the symbolic link. Any meta data, such as a resource fork on the Mac, is not included in the measurement of the file size. Read only. followLinks PRBool Determines whether or not the nsIFile will automatically resolve symbolic links. By default, this value is false on all non-UNIX systems. As of Mozilla 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 G...
nsIFrameScriptLoader
Methods void loadFrameScript(in AString aURL, in boolean aAllowDelayedLoad, [optional] in boolean aRunInGlobalScope) void removeDelayedFrameScript(in AString aURL); jsval getDelayedFrameScripts(); loadFrameScript() Load a script in the remote frame. Frame scripts are loaded as soon as loadFrameScript() is called. ...
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. ...
nsIHttpHeaderVisitor
aderVisitor( ); subject.visitResponseHeaders( aVisitor ); if ( aVisitor.isFlash( ) ) { uri = subject.URI; subject.cancel( this.aborted ); alert( "Found Flash!" ); //handle flash file here } } }; myHttpRequestObserver.prototype.register = function ( ) { var observerService = Components.classes[ "@mozilla.org/observer-service;1" ].getService( Components.interfaces.nsIObserverService ); observerService.addObserver(this, "http-on-examine-response", false); observerService.addObserver(this, "http-on-examine-cached-response", false); }; myHttpRequestObserver.prototype.unregister = function ( ) { var observerService = Components.classes[ "@mozilla.org/observer-service;1" ].getS...
nsIINIParser
me of the section in the ini file. INI sections are * defined by square brakets and look like this: [Settings] * All entries below such a section definition belong to that * section (until the next section). * @param {String} prop * The name of the property to get. */ function getIniValue (iniFile, section, prop) { var iniFact = Components.manager.getClassObjectByContractID( "@mozilla.org/xpcom/ini-parser-factory;1", Components.interfaces.nsIINIParserFactory ); var iniParser = iniFact.createINIParser(iniFile); try { return iniParser.getString(section,prop); } catch(e) { return undefined; } } // Usage: var lang = getIniValue(file,"Setting","Language"); Enumerating sections This example gets a list of all the sections in the INI file. // get all section...
nsIINIParserWriter
e 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. To create an nsIINIParserWriter object, you use the nsIINIParserFactory interface to create a parser, then nsISupports.QueryInterface() that to get an nsIINIParserWriter, like this: let writer = Components.classes["@mozilla.org/xpcom/ini-processor-factory;1"]. .getService(Components.interfaces.nsIINIParserFactory) .createINIParser(someLocalFile) .QueryInterface(Components.interfaces.nsIINIParserWriter); Here, someLocalFile is an nsIFile based object, such as an nsILocalFile. This indicates the file into which the INI data will be written. Once t...
nsIInstallLocation
key 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>. ...
nsIJetpackService
js/jetpack/nsIJetpackService.idlScriptable This interface enables the creation of new Jetpack processes. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/jetpack/service;1. 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. Return value An nsIJetpack interface representing the remote process. History See bug 556846 for details. See also nsIJetpack Jetpack Processes ...
nsIMemoryReporterManager
xpcom/base/nsIMemoryReporter.idlScriptable A service that provides methods for managing nsIMemoryReporter objects. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Implemented by @mozilla.org/memory-reporter-manager;1 as a service: var reporterManager = Components.classes["@mozilla.org/memory-reporter-manager;1"] .getService(Components.interfaces.nsIMemoryReporterManager); Each memory reporter object, which implements nsiMemoryReporter interface, provides information for a given code area. Each code area is identified by a unique path string, which is displayed in about:memory. Method overview nsISimpleEnumerator enumerateMultiReporters(); nsISimpleEnumerator enumerateReporters(); void init(); ...
nsIMenuBoxObject
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() void openMenu( in boolean openFlag ); Parameters openFlag tru...
nsIMessageBroadcaster
For example, broadcasting a message through a window message manager will broadcast the message to all frame message managers within its window. See Message Manager interfaces for more details on the distinction between message senders and message broadcasters. ...
nsIMessageListener
Listeners are attached using the nsIMessageListenerManager interface. Methods void receiveMessage(); receiveMessage() This is for JS only. This function receives a message from one of the three message-sending functions in the message manager framework: broadcastAsyncMessage sendAsyncMessage sendSyncMessage. The received message is an object with the following properties: target The target of the message. Either an element owning the message manager, or the message manager itself if no element owns it. ...
nsIMessageSender
For example, a child-process message manager will send messages that are only delivered to its one parent-process message manager. To send messages to multiple "other sides", you would use nsIMessageBroadcaster. See Message Manager interfaces for more details on the distinction between message senders and message broadcasters. ...
nsIMessageWakeupService
o request a wakeup, a wakeup condition must be registered with the category manager in the "wakeup-request" category. The easiest way to do this is to add the appropriate entry to the chrome manifest that registers your component (see category in "Chrome registration"). To indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nsComponent @mozilla.org/myservice;1,nsIMyInterface,getService,myMessage1,myMessage2[,..] The category entry value consists of a comma separate string that contains: The contract ID for your component (e.g. "@mozilla.org/myservice;1"). The string name of interface to instantiate the component as (e.g. "nsIMyInterface"). The method to call to instantiate the component (either "getService" or "createInstance"). ...
nsIMessenger
The nsIMessenger interface provides functions for managing the history, undo and redo operations, and for loading, saving, or deleting messages and attachments in mailnews. Inherits from: nsISupports Implemented by: @mozilla.org/messenger;1. To create an instance, use: messenger = Components.classes["@mozilla.org/messenger;1"] .createInstance(Components.interfaces.nsIMessenger); In Thunderbird, a global nsIMessenger object is defined as messenger via the createMessenger function in mailWindow.js. Method overview void setDisplayCharset(in ACString aCharset); void setWindow(in nsIDOMWindow ptr, in nsIMsgWindow msgWindow); void openURL(in ACString aURL); void loadURL(in nsIDOMWindow ptr, in ACString aURL); void launc...
nsIMimeConverter
The nsIMimeConverter service allows you to convert headers into and out of MIME format. Inherits from: nsISupports Implemented by: @mozilla.org/messenger/mimeconverter;1. Method overview string encodeMIMEPartIIStr(in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); string encodeMIMEPartIIStr_UTF8(in AUTF8String header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); string decodeMimeHeaderToCharPtr(in string header, in string default_charset, in boolean override_charset, in boolean eatContinuations); AString decodeMimeHeader(in string header, in string default_charset, in boolean override_charset, in boolean eatContinuations); MimeEnc...
nsIMimeHeaders
nsIMimeHeaders mailnews/mime/public/nsIMimeHeaders.idlScriptable ??? Add brief description of Interface ??? Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: ?????????????????????????????????????. ...
nsIMsgCompFields
resent all the characters in the message body. It should be initialized to true and set to false when 'Send Anyway' is selected by a user. ...
nsIMsgDBHdr
gKey Indicates the parent of this message in its thread. If this is the root of the thread, it will return nsMsgKey_None. messageSize unsigned long Indicates the size of this message in bytes. lineCount unsigned long Indicates the size of the message body in number of lines. statusOffset unsigned long Indicates the offset within the message of the X-Mozilla-Status header. messageOffset unsigned long Indicates the position of the offline copy of an IMAP or news messages within the offline store. offlineMessageSize unsigned long Indicates the size of the offline copy of an IMAP or news message. date PRTime Indicates the date of this message; the equivalent header is the Date: header. dateInSeconds ...
nsIMsgDBView
The nsIMsgDBView interface handles the display of mail in the threadpane and preview pane of Thunderbird and other XPCOM based mail cients. Inherits from: nsISupports Implemented by: @mozilla.org/messenger/msgdbview;1. To create an instance, use: var dbView = Components.classes[@mozilla.org/messenger/msgdbview;1?type=] .createInstance(Components.interfaces.nsIMsgDBView); where type designates different types of view's available. Available in the mozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsIMsgDBView that provides a different sorting/view of the data. Method overview void open(in nsIMsgFolder folder, in nsMsgV...
nsIMsgHeaderParser
nsIMsgHeaderParser Defined in comm-central/ mailnews/ mime/ public/ nsIMsgHeaderParser.idl mailnews/mime/public/nsIMsgHeaderParser.idlScriptable ??? Add brief description of Interface ??? ...
nsIMsgProtocolInfo
Method overview long getDefaultServerPort(in boolean isSecure); Attributes Attribute Type Description canDelete boolean True if an account of this type may be deleted. Read only. canDuplicate boolean Unused. Read only. canGetIncomingMessages boolean True if Junk UI actions should be enabled for the account type. Read only. ...
nsIMsgSearchSession
The nsIMsgSearchSession interface allows you to create and manipulate search sessions within Thunderbird. To create an instance, use: var searchSession = Components.classes["@mozilla.org/messenger/searchSession;1"] .createInstance(Components.interfaces.nsIMsgSearchSession); To use the instance append search terms, set the scope, and then call search(). searchSession.addScopeTerm(Components.interfaces.nsMsgSearchScope.offlineMail, aFolder); var searchTerm = searchSession.createTerm(); var value = searchTerm.value; value.str = aValue; searchTerm.value = value; searchTerm.op = searchSession.BooleanOR; searchTerm.booleanAnd = false; searchSession.appendTerm(searchTerm); searchSession.search(null); Inherits from: nsISupports Method overview vo...
nsIMsgSearchTerm
This is a property of the nsIMsgDBHdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsIMsgHdr::GetProperty(hdrProperty). */ attribute ACString hdrProperty; customId /// identifier for a custom id used for this term, if any. ...
nsIMsgWindow
mailnews/base/public/nsIMsgWindow.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 8 (Firefox 8 / Thunderbird 8 / SeaMonkey 2.5) Implemented by: @mozilla.org/messenger/msgwindow;1. 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. Method overview void displayHTMLInMessagePane(in AString title, in AString body, in boolean clearMsgHdr); void StopUrls(); void closeWindow(); Attributes Attribute Type Description windowCommands ...
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 configu...
nsIPrintingPrompt
mmary for Windows embedders: Stated once again: There is no "fallback" native platform support in GFX for the displaying of the native print dialog. The current default implementation for Windows display a native print dialog but a XUL-based progress dialog. If you wish to have a native progress dialog on Windows you will have to create and register your own service. Note: The Windows version Mozilla implements this service which is automatically built and registered for you. You can use it as an example. It is located at "mozilla/embedding/components/printingui/src/win". That service is capable of displaying a native print dialog and a XUL progress dialog. To fly your own dialog you may: Implement this service to display at least the Print Dialog and a Print Progress Dialog or you may...
nsIPrivateBrowsingService
d use this interface to detect whether private browsing mode is enabled, and if it is, avoid saving that information. For details on how to do this, see the article Supporting private browsing mode. Similarly, plug-ins can detect whether or not private browsing mode is in effect by using the NPN_GetValue() function to check the current value of the NPNVprivateModeBool variable. Implemented by: @mozilla.org/privatebrowsing;1. To get access to the service from JavaScript, use: var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); C++ callers should use the contract ID @mozilla.org/privatebrowsing-wrapper;1 instead. Method overview void removeDataFromDomain(in AUTF8String aDomain); At...
nsIProcessScriptLoader
The scripts run only once per process. The global object for process scripts is a ContentProcessMessageManager. Methods void loadProcessScript(in AString aURL, in boolean aAllowDelayedLoad) void removeDelayedProcessScript(in AString aURL); jsval getDelayedProcessScripts(); loadProcessScript() Load a script in the child process. Process scripts are loaded as soon as loadProcessScript() is called. ...
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 overview ...
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 stri...
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 onl...
nsIScriptableIO
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. ...
nsISecurityCheckedComponent
dard web pages have no special capabilities. Extensions can define their own capabilities and use this interface to only allow access to code trusted with that capability. The two special return values of '"allAccess" or "noAccess" unconditionally allow or deny access to the operation. All code has the "allAccess" capability, and no code has the "noAccess" capability. This interface is used in Mozilla by XPConnect and a handful of things that need special handing (XUL controllers, the UI for the <video> tag, etc.). Method overview string canCallMethod(in nsIIDPtr iid, in wstring methodName); string canCreateWrapper(in nsIIDPtr iid); string canGetProperty(in nsIIDPtr iid, in wstring propertyName); string canSetProperty(in nsIIDPtr iid, in wstring propertyName); Methods canCallMethod...
nsISelection
e ??? Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Interface for manipulating and querying the current selected range of nodes within the document. Implemented by: ?????????????????????????????????????. ...
nsIServiceManager
is step is unnecessary. ...
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. To use this service, use: var sessionStartup = Components.classes["@mozilla.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...
nsISessionStore
you are working in a browser.xul overlay and want the currently selected tab, it's as simple as gBrowser.selectedTab. If you just hold a reference to some content document in the overlay's chrome window, here is how you find its corresponding tab: function tabFromDoc(doc) { var no = gBrowser.getBrowserIndexForDocument(doc); return gBrowser.tabContainer.childNodes[no]; } // example use: Cc['@mozilla.org/browser/sessionstore;1'] .getService(Ci.nsISessionStore) .setTabValue(tabFromDoc(myContentDoc), 'myKey', 'myValue'); See also The Session store API article. nsISessionStartup JSON ...
nsIStreamConverter
rter suppliers Registering a stream converter: Stream converter registration is a two step process. First of all the stream converter implementation must register itself with the component manager using a contractid in the format below. Second, the stream converter must add the contractid to the registry. ...
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 enumerateKeysInBundle...
nsISyncMessageSender
For example, a child-process message manager will send messages that are only delivered to its one parent-process message manager. See Message Manager interfaces for more details on the distinction between message senders and message broadcasters. Both sendSyncMessage() and sendRpcMessage() will block until a reply is received, but they may be temporarily interrupted to process an urgent incoming message (such as a CPOW request). ...
nsITXTToHTMLConv
You should normally obtain an instance via the nsIStreamConverterService interface. ...
nsITextInputProcessor
ion, 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.nsITextInputProcessor); Next, you need to get the rights to create composition or dispatch keyboard events with beginInputTransaction() or beginInputTransactionForTests(): if (!TIP.beginInputTransaction(window, callback)) { return; } If beginInputTransaction() or beginInputTransactionForTests() returns false, it...
nsITextInputProcessorCallback
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() T...
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 -profilemanager...
nsITraceableChannel
fter onStartRequest has been called. Example This example can be copied and pasted into a JavaScript interpreter and run. This example uses Promise syntax that is available in Firefox 30 and onwards. /////// START - DO NOT EDIT var {classes: Cc, interfaces: Ci, results: Cr, Constructor: CC, utils: Cu} = Components; Cu.import('resource://gre/modules/Services.jsm'); var BinaryInputStream = CC('@mozilla.org/binaryinputstream;1', 'nsIBinaryInputStream', 'setInputStream'); var BinaryOutputStream = CC('@mozilla.org/binaryoutputstream;1', 'nsIBinaryOutputStream', 'setOutputStream'); var StorageStream = CC('@mozilla.org/storagestream;1', 'nsIStorageStream', 'init'); function TracingListener() { this.receivedChunks = []; // array for incoming data. holds chunks as they come, onStopRequest we join th...
nsITreeView
gh it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. To add properties for a particular row, you must use the nsIAtomService to create an nsIAtom string, which can then be appended to the array to alter the style (see also Styling a Tree) getRowProperties: function(index, properties) { var atomService = Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService); var atom = atomService.getAtom("dummy"); properties.AppendElement(atom); } hasNextSibling() Used to determine if the row at rowIndex has a nextSibling that occurs after the index specified by afterIndex. Code that is forced to march down the view looking at levels can optimize the march by starting at afterIndex+1. boo...
nsIURI
nalizing 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. ...
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 reported.
nsIUTF8ConverterService
, assuming it's encoded in aCharset, and return the result. Make sure that all characters outside US-ASCII in your input spec are url-escaped if your spec is not in UTF-8 (before url-escaping) because the presence of non-ASCII characters is blindly regarded as an indication that your input spec is in unescaped UTF-8 and it will be returned without further processing. No valid spec going around in Mozilla code would break this assumption. AUTF8String convertURISpecToUTF8( in ACString aSpec, in string aCharset ); Parameters aSpec An url-escaped URI spec to ensure its UTF8ness. aCharset The character set to convert from if aSpec is not in UTF-8. Return value The converted spec in UTF-8. Exceptions thrown NS_ERROR_UCONV_NOCONV When there is no decoder for aCharset or error code of nsIUnicodeD...
nsIUpdateItem
on that this item works with, in FVF format. Read only. name AString The name of this item. Read only. objectSource AString Returns a JS Object source representing an nsIUpdateItem. Read only. targetAppID AString The target application ID used for checking compatibility for this item. Note: Add-ons can specify a targetApplication id of toolkit@mozilla.org in their install manifest for compatibility with all apps using a specific release of the toolkit. Read only. type long The type of this item. Read only. updateKey AString The public key to verify updates for this item. This must be the public part of the key that was used to sign update manifests for this add-on. Read only. updateRDF AString The...
nsIUserInfo
toolkit/components/startup/public/nsIUserInfo.idlScriptable These are things the system may know about the current user. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/userinfo;1. 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. The computer's domain, or the domain of its hostname. The domain portion of the email address, if available. Not supported. Not supported. emailAddress string Read on...
nsIWebBrowserChromeFocus
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. ...
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( in long ...
nsIWebProgressListener
harSet: aURI.charSet, flag: aFlag, }); }, // For definitions of the remaining functions see related documentation onProgressChange: function(aWebProgress, aRequest, curSelf, maxSelf, curTot, maxTot) {}, onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {}, onSecurityChange: function(aWebProgress, aRequest, aState) {} } let filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"] .createInstance(Ci.nsIWebProgress); filter.addProgressListener(myListener, Ci.nsIWebProgress.NOTIFY_ALL); let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebProgress); webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL); XULBrowserWindow.onStateCh...
nsIWebSocketChannel
ebSocketChannel 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: ?????????????????????????????????????. ...
nsIWifiMonitor
erk/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 startWatching( ...
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". 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 boole...
nsIWindowCreator
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. ...
nsIWorkerFactory
olete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface was removed in Gecko 8.0. 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. To create an instance, use: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); Method overview nsIWorker newChromeWorker(in DOMString aScriptURL); Methods newChromeWorker() Returns a new ChromeWorker that will run a specified script. nsIWorker newChromeWorker( in DOMString aScriptURL ); Parameters aScriptURL The URL of the script to load i...
nsIXFormsNSInstanceElement
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. ...
nsIXFormsNSModelElement
extensions/xforms/nsIXFormsNSModelElement.idlScriptable Please add a summary to this article. ...
XPCOM Interface Reference by grouping
Grouping and category names were made by somewhat arbitrary decision by the author. (I'm fully aware that this will be a great point of discussion and probably will end in tears, but since I'm the first person to apparently take a swing at this, I get first dibs.) The primary sections consist of: Browser This section contains elements associated with the view pane or the content of the "browser window" proper. It is wrapped by System, but displayed for convenience. ...
NS_CStringAppendData
de. Remarks This function is defined inline as a wrapper around NS_CStringSetDataRange. Example nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello"); NS_CStringAppendData(str, " world"); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello world" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSetDataRange, nsACString ...
NS_CStringCloneData
See bug 239716 for details. See Also nsMemory::Free, nsACString ...
NS_CStringContainerFinish
See bug 239123 for details. See Also NS_CStringContainerInit, NS_CStringContainerInit2 ...
NS_CStringContainerInit
, since it automatically releases allocated memory when the object goes out of scope. Example nsCStringContainer str; if (NS_SUCCEEDED(NS_CStringContainerInit(str))) { // Now, |str| can be used with any function taking a nsACString parameter. // Call this function to release any memory owned by |str| when done. NS_CStringContainerFinish(str); } History This function was finalized for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringContainerFinish, nsACString, nsEmbedCString ...
NS_CStringContainerInit2
out of scope. When NS_CStringContainerInit2 is told to copy aData, the copy it creates is null-terminated. This is significant as it allows the programmer to be certain that NS_CStringGetData will return a null-terminated character array. The NS_CStringContainerInit function is equivalent to calling NS_CStringContainerInit with aData=nsnull and aFlags=0. History This function was finalized for Mozilla 1.8. See bug 264274 for details. See Also NS_CStringContainerInit, NS_CStringContainerFinish ...
NS_CStringCopy
o two string objects. The implementation may employ reference counting techniques to optimize this operation. Example /* attribute ACString value; */ NS_IMETHODIMP MyComponent::GetValue(nsACString& aValue) { return NS_CStringCopy(aValue, mValue); } NS_IMETHODIMP MyComponent::SetValue(const nsACString& aValue) { return NS_CStringCopy(mValue, aValue); } History This function was frozen in Mozilla 1.7. See bug 239123 for details. See Also nsACString ...
NS_CStringCutData
und NS_CStringSetDataRange . Example Code nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello world"); // remove " world" portion of string NS_CStringCutData(str, 5, PR_UINT32_MAX); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSetDataRange , nsACString ...
NS_CStringGetData
storage units (bytes). Example Code // Count the number of times a particular character appears in a string. PRUint32 CountChar(const nsACString& str, char c) { const char* data; PRUint32 len = NS_CStringGetData(str, &data); PRUint32 count = 0; for (PRUint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } History This function was finalized for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringGetMutableData ...
NS_CStringGetMutableData
or writing a null-terminator. Example // Convert any uppercase ASCII letters to lowercase void ToLowerCase(nsCString &str) { char *iter; PRUint32 len = NS_CStringGetMutableData(str, PR_UINT32_MAX, &iter); char *end = iter + len; while (iter != end) { char c = *iter; if (c >= 'A' && c <= 'Z') *iter = c + ('a' - 'A'); ++iter; } } History This function was finalized for Mozilla 1.8. See bug 288786 for details. See Also NS_CStringGetData ...
NS_CStringInsertData
unction is defined inline as a wrapper around NS_CStringSetDataRange. Example Code nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello"); NS_CStringInsertData(str, 5, " world"); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello world" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSetDataRange, nsACString, nsACString ...
NS_CStringSetData
on returns NS_OK if successful. Otherwise, it returns an error code. Example nsCStringContainer str; rv = NS_CStringContainerInit(str); if (NS_SUCCEEDED(rv)) { rv = NS_CStringSetData(str, "hello world"); if (NS_SUCCEEDED(rv)) { // now, pass |str| to some function expecting a |const nsACString&| parameter. } NS_CStringContainerFinish(str); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsACString ...
NS_CStringSetDataRange
See bug 239123 for details. See Also nsACString ...
NS_CStringToUTF16
he host byte order. Return Values The NS_CStringToUTF16 function returns NS_OK if successful. Otherwise, it returns an error code. The set of possible error codes is currently unspecified. Example Code nsEmbedCString str("hello"); nsEmbedString ustr; NS_CStringToUTF16(str, NS_CSTRING_ENCODING_ASCII, ustr); const PRUnichar *unicharBuf = ustr.get(); History This function was frozen for Mozilla 1.7. See bug bug 239123 for details. See Also nsACString, nsAString, nsCStringEncoding ...
NS_StringAppendData
an unsigned short. This example should compile by default under MSVC. Example Code nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello"); NS_StringAppendData(str, L" world"); const PRUnichar* data; NS_StringGetData(str, &data); // data now points to the string: L"hello world" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSetDataRange, nsAString ...
NS_StringCloneData
See bug 239716 for details. See Also nsMemory::Free, nsAString ...
NS_StringContainerFinish
ory allocated by a nsStringContainer instance. This is a low-level API. #include "nsStringAPI.h" void NS_StringContainerFinish( nsStringContainer& aString ); Parameters aString [in] A nsStringContainer instance that is no longer needed. Return Values This function does not return a value. Example Code See NS_StringContainerInit for an example. History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringContainerInit ...
NS_StringContainerInit
ically releases allocated memory when the object goes out of scope. Example Code nsStringContainer str; if (NS_SUCCEEDED(NS_StringContainerInit(str))) { // Now, |str| can be used with any function taking a nsAString parameter. // Be sure to call this function to release any memory owned by |str| when done. NS_StringContainerFinish(str); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringContainerFinish, nsAString, nsEmbedString ...
NS_StringCopy
. The implementation may employ reference counting techniques to optimize this operation. Example Code /* attribute ACString value; */ NS_IMETHODIMP MyComponent::GetValue(nsAString& aValue) { return NS_StringCopy(aValue, mValue); } NS_IMETHODIMP MyComponent::SetValue(const nsAString& aValue) { return NS_StringCopy(mValue, aValue); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsAString ...
NS_StringCutData
pile by default under MSVC. Example Code nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello world"); // remove " world" portion of string NS_StringCutData(str, 5, PR_UINT32_MAX); const PRUnichar* data; NS_StringGetData(str, &data); // data now ponts to the string: L"hello" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSetDataRange, nsAString ...
NS_StringGetData
nction returns the length of aData, measured in storage units (bytes). Example Code PRUint32 CountChar(const nsAString& str, PRUnichar c) { const PRUnichar* data; PRUint32 len = NS_StringGetData(str, &data); PRUint32 count = 0; for (PRUint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsAString ...
NS_StringInsertData
unsigned short. This example should compile by default under MSVC. Example Code nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello"); NS_StringInsertData(str, 5, L" world"); const PRUnichar* data; NS_StringGetData(str, &data); // data now points to the string: L"hello world" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSetDataRange , nsACString ...
NS_StringSetData
f successful. Otherwise, it returns an error code. Example Code nsStringContainer str; rv = NS_StringContainerInit(str); if (NS_SUCCEEDED(rv)) { rv = NS_StringSetData(str, "hello world"); if (NS_SUCCEEDED(rv)) { // now, pass |str| to some function expecting a |const nsAString&| parameter. } NS_StringContainerFinish(str); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsAString ...
NS_StringSetDataRange
See bug 239123 for details. See Also nsAString ...
NS_UTF16ToCString
eturn Values The NS_UTF16ToCString function returns NS_OK if successful. Otherwise, it returns an error code. The set of possible error codes is currently unspecified. Example Code // Convert UTF-16 (or UCS-2) string to UTF-8 void CopyUTF16toUTF8(const nsAString& in, nsACString& out) { NS_UTF16ToCString(in, NS_CSTRING_ENCODING_UTF8, out); } History This function was frozen for Mozilla 1.7. See bug bug 239123 for details. See Also nsACString, nsAString, nsCStringEncoding ...
Using IndexedDB in chrome
perties() function: Components.utils.importGlobalProperties(["indexedDB"]); // From here on, it's like using IndexedDB from content var req = indexedDB.open("my-database"); // ... ...
Using nsCOMPtr
asics Initialization and Assignment Using an nsCOMPtr<T> as a T* Efficiency and Correctness Compiler Annoyances Frequently Asked Questions Buildtime Errors Runtime Errors How do I... General Bibliography Original Document Information Author(s): Scott Collins Last Updated Date: December 11, 2001 Copyright Information: Copyright (C) 1999, 2000 by the Mozilla organization; use is subject to the MPL. Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Using nsIClassInfo
QueryInterface unnecessary. It just happens. How do I make my C++ class implement nsIClassInfo? See nsIClassInfoImpl.h for instructions. How does nsIClassInfo work? That's also detailed in nsIClassInfoImpl.h. Original Document Information Authors: Mike Shaver, Justin Lebar Last Updated Date: July 25, 2011 Copyright Information: Portions of this content are (C) 1998-2011 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Using nsIPasswordManager
nManager. Working with Password Manager Extensions often need to securely store passwords to external sites, web applications, and so on. To do so securely, they can use nsIPasswordManager, which provides for secure storage of sensitive password information. Getting nsIPasswordManager To get a component implementing nsIPasswordManager, use the following: var passwordManager = Components.classes["@mozilla.org/passwordmanager;1"] .getService(Components.interfaces.nsIPasswordManager); Storing a password To store a password in the password manager, you need three things: a hostname/URL (you'll need this to retrieve the password again later), a username, and a password. Of this information, the password is the only data that will be stored securely. Adding a password t...
Weak reference
id using it in cases where it might dangle. See also The source xpcom/base/nsIWeakReference.idl xpcom/glue/nsWeakReference.h xpcom/glue/nsWeakReference.cpp XPCOM ownership guidelines Using nsCOMPtr Original Document Information Author: Scott Collins Last Updated Date: September 23, 2000 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Working with Multiple Versions of Interfaces
en if the interfaces have changed in the interim. In the extension that prompted this note, I needed to obtain the HWND of the document (yes its on Windows) in order to identify each particular extension instance. To do this I used the accessibility framework: HWND getHwnd(nsIDOMNode *node){ HWND self = NULL; nsresult rv; nsCOMPtr<nsIAccessibleRetrieval> refp; refp = do_CreateInstance( "@mozilla.org/accessibleRetrieval;1", &rv); if (NS_FAILED(rv)){ return self; } //line 6. nsCOMPtr<nsIAccessible> accnode; rv = refp->GetAccessibleFor(node, getter_AddRefs(accnode)); if(NS_FAILED(rv)){ return self; } void *wh = NULL; nsCOMPtr<nsIAccessibleDocument> accdocnode; accdocnode = do_QueryInterface(accnode, &rv); if(NS_FAILED(rv)){ return self; } rv = accdocnode->GetWindowHandle(&...
XPCOM category image-sniffing-services
In versions of Firefox prior to Firefox 3, extensions could add decoders for new image types. However, such decoders relied on servers sending correct MIME types; images sent with incorrect MIME types would not be correctly displayed. In Firefox 3, a new XPCOM category was added in bug 391667 to allow "third-party" XPCOM components to identify images based on their content. If Mozilla's built-in image code cannot identify an image, then any XPCOM components implementing the nsIContentSniffer interface may register under the "image-sniffing-services" category, and will be queried to determine the MIME type of the image being downloaded. Note: This category was removed. See Bug 813787 - Remove support for image-sniffing-services. ...
XPCOM ownership guidelines
t owning-pointers. It's explicit, efficient, and fairly bullet-proof. It's easier to write `getter's and `setter's; and you don't need to put anything in your destructor. Original Document Information Author: Scott Collins Last Updated Date: May 8, 2003 Copyright Information: Copyright(C) 1999 by Netscape; use is subject to the NPL. Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
wrappedJSObject
Connect source comments say, you can get comp.wrappedJSObject if three conditions are met: comp really is an XPConnect wrapper around a JS object. Wrappers around non-JS objects don't have this property. The underlying object has a wrappedJSObject property that returns a JS object. nsIXPCSecurityManager allows access (see the source code comments for details; this is usually not an issue for Mozilla extensions and applications) This means that in order to access the JS object implementing our component directly, we must modify the component. For example: function HelloWorld() { this.wrappedJSObject = this; }; Now we can get the component directly: var comp = Components.classes["@myself.com/my-component;1"] .getService().wrappedJSObject; This is a real JS object...
XPIDL Syntax
Mozilla › Tech › XPIDL › Syntax
Purpose of this document This document is not an introduction to XPIDL or IDL in general. It is more focused on XPIDL syntax and grammar. See XPIDL Main Page for more links and introductory content. Simplifications, conventions and notation The syntax is specified according to ABNF as defined by RFC 5234, although a few productions use prose for clarity of understanding. ...
XSLT 2.0
XSLT 2.0 is not natively supported in Firefox, it is possible via Saxon-B (Java) or, more recently, Saxon-CE (JavaScript) to perform XSLT 2.0. For users Saxon-CE No extensions are required, Saxon-CE runs whenever a HTML page is loaded that links to the Saxon-CE JavaScript library. Saxon-B The XSL Results extension uses the new incarnation of LiveConnect (handled by Java 1.6v12+ instead of Mozilla-specific code) to connect with the Java-based Saxon-B library, and adds support for having XSLT performed automatically when visiting a page with the appropriate XSLT processing instruction (and which isn't processed by Firefox's own XSLT 1.0 processor). For developers Saxon-CE A JavaScript API is provided for initiating an XSLT 2.0 transform from a web page. Error and diagnostics output from ...
XTF
Mozilla › Tech › XTF
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... ...
ASan Nightly Project
Moved in-tree: https://firefox-source-docs.mozilla.org/tools/sanitizer/asan_nightly.html ...
Clang static analysis
Moved to https://firefox-source-docs.mozilla.org/code-quality/static-analysis.html ...
Fuzzing Interface
Documentation moved in-tree: https://firefox-source-docs.mozilla.org/tools/fuzzing/fuzzing_interface.html ...
Measuring Code Coverage on Firefox
Documentation moved in-tree: https://firefox-source-docs.mozilla.org/tools/code-coverage/index.html ...
Account Provisioner
if not all of its activities, which is useful for debugging. Logs can either be dumped to the terminal via dump, or to the Error Console. To have logs dumped to the terminal, create a string preference called mail.provider.logging.dump and set its value to All. To have logs dumped to the Error Console, create a string preference called mail.provider.logging.console and set its value to All. A MozillaZine article on how to set preferences in Thunderbird. ...
Autoconfig file format definition
Please see https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat. ...
Autoconfiguration in Thunderbird
load and install Thunderbird, enter their real name, email address and password in the Account Setup Wizard and have a fully functioning mail client and get and send their mail as securely as possible. See also: for instructions for users, see Automatic Account Configuration on the Thunderbird Knowledge Base. the configuration file description and definition the original project page on the Mozilla wiki for background, design, implementation and project details This document describes how Autoconfiguration in Thunderbird works, and what to do to allow mail servers to be autoconfigured. Mechanisms Thunderbird gets the server settings via different means, each of which is intended for different cases: ISPDB The ISPDB is a central database, currently hosted by the Thunderbird project,...
Buddy icons in mail
Seth Spitzer Mozilla is now able to show icons in the message header area and the addressbook card pane. For the message pane, the icon we will show is on disk at: <profile home>/NIM/<value of pref aim.session.screenname>/picture/<screenname for sender email address>.gif When trying to determine the screenname for the sender, we search the addressbook that we are using for collection. ...
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. ...
Mail and RDF
Mozilla Mail exposes many of it's data structures to RDF through a few datasources. This allows exposure of mailnews-specific data to user interface using RDF Templates. You should learn about RDF before reading this document or you will be hopelessly confused. Overview of Mail RDF graph The root resource for all accounts, folders and messages is the RDF Resource named msgaccounts:/. From this resource, you can follow a number of arcs to find servers, folders, and finally messages. Eventually we'll probably hang mail filters, annotations, etc, off of nodes in the graph. ...
Mail client architecture overview
All of the links seem to be broken. ...
Mail event system
Mozilla mail requires an event system to notify different subsystems that data has changed. This document describes the system that events are passed amongst the mail objects. For example, when a folder gets a new message, its total message count increases. The folder pane needs to know that this changed so that it can update the message count so the user can see it. Interfaces The key interfaces here are: nsIFolder.idl is an interface for storing a hierarchy of objects with properties. This interface is not (should not be) mail-related. ...
Mailnews and Mail code review requirements
(A fair amount of this code is forked from code in the mailnews/ directory). Mailnews and Mail review rules Patches affecting Thunderbird User Experience or Interfaces Note: It is recommended that when working on bugs that affect user experience or interfaces, that ui-review is obtained at an early stage in the patch development process. ...
Spam filtering
Seth Spitzer The Mozilla implement is based on Paul Graham's A Plan for Spam. Training data is global across all mail accounts within a profile. Training data is stored in a binary format, in a file named "training.dat". Initially, the training.dat file is empty (there was discussion of shipping with a default file). On spam detection, the user can choose to move spam to a special "Junk" folder. The user can configure junk mail can be automatically purged from the "Junk" folder. ...
The libmime module
by Richard H. Pizzarro <rhp@netscape.com> This module, libmime, implements a general-purpose MIME parser. One of the methods provided by this parser is the ability to emit an HTML representation of the data stream. The parser is object-oriented. There is a class for each MIME type, and each class is responsible for parsing itself, and/or handing the input data off to one of its child objects. The definition of these classes is somewhat idiosyncratic and consists of an internally defined object system, instead of C++. ...
Thunderbird API documentation
Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See developer.thunderbird.net for newer information. These pages have been moved from mozilla.org, and may or may not be relevant. General Mail client architecture overview Mail event system Events NEW! Account Provisioner NEW! Activity Manager Address book sync client design Buddy icons in mail Composition Composition back end in mail Cached compose window FAQ Filelink Providers NEW! Hidden prefs libmime libmime module libmime content type handlers Mail and RDF Using the Multiple Accounts API Spam filtering ...
Thunderbird Configuration Files
Config Editor Many of the tips and tricks mentioned on this site can be applied by using the built-in Config Editor. To access the Config Editor, go to Tools > Options or do Thunderbird > Preferences. If you are on Mac OS X, and on Linux do Edit > Preferences on, select the Advanced options panel, click on the General tab, and click on Config Editor. This will display a list of used preferences, as well as a search bar at the top. Double-click on a preference to change its value. ...
Building a Thunderbird extension 5: XUL
architecture allows extensions to modify the user experience without modifying the installation files. This also enables version independence between Thunderbird and Thunderbird extensions. ...
Finding the code for a feature
r interface level function to do it. But here is how I find out. There are two key tools that you need. The first is the DOM inspector extension which I have routinely installed in all of my Thunderbird installations. (For debug builds, you can make it appear by default using "ac_add_options --enable-extensions=default,venkman,inspector" which is part of my standard configuration). The second is mozilla's source code search tool mxr. I keep two prominent links to this on my Firefox toolbar, one to comm-central string search, and one to comm-central file search. So, how did I use those to figure out how to do this? I know there is a menu command "Tag" to tag the message - how does it do it? Using DOM inspector, I find the Tag menu item, and I see that it uses command "cmd_tag". Then I use mxr an...
Access StringBundle from Overlay
rties" id="your-extension-strings" /> </stringbundleset> Now that your stringbundle is attached you can access it from JavaScript as follows: var str = document.getElementById("your-extension-strings"); //get the stringbundle object itself str.getString("propertyName"); //get a string (and do something with it) Alternative way let stringBundleService = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService); let bundle = stringBundleService.createBundle("chrome://your_extension/locale/overlay.properties"); let str = bundle.GetStringFromName("propertyName"); see nsIStringBundleService ...
Add Toolbar Button
Example XUL overlay file: <?xml version="1.0"?> <?xml-stylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?> <overlay id="messengerWindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="overlay.js" /> <toolbarpalette id="MailToolbarPalette"> <toolbarbutton id="demo-button" class="demo-button toolbarbutton-1" label="Demo" type="button" oncommand="Demo.load();" /> </toolbarpalette> </overlay> Add this to the css file you referenced in your xul file: #demo-button, [place="palette"] > #demo-button { list-style-image: url("chrome://demo/skin/icon.png") !important; } ...
Modify Folder Pane Display
See https://addons.mozilla.org/thu...er-categories/ for an example. ...
Tips and Tricks from the newsgroups
Please feel free to add links to threads. We will add a categorization system as the link list grows. You can also help by creating how-tos from any of these topics. ...
libmime content type handlers
by Richard H. Pizzarro <rhp@netscape.com> Contents Overview API's Plugin Location/Installation Sample Content Type Handler Plugin Overview The libmime module implements a general-purpose MIME parser and one of the primary methods provided by the parser is the ability to emit an HTML representation of an input stream. The primary use of libmime is to parse and render RFC822 messages for use by the Messenger component of Seamonkey. A necessary capability of this module is to dynamically add the ability to decode and render various content types. ...
Zombie compartments
?...) (Some of those compartment URLs are long and have been truncated.) Another thing to beware is each compartment is created for an origin (e.g. https://www.facebook.com/), but the name of the compartment includes all the trailing gunk (e.g. "plugins/like.php?..."). This trailing gunk can be misleading and you shouldn't pay too much attention to it. For example, if I open https://bugzilla.mozilla.org/show_bug.cgi?id=668871 in one tab, then compartment(https://bugzilla.mozilla.org/show_bug.cgi?id=668871) will show up in about:memory. If I then open https://bugzilla.mozilla.org/show_bug.cgi?id=700547 and close the first tab, the same compartment will continue to be used. So I'll end up with a compartment whose name doesn't match the only page open from that origin. This can be confusing ...
js-ctypes
that uses js-ctypes to call Carbon and Core Foundation framework routines on Mac OS X to implement an "Add image to iPhoto" feature in Firefox. Using C structs and pointers Using COM from js-ctypes Using Objective-C from js-ctypes Github :: ochameau / jscpptypes A mangling library to use C++ from js-ctypes Community View Mozilla forums... Mailing list Newsgroup RSS feed Stackoverflow - jsctypes Related Topics XPCOM in Gecko 2 - Binary Components ...
Preferences System
rough a few XUL elements and attributes. Reference information about them is available below: Preferences System documentation: Introduction: Getting Started | Examples | Troubleshooting Reference: prefwindow | prefpane | preferences | preference | XUL attributes Use Code for a typical preferences window may look like this: <prefwindow id="appPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> .. UI elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pan...
DOM Inspector FAQ - Firefox Developer Tools
the DOM Inspector UI. You can, however, find any rule in its parent style sheet (e.g., to modify it) by using the Style Sheets viewer in the document pane, and locating it in the CSS Rules viewer in the object pane. Original Document Information Author(s): Christopher Aillon Last Updated Date: November 11, 2003 Copyright Information: Portions of this content are (C) 1998-2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details. ...
Debugger-API - Firefox Developer Tools
Both Firefox's built-in developer tools and the Firebug add-on use Debugger to implement their JavaScript debuggers. However, Debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage analysis, patch-and-continue, and so on. Debugger has three essential qualities: It is a source level interface: it operates in terms of the JavaScript language, not machine language. ...
Migrating from Firebug - Firefox Developer Tools
lso, both tools allow you to edit the different values inline via a click on them. Inspect computed styles The computed values of CSS properties are displayed within the DevTools' Computed side panel like within Firebug's Computed side panel. The difference is that in the DevTools the properties are always listed alphabetically and not grouped (see bug 977128) and there is no option to hide the Mozilla specific styles, therefore there is an input field allowing to filter the properties. Inspect events Events assigned to an element are displayed in the Events side panel in Firebug. In the DevTools they are shown when clicking the small 'ev' icon besides an element within the node view. Both tools allow to display wrapped event listeners (e.g. listeners wrapped in jQuery functions). To improve ...
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 wi...
Responsive Design Mode - Firefox Developer Tools
he same value. The devices listed in the drop-down are just a subset of the devices that can be selected. At the end of the drop-down, there is an item labeled Edit list. Select this to see a panel containing all the choices, which enables you to check the devices you want to see in the drop-down. The set of devices, and the values associated with each device, are taken from https://github.com/mozilla/simulated-devices. You can also define a custom device, as described below. Creating custom devices You can create and save custom devices in Responsive Design Mode by clicking the Add Custom Device button. Each device can have its own: Name Size DevicePixelRatio User Agent String Touch Screen Also, you can preview the properties of existing devices by hovering over the name in the dev...
Storage Inspector - Firefox Developer Tools
UI is split into three main components: Storage tree Table Widget Sidebar Storage tree The storage tree lists all the storage types that the Storage Inspector can inspect: Under each type, objects are organized by origin. For cookies, the protocol does not differentiate the origin. For Indexed DB or local storage an origin is a combination of protocol + hostname. For example, "http://mozilla.org" and "https://mozilla.org" are two different origins so local storage items cannot be shared between them. Under "Cache Storage", objects are organized by origin and then by the name of the cache: IndexedDB objects are organized by origin, then by database name, then by object store name: With the Cookies, Local Storage, and Session Storage types, there's only one level in the hierarch...
Validators - Firefox Developer Tools
e not available at this time. Tune-up wizard links back to devedge If you're writing new code that isn't validating immediately, see the available standards-compliant authoring and development tools. Firefox Extensions for Validation Quick Reference Sidebar Tabs Install DevEdge Toolbox Sidebars for quick access to web development references. Checky Checky adds a submenu to your Netscape or Mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services. Applications and Services DevEdge Web Tune-Up Wizard This interface to W3C services guides beginning-to-intermediate web authors through the process of updating content to support Netscape 7.x, Mozilla and other browsers that support W3C Standards. W3C HT...
View Source - Firefox Developer Tools
a tooltip explaining the error. This feature is useful when you're looking for HTML errors. To access Go to Line from the keyboard, press Control + Option + L on macOS, or Alt + Shift + L on Windows or Linux. Link to a line number It is possible to link to a particular line, by adding the #lineNNN anchor to the url the browser will jump to the NNN line. For example view-source:https://www.mozilla.org/#line100 View Selection Source If you select part of a web page and conext-click, you'll see a context menu item labeled "View Selection Source", that behaves just like "View Page Source", except you only see the source for the selection. View MathML Source If you context-click while the mouse is over some MathML, you'll see a context menu item labeled "View MathML Source": click it to se...
Firefox Developer Tools
eenshot of the current page. (Note: This feature is not turned on by default and must be enabled in settings before the icon will appear.) Toggles Responsive Design Mode. Opens the menu that includes docking options, the ability to show or hide the split console, and Developer Tools settings. The menu also includes links to the documentation for Firefox Web Tools and the Mozilla Community. Closes the Developer Tools Page Inspector View and edit page content and layout. Visualise many aspects of the page including the box model, animations, and grid layouts. Web Console See messages logged by a web page and interact with the page using JavaScript. JavaScript Debugger Stop, step through, examine, and modify the JavaScript running in a...
Attr.namespaceURI - Web APIs
Web › API › Attr › namespaceURI
I was defined within the Node interface. Syntax namespace = attribute.namespaceURI Example In this snippet, an attribute is being examined for its localName and its namespaceURI. If the namespaceURI returns the XUL namespace and the localName returns "browser", then the node is understood to be a XUL <browser/>. if (attribute.localName == "value" && attribute.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a XUL value } Notes This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. The namespace URI of an attribute is frozen at the attribute creation time. In Firefox 3.5 and earlier, the namespace URI for HTML attributes in HTML documents is null. In later vers...
BatteryManager - Web APIs
e levelchange event; This event is sent when the battery level is updated. Methods Inherited from EventTarget: EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Specifications Specification Status Comment Battery Status API Candidate Recommendation Initi...
CSSImageValue - Web APIs
esents an <image> that involves an URL, such as url() or image(), but not linear-gradient() or element() . Properties None. Methods None. Examples We create an element <button>Magic Wand</button> We add some CSS, including a background image requesting a binary file: button { display: inline-block; min-height: 100px; min-width: 100px; background: no-repeat 5% center url(https://mdn.mozillademos.org/files/16793/magicwand.png) aqua; } We get the element's style map. We then get() the background-image from the stylemap and stringify it: // get the element const button = document.querySelector( 'button' ); // Retrieve all computed styles with computedStyleMap() const allComputedStyles = button.computedStyleMap(); // Return the CSSImageValue Example console.log( allComputedStyles.ge...
CSSRule - Web APIs
Web › API › CSSRule
hips between these constants and the interfaces are: Type Value Rule-specific interface Comments and examples CSSRule.STYLE_RULE 1 CSSStyleRule The most common kind of rule: selector { prop1: val1; prop2: val2; } CSSRule.IMPORT_RULE 3 CSSImportRule An @import rule. ...
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
nd drawn with image smoothing enabled, and the third is scaled to 3X but drawn with image smoothing disabled. ...
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
tions Possible values: "low" Low quality. "medium" Medium quality. "high" High quality. Example Setting image smoothing quality This example uses the imageSmoothingQuality property with a scaled image. HTML <canvas id="canvas"></canvas> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); let img = new Image(); img.src = 'https://mdn.mozillademos.org/files/222/Canvas_createpattern.png'; img.onload = function() { ctx.imageSmoothingQuality = 'low'; ctx.drawImage(img, 0, 0, 300, 150); }; Result Specifications Specification Status Comment HTML Living StandardThe definition of 'imageSmoothingQuality' in that specification. Living Standard Initial definition. ...
Drawing text - Web APIs
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
ve: The page was killed due to being unresponsive. 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. Specifica...
CustomEvent - Web APIs
the way through retargeting. Event.deepPath An Array of DOM Nodes through which the event has bubbled. Event.defaultPrevented Read only Indicates whether or not the call to event.preventDefault() canceled the event. Event.eventPhase Read only Indicates which phase of the event flow is being processed. Event.explicitOriginalTarget Read only The explicit original target of the event (Mozilla-specific.) Event.originalTarget Read only The original target of the event, before any retargetings. (Mozilla-specific.) Event.returnValue A historical property introduced by Internet Explorer and eventually adopted into the DOM specification in order to ensure existing sites continue to work. Ideally, you should try to use Event.preventDefault() and Event.defaultPrevented instead, but you...
DOMLocator - Web APIs
Returned by DOMError.location. Properties DOMLocator.lineNumber Read only Returns a positive integer or -1. DOMLocator.columnNumber Read only Returns a positive integer or -1. DOMLocator.byteOffset Read only Returns a positive integer or -1. DOMLocator.utf16Offset Read only Returns a positive integer or -1. DOMLocator.relatedNode Read only Returns a positive integer or -1. DOMLocator.uri Read only Returns a positive integer or -1. Methods This interface neither implements, nor inherits, any method. ...
DOMParser - Web APIs
Web › API › DOMParser
Parsing SVG or HTML The DOMParser can also be used to parse an SVG document (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) or an HTML documen...
DOMUserData - Web APIs
DOMUserData refers to application data. In JavaScript, it maps directly to Object. It is returned or used as an argument by Node.setUserData(), Node.getUserData(), used as the third argument to handle() on UserDataHandler, and is used or returned by various DOMConfiguration methods. Note that although it can be an object, in Mozilla, it may be returned as a string or other type, if it was set as such a type (e.g., Node.setUserData() and Node.getUserData()). DOMUserData is not persisted nor serialized and will not be present after the application has restarted or after a crash. If you are interested in persisting data you might rather need to use nsISessionStore. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Core SpecificationThe...
Document.alinkColor - Web APIs
Returns or sets the color of an active link in the document body. A link is active during the time between mousedown and mouseup events. Syntax var color = document.alinkColor; document.alinkColor = color; color is a string containing the name of the color (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 th...
Document.clear() - Web APIs
Web › API › Document › clear
The Document.clear() method clears the whole specified document in early (pre-1.0) versions of Mozilla. In recent versions of Mozilla-based applications, as well as in Internet Explorer and Netscape 4, this method does nothing. Syntax document.clear(); Specification HTML5 ...
Document.domConfig - Web APIs
This should return the DOMConfiguration for the document. ...
Document.execCommand() - Web APIs
bled. Note: Only returns true if part of a user interaction. Don't try using the return value to verify browser support before calling a command. Parameters aCommandName A DOMString specifying the name of the command to execute. See Commands for a list of possible commands. aShowDefaultUI A Boolean indicating whether the default user interface should be shown. This is not implemented in Mozilla. aValueArgument For commands which require an input argument, is a DOMString providing that information. For example, insertImage requires the URL of the image to insert. Specify null if no argument is needed. Commands backColor Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead. This requires a <color> value string...
Document.fgColor - Web APIs
Web › API › Document › fgColor
fgColor gets/sets the foreground color, or text color, of the current document. Syntax var color = document.fgColor; document.fgColor = color; Parameters color is a string representing the color as a word (e.g., "red") or hexadecimal value (e.g., "#ff0000"). Example document.fgColor = "white"; document.bgColor = "darkblue"; Notes The default value for this property in Mozilla Firefox is black (#000000 in hexadecimal). document.fgColor is deprecated in DOM Level 2 HTML. The recommended alternative is the CSS property color (e.g., document.body.style.color = "red"). Another alternative is document.body.text, although this is deprecated in HTML 4.01 in favor of the CSS alternative above. ...
Document.hasFocus() - Web APIs
Web › API › Document › hasFocus
Living Standard Initial definition ...
Document.location - Web APIs
Web › API › Document › location
as if it were a string in most cases: document.location = 'http://www.example.com' is a synonym of document.location.href = 'http://www.example.com'. To retrieve just the URL as a string, the read-only document.URL property can also be used. If the current document is not in a browsing context, the returned value is null. Syntax locationObj = document.location document.location = 'http://www.mozilla.org' // Equivalent to document.location.href = 'http://www.mozilla.org' Examples console.log(document.location); // Prints a Location object to the console Specifications Specification Status Comment HTML Living StandardThe definition of 'Document.location' in that specification. Living Standard No change from HTML5. HTML5The definition of 'Documen...
Document.origin - Web APIs
Web › API › Document › origin
Use self.origin instead. The Document.origin read-only property returns the document's origin. ...
Document.vlinkColor - Web APIs
The Document.vlinkColor property gets/sets the color of links that the user has visited in the document. Syntax color = document.vlinkColor document.vlinkColor = color Parameters color is a string representing the color as a word (e.g., "red") or hexadecimal value (e.g., "#ff0000"). Notes The default value for this property in Mozilla Firefox is purple (#551a8b in hexadecimal). Document.vlinkColor is deprecated in DOM Level 2 HTML. The recommended alternative is to get/set the color of the CSS :visited pseudo-class on HTML <a> elements (e.g., a:visited {color:red;}). Another alternative is document.body.vLink, although this is deprecated in HTML 4.01 in favor of the CSS alternative. ...
How to create a DOM tree - Web APIs
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="denver" state="co" country="usa"/> </person> </people> The W3C DOM API, supported by Mozilla, can be used to create an in-memory representation of this document like so: var doc = document.implementation.createDocument("", "", null); var peopleElem = doc.createElement("people"); var personElem1 = doc.createElement("person"); personElem1.setAttribute("first-name", "eric"); personElem1.setAttribute("middle-initial", "h"); personElem1.setAttribute("last-name", "jung"); var addressElem1 =...
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
)"; } else { mycurrent_cell.style.display = "none"; } } mytablebody.appendChild(mycurrent_row); } mytable.appendChild(mytablebody); mybody.appendChild(mytable); } </script> </html> Original Document Information Author(s) Marcio Galli Migrated from http://web.archive.org/web/20000815054125/http://mozilla.org/docs/dom/technote/tn-dom-table/ ...
Element.classList - Web APIs
Web › API › Element › classList
az"); div.classList.remove("foo", "bar", "baz"); // add or remove multiple classes using spread syntax const cls = ["foo", "bar"]; div.classList.add(...cls); div.classList.remove(...cls); // replace class "foo" with class "bar" div.classList.replace("foo", "bar"); Versions of Firefox before 26 do not implement the use of several arguments in the add/remove/toggle methods. See https://bugzilla.mozilla.org/show_bug.cgi?id=814014 Polyfill The legacy onpropertychange event can be used to create a living classList mockup thanks to a Element.prototype.className property that fires the specified event once it is changed. The following polyfill for both classList and DOMTokenList ensures full compliance (coverage) for all standard methods and properties of Element.prototype.classList for IE10-IE1...
Element.getAttributeNS() - Web APIs
('test:foo')); </script> </body> </html> Notes Namespaces are only supported in XML documents. HTML5 documents have to use getAttribute() instead. getAttributeNS() differs from getAttribute() in that it allows you to further specify the requested attribute as being part of a particular namespace, as in the example above, where the attribute is part of the fictional "specialspace" namespace on Mozilla. Prior to the DOM4 specification, this method was specified to return an empty string rather than null for non-existent attributes. However, most browsers instead returned null. Starting with DOM4, the specification now says to return null. However, some older browsers return an empty string. For that reason, you should use hasAttributeNS() to check for an attribute's existence prior to calling ...
Element.getAttributeNodeNS() - Web APIs
ode = element.getAttributeNodeNS(namespace, nodeName) attributeNode is the node for specified attribute. namespace is a string specifying the namespace of the attribute. nodeName is a string specifying the name of the attribute. == Example == TBD The example needs to be fixed pre> // html: <div id="top" /> t = document.getElementById("top"); specialNode = t.getAttributeNodeNS( "http://www.mozilla.org/ns/specialspace", "id"); // iNode.value = "full-top" </pre Notes getAttributeNodeNS is more specific than getAttributeNode in that it allows you to specify attributes that are part of a particular namespace. The corresponding setter method is setAttributeNodeNS. DOM methods dealing with element's attributes: Not namespace-aware, most commonly used methods Namespace-aware variants (DOM L...
Element.getClientRects() - Web APIs
outer-<svg> establishes (and to be clear, the rectangles are also transformed by the outer-<svg>'s viewBox transform, if any). Originally, Microsoft intended this method to return a TextRectangle object for each line of text. However, the CSSOM working draft specifies that it returns a DOMRect for each border box. For an inline element, the two definitions are the same. But for a block element, Mozilla will return only a single rectangle. Firefox 3.5 note Firefox 3.5 adds width and height properties to the TextRectangle object. The amount of scrolling that has been done of the viewport area (or any other scrollable element) is taken into account when computing the rectangles. The returned rectangles do not include the bounds of any child elements that might happen to overflow. For...
Element.hasAttributeNS() - Web APIs
ent has the specified attribute. Syntax result = element.hasAttributeNS(namespace,localName) result is the boolean value true or false. namespace is a string specifying the namespace of the attribute. localName is the name of the attribute. ...
Element.innerHTML - Web APIs
Web › API › Element › innerHTML
ot use innerHTML when inserting plain text; instead, use Node.textContent. This doesn't parse the passed content as HTML, but instead inserts it as raw text. Warning: If your project is one that will undergo any form of security review, using innerHTML most likely will result in your code being rejected. For example, if you use innerHTML in a browser extension and submit the extension to addons.mozilla.org, it will not pass the automated review process. Example This example uses innerHTML to create a mechanism for logging messages into a box on a web page. JavaScript function log(msg) { var logElem = document.querySelector(".log"); var time = new Date(); var timeStr = time.toLocaleTimeString(); logElem.innerHTML += timeStr + ": " + msg + "<br/>"; } log("Logging mouse events insid...
Element.namespaceURI - Web APIs
his API was defined within the Node interface. Syntax namespace = element.namespaceURI Example In this snippet, an element is being examined for its localName and its namespaceURI. If the namespaceURI returns the XUL namespace and the localName returns "browser", then the node is understood to be a XUL <browser/>. if (element.localName == "browser" && element.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a XUL browser } Notes This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. The namespace URI of a node is frozen at the node creation time. In Firefox 3.5 and earlier, the namespace URI for HTML elements in HTML documents is null. In later versions, in co...
Element.setAttributeNS() - Web APIs
yntax element.setAttributeNS(namespace, name, value) namespace is a string specifying the namespace of the attribute. name is a string identifying the attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name. value is the desired string value of the new attribute. ...
Comparison of Event Targets - Web APIs
ymous content. event.originalTarget Event.webidl The original target of the event, before any retargetings. See Anonymous Content#Event_Flow_and_Targeting for details. event.composedTarget Event.webidl The original non-native target of the event before composition from Shadow DOM. ...
Event.originalTarget - Web APIs
The original target of the event before any retargetings. (Mozilla-specific) In presence of XBL anonymous content this will be the anonymous node the event originally fired on. See Anonymous Content#Event_Flow_and_Targeting for more details. Note: originalTarget may also be native anonymous content (see bug 208427), in which case it's useless for non-privileged code. See also Comparison of Event Targets Example Need an example that makes sense here Specification This is a Mozilla-specific property. Defined in /dom/public/idl/events/nsIDOMNSEvent.idl This event property is not defined in the W3.org DOM Level 2 Events ...
Event - Web APIs
Web › API › Event
the way through retargeting. Event.deepPath An Array of DOM Nodes through which the event has bubbled. Event.defaultPrevented Read only Indicates whether or not the call to event.preventDefault() canceled the event. Event.eventPhase Read only Indicates which phase of the event flow is being processed. Event.explicitOriginalTarget Read only The explicit original target of the event (Mozilla-specific.) Event.originalTarget Read only The original target of the event, before any retargetings. (Mozilla-specific.) Event.returnValue A historical property introduced by Internet Explorer and eventually adopted into the DOM specification in order to ensure existing sites continue to work. Ideally, you should try to use Event.preventDefault() and Event.defaultPrevented instead, but you...
EventTarget - Web APIs
D; pointer-events: all;} Constructor EventTarget() Creates a new EventTarget object instance. Methods EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example Simple implementation of EventTarget var EventTarget = function() { this.listeners = {}; }; EventTarget.prototype.l...
Cross-global fetch usage - Web APIs
In the past we would resolve the relative URL against the current global, for example: let absolute = new URL(relative, window.location.href) This is not a problem as such. It is just that different APIs that exhibit this kind of behavior were doing it inconsistently with the behavior defined in the spec, which could lead to problems further down the line. The solution In Firefox 60 onwards, Mozilla resolves the relative URL against the global that owns the fetch() function being used (see bug 1432272). So in the case described above, it is resolved against the iframe's location: let absolute = new URL(relative, frame.contentWindow.location.href) There is a lot of discussion in progress about getting new specs to align with this behavior change, to mitigate potential problems going forward...
Using files from web applications - Web APIs
if (e.lengthComputable) { const percentage = Math.round((e.loaded * 100) / e.total); self.ctrl.update(percentage); } }, false); xhr.upload.addEventListener("load", function(e){ self.ctrl.update(100); const canvas = self.ctrl.ctx.canvas; canvas.parentNode.removeChild(canvas); }, false); xhr.open("POST", "http://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php"); xhr.overrideMimeType('text/plain; charset=x-user-defined-binary'); reader.onload = function(evt) { xhr.send(evt.target.result); }; reader.readAsBinaryString(file); } The FileUpload() function shown above creates a throbber, which is used to display progress information, and then creates an XMLHttpRequest to handle uploading the dat...
File and Directory Entries API support in Firefox - Web APIs
virtual file system on the user's storage device. Work to standardize the specification was abandoned back in 2012, but by that point, Google Chrome included its own implementation of the API. Over time, a number of popular sites and Web applications came to use it, often without providing any means of falling back to standard APIs or even checking to be sure the API is available before using it. Mozilla instead opted to implement other APIs which can be used to solve many of the same problems, such as IndexedDB; see the blog post Why no FileSystem API in Firefox? for more insights. This has caused a number of popular web sites not to work properly on browsers other than Chrome. Because of that, an attempt was made to create a spec offering the features of Google's API which consensus could be r...
GlobalEventHandlers.onkeypress - Web APIs
Specifications Specification Status Comment HTML Living StandardThe definition of 'onkeypress' in that specification. Living Standard ...
HTMLAnchorElement.referrerPolicy - Web APIs
port. "unsafe-url" meaning that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe as it can leak path information that has been concealed to third-party by using TLS. Examples var elt = document.createElement("a"); var linkText = document.createTextNode("My link"); elt.appendChild(linkText); elt.href = "https://developer.mozilla.org/"; elt.referrerPolicy = "no-referrer"; var div = document.getElementById("divAround"); div.appendChild(elt); // When clicked, the link will not send a referrer header. Specifications Specification Status Comment Referrer PolicyThe definition of 'referrerPolicy attribute' in that specification. Candidate Recommendation Added the referrerPolicy property. ...
HTMLAudioElement - Web APIs
or Audio() Creates and returns a new HTMLAudioElement object, optionally starting the process of loading an audio file into it if the file URL is given. Properties No specific properties; inherits properties from its parent, HTMLMediaElement, and from HTMLElement. Methods Inherits methods from its parent, HTMLMediaElement, and from HTMLElement. It offers no methods of its own. Obsolete Mozilla-only methods The following methods are non-standard and should not be used. mozCurrentSampleOffset() Returns the number of samples form the beginning of the stream that have been written so far into the audio stream created by calling mozWriteAudio(). mozSetup() Sets up the audio stream to allow writing, given the number of audio channels (1 or 2) and the sample rate in kHz. mozWr...
HTMLCanvasElement.toBlob() - Web APIs
revoked URL.revokeObjectURL(url); }; newImg.src = url; document.body.appendChild(newImg); }); Note that here we're creating a PNG image; if you add a second parameter to the toBlob() call, you can specify the image type. For example, to get the image in JPEG format: canvas.toBlob(function(blob){...}, 'image/jpeg', 0.95); // JPEG at 95% quality A way to convert a canvas to an ico (Mozilla only) This uses -moz-parse to convert the canvas to ico. Windows XP doesn't support converting from PNG to ico, so it uses bmp instead. A download link is created by setting the download attribute. The value of the download attribute is the name it will use as the file name. var canvas = document.getElementById('canvas'); var d = canvas.width; ctx = canvas.getContext('2d'); ctx.beginPath(); ctx...
HTMLCanvasElement - Web APIs
o the <canvas>, then this value will also be used as the width of the canvas in the length-unit CSS Pixel. HTMLCanvasElement.mozOpaque Is a Boolean reflecting the moz-opaque HTML attribute of the <canvas> element. It lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported in Mozilla-based browsers; use the standardized canvas.getContext('2d', { alpha: false }) instead. HTMLCanvasElement.mozPrintCallback Is a function that is Initially null. Web content can set this to a JavaScript function that will be called when the canvas is to be redrawn while the page is being printed. When called, the callback is passed a "printState" object that implements the MozCanvasPrintState i...
HTMLHtmlElement.version - Web APIs
...
HTMLHyperlinkElementUtils.hostname - Web APIs
The HTMLHyperlinkElementUtils.hostname property is a USVString containing the domain of the URL. Syntax string = object.hostname; object.hostname = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/docs/HTMLHyperlinkElementUtils.hostname"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.hostname; // Returns:'developer.mozilla.org' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.hostname' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.href - Web APIs
The HTMLHyperlinkElementUtils.href property is a stringifier that returns a USVString containing the whole URL, and allows the href to be updated. Syntax string = object.href; object.href = string; Examples // Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/HTMLHyperlinkElementUtils/href"> element is in the document var anchor = document.getElementById("myAnchor"); var result = anchor.href; // Returns: 'https://developer.mozilla.org/HTMLHyperlinkElementUtils/href' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.href' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.password - Web APIs
The HTMLHyperlinkElementUtils.password property is a USVString containing the password specified before the domain name. If it is set without first setting the username property, it silently fails. Syntax string = object.password; object.password = string; Examples // Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/docs/HTMLHyperlinkElementUtils.username"> be in the document var anchor = document.getElementByID("myAnchor"); var result = anchor.password; // Returns:'flabada' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.password' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.pathname - Web APIs
The HTMLHyperlinkElementUtils.pathname property is a USVString containing an initial '/' followed by the path of the URL (or the empty string if there is no path). Syntax string = object.pathname; object.pathname = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/docs/HTMLHyperlinkElementUtils.pathname"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.pathname; // Returns:'/docs/HTMLHyperlinkElementUtils.pathname' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.pathname' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.port - Web APIs
The HTMLHyperlinkElementUtils.port property is a USVString containing the port number of the URL. If the URL does not contain an explicit port number, it will be set to ''. Syntax string = object.port; object.port = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org:443/docs/HTMLHyperlinkElementUtils.port"> element be in the document var anchor = document.getElementByID("myAnchor"); var result = anchor.port; // Returns:'443' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.port' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.protocol - Web APIs
The HTMLHyperlinkElementUtils.protocol property is a USVString representing the protocol scheme of the URL, including the final ':'. Syntax string = object.protocol; object.protocol = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/HTMLHyperlinkElementUtils.protocol"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.protocol; // Returns:'https:' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.protocol' in that specification. Living Standard Initial definition. ...
HTMLHyperlinkElementUtils.search - Web APIs
kElementUtils.search property is a search string, also called a query string, that is USVString containing a '?' followed by the parameters of the URL. Modern browsers provide URLSearchParams and URL.searchParams to make it easy to parse out the parameters from the querystring. ...
HTMLHyperlinkElementUtils.username - Web APIs
The HTMLHyperlinkElementUtils.username property is a USVString containing the username specified before the domain name. Syntax string = object.username; object.username = string; Examples // Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/docs/HTMLHyperlinkElementUtils.username"> be in the document var anchor = document.getElementByID("myAnchor"); var result = anchor.username; // Returns:'anonymous' Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHyperlinkElementUtils.username' in that specification. Living Standard Initial definition. ...
HTMLImageElement.crossOrigin - Web APIs
this example, a new <img> element is created and added to the document, loading the image with the Anonymous state; the image will be loaded using CORS and credentials will be used for all cross-origin loads. JavaScript The code below demonstrates setting the crossOrigin property on an <img> element to configure CORS access for the fetch of a newly-created image. ...
HTMLImageElement.lowSrc - Web APIs
alternate image in 8-bit color. Important: The lowSrc property is obsolete and should not be used. Instead, you should use an image format which loads progressively (such as progressive JPEG). Or simply make sure your images are all well-optimized and balanced for appearance versus size. Usage notes lowSrc is a strange case. It was never technically part of the HTML specification (it was a Mozilla extension to HTML); however, HTML 5 does list it among the obsolete attributes. Browser compatibility The compatibility table on 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 AndroidFi...
HTMLMediaElement: loadstart event - Web APIs
Living Standard HTML5The definition of 'loadstart media event' in that specification. Recommend...
HTMLMediaElement: progress event - Web APIs
Living Standard HTML5The definition of 'progress media event' in that specification. Recommendation ...
HTMLMediaElement - Web APIs
decrypting media during playback. HTMLMediaElement.setSinkId() Sets the ID of the audio device to use for output and returns a Promise. This only works when the application is authorized to use the specified device. Obsolete methods These methods are obsolete and should not be used, even if a browser still supports them. HTMLMediaElement.mozLoadFrom() This method, available only in Mozilla's implementation, loads data from another media element. This works similarly to load() except that instead of running the normal resource selection algorithm, the source is simply set to the other element's currentSrc. This is optimized so this element gets access to all of the other element's cached and buffered data; in fact, the two elements share downloaded data, so data downloaded by either...
HTMLOptionsCollection - Web APIs
baseline="middle">HTMLOptionsCollection</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Name Type Description length unsigned long As optionally allowed by the spec, this property isn't read-only. You can either remove options from the end by lowering the value, or add blank options at the end by raising the value. Mozilla allows this, while other implementations could potentially throw a DOMException. Methods This interface inherits the methods of its parent, HTMLCollection. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLOptionsCollection' in that specification. Living Standard ...
Drag Operations - Web APIs
s case, the data value is "Text to drag" and is of the format text/plain. You can provide data in multiple formats. To do this, call the setData() method multiple times with different formats. You should call it with formats in order from most specific to least specific. const dt = event.dataTransfer; dt.setData("application/x.bookmark", bookmarkString); dt.setData("text/uri-list", "https://www.mozilla.org"); dt.setData("text/plain", "https://www.mozilla.org"); Here, data is added in three different types. The first type, application/x.bookmark, is a custom type. Other applications won't support this type, but you can use a custom type for drags between areas of the same site or application. By providing data in other types as well, we can also support drags to other applications in less spe...
Dragging and Dropping Multiple Items - Web APIs
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. ...
HTML Drag and Drop API - Web APIs
nous 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 basics This section is a summa...
IDBFactory.open() - Web APIs
Web › API › IDBFactory › open
indow.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; // DON'T use "var indexedDB = ..." if you're not in a function. ...
IDBFactory - Web APIs
indow.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; // DON'T use "var indexedDB = ..." if you're not in a function. ...
IDBVersionChangeEvent.newVersion - Web APIs
indow.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; // DON'T use "var indexedDB = ..." if you're not in a function. ...
IDBVersionChangeEvent - Web APIs
indow.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; // DON'T use "var indexedDB = ..." if you're not in a function. ...
Browser storage limits and eviction criteria - Web APIs
re is no trimming effect put in place to delete parts of origins -- deleting one database of an origin could cause problems with inconsistency. There's also another limit called group limit -- this is defined as 20% of the global limit, but it has a minimum of 10 MB and a maximum of 2 GB. Each origin is part of a group (group of origins). There's one group for each eTLD+1 domain. For example: mozilla.org -- group1, origin1 www.mozilla.org -- group1, origin2 joe.blogs.mozilla.org -- group1, origin3 firefox.com -- group2, origin4 In this group, mozilla.org, www.mozilla.org, and joe.blogs.mozilla.org can aggregately use a maximum of 20% of the global limit. firefox.com has a separate maximum of 20%. The two limits react differently to limits being reached: The group limit is also called...
IndexedDB API - Web APIs
Sync version of IDBObjectStore. IDBIndexSync Sync version of IDBIndex. IDBFactorySync Sync version of IDBFactory. IDBEnvironmentSync Sync version of IDBEnvironment. IDBDatabaseSync Sync version of IDBDatabase. IDBCursorSync Sync version of IDBCursor. Examples eLibri: A powerful library and eBook reader application, written by Marco Castelluccio, winner of the IndexedDB Mozilla DevDerby. To-do Notifications (view example live): The reference application for the examples in the reference docs. Storing images and files in IndexedDB Specifications Specification Status Comment Indexed Database API Draft Recommendation Indexed Database API 2.0 Recommendation Initial definition ...
Location: hostname - Web APIs
Web › API › Location › hostname
The hostname property of the Location interface is a USVString containing the domain of the URL. Syntax string = object.hostname; object.hostname = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/docs/Location.hostname"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.hostname; // Returns:'developer.mozilla.org' Specifications Specification Status Comment HTML Living StandardThe definition of 'hostname' in that specification. Living Standard Initial definition. ...
Location: href - Web APIs
Web › API › Location › href
The href property of the Location interface is a stringifier that returns a USVString containing the whole URL, and allows the href to be updated. Setting the value of href navigates to the provided URL. If you want redirection, use Location.replace(). Syntax string = object.href; object.href = string; Examples // Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/Location/href"> element is in the document var anchor = document.getElementById("myAnchor"); var result = anchor.href; // Returns: 'https://developer.mozilla.org/Location/href' Specifications Specification Status Comment HTML Living StandardThe definition of 'href' in that specification. Living Standard Initial definition. ...
Location: origin - Web APIs
Web › API › Location › origin
on of the origin of the represented URL; that is: for URL using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for URL using file: scheme, the value is browser dependant; for URL using the blob: scheme, the origin of the URL following blob:. E.g "blob:https://mozilla.org" will have "https://mozilla.org". Note: This feature is available in Web Workers. Syntax string = object.origin; Examples // On this page, returns the origin var result = window.location.origin; // Returns:'https://developer.mozilla.org' Specifications Specification Status Comment HTML Living StandardThe definition of 'origin' in that specification. Living...
Location: password - Web APIs
Web › API › Location › password
The password property of the Location interface is a USVString containing the password specified before the domain name. ...
Location: pathname - Web APIs
Web › API › Location › pathname
The pathname property of the Location interface is a USVString containing an initial '/' followed by the path of the URL (or the empty string if there is no path). Syntax string = object.pathname; object.pathname = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/docs/Location.pathname"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.pathname; // Returns:'/docs/Location.pathname' Specifications Specification Status Comment HTML Living StandardThe definition of 'pathname' in that specification. Living Standard Initial definition. ...
Location: port - Web APIs
Web › API › Location › port
The port property of the Location interface is a USVString containing the port number of the URL. If the URL does not contain an explicit port number, it will be set to ''. Syntax string = object.port; object.port = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org:443/docs/Location.port"> element be in the document var anchor = document.getElementByID("myAnchor"); var result = anchor.port; // Returns:'443' Specifications Specification Status Comment HTML Living StandardThe definition of 'Location.port' in that specification. Living Standard Initial definition. ...
Location: protocol - Web APIs
Web › API › Location › protocol
The protocol property of the Location interface is a USVString representing the protocol scheme of the URL, including the final ':'. Syntax string = object.protocol; object.protocol = string; Examples // Let's an <a id="myAnchor" href="https://developer.mozilla.org/Location.protocol"> element be in the document var anchor = document.getElementById("myAnchor"); var result = anchor.protocol; // Returns:'https:' Specifications Specification Status Comment HTML Living StandardThe definition of 'protocol' in that specification. Living Standard Initial definition. ...
Location: search - Web APIs
Web › API › Location › search
of the Location interface is a search string, also called a query string; that is, a USVString containing a '?' followed by the parameters of the URL. Modern browsers provide URLSearchParams and URL.searchParams to make it easy to parse out the parameters from the querystring. ...
Location: username - Web APIs
Web › API › Location › username
The username property of the Location interface is a USVString containing the username specified before the domain name. ...
MediaDevices.getUserMedia() - Web APIs
ature-Policy header. The two permissions that apply to getUserMedia() are camera and microphone. For example, this line in the HTTP headers will enable use of a camera for the document and any embedded <iframe> elements that are loaded from the same origin: Feature-Policy: camera 'self' This will request access to the microphone for the current origin and the specific origin https://developer.mozilla.org: Feature-Policy: microphone 'self' https://developer.mozilla.org If you're using getUserMedia() within an <iframe>, you can request permission just for that frame, which is clearly more secure than requesting a more general permission. Here, indicate we need the ability to use both camera and microphone: <iframe src="https://mycode.example.net/etc" allow="camera;microphone"> </iframe> Rea...
Navigator.registerContentHandler() - Web APIs
sons, it's not possible for an extension or web site to register content handlers targeting other sites. Syntax navigator.registerContentHandler(mimeType, uri, title); mimeType is the desired MIME type as a string. uri is the URI to the handler as a string. title is the title of the handler presented to the user as a string. Example navigator.registerContentHandler( "application/vnd.mozilla.maybe.feed", "http://www.example.tld/?foo=%s", "My Feed Reader" ); Notes For Firefox 2 and above, only the application/vnd.mozilla.maybe.feed, application/atom+xml, and application/rss+xml MIME types are supported. All values have the same effect, and the registered handler will receive feeds in all Atom and RSS versions (see bug 391286). Firefox is the only browser that implemented th...
Web-based protocol handlers - Web APIs
ng a <code>web+burger:</code> protocol action. The data sent:</p> <textarea> <?php echo(htmlspecialchars($value, ENT_QUOTES, 'UTF-8')); ?> </textarea> </body> </html> References http://www.w3.org/TR/2011/WD-html5-20110525/timers.html#custom-handlers See also window.navigator.registerContentHandler nsIProtocolHandler (XUL only) RegisterProtocolHandler Enhancing the Federated Web at Mozilla Webdev Register a custom protocolHandler at Google Developers. ...
Navigator.share() - Web APIs
Web › API › Navigator › share
will reject immediately if the data parameter is not correctly specified, and will also reject if the user cancels sharing. Examples In our Web share test (see the source code) there is a button which, when clicked, invokes the Web Share API to share MDN's URL. ...
NavigatorID.appCodeName - Web APIs
The value of the NavigatorID.appCodeName property is always "Mozilla", 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 "Mozilla" as the value of this property. Syntax codeName = navigator.appCodeName Value The string "Mozilla". Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorID.appCodeName' in that specification. Living Standard Initial definition ...
NavigatorID.appVersion - Web APIs
ion about the browser. Note: Do not rely on this 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 i...
NavigatorID.userAgent - Web APIs
of these pieces of info comes from other navigator 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 ...
NavigatorID - Web APIs
This property is kept only for compatibility purposes. ...
Node.isDefaultNamespace() - Web APIs
nt and returns a Boolean with a value of true if the namespace is the default namespace on the given node or false if not. Syntax result = node.isDefaultNamespace(namespaceURI); Parameters namespaceURI is a string representing the namespace against which the element will be checked. Return value result is a Boolean that holds the return value true or false. Example var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getElementsByTagNameNS(XULNS, 'textbox')[0]; alert(el.isDefaultNamespace(XULNS)); // true Specifications Specification Status Comment DOMThe definition of 'Node: isDefaultNamespace' in that specification. Living Standard ...
Node.namespaceURI - Web APIs
Web › API › Node › namespaceURI
as moved from Node to the Element and Attr interfaces. Syntax namespace = node.namespaceURI Example In this snippet, a node is being examined for its Node.localName and its namespaceURI. If the namespaceURI returns the XUL namespace and the localName returns "browser", then the node is understood to be a XUL <browser/>. if (node.localName == "browser" && node.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { // this is a XUL browser } Notes This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. The namespace URI of a node is frozen at the node creation time. In Firefox 3.5 and earlier, the namespace URI for HTML elements in HTML documents is null. In later versions, in co...
Notification.onclick - Web APIs
want that behaviour, call preventDefault() on the event object. Examples In the following example, we use an onclick handler to open a webpage in a new tab (specified by the inclusion of the '_blank' parameter) once a notification is clicked: notification.onclick = function(event) { event.preventDefault(); // prevent the browser from focusing the Notification's tab window.open('http://www.mozilla.org', '_blank'); } Specifications Specification Status Comment Notifications APIThe definition of 'onclick' in that specification. Living Standard Living standard. ...
performance.clearResourceTimings() - Web APIs
er to zero. To set the size of the browser's performance data buffer, use the Performance.setResourceTimingBufferSize() method. Note: This feature is available in Web Workers. Syntax performance.clearResourceTimings(); Arguments void Return value none This method has no return value. ...
Push API - Web APIs
Web › API › Push API
balScope.onpush An event handler fired whenever a push event occurs; that is, whenever a server push message is received. ServiceWorkerGlobalScope.onpushsubscriptionchange An event handler fired whenever a pushsubscriptionchange event occurs; for example, when a push subscription has been invalidated, or is about to be invalidated (e.g. when a push service sets an expiration time.) Examples Mozilla's ServiceWorker Cookbook contains many useful Push examples. Specifications Specification Status Comment Push API Working Draft Initial definition ...
RTCIceCandidateStats.mozLocalTransport - Web APIs
The non-standard Mozilla extension to the RTCIceCandidateStats dictionary, mozLocalTransport, has been supplanted by the standard relayProtocol property. Syntax Instead of using mozLocalTransport, you should use code like this: localTransport = rtcIceCandidateStats.relayProtocol; Specifications Not part of any specification. ...
RTCIdentityErrorEvent.idp - Web APIs
ibing the domain name of the identity provider (idp) generating the error response event. Firefox implements the interface of this property under the following name: RTCPeerConnectionIdentityErrorEvent. ...
RTCIdentityErrorEvent.loginUrl - Web APIs
on. It can be null and is provided by the identity provider (idp). Firefox implements the interface of this property under the following name: RTCPeerConnectionIdentityErrorEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. ...
RTCPeerConnection.setIdentityProvider() - Web APIs
e Is a DOMString is the domain name where the IdP is. protocol Optional Is a DOMString representing the protocol used to communicate with the IdP. It defaults to "default" and is used to determine the URL where the IdP is listening. username Optional Is a DOMString representing the username associated with the IdP. Example var pc = new PeerConnection(); pc.setIdentityAssertion("developer.mozilla.org"); Specifications Specification Status Comment Identity for WebRTCThe definition of 'RTCPeerConnection.setIdentityProvider()' in that specification. Candidate Recommendation ...
Request - Web APIs
Web › API › Request
g (text) representation of the request body. Note: The Body functions can be run only once; subsequent calls will resolve with empty strings/ArrayBuffers. ...
Screen - Web APIs
Web › API › Screen
ock the screen orientation (only works in fullscreen or for installed apps) Methods inherited from EventTarget: EventTarget.addEventListener() Registers an event handler of a specific event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example if (screen.pixelDepth < 8) { // use low-color version of page } else { // use regular, colorful page } Specificat...
SpeechRecognitionAlternative.confidence - Web APIs
Syntax var myConfidence = speechRecognitionAlternativeInstance.confidence; Returns A number betwen 0 and 1. Examples This code is excerpted from our Speech color changer example. ...
UDP Socket API - Web APIs
//TODO: docs are missing, see https://bugzilla.mozilla.org/show_bug.cgi?id=745283 ...
URL.hostname - Web APIs
Web › API › URL › hostname
The hostname property of the URL interface is a USVString containing the domain name of the URL. Note: This feature is available in Web Workers. Syntax const domain = url.hostname url.hostname = domain Value A USVString. Examples const url = new URL('/docs/Web/API/URL/hostname'); console.log(url.hostname); // Logs: 'developer.mozilla.org' Specifications Specification Status Comment URLThe definition of 'URL.hostname' in that specification. Living Standard Initial definition. ...
URL.password - Web APIs
Web › API › URL › password
assword property of the URL interface is a USVString containing the password specified before the domain name. If it is set without first setting the username property, it silently fails. Note: This feature is available in Web Workers. Syntax const passwordString = url.password url.password = newPassword Value A USVString. Examples const url = new URL('https://anonymous:flabada@developer.mozilla.org/docs/Web/API/URL/password'); console.log(url.password) // Logs "flabada" Specifications Specification Status Comment URLThe definition of 'URL.password' in that specification. Living Standard Initial definition. ...
URL.username - Web APIs
Web › API › URL › username
The username property of the URL interface is a USVString containing the username specified before the domain name. Note: This feature is available in Web Workers. Syntax const usernameString = url.username url.username = newUsername Value A USVString. Examples const url = new URL('https://anonymous:flabada@developer.mozilla.org/docs/Web/API/URL/username'); console.log(url.username) // Logs "anonymous" Specifications Specification Status Comment URLThe definition of 'username' in that specification. Living Standard Initial definition. ...
URLUtilsReadOnly.hash - Web APIs
Living Standard Initial definition. ...
URLUtilsReadOnly.origin - Web APIs
domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified). For URL using file: scheme, the value is browser dependant. This version of origin is implemented by WorkerLocation for use on workers. Syntax string = object.origin; Examples // On this page, returns the origin var result = self.location.origin; // Returns:'https://developer.mozilla.org:443' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.origin' in that specification. Living Standard Initial definition. 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 ...
URLUtilsReadOnly.pathname - Web APIs
Living Standard Initial definition. ...
URLUtilsReadOnly.port - Web APIs
Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
URLUtilsReadOnly.protocol - Web APIs
Living Standard Initial definition. ...
URLUtilsReadOnly.search - Web APIs
Living Standard Initial definition. ...
URLUtilsReadOnly.toString() - Web APIs
The URLUtilsReadOnly.toString() stringifier method returns a DOMString containing the whole URL. It is a synonym for URLUtilsReadOnly.href. Syntax string = object.toString(); Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.href var result = window.self.toString(); // Returns:'https://developer.mozilla.org/URLUtilsReadOnly.href' 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 AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternettoString ExperimentalChrome No ...
URL API - Web APIs
Web › API › URL API
nts Creating an URL object for a given URL parses the URL and provides quick access to its constituent parts through its properties. let addr = new URL("/docs/Web/API/URL_API"); let host = addr.host; let path = addr.pathname; The snippet above creates a URL object for the article you're reading right now, then fetches the host and pathname properties. In this case, those strings are developer.mozilla.org and /docs/Web/API/URL_API, respectively. Changing the URL Most of the properties of URL are settable; you can write new values to them to alter the URL represented by the object. For example, to create a URL and set its username: let myUsername = "someguy"; let addr = new URL("https://mysite.com/login"); addr.username = myUsername; Setting the value of username not only sets that propert...
Using textures in WebGL - Web APIs
main, CORS approval needs to be be obtained. See HTTP access control for details on CORS. Because WebGL now requires textures to be loaded from secure contexts, you can't use textures loaded from file:/// URLs in WebGL. That means 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: COR...
Improving compatibility using WebRTC adapter.js - Web APIs
xample, on Firefox versions older than 38, the adapter adds the RTCPeerConnection.urls property; Firefox doesn't natively support this property until Firefox 38, while on Chrome, the adapter adds support for the Promise based API is added if it's not present. These are just a couple of examples; there are of course other adjustments made for you by the shim. The WebRTC adapter currently supports Mozilla Firefox, Google Chrome, Apple Safari, and Microsoft Edge. Using adapter.js In order to use adapter.js, you need to include adapter.js on any page that uses WebRTC APIs: Download a copy of the latest version of adapter.js from GitHub. Place it in your site's directory structure (such as in your scripts directory). Include adapter.js in your project: <script src="adapter.js"></script> Write...
Web Animations API Concepts - Web APIs
ted SMIL, it only animated SVG elements, could not be used from CSS, and was very complex -- often leading to inconsistent implementations. Ten years later, the Safari team introduced the CSS Animations and CSS Transitions specs. The Internet Explorer team requested an animations API to consolidate and normalize animation functionality across all browsers, and thus efforts began in earnest among Mozilla Firefox and Google Chrome developers to create the one animation spec to rule them all: the Web Animations API. Now we've got the WAAPI for future animation specifications to piggyback on, allowing them to to remain consistent and play well together. It also provides a point of reference all browsers can adhere to with the currently available specs. The Two Models: Timing and Animation The We...
Web Authentication API - Web APIs
Google Demo website and its source code. webauthn.org and its client source code and server source code Specifications Specification Status Comment Web Authentication: An API for accessing Public Key Credentials Level 1 Recommendation Initial definition. ...
Web Storage API - Web APIs
when the browser crashes/restarts, the amount of data saved per origin is limited to 10MB. This has been done to avoid memory issues caused by excessive usage of web storage. Note: Access to Web Storage from third-party IFrames is denied if the user has disabled third-party cookies (Firefox implements this behaviour from version 43 onwards.) Note: Web Storage is not the same as mozStorage (Mozilla's XPCOM interfaces to SQLite) or the Session store API (an XPCOM storage utility for use by extensions). Web Storage interfaces Storage Allows you to set, retrieve and remove data for a specific domain and storage type (session or local.) Window The Web Storage API extends the Window object with two new properties -- Window.sessionStorage and Window.localStorage -- which provide access to...
Window.closed - Web APIs
Web › API › Window › closed
pup The following example demonstrates how a popup window can change the URL of the window that opened it. Before attempting to change the URL, it checks that the current window has an opener using the window.opener property and that the opener isn't closed: // Check that an opener exists and is not closed if (window.opener && !window.opener.closed) { window.opener.location.href = 'http://www.mozilla.org'; } Note that popups can only access the window that opened them. Refreshing a previously opened popup In this example the function refreshPopupWindow() calls the reload() method of the popup's location object to refresh its data. If the popup hasn't been opened yet or the user has closed it a new window is opened. const popupWindow = null; function refreshPopupWindow() { if (popupWind...
Window.frameElement - Web APIs
ng <object>, <iframe>, or <embed>. Syntax const frameEl = window.frameElement Value The element which the window is embedded into. If the window isn't embedded into another document, or if the document into which it's embedded has a different origin, the value is null instead. Example const frameEl = window.frameElement; // If we're embedded, change the containing element's URL to 'http://mozilla.org/' if (frameEl) { frameEl.src = 'http://mozilla.org/'; } Specifications Specification Status Comment HTML Living StandardThe definition of 'Window.frameElement' in that specification. Candidate Recommendation Initial specification. ...
Window.frames - Web APIs
Web › API › Window › frames
using the [i] notation. frameList === window evaluates to true. Each item in the window.frames pseudo-array represents the Window object corresponding to the given <frame>'s or <iframe>'s content, not the (i)frame DOM element (i.e., window.frames[0] is the same thing as document.getElementsByTagName("iframe")[0].contentWindow). For more details about the returned value, refer to this thread on mozilla.dev.platform. Example var frames = window.frames; // or // var frames = window.parent.frames; for (var i = 0; i < frames.length; i++) { // do something with each subframe as frames[i] frames[i].document.body.style.background = "red"; } Specifications Specification Status Comment HTML Living StandardThe definition of 'Window.frames' in that specification. L...
Window.getDefaultComputedStyle() - Web APIs
Notes The returned value is, in certain known cases, expressly incorrect by deliberate intent. In particular, to avoid the so called CSS History Leak security issue, browsers may expressly "lie" about the used value for a link and always return values as if a user has never visited the linked site, and/or limit the styles that can be applied using the :visited pseudo-selector. See http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/ and http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/ for details of the examples of how this is implemented. Specifications Proposed to the CSS working group. ...
Window.personalbar - Web APIs
Due to deprecation of enablePrivilege this functionality can not be used in web pages. EnablePrivilege is disabled in Firefox 15 and will be removed in Firefox 17. ...
Window.sidebar - Web APIs
Web › API › Window › sidebar
Not part of any standard. ...
WindowEventHandlers.onbeforeunload - Web APIs
er() and the beforeunload event, instead of onbeforeunload. Example This example prompts the user before unloading. The HTML specification states that authors should use the Event.preventDefault() method instead of using Event.returnValue to prompt the user. ...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
nts using either setTimeout() or setInterval() (e.g., Internet Explorer 9 and below), you can include this polyfill to enable the HTML5 standard arguments-passing functionality. Just add this code to the top of your script: /*\ |*| |*| Polyfill which enables the passage of arbitrary arguments to the |*| callback functions of JavaScript timers (HTML5 standard syntax). ...
WorkerNavigator - Web APIs
ing Lock object. WorkerNavigator.permissions Read only Returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API. Navigator.storageRead only Returns a StorageManager interface for managing persistance permissions and estimating available storage. Inherited properties NavigatorID.appCodeName Read only Always returns 'Mozilla', in any browser. This property is kept only for compatibility purposes. NavigatorID.appName Read only Returns the official name of the browser. Do not rely on this property to return the correct value. NavigatorID.appVersion Read only Returns the version of the browser as a string. Do not rely on this property to return the correct value. NavigatorConcurrentHardware.hardwareConcurrencyR...
XMLHttpRequest.abort() - Web APIs
rted, its readyState is changed to XMLHttpRequest.UNSENT (0) and the request's status code is set to 0. Syntax XMLHttpRequest.abort() Parameters None. ...
XMLHttpRequest: abort event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest: error event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest: load event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest: loadend event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest: loadstart event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest.openRequest() - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. This Mozilla-specific method is available only from within privileged code, and is only called from a C++ context in order to initialize an XMLHttpRequest. To initialize a request from JavaScript code, use the standard open() method instead. ...
XMLHttpRequest: progress event - Web APIs
); xhr.addEventListener('progress', handleEvent); xhr.addEventListener('error', handleEvent); xhr.addEventListener('abort', handleEvent); } function runXHR(url) { log.textContent = ''; const xhr = new XMLHttpRequest(); addListeners(xhr); xhr.open("GET", url); xhr.send(); return xhr; } xhrButtonSuccess.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg'); }); xhrButtonError.addEventListener('click', () => { runXHR('https://somewhere.org/i-dont-exist'); }); xhrButtonAbort.addEventListener('click', () => { runXHR('https://mdn.mozillademos.org/files/16553/DgsZYJNXcAIPwzy.jpg').abort(); }); Result Specifications Specification Status Comment XMLHttpRequest Living ...
XMLHttpRequest.sendAsBinary() - Web APIs
BinaryString(). The string is converted to binary for transfer by removing the high-order byte of each character. Return value undefined. Polyfill Since sendAsBinary() is an experimental feature, here is a polyfill for browsers that don't support the sendAsBinary() method but support typed arrays. ...
XMLHttpRequestEventTarget.onabort - Web APIs
The XMLHttpRequestEventTarget.onabort is the function called when an XMLHttpRequest transaction is aborted, such as when the XMLHttpRequest.abort() function is called. Syntax XMLHttpRequest.onabort = callback; Values callback is the function to be executed when the transaction is aborted. Example var xmlhttp = new XMLHttpRequest(), method = 'GET', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onabort = function () { console.log('** The request was aborted'); }; xmlhttp.send(); //.. xmlhttp.abort(); // This will invoke our onabort handler above Specifications Specification Status Comment XMLHttpRequest Living Standard WHATWG living standard ...
XMLHttpRequestEventTarget.onerror - Web APIs
The XMLHttpRequestEventTarget.onerror is the function called when an XMLHttpRequest transaction fails due to an error. Syntax XMLHttpRequest.onerror = callback; Values callback is the function to be executed when the request fails. ...
XMLHttpRequestEventTarget.onload - Web APIs
mpletes successfully. Syntax XMLHttpRequest.onload = callback; Values callback is the function to be executed when the request completes successfully. It receives a ProgressEvent object as its first argument. The value of this (i.e. the context) is the same XMLHttpRequest this callback is related to. ...
XMLHttpRequestEventTarget.onloadstart - Web APIs
The XMLHttpRequestEventTarget.onloadstart is the function called when an XMLHttpRequest transaction starts transferring data. Syntax XMLHttpRequest.onloadstart = callback; Values callback is the function to be called when the transaction begins to transfer data. ...
XMLHttpRequestEventTarget.onprogress - Web APIs
lback; Values callback is the function to be called periodically before the request is completed. Event event.loaded the amount of data currently transfered. event.total the total amount of data to be transferred. ...
ARIA live regions - Accessibility
r or clock, such as a countdown timer or stopwatch readout. Advanced live regions (TBD: more granular information on the support of the individual attributes with combinations of OS/Browser/AT). General support for Live Regions was added to JAWS on version 10.0. In Windows Eyes supports Live Regions since version 8.0 "for use outside of Browse Mode for Microsoft Internet Explorer and Mozilla Firefox". NVDA added some basic support for Live Regions for Mozilla Firefox back in 2008 and was improved in 2010 and 2014. In 2015, basic support was also added for Internet Explorer (MSHTML). The Paciello Group has some information about the state of the support of Live Regions (2014). Paul J. Adam has researched the support of Aria-Atomic and Aria-Relevant in particular. aria-atomic: The...
How to file ARIA-related bugs - Accessibility
, questions, and feedback (email) Non Visual Desktop Access (NVDA) File NVDA bugs Discuss NVDA issues Browsers Apple Safari File WebKit.org bugs Google Chrome File Chromium bugs Microsoft Internet Explorer File IE bugs Microsoft Edge File MS Edge Bugs View existing MS Edge ARIA bugs Mozilla Firefox File Firefox bugs Use Component: Disability Access APIs Opera File Opera bugs Use [ARIA] in the summary field JS Libraries Dojo Toolkit File Dojo bug Put Accessibility in the component field Yahoo User Interface File YUI bugs File against specific component in category combobox and include ARIA in summary field ...
ARIA: application role - Accessibility
limbo or trap focus inside something the user cannot exit of. All aspects of interaction, including returning to the regular web content on other parts of the page, must be handled. Use wisely, and cautiously! Examples Some prominent web applications that use the application role properly are: Google Docs, Sheets and Slides CKEditor and TinyMCE WYSIWYG web editors, like the one used on the Mozilla Developer Network Some parts of Gmail Accessibility concerns Improperly using the application role can unintentionally take away access from information on a web page, so be very mindful of using it. Think hard on if you actually need it and cannot just use a set of other, known, widgets to accomplish the same task. If used, the application role should be added to the lowest common container ...
ARIA: contentinfo role - Accessibility
ement over using ARIA, making sure to test for known issues in VoiceOver. Examples <body> <!-- other page content --> <div role="contentinfo"> <h2>MDN Web Docs</h2> <ul> <li><a href="#">Web Technologies</a></li> <li><a href="#">Learn Web Development</a></li> <li><a href="#">About MDN</a></li> <li><a href="#">Feedback</a></li> </ul> <p>(C) 2005-2018 Mozilla and individual contributors. Content is available under <a href="#">these licenses</a>.</p> </div> </body> Accessibility concerns Use sparingly Landmark roles are intended to identify larger overall sections of the document. Using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page. One contentinfo landmark per page...
WAI-ARIA Roles - Accessibility
s used to identify an element that allows the input of free-form text. ARIA: timer roleThe timer role indicates to assistive technologies that an element is a numerical counter the amount of elapsed time from a starting point or the remaining time until an end point. Please claim the role you want to work on by adding your name after the role's name: (old pages are linked from https://developer.mozilla.org/docs/Web/Accessibility/ARIA/ARIA_Techniques). Ones for which the first draft is completed have been removed from the below list. alertdialog banner Combobox Command Columnheader (Estelle) complementary composite Definition Directory Feed Gridcell (Eric E) Group input landmark Link - old page listbox Log - old page Marquee math menu menubar Menuitem Menuitemcheckbox ...
Text labels and names - Accessibility
cument is under your control; if not, try to match the frame's title attribute to the document's title.) Some screen readers replace the contents of the title attribute with the contents of the enclosed document's <title>. It's safest and most accessible to provide the same title in both places. Example <iframe title="MDN Web docs" width="300" height="200" src="https://developer.mozilla.org"> </iframe> Use alt attribute to label mglyph elements When writing equations with MathML, give each <mglyph> element an alt attribute containing a name that describes the symbol. Since mglyph elements are used for non-standard symbols without Unicode definitions, screen readers won't automatically be able to name them. Alternative text helps users of screen readers understand the symbol...
-moz-orient - CSS: Cascading Style Sheets
...
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
Syntax The value of -moz-outline-radius-bottomleft is either a CSS <length> or a percentage of the corresponding dimensions of the border box. The calc() function may be used as well. Values <length> The radius of the circle defining the curvature of the bottom and left edges of the element, specified as a CSS <length>. <percentage> The radius of the circle defining the rounding of the bottom-left corner of the element, specified as the percentages of the bottom and left sides of the border box. ...
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
Syntax The value of -moz-outline-radius-bottomright is either a CSS <length> or a percentage of the corresponding dimensions of the border box. The calc() function may be used as well. Values <length> The radius of the circle defining the curvature of the bottom and right edges of the element, specified as a CSS <length>. <percentage> The radius of the circle defining the rounding of the bottom-right corner of the element, specified as the percentages of the bottom and right sides of the border box. ...
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
Syntax The value of -moz-outline-radius-topleft is either a CSS <length> or a percentage of the corresponding dimensions of the border box. The calc() function may be used as well. Values <length> The radius of the circle defining the curvature of the top and left edges of the element, specified as a CSS <length>. <percentage> The radius of the circle defining the rounding of the top-left corner of the element, specified as the percentages of the top and left sides of the border box. ...
-moz-outline-radius-topright - CSS: Cascading Style Sheets
Syntax The value of -moz-outline-radius-topright is either a CSS <length> or a percentage of the corresponding dimensions of the border box. The calc() function may be used as well. Values <length> The radius of the circle defining the curvature of the top and right edges of the element, specified as a CSS <length>. <percentage> The radius of the circle defining the rounding of the top-right corner of the element, specified as the percentages of the top and right sides of the border box. ...
-moz-outline-radius - CSS: Cascading Style Sheets
/* One value */ -moz-outline-radius: 25px; /* Two values */ -moz-outline-radius: 25px 1em; /* Three values */ -moz-outline-radius: 25px 1em 12%; /* Four values */ -moz-outline-radius: 25px 1em 12% 4mm; /* Global values */ -moz-outline-radius: inherit; -moz-outline-radius: initial; -moz-outline-radius: unset; Constituent properties This property is a shorthand for the following CSS properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright Syntax Values Elliptical outlines and <percentage> values follow the syntax described in border-radius. ...
-moz-user-input - CSS: Cascading Style Sheets
/* Keyword values */ -moz-user-input: none; -moz-user-input: enabled; -moz-user-input: disabled; /* Global values */ -moz-user-input: inherit; -moz-user-input: initial; -moz-user-input: unset; For elements that normally take user input, such as a <textarea>, the initial value of -moz-user-input is enabled. Note: -moz-user-input was one of the proposals leading to the proposed CSS 3 user-input property, which has not yet reached Candidate Recommendation (call for implementations). A similar property, user-focus, was proposed in early drafts of a predecessor of the CSS3 UI specification, but was rejected by the working group. ...
:-moz-broken - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. Syntax :-moz-broken Examples HTML <img src="broken.jpg" alt="This image is broken. ...
:-moz-drag-over - CSS: Cascading Style Sheets
The :-moz-drag-over CSS pseudo-class is a Mozilla extension that matches an element when a dragover event is called on it. Syntax :-moz-drag-over Examples HTML <table border="1"> <tr> <td width="100px" height="100px">Drag Over</td> </tr> </table> CSS td:-moz-drag-over { color: red; } Result Specifications Not part of any standard. ...
:-moz-first-node - CSS: Cascading Style Sheets
It differs from :first-child because it does not match a first-child element with (non-whitespace) text before it. Note: Any whitespace at the start of an element is ignored for the determination of :-moz-first-node. Syntax :-moz-first-node Examples CSS span:-moz-first-node { background-color: lime; } HTML <p> <span>This matches!</span> <span>This doesn't match.</span> </p> <p> Blahblah. ...
:-moz-focusring - CSS: Cascading Style Sheets
If :-moz-focusring matches, then :focus also matches, but the converse is not always true: it depends on whether the user agent has focus ring drawing enabled and how the element was focused. Whether the user agent has focus ring drawing enabled can depend on operating system settings and other factors, so the precise behavior of this pseudo-class will vary from platform to platform. ...
:-moz-handler-blocked - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. ...
:-moz-handler-crashed - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. ...
:-moz-handler-disabled - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. ...
:-moz-last-node - CSS: Cascading Style Sheets
It differs from :last-child because it does not match a last-child element with (non-whitespace) text after it. Note: Any whitespace at the end of an element is ignored for the determination of :-moz-last-node. Syntax :-moz-last-node Examples CSS span:-moz-last-node { background-color: lime; } HTML <p> <span>This does not match.</span> <span>This matches!</span> </p> <p> <span>This doesn't match because it's followed by text.</span> Blahblah. ...
::-moz-list-bullet - CSS: Cascading Style Sheets
The ::-moz-list-bullet CSS pseudo-element is a Mozilla extension that represents the marker (typically a bullet) of a list item (<li>) in an unordered list (<ul>). Syntax li::-moz-list-bullet Examples HTML <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> CSS ::-moz-list-bullet { color: red; font-size: 1.5em; } Result Specifications Not part of any standard. ...
::-moz-list-number - CSS: Cascading Style Sheets
The ::-moz-list-number CSS pseudo-element is a Mozilla extension that represents the marker (typically a number) of a list item (<li>) in an ordered list (<ol>). Syntax li::-moz-list-number Examples HTML <ol> <li>First item</li> <li>Second item</li> <li>Third item</li> </ol> CSS li::-moz-list-number { font-style: italic; font-weight: bold; } Result ScreenshotLive sample Specifications Not part of any standard. ...
:-moz-loading - CSS: Cascading Style Sheets
Note that images that are in the process of loading are not matched by this pseudo-class. Note: This selector is mainly intended to be used by theme developers. ...
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
This is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "ltr". Note: This selector is mainly used by extensions and themes to adapt the user interface based on the user's locale. (This can vary from window to window, and even from tab to tab.) It also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics. ...
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
This is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "rtl". Note: This selector is mainly used by extensions and themes to adapt the user interface based on the user's locale. (This can vary from window to window, and even from tab to tab.) It also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics. ...
:-moz-submit-invalid - CSS: Cascading Style Sheets
By default, no style is applied. You can use this pseudo-class to customize the appearance of the submit button when there are invalid form fields. ...
:-moz-suppressed - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. ...
:-moz-user-disabled - CSS: Cascading Style Sheets
Note: This selector is mainly intended to be used by theme developers. ...
:-moz-window-inactive - CSS: Cascading Style Sheets
:-moz-window-inactive works in content HTML documents, too. Note: Prior to the addition of this pseudo-class, giving different styles to background windows was achieved by setting an attribute (active="true") on the top-level XUL chrome window. This attribute is no longer used. Syntax :-moz-window-inactive Examples This example alters the appearance of a box's background depending on whether its window is active or not. ...
::-moz-color-swatch - CSS: Cascading Style Sheets
Note: Using ::-moz-color-swatch with anything but an <input type="color"> doesn't match anything and has no effect. ...
::-moz-focus-inner - CSS: Cascading Style Sheets
Note: Using ::-moz-focus-inner with anything than the buttons that support it doesn't match anything and has no effect. ...
::-moz-page-sequence - CSS: Cascading Style Sheets
The ::-moz-page-sequence CSS pseudo-element is a Mozilla extension that represents the background of a print preview. Syntax Syntax not found in DB! Specifications Not part of any standard. ...
::-moz-page - CSS: Cascading Style Sheets
The ::-moz-page CSS pseudo-element is a Mozilla extension that represents an individual page when printed or in a print preview. Syntax Syntax not found in DB! Specifications Not part of any standard. ...
::-moz-progress-bar - CSS: Cascading Style Sheets
The ::-moz-progress-bar CSS pseudo-element is a Mozilla extension that represents the progress bar inside a <progress> element. (The bar represents the amount of progress that has been made.) If you want to select the unfinished part of <progress> in Mozilla, please select the <progress> directly. Syntax ::-moz-progress-bar Examples HTML <progress value="30" max="100">30%</progress> <progress max="100">Indeterminate</progress> CSS ::-moz-progress-bar { background-color: red; } /* Force indeterminate bars to have zero width */ :indeterminate::-moz-progress-bar { width: 0; } Result Specifications Not part of any standard. ...
::-moz-range-progress - CSS: Cascading Style Sheets
This portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob). Note: Using ::-moz-range-progress with anything but an <input type="range"> doesn't match anything and has no effect. ...
::-moz-range-thumb - CSS: Cascading Style Sheets
The user can move the thumb along the input's track to alter its numerical value. Note: Using ::-moz-range-thumb with anything but an <input type="range"> doesn't match anything and has no effect. ...
::-moz-range-track - CSS: Cascading Style Sheets
Note: Using ::-moz-range-track with anything but an <input type="range"> doesn't match anything and has no effect. ...
::-moz-scrolled-page-sequence - CSS: Cascading Style Sheets
The ::-moz-scrolled-page-sequence CSS pseudo-element is a Mozilla extension that represents the background of a print preview. Syntax Syntax not found in DB! Specifications Not part of any standard. ...
@font-face - CSS: Cascading Style Sheets
</body> </html> In this example, the user's local copy of "Helvetica Neue Bold" is used; if the user does not have that font installed (two different names are tried), then the downloadable font named "MgOpenModernaBold.ttf" is us...
@import - CSS: Cascading Style Sheets
Web › CSS › @import
The @import CSS at-rule is used to import style rules from other style sheets. Syntax @import url; @import url list-of-media-queries; @import url supports( supports-query ); @import url supports( supports-query ) list-of-media-queries; where: url Is a <string> or a <url> representing the location of the resource to import. The URL may be absolute or relative. Note that the URL for a Mozilla package need not actually specify a file; it can just specify the package name and part, and the appropriate file is chosen automatically (e.g. chrome://communicator/skin/). See here for more information. list-of-media-queries Is a comma-separated list of media queries conditioning the application of the CSS rules defined in the linked URL. If the browser does not support any these queries, it does ...
Using URL values for the cursor property - CSS: Cascading Style Sheets
platforms. (Due to a bug in Gecko 1.9.2-1.9.2.6, Firefox 3.6-3.6.6 on Windows limits to 32x32px. This is fixed in later versions.) Translucent cursors are not supported on Windows releases earlier than XP. This is a limitation of the operating system. Transparency works on all platforms. URL values as cursors are supported in Windows, OS/2, and Linux (when using GTK+ 2.4 or better) releases of Mozilla. Mac OS X support was added with Gecko 2 (Firefox 4). ...
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
t had vendor-prefixed flexbox you would need to include the prefixed version in your feature query. The following feature query would include UC Browser, which supports feature queries and old flexbox syntax, prefixed: @supports (display: flex) or (display: -webkit-box) { // code for supporting browsers } For more information about using Feature Queries see Using Feature Queries in CSS on the Mozilla Hacks blog. Conclusion While I've spent some time in this guide going through potential issues and fallbacks, flexbox is very much ready for you to be using in production work. This guide will help you in those cases where you do come across an issue or have the requirement to support older browsers. ...
Subgrid - CSS: Cascading Style Sheets
A presentation from CSSConf.eu ...
Using CSS gradients - CSS: Cascading Style Sheets
rlaying gradients Gradients support transparency, so you can stack multiple backgrounds to achieve some pretty fancy effects. The backgrounds are stacked from top to bottom, with the first specified being on top. <div class="layered-image"></div> div { width: 300px; height: 150px; } .layered-image { background: linear-gradient(to right, transparent, mistyrose), url("https://mdn.mozillademos.org/files/15525/critters.png"); } Stacked gradients You can even stack gradients with other gradients. As long as the top gradients aren't entirely opaque, the gradients below will still be visible. <div class="stacked-linear"></div> div { width: 200px; height: 200px; } .stacked-linear { background: linear-gradient(217deg, rgba(255,0,0,.8), rgba(255,0,0,0) 70.71%), ...
CSS Properties Reference - CSS: Cascading Style Sheets
The reference articles also include examples on how to use all the properties. ...
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
When a URL points at a specific piece of a document, it can be difficult for the user to notice. Find out how you can use some simple CSS to draw attention to the target of a URL and improve the user's experience. Picking a Target The pseudo-class :target is used to style the target element of a URL containing a fragment identifier. For example, the URL http://developer.mozilla.org/en/docs/Using_the_:target_selector#example contains the fragment identifier #example. In HTML, identifiers are found as the values of either id or name attributes, since the two share the same namespace. Thus, the example URL would point to the heading "example" in this document. Suppose you wish to style any h2 element that is the target of a URL, but do not want any other kind of element to get a target style. Th...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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...
background-blend-mode - CSS: Cascading Style Sheets
on> <option>color-dodge</option> <option>color-burn</option> <option>hard-light</option> <option>soft-light</option> <option>difference</option> <option>exclusion</option> <option>hue</option> <option>saturation</option> <option>color</option> <option>luminosity</option> </select> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; } document.getElementById("select").onchange = function(event) { document.getElementById("div").style.backgroundBlendMode = document.getElementById("select").selectedOptions[0].innerHTML; } console.log(document.getElementById('div')); Specifications Specificatio...
background - CSS: Cascading Style Sheets
Candidate Recommendation The shorthand property has been extended to support multiple backgrounds and the new background-size, background-origin and bac...
border-image-repeat - CSS: Cascading Style Sheets
es toall elements, except internal table elements when border-collapse is collapse. ...
box-direction - CSS: Cascading Style Sheets
e direction is set using the element's dir attribute, then the style is ignored. Formal definition Initial valuenormalApplies toelements with a CSS display value of box or inline-boxInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax normal | reverse | inherit Examples Setting box direction .example { /* bottom-to-top layout */ -moz-box-direction: reverse; /* Mozilla */ -webkit-box-direction: reverse; /* WebKit */ box-direction: reverse; /* As specified */ } Specifications Not part of any standard. Browser compatibility The compatibility table on 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. DesktopMobileChromeE...
box-flex - CSS: Cascading Style Sheets
Web › CSS › box-flex
oComputed valueas specifiedAnimation typediscrete Formal syntax <number> Examples Setting box-flex <!DOCTYPE html> <html> <head> <title>-moz-box-flex example</title> <style> div.example { display: -moz-box; display: -webkit-box; border: 1px solid black; width: 100%; } div.example > p:nth-child(1) { -moz-box-flex: 1; /* Mozilla */ -webkit-box-flex: 1; /* WebKit */ border: 1px solid black; } div.example > p:nth-child(2) { -moz-box-flex: 0; /* Mozilla */ -webkit-box-flex: 0; /* WebKit */ border: 1px solid black; } </style> </head> <body> <div class="example"> <p>I will expand to fill extra space</p> <p>I will not expand</p> <...
box-orient - CSS: Cascading Style Sheets
izontal | vertical | inline-axis | block-axis | inherit Examples Setting horizontal box orientation Here, he box-orient property will cause the two <p> sections in the example to display in the same line. HTML <div class="example"> <p>I will be to the left of my sibling.</p> <p>I will be to the right of my sibling.</p> </div> CSS div.example { display: -moz-box; /* Mozilla */ display: -webkit-box; /* WebKit */ display: box; /* As specified */ /* Children should be oriented vertically */ -moz-box-orient: horizontal; /* Mozilla */ -webkit-box-orient: horizontal; /* WebKit */ box-orient: horizontal; /* As specified */ } Result Specifications Not part of any standard. ...
cross-fade() - CSS: Cascading Style Sheets
<color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> Examples Older syntax for cross-fade HTML <div class="crossfade"></div> CSS .crossfade { width: 300px; height: 300px; background-image: -webkit-cross-fade( url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); background-image: cross-fade( url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); } Result Specifications Specification Status Comment CSS Images Module Level 4The def...
font-stretch - CSS: Cascading Style Sheets
rd</p> <p class="normal">an elephantine lizard</p> <p class="expanded">an elephantine lizard</p> </div> CSS /* This example uses the League Mono Variable font, developed by Tyler Finck (https://www.tylerfinck.com/) and used here under the terms of the SIL Open Font License, Version 1.1: http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web */ @font-face { src: url('https://mdn.mozillademos.org/files/16014/LeagueMonoVariable.ttf'); font-family:'LeagueMonoVariable'; font-style: normal; font-stretch: 1% 500%; /* Required by Chrome */ } .container { border: 10px solid #f5f9fa; padding: 0 1rem; font: 1.5rem 'LeagueMonoVariable', sans-serif; } .condensed { font-stretch: 50%; } .normal { font-stretch: 100%; } .expanded { font-stretch: 200%; } Result Specif...
font-style - CSS: Cascading Style Sheets
s="sample">...it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.</p> </div> CSS /* AmstelvarAlpha-VF is created by David Berlow (https://github.com/TypeNetwork/Amstelvar) and is used here under the terms of its license: https://github.com/TypeNetwork/Amstelvar/blob/master/OFL.txt */ @font-face { src: url('https://mdn.mozillademos.org/files/16044/AmstelvarAlpha-VF.ttf'); font-family:'AmstelvarAlpha'; font-style: normal; } label { font: 1rem monospace; } .container { max-height: 150px; overflow: scroll; } .sample { font: 2rem 'AmstelvarAlpha', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: column; } header { marg...
font-variant-numeric - CSS: Cascading Style Sheets
Candidate Recommendation Initial definition ...
font-weight - CSS: Cascading Style Sheets
<p class="sample">...it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.</p> </div> CSS /* Mutator Sans is created by LettError (https://github.com/LettError/mutatorSans) and is used here under the terms of its license: https://github.com/LettError/mutatorSans/blob/master/LICENSE */ @font-face { src: url('https://mdn.mozillademos.org/files/16011/MutatorSans.ttf'); font-family:'MutatorSans'; font-style: normal; } label { font: 1rem monospace; white-space: nowrap; } .container { max-height: 150px; overflow-y: auto; } .sample { text-transform: uppercase; font: 1.5rem 'MutatorSans', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; f...
linear-gradient() - CSS: Cascading Style Sheets
gth defines at which point between two color stops the gradient color should reach the midpoint of the color transition. If omitted, the midpoint of the color transition is the midpoint between two color stops. Note: Rendering of color stops in CSS gradients follows the same rules as color stops in SVG gradients. Note also that the first example above does not exactly render as depicted in Mozilla Firefox (particularly version 80.0b3). You'll have to set the html height property to 100% or 100vh to render as depicted. Description As with any gradient, a linear gradient has no intrinsic dimensions; i.e., it has no natural or preferred size, nor a preferred ratio. Its concrete size will match the size of the element it applies to. To create a linear gradient that repeats so as to fil...
list-style-image - CSS: Cascading Style Sheets
f this value is set, the marker defined in list-style-type will be used instead. Formal definition Initial valuenoneApplies tolist itemsInheritedyesComputed valuenone or the image with its URI made absoluteAnimation typediscrete Formal syntax <url> | none Examples Setting list item images HTML <ul> <li>Item 1</li> <li>Item 2</li> </ul> CSS ul { list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif"); } Result Specifications Specification Status Comment CSS Lists Module Level 3The definition of 'list-style-image' in that specification. Working Draft Extends support to any <image> data type. CSS Level 2 (Revision 1)The definition of 'list-style-image' in that specification. Recommendation Initial definit...
list-style-position - CSS: Cascading Style Sheets
Working Draft No change. CSS Level 2 (Revision 1)The definition of 'list-style-position' in that specification. Recommendation Initial definition. ...
list-style-type - CSS: Cascading Style Sheets
rad-chinese-informal Traditional Chinese informal numbering. E.g. ????????? upper-armenian * Example disclosure-open Symbol indicating that a disclosure widget such as <details> is opened. disclosure-closed Symbol indicating that a disclosure widget, like <details> is closed. Non-standard extensions A few more predefined types are provided by Mozilla (Firefox), Blink (Chrome and Opera) and WebKit (Safari) to support list types in other languages. See the compatibility table to check which browsers supports which extension. -moz-ethiopic-halehame Example -moz-ethiopic-halehame-am Example ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-er Example ethiopic-halehame-ti-et -moz-ethiopic-halehame-ti-et ...
mask-clip - CSS: Cascading Style Sheets
Web › CSS › mask-clip
eometry-box> | no-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box Examples Clipping a mask to the border box CSS #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg); mask-size: 100% 100%; mask-clip: border-box; /* Can be changed in the live sample */ } HTML <div id="masked"> </div> <select id="clipBox"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option va...
mask-composite - CSS: Cascading Style Sheets
s to container elements excluding the defs element and all graphics elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax <compositing-operator>#where <compositing-operator> = add | subtract | intersect | exclude Examples Compositing mask layers with addition CSS #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg), url(https://mdn.mozillademos.org/files/12676/star.svg); mask-size: 100% 100%; mask-composite: add; /* Can be changed in the live sample */ } HTML <div id="masked"> </div> <select id="compositeMode"> <option value="add">add</option> <option value="subtract">subtract</option> <option value="intersect">intersect</option> <option value="exc...
mask-mode - CSS: Cascading Style Sheets
Web › CSS › mask-mode
; In SVG, it applies to container elements excluding the defs element and all graphics elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax <masking-mode>#where <masking-mode> = alpha | luminance | match-source Examples Using alpha mask mode CSS #masked { width: 227px; height: 200px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg); mask-mode: alpha; /* Can be changed in the live sample */ } HTML <div id="masked"> </div> <select id="maskMode"> <option value="alpha">alpha</option> <option value="luminance">luminance</option> <option value="match-source">match-source</option> </select> JavaScript var maskMode = document.getElementById("maskMode"); maskMode.addEventListener("change"...
mask-origin - CSS: Cascading Style Sheets
mal syntax <geometry-box>#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box Examples Setting mask origin to border-box CSS #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-origin: border-box; /* Can be changed in the live sample */ } HTML <div id="masked"> </div> <select id="origin"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">fill-bo...
mask-position - CSS: Cascading Style Sheets
m | <length-percentage> ]? ...
mask-repeat - CSS: Cascading Style Sheets
ll graphics elementsInheritednoComputed valueConsists of two keywords, one per dimensionAnimation typediscrete Formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} Examples Setting repeat for a single mask CSS #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-repeat: repeat; /* Can be changed in the live sample */ margin-bottom: 10px; } HTML Content <div id="masked"> </div> <select id="repetition"> <option value="repeat-x">repeat-x</option> <option value="repeat-y">repeat-y</option> <option value="repeat" selected>repeat</option> <option value="space">space</option> <option value="round">round</op...
mask-size - CSS: Cascading Style Sheets
Web › CSS › mask-size
mation typerepeatable list of simple list of length, percentage, or calc Formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length> | <percentage> Examples Setting mask size as a percentage CSS #masked { width: 200px; height: 200px; background: blue linear-gradient(red, blue); -webkit-mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg); mask-image: url(https://mdn.mozillademos.org/files/12668/MDN.svg); -webkit-mask-size: 50%; mask-size: 50%; /* Can be changed in the live sample */ margin-bottom: 10px; } HTML <div id="masked"> </div> <select id="maskSize"> <option value="auto">auto</option> <option value="40% 80%">40% 80%</option> <option value="50%" selected>50%</option> <option...
opacity - CSS: Cascading Style Sheets
Web › CSS › opacity
see.</div> <div class="heavy">This is very easy to see.</div> CSS div { background-color: yellow; } .light { opacity: 0.2; /* Barely see the text over the background */ } .medium { opacity: 0.5; /* See the text more clearly over the background */ } .heavy { opacity: 0.9; /* See the text very clearly over the background */ } Result Setting opacity on hover HTML <img src="//developer.mozilla.org/static/img/opengraph-logo.png" alt="MDN logo" width="128" height="146" class="opacity"> CSS img.opacity { opacity: 1; filter: alpha(opacity=100); /* IE8 and lower */ zoom: 1; /* Triggers "hasLayout" in IE 7 and lower */ } img.opacity:hover { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } Result Specifications Specification Status Comment ...
overflow - CSS: Cascading Style Sheets
Web › CSS › overflow
t. If content fits inside the padding box, it looks the same as visible, but still establishes a new block formatting context. Desktop browsers provide scrollbars if content overflows. overlay Behaves the same as auto, but with the scrollbars drawn on top of content instead of taking up space. Only supported in WebKit-based (e.g., Safari) and Blink-based (e.g., Chrome or Opera) browsers. Mozilla extensions -moz-scrollbars-none [1] Use overflow: hidden instead. -moz-scrollbars-horizontal [1] Use overflow-x: scroll and overflow-y: hidden, or overflow: hidden scroll instead. -moz-scrollbars-vertical [1] Use overflow-x: hidden and overflow-y: scroll, or overflow: scroll hidden instead. -moz-hidden-unscrollable Intended mainly for internal use and by themes. Disables scrolling ...
pointer-events - CSS: Cascading Style Sheets
visibleStroke | visible | painted | fill | stroke | all | inherit Examples Disabling pointer events on all images This example disables pointer events (clicking, dragging, hovering, etc.) on all images. img { pointer-events: none; } Disabling pointer events on a single link This example disables pointer events on the link to http://example.com. HTML <ul> <li><a href="https://developer.mozilla.org">MDN</a></li> <li><a href="http://example.com">example.com</a></li> </ul> CSS a[href="http://example.com"] { pointer-events: none; } Result Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'pointer-events' in that specification. Candidate Recommendation Scalable Vector Graphics (SVG) 1.1 (Secon...
user-select - CSS: Cascading Style Sheets
The user-select CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. ...
Getting Started - Developer guides
ake requests to the server without reloading the page Receive and work with data from the server Step 1 - How to make an HTTP request In order to make an HTTP request to the server with JavaScript, you need an instance of an object with the necessary functionality. This is where XMLHttpRequest comes in. Its predecessor originated in Internet Explorer as an ActiveX object called XMLHTTP. Then, Mozilla, Safari, and other browsers followed, implementing an XMLHttpRequest object that supported the methods and properties of Microsoft's original ActiveX object. Meanwhile, Microsoft implemented XMLHttpRequest as well. // Old compatibility code, no longer needed. if (window.XMLHttpRequest) { // Mozilla, Safari, IE7+ ... httpRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE...
Adding captions and subtitles to HTML5 video - Developer guides
These browsers have similar implementations again: subtitles are enabled by default and the default control set contains a 'cc' button that turns subtitles on and off. Chrome and Opera 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 ...
Live streaming web audio and video - Developer guides
ins: Live streaming to the browser using Media Source Extensions and MPEG-DASH Media Source Extensions (W3C) Icecast SHOUTcast GStreamer Streaming GStreamer Pipelines Via HTTP Streaming media using GStreamer on the web GStreamer and Raspberry Pi Acceptance of Media Source Extensions as W3C Candidate Recommendation will accelerate adoption of dash.js Comparison of Streaming Media Systems Mozilla Hacks - Streaming Media on demand with Media Source Extensions ...
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 t...
Overview of events and handlers - Developer guides
cludes, as the data structure passed to the handler function, an object which inherits from the EventPrototype object. A partial diagram of the class hierarchy of event objects is: Note: This diagram is incomplete. The Web API Documentation contains a page defining the Event object which also includes the known DOM event subclasses of the Event object. Documents Three sources on the MDN (Mozilla Developer Network) web site are particularly useful for programmers wanting to work with events: this Event Guide which is part of the Web Developers' Guide, the Event Reference, the Web API documentation for the Event object. ...
Making content editable - Developer guides
ument.execCommand("defaultParagraphSeparator", false, "br"); Security For security reasons, Firefox doesn't let JavaScript code use clipboard related features (copy, paste, etc.) by default. ...
HTML5 - Developer guides
Web › Guide › HTML › HTML5
especially useful for pages loading interactively new information. The contentEditable Attribute: Transform your website to a wiki! HTML5 has standardized the contentEditable attribute. Learn more about this feature. Drag and drop The HTML5 drag and drop API allows support for dragging and dropping items within and between web sites. This also provides a simpler API for use by extensions and Mozilla-based applications. Focus management in HTML The new HTML5 activeElement and hasFocus attributes are supported. Web-based protocol handlers You can now register web applications as protocol handlers using the navigator.registerProtocolHandler() method. requestAnimationFrame Allows control of animations rendering to obtain optimal performance. Fullscreen API Controls the usage of the whole...
Mobile-friendliness - Developer guides
the other hand, if many of your site's users are on devices with less capable browsers, that may eliminate certain strategies as viable options. Approaches to mobile Web development The following approaches aim to achieve each of these goals by different means. Separate sites Responsive design A hybrid approach Original document information Originally published on 4 May, 2011 on the Mozilla Webdev blog as "Approaches to Mobile Web Development Part 1 - What is Mobile Friendliness?", by Jason Grlicky. ...
SVG-in-OpenType - Developer guides
The SVG-in-OpenType work is currently in the hands of the MPEG group. Once we're ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded. ...
User input and controls - Developer guides
g of each one. A pointer can be any point of contact on the screen made by a mouse cursor, pen, touch (including multi-touch), or other pointing input device. The events for handling generic pointer input look a lot like those for mouse: pointerdown, pointermove, pointerup, pointerover, pointerout, etc. Note: Pointer Events are not widely supported yet, but a pointer.js polyfill is available on Mozilla Github. Implement controls Pointer lock In some cases, typically game development, you might need to access mouse events even when the cursor goes past the boundary of the browser or screen: the Pointer_Lock_API gives you full control of the pointing device. This is the code to request pointer lock on an element: element.requestPointerLock(); Note: For a full tutorial and reference, read ...
The Web Open Font Format (WOFF) - Developer guides
Web › Guide › WOFF
It uses a compressed version of the same table-based sfnt structure used by TrueType, OpenType, and Open Font Format, but adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired. There are three main benefits to using WOFF: The font data is compressed, so sites using WOFF will use less bandwidth and will load faster than if they used equivalent uncompressed TrueType or OpenType files. ...
<address>: The Contact Address element - HTML: Hypertext Markup Language
Web › HTML › Element › address
, if any. Examples This example demonstrates the use of <address> to demarcate the contact information for an article's author. <address> You can contact author at <a href="http://www.somedomain.com/contact"> www.somedomain.com</a>.<br> If you see any bugs, please <a href="mailto:webmaster@somedomain.com"> contact webmaster</a>.<br> You may also want to visit us:<br> Mozilla Foundation<br> 331 E Evelyn Ave<br> Mountain View, CA 94041<br> USA </address> Result Although it renders text with the same default styling as the <i> or <em> elements, it is more appropriate to use <address> when dealing with contact information, as it conveys additional semantic information. Specifications Specification Status Comment HTML Livin...
<br>: The Line Break element - HTML: Hypertext Markup Language
Web › HTML › Element › br
is very little you can do to style it. You can set a margin on <br> elements themselves to increase the spacing between the lines of text in the block, but this is a bad practice -- you should use the line-height property that was designed for that purpose. Examples Simple br In the following example we use <br> elements to create line breaks between the different lines of a postal address: Mozilla<br> 331 E. Evelyn Avenue<br> Mountain View, CA<br> 94041<br> USA<br> The result looks like so: Accessibility concerns Creating separate paragraphs of text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. Screen readers may announce the presence of the element, but not any content contained within <br>s. This can be a c...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
Web › HTML › Element › canvas
Any DOM interface HTMLCanvasElement Attributes This element's attributes include the global attributes. height The height of the coordinate space in CSS pixels. Defaults to 150. moz-opaque Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized canvas.getContext('2d', { alpha: false }) instead. width The width of the coordinate space in CSS pixels. Defaults to 300. Usage notes Alternative content You may (and should) provide alternate content inside the <canvas> block. That content will be rendered both on older browsers that don't support canvas and in browsers with JavaScript disabled. Provid...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
Web › HTML › Element › iframe
Positioning and scaling As a replaced element, the position, alignment, and scaling of the embedded document within the <iframe> element's box, can be adjusted with the object-position and object-fit properties. Examples A simple <iframe> An <iframe> in action. After creating the frame, when the user clicks a button, its title is displayed in an alert. HTML <iframe src="https://mdn-samples.mozilla.org/snippets/html/iframe-simple-contents.html" title="iframe Example 1" width="400" height="300"> </iframe> Result Accessibility concerns People navigating with assistive technology such as a screen reader can use the title attribute on an <iframe> to label its content. The title's value should concisely describe the embedded content: <iframe title="Wikipedia page for Avocados...
<img>: The Image Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › img
sibility. <img src="https://udn.realityripple.com/samples/6c/98485e5d8a.png" alt="MDN logo"> Image link This example builds upon the previous one, showing how to turn the image into a link. To do so, nest the <img> tag inside the <a>. You should made the alternative text describe the resource the link is pointing to, as if you were using a text link instead. <a href="https://developer.mozilla.org"> <img src="https://udn.realityripple.com/samples/6c/98485e5d8a.png" alt="Visit the MDN site"> </a> Using the srcset attribute In this example we include a srcset attribute with a reference to a high-resolution version of the logo; this will be loaded instead of the src image on high-resolution devices. The image referenced in the src attribute is counted as a 1x candidate in use...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
ur selection.`; listItem.appendChild(para); } list.appendChild(listItem); } } } The custom validFileType() function takes a File object as a parameter, then uses Array.prototype.includes() to check if any value in the fileTypes matches the file's type property. If a match is found, the function returns true. If no match is found, it returns false. ...
<input type="search"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › search
our code to update the search results in real time as the user edits the search. If incremental is not specified, the search event is only sent when the user explicitly initiates a search (such as by pressing the Enter or Return key while editing the field). The search event is rate-limited so that it is not sent more more frequently than an implementation-defined interval. mozactionhint A Mozilla extension, supported by Firefox for Android, which provides a hint as to what sort of action will be taken if the user presses the Enter or Return key while editing the field. This information is used to decide what kind of label to use on the Enter key on the virtual keyboard. Note: This has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. To see the s...
<input type="tel"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › tel
ly. autocorrect A Safari extension, the autocorrect attribute is a string which indicates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. mozactionhint A Mozilla extension, supported by Firefox for Android, which provides a hint as to what sort of action will be taken if the user presses the Enter or Return key while editing the field. This information is used to decide what kind of label to use on the Enter key on the virtual keyboard. Note: This has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. To see the s...
<input type="text"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › text
autocorrect A Safari extension, the autocorrect attribute is a string which indicates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. mozactionhint A Mozilla extension, supported by Firefox for Android, which provides a hint as to what sort of action will be taken if the user presses the Enter or Return key while editing the field. This information is used to decide what kind of label to use on the Enter key on the virtual keyboard. Note: This has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. To see the s...
<menuitem> - HTML: Hypertext Markup Language
Web › HTML › Element › menuitem
of commands that can be toggled as radio buttons. Example HTML content <!-- A <div> element with a context menu --> <div contextmenu="popup-menu"> Right-click to see the adjusted context menu </div> <menu type="context" id="popup-menu"> <menuitem type="checkbox" checked>Checkbox</menuitem> <hr> <menuitem type="command" label="This command does nothing" icon="https://developer.cdn.mozilla.net/static/img/favicon144.png"> Commands don't render their contents. </menuitem> <menuitem type="command" label="This command has javascript" onclick="alert('command clicked')"> Commands don't render their contents. </menuitem> <hr> <menuitem type="radio" radiogroup="group1">Radio Button 1</menuitem> <menuitem type="radio" radiogroup="group1">Radio Button 2</menuitem> </menu>...
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
Web › HTML › Element › meta
provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value. See standard metadata names for details about the set of standard metadata names defined in the HTML specification. Examples <meta charset="utf-8"> <!-- Redirect page after 3 seconds --> <meta http-equiv="refresh" content="3;url=https://www.mozilla.org"> Specifications Specification Status Comment HTML Living StandardThe definition of '<meta>' in that specification. Living Standard ...
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
Web › HTML › Element › noframes
ld be presented using the <iframe> element. Attributes Like all other HTML elements, this element supports the global attributes. It has no other attributes available. Example In this example, we see a frameset with two frames. In addition, <noframes> is used to present an explanatory message if the user agent doesn't support frames. <frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/HTML/Element/frameset" /> <frame src="https://developer.mozilla.org/en/HTML/Element/frame" /> <noframes><p>It seems your browser does not support frames or is configured to not allow them.</p></noframes> </frameset> Specifications Specification Status Comment HTML5The definition of 'noframes' in that specification. Recommendation HTML 4.
<noscript> - HTML: Hypertext Markup Language
Web › HTML › Element › noscript
ad> element (but only for an HTML document), here again if there are no ancestor <noscript> element. Implicit ARIA role No corresponding role Permitted ARIA roles No role permitted DOM interface HTMLElement Attributes This element only includes the global attributes. Examples <noscript> <!-- anchor linking to external file --> <a href="https://www.mozilla.com/">External Link</a> </noscript> <p>Rocks!</p> Result with scripting enabled Rocks! Result with scripting disabled External Link Rocks! Specifications Specification Status Comment HTML Living StandardThe definition of '<noscript>' in that specification. Living Standard HTML5The definition of '<noscript>' in that specification. Recommendati...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
Web › HTML › Element › q
side a <q> element. A style rule may be needed to add quotation marks in older browsers. Attributes This element includes the global attributes. cite The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote. Example <p>According to Mozilla's website, <q cite="https://www.mozilla.org/about/history/details/">Firefox 1.0 was released in 2004 and became a big success.</q></p> Specifications Specification Status Comment HTML Living StandardThe definition of '<q>' in that specification. Living Standard HTML5The definition of '<q>' in that specification. Recommendation ...
<select>: The HTML Select element - HTML: Hypertext Markup Language
Web › HTML › Element › select
fied), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0. Note: According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox. Usage notes Selecting multiple options On a desktop computer, there are a number of ways to select multiple options in a <select> element with a multiple attribute: Mouse users can hold the Ctrl, Command, or Shift keys (depending on what makes sense for your operating system) and then click multiple options to select/desele...
Using the application cache - HTML: Hypertext Markup Language
lear the offline cache by selecting "Clear browsing data..." in the preferences or by visiting chrome://appcache-internals/. Safari has a similar "Empty cache" setting in its preferences but a browser restart may also be required. In Firefox, the offline cache data is stored separately from the Firefox profile--next to the regular disk cache: Windows Vista/7: C:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<salt>.<profile name>\OfflineCache Mac/Linux: /Users/<username>/Library/Caches/Firefox/Profiles/<salt>.<profile name>/OfflineCache In Firefox the current status of the offline cache can be inspected on the about:cache page (under the "Offline cache device" heading). The offline cache can be cleared for each site separately using the "Remove..." button in Tools -> Options -> Ad...
Common MIME types - HTTP
application/xhtml+xml .xls Microsoft Excel application/vnd.ms-excel .xlsx Microsoft Excel (OpenXML) application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xml XML application/xml if not readable from casual users (RFC 3023, section 3) text/xml if readable from casual users (RFC 3023, section 3) .xul XUL application/vnd.mozilla.xul+xml .zip ZIP archive application/zip .3gp 3GPP audio/video container video/3gpp audio/3gpp if it doesn't contain video .3g2 3GPP2 audio/video container video/3gpp2 audio/3gpp2 if it doesn't contain video .7z 7-zip archive application/x-7z-compressed ...
MIME types (IANA media types) - HTTP
tion="http://localhost:8000/" method="post" enctype="multipart/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 -----------------...
Using HTTP cookies - HTTP
Web › HTTP › Cookies
Domain attribute specifies which hosts are allowed to receive the cookie. If unspecified, it defaults to the same origin that set the cookie, excluding subdomains. If Domain is specified, then subdomains are always included. Therefore, specifying Domain is less restrictive than omitting it. However, it can be helpful when subdomains need to share information about a user. For example, if Domain=mozilla.org is set, then cookies are available on subdomains like developer.mozilla.org. Path attribute The Path attribute indicates a URL path that must exist in the requested URL in order to send the Cookie header. The %x2F ("/") character is considered a directory separator, and subdirectories match as well. For example, if Path=/docs is set, these paths match: /docs /docs/Web/ /docs/Web/HTTP ...
Content-Security-Policy - HTTP
Specifications Specification Status Comment Content Security Policy Level 3 Working Draft Adds manifest-src, navigate-to, report-to, strict-dynamic, worker-src. Undeprecates frame-src. Deprecates report-uri in favor if report-to. Mixed Content Candidate Recommendation Adds block-all-mixed-content. ...
Host - HTTP
Web › HTTP › Headers › Host
de may be sent to any HTTP/1.1 request message that lacks a Host header field or that contains more than one. ...
Origin - HTTP
Web › HTTP › Headers › Origin
irectives <scheme> The protocol that is used. Usually it is the HTTP protocol or its secured version, HTTPS. <hostname> The domain name of the server (for virtual hosting) or the IP. <port> Optional TCP port number on which the server is listening. If no port is given, the default port for the service requested (e.g., "80" for an HTTP URL) is implied. Examples Origin: https://developer.mozilla.org Specifications Specification Comment RFC 6454, section 7: Origin The Web Origin Concept FetchThe definition of 'Origin header' in that specification. Supplants the Origin header as defined in RFC6454. ...
Referer - HTTP
Web › HTTP › Headers › Referer
header Forbidden header name yes Syntax Referer: <url> Directives <url> An absolute or partial address of the previous web page from which a link to the currently requested page was followed. URL fragments (i.e. "#section") and userinfo (i.e. "username:password" in "https://username:password@example.com/foo/bar/") are not included. Examples Referer: https://developer.mozilla.org/docs/Web/JavaScript Specifications Specification Title RFC 7231, section 5.5.2: Referer Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content ...
Timing-Allow-Origin - HTTP
llow-Origin: * Timing-Allow-Origin: <origin>[, <origin>]* Directives * The server may specify "*" as a wildcard, thereby allowing any origin to see timing resources. <origin> Specifies a URI that may see the timing resources. You can specify multiple origins, separated by commas. Examples To allow any resource to see timing resources: Timing-Allow-Origin: * To allow https://developer.mozilla.org to see timing resources, you can specify: Timing-Allow-Origin: https://developer.mozilla.org Specifications Specification Status Comment Resource Timing Level 3The definition of 'Timing-Allow-Origin' in that specification. Editor's Draft Initial definition. ...
Trailer - HTTP
Web › HTTP › Headers › Trailer
hentication headers (e.g., Authorization or Set-Cookie), or Content-Encoding, Content-Type, Content-Range, and Trailer itself. Examples Chunked transfer encoding using a trailing header In this example, the Expires header is used at the end of the chunked message and serves as a trailing header. ...
Transfer-Encoding - HTTP
hunked encoding is useful when larger amounts of data are sent to the client and the total size of the response may not be known until the request has been fully processed. ...
HTTP Messages - HTTP
Web › HTTP › Messages
ollowed by a '?' and query string. This is the most common form, known as the origin form, and is used with GET, POST, HEAD, and OPTIONS methods. POST / HTTP/1.1 GET /background.png HTTP/1.0 HEAD /test.html?query=alibaba HTTP/1.1 OPTIONS /anypage.html HTTP/1.0 A complete URL, known as the absolute form, is mostly used with GET when connected to a proxy. GET http://developer.mozilla.org/docs/Web/HTTP/Messages HTTP/1.1 The authority component of a URL, consisting of the domain name and optionally the port (prefixed by a ':'), is called the authority form. It is only used with CONNECT when setting up an HTTP tunnel. CONNECT developer.mozilla.org:80 HTTP/1.1 The asterisk form, a simple asterisk ('*') is used with OPTIONS, representing the server as a whole. OPTION...
Functions - JavaScript
s) { return theArgs.map(x => multiplier * x); } var arr = multiply(2, 1, 2, 3); console.log(arr); // [2, 4, 6] Arrow functions An arrow function expression (previously, and now incorrectly known as fat arrow function) has a shorter syntax compared to function expressions and does not have its own this, arguments, super, or new.target. Arrow functions are always anonymous. See also this hacks.mozilla.org blog post: "ES6 In Depth: Arrow functions". Two factors influenced the introduction of arrow functions: shorter functions and non-binding of this. Shorter functions In some functional patterns, shorter functions are welcome. Compare: var a = [ 'Hydrogen', 'Helium', 'Lithium', 'Beryllium' ]; var a2 = a.map(function(s) { return s.length; }); console.log(a2); // logs [8, 6, 7, 9] ...
Text formatting - JavaScript
lues (UTF-16 code units). Each element in the String occupies a position in the String. The first element is at index 0, the next at index 1, and so on. The length of a String is the number of elements in it. You can create strings using string literals or string objects. CAUTION: if you edit this page, do not include any characters above U+FFFF, until MDN bug 857438 is fixed ( https://bugzilla.mozilla.org/show_bug.cgi?id=857438 ). String literals You can create simple strings using either single or double quotes: 'foo' "bar" More advanced strings can be created using escape sequences: Hexadecimal escape sequences The number after \x is interpreted as a hexadecimal number. '\xA9' // "(C)" Unicode escape sequences The Unicode escape sequences require at least four hexadecimal digits fo...
Memory Management - JavaScript
'y' variable is the second thing that has a reference to the object. x = 1; // Now, the object that was originally in 'x' has a unique reference // embodied by the 'y' variable. var z = y.a; // Reference to 'a' property of the object. // This object now has 2 references: one as a property, // the other as the 'z' variable. y = 'mozilla'; // The object that was originally in 'x' has now zero // references to it. It can be garbage-collected. // However its 'a' property is still referenced by // the 'z' variable, so it cannot be freed. z = null; // The 'a' property of the object originally in x // has zero references to it. It can be garbage collected.
Arrow function expressions - JavaScript
Two factors influenced the introduction of arrow functions: the need for shorter functions and the behavior of the this keyword. Shorter functions var elements = [ 'Hydrogen', 'Helium', 'Lithium', 'Beryllium' ]; // This statement returns the array: [8, 6, 7, 9] elements.map(function(element) { return element.length; }); // The regular function above can be written as the arrow...
Array.prototype.flat() - JavaScript
depth = 1; } for(const item of array) { if(Array.isArray(item) && depth > 0) { yield* flatten(item, depth - 1); } else { yield item; } } } const arr = [1, 2, [3, 4, [5, 6]]]; const flattened = [...flatten(arr, Infinity)]; // [1, 2, 3, 4, 5, 6] Please do not add polyfills on this article. ...
Array.prototype.flatMap() - JavaScript
] Note, however, that this is inefficient and should be avoided for large arrays: in each iteration, it creates a new temporary array that must be garbage-collected, and it copies elements from the current accumulator array into a new array instead of just adding the new elements to the existing array. Please do not add polyfills on this article. ...
Array.prototype.includes() - JavaScript
(e.g. array-like objects). The example below illustrates includes() method called on the function's arguments object. (function() { console.log(Array.prototype.includes.call(arguments, 'a')) // true console.log(Array.prototype.includes.call(arguments, 'd')) // false })('a','b','c') Please do not add polyfills on reference articles. For more details and discussion, see https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 Specifications Specification ECMAScript (ECMA-262)The definition of 'Array.prototype.includes' in that specification. ...
Array.prototype.sort() - JavaScript
areFunction). If a and b are two elements being compared, then: If compareFunction(a, b) returns less than 0, sort a to an index lower than b (i.e. a comes first). If compareFunction(a, b) returns 0, leave a and b unchanged with respect to each other, but sorted with respect to all different elements. Note: the ECMAscript standard does not guarantee this behavior, thus, not all browsers (e.g. Mozilla versions dating back to at least 2003) respect this. If compareFunction(a, b) returns greater than 0, sort b to an index lower than a (i.e. b comes first). compareFunction(a, b) must always return the same value when given a specific pair of elements a and b as its two arguments. If inconsistent results are returned, then the sort order is undefined. So, the compare function has the following...
Date.prototype.toISOString() - JavaScript
Specifications Specification ECMAScript (ECMA-262)The definition of 'Date.prototype.toISOString' in that specification. ...
Error - JavaScript
V8 function that creates the stack property on an Error instance. Instance properties Error.prototype.message Error message. Error.prototype.name Error name. Error.prototype.description A non-standard Microsoft property for the error description. Similar to message. Error.prototype.number A non-standard Microsoft property for an error number. Error.prototype.fileName A non-standard Mozilla property for the path to the file that raised this error. Error.prototype.lineNumber A non-standard Mozilla property for the line number in the file that raised this error. Error.prototype.columnNumber A non-standard Mozilla property for the column number in the line that raised this error. Error.prototype.stack A non-standard Mozilla property for a stack trace. Instance methods Error.
JSON.stringify() - JavaScript
th would give the empty string as key and potentially an object as value), you will have to keep track of the iteration count (if it is beyond the first iteration, it is a genuine empty string key). Example replacer, as a function function replacer(key, value) { // Filtering out properties if (typeof value === 'string') { return undefined; } return value; } var foo = {foundation: 'Mozilla', model: 'box', week: 45, transport: 'car', month: 7}; JSON.stringify(foo, replacer); // '{"week":45,"month":7}' Example replacer, as an array If replacer is an array, the array's values indicate the names of the properties in the object that should be included in the resulting JSON string. JSON.stringify(foo, ['week', 'month']); // '{"week":45,"month":7}', only keep "week" and "month" proper...
Object.fromEntries() - JavaScript
...
Promise.prototype.finally() - JavaScript
...
Proxy - JavaScript
// 3 A complete traps list example Now in order to create a complete sample traps list, for didactic purposes, we will try to proxify a non-native object that is particularly suited to this type of operation: the docCookies global object created by the "little framework" published on the document.cookie page. /* var docCookies = ... ...
String.prototype.link() - JavaScript
the link() method to create an HTML snippet for a hypertext link. The returned string can then be added to the document via document.write() or element.innerHTML. Links created with the link() method become elements in the links array of the document object. See document.links. Examples Using link() The following example displays the word "MDN" as a hypertext link that returns the user to the Mozilla Developer Network. var hotText = 'MDN'; var URL = 'https://developer.mozilla.org/'; console.log('Click to return to ' + hotText.link(URL)); // Click to return to <a href="https://developer.mozilla.org/">MDN</a> Specifications Specification ECMAScript (ECMA-262)The definition of 'String.prototype.link' in that specification. ...
String.prototype.substr() - JavaScript
return function(start, length) { // call the original method return substr.call(this, // did we get a negative start, calculate how much it is from the beginning of the string // adjust the start parameter for negative value start < 0 ? ...
decodeURI() - JavaScript
"malformed URI sequence") exception when encodedURI contains invalid character sequences. Description Replaces each escape sequence in the encoded URI with the character that it represents, but does not decode escape sequences that could not have been introduced by encodeURI. The character "#" is not decoded from escape sequences. Examples Decoding a Cyrillic URL decodeURI('https://developer.mozilla.org/ru/docs/JavaScript_%D1%88%D0%B5%D0%BB%D0%BB%D1%8B'); // "https://developer.mozilla.org/ru/docs/JavaScript_?????" Catching errors try { var a = decodeURI('%E0%A4%A'); } catch(e) { console.error(e); } // URIError: malformed URI sequence Specifications Specification ECMAScript (ECMA-262)The definition of 'decodeURI' in that specification. ...
escape() - JavaScript
Using escape escape('abc123'); // "abc123" escape('aou'); // "%E4%F6%FC" escape('c'); // "%u0107" // special characters escape('@*_+-./'); // "@*_+-./" Specifications Specification ECMAScript (ECMA-262)The definition of 'escape' in that specification. Please do not add polyfills to reference pages. For more information, see https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 ...
instanceof - JavaScript
with multiple frames or windows, and passing objects from one context to another via functions, this will be a valid and strong issue. For instance, you can securely check if a given object is, in fact, an Array using Array.isArray(myObj) For example, checking if a Nodes is a SVGElement in a different context, you can use myNode instanceof myNode.ownerDocument.defaultView.SVGElement. Note for Mozilla developers: In code using XPCOM, instanceof has special effect: obj instanceof xpcomInterface (e.g. Components.interfaces.nsIFile) calls obj.QueryInterface(xpcomInterface) and returns true if QueryInterface succeeded. A side effect of such call is that you can use xpcomInterface's properties on obj after a successful instanceof test. Unlike standard JavaScript globals, the test obj instanceof x...
Autoplay guide for media and Web Audio APIs - Web media technologies
showPlayButton(). Any other errors are handled as appropriate. Autoplay using the Web Audio API In the Web Audio API, a web site or app can start playing audio using the start() method on a source node linked to the AudioContext. Doing so outside the context of handling a user input event is subject to autoplay rules. More content will come soon; autoplay blocking is still being worked on at Mozilla. If others have it already, they are welcome to pitch in with this section... The autoplay feature policy In addition to the browser-side management and control over autoplay functionality described above, a web server can also express its willingness to allow autoplay to function. The HTTP Feature-Policy header's autoplay directive is used to control which domains, if any, can be used to autop...
Web video codec guide - Web media technologies
No Supporting/Maintaining organization ITU / MPEG Specifications http://www.itu.int/rec/T-REC-H.265 https://www.iso.org/standard/69668.html Licensing Proprietary; confirm your compliance with the licensing requirements. Note that multiple patent pools may apply. [1] Internet Explorer and Edge only supports HEVC on devices with a hardware codec. [2] Mozilla will not support HEVC while it is encumbered by patents. MP4V-ES The MPEG-4 Video Elemental Stream (MP4V-ES) format is part of the MPEG-4 Part 2 Visual standard. While in general, MPEG-4 part 2 video is not used by anyone because of its lack of compelling value related to other codecs, MP4V-ES does have some usage on mobile. MP4V is essentially H.263 encoding in an MPEG-4 container. Its primar...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
st response = await fetch('./vapidPublicKey'); const vapidPublicKey = await response.text(); const convertedVapidKey = urlBase64ToUint8Array(vapidPublicKey); The app fetches the server's public key and converts the response to text; then it needs to be converted to a Uint8Array (to support Chrome). To learn more about VAPID keys you can read the Sending VAPID identified WebPush Notifications via Mozilla's Push Service blog post. The app can now use the PushManager to subscribe the new user. There are two options passed to the PushManager.subscribe() method -- the first is userVisibleOnly: true, which means all the notifications sent to the user will be visible to them, and the second one is the applicationServerKey, which contains our successfully acquired and converted VAPID key. return regis...
Mobile first - Progressive web apps (PWAs)
en of many resources that they don't need. See below for more details. A simple example To demonstrate the concepts, I wanted to cover in this article, I created a very simple app containing a nav menu, heading and single column of text. You can see my mobile first example running live, or grab the code to play with it on Github. To make my simple example I created a sample app structure from a Mozilla Mortar template. I installed the Volo automation tool by running the following on the command line sudo npm install -g volo (You'll also need to get Node.js too if you don't already have it) I then created my sample project using volo create myapp mozilla/mortar-app-stub This creates a sample project inside a directory called myapp. The app's code files are inside the www folder. Volo has a ...
divisor - SVG: Scalable Vector Graphics
Web › SVG › Attribute › divisor
g viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolveMatrix1" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="1 2 0 0 0 0 0 0 -1" divisor="1"/> </filter> <filter id="convolveMatrix2" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="1 2 0 0 0 0 0 0 -1" divisor="8"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix2); transform:translateX(220px);"/> </svg> Usage notes Value <number> Default value Sum of all values in kernelMat...
href - SVG: Scalable Vector Graphics
Web › SVG › Attribute › href
ow rendered obsolete by the href attribute. Fifteen elements are using this attribute: <a>, <animate>, <animateMotion>, <animateTransform>, <discard>, <feImage>, <image>, <linearGradient>, <mpath>, <pattern>, <radialGradient>, <script>, <set>, <textPath>, and <use> html, body, svg { height: 100%; } <svg viewBox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><text x="10" y="25">MDN Web Docs</text></a> </svg> In SVG a For <a>, href defines the location of the referenced object, expressed as a URL reference. Value <url> Default value None Animatable Yes animate, animateMotion, animateTransform, set For the <animate>, <animateMotion>, <animateTransform>, and <set>, href defines a URL referring to ...
k1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k1
mlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translateX(220px);" /> </svg> Usage notes Value <number> Default value 0 Animatable Yes S...
k2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k2
mlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="1" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="10" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translateX(220px);" /> </svg> Usage notes Value <number> Default value 0 Animatable Yes S...
k3 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k3
mlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="1" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="10" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translateX(220px);" /> </svg> Usage notes Value <number> Default value 0 Animatable Yes S...
k4 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k4
ns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <feComposite in2="SourceGraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0.3" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/MDN.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translateX(220px);" /> </svg> Usage notes Value <number> Default value 0 Animatable Yes S...
kernelMatrix - SVG: Scalable Vector Graphics
height: 100%; } <svg viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolveMatrix1" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="1 1 0 0 0 0 0 0 -1"/> </filter> <filter id="convolveMatrix2" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="-1 0 0 0 0 0 0 0 1"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix2); transform:translateX(220px);"/> </svg> Usage notes Value <list of numbers> Default value None Animata...
mode - SVG: Scalable Vector Graphics
Web › SVG › Attribute › mode
flood-opacity="1"/> <feBlend in="SourceGraphic" in2="floodFill" mode="multiply"/> </filter> <filter id="blending2" x="0" y="0" width="100%" height="100%"> <feFlood result="floodFill" x="0" y="0" width="100%" height="100%" flood-color="seagreen" flood-opacity="1"/> <feBlend in="SourceGraphic" in2="floodFill" mode="color-dodge"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#blending1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#blending2); transform:translateX(220px);"/> </svg> Usage notes Value <blend-mode> Default value normal Animatable Yes ...
preserveAlpha - SVG: Scalable Vector Graphics
0" xmlns="http://www.w3.org/2000/svg"> <filter id="convolveMatrix1" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="1 -1 2 0 0 0 0 0 -2" preserveAlpha="true"/> </filter> <filter id="convolveMatrix2" x="0" y="0" width="100%" height="100%"> <feConvolveMatrix kernelMatrix="1 -1 2 0 0 0 0 0 -2" preserveAlpha="false"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolveMatrix2); transform:translateX(220px);"/> </svg> Usage notes Default value false Value true | false Animatable ...
target - SVG: Scalable Vector Graphics
Web › SVG › Attribute › target
., a browser tab or an (X)HTML iframe or object element) into which a document is to be opened when the link is activated: Only one element is using this attribute: <a> html, body, svg { height: 100%; } text { font: 20px Arial, Helvetica, sans-serif; fill: blue; text-decoration: underline; } <svg viewBox="0 0 300 120" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org" target="_self"> <text x="0" y="20">Open link within iframe</text> </a> <a href="https://developer.mozilla.org" target="_blank"> <text x="0" y="60">Open link in new tab or window</text> </a> <a href="https://developer.mozilla.org" target="_top"> <text x="0" y="100">Open link in this tab or window</text> </a> </svg> Usage notes Value _self | _parent | _to...
xlink:href - SVG: Scalable Vector Graphics
Value <iri> Default value None Animatable Yes altGlyph For <altGlyph>, xlink:href defines the reference either to a <glyph> element in an SVG document fragment or to an <altGlyphDef> element. If the reference is to a <gl...
Compatibility sources - SVG: Scalable Vector Graphics
The following sources are used for the compatibility tables on SVG elements and attributes: https://developer.mozilla.org/En/SVG_in_Firefox together with its revision history for Firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for WebKit, Safari and Chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for Opera >= 9, http://www.opera.com/docs/specs/opera8/ for Opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on IE9 support status The SVG support charts at Codedread.com for basic checks against the W3C test suite Wikipedia for basic hints, not normative ...
<feBlend> - SVG: Scalable Vector Graphics
Web › SVG › Element › feBlend
Working Draft Outsourced blend modes to Compositing and Blending Level 1 Scalable Ve...
<image> - SVG: Scalable Vector Graphics
Web › SVG › Element › image
is attribute is required. href and xlink:href: Points at a URL for the image file. preserveAspectRatio: Controls how the image is scaled. DOM Interface <image> implements the SVGImageElement interface. Example Basic rendering of a PNG image in SVG: SVG <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="200" width="200"/> </svg> Result Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of '<image>' in that specification. Candidate Recommendation Allows omitting height and width Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of '<image>' ...
Linking - SVG: Scalable Vector Graphics
Web › SVG › Linking
The target attribute on the SVG <a> element doesn't work in Mozilla Firefox 1.5. When SVG documents are embedded within a parent HTML document using the tag: page1.html: <html> <body> <p>This is a SVG button:</p> <object width="100" height="50" type="image/svg+xml" data="button.svg"/> </body> </html> button.svg: <?xml version="1.1" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <a xlink:href="page2.html" target="_top"> <g> <!-- button graphical elements here --> </g> </a> </svg> The specification says that the browser should navigate to the HTML document page2.html when the button graphics are clicked. However, target does not work with Mozilla's implementation of the SVG <a> element in Firefox 1.5. (The problem will be fixed in Firefox 2.0.) An...
Example - SVG: Scalable Vector Graphics
p>A swarm of motes, governed by two simple principles. First, each mote tries to move towards the cursor, and second each mote tries to move away from the average mote position. Combined, we get this very natural looking behavior. </p> <p> This is done completely in W3C Standards-XHTML, SVG and JavaScript-no flash or any vendor specific extensions. Currently, this will work in Mozilla Firefox version 1.5 and above. </p> <div> (C) 2006 <a id='emailme' href='#'>Nick Johnson</a> <script type='text/javascript'> <![CDATA[ // foil spam bots var email = '@riovia.net'; email ='nick' + email; document.getElementById('emailme').href = 'mailto:'+email; ]]> </script> This software is free for you to use in any way whatsoever, and comes with no warranty at...
Other Resources - SVG: Scalable Vector Graphics
Here is a list of additional resources on SVG: Mozilla SVG Resources SVG.org SVGBasics Tutorials W3C SVG Homepage SVG Wiki http://wiki.svg.org/index.php?title=..._Configuration I moved this from the Other Resources category, not sure why it's in other resources -Nickolay http://developer.mozilla.org/en/docs...%28external%29 ...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
Element implementation status A quick overview of the SVG 1.1 elements and the current status of the native support. ...
Specification Deviations - SVG: Scalable Vector Graphics
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. 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). However, there are two exceptions. Extending the 'class' attribute to apply to all S...
Other content in SVG - SVG: Scalable Vector Graphics
. The embedded picture becomes a normal SVG element. This means, that you can use clips, masks, filters, rotations and all other tools of SVG on the content: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"> <image x="90" y="-65" width="128" height="146" transform="rotate(45)" xlink:href="https://developer.mozilla.org/static/img/favicon144.png"/> </svg> ScreenshotLive sample Embedding arbitrary XML Since SVG is an XML application, you can of course always embed arbitrary XML anywhere in an SVG document. But then you have no means to define how the surrounding SVG should react on the content. Actually, in a conforming viewer it will react in no way at all, the data will simply be omitted. Therefore the ...
SVG In HTML Introduction - SVG: Scalable Vector Graphics
100 viewport. The preserveAspectRatio attribute specifies that the aspect ratio must be preserved by centering the picture in the available size, sizing to the maximum of the height or width and then cutting off any overflow. The style attribute pins the SVG element to the background of the form. Related Links Another SVG in HTML example: A swarm of motes Working example that works in both Mozilla and in Internet Explorer with Adobe's SVG Viewer installed. (For inline SVG to work in both Firefox and Internet Explorer it is necessary to serve documents with a different Content-Type to each browser. For this reason, if you're behind a proxy server that caches the page, the example wont work in the second browser you load it in because it will receive the wrong Content-Type.) ...
Tools for SVG - SVG: Scalable Vector Graphics
Mobile devices with Webkit-based browsers also support SVG. On older or smaller devices, chances are that SVG Tiny is supported. Inkscape URL: www.inkscape.org One of the most important tools for a graphics format is a decent drawing program. Inkscape offers state-of-the-art vector drawing, and it's open source. ...
Index - XPath
Web › XPath › Index
ferenced in the DTD of the source document. 55 Index Index, Reference, XPath, XSLT Found 57 pages: 56 Introduction to using XPath in JavaScript Add-ons, DOM, Extensions, JavaScript, Transforming_XML_with_XSLT, Web Development, XML, XPath, XSLT This document describes the interface for using XPath in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath, which means that XPath expressions can be run against both HTML and XML documents. 57 XPath snippets Example, Snippets, XML, XPath, XSLT This article provides some XPath code snippets. The snippets are functions you can use in the real world in your own code. ...
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
Or use a download tool, those usually tell the mime type. In Firefox 6 and forward, you can also use the official XSLT mimetype: application/xslt+xml. Namespace The XSLT 1.0 namespace is http://www.w3.org/1999/XSL/Transform. Older versions of IE used a different namespace. However these versions also used a draft version of XSLT which is incompatible with what eventually became the XSLT 1.0 specification. ...
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
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:import> - XSLT: Extensible Stylesheet Language Transformations
Web › XSLT › Element › import
lesheet. 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. ...
Introduction - XSLT: Extensible Stylesheet Language Transformations
and then add 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. ...
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
t() requires a second parameter, namely the document object that will own the generated fragment. If the generated fragment will be inserted into the current HTML document, passing in document is enough. Figure 2.1 : Creating an XML document From a String 'XML Soup' While you can use IE loadXML method to load a string containing XML you have to perform some tweaking and tuning to do the same in Mozilla. You must use the DomParser.no to create any document, as this is handled by the DomParser. var parser = new DOMParser(); var doc = parser.parseFromString(aStr, "text/xml"); Figure 3 : Performing the transformation var fragment = xsltProcessor.transformToFragment(xmlRef, document); ...
Resources - XSLT: Extensible Stylesheet Language Transformations
Resources Using the Mozilla JavaScript interface to XSL Transformations Mozilla.org's XSLT Project Page, which includes a frequently encountered issues section. MSDN: XSLT Concepts ...
Web technology for developers
t of tutorials to take you step-by-step through learning APIs, technologies, or broad topic areas. Developing Web applications Documentation for Web application developers; Web apps are true write-once, deploy anywhere apps for mobile, desktop, and Firefox OS. Code snippets This is a quick list of useful code snippets (small code samples) available for developers of extensions for the various Mozilla applications. Many of these samples can also be used in XULRunner applications, as well as in actual Mozilla code itself. View All... Web technology references Web APIs Reference material for each of the individual APIs that comprise the Web's powerful scriptability, including the DOM and all of the related APIs and interfaces you can use to build Web content and apps. HTML HyperText M...
Compiling from Rust to WebAssembly - WebAssembly
wasm-bindgen we want to depend on; in this case, that's any 0.2.z version (but not 0.3.0 or above). Building the package Now that we've got everything set up, let's build the package. Type this into your terminal: $ wasm-pack build This does a number of things (and they take a lot of time, especially the first time you run wasm-pack). To learn about them in detail, check out this blog post on Mozilla Hacks. In short, wasm-pack build: Compiles your Rust code to WebAssembly. Runs wasm-bindgen on that WebAssembly, generating a JavaScript file that wraps up that WebAssembly file into a module npm can understand. Creates a pkg directory and move that JavaScript file and your WebAssembly code into it. Reads your Cargo.toml and produces an equivalent package.json. Copies your README.md (if yo...
UDN Web Docs
...