Firefox 52 for developers - Mozilla

Firefox 52 for developers
=========================

Firefox 52 was released on March 7, 2017. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers
--------------------------

### Developer Tools

* Completely revamped Responsive Design Mode, including UA selection and network throttling.
* The Animation Inspector now displays timing functions.
* The Page Inspector now includes a CSS grid inspector.
* about:debugging now shows service worker state.
* The Page Inspector includes an easy way to highlight the selected element.
* The Page Inspector displays whitespace-only text nodes.

All devtools bugs fixed between Firefox 51 and Firefox 52.

### HTML

* The `rel="noopener"` Link type has been implemented (see Firefox bug 1222516).
### CSS

#### New features

* Added `:focus-within` pseudo-class (Firefox bug 1176997).
* Added support for `display:flex/grid` and columnset layout inside `<button>` elements (Firefox bug 984869).
* Implemented interpolation between numeric color and currentcolor (Firefox bug 1299741).
* Implemented flexbox layout for ``justify-content`: space-evenly` and ``align-content`: space-evenly` (Firefox bug 1235922).
* Added support for subpixel antialiasing in CSS `mask` / `clip-path` (Firefox bug 1305259).
* Implemented CSS Text 3 segment break transformation rules (Firefox bug 1081858).
* Basic shape clipping (as applied via the `clip-path` property) can now be applied to SVG content (Firefox bug 1246741).
* Implemented Flexbox layout for `align-self`|`justify-self`: [ first | last ]? baseline (Firefox bug 1221524).
* The `touch-action` property is now enabled by default on all platforms. (For the full story, see intent to ship mail #1 and intent to ship mail #2.)
* Flexbox `align-content` handling & single-line-sizing should depend on `flex-wrap`, not number of lines (Firefox bug 1090031).
* CSS Animations can now be used to animate non-interpolated properties (see Firefox bug 1064937).
* Changed `baseline|last-baseline` to `[ first | last ]? baseline` (Firefox bug 1313254).
* The used value for `left`/`right` is `start` for the block-axis (Firefox bug 1221565).
* Stretching flexible tracks with an indefinite containing block length now respects the min/max size(Firefox bug 1309407).
* The initial values of `mask-position` and `mask-repeat` have been changed to `0% 0%` and `repeat`, respectively (Firefox bug 1308963).
* There have been a number of changes to CSS `<color>` values (see Firefox bug 1295456):
    + `rgba()` and `hsla()` have now been redefined as aliases of `rgb()` and `hsl()`; both accept the same parameter syntax.
    + `rgb(`) and `hsl()` now accept an optional alpha value, e.g. `rgb(255, 0, 0, 0.5)`.
    + Color functions now accept space-separated parameters rather than commas, e.g. `rgb(255 0 0 / 0.5)`.
    + Alpha values can now be specified as percentages as well as numbers, e.g. `rgb(255 0 0 / 50%)`.
    + The hue component in `hsl()` colors can now be specified as an angle, as well as a number, e.g. `hsl(120deg, 60%, 70%)`.
* Firefox's implementation of child-indexed pseudo-classes (such as `:nth-child`, `:first-child`, and so forth) has been updated to match the CSS selectors level 4 specification: these pseudo-classes now match the appropriate sibling elements rather than the children of their parent element. This allows these pseudo-classes to be used when there is no parent, or the parent is not an `Element` (Firefox bug 1300374.

#### CSS Grids

* CSS Grids are implemented.

#### Changes and removals

* Unprefixed multi-column properties (and added back `-moz` prefixed versions as aliases, for now) (Firefox bug 1300895).
* Stopped wrapping abspos children of flex container in anonymous flex items(Firefox bug 1269045).
* Implemented grid container baselines (Firefox bug 1151204).
* Removed `<flex>` min-sizing from the style system (Firefox bug 1305244).
* Remove preference `layout.css.masking.enabled` (Firefox bug 1308239).
* The proprietary `-moz-images-in-menus` and `-moz-images-in-buttons` media types have been removed (see Firefox bug 1302157).
* Removed `-moz-use-text-color` value from color properties; use `currentcolor` instead (Firefox bug 1306214).
* [css-grid] 'max-width' set on grid item causes text to overflow (Firefox bug 1330380).
### JavaScript

#### New features

* Support for the async functions has been added. This adds `async function`, `async function expression`, and the `await` keyword (Firefox bug 1185106).
* Implemented ES2017 trailing commas in functions (Firefox bug 1303788).
* Implemented rest parameter destructuring (Firefox bug 1243717).
* The exponentiation operator (\*\*) is now enabled by default (Firefox bug 1291212).
* You can now use IANA time zone names in the `timeZone` option of date related APIs like `DateTimeFormat` or `Date.toLocaleString()` (Firefox bug 837961).

#### Changes and removals

* Array destructuring now throws a `SyntaxError` when using destructuring rest with trailing comma (Firefox bug 1041341).
* Duplicate `__proto__` properties are now allowed in object destructuring (Firefox bug 1204024).
* `Array.prototype.toLocaleString()` has been re-implemented to support the Intl API parameters "`locales`" and "`options`" (Firefox bug 1130636).
* `TypedArray` constructors now accept iterables to create new typed arrays (Firefox bug 1232266).
* `TypedArray.from()`, `TypedArray.of()`, `TypedArray.prototype.filter()`, `TypedArray.prototype.map()`, `TypedArray.prototype.slice()`, `TypedArray.prototype.subarray()` now require that their `this` values are valid Typed Array constructors (Firefox bug 1122396).
* The non-standard `ArrayBuffer.slice()` method (not `ArrayBuffer.prototype.slice()`) is deprecated and now presents a warning when used (Firefox bug 1316913).
* Unicode code point escapes can now also be used as identifiers (e.g. "`let \u{61} = 123`", see Firefox bug 1314037).
* To conform with ES2015, `\u2e2f` and `ⸯ` now throw when used as identifier, for details see Firefox bug 917436 and Firefox bug 1197230.
### WebAssembly

* Support for WebAssembly has been added to Gecko.
### DOM

* The Selection API has fully shipped, including the new `selectstart` and `selectionchange` events (Firefox bug 1309612).
* The property `Event.composed` is now supported; this Boolean value indicates whether or not the event can bubble through the shadow root into the standard DOM (Firefox bug 1292063).
* Only HTML elements, plus the `<svg>` and `<math>` elements, can be put into full-screen mode by calling `Element.requestFullscreen()` (Firefox bug 1305928).
* Touch events have been re-enabled on Windows desktop platforms — see Firefox bug 1244402. (They were disabled in Firefox 24 because they broke a number of major sites; see Firefox bug 888304.)
* The `focusin` and `focusout` events are now implemented (Firefox bug 687787).
* The `isSecureContext` property has been implemented (see Firefox bug 1269052).
* The Web App Manifest install event has been renamed `appinstalled` to avoid confusion with the service worker install event (see `oninstall`). See Firefox bug 1309099 for more details about this update.
* The `DataTransfer.types` property of the Drag and drop API now returns a frozen array of strings rather than a `DOMStringList` (see Firefox bug 1298243).
* The `loadstart` and `loadend` events are now fired on `<img>` elements (see Firefox bug 1264769).
* The `Notification.requireInteraction` of the Notifications API has been implemented (see Firefox bug 862395.)
* The `Window.open()` method now has a `noopener` window feature available (see Firefox bug 1267339), which mirrors the functionality of the `rel="noopener"` Link type.
* The `CustomElementRegistry.get()` method of the Web Components API has been implemented (see Firefox bug 1275838).
* Pointer Event `width` and `height` properties now default to a value of 1 (see Firefox bug 1304315).
* The File and Directory Entries API has been updated to include changes in the latest spec (see Firefox bug 1284987 for the exact details).
* The `cancelBubble` property, which was defined on `UIEvent`, is now defined on the `Event` interface instead. See Firefox bug 1298970 for more details.

#### Changes and removals

* The Firefox OS APIs that deal with managing phone calls (Contacts, MobileConnection, Icc, etc.) have been removed (Firefox bug 1311206).
* The Firefox OS `Identity` interface has been removed (Firefox bug 1309030).
* The Firefox OS Voicemail API (`MozVoicemail`, `MozVoicemailEvent`, `MozVoicemailStatus`, `Navigator.mozVoicemail`) has been removed (Firefox bug 1309723).
* The Firefox OS Cell Broadcast API (`MozCellBroadcast`, `MozCellBroadcastEvent`, `MozCellBroadcastMessage`, `Navigator.mozCellBroadcast`) has been removed (Firefox bug 1306772).
* The Firefox OS TV broadcast-related APIs have been removed (Firefox bug 1306778).
* The Firefox OS FM Radio API (`FMRadio`, `Navigator.mozFMRadio`) has been removed (Firefox bug 1306779).
### Service Workers and Fetch

* The `Headers.getAll()` method has been removed, and `Headers.get()` now retrieves all values of the specified header, not just the first one (see Firefox bug 1278275). This is in accordance with the latest Fetch API spec updates.
### Web Audio API

* The `ConstantSourceNode` interface has been added; it represents an audio source which always outputs a stream of samples which all have the same value. See Controlling multiple parameters with ConstantSourceNode for an example showing how this can be used to simplify some complex audio flows.
### WebRTC

* When an ICE connection is temporarily disrupted, the `RTCPeerConnection.iceConnectionState` property now gets set to `"disconnected"`; this indicates a transitory failure that may resolve itself shortly, with the connection returning to the `"connected"` state afterward (Firefox bug 852665).
* The `MediaDevices.devicechange_event` event and its corresponding handler, which were implemented but disabled by default on Mac only in Firefox 51, have been implemented on Windows and Linux and are now enabled by default on all platforms.
* The `MediaStream.active` property is now supported. This read-only Boolean property indicates whether or not at least one track on the stream is currently playing.
* Prior to Firefox 52, the `MediaStreamTrack.stop()` method could only stop local tracks (that is, tracks obtained through `getUserMedia()`). Now a variety of tracks can be stopped, including those on a `MediaStream` associated with a WebRTC connection, Web Audio API stream, or `CanvasCaptureMediaStream`.
* Previously, changing a `TextTrack`'s `mode` repeatedly during a single pass through the Firefox event loop would result in multiple `change` events being delivered to the `TextTrackList` specified by the parent media element's `textTracks` property. Now these changes are consolidated into one event (Firefox bug 882674).
### Audio/Video/Media

* The `MediaError` objects specified in `HTMLMediaElement.error` when an error occurs handling an `<audio>` or `<video>` element now include a `message` property, which provides a specific description of the error which occurred. This string offers details particular to this exact error occurrence, offering insight into why things went wrong (Firefox bug 1299072). This field has been included in Firefox nightly builds since Firefox 51, but is now available in all builds, up to and including release.
### Other APIs

* The method `FileSystemFileEntry.createWriter()`, which was added (but always returned an error) in Firefox 50 has been removed (Firefox bug 1315185.
* The proprietary Firefox OS `Apps installation/management APIs` have been removed from the platform (see Firefox bug 1261019).
* The proprietary Firefox OS `Web Telephony API` has been removed from the platform (see Firefox bug 1309719).
* The proprietary Firefox OS `Web Bluetooth API` has been removed from the platform (see Firefox bug 1310020).
* The Battery Status API is now available only to chrome/privileged code (see Firefox bug 1313580).
* `ImageBitmapRenderingContext.transferImageBitmap()` has been renamed to `ImageBitmapRenderingContext.transferFromImageBitmap()` (see Firefox bug 1304767).
* The `mozDash` and `mozDashOffset` members have been removed from `CanvasRenderingContext2D` (see Firefox bug 931389).
### HTTP

* The `Referrer-Policy` header now supports the directives `same-origin`, `strict-origin`, and `strict-origin-when-cross-origin` (Firefox bug 1276836).
* The `'strict-dynamic'` source expression is now supported for `Content-Security-Policy` directives, such as `script-src` (Firefox bug 1299483).
* Insecure sites (`http:`) can't set cookies with the "secure" directive anymore as per the Strict Secure Cookies specification (Firefox bug 976073).
* The maximum table size format of the HTTP/2 header compression format HPACK has been increased from 4 KB to 64 KB (Firefox bug 1296280).
* The `Large-Allocation` header has been added (Firefox bug 1304140).
### SVG

* SVG documents are now represented using the `XMLDocument` interface instead of SVGDocument. This is a change made in the SVG 2 specification.
### Security

* When login pages (i.e., those containing an `<input type="password">` field) are created so that they would be submitted insecurely, Firefox displays an in-context warning message below the password field to warn users (Firefox bug 1319119). Autofill is also disabled on insecure login forms (Firefox bug 1217152). See Insecure passwords for more details.
* Support for SHA-1 SSL certificates has been removed; navigating to a secure page that uses a SHA-1 certificate will now result in an `Untrusted Connection` error (Firefox bug 1330043).
Plugins
-------

All NPAPI plugin support except Flash has been dropped. Flash usage is also set to be phased out in the future.

Changes for add-on and Mozilla developers
-----------------------------------------

### WebExtensions

New APIs:

* `sessions` API
* `topSites` API
* `omnibox` API
* `runtime.onInstalled` and `runtime.onStartup` events
* asynchronous event listeners in webRequest
* `bookmarks.onMoved`, `bookmarks.onCreated`, `bookmarks.onChanged` events
* `_execute_browser_action` and `_execute_page_action` in the commands manifest key
* `match_about_blank` in the content\_scripts manifest key
### Interfaces

* `nsIDroppedLinkHandler.dropLinks` method and `nsIDroppedLinkItem` interface have been added to handle dropping multiple items (Firefox bug 92737).
### XUL

* `tabbrowser.loadTabs(uris, params)` method overload has been added (Firefox bug 92737).
* `browser.droppedLinkHandler` function signature has been changed (Firefox bug 92737).
Older versions
--------------

* Firefox 51 for developers
* Firefox 50 for developers
* Firefox 49 for developers
* Firefox 48 for developers
* Firefox 47 for developers
* Firefox 46 for developers
* Firefox 45 for developers
* Firefox 44 for developers
* Firefox 43 for developers
* Firefox 42 for developers
* Firefox 41 for developers
* Firefox 40 for developers
* Firefox 39 for developers
* Firefox 38 for developers
* Firefox 37 for developers
* Firefox 36 for developers
* Firefox 35 for developers
* Firefox 34 for developers
* Firefox 33 for developers
* Firefox 32 for developers
* Firefox 31 for developers
* Firefox 30 for developers
* Firefox 29 for developers
* Firefox 28 for developers
* Firefox 27 for developers
* Firefox 26 for developers
* Firefox 25 for developers
* Firefox 24 for developers
* Firefox 23 for developers
* Firefox 22 for developers
* Firefox 21 for developers


Firefox 19 for developers - Mozilla

Firefox 19 for developers
=========================

Firefox 19 was released on February 19, 2013. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers
--------------------------

### JavaScript

* `Map` and `Set` objects have changed from having a `size()` method to a `size` property (Firefox bug 807001)
* `Map` and `Set` objects also have a clear() method now. (Firefox bug 805003)
### CSS

* Support for the viewport-relative `<length>` units, `vh`, `vw`, `vmin`, and `vmax`, has landed (Firefox bug 503720)
* CSS Flexbox has been unprefixed, but remains disabled by default (Firefox bug 801098).
* The `-moz-initial` value has been unprefixed (Firefox bug 806068). `-moz-initial` will be kept for a while as an alias; however, authors are strongly encouraged to switch over to `initial`.
* The CSS `text-transform` property now supports the `full-width` keyword, which allows a more seamless inclusion of Latin characters in text using ideographic fixed-width characters, like Chinese or Japanese (Firefox bug 774560).
* The CSS `page-break-inside` has been implemented (Firefox bug 685012).
* The CSS `calc()` function can now be used on `<color-stop>` (on `<gradient>`).
* The CSS `@page` at-rule is now supported (Firefox bug 115199). Note that the pseudo-classes `:first`, `:right`, and `:left` are not yet implemented.
* The `:-moz-placeholder` pseudo-class is replaced by the `::-moz-placeholder` pseudo-*element* (Firefox bug 737786).
* Declarations qualified with `!important` appearing in `@keyframes` are now ignored, per spec (Firefox bug 784466).
### DOM/APIs

* The `Element.getElementsByTagName`, `Element.getElementsByTagNameNS` and `Element.getElementsByClassName` methods now return a live `HTMLCollection` (Firefox bug 799464).
* The `File` `mozLastModifiedDate` property has been implemented. (Firefox bug 793955)
* The `File` lastModifiedDate property returns the current date, when the date of the last modification is unknown. (Firefox bug 793459)
* The `CanvasRenderingContext2D` `isPointInStroke` method has been implemented (Firefox bug 803124).
* The `HTMLCanvasElement` `toBlob` method has been implemented (Firefox bug 648610).
* The `Node.isSupported` and the `document.implementation.hasFeature()` methods have been changed to always return `true` (Firefox bug 801425).
* When calling `document.createElement(null)`, `null` will now be stringified and works like `document.createElement("null")`.
* The `TextDecoder` and `TextEncoder` interfaces have been updated to match the latest spec (Firefox bug 801487).
### XForms

Support for XForms has been **removed** in Firefox 19.

Changes for add-on and Mozilla developers
-----------------------------------------

**Note:** A key change in Firefox 19 is that `nsresult` is now strongly typed. This will help make it easier to detect bugs that are caused by mishandling of return values, but may cause existing code to break if it's making incorrect assumptions in this regard.

* `getBrowserSelection()` now returns the selected text in a text input field. As a result, `gContextMenu.isTextSelected` will be `true` when the user selects text in a text input field that is not a password field. (Firefox bug 565717)
* Dict.jsm: `Dict()` now takes a JSON String. `Dict.toJSON()` was added, and it returns a JSON String. (Firefox bug 727967)
### Interface changes

`nsIImgLoadingContent`

The parameter (aObserver) of `addObserver()` method changes from `imgIDecoderObserver` to `imgINotificationObserver`. The `notify()` method of `imgINotificationObserver` is not scriptable, so you need to use `createScriptedObserver()` from `imgITools`.

`nsIChannel`

The property `contentLength` changed from `long` to `int64_t`.

See also
--------

* Firefox 19 Beta Release Notes
* Add-on Compatibility for Firefox 19
### Older versions

* Firefox 18 for developers
* Firefox 17 for developers
* Firefox 16 for developers
* Firefox 15 for developers
* Firefox 14 for developers
* Firefox 13 for developers
* Firefox 12 for developers
* Firefox 11 for developers
* Firefox 10 for developers
* Firefox 9 for developers
* Firefox 8 for developers
* Firefox 7 for developers
* Firefox 6 for developers
* Firefox 5 for developers
* Firefox 4 for developers
* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 118 for developers - Mozilla

Firefox 118 for developers
==========================

This article provides information about the changes in Firefox 118 that affect developers. Firefox 118 was released on September 26, 2023.

Changes for web developers
--------------------------

### HTML

* The `<search>` element is now supported. The `<search>` element is a group element that serves to contain all the elements used in a search or filtering operation (Firefox bug 1824121).
### CSS

* The `font-synthesis-position` property and `position` value for `font-synthesis` shorthand property are now supported. These allow subscript and superscript typefaces to be disabled for fonts that do not have glyphs for them when using `font-variant-position` (Firefox bug 1849010).
* Multiple CSS math functions are now supported: `abs()`, `sign()`, `round()`, `mod()`, `rem()`, `pow()`, `sqrt()`, `hypot()`, `log()`, and `exp()` (Firefox bug 1814589).
* A new keyword `from-font` in the CSS property `font-size-adjust` enables picking the desired `<font-metric>` from the first available font (Firefox bug 1708240).
* The CSS property `transform-box` now supports the values `content-box` and `stroke-box`. For the reference box, the `content-box` value uses the content box and the `stroke-box` value uses the stroke bounding box that contains an SVG's shape (Firefox bug 1819464).
* The CSS property `font-size-adjust` supports the keyword `from-font` that enables picking the desired `<font-metric>` from the first available font (Firefox bug 1708240).
### JavaScript

No notable changes.

### HTTP

* The HTTP `Permissions-Policy` header's `publickey-credentials-get` directive is now supported, which can be used to enable the Web Authentication API interface for retrieving public-key credentials in a cross-origin iframe (Firefox bug 1460986).
### MathML

* The `<semantics>` and `<maction>` elements only render the first child element by default now. The `mathml.legacy_maction_and_semantics_implementations.disabled` preference has been removed (Firefox bug 1788223).
* All values of the `mathvariant` attribute other than `normal` are now deprecated. Additionally, the attribute's use is now limited to the `<mi>` element (Firefox bug 1845461).
### SVG

No notable changes.

### Security

No notable changes.

### APIs

* The `⊞ Windows Logo` key on Windows and the `Command` key on macOS now return a value of `"Meta"` for `KeyboardEvent.key`, instead of `"OS"`, and `KeyboardEvent.code` returns `MetaLeft`/`MetaRight` instead of `OSLeft`/`OSRight` (Firefox bug 1232918).
* The `RTCRtpTransceiver.currentDirection` and `RTCRtpTransceiver.direction` properties now support the `"stopped"` value for indicating whether a transceiver has stopped. This value should now be used instead of the deprecated `RTCRtpTransceiver.stopped` property (Firefox bug 1568296).
* The array returned by `RTCPeerConnection.getTransceivers()` now omits stopped transceivers. Similarly, `RTCPeerConnection.getReceivers()` and `RTCPeerConnection.getSenders()` omit the receivers and senders associated with a stopped transceiver (Firefox bug 1568296).
* The `TextMetrics.emHeightDescent` and `TextMetrics.emHeightAscent` properties are now supported (Firefox bug 1841692).
### WebDriver conformance (WebDriver BiDi, Marionette)

#### General

* Fixed an internal race condition for Android that caused the returned user prompt text to be empty for both WebDriver BiDi and Marionette (Firefox bug 1848167).
* Both the `WebDriver:PerformActions` command in Marionette and the `browsingContext.performActions` command in WebDriver BiDi failed to correctly scroll for a `wheel` input source in environments that have a high-resolution display connected (Firefox bug 1849229).

#### WebDriver BiDi

* Added the `browsingContext.activate` command that allows users to bring the given background tab into foreground (Firefox bug 1841004).
* Added the `browsingContext.handleUserPrompt` command that allows users to accept or dismiss an open user prompt of type `alert`, `confirm`, or `prompt` (Firefox bug 1824197).
* Added the `browsingContext.userPromptOpened` event that is emitted when a user prompt of type `alert`, `confirm`, or `prompt` was opened (Firefox bug 1824224).
* Added a `type` field to the JSON payload that is returned to clients for identifying `event` messages or the success state of a command, which can be either `success` or `error` (Firefox bug 1844009).

#### Marionette

* Added support for all the Web Authentication extension commands, which allow users to authenticate themselves by Public Key Credentials (Firefox bug 1846574)
Changes for add-on developers
-----------------------------

### Removals

* Support for `browser_style` in the manifest keys `action`, `options_ui`, `page_action`, and `sidebar_action` for Manifest V3 extensions has been removed (Firefox bug 1830711). See Browser Styles' Manifest v3 migration for information about transitioning from `browser_style` in Manifest V3 extensions.
Older versions
--------------

* Firefox 117 for developers
* Firefox 116 for developers
* Firefox 115 for developers
* Firefox 114 for developers
* Firefox 113 for developers
* Firefox 112 for developers
* Firefox 111 for developers
* Firefox 110 for developers
* Firefox 109 for developers
* Firefox 108 for developers
* Firefox 107 for developers
* Firefox 106 for developers
* Firefox 105 for developers
* Firefox 104 for developers
* Firefox 103 for developers
* Firefox 102 for developers
* Firefox 101 for developers
* Firefox 100 for developers
* Firefox 99 for developers
* Firefox 98 for developers
* Firefox 97 for developers
* Firefox 96 for developers
* Firefox 95 for developers
* Firefox 94 for developers
* Firefox 93 for developers
* Firefox 92 for developers
* Firefox 91 for developers
* Firefox 90 for developers
* Firefox 89 for developers
* Firefox 88 for developers
* Firefox 87 for developers


Firefox 28 for developers - Mozilla

Firefox 28 for developers
=========================

Firefox 28 was released on March 18, 2014. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers
--------------------------

### Developer Tools

* The `console.exception` property has been added (Firefox bug 922214).
* The `console.assert()` property has been added (Firefox bug 760193).
* App Manager: a new Manifest Editor was added.
* App Manager: the toolbox used for debugging apps is now embedded in the app manager UI.
* Web Console: added a "split console" mode - press Escape to quickly open the console in any other tool.
* Web Console: added a dark theme for the output.
* Debugger: pretty-print minified JavaScript.
* Debugger: hover over any variable or click on it to bring up a pop-up that displays the current value.
* Inspector: added a color picker in rules view and various tooltips.
* Browser Toolbox: allows add-on and platform developers to use almost all of the developer tools while targeting the browser itself.

More details in this post.

### CSS

* Support for multi-line flexbox has been added (Firefox bug 939901).
* Longhand East Asian counter styles have been implemented (Firefox bug 934072).
* Experimental support for the `background-blend-mode` property has been added, but is disabled by default (Firefox bug 841601).
* The `none` value has been added to `font-variant-ligatures` (Firefox bug 913264).
* Support for the `:hover` user action pseudo-class on pseudo-elements has been implemented (Firefox bug 922669).
### HTML

* `<input type=color>` and `<input type=number>` have been implemented, disabled by default.
### JavaScript

* ECMAScript 2015 implementation continues:
    + New `Array` methods have been implemented: `Array.prototype.entries()` and `Array.prototype.keys()` (Firefox bug 894658).
* A bug causing that `Object.getOwnPropertyNames()` did not see unresolved properties of `Error` objects has been fixed (Firefox bug 724768).
### Interfaces/APIs/DOM

* `HTMLVideoElement.canPlayType('video/webm')` now reports `maybe`. (Firefox bug 884275).
* The `DocumentFragment.getElementById()` method has been implemented. E.g. `document.createDocumentFragment().getElementById()` (Firefox bug 933193).
* The `KeyboardEvent.repeat` attribute has been implemented (Firefox bug 600117).
* The `File` constructor, e.g. `new File(["foo"], "foo.txt")` has been implemented. (Firefox bug 819900).
* The `Navigator.plugins` is no more enumerable, for privacy reasons (Firefox bug 757726).
* The two attributes `Window.screenX` and `Window.screenY` now return CSS pixels (and no more device pixels) (Firefox bug 943668).
* The two methods `CanvasRenderingContext2D.drawSystemFocusRing()` and `CanvasRenderingContext2D.drawCustomFocusRing()` have been implemented. The preference `canvas.focusring.enabled` must be set to `true` to activate both (Firefox bug 540456).
* The `willReadFrequently` context attribute for "`2d`" canvas contexts has been implemented (see `HTMLCanvasElement.getContext()`) (Firefox bug 884226).
* The following attributes and methods of `NavigatorID` have been implemented on `WorkerNavigator` to allow their use in workers: `Navigator.appCodeName`, `Navigator.product`, and `Navigator.taintEnabled` (Firefox bug 925847).
* The `previousElementSibling` and `nextElementSibling` properties has been removed from `DocumentType`, because of compatibility problems (Firefox bug 932501).
### MathML

* Support of the `mathvariant` attribute has been added (Firefox bug 114365).
### SVG

*No change.*

### Audio/Video

* Opus in WebM is now supported (Firefox bug 887978).
* The VP9 video decoder is now supported (Firefox bug 833023).
### Network

* Support of `SPDY/2` has been removed.
Changes for add-ons and Mozilla developers
------------------------------------------

* The interface of `DeferredTask.jsm` has been changed, and the `isPending()`, `start()`, `flush()`, and `cancel()` methods have been removed (Firefox bug 940408).
Security
--------

* CSP was not enforced in sandboxed iframes. This has been fixed (Firefox bug 886164).
* The CSP 1.1 experimental `script-nonce` directive has been implemented. The preference `security.csp.experimentalEnabled` should be set to `true` to enable this functionality (Firefox bug 855326).
### Older versions

* Firefox 27 for developers
* Firefox 26 for developers
* Firefox 25 for developers
* Firefox 24 for developers
* Firefox 23 for developers
* Firefox 22 for developers
* Firefox 21 for developers
* Firefox 20 for developers
* Firefox 19 for developers
* Firefox 18 for developers
* Firefox 17 for developers
* Firefox 16 for developers
* Firefox 15 for developers
* Firefox 14 for developers
* Firefox 13 for developers
* Firefox 12 for developers
* Firefox 11 for developers
* Firefox 10 for developers
* Firefox 9 for developers
* Firefox 8 for developers
* Firefox 7 for developers
* Firefox 6 for developers
* Firefox 5 for developers
* Firefox 4 for developers
* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 63 for developers - Mozilla

Firefox 63 for developers
=========================

This article provides information about the changes in Firefox 63 that will affect developers. Firefox 63 was released on October 23, 2018.

Changes for web developers
--------------------------

### Developer tools

* The Fonts tab in the Page Inspector now includes an editor that makes it easy to view and edit the settings of the fonts on your page. See Edit fonts for details.
* The Accessibility inspector is now enabled by default (Firefox bug 1482454).
* When you hover over an object in the Accessibility Inspector, the item is highlighted and its role and name will be shown in an information bar on the page (Firefox bug 1473030).
* The command line in the Web Console is now shown immediately following the console output (Firefox bug 1136299).
* A new icon has been added to the content in the Network Monitor to indicate when a URL belongs to a known tracker — see security icons (Firefox bug 1333994).
* The default value of `devtools.aboutdebugging.showSystemAddons` is now `false`, meaning that system add-ons will not be listed on the `about:debugging` page. You can change the settings by navigating to `about:config` (Firefox bug 1425347).
* The Responsive Design Mode toolbar was simplified, and we added the option to left-align the viewport.
* The Page Inspector includes a link to the class definition for a custom element. (Firefox bug 1443923).
### HTML

* Support for the `<img>` element's `decoding` attribute has been added (Firefox bug 1416328); see also `HTMLImageElement.decoding`.

#### Removals

* Support for the `sidebar` link type (`rel="sidebar"`) has been removed. If an anchor tag includes this attribute, it will be ignored (Firefox bug 1452645).
### CSS

* Support for the `:defined` pseudo-class has been added (Firefox bug 1331334).
* Support for `row-gap`, `column-gap` and `gap` have been added in Flexbox layout (Firefox bug 1398483).
* Re-enabled support for webkit-prefixed pixel-density @media queries (Firefox bug 1444139).
* Support added for the CSS Flexible Box Layout (Flexbox) properties `align-self`, `align-content`, and `align-items` as well as the `justify-content` property (Firefox bug 1472843).
* Implemented the `path()` function for `offset-path` (Firefox bug 1429298).
* Implemented syntax improvements from the Media Queries Level 4 specification (Firefox bug 1422225).
* Renamed `offset-*` properties to `inset-block-start`, `inset-block-end`, `inset-inline-start`, and `inset-inline-end` (Firefox bug 1464782).
* Added support for the prefers-reduced-motion media feature (Firefox bug 1365045, Firefox bug 1475462).
* Added flow relative values (`block`, `inline`) for the `resize` property (Firefox bug 1464786).
* Implemented flexbox layout for `safe` & `unsafe` values in `align-self`, `align-content`, and `justify-content` (Firefox bug 1297774).
* The logical properties (where appropriate) are now animatable (Firefox bug 1309752).

#### Removals

* Removed `offset-block-start`, `offset-block-end`, `offset-inline-start`, and `offset-inline-end`; these have been renamed to `inset-*`, as described above (Firefox bug 1464782).
### SVG

*No changes.*

### JavaScript

* The `Symbol.prototype.description` property has been implemented (Firefox bug 1472170).
* The `Object.fromEntries()` method has been added (Firefox bug 1469019).
* When you try to access a property of an undefined object, the error message is now much improved. Considering the case where `x` is undefined and you try to access `x.y`, instead of `TypeError: x is undefined` the console now returns the more descriptive `x is undefined; can't access its "y" property` (Firefox bug 1259822).

#### Removals

* Experimental WebAssembly Module IndexedDB serialization support has been removed (Firefox bug 1469395).
### APIs

#### New APIs

* The Shadow DOM (Firefox bug 1471947) and Custom Elements (Firefox bug 1471948) APIs have been enabled by default; See Web components for more details.
* The Media Capabilities API has been implemented (Firefox bug 1409664).
* The Async Clipboard API has been implemented and enabled by default for all channels (Firefox bug 1461465). As is the case with Chrome, Firefox currently implements only the `writeText()` and `readText()` methods; however, unlike Chrome, `readText()` is only available in browser extensions.
* The `SecurityPolicyViolationEvent` interface is now supported. It allows sending events when the `Content-Security-Policy` is violated (Firefox bug 1472661).

#### DOM

* The following portions of the Web Animations API have been enabled by default (see Firefox bug 1476158):
    + The `Animation` properties `ready` and `finished`, specifying the `Animation` object's `ready` and `finished` `Promise`s.
    + The `Animation` object's `effect` property.
    + The interfaces `KeyframeEffect` and `AnimationEffect`.
* The `Element.toggleAttribute()` method has been implemented (Firefox bug 1469592).
* The historical, previously non-standard, `Event.returnValue` property is now supported for compatibility purposes (Firefox bug 1452569).
* We implemented the `Window.event` property to improve web compatibility, now that it's become standard (Firefox bug 218415). However, due to some web compat issues (e.g. Firefox bug 1479964), this was quickly disabled in non-Nightly channels, hidden behind the `dom.window.event.enabled` pref (Firefox bug 1493869).
* To bring Firefox into alignment with Edge and Chrome, the `navigator.platform` property now returns `"Win32"` even when running on 64-bit Windows (Firefox bug 1472618).
* Prior to Firefox 63, links that open new windows that had `rel="noopener"`, as well as calls to `Window.open()` with the `noopener` window feature enabled would default to having all window features disabled so that you had to explicitly re-enable any standard features you wanted. Now, these windows have the same set of features enabled like any other window, and you need to explicitly turn off any you don't want (Firefox bug 1419960).

#### DOM events

* Handling of the `Alt` key *on the right side* of the keyboard has been improved on Windows. If the user's current keyboard layout maps the `Alt` key to the `AltGr` modifier key, the value of `KeyboardEvent.key` is now reported as `"AltGraph"`. This behavior matches the behavior recently introduced in Chrome (Firefox bug 900750).

#### Media, Web Audio, and WebRTC

* Microphone access now works simultaneously in multiple tabs, even within the same content process (Firefox bug 1404977).
* `RTCDataChannel` has been updated to support the sctp-sdp-21 data format for the data, in addition to the older sctp-sdp-05 format previously supported.
* The `ConstantSourceNode` node type for Web Audio API now has a default channel count of 2 rather than 1, in order to match the specification (Firefox bug 1413283).
* The Web Audio API interface `AudioScheduledSourceNode` (and by extension, all the other node types based on it) now throw the correct exception when a negative value is specified for the node start time. That error is `RangeError` (Firefox bug 1413284).
* The minimum and maximum permitted values for an `AudioParam` object's `value` have been changed to the minimum negative single-precision floating-point value (-340,282,346,638,528,859,811,704,183,484,516,925,440) and the maximum positive single-precision floating-point value (+340,282,346,638,528,859,811,704,183,484,516,925,440) respectively (Firefox bug 1476695).
* The `SourceBuffer.changeType` method, which allows you to change codecs during an active stream, has been enabled by default. This is part of the Media Source Extensions API (Firefox bug 1481166).
* The `AudioParam.setValueCurveAtTime()` method has been updated to correctly accept an array of floating-point values to indicate the parameter's values to change to over time. Previously, it required a `Float32Array` (Firefox bug 1421091).
* `AudioParam.setValueCurveAtTime()` has also been updated to correctly return a proper `TypeError` when a non-finite value is found in the `values` array (Firefox bug 1472095).
* In addition, `setValueCurveAtTime()` has been updated to ensure that, when the parameter finishes following the specified value curve after the duration elapses, the value of the parameter is set to the last value in the list of values to curve through (Firefox bug 1308436).
* The `RTCRTPStreamStats` dictionary has been renamed to `RTCRtpStreamStats` for consistency with other WebRTC dictionaries and the specification (Firefox bug 1480498).
* Support for the `RTCRtpStreamStats` dictionary's `kind` property has been added (Firefox bug 1481851).
* The `RTCRtpStreamStats` dictionary's `isRemote` property is deprecated and will be removed in Firefox 65. A warning is now output to console when this property is accessed. See this blog post on the Advancing WebRTC blog for details (Firefox bug 1393306).

#### Canvas and WebGL

* A new `powerPreference` context attribute has been added to `HTMLCanvasElement.getContext()`. On macOS this allows WebGL non-performance-critical applications and applets to request the low-power GPU instead of the high-power GPU in multi-GPU systems (Firefox bug 1349799).

#### Removals

* The obsolete and non-standard Firefox-only methods `Window.back()` and `Window.forward()` have been removed. Please use the `window.history.back()` and `window.history.forward()` methods instead (Firefox bug 1479486).
* The `URL.createObjectURL()` and `URL.revokeObjectURL()` methods are no longer available on `ServiceWorker` instances due to the potential they introduced for memory leaks to occur (Firefox bug 1264182).
* Since it was deprecated in the specification anyway, the limited support for Doppler effects on `PannerNode` has been removed from the Web Audio API. The `AudioListener` properties `dopplerFactor` and `speedOfSound` have been removed, along with the `PannerNode` method `setVelocity()` (Firefox bug 1148354).
### CSSOM

*No changes.*

### HTTP

* The `Clear-Site-Data` header is implemented and no longer behind a preference (Firefox bug 1470111).
### Security

* Site favicons are now subject to Content Security Policy if one is configured for the site (Firefox bug 1297156).
* CSP `script-src` directive's `'report-sample'` expression now recognized when generating violation reports. This directive indicates that a short sample of where the violation occurred should be included in the report. Previously, Firefox always included this sample (Firefox bug 1473218).
* Firefox now uses NSS 3.39 (Firefox bug 1470914).
### Plugins

*No changes.*

### WebDriver conformance (Marionette)

#### New features

* Marionette now returns a `setWindowRect` capability in the `WebDriver:NewSession` response that is true if the browser window can be repositioned and resized, which e.g. is the case for Firefox but not any mobile applications (Firefox bug 1470659).
* Added support for the `unhandledPromptBehavior` capability, which allows to define a specific prompt behavior of the WebDriver specification (Firefox bug 1264259).
* Handling of user prompts has been added to the `WebDriver:ExecuteScript` and `WebDriver:ExecuteAsyncScript` commands (Firefox bug 1439995).

#### API changes

* Deprecated command end-points without the `WebDriver:` prefix have been removed (Firefox bug 1451725).
* The `WebDriver:NewSession` command returns recommended strings (`linux`, `mac`, `windows`) for `platformName` as defined in the WebDriver specification (Firefox bug 1470646).

#### Bug fixes

* Focus related events were missing on element interaction when Firefox was not running as the top-most application (Firefox bug 1398111).
* Performing a `pointerDown` and `pointerUp` action in a subsequent action sequence could trigger a double click because `WebDriver:ReleaseActions` didn't reset the double click tracker (Firefox bug 1422583).
* Executing `pause` actions repeatedly could cause an infinite hang (Firefox bug 1447449).
* Fixed a bug where returning an element collection from `WebDriver:ExecuteScript` and `WebDriver:ExecuteAsyncScript` would cause a cyclic reference error (Firefox bug 1447977).
* To prevent a race condition both the `WebDriver:AcceptAlert` and `WebDriver:DismissAlert` commands now wait until the user prompt has been closed (Firefox bug 1479368).
* Log entries as emitted by the frame script were no longer limited by `MarionettePrefs.logLevel` but logged everything (Firefox bug 1482829).
* `WebDriver:TakeScreenshot` raised an error when taking a screenshot of a window larger than 32767 pixels in width or height (Firefox bug 1485730).
* `WebDriver:SendAlertText` didn't replace default user prompt value if text to send is an empty string (Firefox bug 1486485).
### Other

* Corrected the behavior of `PerformanceObserver.observe()` to do nothing if no valid entry types are found in the specified array of entry types to observe, or if the array is empty or missing. Previously, Firefox was incorrectly throwing a `TypeError` (Firefox bug 1403027).
* In OpenSearch, Firefox now accepts `application/json` as a search URL type, as an alias of `application/x-suggestions+json` (Firefox bug 1425827).
Changes for add-on developers
-----------------------------

### API changes

#### Theming

* The default text color for `browserAction` badges is now automatically set to black or white, to maximize contrast with the background (Firefox bug 1474110).
* The `accentcolor` and `textcolor` properties of the `theme` manifest key are now optional (Firefox bug 1413144).
* `browserAction.getBadgeTextColor()` and `browserAction.setBadgeTextColor()` enable you to get and set the text color of browser action badges (Firefox bug 1424620).
* The theme `colors` key in `manifest.json` now supports the `ntp_text` property to set the text color in a new tab, and the `ntp_background` property to set the color of a new tab (Firefox bug 1347204).
* Themes can now define the colors for sidebars, such as the bookmarks sidebar (Firefox bug 1418602). The relevant properties include:
    + `sidebar`: The background color for sidebars.
    + `sidebar_text`: The text color for sidebars.
    + `sidebar_highlight`: The background color of a selected item in a sidebar.
    + `sidebar_highlight_text`: The text color of a selected item in a sidebar.
* The method `management.install()` allows web extensions to install and enable signed browser themes (Firefox bug 1369209).
* The manifest key theme\_experiment was introduced (Firefox bug 1472740). This key enables the definition of experimental `theme` key properties for the Firefox interface.

#### Search

* The new `search` API enables you to retrieve the list of installed search engines and perform searches with them (Firefox bug 1352598).
* `topSites.get()` now takes an `options` parameter enabling you to set various options for the list of sites returned (Firefox bug 1445836).

#### Tabs

* `tabs.onHighlighted` now supports multi-select (Firefox bug 1474440).
* `tabs.highlight` now includes an optional field in the `highlightInfo` object — `populate` — which defaults to `true`. Setting it to `false` prevents the returned `windows.Window` object from being populated with a list of tabs, to improve performance (Firefox bug 1489814).
* `tabs.update` now supports changing the selection status of a tab by including `highlighted: true` in the `updateProperties` parameter (Firefox bug 1479129).
* `tabs.update` now supports changing the selection status of a tab without changing the focused tab (Firefox bug 1486050) by including both `highlighted: true` and `active: false` in the `updateProperties` parameter.
* `tabs.query` now returns an array of `tabs.Tab` objects if multiple tabs are selected (Firefox bug 1465170).
* The `tabs.Tab` property now properly reflects which tabs in a browser window are selected (highlighted) and `tabs.highlight` supports changing the highlighted status of multiple tabs (Firefox bug 1464862).
* The `isarticle` property in the `filter` object passed into `tabs.onUpdated` has been renamed to `isArticle`. The old name is retained but deprecated. This change was uplifted to Firefox 62 (Firefox bug 1461695).
* The `tabs.onUpdated` event can be used to track when a tab is drawing the user's attention with `attention` property of the `changeInfo` object (Firefox bug 1396684).

#### Menus

* Added `menus.getTargetElement()` to the `menus` API. The method returns the element referenced by the `targetElementId` parameter that identifies the clicked element. If the `targetElementId` is no longer valid, the method returns null (Firefox bug 1325814).
* `menus.create()` now enables you to create invisible menu items, and `menus.update()` enables you to toggle menu item visibility (Firefox bug 1482529).
* Items created using the `menus` API now support access keys (Firefox bug 1320462).
* The `targetUrlPatterns` parameter of `menus.create()` and `menus.update()` now supports any URL scheme, even those that are usually not allowed in a match pattern (Firefox bug 1280370).
* When a tab context menu item is clicked, the "activeTab" permission is now granted for that tab, even if that's not the currently active tab (Firefox bug 1446956).

#### Other

* `commands.onCommand` is now treated as user input (Firefox bug 1408129).
* The `webRequest` API now enables you to filter for speculative connections (Firefox bug 1479565).
* `webRequest.SecurityInfo` adds two new properties, `keaGroupName`, and `signatureSchemeName`. This change was uplifted to Firefox 62 (Firefox bug 1471959).
* `cookies.Cookie` now includes a property indicating the SameSite state of the cookie. The `cookies.SameSiteStatus` enumeration defines SameSite state values (Firefox bug 1351663).
* Match patterns for URLs now explicitly match the "data" URL scheme (Firefox bug 1280370).
Older versions
--------------

* Firefox 62 for developers
* Firefox 61 for developers
* Firefox 60 for developers
* Firefox 59 for developers
* Firefox 58 for developers
* Firefox 57 for developers
* Firefox 56 for developers
* Firefox 55 for developers
* Firefox 54 for developers
* Firefox 53 for developers
* Firefox 52 for developers
* Firefox 51 for developers
* Firefox 50 for developers
* Firefox 49 for developers
* Firefox 48 for developers
* Firefox 47 for developers
* Firefox 46 for developers
* Firefox 45 for developers
* Firefox 44 for developers
* Firefox 43 for developers
* Firefox 42 for developers
* Firefox 41 for developers
* Firefox 40 for developers
* Firefox 39 for developers
* Firefox 38 for developers
* Firefox 37 for developers
* Firefox 36 for developers
* Firefox 35 for developers
* Firefox 34 for developers
* Firefox 33 for developers
* Firefox 32 for developers


Adapting XUL Applications for Firefox 1.5 - Mozilla

Adapting XUL Applications for Firefox 1.5
=========================================

This page contains a list of changes in Firefox 1.5, affecting XUL developers.

### Specific Changes

* Tree Widget Changes
* International characters in XUL JavaScript (only affects extensions with JavaScript files containing non-ASCII characters)
* XMLHttpRequest changes
* XUL Changes for Firefox 1.5
* XPCNativeWrappers are on by default, and the behavior changed somewhat compared to 1.0.x
* A simpler method of Chrome Registration deprecates contents.rdf.
* For overlaid 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();`
### Other Information

* How to check application's version using nsIXULAppInfo
* MozillaZine


Changing the Priority of HTTP Requests (Non-Standard) - Mozilla

Changing the Priority of HTTP Requests (Non-Standard)
=====================================================

**Warning:** The approach described in this topic is non-standard, and not recommended.

 The best way to request resources over HTTP is to use `fetch()`, which allows you to specify the priority in `Request.priority`.
 You can also set the HTTP priority on `HTMLLinkElement`, `HTMLIFrameElement`, and `HTMLImageElement` elements (and associated tags) using the `fetchpriority` attribute.

In Firefox 1.5, an API was added to support changing the priority of 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`, 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.

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.

The examples in this document are all written in JavaScript using XPCOM.

It should be noted that the value of the `priority` attribute follows UNIX conventions, with smaller numbers (including negative numbers) having higher priority.

Accessing priority from an nsIChannel
-------------------------------------

To change the priority of an HTTP request, you need access to the `nsIChannel` that the request is being made on. If you do not have an existing channel, then you can create one as follows:

```js
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(
  Components.interfaces.nsIIOService,
);
var ch = ios.newChannel("https://www.example.com/", null, null);
```

Once you have an `nsIChannel`, you can access the priority as follows:

```js
if (ch instanceof Components.interfaces.nsISupportsPriority) {
  ch.priority = Components.interfaces.nsISupportsPriority.PRIORITY\_LOWEST;
}
```

For convenience, the interface defines several standard priority values that you can use, ranging from `PRIORITY_HIGHEST` to `PRIORITY_LOWEST`.

Getting an nsIChannel from XMLHttpRequest
-----------------------------------------

If you are programming in JavaScript, you will probably want to use XMLHttpRequest, a much higher level abstraction of an HTTP request. You can access the `channel` member of an XMLHttpRequest once you have called the `open` method on it, as follows:

```js
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);
```

**Note:** This example uses a synchronous XMLHttpRequest, which you should not use in practice.

Adjusting priority
------------------

`nsISupportsPriority` 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:

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

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


What's New in Deer Park Alpha - Mozilla

What's New in Deer Park Alpha
=============================

This page is based largely on https://www.squarefree.com/burningedg...eases/ (thanks Jesse).

### New Web Developer Features

#### HTML

Elements with `tabindex="-1"` should be focusable

Elements with a negative tabIndex attribute can now have focus, even though they are not in the tab order.

Object should submit

In accordance with the HTML4 specification, `<object>` elements can now be submitted as part of a form.

#### CSS

CSS2 quotes nesting

Starting with this release, the `quotes` CSS2 property is fully supported, with the correct quote (depending on the nesting level) used for open-quote and close-quote.

CSS3 `:only-child`

This CSS3 selector allows selecting an element that has no other elements as siblings in the DOM.

CSS3 columns

An experimental implementation of the proposed CSS3 multicolumn layout draft. This allows easily doing newspaper-like multicolumn presentation.

CSS3 `overflow-x` and `overflow-y` properties

These properties can be used to control the overflow behavior in the horizontal and vertical directions somewhat independently. For example, overflow in the horizontal direction could be hidden while overflow in the vertical direction can be scrolled to.

CSS3 cursors

More mouse cursor names are now supported.

URI values on CSS `cursor` properties

 On Windows, OS/2 and Linux (Gtk+ 2.x) one can now use an arbitrary image as the mouse cursor while a given DOM node is being hovered.
 Any image format supported by Gecko can be used for the image.
 (SVG, animated GIF, and ANI cursors are not supported.)
 See `cursor` for a description of the feature.

`-moz-outline-radius`

CSS outlines can now have rounded corners.

CSS `outline` property

CSS outlines can now be used. These differ from borders in that they don't affect the page layout.

Counters in CSS-generated content

CSS2 counters are now completely supported (the implementation doesn't match the current CSS2.1 draft, but matches the upcoming one). This allows automatic numbering of sections, headings, and so forth via stylesheets.

#### JavaScript and DOM

Array extras

New methods have been added to the Array object to facilitate common tasks. See JavaScript 1.5 Array Object.

`document.open("text/plain")`

Text written in new documents created with document.open("text/plain") is now treated as text rather than HTML, so line breaks will remain intact and tags will not be parsed.

XML Events

"XML Events" is a W3C specification to provide XML languages with the ability to integrate declarative event listeners and event handlers.

Cancelling keydown

Cancelling the keydown event now properly cancels any corresponding keyup/keypress events, per the DOM specification.

Accessibility APIs for DHTML

Mozilla now allows DHTML authors to add role and state semantics to custom elements, and exposes that information via MSAA and ATK.

DHTML Performance Fixes

A number of changes were made to significantly improve DHTML speed and smoothness.

#### Graphics

SVG Support

SVG is W3C specification providing resolution-independent scalable vector graphics, along with a DOM. A technology preview of native SVG support is included in this release. Currently a subset of SVG 1.1 Full, missing functionality includes filters, declarative animation, and SVG defined fonts.

`<canvas>` Support

`<canvas>` is a scriptable drawing surface for dynamically creating bitmap graphics. For a further introduction, see Drawing Graphics with Canvas.

#### Miscellaneous

Support HTTP/1.1 408 response code

A persistent connection is now correctly closed when a 408 response code (Request timeout) is received. The request is retried in a new connection.

URIs always sent as UTF8

URIs are now always sent to the server as UTF8, regardless of the linking page's encoding. This fixes images and links on sites with non-ASCII filenames.

XForms support

The W3C's XML Forms language allows writing complex forms in XML, and includes features that regular HTML forms do not have, such as client side validation against XML Schema and XML submission/retrieval. Support for XForms comes as an extension, see Mozilla XForms Project Page.

### New Extension Developer Features

Hidden referrer column for history

Extensions can now access the referer information for pages stored in the browser history. This feature can be used to provide alternate history views and other useful functionality. Firefox bug 128398

API for prioritizing HTTP connections

The Mozilla networking library now supports the prioritization of connections to a specific server using `nsISupportsPriority`. Firefox bug 278531

API for managing user and UA stylesheets

Extensions can now register stylesheet URIs as additional user and UA stylesheets. This means extensions no longer have to try to edit `userContent.css` to add styling (say for XBL binding attachment) to web pages. See Using the Stylesheet Service.

API for configuring proxies

It is now possible for extensions to easily override the proxy configuration without affecting user-visible preferences. See `nsIProtocolProxyService`, `nsIProtocolProxyFilter`, and `nsIProtocolProxyCallback`. Firefox bug 282442

Dynamic Overlays

Loading of XUL overlays after the document has been displayed is now supported. See `nsIDOMXULDocument`. Firefox bug 282103

ECMAScript for XML (E4X)

The Mozilla JavaScript engine now supports ECMAScript for XML (E4X), a draft ECMA standard that adds native XML datatypes to the language and provides operators for common XML operations. See the ECMA specification. Firefox bug 246441

Translucent Windows (Windows/Linux)

On Windows and Linux, XUL windows with a transparent background are now supported. This allows whatever is below the window to shine through the window background.

Adding tokens to the User-Agent string

 It is now possible for applications, extensions, and vendors to all add tokens to the User-Agent string (using default preferences) without overwriting each other.
 See documentation. Firefox bug 274928

Toolkit chrome registry

 Chrome registration has been significantly improved to use simple plaintext chrome registration manifests, and no longer keeps the chrome.rdf/overlayinfo cache.
 See Chrome Registration.

Extension Manager

Following are the new features:

* It is now possible to have Extensions outside the profile and application Extensions directories.
* Installing extensions can now be done by dropping an XPI into the profile or application Extensions directory.
* Uninstalling an Extension now involves deleting its folder from the profile or application Extensions directory.

New Preferences bindings

These new bindings make it easier to create preferences windows for extensions. The new preferences windows support instant-apply behavior, which is enabled by default on Mac and Linux.

API for implementing new command-line switches

An API has been introduced so that extensions can easily handle complex command-line flags. This API will be stable and frozen for 1.1. See the interfaces `nsICommandLine` and `nsICommandLineHandler`.

XTF Support

The eXtensible Tag Framework allows adding support for new namespaces using XPCOM components to Mozilla (written in JavaScript or C++). See XTF Home Page.

### New Browser Features

#### Improved Preferences

Instant Apply behavior on Linux and Mac

Changes made in the Preferences window now apply immediately, in line with typical behavior in other Mac OS X and GNOME applications. This changes conforms with the Apple and GNOME Human Interface Guidelines.

Searchable download actions manager

It is possible to search the Download Actions manager by file extension or description.

Searchable cookie manager

Cookies can be searched by hostname/domain and cookie name, and are organized by hostname in a tree format instead of a flat list.

#### Deployment

Firefox MSI package

The new MSI installation package facilitates distributed installation and provides greater flexibility to network administrators wanting to deploy Firefox in a corporate environment.

Support for profile "temp" directory on local filesystem

It is now possible to store the network cache (copies of visited webpages) and the XUL fastload cache (precompiled user interface code) on a local disk, while keeping the rest of the profile data on a network drive. This will increase performance and reduce network traffic for users in a network environment.

#### Other

"Sanitize" privacy feature

The "Sanitize" feature provides an easy way to quickly remove browsing history, cookies, cache, saved form information, and other personal data. The items to be removed can be customized, and the feature can be activated using either a keyboard shortcut or through a menu item.

Image thumbnails as tab icons

When viewing images, tab icons now display thumbnails of the displayed image.

Fast back (and forward)

This very experimental feature allows much faster session history navigation. The feature is off by default but can be enabled for testing purposes by setting the `browser.sessionhistory.max_viewers` preference to a nonzero number.

Anonymous FTP login failure behavior

FTP users are now prompted to input a name and password if anonymous access fails.

CSS at-rule for matching on site/document URL

The new `@-moz-document` rule gives users the ability to match page objects per-site, using CSS. This makes it possible to include site-specific rules in user style sheets (userContent.css). David Baron's post to `www-style` explains how the rule can be used.


Using Firefox 1.5 caching - Mozilla

Using Firefox 1.5 caching
=========================

Firefox 1.5 uses in-memory caching for entire Web pages, including their JavaScript states, for a single browser session. Going backward and forward between visited pages requires no page loading and the JavaScript states are preserved. This feature, referred to by some as **bfcache** (for "Back-Forward Cache"), makes page navigation very fast. This caching state is preserved until the user closes the browser.

There are instances in which Firefox doesn't cache pages. Below are some common programmatic reasons that a page is not cached:

* the page uses an `unload` or `beforeunload` handler;
* the page sets "cache-control: no-store".
* the site is HTTPS and page sets at least one of:
    + "Cache-Control: no-cache"
    + "Pragma: no-cache"
    + with "Expires: 0" or "Expires" with a date value in the past relative to the value of the "Date" header (unless "Cache-Control: max-age=" is also specified);
* the page is not completely loaded when the user navigates away from it or has pending network requests for other reasons (e.g. `XMLHttpRequest`));
* the page has running IndexedDB transactions;
* the top-level page contains frames (e.g. `<iframe>`) that are not cacheable for any of the reasons listed here;
* the page is in a frame and the user loads a new page within that frame (in this case, when the user navigates away from the page, the content that was last loaded into the frames is what is cached).

This new caching feature changes page loading behavior, and Web authors may want to:

* know that a page has been navigated to (when it is being loaded from a user's cache)
* define page behavior when a user leaves the page (while still enabling the page to be cached)

Two new browser events enable Web authors to do both.

New browser events
------------------

If you use these new events, your pages will continue to display properly in other browsers (we've tested earlier versions of Firefox, Internet Explorer, Opera, and Safari), and will use this new caching functionality when loaded in Firefox 1.5.

Note: as of 10-2009 development versions of Safari added support for these new events (see the WebKit bug).

Standard behavior for Web pages is:

1. User navigates to a page.
2. As the page loads, inline scripts run.
3. Once the page is loaded, the `onload` handler fires.

Some pages include a fourth step. If a page uses an `unload` or `beforeunload` handler, it fires when the user navigates away from the page. If an `unload` handler is present, the page will not be cached.

When a user navigates to a cached page, inline scripts and the `onload` handler do not run (steps 2 and 3), since in most cases, the effects of these scripts have been preserved.

If the page contains scripts or other behaviors that fire during loading that you want to continue to execute every time the user navigates to the page, or if you want to know when a user has navigated to a cached page, use the new `pageshow` event.

If you have behaviors that fire when a user navigates away from the page, but you want to take advantage of this new caching feature, and therefore don't want to use the unload handler, use the new `pagehide` event.

### pageshow event

This event works the same as the `load` event, except that it fires every time the page is loaded (whereas the `load` event doesn't fire in Firefox 1.5 when the page is loaded from cache). The first time the page loads, the `pageshow` event fires just after the firing of the `load` event. The `pageshow` event uses a boolean property called `persisted` that is set to `false` on the initial load. It is set to `true` if it is not the initial load (in other words, it is set to true when the page is cached).

Set any JavaScript that you want to run every time a page loads to run when the `pageshow` event fires.

If you call JavaScript functions as part of the `pageshow` event, you can ensure these functions are called when the page is loaded in browsers other than Firefox 1.5 by calling the `pageshow` event as part of the `load` event, as shown in the sample later in this article.

### pagehide event

If you want to define behavior that occurs when the user navigates away from the page, but you don't want to use the `unload` event (which would cause the page to not be cached), you can use the new `pagehide` event. Like `pageshow`, the `pagehide` event uses a boolean property called `persisted`. This property is set to `false` if the page is not cached by the browser and set to `true` if the page is cached by the browser. When this property is set to `false`, the `unload` handler, if present, fires immediately after the `pagehide` event.

Firefox 1.5 tries to simulate load events in the same order they would occur when the page is initially loaded. Frames are treated the same way as the top-level document. If the page contains frames, then when the cached page is loaded:

* `pageshow` events from each frame fire before the `pageshow` event in the main document fires.
* When the user navigates away from the cached page, the `pagehide` event from each frame fires before the `pagehide` event in the main document.
* For navigation that occurs inside a single frame, events fire only in the affected frame.
Sample code
-----------

The sample below illustrates a page that uses both the `load` and `pageshow` events. This sample page behaves as follows:

* In browsers other than Firefox 1.5, the following occurs each time the page loads: the `load` event triggers the `onLoad` function, which calls the `onPageShow` function (as well as an additional function).
* In Firefox 1.5, the first time the page is loaded, the `load` event operates the same way as in other browsers. In addition, the `pageshow` event fires, and as `persisted` is set to `false`, no additional action occurs.
* In Firefox 1.5, when the page is loaded from cache, only the `pageshow` event fires. As `persisted` is set to `true`, only the JavaScript actions in the `onPageShow` function are triggered.

In this example:

* The page calculates and displays the current date and time each time the page is loaded. This calculation includes the seconds and milliseconds so you can easily test the functionality.
* The cursor is placed in the Name field of the form the first time the page is loaded. In Firefox 1.5, when the user navigates back to the page, the cursor remains in the field it was when the user navigated away from the page. In other browsers, the cursor moves back to the Name field.

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Order query Firefox 1.5 Example</title>
    <style type="text/css">
 body,
 p {
 font-family: Verdana, sans-serif;
 font-size: 12px;
 }
 </style>
    <script>
 function onLoad() {
 loadOnlyFirst();
 onPageShow();
 }

 function onPageShow() {
 //calculate current time
 var currentTime = new Date();
 var year = currentTime.getFullYear();
 var month = currentTime.getMonth() + 1;
 var day = currentTime.getDate();
 var hour = currentTime.getHours();
 var min = currentTime.getMinutes();
 var sec = currentTime.getSeconds();
 var mil = currentTime.getMilliseconds();
 var displayTime =
 month +
 "/" +
 day +
 "/" +
 year +
 " " +
 hour +
 ":" +
 min +
 ":" +
 sec +
 ":" +
 mil;
 document.getElementById("timefield").value = displayTime;
 }

 function loadOnlyFirst() {
 document.zipForm.name.focus();
 }
 </script>
  </head>
  <body onload="onLoad();" onpageshow="if (event.persisted) onPageShow();">
    <h2>Order query</h2>

    <form
 name="zipForm"
 action="http://www.example.com/formresult.html"
 method="get">
      <label for="timefield">Date and time:</label>
      <input type="text" id="timefield" /><br />
      <label for="name">Name:</label>
      <input type="text" id="name" /><br />
      <label for="address">Email address:</label>
      <input type="text" id="address" /><br />
      <label for="order">Order number:</label>
      <input type="text" id="order" /><br />
      <input type="submit" name="submit" value="Submit Query" />
    </form>
  </body>
</html>
```

In contrast, if the above page did not listen for the `pageshow` event and handled all calculations as part of the `load` event (and instead was coded as shown in the sample code fragment below), both the cursor position and date/time would be cached in Firefox 1.5 when the user navigated away from the page. When the user returned to the page, the cached date/time would display.

```html
<script>
function onLoad() {
 loadOnlyFirst();

//calculate current time
 var currentTime= new Date();
 var year = currentTime.getFullYear();
 var month = currentTime.getMonth()+1;
 var day = currentTime.getDate();
 var hour=currentTime.getHours();
 var min=currentTime.getMinutes();
 var sec=currentTime.getSeconds();
 var mil=currentTime.getMilliseconds();
 var displayTime = (month + "/" + day + "/" + year + " " +
 hour + ":" + min + ":" + sec + ":" + mil);
 document.getElementById("timefield").value=displayTime;
}

function loadOnlyFirst() {
 document.zipForm.name.focus();
}
</script>
</head>

<body onload="onLoad();">
```

Developing Firefox extensions
-----------------------------

Firefox 1.5 extensions need to allow for this caching functionality. If you are developing a Firefox extension that you want to be compatible with both 1.5 and earlier versions, make sure that it listens for the `load` event for triggers that can be cached and listens for the `pageshow` event for triggers that shouldn't be cached.

For instance, the Google Toolbar for Firefox should listen for the `load` event for the autolink function and to the `pageshow` event for the PageRank function in order to be compatible with both 1.5 and earlier versions.


SVG improvements in Firefox 3 - Mozilla

SVG improvements in Firefox 3
=============================

Firefox 3 offers improved Scalable Vector Graphics (SVG) support over prior versions of Firefox. While these features are documented elsewhere, this article serves as a convenient list so you can easily determine which features were added in Firefox 3.

* The `foreignObject` element is now supported (Firefox bug 326966). See the specification or this article for details.
* `pattern` element support (spec)
* `mask` element support (spec)
* Support for all SVG 1.1 filters (spec):
    + `filter`
    + `feDistantLight`
    + `fePointLight`
    + `feSpotLight`
    + `feBlend`
    + `feColorMatrix`
    + `feConvolveMatrix`
    + `feComponentTransfer`, `feFuncR`, `feFuncG`, `feFuncB`, `feFuncA`
    + `feComposite`
    + `feConvolveMatrix`
    + `feDiffuseLighting`
    + `feDisplacementMap`
    + `feDistantLight`
    + `feFlood`
    + `feGaussianBlur`
    + `feImage`
    + `feMerge`, `feMergeNode`
    + `feMorphology`
    + `feOffset`
    + `fePointLight`
    + `feSpecularLighting`
    + `feTurbulence`
    + `feTile`
* `<a>` element handling in SVG has had several bugs fixed; see Firefox bug 267664, Webkit bug 268135, Webkit bug 316248, Webkit bug 317270 and Webkit bug 320724.
* The SVG DOM Methods `getNumberOfChars()`, `getComputedTextLength()`, `getSubStringLength()`, `getStartPositionOfChar()`, `getEndPositionOfChar()`, `getRotationOfChar()`, and `getCharNumAtPosition()` have been implemented.
* the `xml:space` attribute support (spec)
* fallback `fill`/`stroke` are now supported (spec)
* `em` and `ex` units are now supported for indicating lengths (Firefox bug 305859).
See also
--------

* SVG
* Firefox 3 for developers


Updating web applications for Firefox 3 - Mozilla

Updating web applications for Firefox 3
=======================================

There are a number of changes in the upcoming Firefox 3 that may affect your website or web application, as well as new features you may wish to take advantage of. This article will serve as a starting point as you work on updating your content to take the fullest possible advantage of Firefox 3.

DOM changes
-----------

 Nodes from external documents should be cloned using `document.importNode()` (or adopted using `document.adoptNode()`) before they can be inserted into the current document. For more on the `Node.ownerDocument` issues, see the
 W3C DOM FAQ.

Firefox doesn't currently enforce this rule (it did for a while during the development of Firefox 3, but too many sites break when this rule is enforced). We encourage Web developers to fix their code to follow this rule for improved future compatibility.

HTML changes
------------

### Changes to character set inheritance

Firefox 3 closes a security bug in frames and iframes that allowed them to inherit the parent's character set. This could cause problems in certain cases. Now, frames are only allowed to inherit the parent's character set if both frame and parent were loaded from the same server. If you have pages that assume that frames loaded from other servers will inherit the same character set, you should update the frames' HTML to indicate their character set specifically.

### Change to the SCRIPT element

The `<script>` element in `text/html` documents now requires a closing `</script>` in HTML 4 documents, even if you're not including any content in between. While in previous versions of Firefox, you could do:

```html
<script … />
```

Now the markup must comply with the HTML specifications (if it's actually HTML), and hence you must actually close it, like this:

```html
<script …></script>
```

This improves both compatibility and security.

CSS changes
-----------

### Change to font-size based on em, ex units

font-size values in em and ex units used to be affected by the user's minimum font size setting: if a font was displayed larger due to the minimum font size, the em and ex units for font-size settings based on this one would be enlarged accordingly. This was inconsistent with the way percentage-based font sizes behaved.

font-size values in em and ex units are now based on an "intended font size" that is not affected by the user's minimum font size. In other words, font sizes are always calculated according to the designer's intention and are adjusted for minimum font size afterwards.

See Firefox bug 434718, especially its NOT A CASE FOR THE BUG TEMPLATE - The following link points to a Bugzilla attachment, not a Bugzilla bug; if you use the attachment number as a bug number, it becomes nonsense attachment 322943 NOT A CASE FOR THE BUG TEMPLATE for a demonstration (must be watched with a minimum font size >= 6 to see the difference: the two box cascades behave differently in Firefox 2, because the em-based font-size "bounces" off the minimum font size).

Security changes
----------------

### Chrome access

In prior versions of Firefox, any web page could load scripts or images from chrome using the `chrome://` protocol. Among other things, this made it possible for sites to detect the presence of add-ons — which could be used to breach a user's security by bypassing add-ons that add security features to the browser.

Firefox 3 only allows web content to access items in the `chrome://browser/` and `chrome://toolkit/` spaces. These files are intended to be accessible by web content. All other chrome content is now blocked from access by the web.

There is, however, a way for extensions to make their content web-accessible. They can specify a special flag in their `chrome.manifest` file, like this:
```

content mypackage location/ contentaccessible=yes
```

This shouldn't be something you need to do very often, but it's available for those rare cases in which it's needed. Note that it's possible that Firefox may alert the user that your extension uses the `contentaccessible` flag in this way, as it does constitute a potential security risk.

**Note:** Because Firefox 2 doesn't understand the `contentaccessible` flag (it will ignore the entire line containing the flag), if you want your add-on to be compatible with both Firefox 2 and Firefox 3, you should do something like this:

```bash
content mypackage location/
content mypackage location/ contentaccessible=yes
```

### File upload fields

In prior versions of Firefox, there were cases in which when the user submitted a file for uploading, the entire path of the file was available to the web application. This privacy concern has been resolved in Firefox 3; now only the filename itself is available to the web application.

### Using remote JARs in frames

Using code in JAR files loaded from other domains is no longer allowed in frames; this mitigates a potential attack vector.

### Changes to same-origin policy for file: URIs

The same-origin policy for file: URIs has changed in Firefox 3. This may affect your content; please see Same-origin policy for file: URIs for details.

JavaScript changes
------------------

Firefox 3 supports JavaScript 1.8. One important change that may require updates to your website or application is that the obsolete and non-standard `Script` object is no longer supported. This is not the `<script>` tag, but a JavaScript object that was never standardized. It is unlikely this is something you ever used anyway, so you're probably fine.

See also
--------

* Firefox 3 for developers
* New in JavaScript 1.8
* Updating extensions for Firefox 3


Site compatibility for Firefox 3 - Mozilla

Site compatibility for Firefox 3
================================

This page tries to give an overview of the changes between Gecko 1.8 and Gecko 1.9, that could possibly affect websites in their behavior or rendering.

See also Firefox 3 for developers.

Events
------

### Capturing load event listeners

In Gecko 1.8, it was not possible to set capturing load event listeners on images. In Gecko 1.9, this has been fixed by Firefox bug 234455. But this can cause problems on websites that incorrectly have their event listeners set to capture the load event. See the discussion in Webkit bug 335251. To fix this problem, the problematic page in question should not set a capturing load event listener.

For example, this:

```bash
window.addEventListener('load', yourFunction, true);
```

should be changed into this:

```bash
window.addEventListener('load', yourFunction, false);
```

For an explanation of how event capture works, see DOM Level 2 Event capture

### `preventBubble` has been removed

In Gecko 1.8, the `preventBubble` method existed on events to prevent events from bubbling upwards. In Gecko 1.9 this method has been removed. Instead, you should use the standard stopPropagation(), which also works fine in Gecko 1.8. The patch in Firefox bug 330494 made this happen. See also Webkit bug 105280.

### A few other old event APIs are no longer supported

`window.captureEvents`, `window.releaseEvents` and `window.routeEvent` are now considered deprecated since Gecko 1.9.

DOM
---

### `WRONG_DOCUMENT_ERR`

Nodes from external documents should be cloned using `document.importNode()` (or adopted using `document.adoptNode()`) before they can be inserted into the current document. For more on the `Node.ownerDocument` issues, see the W3C DOM FAQ.

Firefox doesn't currently enforce this rule (it did for a while during the development of Firefox 3, but too many sites break when this rule is enforced). We encourage Web developers to fix their code to follow this rule for improved future compatibility.

Ranges
------

### `intersectsNode` has been removed

In Gecko 1.8 the function `intersectsNode` code be used to test if a node intersected a range. However the return values from this function were confusing and rarely useful and has therefore been removed in Gecko 1.9. Instead use the more precise and standard function compareBoundaryPoints. The patch in Firefox bug 358073 removed this function.

See the documentation for intersectsNode for how to use `compareBoundaryPoints` instead.

### `compareNode` has been removed

In Gecko 1.8 the function `compareNode` code be used to test how a node intersected a range. However the return values from this function were confusing and rarely useful and has therefore been removed in Gecko 1.9. Instead use the more precise and standard function compareBoundaryPoints. The patch in Firefox bug 358073 removed this function.

See the documentation for compareNode for how to use `compareBoundaryPoints` instead.

HTML
----

### Many bugs in the `<object>` have been fixed

`object` and `embed` elements no longer need a `type` attribute to render. Changing the `src` attribute (of `<embed>`) or the `data` attribute (of `<object>`) via JavaScript now works correctly. The Content-Type header sent by the server (if any) now takes precedence over the `type` attribute of an `<object>` element as per the HTML specification (this is not the case for `embed`).


DOM improvements in Firefox 3 - Mozilla

DOM improvements in Firefox 3
=============================

Firefox 3 offers a number of improvements to the Document Object Model (DOM), especially in regard to support for extensions to the DOM added by other browsers. This article provides a list of those improvements as well as links to more detailed documentation.

* The Internet Explorer `clientTop` and `clientLeft` DOM extensions are now supported.
* The `window.fullScreen` property is now always accurate no matter where it is read, even in content. Previously it would return `false` inaccurately (Firefox bug 127013).
* The `getClientRects` and `getBoundingClientRect` DOM extensions are now supported (see Firefox bug 174397).
* The Internet Explorer `elementFromPoint` DOM extension is now supported (Firefox bug 199692).
* The Internet Explorer `oncut`, `oncopy`, and `onpaste` DOM extensions are now supported (Firefox bug 280959).
* Added privileged-code-only getters for `Node.nodePrincipal`, `Node.baseURIObject`, and `document.documentURIObject`. Chrome code must not touch (get or set) these properties on an unwrapped content object (e.g. on a `wrappedJSObject` of an `XPCNativeWrapper`), see Firefox bug 324464 for details.
* The Web Applications 1.0 (HTML5) `getElementsByClassName()` DOM method is now supported.
* The Web Applications 1.0 (HTML5) `window.postMessage` DOM method is now supported. This method allows a limited, opt-in form of client-side communication between windows not necessarily on the same domain.
* The `charCode` value of the `keypress` event is changed to an ASCII character if the accelerator key is pressed. Otherwise the `charCode` is the unmodified character (excepting `Shift` state). See Gecko Keypress Event.
### See also

* Firefox 3 for developers
* CSS improvements in Firefox 3
* DOM


XUL improvements in Firefox 3 - Mozilla

XUL improvements in Firefox 3
=============================

Firefox 3 provides a number of new XUL elements, as well as improvements to existing elements. While this material is documented in detail elsewhere, this article provides a convenient list of these improvements as well as links to the detailed documentation.

### New elements

* Numeric controls:
    + The new `<scale>` element lets you create sliding scales that let the user select any value in a specified range. This widget would typically be used, for example, to create a volume control.
    + A new value, `number`, for the `type` attribute of textboxes creates a textbox in which only numbers may be entered. In addition, arrow buttons appear to one side which may be used to step through values. More information about numeric textboxes. (Firefox bug 345510)
    + A `<spinbuttons>` element is added which can be used when creating widgets using XBL bindings. (Firefox bug 155053)
    + Two widgets, `<datepicker>` and `<timepicker>`, can be used to allow the entry of dates and times. The datepicker is available in a number of styles by setting the `type` attribute, to allow entry with textboxes or a calendar grid. More information about date pickers.
* A guide has been created for menus and popups describing new features available:
    + A `<dropmarker>` element is added which is useful when creating menu-like widgets using XBL bindings. (Firefox bug 348614)
    + The `<panel>` element is new and designed for popups that are not menus. They can support any type of content. The <menupopup> element should be used for menus. Menus provide keyboard navigation and support opening and closing submenus.
### Improvements to trees

* Trees can now be scrolled horizontally. If the columns don't fit into the available width, a horizontal scrollbar appears. This happens if the columns' specified widths add up to more than the available space. See Firefox bug 212789 for details.
* A new selection style allows cells to be selected individually, instead of entire rows. To use this selection style, set the tree's `seltype` attribute to `cell`.
* Trees now support editing of individual cells. When the user double-clicks an editable cell, a text field appears in which the user can edit the cell's contents. See these notes for details.
* <treecol> elements now support an `overflow` attribute which may be set to true to allow the text of cells within that column to expand to neighboring blank cells if the text is too large to fit into that single cell.
### Improvements to menus

* The `image` attribute is now used consistently for setting images.
* Menulists fire the `select` event when selecting an item.
* The `inputField` and `editable` properties have been added to menulist
* The `<menu>`, `<menuitem>` and `<menuseparator>` elements now have a readonly `selected` property which retrieves whether the item is selected in a <menulist>
* The `<menu>`, `<menuitem>` and `<menuseparator>` elements now have a readonly `control` property which returns the enclosing <menulist>
* The `<menu>`, `<menuitem>` and `<menuseparator>` elements now support the `accessKey`, `disabled`, `crop`, `image` and `label` properties which set the corresponding attribute
* The <menu> element now has methods to append, insert and remove menuitems. (Firefox bug 372552)
* Editable menulists now offer an `editor` property to get the internal `nsIEditor` for its text field.
* Menus may now be made translucent on platforms that support it (Firefox bug 70798).
### Improvements to textboxes

* Setting a textbox's `spellcheck` attribute to `true` enables inline spellchecking for that textbox.
* The `<textbox>` now has a `reset()` method to reset the value of the textbox to the default value. The `defaultValue` property may be used to retrieve and modify the default value of the textbox.
* An `editor` property is now offered, which lets you get the internal `nsIEditor` for the text field.
* `textbox` now supports a `newlines` attribute which specifies how line breaks in pasted text are handled. Possible values are:
    + `pasteintact` - paste everything as is
    + `pastetofirst` - (default value) paste only up to the first line break
    + `replacewithspaces` - replace line breaks with spaces
    + `replacewithcommas` - replace line breaks with commas
    + `strip` - strip out all line breaks
    + `stripsurroundingwhitespace` - strip out all line breaks and surrounding whitespace
### Other improvements

* The `type` attribute on a `<button>` may be set to `repeat` to create buttons which fire their command event repeatedly while the mouse button is held down.
* The `buttondisabledaccept` attribute can now be used on the `<dialog>` element to have the accept (OK) button initially disabled.
* The `<titlebar>` element now supports the `allowevents` attribute to allow events to be passed to the children of the titlebar.
* The `<splitter>` now supports an additional value for the `collapse` attribute of `'both'` which indicates that the splitter can collapse elements on both sides of it when dragged. The `substate` attribute will set to either before or after when one is collapsed. (Firefox bug 337955)
* The `<richlistbox>` element now supports multiple selection. Set the `seltype` attribute to `'multiple'` to enable this.
* The `<radio>` element has a `group` attribute which may be set to the id of a `<radiogroup>` element which the radio button belongs to. This allows the radio buttons to arranged in a manner that may not be as suitable when placing them all inside a radiogroup.
* Menus, panels and tooltips support two additional methods, `openPopup()` and `openPopupAtScreen()`. These methods should be used instead of `showPopup()` which was found to be confusing to use.
* Handling of the `<key>` element improved for non-Latin keyboard layout users.
* On Mac OS X, the `activetitlebarcolor` and `inactivetitlebarcolor` attributes of the root elements (`<window>`, `<dialog>`, `<prefwindow>` and `<wizard>`) are available to customize the color of the windows' title bars.
### See also

* Firefox 3 for developers


Using an external spell checker - Mozilla

Using an external spell checker
===============================

Starting with Firefox 3 (as well as Thunderbird 3 and SeaMonkey 2), you can now install an external spell checker using an extension.

This is *not* for extensions who wants to add a dictionary to the built in Hunspell spell checker.

An example of a spell checker extension can be found as part of the Voikko project.

Implementing spell checker support
----------------------------------

Implementing a spell checker requires the following steps be taken:

1. Implement a class derived from `mozISpellCheckingEngine` that implements the required functionality or accesses an external spell checker.
2. The `mozISpellCheckingEngine` method `mozISpellCheckingEngine.getDictionaryList()` should be implemented to return a list of dictionaries supported by the spell checker.
3. The extension needs to provide a registration callback. The registration callback must use `nsICategoryManager` to install into the category "spell-check-engine" an entry with a name equal to the contract ID of the class implementing the spell check functionality.
4. The extension also needs to provide an unregistration callback, which must remove the category entry.

The value of the category entry may be chosen as desired. You may, for example, choose to use it to record the path to the shared library used by the extension to handle spell checking, to make it easy to locate by other components of the extension.

Spell check dictionary prioritization
-------------------------------------

Dictionaries provided by spell check extensions override built-in dictionaries. If multiple extensions supply dictionaries for the same language, the first one found is used.