Firefox 21 for developers
=========================

Web 开发者需要注意的变化
--------------

### HTML

* 实现了`<style>`元素上的`scoped`属性。拥有该属性的`<style>`元素可以通过在 Firefox 20 中实现的 CSS 伪类`:scope`选择器选择到.(Firefox bug 508725).
* 实现了新的`<main>`元素 (Firefox bug 820508).
### JavaScript

* E4X,一个古老的 JavaScript 扩展 (ECMA-357),已经被删除。因为一直以来，只有 Gecko 支持它.(Firefox bug 788293).
* parseInt (en-US)不再将以"0"开头的字符串作为 8 进制数字来解析 (Firefox bug 786135).
### CSS

* `-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 `-moz-hyphens` incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (Firefox bug 702121).
* CSS 属性`-moz-orient` (en-US)现在支持新的值 `auto`. 当应用到一个`<meter>`元素或者`<progress>`元素上时，`auto` 就等同于 `horizontal`(Firefox bug 835883).
### DOM

* 实现了`window.location`上的 `origin` 属性 (Firefox bug 828261).
* 实现了 `<input type="time">` 对象上的 `valueAsDate` 和 `valueAsNumber` 方法 (Firefox bug 781570).
* 实现了 `<input type="time">` 对象上的 `min` 和 `max` 属性 (Firefox bug 781572).
* Some new keyCodes for volume control are supported (Firefox bug 674739).
* Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux (Firefox bug 833719).
* Various keyCode values for OEM sepecific keys on Windows are now supported again (Firefox bug 833719).
* 实现了`window.crypto.getRandomValues`函数 (Firefox bug 440046)。
### SVG

* 实现了`paint-order`属性 (Firefox bug 828805).
### 网络

* 更新 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 21 发行说明
* Firefox 21 网站兼容性
* Firefox 21 附加组件兼容性
### 更早版本

* Firefox 20 for developers
* Firefox 19 for developers
* Firefox 18 for developers
* Firefox 17 for developers (en-US)
* Firefox 16 for developers (en-US)
* Firefox 15 for developers (en-US)
* Firefox 14 for developers
* Firefox 13 for developers (en-US)
* Firefox 12 for developers (en-US)
* Firefox 11 for developers (en-US)
* Firefox 10 for developers (en-US)
* Firefox 9 for developers (en-US)
* Firefox 8 for developers (en-US)
* Firefox 7 for developers (en-US)
* Firefox 6 for developers (en-US)
* Firefox 5 for developers (en-US)
* Firefox 4 for developers (en-US)
* Firefox 3.6 for developers (en-US)
* Firefox 3.5 for developers (en-US)
* Firefox 3 for developers
* Firefox 2 for developers (en-US)
* Firefox 1.5 for developers (en-US)