Movatterモバイル変換


[0]ホーム

URL:


  1. Mozilla
  2. Firefox
  3. Release notes for developers
  4. Firefox 8

Firefox 8 release notes for developers

Firefox 8 was released on November 8, 2011. This article provides information both forweb developers and for add-on andMozilla project developers to help take full advantage of the features of this release.

Changes for web developers

HTML

  • TheHTMLImageElementcrossOrigin property has been added and thecrossorigin attribute has been added to the<img> element. (seeFirefox bug 664299)
  • TheHTMLSelectElement.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. (seeFirefox bug 666200)
  • TheHTMLIsIndexElement constructor has been removed. No elements have implemented this interface since before 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; seeFirefox bug 617528).
  • Support for theHTMLElement.accessKeyLabel attribute has been added to all elements.
  • The<input> and<textarea> elements now support theselectionDirection attribute, and theirsetSelectionRange() methods have been updated to support optionally specifying a direction.
  • Most elements now get a focus ring drawn around them if they've been made focusable by using thetabindex attribute and the user then focuses the element.
  • In a set of nested<label> elements click events do no longer trigger multiple <label> elements, which caused Firefox to stop responding in the past (seeFirefox bug 646157).

DOM

  • TheinsertAdjacentHTML method has been implemented.
  • BlobBuilder now has agetFile() method that returns the content of the blob as a file.
  • TheFileReaderSync interface (part of the FileAPI) has been implemented.
  • Event handling in nested<label>s has been fixed.
  • You can now usewindow.postMessage() to passFile andFileList objects between windows.
  • When editingcontenteditable 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<p> blocks) instead of separating lines by<br> elements.
  • Fixed a bug that prevents justification from taking effect properly when applied to the first line in acontenteditable area.
  • Fixed a bug that caused pressing delete or backspace at the beginning of acontenteditable area to affect the previouscontenteditable block if one is present.
  • Document.getSelection() now returns the sameSelection object aswindow.getSelection(), instead ofstringifying it.
  • The HTML5selectionDirection property makes it possible to define the direction of the selection in an editable text.
  • HTMLMediaElement now have aseekable property that return aTimeRanges object.
  • TheHTMLMediaElement.preload attribute now correctly reflects as anenumerated value.
  • crossOrigin property defaults to "Anonymous" when an invalid value is used.
  • navigator.cookieEnabled now returns correct information when the default cookie setting is overridden on a per-site basis.

JavaScript

  • RegExp.exec() andRegExp.test() called with no arguments now match against the string "undefined".
  • String.search() andString.match() called with no arguments orundefined now match against the empty string and thus match every string.
  • Support for watchlists has been implemented with the new (non-standard)watch() andunwatch() methods.

CSS

  • <resolution> now accepts<number>, not just<integer> values as per the specification.
  • Hyphenation rules have been added for many new languages when usinghyphens.
  • Handling ofbackground-size has been revised to more closely match the specification.
  • In the past,text-decoration in quirks mode had line thickness and position adjusted on descendant text to match the descendant. Now standards mode and quirks mode rendering are more similar.
  • Horizontal positioning for elements has been brought more in line with the specification in many cases. Documentation for this is forthcoming, but for now, seeFirefox bug 682780, comment 23 for details.
  • SVG images are now scaled properly when used as background images.

Network

  • Double quotes are no longer accepted as a delimiter forRFC 2231 orRFC 5987 encoding, as per those RFCs.
  • MIME header field parser (Content-Disposition) now requires "=" in parameters.
  • Scripts are no longer downloaded when JavaScript is disabled.
  • SSL 2.0 is no longer supported.

WebSockets

  • TheWebSocket object'ssend() method no longer incorrectly returns a Boolean value.
  • TheWebSocket object'sclose() method now matches the current draft of the standard, and close events now properly use theCloseEvent interface.
  • TheWebSocket object'sextensions attribute is now supported.
  • The WebSocket constructor now supports an array of protocols as well as a single protocol string.
  • Mixed content is not allowed with WebSockets; that is, you can no longer open a connection to a non-secure WebSocket server from secure content.
  • Connection errors with WebSockets now trigger theonerror handler.
  • WebSocket API has been updated to the latest draft of the specification (seeFirefox bug 674890,Firefox bug 674527, andFirefox bug 674716).
  • The deflate-stream extension to WebSockets has been disabled; it has been deprecated, and was breaking compatibility with some sites.

WebGL

  • Cross-domain textures can now be allowed with CORS approval.
  • Cross-process rendering with Direct2D/Direct3D 10.

MathML

  • Support for thedisplaystyle attribute on the top-level<math> element has been added.
  • The interpretation of negative row numbers for thealign attribute on<mtable> has been corrected.

Developer tools

  • Theconsole object has a newdir() method, which displays an interactive list of the properties on a specified object.

Changes for Mozilla and add-on developers

SeeUpdating add-ons for Firefox 8 for a guide to changes you're likely to have to make your add-ons compatible with Firefox 8.

Note:Firefox 8 requires that binary components be recompiled, as do all major releases of Firefox.

XPCOM

Components.utils

The new methodsComponents.utils.createObjectIn() andComponents.utils.makeObjectPropsNormal() have been created to make it easier to create objects in specific compartments.

Other XPCOM-related changes

  • You can now instantiate DOMFile objects from component code by doing new File, instead of having to instantiate annsIDOMFile directly.
  • ThensTPtrArray array type has been removed. Its functionality is now all available onnsTArray, which now offers theSafeElementAt() method when instantiated using a pointer type.

Workers

It is no longer possible to access XPCOM objects from ChromeWorkers. XPConnect has been disabled in worker contexts as ofFirefox bug 649537.

XUL

  • A bug indocument.execCommand() that occurred when calling it on the value ofcontentDocument has been fixed. Since Firefox 3, this has resulted in errors instead of working correctly.
  • Bootstrapped add-ons can now load chrome using achrome.manifest file.
  • XUL images now shrink down with the same ratio in both directions when specifying maximum sizes.

Changes to the build system

  • The following build configuration options have been removed:

    • --enable-timeline
    • --disable-storage
    • --necko-disk-cache
  • When compiling IDL files to headers, the header filejspubtd.h is automatically included when needed. Manual inclusions ofjspubtd.h and/orjsapi.h in IDL files that use jsval or [implicit_jscontext] are no longer necessary.

Chrome registration

  • Theplatformversion flag can be used in the chrome.manifest to specify Gecko version compatibility.

Interface changes

  • ThemozIJSSubScriptLoader.loadSubScript() method now loads scripts from the startup cache when possible.
  • TheownerWindow attribute has been removed from thensIAccessNode interface.
  • ThensIDOMStorageWindow interface has been merged into thensIDOMWindow interface.
  • All members of thensIDOMWindowInternal interface have been moved into thensIDOMWindow interface. The interface itself (with no members) remains available for compatibility until Firefox 9.
  • In order to improve performance, callback handling for asynchronous Places database updates has been changed. See the newmozIVisitInfoCallback.handleResult() andmozIVisitInfoCallback.handleError() methods, which replace the old single method for both error and success condition handling.
  • TheKIND_MAPPED attribute ofnsIMemoryReporter has been deprecated in favor ofKIND_NONHEAP, new unit typesUNITS_COUNT_CUMULATIVE andUNITS_PERCENTAGE have been added.
  • ThensIMemoryReporterManager interface has a newexplicit attribute, which reports the total size of explicit memory allocations.
  • ThensIMemoryReporterManager interface has a newresident attribute, which reports the amount of physical memory used.
  • ThensINetworkLinkService interface has a new attribute,linkType. This attribute provides the type of network connection in use. All Operating Systems currently returnLINK_TYPE_UNKNOWN. Android support was backed out due to perceived security concerns.
  • ThensISelection2 interface has been merged into thensISelectionPrivate interface.
  • ThensISelection3 interface has been merged into thensISelection interface.
  • ThensISessionStartup attribute state is now ajsval instead of a string, for performance reasons.
  • ThensIDocShell attributeisActive is nowfalse for minimized windows.
  • ThensIDownloadHistory.addDownload() method now saves the target where the download is saved on the local file system.

Removed interfaces

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

  • nsITimelineService
  • nsIDOMHTMLIsIndexElement

ThensIWorkerFactory interface has been removed as well. Workers can still be created using theWorker andChromeWorker constructors.

Other changes

  • When a window is minimized, un-minimized, or switches between full screen and windowed mode, it receives asizemodechange event.
  • You can nowuse theextensions.autoDisableScopes preference to disable automatic installation of add-ons from specific add-on install locations.
  • The newmozSyntheticDocument property onDocument objects lets you determine whether a document is synthetic (that is, something like a standalone image, video, or audio file) rather than a full, standard DOM document. This can be useful, for example, if you want to present different user interface in this situation (such as adding contextual items differently depending on this case).
  • You can now specify a filter when openingabout:config; for example,about:config?filter=sessionstore will show only session storage related preferences.

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp