Firefox 19 for developers
Firefox 19 已于 2013 年 2 月 19 日正式发布。
Web 开发者需要注意的变化
>JavaScript
Map和Set对象的size()方法变成了size属性。(Firefox bug 807001)Map和Set对象新增了一个 clear() 方法。(Firefox bug 805003)
CSS
- 支持了几个 viewport-relative 的
<length>单位:vh,vw,vmin以及vmax(Firefox bug 503720) - CSS Flexbox 脱前缀,但仍然被默认禁止 (Firefox bug 801098).
-moz-initial脱前缀 (Firefox bug 806068).不过-moz-initial仍然会作为别名保留一段时间,但仍然推荐你尽快改用initial.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).- 实现了
page-break-inside(Firefox bug 685012). calc()函数可以使用在<color-stop>上 (<gradient>上的一个值).- 实现了
@page@规则 (Firefox bug 115199).但是:first,:right,:left仍没实现。 :-moz-placeholder伪类替换成::-moz-placeholder伪元素 (Firefox bug 737786).
DOM
element.getElementsByTagName方法开始返回HTMLCollection对象,而不是以前的NodeList对象。(Firefox bug 799464).- 实现了
File对象的mozLastModifiedDate属性。(Firefox bug 793955) - 当
File对象的最后修改时间无法获取到时,它的 lastModifiedDate 属性会返回当前日期。(Firefox bug 793459 - 实现了
CanvasRenderingContext2D对象的isPointInStroke方法。(Firefox bug 803124). - 实现了
HTMLCanvasElement对象的toBlob方法 (Firefox bug 648610). Node.isSupported和document.implementation.hasFeature()方法会总是放回true(Firefox bug 801425).- 当调用
document.createElement(null)时,null会被转换成字符串,就像执行了document.createElement("null")。
XForms
附加组件和 Mozilla 开发者需要注意的变化
备注:
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.isTextSelectedwill betruewhen 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 fromimgIDecoderObservertoimgINotificationObserver. Thenotify()method ofimgINotificationObserveris not scriptable, so you need to usecreateScriptedObserver()fromimgITools. nsIChannel-
contentLength属性的类型由long改成int64_t.
参见
更早期的版本
- Firefox 18 的开发者说明
- Firefox 17 的开发者说明
- Firefox 16 的开发者说明
- Firefox 15 的开发者说明
- Firefox 14 的开发者说明
- Firefox 13 的开发者说明
- Firefox 12 的开发者说明
- Firefox 11 的开发者说明
- Firefox 10 的开发者说明
- Firefox 9 的开发者说明
- Firefox 8 的开发者说明
- Firefox 7 的开发者说明
- Firefox 6 的开发者说明
- Firefox 5 的开发者说明
- Firefox 4 的开发者说明
- Firefox 3.6 的开发者说明
- Firefox 3.5 的开发者说明
- Firefox 3 的开发者说明
- Firefox 2 的开发者说明
- Firefox 1.5 的开发者说明