mozilla

Revision 29688 of Firefox 10 for developers

  • Revision slug: Firefox_10_for_developers
  • Revision title: Firefox 10 for developers
  • Revision id: 29688
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 1 words added, 1 words removed

Revision Content

{{ draft() }}

{{ ReleaseChannelInfo("10") }}

Changes for Web developers

HTML

  • The new HTML5 {{ HTMLElement("bdi") }} element, bi-directional isolation, allowing isolation of parts of text with a different directionality has been implemented. This is especially useful when displaying text with an unknown directionality, coming from a database for example, in the middle of text with a known, and potentially, different one.
  • You may now specify a fragment of "top" for the {{ htmlattrxref("href", "a") }} attribute to create a link to the top of the page. This used to work, then went away for a while, and now it's back, for compatibility with the HTML5 specification. For example: <a href="top">Return to top of page</a>.

JavaScript

  • The method WeakMap.set() now returns undefined, instead of itself.

DOM

DOM3 Events

  • The DOM Event method event.stopImmediatePropagation has been implemented.
  • The mouse events {{ domeventxref("mouseenter") }} and {{ domeventxref("mouseleave") }} have been implemented.

DOM4

  • The attribute document.xmlVersion (which was only gettable and not settable) has been removed as it has been deprecated in the DOM4 Specification (see {{ bug("693162") }}). Instead, use DOMImplementation.hasFeature("XMLVersion", "1.0") and DOMImplementation.hasFeature("XMLVersion", "1.1") respectively. That said, however, you shouldn't need to do this at all, since XML 1.1 is unlikely to ever be implemented by any browser anyway.
  • The attribute document.xmlStandalone has been removed as it has been deprecated in the DOM4 Specification.
  • The attribute {{ domxref("document.xmlEncoding") }} has been removed as it has been deprecated in the DOM4 Specification.
  • The attribute {{ domxref("text.isElementContentWhiteSpace") }} has been removed as it has been deprecated in the DOM4 Specification.
  • The method {{ domxref("text.replaceWholeText") }} has been removed as it has been deprecated in the DOM4 Specification.
  • The method {{ domxref("node.isSameNode") }} has been removed as it has been deprecated in DOM4 Specification. Instead of node1.isSameNode(node2) use node1 === node2.

Full Screen API

  • Support for {{ domxref("document.mozFullScreenEnabled") }} has been added.
  • The new {{ cssxref(":-moz-full-screen-ancestor") }} property has been added. This lets you match against elements that are ancestors of an element in full screen mode.

Canvas

  • The createPattern() method now throws an exception if a zero-sized source canvas is specified.
  • If you use a non-finite value for any of the numeric parameters to putImageData(), the call is now silently ignored instead of throwing an exception, in keeping with the specification.

WebGL

Web Workers

  • The attribute XMLHttpRequest.responseType and XMLHttpRequest.response are now available from inside Workers.
  • The Worker() constructor now accepts data URIs.

IndexedDB

Great progress has been made to update IndexedDB to the latest draft specification. This effort will continue in Firefox 11.

Other

  • When the proper MIME types is passed, text/svg+xml, the DOMParser now creates a SVGDocument when given a string with SVG.
  • In the past, when {{ domxref("element.setAttribute()") }} parsed integers, it would report an error if the integer included any non-numeric characters (for example "42foo"). Now it correctly truncates this as the number 42, in accordance with the specification.
  • The ESC key no longer incorrectly results in the {{ domxref("window.oninput") }} handler incorrectly getting called.
  • The {{ domxref("NameList") }} interface is no longer implemented; it previously had an implementation with no way to actually get access to one.
  • The {{ domxref("document.createProcessingInstruction()") }} method now works on HTML documents as well as XML documents. {{ domxref("ProcessingInstruction") }} nodes are still only supported on XML documents, but since nodes can be moved among documents, it's helpful to be able to create them on HTML documents as well.

CSS

  • Two new values for the CSS property {{ cssxref("unicode-bidi") }} have been added: -moz-isolation and -moz-plaintext. The -moz-isolation value isolates, from a directionality point of view, the element from its environment, letting it have a different directionality. An element with unicode-bidi:-moz-isolation behaves like a {{ HTMLElement("bdi") }} element. The -moz-plaintext indicates the browser to use the Unicode browser heuristic to determine directionality and not the CSS {{ cssxref("direction") }} property.
  • The CSS {{ cssxref("linear-gradient") }} and {{ cssxref("repeating-linear-gradient") }} properties have been updated to support the new to syntax and the magic corner algorithm. This allows to give a precise color on the corner of a gradient-filled box.
  • The {{ cssxref("text-overflow") }} property's handling of cases in which the box overflows on both sides while the text-overflow property is set to overflow on only one has been corrected.
  • Handling of the {{ cssxref("position") }} property on elements inside positioned {{ HTMLElement("table") }} elements has been fixed. This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.
  • Margin collapsing around {{ HTMLElement("table") }} elements has been fixed to match the CSS specification. Previously, table elements' margins would not be collapsed along with other adjacent elements, leading to incorrect layout. This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.

Dev Tools

  • The console object has two new methods, time() and timeEnd(), which can be used to set timers on a page.

Changes for Mozilla and add-on developers

Manifests

  • Support for <em:strictCompatibility> has been added to the install manifest. It allows add-ons authors to opt in to checking the maximum version of their extension. If set to true the add-on will be disabled if the application version is greater than <em:maxVersion>. Firefox 10 defaults to add-ons being compatible, regardless of their specified maximum version. This flag overrides that preference. You should set this if your add-on does things that are likely to be broken by Firefox updates (such as if you use a binary component, which will need recompiling).
  • If you wish to revert to the old behavior -- that is, to strict compatibility checking for all add-ons, regardless of the value of the strictCompatibility flag in their manifests, you can set the extensions.strictCompatibility preference to true.

XUL

Interface changes

  • The {{ interface("mozISpellCheckingEngine") }} and {{ interface("nsIEditorSpellCheck") }} interfaces have been updated to allow restartless add-ons to add dictionaries to the spell checker. XXX need to update docs on how to actually do this.
  • The {{ ifattribute("nsIBrowserHistory", "lastPageVisited") }} attribute has been removed.
  • The nsIDocumentViewer interface has been merged into {{ interface("nsIContentViewer") }}.
  • The {{ interface("nsIURIFixup") }} interface has a new flag, FIXUP_FLAG_USE_UTF8, which lets you tell it to use UTF-8 instead of the platform character set, when doing conversions.

Build system changes

  • The --disable-rdf build option, which actually made it impossible to successfully build, has been removed. Work is ongoing on being able to actually remove RDF support entirely, but at present XUL still requires it to function. See {{ bug("559505") }} for progress on removing the last vestiges of RDF being required.
  • The --disable-smil build option has been removed.

See also

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

Revision Source

<p>{{ draft() }}</p>
<p>{{ ReleaseChannelInfo("10") }}</p>
<h2>Changes for Web developers</h2>
<h3>HTML</h3>
<ul> <li>The new HTML5 {{ HTMLElement("bdi") }} element, bi-directional isolation, allowing isolation of parts of text with a different directionality has been implemented. This is especially useful when displaying text with an unknown directionality, coming from a database for example, in the middle of text with a known, and potentially, different one.</li> <li>You may now specify a fragment of "top" for the {{ htmlattrxref("href", "a") }} attribute to create a link to the top of the page. This used to work, then went away for a while, and now it's back, for compatibility with the HTML5 specification. For example: <code>&lt;a href="top"&gt;Return to top of page&lt;/a&gt;</code>.</li>
</ul>
<h3>JavaScript</h3>
<ul> <li>The method <code><a href="/en/JavaScript/Reference/Global_Objects/WeakMap" title="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a>.set()</code> now returns <em><code>undefined</code></em>, instead of itself.</li>
</ul>
<h3>DOM</h3>
<h4>DOM3 Events</h4>
<ul> <li>The DOM Event method <a href="/en/DOM/event.stopImmediatePropagation" title="event.stopImmediatePropagation"><code>event.stopImmediatePropagation</code></a> has been implemented.</li> <li>The mouse events {{ domeventxref("mouseenter") }} and {{ domeventxref("mouseleave") }} have been implemented.</li>
</ul>
<h4>DOM4</h4>
<ul> <li>The attribute <code><a href="/en/DOM/document.xmlVersion" title="en/DOM/document.xmlVersion">document.xmlVersion</a></code> (which was only gettable and not settable) has been removed as it has been deprecated in the DOM4 Specification (see {{ bug("693162") }}). Instead, use <code>DOMImplementation.hasFeature("XMLVersion", "1.0")</code> and <code>DOMImplementation.hasFeature("XMLVersion", "1.1")</code> respectively. That said, however, you shouldn't need to do this at all, since XML 1.1 is unlikely to ever be implemented by any browser anyway.</li> <li>The attribute <code>document.xmlStandalone</code> has been removed as it has been deprecated in the DOM4 Specification.</li> <li>The attribute {{ domxref("document.xmlEncoding") }} has been removed as it has been deprecated in the DOM4 Specification.</li> <li>The attribute {{ domxref("text.isElementContentWhiteSpace") }} has been removed as it has been deprecated in the DOM4 Specification.</li> <li>The method {{ domxref("text.replaceWholeText") }} has been removed as it has been deprecated in the DOM4 Specification.</li> <li>The method {{ domxref("node.isSameNode") }} has been removed as it has been deprecated in DOM4 Specification. Instead of <code><em>node1</em>.isSameNode(<em>node2</em>)</code> use <code><em>node1 </em>===</code><code><em> node2</em></code>.</li>
</ul>
<h4>Full Screen API</h4>
<ul> <li>Support for {{ domxref("document.mozFullScreenEnabled") }} has been added.</li> <li>The new {{ cssxref(":-moz-full-screen-ancestor") }} property has been added. This lets you match against elements that are ancestors of an element in full screen mode.</li>
</ul>
<h4>Canvas</h4>
<ul> <li>The <a href="/en/DOM/CanvasRenderingContext2D#createPattern%28%29" title="en/DOM/CanvasRenderingContext2D#createPattern%28%29"><code>createPattern()</code></a> method now throws an exception if a zero-sized source canvas is specified.</li> <li>If you use a non-finite value for any of the numeric parameters to <a href="/en/DOM/CanvasRenderingContext2D#putImageData%28%29" title="en/DOM/CanvasRenderingContext2D#putImageData%28%29"><code>putImageData()</code></a>, the call is now silently ignored instead of throwing an exception, in keeping with the specification.</li>
</ul>
<h4>WebGL</h4>
<ul> <li>Firefox 10 now supports the <a class="external" href="http://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/" title="http://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/"><code>OES_standard_derivatives</code></a> extension.</li> <li><a href="/en/WebGL#WebGL_debugging_and_testing" title="en/WebGL#WebGL_debugging_and_testing">New preferences have been added</a> to help test WebGL code for compatibility with minimally-capable devices on your full development platform.</li>
</ul>
<h4>Web Workers</h4>
<ul> <li>The attribute <code>XMLHttpRequest.responseType</code> and <code>XMLHttpRequest.response</code> are now available from inside <a href="/En/DOM/Worker/Functions_available_to_workers#section_2" title="https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers#section_2">Workers</a>.</li> <li>The <a href="/En/DOM/Worker#Worker()" title="En/DOM/Worker#Worker()"><code>Worker()</code></a> constructor now accepts <a href="/en/data_URIs" title="data URIs">data URIs</a>.</li>
</ul>
<h4>IndexedDB</h4>
<p>Great progress has been made to update IndexedDB to the latest draft specification. This effort will continue in Firefox 11.</p>
<ul> <li>The <a href="/en/IndexedDB/IDBIndex#count" title="en/IndexedDB/IDBIndex#count"><code>IDBIndex.count()</code></a> and <a href="/en/IndexedDB/IDBObjectStore#count" title="en/IndexedDB/IDBObjectStore#count"><code>IDBObjectStore.count()</code></a> methods have been added.</li> <li>The <a href="/en/IndexedDB/IDBCursor#advance" title="en/IndexedDB/IDBCursor#advance"><code>IDBCursor.advance()</code></a> method has been added.</li> <li>When encountering an unknown optional parameter in <a href="/en/IndexedDB/IDBObjectStore#createIndex" title="https://developer.mozilla.org/en/IndexedDB/IDBObjectStore#createIndex"><code>IDBObjectStore.createIndex()</code></a> or <a href="/en/IndexedDB/IDBDatabase#createObjectStore" title="en/IndexedDB/IDBDatabase#createObjectStore"><code>IDBDatabase.createObjectStore()</code></a>, Gecko will not fire an exception anymore, but simply ignore it.</li> <li>When <a href="/en/IndexedDB/IDBTransaction#abort%28%29" title="https://developer.mozilla.org/en/IndexedDB/IDBTransaction#abort%28%29"><code>IDBTransaction.abort()</code></a> is called, all pending <a href="/en/IndexedDB/IDBRequest" title="IDBRequest"><code>IDBRequest</code></a> have their <code>errorCode</code> set to <code>ABORT_ERROR</code>.</li> <li>The methods <a href="/en/IndexedDB/IDBObjectStore#delete()" title="en/IndexedDB/IDBObjectStore#delete()"><code>IDBObjectStore.delete()</code></a> and <a href="/en/IndexedDB/IDBCursor#delete()" title="en/IndexedDB/IDBCursor#delete()"><code>IDBCursor.delete()</code></a> now set the <code>result</code> attribute of the returned <a href="/en/IndexedDB/IDBRequest" title="en/IndexedDB/IDBRequest"><code>IDBRequest</code></a> to <code>undefined</code>.</li> <li>The method <a href="/en/IndexedDB/IDBDatabase#setVersion()" title="en/IndexedDB/IDBDatabase#setVersion()"><code>IDBDatabase.setVersion()</code></a> has been removed as it was removed from the latest spec. The version of the database is given through the <a href="/en/IndexedDB/IDBFactory#open" title="en/IndexedDB/IDBFactory#open"><code>IDBFactory.open()</code></a> method which has been updated and the <code>onupgradeneeded </code>callback allows the schema of the database to be upgraded. The version itself has been changed from a <code>DOMString</code> to an <code>unsigned long long</code>. The <a href="/en/IndexedDB/IDBVersionChangeRequest" title="en/IndexedDB/IDBVersionChangeRequest"><code>IDBVersionChangeRequest</code></a> interface has been removed and replaced by the new <a href="/en/IndexedDB/IDBOpenDBRequest" title="en/IndexedDB/IDBOpenDBRequest"><code>IDBOpenDBRequest</code></a> interface.</li>
</ul>
<h4>Other</h4>
<ul> <li>When the proper MIME types is passed, <code>text/svg+xml</code>, <a href="/en/DOM/DOMParser#Parsing_a_SVG_document" title="https://developer.mozilla.org/en/DOM/DOMParser#Parsing_a_SVG_document">the <code>DOMParser</code> now creates a <code>SVGDocument</code></a> when given a string with SVG.</li> <li>In the past, when {{ domxref("element.setAttribute()") }} parsed integers, it would report an error if the integer included any non-numeric characters (for example "42foo"). Now it correctly truncates this as the number 42, in accordance with the specification.</li> <li>The ESC key no longer incorrectly results in the {{ domxref("window.oninput") }} handler incorrectly getting called.</li> <li>The {{ domxref("NameList") }} interface is no longer implemented; it previously had an implementation with no way to actually get access to one.</li> <li>The {{ domxref("document.createProcessingInstruction()") }} method now works on HTML documents as well as XML documents. {{ domxref("ProcessingInstruction") }} nodes are still only supported on XML documents, but since nodes can be moved among documents, it's helpful to be able to create them on HTML documents as well.</li>
</ul>
<h3>CSS</h3>
<ul> <li>Two new values for the CSS property {{ cssxref("unicode-bidi") }} have been added: <code>-moz-isolation</code> and <code>-moz-plaintext</code>. The <code>-moz-isolation</code> value isolates, from a directionality point of view, the element from its environment, letting it have a different directionality. An element with <code>unicode-bidi:-moz-isolation</code> behaves like a {{ HTMLElement("bdi") }} element. The <code>-moz-plaintext</code> indicates the browser to use the Unicode browser heuristic to determine directionality and not the CSS {{ cssxref("direction") }} property.</li> <li>The CSS {{ cssxref("linear-gradient") }} and {{ cssxref("repeating-linear-gradient") }} properties have been updated to support the new <code>to</code> syntax and the <em>magic corner</em> algorithm. This allows to give a precise color on the corner of a gradient-filled box.</li> <li>The {{ cssxref("text-overflow") }} property's handling of cases in which the box overflows on both sides while the <code>text-overflow</code> property is set to overflow on only one <a href="/en/CSS/text-overflow#Gecko_notes" title="en/CSS/text-overflow#Gecko_notes">has been corrected</a>.</li> <li>Handling of the {{ cssxref("position") }} property on elements inside positioned {{ HTMLElement("table") }} elements <a href="/en/CSS/position#Gecko_notes" title="en/CSS/position#Gecko_notes">has been fixed</a>. <strong>This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.</strong></li> <li>Margin collapsing around {{ HTMLElement("table") }} elements has been fixed to match the CSS specification. Previously, table elements' margins would not be collapsed along with other adjacent elements, leading to incorrect layout. <strong>This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.</strong></li>
</ul>
<h3>Dev Tools</h3>
<ul> <li>The <a href="/en/Using_the_Web_Console" title="https://developer.mozilla.org/en/Using_the_Web_Console"><code>console</code></a> object has two new methods, <code>time()</code> and <code>timeEnd()</code>, which can be used to set timers on a page.</li>
</ul>
<h2>Changes for Mozilla and add-on developers</h2>
<h3>Manifests</h3>
<ul> <li>Support for <a href="/en/Install_Manifests#strictCompatibility" title="en/Install_Manifests#strictCompatibility"><code>&lt;em:strictCompatibility&gt;</code></a> has been added to the install manifest. It allows add-ons authors to opt in to checking the maximum version of their extension. If set to <code>true</code> the add-on will be disabled if the application version is greater than <code>&lt;em:maxVersion&gt;</code>. Firefox 10 defaults to add-ons being compatible, regardless of their specified maximum version. This flag overrides that preference. You should set this if your add-on does things that are likely to be broken by Firefox updates (such as if you use a binary component, which will need recompiling).</li> <li>If you wish to revert to the old behavior -- that is, to strict compatibility checking for all add-ons, regardless of the value of the <code>strictCompatibility</code> flag in their manifests, you can set the <code>extensions.strictCompatibility</code> preference to <code>true</code>.</li>
</ul>
<h3>XUL</h3>
<ul> <li>Bootstrapped add-ons using a <a href="/en/Chrome_Registration" title="en/chrome.manifest">chrome.manifest</a> file now have the manifest file registered automatically. See the section <a href="/en/Extensions/Bootstrapped_extensions#Adding_user_interface_with_a_chrome.manifest" title="en/Extensions/Bootstrapped_extensions#Adding_user_interface_with_a_chrome.manifest">Adding user interface with a chrome.manifest</a> for details.</li>
</ul>
<h3>Interface changes</h3>
<ul> <li>The {{ interface("mozISpellCheckingEngine") }} and {{ interface("nsIEditorSpellCheck") }} interfaces have been updated to allow restartless add-ons to add dictionaries to the spell checker. <strong>XXX need to <a href="/En/Using_an_External_Spell-checker" title="en/Using_an_External_Spell-checker">update docs</a> on how to actually do this.</strong></li> <li>The {{ ifattribute("nsIBrowserHistory", "lastPageVisited") }} attribute has been removed.</li> <li>The <code>nsIDocumentViewer</code> interface has been merged into {{ interface("nsIContentViewer") }}.</li> <li>The {{ interface("nsIURIFixup") }} interface has a new flag, <code>FIXUP_FLAG_USE_UTF8</code>, which lets you tell it to use UTF-8 instead of the platform character set, when doing conversions.</li>
</ul>
<h3>Build system changes</h3>
<ul> <li>The <code>--disable-rdf</code> build option, which actually made it impossible to successfully build, has been removed. Work is ongoing on being able to actually remove RDF support entirely, but at present XUL still requires it to function. See {{ bug("559505") }} for progress on removing the last vestiges of RDF being required.</li> <li>The <code>--disable-smil</code> build option has been removed.</li>
</ul>
<h3>See also</h3>
<ul> <li><a href="/en/Firefox_9_for_developers" title="en/Firefox 9 for developers">Firefox 9 for developers</a></li> <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_10_for_developers" } ) }}</p>
Revert to this revision