Firefox 21 for developers 编辑

Firefox 21 was released on May 14, 2013. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers

HTML

  • The scoped attribute has been added to the <style> element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the :scope CSS pseudo-element introduced in Firefox 20. (bug 508725).
  • The new HTML <main> element has been implemented (bug 820508).

JavaScript

  • E4X, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (bug 788293).
  • parseInt no longer treats strings with leading "0" as octal (bug 786135).

CSS

  • The none value of -moz-user-select has now the same behavior than the -moz-none value, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) (bug 816298).
  • On XHTML content, the auto value of -moz-hyphens incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (bug 702121).
  • An auto value has been added to the CSS -moz-orient property. The auto value is equivalent to horizontal when applied to <meter> and <progress> (bug 835883).
  • The media query -moz-windows-glass has been added on Windows 7 and earlier Windows system (bug 816803).

DOM

SVG

Networking

  • We continue to update our CSP implementation to match the CSP 1.0 spec, which reached Candidate Recommendation:
    • Support for the spec-compliant Content-Security-Policy HTTP header (in addition to the experimental X-Content-Security-Policy) has been added (bug 783049). Note: the patch for this new header landed in Firefox 21, it is disabled on builds (bug 842657).

Worker

Changes for add-on and Mozilla developers

  • FUEL applications cannot use the Livemarks service anymore (bug 834492). The Livemarks service is deprecated and phased out in favor of the new async interface.
  • resource:///modules/ and resource://gre/modules/ are no longer identical (bug 755724). This change was made because of work on the metro version of Firefox. If you load modules using resource:///modules/, you should check if you now want to use resource://gre/modules/ instead. Note that some modules also moved from Firefox to Toolkit (bug 840287 and bug 811548 moved NewTabUtils.jsm and the thumbnail modules, respectively).
  • The Add-on SDK is now included in Firefox (bug 731779)
  • History API saw numerous deprecated API being removed:
    • Replaced by mozIAsyncFavicons:
      • nsIFaviconService::setFaviconUrlForPage
      • nsIFaviconService::setFaviconData
      • nsIFaviconService::getFaviconData
      • nsIFaviconService::getFaviconForPage
      • nsIFaviconService::setAndLoadFaviconForPage
      • nsIFaviconService::getFaviconImageForPage
      • nsIFaviconService::getFaviconDataAsDataURL
    • Replaced by mozIAsyncLivemarks:
      • nsILivemarkService::*
      • PlacesUtils.itemIsLivemark
      • PlacesUtils.nodeIsLivemarkContainer
      • PlacesUtils.nodeIsLivemarkItem
    • Removed only third argument:
      • PlacesUIUtils.showBookmarkDialog
    • No more implemented by Places, use mozIAsyncHistory instead:
      • nsIGlobalHistory2::addURI
      • nsIGlobalHistory2::isVisited
      • nsIGlobalHistory2::setPageTitle
    • No more needed, use onDeleteURI or onItemRemoved:
      • nsINavHistoryObserver::OnBeforeDeleteURI
      • nsINavBookmarkObserver::OnBeforeItemRemoved
    • Never implemented properly:
      • nsINavHistoryFullVisitResultNode
    • Deprecated, usemozIAsyncHistory::updatePlaces instead:
      • nsINavHistoryService::AddVisit
  • Added nsIHttpChannel.redirectTo to enable redirecting HTTP channels without fragile hacks.

See also

Older versions

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:64 次

字数:14448

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文