Firefox 8 for developers

  • Revision slug: Firefox_8_for_developers
  • Revision title: Firefox 8 for developers
  • Revision id: 60235
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 2 words added, 2 words removed

Revision Content

{{ draft() }}

{{ ReleaseChannelInfo("8") }}

Changes for web developers

HTML

  • The {{ domxref("HTMLImageElement") }} crossOrigin property has been added. (see {{ bug("664299") }})
  • The {{ domxref("HTMLSelectElement","","add()") }} method now supports either an item or index of an item that the new item should be inserted before. Previously it only supported an item. (see {{ bug("666200") }})
  • The HTMLIsIndexElement constructor has been removed. No elements have implemented this interface since before Firefox 4.
  • The HTML5 "context menu" feature (contextmenu attribute), which lets you add custom element specific items to native context menu, is now supported (the implementation is still experimental awaiting changes in the specification; see {{ bug("617528") }}).
  • The {{ HTMLElement("input") }} and {{ HTMLElement("textarea") }} elements now support the selectionDirection attribute, and their setSelectionRange() methods have been updated to support optionally specifying a direction.

DOM

  • The {{ domxref("Element.insertAdjacentHTML","insertAdjacentHTML") }} method has been implemented.
  • {{ domxref("BlobBuilder") }} now has a getFile() method that returns the content of the blob as a file.
  • Event handling in nested {{ HTMLElement("label") }}s has been fixed.
  • When editing {{ domxref("element.contenteditable") }} areas, exiting a heading by pressing return, or exiting list editing mode by pressing return twice, now returns to paragraph entry mode (that is, paragraphs inside {{ HTMLElement("p") }} blocks) instead of separating lines by {{ HTMLElement("br") }} elements.
  • Fixed a bug that prevents justification from taking effect properly when applied to the first line in a {{ domxref("element.contenteditable") }} area.
  • Fixed a bug that caused pressing delete or backspace at the beginning of a {{ domxref("element.contenteditable") }} area to affect the previous contenteditable block if one is present.
  • {{ domxref("document.getSelection()") }} now returns the same Selection object as {{ domxref("window.getSelection()") }}, instead of stringifying it.
  • The HTML5 selectionDirection property makes it possible to define the direction of the selection in an editable text.
  • {{ domxref("Range") }} and {{ domxref("Selection") }} objects now behave according to their specifications when {{ domxref("Text.splitText()", "splitText()") }} and {{ domxref("Node.normalize", "normalize()") }} are called.
  • {{ domxref("HTMLMediaElement") }} now have a seekable property that return a {{ domxref("TimeRanges") }} object.
  • crossOrigin property defaults to "Anonymous" when an invalid value is used.
  • window.navigator.taintEnabled has been removed; it has not been supported in many years.
  • {{ domxref("window.navigator.cookieEnabled") }} now returns correct information when the default cookie setting is overridden on a per-site basis.

JavaScript

CSS

  • {{ cssxref("resolution") }} now accepts {{ xref_cssnumber() }}, not just {{ xref_cssinteger() }} values as per the specification.
  • Hyphenation rules have been added for many new languages when using {{ cssxref("hyphen") }}.

Network

  • Double quotes are no longer accepted as a delimiter for {{ RFC("2231") }} or {{ RFC("5987") }} encoding, as per those RFCs.
  • Content-Disposition parser no longer requires "=" in parameters.
  • Scripts are no longer downloaded when JavaScript is disabled.

WebSockets

  • The WebSocket object's send() method no longer incorrectly returns a Boolean value.
  • The WebSocket constructor now supports an array of protocols as well as a single protocol string.
  • Mixed-content is not allowed with WebSockets.
  • Connection errors with WebSockets now trigger the onerror handler.
  • WebSocket API has been updated to the latest draft of the specification (see {{ bug("674890") }}, {{ bug("674527") }}, and {{ bug("674716") }})

WebGL

  • Cross-domain textures can now be allowed with CORS approval.
  • Cross-process rendering with Direct2D/Direct3D 10.

MathML

  • Support for the displaystyle attribute on the top-level {{ MathMLElement("math") }} element has been added.
  • The interpretation of negative row numbers for the align attribute on {{ MathMLElement("mtable") }} has been corrected.

Developer tools

  • The console object has a new dir() method, which displays an interactive list of the properties on a specified object.

Changes for Mozilla and add-on developers

Note: Firefox 8 requires that binary components be recompiled, as do all major releases of Firefox. See Binary Interfaces for details.

XPCOM

Components.utils
The new methods Components.utils.createObjectIn() and Components.utils.makeObjectPropsNormal() have been created to make it easier to create objects in specific compartments.

JavaScript code modules

ISO8601DateUtils.jsm

  • This code module has been removed. The parse() method now supports ISO 8601 dates and should be used instead.

Changes to the build system

  • The following build configuration options have been removed:
    • --enable-timeline
    • --disable-storage
    • --necko-disk-cache

Chrome registration

  • The platformversion flag can be used in the chrome.manifest to specify Gecko version compatibility.

Interface changes

  • The {{ ifmethod("mozIJSSubScriptLoader", "loadSubScript") }} method now loads scripts from the startup cache when possible.
  • The ownerWindow attribute has been removed from the {{ interface("nsIAccessNode") }} interface.
  • The {{ interface("nsIDOMStorageWindow") }} interface has been merged into the {{ interface("nsIDOMWindow") }} interface.
  • All members of the {{ interface("nsIDOMWindowInternal") }} interface have been moved into the {{ interface("nsIDOMWindow") }} interface. The interface itself remains available for compatibility until Firefox 9.
  • The {{ interface("nsIMemoryReporter") }} KIND_MAPPED attribute has been deprecated in favor of KIND_NONHEAP, new unit types UNITS_COUNT_CUMULATIVE and UNITS_PERCENTAGE have been added.
  • The {{ interface("nsINetworkLinkService") }} interface has a new attribute, linkType. This attribute provides the type of network connection in use, the only Operating System currently supported is Android, all others report unknown.
  • The {{ interface("nsISelection2") }} interface has been merged into the {{ interface("nsISelectionPrivate") }} interface.
  • The {{ interface("nsISelection3") }} interface has been merged into the {{ interface("nsISelection") }} interface.
  • The {{ interface("nsISessionStartup") }} attribute state is now a jsval instead of a string, for performance reasons.
  • The {{ interface("nsIDocShell") }} attribute isActive is now false for minimized windows.

Removed interfaces

The following interfaces were implementation details that are no longer needed:

  • nsITimelineService
  • nsIDOMHTMLIsIndexElement

Other changes

  • When a window is minimized, un-minimized, or switches between full screen and windowed mode, it receives a sizemodechange event.
  • You can now use the extensions.autoDisableScopes preference to disable automatic installation of add-ons from specific add-on install locations.

See also

{{ languages( { "ja": "ja/Firefox_8_for_developers" } ) }}

Revision Source

<p>{{ draft() }}</p>
<p>{{ ReleaseChannelInfo("8") }}</p>
<h2>Changes for web developers</h2>
<h3>HTML</h3>
<ul> <li>The {{ domxref("HTMLImageElement") }} <code>crossOrigin</code> property has been added. (see {{ bug("664299") }})</li> <li>The {{ domxref("HTMLSelectElement","","add()") }} method now supports either an item or index of an item that the new item should be inserted before. Previously it only supported an item. (see {{ bug("666200") }})</li> <li>The <code>HTMLIsIndexElement</code> constructor has been removed. No elements have implemented this interface since before Firefox 4.</li> <li>The HTML5 "context menu" feature (<code>contextmenu</code> attribute), which lets you add custom element specific items to native context menu, is now supported (the implementation is still experimental awaiting changes in the specification; see {{ bug("617528") }}).</li> <li>The {{ HTMLElement("input") }} and {{ HTMLElement("textarea") }} elements now support the <code>selectionDirection</code> attribute, and their <code>setSelectionRange()</code> methods have been updated to support optionally specifying a direction.</li>
</ul>
<h3>DOM</h3>
<ul> <li>The {{ domxref("Element.insertAdjacentHTML","insertAdjacentHTML") }} method has been implemented.</li> <li>{{ domxref("BlobBuilder") }} now has a <code>getFile()</code> method that returns the content of the blob as a file.</li> <li>Event handling in nested {{ HTMLElement("label") }}s has been fixed.</li> <li>When editing {{ domxref("element.contenteditable") }} areas, exiting a heading by pressing return, or exiting list editing mode by pressing return twice, now returns to paragraph entry mode (that is, paragraphs inside {{ HTMLElement("p") }} blocks) instead of separating lines by {{ HTMLElement("br") }} elements.</li> <li>Fixed a bug that prevents justification from taking effect properly when applied to the first line in a {{ domxref("element.contenteditable") }} area.</li> <li>Fixed a bug that caused pressing delete or backspace at the beginning of a {{ domxref("element.contenteditable") }} area to affect the previous <code>contenteditable</code> block if one is present.</li> <li>{{ domxref("document.getSelection()") }} now returns the same <code>Selection</code> object as {{ domxref("window.getSelection()") }}, instead of <em>stringifying</em> it.</li> <li>The HTML5 <code>selectionDirection</code> property makes it possible to define the direction of the selection in an editable text.</li> <li>{{ domxref("Range") }} and {{ domxref("Selection") }} objects now behave according to their specifications when {{ domxref("Text.splitText()", "splitText()") }} and {{ domxref("Node.normalize", "normalize()") }} are called.</li> <li>{{ domxref("HTMLMediaElement") }} now have a <code>seekable</code> property that return a {{ domxref("TimeRanges") }} object.</li> <li><a href="/en/HTML/CORS_settings_attributes" title="en/HTML/CORS_settings_attributes"><code>crossOrigin</code> property</a> defaults to "Anonymous" when an invalid value is used.</li> <li><code>window.navigator.taintEnabled</code> has been removed; it has not been supported in many years.</li> <li>{{ domxref("window.navigator.cookieEnabled") }} now returns correct information when the default cookie setting is overridden on a per-site basis.</li>
</ul>
<h3>JavaScript</h3>
<ul> <li><code><a href="/en/JavaScript/Reference/Global_Objects/RegExp/exec" title="en/JavaScript/Reference/Global Objects/RegExp/exec">RegExp.exec()</a></code> and <code><a href="/en/JavaScript/Reference/Global_Objects/RegExp/test" title="en/JavaScript/Reference/Global Objects/RegExp/test">RegExp.test()</a></code> called with no arguments now match against the string "undefined".</li> <li><code><a href="/en/JavaScript/Reference/Global_Objects/String/search" title="en/JavaScript/Reference/Global Objects/String/search">String.search()</a></code> and <code><a href="/en/JavaScript/Reference/Global_Objects/String/match" title="en/JavaScript/Reference/Global Objects/String/match">String.match()</a></code> called with no arguments or <code>undefined</code> now match against the empty string and thus match every string.</li>
</ul>
<h3>CSS</h3>
<ul> <li>{{ cssxref("resolution") }} now accepts {{ xref_cssnumber() }}, not just {{ xref_cssinteger() }} values as per the specification.</li> <li>Hyphenation rules have been added for many new languages when using {{ cssxref("hyphen") }}.</li>
</ul>
<h3>Network</h3>
<ul> <li>Double quotes are no longer accepted as a delimiter for {{ RFC("2231") }} or {{ RFC("5987") }} encoding, as per those RFCs.</li> <li><code>Content-Disposition</code> parser no longer requires "=" in parameters.</li> <li>Scripts are no longer downloaded when JavaScript is disabled.</li>
</ul>
<h3>WebSockets</h3>
<ul> <li>The WebSocket object's <a href="/en/WebSockets/WebSockets_reference/WebSocket#send()" title="en/WebSockets/WebSockets reference/WebSocket#send()"><code>send()</code></a> method no longer incorrectly returns a Boolean value.</li> <li>The WebSocket constructor now supports an array of protocols as well as a single protocol string.</li> <li>Mixed-content is not allowed with WebSockets.</li> <li>Connection errors with WebSockets now trigger the <code>onerror</code> handler.</li> <li><a href="/en/WebSockets" title="en/WebSockets">WebSocket</a> API has been updated to the latest draft of the specification (see {{ bug("674890") }}, {{ bug("674527") }}, and {{ bug("674716") }})</li>
</ul>
<h3>WebGL</h3>
<ul> <li><a href="/en/WebGL/Cross-Domain_Textures" title="en/WebGL/Cross-Domain Textures">Cross-domain textures</a> can now be allowed with CORS approval.</li> <li>Cross-process rendering with Direct2D/Direct3D 10.</li>
</ul>
<h3>MathML</h3>
<ul> <li>Support for the <code>displaystyle</code> attribute on the top-level {{ MathMLElement("math") }} element has been added.</li> <li>The interpretation of negative row numbers for the <code>align</code> attribute on {{ MathMLElement("mtable") }} has been corrected.</li>
</ul>
<h3>Developer tools</h3>
<ul> <li>The <a href="/en/Using_the_Web_Console#The_console_object" title="en/Using_the_Web_Console#The_console_object"><code>console</code></a> object has a new <code>dir()</code> method, which displays an interactive list of the properties on a specified object.</li>
</ul>
<h2>Changes for Mozilla and add-on developers</h2>
<div class="note"><strong>Note:</strong> Firefox 8 requires that binary components be recompiled, as do all major releases of Firefox. See <a href="/En/Developer_Guide/Interface_Compatibility#Binary_Interfaces" title="En/Developer_Guide/Interface_Compatibility#Binary_Interfaces">Binary Interfaces</a> for details.</div>
<h3>XPCOM</h3>
<dl> <dt><a href="/en/Components.utils" title="en/Components.utils"><code>Components.utils</code></a></dt> <dd>The new methods <a href="/en/Components.utils.createObjectIn" title="en/Components.utils.createObjectIn"><code>Components.utils.createObjectIn()</code></a> and <a href="/en/Components.utils.makeObjectPropsNormal" title="en/Components.utils.makeObjectPropsNormal"><code>Components.utils.makeObjectPropsNormal()</code></a> have been created to make it easier to create objects in specific compartments.</dd>
</dl>
<h3>JavaScript code modules</h3>
<h4>ISO8601DateUtils.jsm</h4>
<ul> <li>This code module has been removed. The <code><a href="/en/JavaScript/Reference/Global_Objects/Date/parse" title="en/JavaScript/Reference/Global_Objects/Date/parse">parse()</a></code> method now supports ISO 8601 dates and should be used instead.</li>
</ul>
<h3>Changes to the build system</h3>
<ul> <li>The following build configuration options have been removed: <ul> <li><code>--enable-timeline</code></li> <li><code>--disable-storage</code></li> <li><code>--<span id="summary_alias_container"><span id="short_desc_nonedit_display">necko-disk-cache</span></span></code></li> </ul> </li>
</ul>
<h3>Chrome registration</h3>
<ul> <li>The <code><a href="/en/Chrome_Registration#platformversion" title="en/Chrome_Registration#platformversion">platformversion</a></code> flag can be used in the chrome.manifest to specify Gecko version compatibility.</li>
</ul>
<h3>Interface changes</h3>
<ul> <li>The {{ ifmethod("mozIJSSubScriptLoader", "loadSubScript") }} method now loads scripts from the startup cache when possible.</li> <li>The <code>ownerWindow</code> attribute has been removed from the {{ interface("nsIAccessNode") }} interface.</li> <li>The {{ interface("nsIDOMStorageWindow") }} interface has been merged into the {{ interface("nsIDOMWindow") }} interface.</li> <li>All members of the {{ interface("nsIDOMWindowInternal") }} interface have been moved into the {{ interface("nsIDOMWindow") }} interface. The interface itself remains available for compatibility until Firefox 9.</li> <li>The {{ interface("nsIMemoryReporter") }} <code>KIND_MAPPED</code> attribute has been deprecated in favor of <code>KIND_NONHEAP</code>, new unit types <code>UNITS_COUNT_CUMULATIVE</code> and <code>UNITS_PERCENTAGE</code> have been added.</li> <li>The {{ interface("nsINetworkLinkService") }} interface has a new attribute, <code>linkType</code>. This attribute provides the type of network connection in use, the only Operating System currently supported is Android, all others report unknown.</li> <li>The {{ interface("nsISelection2") }} interface has been merged into the {{ interface("nsISelectionPrivate") }} interface.</li> <li>The {{ interface("nsISelection3") }} interface has been merged into the {{ interface("nsISelection") }} interface.</li> <li>The {{ interface("nsISessionStartup") }} attribute state is now a <a href="/En/SpiderMonkey/JSAPI_Reference/Jsval" title="en/jsval"><code>jsval</code></a> instead of a string, for performance reasons.</li> <li>The {{ interface("nsIDocShell") }} attribute <code>isActive</code> is now <code>false</code> for minimized windows.</li>
</ul>
<h4>Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <li><code>nsITimelineService</code></li> <li><code>nsIDOMHTMLIsIndexElement</code></li>
</ul>
<h3>Other changes</h3>
<ul> <li>When a window is minimized, un-minimized, or switches between full screen and windowed mode, it receives a <code>sizemodechange</code> event.</li> <li>You can now <a href="/en/Installing_extensions#Preventing_automatic_install_from_specific_locations" title="en/Installing_extensions#Preventing_automatic_install_from_specific_locations">use the <code>extensions.autoDisableScopes</code> preference</a> to disable automatic installation of add-ons from specific add-on install locations.</li>
</ul>
<h2>See also</h2>
<ul> <li><a href="/en/Firefox_7_for_developers" title="en/Firefox_7_for_developers">Firefox 7 for developers</a></li> <li><a href="/en/Firefox_6_for_developers" title="en/Firefox_6_for_developers">Firefox 6 for developers</a></li> <li><a href="/en/Firefox_5_for_developers" title="en/Firefox_5_for_developers">Firefox 5 for developers </a></li> <li><a href="/en/Firefox_4_for_developers" title="en/Firefox_4_for_developers">Firefox 4 for developers </a></li> <li><a href="/en/Firefox_3.6_for_developers" title="en/Firefox_3.6_for_developers">Firefox 3.6 for developers </a></li> <li><a href="/En/Firefox_3.5_for_developers" title="En/Firefox_3.5_for_developers">Firefox 3.5 for developers</a></li> <li><a href="/en/Firefox_3_for_developers" title="en/Firefox_3_for_developers">Firefox 3 for developers</a></li> <li><a href="/en/Firefox_2_for_developers" title="en/Firefox_2_for_developers">Firefox 2 for developers</a></li> <li><a href="/en/Firefox_1.5_for_developers" title="en/Firefox_1.5_for_developers">Firefox 1.5 for developers</a></li>
</ul>
<p>{{ languages( { "ja": "ja/Firefox_8_for_developers" } ) }}</p>
Revert to this revision