Firefox 8 for developers

  • Revision slug: Firefox_8_for_developers
  • Revision title: Firefox 8 for developers
  • Revision id: 60219
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 18 words added

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 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") }}).

DOM

  • The {{ domxref("Element.insertAdjacentHTML","insertAdjacentHTML") }} method has been implemented. (see {{ bug("613662") }})
  • {{ domxref("BlobBuilder") }} now has a getFile() method that returns the content of the blob as a file (see {{ bug("669437") }})
  • Event handling in nested {{ HTMLElement("label") }}s has been fixed (see {{ bug("646157") }})
  • 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 (see {{ bug("636512") }})
  • The HTML5 selectionDirection property makes it possible to define the direction of the selection in an editable text (see {{ bug("674558") }})
  • {{ 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 (see {{ bug("462960") }})
  • crossOrigin property defaults to "Anonymous" when an invalid value is used (see {{ bug("676413") }})
  • window.navigator.taintEnabled has been removed; it has not been supported in many years.

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 2231/5987 encoding (see {{ bug("651185") }})
  • Content-Disposition parser does not require presence of "=" anymore in parameters (see {{ bug("670333") }})
  • Scripts are no longer downloaded when JavaScript is disabled.
  • DNS entries are now blacklisted when the first request failed (see {{ bug("641937") }})

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 (see {{ bug("662692") }}).
  • Connection errors with WebSockets now trigger the onerror handler (see {{ bug("676025") }}).
  • 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 (see {{ bug("648484") }}).

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 (see {{ bug("601436") }}).

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 geckoversion flag can be used in the chrome.manifest to specify Gecko version compatibility. (see {{ bug("672662") }})

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. (see {{ bug("672510") }})
  • The {{ interface("nsIDOMStorageWindow") }} interface has been merged into the {{ interface("nsIDOMWindow") }} interface. (see {{ bug("670331") }})
  • 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. (see {{ bug("670235") }})
  • 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. (see {{ bug("671280") }} and {{ bug("672731") }})
  • 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. (see {{ bug("667980") }})
  • The {{ interface("nsISelection2") }} interface has been merged into the {{ interface("nsISelectionPrivate") }} interface. (see {{ bug("672536") }})
  • The {{ interface("nsISelection3") }} interface has been merged into the {{ interface("nsISelection") }} interface. (see {{ bug("672536") }})
  • The {{ interface("nsISessionStartup") }} attribute state is now a jsval instead of a string, for performance reasons.

Removed interfaces

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

  • nsITimelineService (see {{ bug("579571") }})
  • nsIDOMHTMLIsIndexElement (see {{ bug("666665") }} and {{ bug("611352") }})

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 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>
</ul>
<h3>DOM</h3>
<ul> <li>The {{ domxref("Element.insertAdjacentHTML","insertAdjacentHTML") }} method has been implemented. (see {{ bug("613662") }})</li> <li>{{ domxref("BlobBuilder") }} now has a <code>getFile()</code> method that returns the content of the blob as a file (see {{ bug("669437") }})</li> <li>Event handling in nested {{ HTMLElement("label") }}s has been fixed (see {{ bug("646157") }})</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 (see {{ bug("636512") }})</li> <li>The HTML5 <code>selectionDirection</code> property makes it possible to define the direction of the selection in an editable text (see {{ bug("674558") }})</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 (see {{ bug("462960") }})</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 (see {{ bug("676413") }})</li> <li><code>window.navigator.taintEnabled</code> has been removed; it has not been supported in many years.</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 2231/5987 encoding (see {{ bug("651185") }})</li> <li><code>Content-Disposition</code> parser does not require presence of "=" anymore in parameters (see {{ bug("670333") }})</li> <li>Scripts are no longer downloaded when JavaScript is disabled.</li> <li>DNS entries are now blacklisted when the first request failed (see {{ bug("641937") }})</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 (see {{ bug("662692") }}).</li> <li>Connection errors with WebSockets now trigger the <code>onerror</code> handler (see {{ bug("676025") }}).</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 (see {{ bug("648484") }}).</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 (see {{ bug("601436") }}).</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#geckoversion" title="en/Chrome_Registration#geckoversion">geckoversion</a></code> flag can be used in the chrome.manifest to specify Gecko version compatibility. (see {{ bug("672662") }})</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. (see {{ bug("672510") }})</li> <li>The {{ interface("nsIDOMStorageWindow") }} interface has been merged into the {{ interface("nsIDOMWindow") }} interface. (see {{ bug("670331") }})</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. (see {{ bug("670235") }})</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. (see {{ bug("671280") }} and {{ bug("672731") }})</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. (see {{ bug("667980") }})</li> <li>The {{ interface("nsISelection2") }} interface has been merged into the {{ interface("nsISelectionPrivate") }} interface. (see {{ bug("672536") }})</li> <li>The {{ interface("nsISelection3") }} interface has been merged into the {{ interface("nsISelection") }} interface. (see {{ bug("672536") }})</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>
</ul>
<h4>Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <li><code>nsITimelineService</code> (see {{ bug("579571") }})</li> <li><code>nsIDOMHTMLIsIndexElement</code> (see {{ bug("666665") }} and {{ bug("611352") }})</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