aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/firefox/releases/28
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/mozilla/firefox/releases/28')
-rw-r--r--files/zh-cn/mozilla/firefox/releases/28/index.html117
-rw-r--r--files/zh-cn/mozilla/firefox/releases/28/site_compatibility/index.html56
2 files changed, 173 insertions, 0 deletions
diff --git a/files/zh-cn/mozilla/firefox/releases/28/index.html b/files/zh-cn/mozilla/firefox/releases/28/index.html
new file mode 100644
index 0000000000..1e41a0b20d
--- /dev/null
+++ b/files/zh-cn/mozilla/firefox/releases/28/index.html
@@ -0,0 +1,117 @@
+---
+title: Firefox 28 for developers
+slug: Mozilla/Firefox/Releases/28
+tags:
+ - Firefox
+ - Firefox 28
+translation_of: Mozilla/Firefox/Releases/28
+---
+<div>{{FirefoxSidebar}}</div><p>Firefox 28 was released on March 18, 2014. 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.</p>
+
+<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
+
+<h3 id="Developer_Tools">Developer Tools</h3>
+
+<ul>
+ <li>The {{domxref("console.exception")}} property has been added ({{bug("922214")}}).</li>
+ <li>The {{domxref("console.assert")}} property has been added ({{bug("760193")}}).</li>
+ <li>App Manager: a new Manifest Editor was added.</li>
+ <li>App Manager: the toolbox used for debugging apps is now embedded in the app manager UI.</li>
+ <li>Web Console: added a "split console" mode - press Escape to quickly open the console in any other tool.</li>
+ <li>Web Console: added a dark theme for the output.</li>
+ <li>Debugger: pretty-print minified JavaScript.</li>
+ <li>Debugger: simply hover over any variable or click on it to bring up a pop-up that displays the current value.</li>
+ <li>Inspector: added a color picker in rules view and various tooltips.</li>
+ <li>Browser Toolbox: allows add-on and platform developers to use almost all of the developer tools while targeting the browser itself.</li>
+</ul>
+
+<p>More details in <a href="https://hacks.mozilla.org/2013/12/split-console-pretty-print-minified-js-and-more-firefox-developer-tools-episode-28/" title="Split console, pretty-print minified JS and more – Firefox Developer Tools Episode 28">this post</a>.</p>
+
+<h3 id="CSS">CSS</h3>
+
+<ul>
+ <li>Support for multi-line <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes">flexbox</a> has been added ({{bug("939901")}}).</li>
+ <li>Longhand East Asian <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type">counter styles</a> have been implemented ({{bug("934072")}}).</li>
+ <li>Experimental support for the {{cssxref("background-blend-mode")}} property has been added, but is disabled by default ({{bug("841601")}}).</li>
+ <li>The <code>none</code> value has been added to {{cssxref("font-variant-ligatures")}} ({{bug("913264")}}).</li>
+ <li>Support for the :hover user action pseudo-class on pseudo-elements({{bug("922669")}}).</li>
+</ul>
+
+<h3 id="HTML">HTML</h3>
+
+<ul>
+ <li><code>&lt;input type=color&gt;</code> and <code>&lt;input type=number&gt;</code> have been implemented, disabled by default.</li>
+</ul>
+
+<h3 id="JavaScript">JavaScript</h3>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">ECMAScript 2015</a> implementation continues:
+
+ <ul>
+ <li>New <code>Array</code> methods have been implemented: {{jsxref("Array.prototype.entries()")}} and {{jsxref("Array.prototype.keys()")}} ({{bug("894658")}}).</li>
+ </ul>
+ </li>
+ <li>A bug causing that {{jsxref("Object.getOwnPropertyNames()")}} did not see unresolved properties of {{jsxref("Error")}} objects has been fixed ({{bug("724768")}}).</li>
+</ul>
+
+<h3 id="InterfacesAPIsDOM">Interfaces/APIs/DOM</h3>
+
+<ul>
+ <li><code>HTMLVideoElement.canPlayType('video/webm')</code> now reports <code>maybe</code>.({{bug("884275")}}).</li>
+ <li>The {{domxref("DocumentFragment.getElementById()")}} method has been implemented. E.g. <code>document.createDocumentFragment().getElementById()</code>({{bug("933193")}}).</li>
+ <li>The {{domxref("KeyboardEvent.repeat")}} attribute has been implemented ({{bug("600117")}}).</li>
+ <li>The {{domxref("File")}} constructor, e.g. <code>new File(["foo"], "foo.txt")</code> has been implemented. ({{bug("819900")}}).</li>
+ <li>The {{domxref("NavigatorPlugins.plugins", "navigator.plugins")}} is no more enumerable, for privacy reasons ({{bug(757726)}}).</li>
+ <li>The two attributes {{domxref("Window.screenX")}} and {{domxref("Window.screenY")}} now return CSS pixels (and no more device pixels) ({{bug(943668)}}).</li>
+ <li>The two methods {{domxref("CanvasRenderingContext2D.drawSystemFocusRing()")}} and {{domxref("CanvasRenderingContext2D.drawCustomFocusRing()")}} have been implemented. The preference <code>canvas.focusring.enabled</code> must be set to <code>true</code> to activate both ({{bug(540456)}}).</li>
+ <li>The <code>willReadFrequently</code> context attribute for "<code>2d</code>" canvas contexts has been implemented (see {{domxref("HTMLCanvasElement.getContext()")}}) ({{bug(884226)}}).</li>
+ <li>The following attributes and methods of {{domxref("NavigatorID")}} have been implemented on {{domxref("WorkerNavigator")}} to allow their use in workers: {{domxref("NavigatorID.appCodeName", "appCodeName")}}, {{domxref("NavigatorID.product", "product")}}, and {{domxref("NavigatorID.taintEnabled", "taintEnabled()")}} ({{bug(925847)}}).</li>
+ <li>The {{domxref("NonDocumentTypeChildNode.previousElementSibling" , "previousElementSibling")}} and {domxref("NonDocumentTypeChildNode.nextElementSibling" , "nextElementSibling")}} properties has been removed from {{domxref("DocumentType")}}, because of compatibility problems ({{bug(932501)}}).</li>
+</ul>
+
+<h3 id="MathML">MathML</h3>
+
+<ul>
+ <li>Support of <span id="summary_alias_container"><span id="short_desc_nonedit_display">“</span></span>mathvariant<span id="summary_alias_container"><span id="short_desc_nonedit_display">”</span></span> attribute ({{bug("114365")}}).</li>
+</ul>
+
+<h3 id="SVG">SVG</h3>
+
+<p><em>No change.</em></p>
+
+<h3 id="AudioVideo">Audio/Video</h3>
+
+<ul>
+ <li><span id="summary_alias_container"><span id="short_desc_nonedit_display">Support Opus in WebM</span></span> ({{bug("887978")}}).</li>
+ <li><span id="summary_alias_container"><span id="short_desc_nonedit_display">Support VP9 video decoder</span></span> ({{bug("833023")}}).</li>
+</ul>
+
+<h3 id="Network">Network</h3>
+
+<ul>
+ <li>Support of <code>SPDY/2</code> has been removed.</li>
+</ul>
+
+<h2 id="Changes_for_addon_and_Mozilla_developers">Changes for addon and Mozilla developers</h2>
+
+<ul>
+ <li>The interface of <a href="https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/DeferredTask.jsm">DeferredTask.jsm</a> has been changed, and the <code>isPending()</code>, <code>start()</code>, <code>flush()</code>, and <code>cancel()</code> methods have been removed ({{bug("940408")}}).</li>
+</ul>
+
+<h2 id="Security">Security</h2>
+
+<ul>
+ <li>CSP was not enforced in sandboxed iframes. This has been fixed ({{bug(886164)}}).</li>
+ <li>The CSP 1.1 experimental <code>script-nonce</code> directive has been implemented. The preference <code>security.csp.experimentalEnabled</code> should be set to <code>true</code> to enable this functionality ({{bug(855326)}}).</li>
+</ul>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Mozilla/Firefox/Releases/28/Site_Compatibility">Site Compatibility for Firefox 28</a></li>
+</ul>
+
+<h3 id="Older_versions">Older versions</h3>
+
+<p>{{Firefox_for_developers('27')}}</p>
diff --git a/files/zh-cn/mozilla/firefox/releases/28/site_compatibility/index.html b/files/zh-cn/mozilla/firefox/releases/28/site_compatibility/index.html
new file mode 100644
index 0000000000..c2a74bad9f
--- /dev/null
+++ b/files/zh-cn/mozilla/firefox/releases/28/site_compatibility/index.html
@@ -0,0 +1,56 @@
+---
+title: Site Compatibility for Firefox 28
+slug: Mozilla/Firefox/Releases/28/Site_Compatibility
+translation_of: Mozilla/Firefox/Releases/28/Site_Compatibility
+---
+<div>{{FirefoxSidebar}}</div><p><span style="font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 30px;">DOM</span></p>
+<section id="sect5">
+ <section id="sect1">
+ <h3 id="navigator.plugins_不再是可枚举的"><code>navigator.plugins</code> 不再是可枚举的</h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=757726">Bug 757726 – disallow enumeration of navigator.plugins</a></li>
+ </ul>
+ <p>{{ domxref("PluginArray") }} 接口, 通常就是指 {{ domxref("window.navigator.plugins") }} 属性, 现在不再是可以枚举的了. 这么做主要是为了防止网站通过某些技术手段窃取用户隐私. 不过开发人员仍然可以使用 {{ domxref("window.navigator.mimeTypes") }} 接口来判断浏览器支持哪些 MIME 类型. 这一变更可能会给一些已有的代码<a href="https://bugzilla.mozilla.org/showdependencytree.cgi?id=934107">带来兼容性问题</a>.</p>
+ </section>
+ <section id="sect2">
+ <h3 id="showModalDialog_has_been_deprecated"><code>showModalDialog</code> has been deprecated</h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=933040">Bug 933040 – Warn for showModalDialog uses</a></li>
+ </ul>
+ <p>The {{ domxref("window.showModalDialog") }} method, originally from Internet Explorer, is now considered deprecated. The {{ domxref("window.open") }} method should be used instead.</p>
+ </section>
+ <section id="sect3">
+ <h3 id="Make_sure_the_deep_argument_is_specified_for_cloneNode_and_importNode">Make sure the <code>deep</code> argument is specified for <code>cloneNode</code> and <code>importNode</code></h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=937465">Bug 937465 – Add a warning when cloneNode/importNode is used without a boolean argument on a node with children</a></li>
+ </ul>
+ <p>The {{ domxref("Node.cloneNode") }} and {{ domxref("document.importNode") }} methods take the boolean <code>deep</code> argument. It's optional in the DOM4 specification, and if omitted, these methods acted as if the value of <code>deep</code> was <code>true</code>. But this behavior has been changed in the latest spec, and if omitted, the methods will act as if the value was <code>false</code>. Though It's still optional, Firefox now warns developers in console not to omit the argument for the forward compatibility.</p>
+ </section>
+ <section id="sect4">
+ <h3 id="History_objects_now_throw_if_the_document_is_inactive"><code>History</code> objects now throw if the <code>document</code> is inactive</h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=940783">Bug 940783 – History objects should unconditionally throw if their inner is not current</a></li>
+ </ul>
+ <p>The spec of the {{ domxref("History") }} interface has been updated, and the properties and methods now throw a <code>SecurityError</code> exception when those are called on an inactive {{ domxref("document") }}. It would be a problem if you are manipulating {{ domxref("window.history") }} in an {{ HTMLElement("iframe") }}.</p>
+ </section>
+</section>
+<section id="sect6">
+ <h2 id="Networking">Networking</h2>
+ <section id="sect7">
+ <h3 id="SPDY2_support_has_been_dropped">SPDY/2 support has been dropped</h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=912550">Bug 912550 – remove spdy/2 support</a></li>
+ </ul>
+ <p>The support of SPDY Protocol Draft 2 has been removed. Web sites should upgrade to SPDY/3 or 3.1.</p>
+ </section>
+</section>
+<section id="sect8">
+ <h2 id="VideoAudio">Video/Audio</h2>
+ <section id="sect9">
+ <h3 id="canPlayType('videowebm')_now_returns_'maybe'"><code>canPlayType('video/webm')</code> now returns <code>'maybe'</code></h3>
+ <ul>
+ <li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=884275">Bug 884275 – canPlayType('video/webm') should report 'maybe' instead of 'probably'</a></li>
+ </ul>
+ <p>The <code>canPlayType</code> method of the {{ domxref("HTMLMediaElement") }} interface has been updated to comply with the spec. <code>canPlayType('video/webm')</code> and <code>canPlayType('audio/webm')</code> now return <code>'maybe'</code> instead of <code>'probably'</code>, because media can be encoded with a codec that Firefox doesn't support. If a codec is specified in the <code>type</code> argument, the method returns <code>'probably'</code> or <code>''</code> (empty string) depending on the codec. For example, <code>canPlayType('video/webm; codecs=vp8')</code> returns <code>'probably'</code>.</p>
+ </section>
+</section>