--- title: Firefox 9 技術文件 slug: Mozilla/Firefox/Releases/9 translation_of: Mozilla/Firefox/Releases/9 ---
Firefox 9 was released for Windows on December 20, 2011. Mac and Linux version 9.0.1, which fixed a crashing bug discovered at the last minute, were released on December 21, 2011.
value
attribute of <li>
now can be negative as specified in HTML5. Previously negative values were converted to 0.<audio>
and <video>
elements.<input>
and <textarea>
elements now respect the value of the lang
attribute when invoking the spell checker.<input>
element is used with type="file"
and accept="image/*"
.crossorigin
attribute to request CORS access no longer incorrectly taint the canvas when CORS is granted.rowspan
attribute may now be as large as 65,534, up from 8190.font-stretch
property is now supported.columns
property is now supported, with the -moz
prefix. This is a shorthand for the following properties: column-width
and column-count
.<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.text-overflow
.No change.
Node.contains()
method is now implemented; this lets you determine if a given node is a descendant of another node.Node.parentElement
attribute has been implemented; this returns the parent Element
of a DOM node, or null
if the parent isn't an element.Document.scripts
attribute has been implemented; this returns an HTMLCollection
of all the <script>
elements on the document.Document.queryCommandSupported()
method has been implemented.<body>
elements has been revised to match the latest draft of the HTML5 specification. The list of events in the DOM event reference reflects which events can be listened for on <body>
.readystatechange
event is now fired only on the Document
, as intended.moz-json
", has been added to XMLHttpRequest
, letting XMLHttpRequest
automatically parse JSON strings for you; when you request this type, a returned JSON string is parsed, so that the value of the response
property is the resulting JavaScript object.XMLHttpRequest
"progress" events are now reliably sent for every chunk of data received; in the past it was possible for the last chunk of data received to not fire a "progress" event. Now you can track progress by following only "progress" events, instead of also having to monitor "load" events to detect the receipt of the last chunk of data.addEventListener()
with a null
listener would throw an exception. Now it returns without error and with no effect.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.Range
and Selection
objects now behave according to their specifications when splitText()
and normalize()
are called.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.drawingBufferWidth
and drawingBufferHeight
attributes are now supported.restyle
value for the actiontype
attribute on <maction>
elements has been removed.<mlabeledtr>
element no longer breaks rendering completely. See bug 689641 for progress on actual support of this element.ArrayBuffer
object) using XMLHttpRequest.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.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-Disposition
were previously treated as if the Content-Disposition
were "attachment"; this didn't always work as expected. These are now handled as if the Content-Disposition
were "inline".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.
tab
element now has a 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.tab
element now has an 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.panel
as a drag image for DOM drag and drop operations. This lets you use the standard drag & drop API for drag and drop of XUL content.notificationbox
element's appendNotification
method now lets you specify a callback that gets called for interesting events related to the notification box. Currently, the only event is "removed", which tells you the box has been removed from its window.FileUtils.jsm
now has a File
constructor that returns an nsIFile
object representing a file specified by its pathname.nsIGlobalHistory3
has been removed during streamlining of the Places and DocShell code.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.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.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.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.nsIBrowserHistory.registerOpenPage()
and nsIBrowserHistory.unregisterOpenPage()
methods have been removed as part of a performance overhaul in the Places system. You can use the corresponding methods in mozIPlacesAutoComplete
instead.nsIDOMWindowUtils.wrapDOMFile()
method has been added; this returns a DOM File
object for a given nsIFile
.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 nsIChromeFrameMessageManager.loadFrameScript()
with the delayed load flag set. This is exposed to add-ons as browser.messageManager.removeDelayedFrameScript()
.nsIAppStartup
interface has a new interrupted
attribute, which lets you know if the startup process was interrupted at any point by an interactive prompt. This can be helpful, for example, when timing startups during performance evaluation, to be able to drop numbers from sessions that were interrupted.nsIEditorSpellCheck
interface has been revised to support per-site selection of spell checker dictionaries.The IDL parser no longer includes support for the never fully-implemented notion of unique pointers.
--enable-application=standalone
option for building standalone XPConnect has been removed; it hasn't worked since 2007 anyway.--enable-application=network
or --enable-application=content/xslt
..mozconfig
at $topsrcdir/.mozconfig
or $topsrcdir/mozconfig
, and nowhere else, unless you override the .mozconfig
path using the MOZCONFIG
environment variable.xpidl
utility has been replaced in the SDK with pyxpidl.window.navigator
object by using the "JavaScript-navigator-property" category. See Adding APIs to the navigator object for details and examples.