Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Site Compatibility for Firefox 19

草案
本页尚未完工.

Firefox 19 Beta was released on . While it has been developed to maintain compatibility as much as possible, the new version includes some changes affecting backward compatibility aimed at improving interoperability with the other browsers or following the latest Web standards. Here's the list of such changes — Hope this helps whenever you test your sites or applications.

This article only explains the changes that may affect backward compatibility for Websites. For the other new features and changes, please read the following documents:

This list may be updated until the release of the final version, so please check back later.

CSS

flexbox脱前缀

The CSS3 flexible boxes (flexbox) implementation has been prefixed. From now on, use the related properties and keywords without moz prefix. Note that the flexbox is still disabled by default in Firefox 19. If you'd like to test the feature, open about:config and change the value of layout.css.flexbox.enabled to true.

-moz-initial属性脱前缀

The -moz-initial keyword has been unprefixed. While -moz-initial will remain in the meantime as an alias of initial, it will be removed at some time, so use the unprefixed keyword instead.

:-moz-placeholder伪类已修改成伪元素::-moz-placeholder

The :-moz-placeholder pseudo-class that matches form elements with the placeholder attribute has been removed, and the ::-moz-placeholder pseudo-element has been added instead. The implementation of WebKit has been a pseudo-element, and this change is a part of the standardization effort.

CSS动画中带有!important的关键帧规则声明将被忽略

Following the latest CSS3 animations spec, key frame rule declarations with the !important keyword are now be ignored and parse errors will be returned.

在about:config中添加了一些控制带前缀的CSS属性的有效性的选项

While this is not a change affecting site compatibility, it's worth mentioning because this has been developed as part of efforts to keep compatibility. Preferences to disable some major prefixed properties have been added: layout.css.prefixes.border-image, layout.css.prefixes.transforms, layout.css.prefixes.transitions and layout.css.prefixes.animations. Web developers can disable those preferences (change the values to false) to test whether style rules are applied as intended even after those prefixed implementations are removed.

DOM

Element.getElementsBy* 现在将返回HTMLCollection对象

getElementsByTagName, getElementsByTagNameNS以及getElementsByClassName方法返回的元素列表对象的类型从NodeList(遵循DOM3核心规范)变为HTMLCollection(遵循DOM4规范草案).

hasFeature/isSupported方法现在总会返回true

The document.implementation.hasFeature and Element.isSupported methods have been changed to always return true. The spec has been changed because those APIs were considered useless. However the SVG features are exception; those methods continue to return the support statuses.

createElement(null)不再抛出异常

Previously the document.createElement method has thrown exception INVALID_CHARACTER_ERR if the argument was null. The method now returns the HTMLUnknownElement object because the argument should be treated as a string and considered to be the same code as document.createElement("null").

document.referrer遵循了最新规范

When the URL of a nested inline frame (iframe) or a grandchild window is programmatically changed from the parent window, the value of the document.referrer property now points the URL of the parent window where the script is written instead of the child window that refers directly. This is due to a change of the spec and leads to the same behavior as Internet Explorer and Opera. WebKit to follow.

如果修改日期未知,则File.lastModifiedDate属性将返回当前日期

Following the latest File API spec, the lastModifiedDate property of a File object now returns the current date if the file's last modified date is unknown. Previously it returns null in such case.

Encoding API 遵循了最新规范

Following a change of the Encoding API spec, the implementation of TextEncoder and TextDecoder has been updated.

移除XForms支持

The XML Events implementation has been removed. The development of the Mozilla XForms extension that has used the API has been practically discontinued. The XForms accessibility support has also been removed from Firefox 19.

JavaScript

Map.sizeSet.size从方法变成属性

The size method, that returns the number of key/value pairs saved in a Map object and the number of values saved in a Set object, are changed to be read-only properties.

事件处理

一些事件句柄属性只存在于bodyframeset元素上

Previously, the onbeforeunload attribute has been recognized even if it has been set on any elements, and the named handler is called when the event is fired. To comply with the spec, it's now ignored when it has been set on elements other than body and frameset. The other attributes treated the same include onafterprint, onbeforeprint, onhashchange, onoffline, ononline, onpagehide, onpageshow, onpopstate, onresize and onunload.

文件处理

不再支持Content-Disposition响应头中的name参数

The name parameter included in the HTTP Content-Disposition header used for file downloading is now ignored. This parameter is non-standard and supported only by Firefox and Google Chrome. From now, use the standard filename parameter instead.

插件

移除了对Carbon NPAPI的支持

The Carbon event model and the Quickdraw drawing model, deprecated since Firefox 4, are no longer available. Webmasters should make sure your content works well if it requires any special plug-in. If it doesn't work on Firefox 19, please contact the plug-in vendor.

文档标签和贡献者

 此页面的贡献者: ziyunfei
 最后编辑者: ziyunfei,