Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 4.73 KB

File metadata and controls

65 lines (45 loc) · 4.73 KB
title slug
Firefox 19 for developers
Mozilla/Firefox/Releases/19

{{FirefoxSidebar}}

Firefox 19 已于 2013 年 2 月 19 日正式发布。

Web 开发者需要注意的变化

JavaScript

CSS

  • 支持了几个 viewport-relative 的 {{cssxref("<length>")}} 单位:vh, vw, vmin 以及 vmax (Firefox bug 503720)
  • CSS Flexbox 脱前缀,但仍然被默认禁止 (Firefox bug 801098).
  • -moz-initial 脱前缀 (Firefox bug 806068).不过 -moz-initial 仍然会作为别名保留一段时间,但仍然推荐你尽快改用 initial.
  • {{cssxref("text-transform")}} 属性现在支持了 full-width 关键字,which allows a more seamless inclusion of Latin characters in text using ideographic fixed-width characters, like Chinese or Japanese (Firefox bug 774560).
  • 实现了 {{cssxref("page-break-inside")}} (Firefox bug 685012).
  • {{cssxref("calc", "calc()")}} 函数可以使用在 <color-stop> 上 ( {{cssxref("<gradient>")}}上的一个值).
  • 实现了 {{cssxref("@page")}} @规则 (Firefox bug 115199).但是 {{cssxref(":first")}}, {{cssxref(":right")}}, {{cssxref(":left")}} 仍没实现。
  • {{cssxref(":-moz-placeholder")}} 伪类替换成 {{cssxref("::-moz-placeholder")}} 伪元素 (Firefox bug 737786).

DOM

  • {{domxref("element.getElementsByTagName")}} 方法开始返回 HTMLCollection 对象,而不是以前的 NodeList 对象。(Firefox bug 799464).
  • 实现了 {{domxref("File")}} 对象的 mozLastModifiedDate 属性。(Firefox bug 793955)
  • 当 {{domxref("File")}} 对象的最后修改时间无法获取到时,它的 lastModifiedDate 属性会返回当前日期。(Firefox bug 793459
  • 实现了 {{domxref("CanvasRenderingContext2D")}}对象的 isPointInStroke 方法。(Firefox bug 803124).
  • 实现了 {{domxref("HTMLCanvasElement")}} 对象的 toBlob 方法 (Firefox bug 648610).
  • {{domxref("Node.isSupported")}} 和 {{domxref("document.implementation", "document.implementation.hasFeature()")}} 方法会总是放回 true (Firefox bug 801425).
  • 当调用 document.createElement(null) 时,null 会被转换成字符串,就像执行了 document.createElement("null")

XForms

删除了对XForms的支持。

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

Note

A key change in Firefox 19 is that nsresult is now strongly typed. This will help make it easier to detect bugs that are caused by mishandling of return values, but may cause existing code to break if it's making incorrect assumptions in this regard.

  • getBrowserSelection() now returns the selected text in a text input field. As a result, gContextMenu.isTextSelected will be true when the user selects text in a text input field that is not a password field. (Firefox bug 565717)
  • Dict.jsm: Dict() now takes a JSON String. Dict.toJSON() was added, and it returns a JSON String. (Firefox bug 727967)

接口变化

  • nsIImgLoadingContent
    • : The parameter (aObserver) of addObserver() method changes from imgIDecoderObserver to imgINotificationObserver. The notify() method of imgINotificationObserver is not scriptable, so you need to use createScriptedObserver() from imgITools.
  • nsIChannel
    • : contentLength 属性的类型由 long 改成 int64_t.

参见

更早期的版本

{{Firefox_for_developers}}