Firefox 9 for developers

  • Revision slug: Firefox_9_for_developers
  • Revision title: Firefox 9 for developers
  • Revision id: 50495
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 39 words added

Revision Content

{{ draft() }}

{{ ReleaseChannelInfo("9") }}

Changes for web developers

HTML

  • The value attribute of {{ HTMLElement("li") }} now can be negative as specified in HTML5. Previously negative values were converted to 0.
  • {{ HTMLElement("input") }} and {{ HTMLElement("textarea") }} elements now respect the value of the lang attribute when invoking the spell checker.
  • Firefox on Android now lets users snap photos with their phone's camera without leaving the browser when the {{ HTMLElement("input") }} element is used with type="file" and accept="image/*".

CSS

  • The {{ cssxref("font-stretch") }} property is now supported.
  • The {{ cssxref("columns") }} property is now supported, with the -moz prefix. This is a shorthand for the following properties: {{ cssxref("column-width") }} and {{ cssxref("column-count") }}.
  • When a stylesheet included using the {{ HTMLElement("link") }} element has been fully loaded and parsed (but not yet applied to the document), a load event is now fired. Also, if an error occurs processing a style sheet, an error event is fired.
  • You can now specify overflow settings for both the left and right edges of content using a new two-value syntax for {{ cssxref("text-overflow") }}.

DOM

Using full-screen mode
The new full-screen API provides a way to present content using the entire screen, with no browser interface. This is great for video and games. This API is currently
  • The {{ domxref("Node.contains()") }} method is now implemented; this lets you determine if a given node is a descendant of another node.
  • The {{ domxref("Node.parentElement()") }} method has been implemented; this returns the parent {{ domxref("Element") }} of a DOM node, or null if the parent isn't an element.
  • The {{ domxref("Document.scripts") }} attribute has been implemented; this returns an {{ domxref("HTMLCollection") }} of all the {{ HTMLElement("script") }} elements on the document.
  • The {{ domxref("Document.queryCommandSupported()") }} method has been implemented.
  • In the past, calling addEventListener() with a null listener would throw an exception. Now it returns without error and with no effect.
  • The new {{ domxref("navigator.doNotTrack") }} property lets your content easily determine whether or not the user has enabled their do-no-track preference; if this value is "yes", you should not track the user.
  • {{ domxref("Range") }} and {{ domxref("Selection") }} objects now behave according to their specifications when {{ domxref("Text.splitText()", "splitText()") }} and {{ domxref("Node.normalize", "normalize()") }} are called.
  • The value of {{ domxref("Node.ownerDocument") }} for doctype nodes is now the document on which createDocumentType() was called to create the node, instead of null.
  • window.navigator.taintEnabled has been removed; it has not been supported in many years.

MathML

  • The non-standard restyle value for the actiontype attribute on {{ MathMLElement("maction") }} elements has been removed.

Networking

  • WebSocket connections now permit non-characters in otherwise valid UTF-8 data frames to be received, instead of failing.
  • The HTTP Accept header for XSLT requests has been changed to simply "*/*" for simplicity. Since fetching XSLT has always fallen back to "*/*" anyway, it made sense to simplify the initial request.
  • Attempts by a server to use the 301 Moved Permanently or 307 Temporary Redirect response codes to redirect the user to a javascript: URI now result in a "bad connection" error instead of actually redirecting. This prevents certain types of cross-site scripting attacks.
  • Content served with an empty {{ HTTPHeader("Content-Disposition") }} were previously treated as if the {{ HTTPHeader("Content-Disposition") }} were "attachment"; this didn't always work as expected. These are now handled as if the {{ HTTPHeader("Content-Disposition") }} were "inline".

Changes for Mozilla and add-on developers

See Updating add-ons for Firefox 9 for an overview of the changes you may need to make to get your add-ons working in Firefox 9.

XUL

  • The {{ XULElem("tab") }} element now has a {{ XULAttr("pending") }} attribute, whose value is true, when the tab is in the process of being restored by the session store service. This can be used for styling the tab in themes. The attribute isn't present on tabs that aren't pending.
  • The {{ XULElem("tab") }} element now has an {{ XULAttr("unread") }} attribute, whose value is true, when the tab has changed since the last time it was the active tab or if it hasn't been selected since the current session began. The attribute isn't present on tabs that are not unread.

Service changes

Interface changes

Removed interfaces

  • {{ interface("nsIGlobalHistory3") }} has been removed during streamlining of the Places and DocShell code.

Miscellaneous interface changes

  • The {{ interface("nsISound") }} interface has a new constant, EVENT_EDITOR_MAX_LEN. The allows for playing the system sound for when more characters than the maximum allowed are typed into a text field. Currently, this is only used on Windows.
  • The {{ interface("nsIScriptError2") }} interface has new timeStamp and innerWindowID properties; in addition, the initWithWindowID() method now takes an inner window ID instead of an outer window ID.
  • The {{ ifattribute("nsIBidiKeyboard", "haveBidiKeyboards") }} attribute has been added; this lets you determine if the system has at least one keyboard installed for each direction: left-to-right and right-to-left.
  • The new {{ ifattribute("nsIEditor", "isSelectionEditable") }} attribute lets you determine if the current selection anchor is editable. This helps to support cases where only parts of the document are editable, by letting you see if the current selection is in an editable section.
  • The {{ ifmethod("nsIBrowserHistory", "registerOpenPage") }} and {{ ifmethod("nsIBrowserHistory", "unregisterOpenPage") }} methods have been removed as part of a performance overhaul in the Places system. You can use the corresponding methods in {{ interface("mozIPlacesAutoComplete") }} instead.
  • The {{ ifmethod("nsIDOMWindowUtils", "wrapDOMFile") }} method has been added; this returns a DOM {{ domxref("File") }} object for a given {{ interface("nsIFile") }}.
  • The {{ ifmethod("nsIChromeFrameMessageManager", "removeDelayedFrameScript") }} method was added to support removing delayed load scripts. Bootstrapped add-ons should use this, at shutdown, to remove any scripts it loaded using {{ ifmethod("nsIChromeFrameMessageManager", "loadFrameScript") }} with the delayed load flag set. This is exposed to add-ons as browser.messageManager.removeDelayedFrameScript().

IDL parser

The IDL parser no longer includes support for the never fully-implemented notion of unique pointers.

Build system changes

The --enable-application=standalone option for building standalone XPConnect has been removed; it hasn't worked since 2007 anyway.

Other changes

  • The spell checker no longer has an arbitrary 130-character word-length limit on the length of words it will attempt to spell check. This limit was previously in place to prevent crashes that were occurring in the spell checker, but the underlying bugs have since been fixed.

See also

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

Revision Source

<p>{{ draft() }}</p>
<p>{{ ReleaseChannelInfo("9") }}</p>
<h2>Changes for web developers</h2>
<h3>HTML</h3>
<ul> <li>The <code>value</code> attribute of {{ HTMLElement("li") }} now can be negative as specified in HTML5. Previously negative values were converted to 0.</li> <li>{{ HTMLElement("input") }} and {{ HTMLElement("textarea") }} elements <a href="/en/HTML/Controlling_spell_checking_in_HTML_forms#Controlling_the_spellchecker_language" title="en/HTML/Controlling_spell_checking_in_HTML_forms#Controlling_the_spellchecker_language">now respect the value of the <code>lang</code> attribute</a> when invoking the spell checker.</li> <li>Firefox on Android now lets users snap photos with their phone's camera without leaving the browser when the {{ HTMLElement("input") }} element is used with <code>type="file"</code> and <code>accept="image/*"</code>.</li>
</ul>
<h3>CSS</h3>
<ul> <li>The {{ cssxref("font-stretch") }} property is now supported.</li> <li>The {{ cssxref("columns") }} property is now supported, with the <code>-moz</code> prefix. This is a shorthand for the following properties: {{ cssxref("column-width") }} and {{ cssxref("column-count") }}.</li> <li>When a stylesheet included using the {{ HTMLElement("link") }} element has been fully loaded and parsed (but not yet applied to the document), a <a href="/en/HTML/Element/link#Stylesheet_load_events" title="en/HTML/Element/link#Stylesheet_load_events"><code>load</code> event</a> is now fired. Also, if an error occurs processing a style sheet, an <code>error</code> event is fired.</li> <li>You can now specify overflow settings for both the left and right edges of content using a new two-value syntax for {{ cssxref("text-overflow") }}.</li>
</ul><h3>DOM</h3>
<dl> <dt><a href="/en/DOM/Using_full-screen_mode" title="Using full-screen mode">Using full-screen mode</a></dt> <dd>The new full-screen API provides a way to present content using the entire screen, with no browser interface. This is great for video and games. This API is currently</dd>
</dl>
<ul> <li>The {{ domxref("Node.contains()") }} method is now implemented; this lets you determine if a given node is a descendant of another node.</li> <li>The {{ domxref("Node.parentElement()") }} method has been implemented; this returns the parent {{ domxref("Element") }} of a DOM node, or <code>null</code> if the parent isn't an element.</li> <li>The {{ domxref("Document.scripts") }} attribute has been implemented; this returns an {{ domxref("HTMLCollection") }} of all the {{ HTMLElement("script") }} elements on the document.</li> <li>The {{ domxref("Document.queryCommandSupported()") }} method has been implemented.</li> <li>In the past, calling <a href="/en/DOM/element.addEventListener" title="element.addEventListener"><code>addEventListener()</code></a> with a <code>null</code> listener would throw an exception. Now it returns without error and with no effect.</li> <li>The new {{ domxref("navigator.doNotTrack") }} property lets your content easily determine whether or not the user has enabled their do-no-track preference; if this value is "yes", you should not track the user.</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>The value of {{ domxref("Node.ownerDocument") }} for doctype nodes is now the document on which <a href="/En/DOM/DOMImplementation.createDocumentType" title="DOMImplementation.createDocumentType"><code>createDocumentType()</code></a> was called to create the node, instead of <code>null</code>.</li> <li><code>window.navigator.taintEnabled</code> has been removed; it has not been supported in many years.</li>
</ul><h3>MathML</h3>
<ul> <li>The non-standard <code>restyle</code> value for the <code>actiontype</code> attribute on {{ MathMLElement("maction") }} elements has been removed.</li>
</ul>
<h3>Networking</h3>
<ul> <li>WebSocket connections now permit non-characters in otherwise valid UTF-8 data frames to be received, instead of failing.</li> <li>The HTTP <code>Accept</code> header for XSLT requests has been changed to simply "*/*" for simplicity. Since fetching XSLT has always fallen back to "*/*" anyway, it made sense to simplify the initial request.</li> <li>Attempts by a server to use the <code>301 Moved Permanently</code> or <code>307 Temporary Redirect</code> response codes to redirect the user to a <code>javascript:</code> URI now <a href="/en/HTTP#More_on_redirection_responses" title="en/HTTP#More_on_redirection_responses">result in a "bad connection" error</a> instead of actually redirecting. This prevents certain types of cross-site scripting attacks.</li> <li>Content served with an empty {{ HTTPHeader("Content-Disposition") }} were previously treated as if the {{ HTTPHeader("Content-Disposition") }} were "attachment"; this didn't always work as expected. These are now handled as if the {{ HTTPHeader("Content-Disposition") }} were "inline".</li>
</ul><h2>Changes for Mozilla and add-on developers</h2>
<p>See <a href="/en/Firefox/Updating_add-ons_for_Firefox_9" title="en/Firefox/Updating add-ons for Firefox 9">Updating add-ons for Firefox 9</a> for an overview of the changes you may need to make to get your add-ons working in Firefox 9.</p>
<h3>XUL</h3>
<ul> <li>The {{ XULElem("tab") }} element now has a {{ XULAttr("pending") }} attribute, whose value is <code>true</code>, when the tab is in the process of being restored by the session store service. This can be used for styling the tab in themes. The attribute isn't present on tabs that aren't pending.</li> <li>The {{ XULElem("tab") }} element now has an {{ XULAttr("unread") }} attribute, whose value is <code>true</code>, when the tab has changed since the last time it was the active tab or if it hasn't been selected since the current session began. The attribute isn't present on tabs that are not unread.</li>
</ul><h3>Service changes</h3>
<ul> <li>The content preference service now <a href="/en/Using_content_preferences#private-browsing" title="en/Using_content_preferences#private-browsing">handles private mode browsing</a> (see {{ bug("679784") }}).</li>
</ul>
<h3>Interface changes</h3>
<h4>Removed interfaces</h4>
<ul> <li>{{ interface("nsIGlobalHistory3") }} has been removed during streamlining of the Places and DocShell code.</li>
</ul>
<h4>Miscellaneous interface changes</h4>
<ul> <li>The {{ interface("nsISound") }} interface has a new constant, <code>EVENT_EDITOR_MAX_LEN</code>. The allows for playing the system sound for when more characters than the maximum allowed are typed into a text field. Currently, this is only used on Windows.</li> <li>The {{ interface("nsIScriptError2") }} interface has new <code>timeStamp</code> and <code>innerWindowID</code> properties; in addition, the <code>initWithWindowID()</code> method now takes an inner window ID instead of an outer window ID.</li> <li>The {{ ifattribute("nsIBidiKeyboard", "haveBidiKeyboards") }} attribute has been added; this lets you determine if the system has at least one keyboard installed for each direction: left-to-right and right-to-left.</li> <li>The new {{ ifattribute("nsIEditor", "isSelectionEditable") }} attribute lets you determine if the current selection anchor is editable. This helps to support cases where only parts of the document are editable, by letting you see if the current selection is in an editable section.</li> <li>The {{ ifmethod("nsIBrowserHistory", "registerOpenPage") }} and {{ ifmethod("nsIBrowserHistory", "unregisterOpenPage") }} methods have been removed as part of a performance overhaul in the Places system. You can use the corresponding methods in {{ interface("mozIPlacesAutoComplete") }} instead.</li> <li>The {{ ifmethod("nsIDOMWindowUtils", "wrapDOMFile") }} method has been added; this returns a DOM {{ domxref("File") }} object for a given {{ interface("nsIFile") }}.</li> <li>The {{ ifmethod("nsIChromeFrameMessageManager", "removeDelayedFrameScript") }} method was added to support removing delayed load scripts. Bootstrapped add-ons should use this, at shutdown, to remove any scripts it loaded using {{ ifmethod("nsIChromeFrameMessageManager", "loadFrameScript") }} with the delayed load flag set. This is exposed to add-ons as <code>browser.messageManager.removeDelayedFrameScript()</code>.</li>
</ul>
<h3>IDL parser</h3>
<p>The IDL parser no longer includes support for the never fully-implemented notion of unique pointers.</p>
<h3>Build system changes</h3>
<p>The <code>--enable-application=standalone</code> option for building standalone XPConnect has been removed; it hasn't worked since 2007 anyway.</p>
<h3>Other changes</h3>
<ul> <li>The spell checker no longer has an arbitrary 130-character word-length limit on the length of words it will attempt to spell check. This limit was previously in place to prevent crashes that were occurring in the spell checker, but the underlying bugs have since been fixed.</li>
</ul><h2>See also</h2>
<ul> <li><a href="/en/Firefox_8_for_developers" title="en/Firefox 8 for developers">Firefox 8 for developers</a></li> <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_9_for_developers" } ) }}</p>
Revert to this revision