From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- .../releases/21/site_compatibility/index.html | 145 +++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 files/zh-cn/mozilla/firefox/releases/21/site_compatibility/index.html (limited to 'files/zh-cn/mozilla/firefox/releases/21/site_compatibility/index.html') diff --git a/files/zh-cn/mozilla/firefox/releases/21/site_compatibility/index.html b/files/zh-cn/mozilla/firefox/releases/21/site_compatibility/index.html new file mode 100644 index 0000000000..cf566f4262 --- /dev/null +++ b/files/zh-cn/mozilla/firefox/releases/21/site_compatibility/index.html @@ -0,0 +1,145 @@ +--- +title: Firefox 21网站兼容性 +slug: Site_Compatibility_for_Firefox_21 +translation_of: Mozilla/Firefox/Releases/21/Site_compatibility +--- +
{{FirefoxSidebar}}
+

CSS

+
+

-moz-user-select:none的表现变得和-moz-user-select:-moz-none相同,也就是和其他浏览器实现了统一

+ +

Previously, when you set the none keyword to the -moz-user-select property, the text of on the element and sub-elements became unselectable, even if one of those sub-elements had -moz-user-select:text. Starting with Firefox 21, none behaves like -moz-none and other browsers, so selection can be re-enabled on sub-elements using -moz-user-select:text.

+
+
+
+

DOM

+
+

删除了对tablecolslayout属性的支持

+ +

Firefox no longer accepts the cols and layout properties on the table elements. No other browsers support these obscure properties.

+
+
+

scrollWidthscrollHeight不再受overflow:visible的影响

+ +

The scrollWidth and scrollHeight properties might have wrong values when CSS overflow:visible was set on the element. This behavior has been fixed to match the values as if overflow:hidden is set.

+
+
+

window不再接受自定义的索引属性

+ +

Setting indexed expandos (custom properties which have number as the property name) on the window object is no longer allowed. Your code like window[2] = "myString" will be ignored from now on.

+
+
+

window对象上的索引属性变的可枚举

+ +

Previously, iframes in the DOM were not enumerable on the window object. This behavior has been changed to comply with the spec, which means they are now returned with Object.keys(window). This is important to note for things like global leak detection, since appending iframes to the document will modify the enumerable keys on the window object.

+
+
+

XMLHttpRequest.setRequestHeader方法的实现遵循了当前规范

+ +

Previously, if the same headers were repeatedly set with XMLHttpRequest.setRequestHeader, the last-specified value was used. This behavior has been changed to comply with the spec, so those values will be properly combined.

+
+
+

formMethodformEnctype的默认值成为一个空字符串

+ +

The HTML5 spec of the formMethod and formEnctype properties has been updated to have the empty string as default value. Firefox followed the change.

+
+
+

如果传递多条规则,CSSStyleSheet.insertRule方法会报错

+ +

If multiple rules was passed to the CSSStyleSheet.insertRule method, only the first rule was inserted into the stylesheet. Instead, Firefox now throws an exception SYNTAX_ERR like other browsers.

+
+
+

NodeIteratorTreeWalker上删除掉expandEntityReferences属性

+ +

The expandEntityReferences property, which returned a flag indicating whether or not the children of entity reference nodes were visible to the object, has been removed from the NodeIterator and TreeWalker objects, as it never made much sense.

+
+
+

CSSKeyframesRule.insertRule方法被改名为appendRule

+ +

One of the methods of the CSSKeyframesRule interface, insertRule has been renamed to appendRule to match a spec change.

+
+
+

HTMLInputElement.inputmode现在默认被禁用

+ +

HTMLInputElement's inputmode API, which has been implemented since Firefox 17, is now disabled by default because the spec is still unstable. You have to enable the dom.forms.inputmode pref or use the Aurora channel to try out this feature. Note that this API will be renamed inputMode (capitalized M) in Firefox 22.

+
+
+
+

JavaScript

+
+

E4X已经被完全删除

+ +

The support of ECMAScript for XML (E4X), deprecated and disabled since Firefox 17, has finally been dropped. You can no longer use the feature regardless of the hidden preference.

+
+
+

parseInt把以0开头的字符串当成十进制数字解析,而不是以前的八进制

+ +

The parseInt method implementation has been updated to conform to the ECMAScript 5 spec, and it now parses leading-zero strings as decimal, not octal. Therefore, parseInt("042") will return 42 instead of 34. If you'd like to parse strings as octal, specify the radix like parseInt(str, 8).

+
+
+

修正String.localeCompare在无参情况下的表现,以符合ES5规范

+ +

The String.localeCompare method implementation has been updated to conform to the latest ECMAScript 5 spec. If no argument is passed, the method takes the "undefined" string as the argument.

+
+
+
+

SVG

+
+

删除掉那些未实现的SVG特性

+ +

Unimplemented SVG features have been removed instead of just returning the NOT_IMPLEMENTED errors. These features include the viewport and currentView properties of SVGSVGElement.

+
+
+
+

Audio/Video

+
+

mozAudioContext属性脱前缀

+ +

The mozAudioContext implementation has been unprefixed. It's still disabled by default, though. To try out this feature, change the value of the media.webaudio.enabled pref to true.

+
+
+
+

安全

+
+

CSP实现更新到符合最新规范

+ +

Content Security Policy (CSP) 1.0 spec has been implemented. The existing parser will be used when a policy is served via the X-Content-Security-Policy header, and the new parser that follows the 1.0 spec will be used when a policy is served via the officially spec'd Content-Security-Policy header. Consult the latest spec if you'd like to implement CSP on your site. The documents on MDN will be updated sometime soon.

+
+
-- cgit v1.2.3-54-g00ecf