I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Registrati per tradurlo tu.
Firefox 12 was shipped on April 24, 2012. This page summarizes the changes in Firefox 12 that affect developers. This article provides information about the new features and key bugs fixed in this release, as well as links to more detailed documentation for both web developers and add-on developers.
Changes for Web developers
HTML
- The
title
attribute now supports newline characters to allow multi-line tooltips. - If JavaScript is disabled, the
<canvas>
element was being rendered instead of showing the fallback content as per the specification. Now the fallback content is rendered instead. - The
crossorigin
attribute is now supported on<video>
.
CSS
- Support for the
text-align-last
property has been added (prefixed).
JavaScript
- Support for sharp variables (a Netscape non-standard extension) has been dropped.
ArrayBuffer.prototype.slice()
has been implemented.
DOM
DOMParser
now supports parsing of HTML document fragments.XMLHttpRequest
now supports timeouts using thetimeout
property and "timeout" event, as well as theontimeout
event handler on theXMLHttpRequestEventTarget
interface.XMLHttpRequest
can now load fromdata:
URIs.- When downloading large amounts of data,
XMLHttpRequest
progress event handlers are now called periodically with theresponseType
set to "moz-blob" and the response being aBlob
containing all of the data received so far. This lets progress handlers begin processing data without having to wait for it all to arrive. - Gecko now supports multi-touch (instead of just single touches at a time) on Android.
- While editing text using an IME, the
input
event is now sent whenever the contents of the element being edited have been changed; this happens after thecompositionupdate
event has been sent to indicate that the IME's text has been changed. You can use theinput
event handler, therefore, to monitor changes to the actual content of the element. DOMError
as defined in the DOM 4 specification has been implemented.- The
Document.createNodeIterator()
method has been updated to match the DOM4 specification. This makes thewhatToShow
andfilter
parameters optional and removes the non-standard fourth parameter,entityReferenceExpansion
. - The
Blob
interface'sslice()
method was affected by a bug that prevented it from properly acceptingstart
andend
values outside the range of a signed 64-bit integer; this has been fixed. - The
element.getBoundingClientRect()
method now considers effect of CSS transforms when computing the element's bounding rectangle. - The
crossOrigin
property is now supported byHTMLMediaElement
.
New WebAPIs
- Network Information API: Experimental support for
window.navigator.connection
has been added (prefixed). - WebTelephony API:
window.navigator.mozTelephony
has been implemented and provides support for dialing, answering, and managing phone calls on a device. - WebSMS API:
window.navigator.mozSms
is now available for mobile devices to send SMS text messages. - Screen brightness API:
window.screen.mozEnabled
andwindow.screen.mozBrightness
have been added to control the device's screen.
SVG
- Firefox now implements the
SVGTests
DOM API, see bug 607854 - The
SVGStringList
DOM interface support the non-standardlength
property see bug 711958
MathML
- To control the directionality of MathML formulas, the
dir
attribute is now supported on the<math>
,<mrow>
, and<mstyle>
elements as well as on MathML Token Elements. This is particularly important for some Arabic mathematical notations. - The alignment attribute
align
defined in MathML3 has been implemented for<munder>
,<mover>
, and<munderover>
.
Networking
- Previously, Gecko reported the close code
CLOSE_NORMAL
when a WebSocket channel was closed due to an unexpected error, or if it was closed due to an error condition that the specification doesn't cover. NowCLOSE_GOING_AWAY
is reported instead.
Developer tools
- The Web Console now caches error messages and log entries added using
console.log()
if the console isn't currently open, and displays them when the console is opened. - You can now reset the zoom level, panning, and rotation in the 3D view by pressing the "r" key.
- You can now hide nodes in the 3D view by pressing the "x" key after selecting them.
- The source editor has a several new editing features and keyboard shortcuts; see Using the Source Editor for details
Mozilla has been working on integrating its own Web developer tools that complement the popular Firebug add-on. You can get more information about these tools as well as see a list of resources external to Firefox that will help you with your Web development. The entire list is located at Web developer tools.
Miscellaneous changes
- The GEOSTD8 character set, which was never fully supported, is no longer supported at all.
Changes for Mozilla and add-on developers
JavaScript code modules
source-editor.jsm
- The
resetUndo()
method was added; this lets you clear the undo stack. - The source editor now offers methods for providing search capability:
find()
,findNext()
, andfindPrevious()
.
XUL
- The definition of the values for the
chromemargin
attribute has changed slightly, to make it easier to make cross-platform XUL code look good on platforms with different default window border widths.
XPCOM
nsISupports
proxies are no longer supported. You should be using runnables instead; see Making cross-thread calls using runnables.- Firefox 11 changed the behavior of
Components.utils.getWeakReference()
to throw an exception when the object reference is null; the previous behavior of silently failing has been restored.
XPConnect
- The
PRUint64
data type was incorrectly essentially identical toPRint64
when used with XPConnect. This has been fixed.
Interface changes
- The
nsIScreen_MOZILLA_2_0_BRANCH
interface has been merged intonsIScreen
. The APIs defined in that interface (for controlling minimum screen brightness) had not previously been documented, but now they are. - The
nsIScriptError2
interface has been merged intonsIScriptError
. nsIDownloadManager.addDownload()
is now handled asynchronously rather than synchronously.- The
imgIContainerObserver.frameChanged()
method now receives as its first parameter animgIRequest
object identifying the corresponding request. - The
nsIDOMWindowUtils.sendTouchEvent()
method has been added to allow synthesizing touch events. - You can now scroll the specified content to the vertical center of the view by specifying
SCROLL_CENTER_VERTICALLY
as the scroll constant when callingnsISelectionController.scrollSelectionIntoView()
. - The new
nsIMemoryMultiReporter.explicitNonHeap
attribute has been added; this is a more efficient way to obtain the sum of all of the multi-reporter's measurements that have a path that starts with "explicit" and are of the kindKIND_NONHEAP
. - The
nsIDOMWindowUtils.paintingSuppressed
attribute has been added; this boolean value indicates whether or not painting is currently suppressed on the window. This is used on mobile to prevent bouncy rendering that occurs when attempts to draw the page begin before enough content is available to do so smoothly. - The
nsIDocCharset
andnsIDocumentCharsetInfo
interfaces have been merged intonsIDocShell
. As part of this work, the oldforcedDetector
attribute has been removed; it never did anything.
SpiderMonkey
JSThread
has been eliminated.JSThreadData
has been merged intoJSRuntime
.
Building
- When building on Windows, you must have the Windows 7 SDK installed.
Other changes
- The editor component (known as Midas) now only accepts events from privileged code.
See also
- 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 20 for developers
Tag del documento e collaboratori
Tag:
Hanno collaborato alla realizzazione di questa pagina:
chrisdavidmills,
fscholz,
ethertank,
Sheppy,
teoli,
jswisher,
justaguy,
Potappo,
tw2113,
Kohei,
ziyunfei,
pretzer,
myakura,
Jeremie,
Hsivonen,
Marcoos,
evilpie,
fred.wang
Ultima modifica di:
chrisdavidmills,