Skip to content

Commit

Permalink
convert files to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumyra committed Oct 25, 2021
1 parent c34d5ff commit 2aaa075
Show file tree
Hide file tree
Showing 132 changed files with 13,365 additions and 15,154 deletions.
2,980 changes: 1,498 additions & 1,482 deletions files/en-us/mozilla/firefox/experimental_features/index.md

Large diffs are not rendered by default.

70 changes: 33 additions & 37 deletions files/en-us/mozilla/firefox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,62 @@ tags:
- Landing
- Mozilla
---
<div>{{FirefoxSidebar}}</div>
{{FirefoxSidebar}}

<p><a href="https://www.mozilla.org/firefox/">Firefox</a> is Mozilla's popular Web browser, available for multiple platforms including Windows, macOS, and Linux on the desktop and all Android and iOS mobile devices. With broad compatibility, the latest in Web technologies, and powerful development tools, Firefox is a great choice for both Web developers and end users.</p>
[Firefox](https://www.mozilla.org/firefox/) is Mozilla's popular Web browser, available for multiple platforms including Windows, macOS, and Linux on the desktop and all Android and iOS mobile devices. With broad compatibility, the latest in Web technologies, and powerful development tools, Firefox is a great choice for both Web developers and end users.

<p>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.</p>
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.

<p>Learn how to create add-ons for <a class="external external-icon" href="https://www.mozilla.org/firefox/">Firefox</a>, how to develop and build Firefox itself, and how the internals of Firefox and its subprojects work.</p>
Learn how to create add-ons for [Firefox](https://www.mozilla.org/firefox/), how to develop and build Firefox itself, and how the internals of Firefox and its subprojects work.

<h2 id="Key_resources">Key resources</h2>
## Key resources

<dl>
<dt>Developer release notes</dt>
<dd><a href="/en-US/docs/Mozilla/Firefox/Releases">Developer-focused release notes</a>; learn what new capabilities for both Web sites and add-ons arrive in each version of Firefox.</dd>
<dt>Project documentation</dt>
<dd>Get detailed information about <a href="/en-US/docs/Mozilla">the internals of Firefox</a> and its build system, so you can find your way around in the code.</dd>
<dt>Developer guide</dt>
<dd>Our <a href="https://firefox-source-docs.mozilla.org/contributing/index.html">developer guide</a> provides details on how to get and compile the Firefox source code, how to find your way around, and how to contribute to the project.</dd>
</dl>
- Developer release notes
- : [Developer-focused release notes](/en-US/docs/Mozilla/Firefox/Releases); learn what new capabilities for both Web sites and add-ons arrive in each version of Firefox.
- Project documentation
- : Get detailed information about [the internals of Firefox](/en-US/docs/Mozilla) and its build system, so you can find your way around in the code.
- Developer guide
- : Our [developer guide](https://firefox-source-docs.mozilla.org/contributing/index.html) provides details on how to get and compile the Firefox source code, how to find your way around, and how to contribute to the project.

<h2 id="Firefox_channels">Firefox channels</h2>
## Firefox channels

<p>Firefox is available in five <strong>channels</strong>.</p>
Firefox is available in five **channels**.

<h3 id="Firefox_Nightly">Firefox Nightly</h3>
### Firefox Nightly

<p>Each night we build Firefox from the latest code in <a href="https://hg.mozilla.org/mozilla-central/">mozilla-central</a>. These builds are for Firefox developers or those who want to try out the very latest cutting edge features while they're still under active development.</p>
Each night we build Firefox from the latest code in [mozilla-central](https://hg.mozilla.org/mozilla-central/). These builds are for Firefox developers or those who want to try out the very latest cutting edge features while they're still under active development.

<p><a href="https://nightly.mozilla.org/">Download Firefox Nightly</a></p>
[Download Firefox Nightly](https://nightly.mozilla.org/)

<h3 id="Firefox_Developer_Edition">Firefox Developer Edition</h3>
### Firefox Developer Edition

<p>This is a version of Firefox tailored for developers. Firefox Developer Edition has all the latest developer tools that have reached beta. We also add some extra features for developers that are only available in this channel. It uses its own path and profile, so that you can run it alongside Release or Beta Firefox.</p>
This is a version of Firefox tailored for developers. Firefox Developer Edition has all the latest developer tools that have reached beta. We also add some extra features for developers that are only available in this channel. It uses its own path and profile, so that you can run it alongside Release or Beta Firefox.

<p><a href="https://www.mozilla.org/firefox/developer/">Download Firefox Developer Edition</a></p>
[Download Firefox Developer Edition](https://www.mozilla.org/firefox/developer/)

<h3 id="Firefox_Beta">Firefox Beta</h3>
### Firefox Beta

<p>Every four weeks, we take the features that are stable enough, and create a new version of Firefox Beta. Firefox Beta builds are for Firefox enthusiasts to test what's destined to become the next released Firefox version.</p>
Every four weeks, we take the features that are stable enough, and create a new version of Firefox Beta. Firefox Beta builds are for Firefox enthusiasts to test what's destined to become the next released Firefox version.

<p><a href="https://www.mozilla.org/firefox/channel/#beta">Download Firefox Beta</a></p>
[Download Firefox Beta](https://www.mozilla.org/firefox/channel/#beta)

<h3 id="Firefox">Firefox</h3>
### Firefox

<p>After stabilizing for another four weeks in Beta, we're ready to ship the new features to hundreds of millions of users in a new release version of Firefox.</p>
After stabilizing for another four weeks in Beta, we're ready to ship the new features to hundreds of millions of users in a new release version of Firefox.

<p><a href="https://www.mozilla.org/firefox/channel/#firefox">Download Firefox</a></p>
[Download Firefox](https://www.mozilla.org/firefox/channel/#firefox)

<h3 id="Firefox_Extended_Support_Release_ESR">Firefox Extended Support Release (ESR)</h3>
### Firefox Extended Support Release (ESR)

<p>Firefox ESR is the long-term support edition of Firefox for desktop for use by organizations including schools, universities, businesses and others who need extended support for mass deployments.</p>
Firefox ESR is the long-term support edition of Firefox for desktop for use by organizations including schools, universities, businesses and others who need extended support for mass deployments.

<p><a href="https://www.mozilla.org/firefox/organizations/all/">Download Firefox ESR</a></p>
[Download Firefox ESR](https://www.mozilla.org/firefox/organizations/all/)

<h2 id="Contents">Contents</h2>
## Contents

<p>{{LandingPageListSubpages}}</p>
{{LandingPageListSubpages}}

<h2 id="See_also">See also</h2>
## See also

<ul>
<li><a href="https://mail.mozilla.org/listinfo/firefox-dev">Mailing list</a></li>
<li><a href="https://wiki.mozilla.org/Release_Management/Calendar">Release schedule</a></li>
</ul>
- [Mailing list](https://mail.mozilla.org/listinfo/firefox-dev)
- [Release schedule](https://wiki.mozilla.org/Release_Management/Calendar)
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,22 @@ tags:
- Extensions
- XUL
---
<div>{{FirefoxSidebar}}</div>
{{FirefoxSidebar}}

<p>This page contains a list of changes in <a href="/en-US/docs/Mozilla/Firefox/Releases/1.5">Firefox 1.5</a>, affecting XUL developers.</p>
This page contains a list of changes in [Firefox 1.5](/en-US/docs/Mozilla/Firefox/Releases/1.5), affecting XUL developers.

<h3 id="Specific_Changes">Specific Changes</h3>
### Specific Changes

<ul>
<li><a href="/en-US/docs/Tree_Widget_Changes">Tree Widget Changes</a></li>
<li><a href="/en-US/docs/International_characters_in_XUL_JavaScript">International characters in XUL JavaScript</a> (only affects extensions with JavaScript files containing non-ASCII characters)</li>
<li><a href="/en-US/docs/XMLHttpRequest_changes_for_Gecko1.8">XMLHttpRequest changes</a></li>
<li><a href="/en-US/docs/XUL_Changes_for_Firefox_1.5">XUL Changes for Firefox 1.5</a></li>
<li><a href="/en-US/docs/XPCNativeWrapper">XPCNativeWrappers</a> are on by default, and the behavior changed somewhat compared to 1.0.x</li>
<li>A simpler method of <a href="/en-US/docs/Chrome_Registration">Chrome Registration</a> deprecates contents.rdf.</li>
<li>For overlayed context menus: the function <code>gContextMenu.linkURL()</code> has been renamed to <code>gContextMenu.getLinkURL()</code>, and <code>linkURL</code> is now a property. To use it in a backwards-compatible way:<br>
<code>url = 'getLinkURL' in gContextMenu ? gContextMenu.getLinkURL() : gContextMenu.linkURL();</code></li>
</ul>
- [Tree Widget Changes](/en-US/docs/Tree_Widget_Changes)
- [International characters in XUL JavaScript](/en-US/docs/International_characters_in_XUL_JavaScript) (only affects extensions with JavaScript files containing non-ASCII characters)
- [XMLHttpRequest changes](/en-US/docs/XMLHttpRequest_changes_for_Gecko1.8)
- [XUL Changes for Firefox 1.5](/en-US/docs/XUL_Changes_for_Firefox_1.5)
- [XPCNativeWrappers](/en-US/docs/XPCNativeWrapper) are on by default, and the behavior changed somewhat compared to 1.0.x
- A simpler method of [Chrome Registration](/en-US/docs/Chrome_Registration) deprecates contents.rdf.
- For overlayed context menus: the function `gContextMenu.linkURL()` has been renamed to `gContextMenu.getLinkURL()`, and `linkURL` is now a property. To use it in a backwards-compatible way:
`url = 'getLinkURL' in gContextMenu ? gContextMenu.getLinkURL() : gContextMenu.linkURL();`

<h3 id="Other_Information">Other Information</h3>
### Other Information

<ul>
<li><a href="/en-US/docs/Using_nsIXULAppInfo">How to check application's version using nsIXULAppInfo</a></li>
<li><a href="http://kb.mozillazine.org/Dev_:_Extensions_:_Cross-Version_Compatibility_Techniques">MozillaZine</a></li>
</ul>
- [How to check application's version using nsIXULAppInfo](/en-US/docs/Using_nsIXULAppInfo)
- [MozillaZine](http://kb.mozillazine.org/Dev_:_Extensions_:_Cross-Version_Compatibility_Techniques)
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,56 @@ slug: Mozilla/Firefox/Releases/1.5/Changing_the_priority_of_HTTP_requests
tags:
- HTTP
---
<div>{{FirefoxSidebar}}</div>
{{FirefoxSidebar}}

### Introduction

<h3 id="Introduction">Introduction</h3>
In [Firefox 1.5](/en-US/docs/Mozilla/Firefox/Releases/1.5) (Gecko 1.8), an API was added to support changing the priority of [HTTP](/en-US/docs/Web/HTTP) requests. Prior to this, there was no way to directly indicate that a request was of a different priority. The API is defined in [nsISupportsPriority](/en-US/docs/nsISupportsPriority), but is defined in very generic terms so that any object can implement this interface to enable the concept of priority. This article deals specifically with using that interface to change the priority of HTTP requests.

<p>In <a href="/en-US/docs/Mozilla/Firefox/Releases/1.5">Firefox 1.5</a> (Gecko 1.8), an API was added to support changing the priority of <a href="/en-US/docs/Web/HTTP">HTTP</a> requests. Prior to this, there was no way to directly indicate that a request was of a different priority. The API is defined in <a href="/en-US/docs/nsISupportsPriority">nsISupportsPriority</a>, but is defined in very generic terms so that any object can implement this interface to enable the concept of priority. This article deals specifically with using that interface to change the priority of HTTP requests.</p>
At the time of this writing, changing the priority of an HTTP request only affects the order in which connection attempts are made. This means that the priority only has an effect when there are more connections (to a server) than are allowed.

<p>At the time of this writing, changing the priority of an HTTP request only affects the order in which connection attempts are made. This means that the priority only has an effect when there are more connections (to a server) than are allowed.</p>
The examples in this document are all written in [JavaScript](/en-US/docs/Web/JavaScript) using [XPCOM](/en-US/docs/XPCOM).

<p>The examples in this document are all written in <a href="/en-US/docs/Web/JavaScript">JavaScript</a> using <a href="/en-US/docs/XPCOM">XPCOM</a>.</p>
### Using the API

<h3 id="Using_the_API">Using the API</h3>
It should be noted that the value of the `priority` attribute follows UNIX conventions, with smaller numbers (including negative numbers) having higher priority.

<p>It should be noted that the value of the <code>priority</code> attribute follows UNIX conventions, with smaller numbers (including negative numbers) having higher priority.</p>
#### Accessing priority from an nsIChannel

<h4 id="Accessing_priority_from_an_nsIChannel">Accessing priority from an nsIChannel</h4>
To change the priority of an HTTP request, you need access to the [nsIChannel](/en-US/docs/XPCOM_Interface_Reference/nsIChannel) that the request is being made on. If you do not have an existing channel, then you can create one as follows:

<p>To change the priority of an HTTP request, you need access to the <a href="/en-US/docs/XPCOM_Interface_Reference/nsIChannel">nsIChannel</a> that the request is being made on. If you do not have an existing channel, then you can create one as follows:</p>
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var ch = ios.newChannel("https://www.example.com/", null, null);

<pre>var ios = Components.classes["@<a href="https://mozilla.org/network/io-service;1">mozilla.org/network/io-service;1</a>"]
.getService(Components.interfaces.nsIIOService);
var ch = ios.newChannel("<a href="https://www.example.com/">https://www.example.com/</a>", null, null);
</pre>
Once you have an [nsIChannel](/en-US/docs/XPCOM_Interface_Reference/nsIChannel), you can access the priority as follows:

<p>Once you have an <a href="/en-US/docs/XPCOM_Interface_Reference/nsIChannel">nsIChannel</a>, you can access the priority as follows:</p>
if (ch instanceof Components.interfaces.nsISupportsPriority) {
ch.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
}

<pre>if (ch instanceof Components.interfaces.nsISupportsPriority) {
ch.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
}
</pre>
For convenience, the interface defines several standard priority values that you can use, ranging from `PRIORITY_HIGHEST` to `PRIORITY_LOWEST`.

<p>For convenience, the interface defines several standard priority values that you can use, ranging from <code>PRIORITY_HIGHEST</code> to <code>PRIORITY_LOWEST</code>.</p>
#### Getting an nsIChannel from XMLHttpRequest

<h4 id="Getting_an_nsIChannel_from_XMLHttpRequest">Getting an nsIChannel from XMLHttpRequest</h4>
If you are programming in [JavaScript](/en-US/docs/Web/JavaScript), you will probably want to use [XMLHttpRequest](/en-US/docs/Web/API/XMLHttpRequest), a much higher level abstraction of an HTTP request. You can access the `channel` member of an [XMLHttpRequest](/en-US/docs/Web/API/XMLHttpRequest) once you have called the `open` method on it, as follows:

<p>If you are programming in <a href="/en-US/docs/Web/JavaScript">JavaScript</a>, you will probably want to use <a href="/en-US/docs/Web/API/XMLHttpRequest">XMLHttpRequest</a>, a much higher level abstraction of an HTTP request. You can access the <code>channel</code> member of an <a href="/en-US/docs/Web/API/XMLHttpRequest">XMLHttpRequest</a> once you have called the <code>open</code> method on it, as follows:</p>
var req = new XMLHttpRequest();
req.open("GET", "https://www.example.com", false);
if (req.channel instanceof Components.interfaces.nsISupportsPriority) {
req.channel.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
}
req.send(null);

<pre>var req = new XMLHttpRequest();
req.open("GET", "<a href="https://www.example.com">https://www.example.com</a>", false);
if (req.channel instanceof Components.interfaces.nsISupportsPriority) {
req.channel.priority = Components.interfaces.nsISupportsPriority.PRIORITY_LOWEST;
}
req.send(null);
</pre>
> **Note:** This example uses a synchronous [XMLHttpRequest](/en-US/docs/Web/API/XMLHttpRequest), which you should not use in practice.
<div class="note">
<p><strong>Note:</strong> This example uses a synchronous <a href="/en-US/docs/Web/API/XMLHttpRequest">XMLHttpRequest</a>, which you should not use in practice.</p>
</div>
#### Adjusting priority

<h4 id="Adjusting_priority">Adjusting priority</h4>
[nsISupportsPriority](/en-US/docs/nsISupportsPriority#adjustPriority) includes a convenience method named `adjustPriority`. You should use this if you want to alter the priority of a request by a certain amount. For example, if you would like to make a request have slightly higher priority than it currently has, you could do the following:

<p><a href="/en-US/docs/nsISupportsPriority#adjustPriority">nsISupportsPriority</a> includes a convenience method named <code>adjustPriority</code>. You should use this if you want to alter the priority of a request by a certain amount. For example, if you would like to make a request have slightly higher priority than it currently has, you could do the following:</p>
// assuming we already have a nsIChannel from above
if (ch instanceof Components.interfaces.nsISupportsPriority) {
ch.adjustPriority(-1);
}

<pre>// assuming we already have a nsIChannel from above
if (ch instanceof Components.interfaces.nsISupportsPriority) {
ch.adjustPriority(-1);
}
</pre>

<p>Remember that lower numbers mean higher priority, so adjusting by a negative number will serve to increase the request's priority.</p>
Remember that lower numbers mean higher priority, so adjusting by a negative number will serve to increase the request's priority.
Loading

0 comments on commit 2aaa075

Please sign in to comment.