Firefox 17 for developers 發行說明
Firefox 17 於 2012 年 11 月 20 日釋出。本文件列出了對 Web 開發者、Firefox 和 Gecko 開發者以及附加元件開發者都有用的主要更改。
面向網路開發者的變更
HTML
- 已支援 `
sandbox` 屬性在 `<iframe>` 元素上的使用。(Firefox bug 341604)
CSS
- 已支援 `CSS Conditional Rules Module Level 3` 中定義的 `@supports` 規則。該功能預設停用。開發者可以透過將 `layout.css.supports-rule.enabled` 設定為 `true` 來嘗試使用。(bug 649740)
- 已支援 CSS Selectors Level 4 偽類 `
:dir()`,允許根據元素的書寫方向進行選擇。(bug 562169) - 已支援 CSS `
unicode-bidi` 屬性新規範中的 `isolate-override` 值。(Firefox bug 77335) - 我們對 `box-sizing` 的帶字首實現現在會考慮 `min-height` 和 `max-height`。這是實現無字首化的一步。(Firefox bug 308801)
DOM/API
- 已支援 `CSS3 Conditional Rules specification` 中定義的 `CSSSupportsRule` 介面。(Firefox bug 649740)
- 已支援 `WheelEvent` 物件和 `wheel` 事件。(Firefox bug 719320)。
- 重新支援 Linux 上的 DOM Meta 鍵。(Firefox bug 751749)。
- 在 `HTMLMediaElement` 上,新增了一個方法 `mozGetMetadata`,該方法返回一個 JavaScript 物件,其屬性表示正在播放的媒體資源的元資料,格式為 `{key: value}` 對。(Firefox bug 763010)。
- 已重新支援 `Range.intersectsNode`;它在 Gecko 1.9 中已被移除。(Firefox bug 579638)。
- `Range.compareBoundaryPoints()` 現在會在比較方法無效時丟擲一個 `NOT_SUPPORTED_ERR` 值的 `DOMException`。(Firefox bug 714279)。
- `Event.initEvent()` 已根據規範進行了調整:在事件分發後呼叫它不會再丟擲錯誤,而只是一個空操作。(Firefox bug 768310)。
- 已移除非標準的 `XMLHttpRequest.onuploadrequest` 屬性。(Firefox bug 761278)。
- `XMLHttpRequest.getAllResponseHeaders()` 方法現在使用 CRLF(而不是 LF)分隔響應頭,符合規範要求。(Firefox bug 730925)。
JavaScript
- String 物件現在提供了 Harmony 標準的 `startsWith`、`endsWith` 和 `contains` 方法。(Firefox bug 772733)。
- String 方法 `link()` 和 `anchor()` 現在會轉義 `'"'`(引號)。(Firefox bug 352437)。
- 已實現對草案中的 `ParallelArray` 物件的實驗性支援。(Firefox bug 778559)。
- 支援迭代 `Map`/`Set`。(Firefox bug 725909)。
- 預設停用 ECMAScript for XML (E4X),一種已棄用的 JavaScript 擴充套件,用於網頁內容。(Firefox bug 778851)。
- 現在必須為暴露給內容的 Chrome JavaScript 物件設定 `__exposedProps__`。嘗試在沒有設定 `__exposedProps__` 的情況下從內容訪問 Chrome 物件將靜默失敗。(Firefox bug 553102)。
- `for...of` 迴圈現在可以根據 `.iterator()` 和 `.next()` 工作。(Firefox bug 725907)。
WebGL
- WebGL 擴充套件 `EXT_texture_filter_anisotropic` 已移除字首。現在使用 `"MOZ_EXT_texture_filter_anisotropic"` 會發出警告。帶字首的名稱將在將來的版本中移除。(Firefox bug 776001)。
SVG
無更改。
MathML
- 對 `
` 元素的 `align` 屬性的解析已更新,以更正確地處理可選的空格。
XUL
- XUL `key` 元素支援 "os" 修飾符,該修飾符代表 Win 鍵(Super 或 Hyper 鍵)。(Firefox bug 778732)。
網路
- 移除了非標準的 `XMLHttpRequest.onuploadprogress` 功能,該功能在 Firefox 14 中已被棄用。
無更改。
開發者工具
- 將 JSTerm 的 $ 輔助函式從 `getElementById` 更改為 `querySelector()`。(Firefox bug 751749)。
使用者代理
使用者代理字串中的 Gecko 部分已更改。構建日期(自 2010 年以來未更新)已被移除,取而代之的是 Gecko 版本號。因此,`Gecko/20100101` -> `Gecko/17.0`。如果您進行使用者代理嗅探,這可能會影響您。
面向附加元件和 Mozilla 開發者的變更
介面更改
nsIInputStream-
`available()` 方法返回 64 位長度而不是 32 位。(Firefox bug 215450)。
nsIDOMWindowUtils-
`sendMouseScrollEvent()` 方法已被 `sendWheelEvent()` 取代。(Firefox bug 719320)。
nsIFilePicker-
已新增 `open()` 方法以非同步開啟檔案對話方塊,並且 `show()` 方法已被棄用。(Firefox bug 731307)。
nsIScriptSecurityManager-
`checkLoadURIStr()` 和 `checkLoadURI()` 方法已被移除。(Firefox bug 327244)。
nsIRefreshURI-
`setupRefreshURIFromHeader()` 方法已新增 `principal` 引數。(Firefox bug 327244)。
新介面
無。
已移除的介面
無移除項。
另見
- Firefox 17 發行說明
- Aurora 17 釋出,帶來更好的安全性和對新標準的更好支援 (Mozilla Hacks)
- Firefox 17 的附加元件相容性 (Add-ons Blog)