aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/firefox/releases/21/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/mozilla/firefox/releases/21/index.html')
-rw-r--r--files/zh-cn/mozilla/firefox/releases/21/index.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/files/zh-cn/mozilla/firefox/releases/21/index.html b/files/zh-cn/mozilla/firefox/releases/21/index.html
new file mode 100644
index 0000000000..9d0788dfa6
--- /dev/null
+++ b/files/zh-cn/mozilla/firefox/releases/21/index.html
@@ -0,0 +1,107 @@
+---
+title: Firefox 21 for developers
+slug: Mozilla/Firefox/Releases/21
+translation_of: Mozilla/Firefox/Releases/21
+---
+<div>{{FirefoxSidebar}}</div><h2 id="Web开发者需要注意的变化">Web开发者需要注意的变化</h2>
+<h3 id="HTML">HTML</h3>
+<ul>
+ <li>实现了{{HTMLElement("style")}}元素上的{{htmlattrxref("scoped", "style")}}属性.拥有该属性的{{HTMLElement("style")}}元素可以通过在Firefox 20中实现的CSS伪类{{cssxref(":scope")}}选择器选择到.({{bug("508725")}}).</li>
+ <li>实现了新的{{HTMLElement("main")}}元素({{bug("820508")}}).</li>
+</ul>
+<h3 id="JavaScript">JavaScript</h3>
+<ul>
+ <li><a href="/zh-CN/docs/E4X" title="/zh-CN/docs/E4X">E4X</a>,一个古老的JavaScript扩展(ECMA-357),已经被删除.因为一直以来,只有Gecko支持它.({{bug("788293")}}).</li>
+ <li><a href="https://developer.mozilla.org/zh-CN/docs/JavaScript/Reference/Global_Objects/parseInt" title="/zh-CN/docs/">parseInt</a>不再将以"0"开头的字符串作为8进制数字来解析({{bug("786135")}}).</li>
+</ul>
+<h3 id="CSS">CSS</h3>
+<ul>
+ <li>{{cssxref("user-select", "-moz-user-select")}}属性的属性值在设置为<code>none时和设置为</code><code>-moz-none时</code><code>效果等同于</code>,这样才能让Gecko和其他内核WebKit(Chrome, Safari),Presto (Opera)以及Trident(Internet Explorer)中的表现相同({{bug("816298")}}).</li>
+ <li>On XHTML content, the <code>auto</code> value of {{cssxref("hyphens", "-moz-hyphens")}} incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by ({{bug("702121")}}).</li>
+ <li>CSS属性{{cssxref("-moz-orient")}}现在支持新的值<code>auto</code>.当应用到一个{{HTMLElement("meter")}}元素或者{{HTMLElement("progress")}}元素上时,<code>auto就等同于</code><code>horizontal</code>({{bug("835883")}}).</li>
+</ul>
+<h3 id="DOM">DOM</h3>
+<ul>
+ <li>实现了{{domxref("window.location")}}上的<code>origin</code>属性 ({{bug("828261")}}).</li>
+ <li><code>实现了</code><code>&lt;input type="time"&gt;</code>对象上的<code>valueAsDate</code>和<code>valueAsNumber</code>方法({{bug("781570")}}).</li>
+ <li>实现了<code>&lt;input type="time"&gt;</code>对象上的<code>min</code>和<code>max</code>属性({{bug("781572")}}).</li>
+ <li>Some new keyCodes for volume control are supported ({{bug("674739")}}).</li>
+ <li>Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux ({{bug("833719")}}).</li>
+ <li>Various keyCode values for OEM sepecific keys on Windows are now supported again ({{bug("833719")}}).</li>
+ <li>实现了<a href="../../../../../zh-CN/docs/DOM/window.crypto.getRandomValues" title="DOM/window.crypto.getRandomValues"><code>window.crypto.getRandomValues</code></a>函数({{bug("440046")}}).</li>
+</ul>
+<h3 id="SVG">SVG</h3>
+<ul>
+ <li>实现了{{cssxref("paint-order")}}属性({{bug("828805")}}).</li>
+</ul>
+<h3 id="网络">网络</h3>
+<ul>
+ <li>更新CSP实现到最新的CSP规范1.0(CR):
+ <ul>
+ <li>Support for the spec-compliant <span id="summary_alias_container"><span id="short_desc_nonedit_display"><code>Content-Security-Policy</code> HTTP header (in addition to the experimental </span></span><span id="summary_alias_container"><span id="short_desc_nonedit_display"><code>X-Content-Security-Policy</code>) has been added ({{bug("783049")}}). <strong>Note</strong>: the patch for this new header landed in Firefox 21, it is disabled on builds</span></span> ({{bug("842657")}}).</li>
+ </ul>
+ </li>
+</ul>
+<h2 id="附加组件和Mozilla开发者需要注意的变化">附加组件和Mozilla开发者需要注意的变化</h2>
+<ul>
+ <li>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.</li>
+ <li>History API saw numerous deprecated API being removed:
+ <ul>
+ <li>Replaced by <code>mozIAsyncFavicons</code>:
+ <ul>
+ <li><code>nsIFaviconService::setFaviconUrlForPage</code></li>
+ <li><code>nsIFaviconService::setFaviconData</code></li>
+ <li><code>nsIFaviconService::getFaviconData</code></li>
+ <li><code>nsIFaviconService::getFaviconForPage</code></li>
+ <li><code>nsIFaviconService::setAndLoadFaviconForPage</code></li>
+ <li><code>nsIFaviconService::getFaviconImageForPage</code></li>
+ <li><code>nsIFaviconService::getFaviconDataAsDataURL</code></li>
+ </ul>
+ </li>
+ <li>Replaced by <code>mozIAsyncLivemarks</code>:
+ <ul>
+ <li><code>nsILivemarkService::*</code></li>
+ <li><code>PlacesUtils.itemIsLivemark</code></li>
+ <li><code>PlacesUtils.nodeIsLivemarkContainer</code></li>
+ <li><code>PlacesUtils.nodeIsLivemarkItem</code></li>
+ </ul>
+ </li>
+ <li>Removed only third argument:
+ <ul>
+ <li><code>PlacesUIUtils.showBookmarkDialog</code></li>
+ </ul>
+ </li>
+ <li>No more implemented by Places, use <code>mozIAsyncHistory</code> instead:
+ <ul>
+ <li><code>nsIGlobalHistory2::addURI</code></li>
+ <li><code>nsIGlobalHistory2::isVisited</code></li>
+ <li><code>nsIGlobalHistory2::setPageTitle</code></li>
+ </ul>
+ </li>
+ <li>No more needed, use <code>onDeleteURI</code> or <code>onItemRemoved</code>:
+ <ul>
+ <li><code>nsINavHistoryObserver::OnBeforeDeleteURI</code></li>
+ <li><code>nsINavBookmarkObserver::OnBeforeItemRemoved</code></li>
+ </ul>
+ </li>
+ <li>Never implemented properly:
+ <ul>
+ <li><code>nsINavHistoryFullVisitResultNode</code></li>
+ </ul>
+ </li>
+ <li>Deprecated, use<code> mozIAsyncHistory::updatePlaces</code> instead:
+ <ul>
+ <li><code>nsINavHistoryService::AddVisit</code></li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+</ul>
+<h2 id="相关链接">相关链接</h2>
+<ul>
+ <li><a href="http://www.mozilla.org/zh-CN/firefox/21.0/releasenotes/">Firefox 21发行说明</a></li>
+ <li><a href="../../../../../zh-CN/docs/Site_Compatibility_for_Firefox_21">Firefox 21网站兼容性</a></li>
+ <li><a href="https://blog.mozilla.org/addons/2013/04/26/compatibility-for-firefox-21/">Firefox 21附加组件兼容性</a></li>
+</ul>
+<h3 id="更早版本">更早版本</h3>
+<p>{{Firefox_for_developers('20')}}</p>