--- title: Updating extensions for Firefox 3 slug: Updating_extensions_for_Firefox_3 tags: - Firefox 3 translation_of: Mozilla/Firefox/Releases/3/Updating_extensions ---
초안
이 문서는 작성중입니다.
이 글은 기존에 작성한 확장 기능이 Firefox 3에서도 잘 작동할 수 있게 업데이트하기 원하는 개발자들에게 유용한 정보를 제공합니다.
진행하기 앞서 유용한 힌트를 드리겠습니다. 여러분이 작성한 확장기능이 install manifest의 maxVersion
값만 수정하면 되고 addons.mozilla.org 에서 제공되고 있다면, 새로운 버전의 확장기능을 업로드할 필요가 없습니다! 그냥 AMO에 있는 Developer Control Panel을 사용해서 maxVersion
을 수정하면 됩니다. 이렇게 하면 여러분의 확장기능이 다시 리뷰되는 것을 막을 수 있습니다.
첫 번째 단계(아마 대부분의 확장기능이 이 단계만 거치면 될 것 같습니다)는 install manifest 파일인 install.rdf를 Firefox 3과 호환되도록 수정하는 것입니다.
먼저 호환 가능한 Firefox의 최고 버전을 나타내는 라인을 찾습니다(Firefox 2에서는 다음과 같을 것입니다).
<em:maxVersion>2.0.*</em:maxVersion>
이 라인을 Firefox 3과 호환되도록 수정하세요.
<em:maxVersion>3.0.*</em:maxVersion>
그리고 확장 기능을 다시 설치하세요.
Firefox 3에서는 버전 번호의 마지막 ".0"이 사용되지 않으므로, "3.0.0.*" 대신 "3.0.*"으로 사용하면 된다는 점을 기억하세요.
maxVersion
이 3.0.*
인 확장기능을 배포하지 않는 것이 좋습니다. Firefox 3 Beta 기간동안에는 maxVersion
값에 3.0b3
을 사용하는 것이 좋습니다.확장기능들을 제대로 동작하지 않게 만들 수 있는 API의 많은 변화가 있었고 앞으로도 계속될 것입니다. 우리는 이러한 변화에 대한 전체 목록을 제공하기 위해 지속적으로 작업하고 있습니다.
Install.js
스크립트를 사용하고 있다면, 지금 시점에는 install manifest로 전환해야만 합니다. Firefox 3은 더 이상 XPI 파일의 install.js
스크립트를 지원하지 않습니다.Firefox 3에서는 지역화된 정보를 명시하기 위해 install manifest에 새로운 속성을 지원합니다. 기존 방법들이 여전히 동작하긴 하지만 새로운 방법을 이용하면 Firefox에서 부가 기능의 설치가 중지되어 있거나 불가능한 동안에도 지역 정보를 선택할 수 있도록 해 줍니다. 자세한 내용은 Localizing extension descriptions을 참조하세요.
여러분이 직접 부가기능을 제공하고 있지만 addons.mozilla.org과 같은 보안을 지원하지 않을 경우에는, 부가 기능을 업데이트할 수 있는 보안 방법을 제공해야 합니다. 이를 위해서는 여러분의 업데이트 사이트가 SSL 웹사이트에서 운영되던지 업데이트 정보가 서명된 암호화 키를 사용해야 합니다. 자세한 정보는 Securing Updates를 읽어보세요.
몇 가지 API에서 중요한 변화가 있었습니다. 다음은 대부분의 확장 기능에 영향을 줄 것으로 보이는, 가장 중요한 변화들 입니다.
Nodes from external documents should be cloned using document.importNode()
(or adopted using document.adoptNode()
) before they
can be inserted into the current document. For more on the Node.ownerDocument
issues, see the
W3C DOM FAQ.
Firefox doesn't currently enforce this rule (it did for a while during the development of Firefox 3, but too many sites break when this rule is enforced). We encourage Web developers to fix their code to follow this rule for improved future compatibility.
여러분의 확장 기능이 어떤 방식으로든 북마크나 히스토리 자료에 접근한다면, Firefox 3과 호환되도록 하기 위해 많은 수정 작업이 필요합니다. 해당 정보에 접근하는데 사용되었던 기존 API는 새로운 Places 구조로 변경되었습니다. 기존 확장 기능을 Places API를 사용하도록 업데이트하는 것과 관련된 상세 내용은 플레이스로 이행 가이드를 참조하세요.
다운로드 관리자 API는 RDF data store에서 [Storage]] API로의 변경으로 인하여 약간의 변경 사항이 있습니다. 이와 관련된 변경은 꽤 쉽습니다. 추가적으로 다운로드 진행을 모니터링하는 API에서는 다중 다운로드 관리자 리스너를 지원하도록 변경되었습니다. 자세한 내용은 nsIDownloadManager
, nsIDownloadProgressListener
, Monitoring downloads를 참조하세요.
여러분의 확장기능이 암호 관리자를 이용하여 사용자의 로그인 정보에 접근한다면, 새로운 암호 관리자 API를 사용하도록 업데이트해야만 합니다.
nsILoginInfo
nsILoginManager
The XUL Popup system was heavily modified in Firefox 3. The Popup system includes main menus, context menus and popup panels. A guide to using Popups has been created, detailing how the system works. One thing to note is that popup.
has been deprecated in favor of new showPopup
popup.
and openPopup
popup.
.openPopupAtScreen
다음 인터페이스들은 Firefox 3의 기반인 Gecko 1.9에서 제거되었습니다. 확장 기능이 이것들을 사용한다면 코드를 업데이트 해야 합니다.
nsIDOMPaintListener
nsIDOMScrollListener
nsIDOMMutationListener
nsIDOMPageTransitionListener
nsICloseAllWindows
(bug 386200 참조)There has been a minor change to the chrome that may require changes in your code. A new vbox
has been added, called "browser-bottombox", which encloses the find bar and status bar at the bottom of the browser window. Although this doesn't affect the appearance of the display, it may affect your extension if it overlays chrome relative to these elements.
For example, if you previously overlaid some chrome before the status bar, like this:
<window id="main-window"> <something insertbefore="status-bar" /> </window>
You should now overlay it like this:
<vbox id="browser-bottombox"> <something insertbefore="status-bar" /> </vbox>
여러분의 확장기능이 Firefox 3에서 제대로 동작하기 위해 업데이트 했던 간단한 사항들을 추가해 주세요.
nsIAboutModule
implementations are now required to support the getURIFlags
method. See nsIAboutModule.idl for documentation. This affects extensions that provide new about: URIs. (bug 337746)tabbrowser
은 "toolkit"의 일부가 아닙니다(bug 339964). 이는 이 요소가 더이상 XUL 응용 프로그램과 확장기능에서 사용 가능하지 않다는 것을 의미합니다. 이 요소는 메인 Firefox 윈도우(browser.xul)에서는 계속 사용될 것입니다.<?xml-stylesheet ?>
와 같은 XML 처리 지시문(processing instructions)을 사용하고 있다면 bug 319654을 참고하세요.
document.firstChild
이 문서의 루트 요소를 나타내지 않을 수도 있다는 것을 의미합니다. 스크립트에서 문서의 루트 요소를 얻으려면, 대신 document.documentElement
을 사용하세요. <?xml-stylesheet ?>
and <?xul-overlay ?>
processing instructions now have no effect outside the document prolog. window.addEventListener("load", myFunc, true)
is not fired when loading web content (browser page loads). This is due to bug 296639 which changes the way inner and outer windows communicate. The simple fix here is to use gBrowser.addEventListener("load", myFunc, true)
as described here and works in Firefox 2 as well.content.document.getSelection()
와 달리 content.window.getSelection()
은 객체를 반환하며 toString()
로 문자열로 변환할 수 있습니다.event.preventBubble()
was deprecated in Firefox 2 and has been removed in Firefox 3. Use event.stopPropagation()
, which also works in Firefox 2 as well.