Updating extensions for Firefox 3.6 编辑

This article provides helpful information to extension developers trying to update their extensions to work properly in Firefox 3.6.

User interface changes

Example: Testing if an element is an HTML img element

HTML 5 compliance improvements

The DOM Level 2 views to HTML and XHTML documents are now unified per HTML 5.

  • The name and the local-name functions in XPath returns the name of HTML elements in lower case. Previously, in HTML documents, they returned it in upper case.

 

The most probable upgrade problem is the pattern if (elt.localName == "FOO").

Firefox 3.6, both text/html and application/xhtml+xml

if (elt.localName == "img" && elt.namespaceURI == "http://www.w3.org/1999/xhtml")

Firefox 3.5 and 3.6, only extension-supplied text/html without foreign (e.g. SVG) script-inserted elements

if (elt.tagName == "IMG")

Firefox 3.5 and 3.6, both text/html and application/xhtml+xml

if (elt instanceof HTMLImageElement)

contents.rdf no longer supported

Support for the obsolete contents.rdf method for registering chrome has been removed in Gecko 1.9.2, and is no longer supported by Firefox 3.6. This means that add-ons that use contents.rdf can no longer be installed.

Make sure you include a chrome.manifest in your XPI.

Note: Add-ons that are already installed using the old contents.rdf method for registering chrome will continue to function if already installed. Make sure that you test your add-on by actually removing and reinstalling it to ensure that the install works after updating it to use an install manifest.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:82 次

字数:3460

最后编辑:3年前

最近更新:JSmiles

编辑次数:1 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文