Skip to content

Latest commit

 

History

History
99 lines (64 loc) · 4.84 KB

File metadata and controls

99 lines (64 loc) · 4.84 KB
title slug
Firefox 21 for developers
Mozilla/Firefox/Releases/21

{{FirefoxSidebar}}

Web 开发者需要注意的变化

HTML

  • 实现了{{HTMLElement("style")}}元素上的scoped属性。拥有该属性的{{HTMLElement("style")}}元素可以通过在 Firefox 20 中实现的 CSS 伪类{{cssxref(":scope")}}选择器选择到.(Firefox bug 508725).
  • 实现了新的{{HTMLElement("main")}}元素 (Firefox bug 820508).

JavaScript

CSS

  • {{cssxref("user-select", "-moz-user-select")}}属性的属性值在设置为 none 时和设置为 -moz-none 时效果等同于,这样才能让 Gecko 和其他内核 WebKit(Chrome, Safari),Presto (Opera) 以及 Trident(Internet Explorer) 中的表现相同 (Firefox bug 816298).
  • On XHTML content, the auto value of {{cssxref("hyphens", "-moz-hyphens")}} incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (Firefox bug 702121).
  • CSS 属性{{cssxref("-moz-orient")}}现在支持新的值 auto. 当应用到一个{{HTMLElement("meter")}}元素或者{{HTMLElement("progress")}}元素上时,auto 就等同于 horizontal(Firefox bug 835883).

DOM

SVG

网络

  • 更新 CSP 实现到最新的 CSP 规范 1.0(CR):

    • Support for the spec-compliant Content-Security-Policy HTTP header (in addition to the experimental X-Content-Security-Policy) has been added (Firefox bug 783049). Note: the patch for this new header landed in Firefox 21, it is disabled on builds (Firefox bug 842657).

附加组件和 Mozilla 开发者需要注意的变化

  • FUEL applications cannot use the Livemarks service anymore (Firefox bug 834492). The Livemarks service is deprecated and phased out in favor of the new async interface.

  • 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, use mozIAsyncHistory::updatePlaces instead:

      • nsINavHistoryService::AddVisit

参见

更早期的版本

{{Firefox_for_developers}}