aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/mozilla/add-ons/sdk/guides
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/mozilla/add-ons/sdk/guides')
-rw-r--r--files/pt-br/mozilla/add-ons/sdk/guides/index.html367
-rw-r--r--files/pt-br/mozilla/add-ons/sdk/guides/working_with_events/index.html154
2 files changed, 521 insertions, 0 deletions
diff --git a/files/pt-br/mozilla/add-ons/sdk/guides/index.html b/files/pt-br/mozilla/add-ons/sdk/guides/index.html
new file mode 100644
index 0000000000..1f7e439322
--- /dev/null
+++ b/files/pt-br/mozilla/add-ons/sdk/guides/index.html
@@ -0,0 +1,367 @@
+---
+title: Guides
+slug: Mozilla/Add-ons/SDK/Guides
+tags:
+ - Add-on SDK
+ - NeedsTranslation
+ - TopicStub
+translation_of: Archive/Add-ons/Add-on_SDK/Guides
+---
+<p> </p>
+
+<div class="warning">
+<p>Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.</p>
+
+<p>Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use <a href="/en-US/Add-ons/WebExtensions">WebExtensions</a> instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.</p>
+
+<p><strong>Starting from <a href="https://wiki.mozilla.org/RapidRelease/Calendar">Firefox 53</a>, no new legacy add-ons will be accepted on addons.mozilla.org (AMO) for desktop Firefox and Firefox for Android.</strong></p>
+
+<p><strong>Starting from <a href="https://wiki.mozilla.org/RapidRelease/Calendar">Firefox 57</a>, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android. </strong></p>
+
+<p>Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the <a href="https://blog.mozilla.org/addons/2017/02/16/the-road-to-firefox-57-compatibility-milestones/">"Compatibility Milestones" document</a> for more information.</p>
+
+<p>A wiki page containing <a href="https://wiki.mozilla.org/Add-ons/developer/communication">resources, migration paths, office hours, and more</a>, is available to help developers transition to the new technologies.</p>
+</div>
+
+<section class="Quick_links" id="Quick_Links">
+<ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions"><strong>Browser extensions</strong></a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#Getting_started">Getting started</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/What_are_WebExtensions">What are extensions?</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension">Your first extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_second_WebExtension">Your second extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension">Anatomy of an extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Examples">Example extensions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/What_next_">What next?</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#Concepts">Concepts</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Using_the_JavaScript_APIs">Using the JavaScript APIs</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts">Content scripts</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns">Match patterns</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_files">Working with files</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization">Internationalization</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Security_best_practices">Security best practices</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy">Content Security Policy</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging">Native messaging</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#User_Interface">User interface</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface">User Interface</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_action">Toolbar button</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Page_actions">Address bar button</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars">Sidebars</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items">Context menu items</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Options_pages">Options page</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Extension_pages">Extension pages</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Notifications">Notifications</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Omnibox">Address bar suggestions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/devtools_panels">Developer tools panels</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#How_to">How to</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests">Intercept HTTP requests</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Modify_a_web_page">Modify a web page</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Safely_inserting_external_content_into_a_page">Insert external content</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar">Add a button to the toolbar</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Implement_a_settings_page">Implement a settings page</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_the_Tabs_API">Work with the Tabs API</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_the_Bookmarks_API">Work with the Bookmarks API</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_the_Cookies_API">Work with the Cookies API</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities">Work with contextual identities</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#Porting">Porting</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Porting_a_Google_Chrome_extension">Porting a Google Chrome extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on">Porting a legacy Firefox extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Embedded_WebExtensions">Embedded WebExtensions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">Comparison with the Add-on SDK</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">Comparison with XUL/XPCOM extensions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities">Chrome incompatibilities</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Differences_between_desktop_and_Android">Differences between desktop and Android</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions#Firefox_workflow">Firefox workflow</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/User_experience_best_practices">User Experience</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox">Temporary Installation in Firefox</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Debugging">Debugging</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Testing_persistent_and_restart_features">Testing persistent and restart features</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Developing_WebExtensions_for_Firefox_for_Android">Developing for Firefox for Android</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Getting_started_with_web-ext">Getting started with web-ext</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference">web-ext command reference</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID">Extensions and the Add-on ID</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Request_the_right_permissions">Request the right permissions</a></li>
+ </ol>
+ </li>
+ <li data-default-state="closed"><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API">JavaScript APIs</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs">Browser support for JavaScript APIs</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms">alarms</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks">bookmarks</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction">browserAction</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings">browserSettings</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData">browsingData</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/clipboard">clipboard</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/commands">commands</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts">contentScripts</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contextualIdentities">contextualIdentities</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies">cookies</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.inspectedWindow">devtools.inspectedWindow</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.network">devtools.network</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.panels">devtools.panels</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/dns">dns</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads">downloads</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/events">events</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension">extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extensionTypes">extensionTypes</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/find">find</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history">history</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/i18n">i18n</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity">identity</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/idle">idle</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management">management</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus">menus</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/notifications">notifications</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/omnibox">omnibox</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pageAction">pageAction</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions">permissions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pkcs11">pkcs11</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy">privacy</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy">proxy</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime">runtime</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/search">search</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sessions">sessions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction">sidebarAction</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage">storage</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs">tabs</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme">theme</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/topSites">topSites</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/types">types</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation">webNavigation</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest">webRequest</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows">windows</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json">Manifest keys</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/author">author</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background">background</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action">browser_action</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_settings_overrides">chrome_settings_overrides</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_url_overrides">chrome_url_overrides</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands">commands</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts">content_scripts</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_security_policy">content_security_policy</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/default_locale">default_locale</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/description">description</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer">developer</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/devtools_page">devtools_page</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/homepage_url">homepage_url</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/icons">icons</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/incognito">incognito</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/manifest_version">manifest_version</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name">name</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/omnibox">omnibox</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions">optional_permissions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/options_ui">options_ui</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/page_action">page_action</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permissions</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers">protocol_handlers</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/short_name">short_name</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action">sidebar_action</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme">theme</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version">version</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version_name">version_name</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources">web_accessible_resources</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes"><strong>Themes</strong></a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Theme_concepts">Browser themes</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Theme_concepts">Browser theme concepts</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_themes">Lightweight themes</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_themes">Lightweight themes</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_Themes/FAQ">Lightweight themes FAQ</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution"><strong>Publishing and Distribution</strong></a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution">Publishing add-ons</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution">Signing and distribution overview</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Package_your_extension_">Package your extension</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Submitting_an_add-on">Submit an add-on</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Source_Code_Submission">Source code submission</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Resources_for_publishers">Resources for publishers</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Listing">Creating an appealing listing</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Reviews">Review policies</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Agreement">Developer agreement</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Featured">Featured add-ons</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Retiring_your_extension">Retiring your extension</a></li>
+ </ol>
+ </li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options">Distributing add-ons</a>
+ <ol>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Sideloading_add-ons">For sideloading</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_for_desktop_apps">For desktop apps</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_in_the_enterprise">For an enterprise</a></li>
+ </ol>
+ </li>
+ <li><a href="https://discourse.mozilla.org/c/add-ons"><strong>Community and Support</strong></a></li>
+ <li><a href="#">Channels</a>
+ <ol>
+ <li><a href="https://blog.mozilla.org/addons">Add-ons blog</a></li>
+ <li><a href="https://discourse.mozilla.org/c/add-ons">Add-on forums</a></li>
+ <li><a href="http://stackoverflow.com/questions/tagged/firefox-addon">Stack Overflow</a></li>
+ <li><a href="/en-US/docs/Mozilla/Add-ons/#Contact_us">Contact us</a></li>
+ </ol>
+ </li>
+</ol>
+</section>
+
+<p> </p>
+
+<p>This page lists more theoretical in-depth articles about the SDK.</p>
+
+<hr>
+<h3 id="Contributor's_guide"><a name="contributors-guide">Contributor's guide</a></h3>
+
+<div class="column-container">
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Getting_Started">Getting Started</a></dt>
+ <dd>Learn how to contribute to the SDK: getting the code, opening/taking a bug, filing a patch, getting reviews, and getting help.</dd>
+ <dt><a href="Guides/Modules">Modules</a></dt>
+ <dd>Learn about the module system used by the SDK (which is based on the CommonJS specification), how sandboxes and compartments can be used to improve security, and about the built-in SDK module loader, known as Cuddlefish.</dd>
+ <dt><a href="Guides/Classes_and_Inheritance">Classes and Inheritance</a></dt>
+ <dd>Learn how classes and inheritance can be implemented in JavaScript, using constructors and prototypes, and about the helper functions provided by the SDK to simplify this.</dd>
+</dl>
+</div>
+
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Private_Properties">Private Properties</a></dt>
+ <dd>Learn how private properties can be implemented in JavaScript using prefixes, closures, and WeakMaps, and how the SDK supports private properties by using namespaces (which are a generalization of WeakMaps).</dd>
+ <dt><a href="Guides/Content_Processes">Content Processes</a></dt>
+ <dd>The SDK was designed to work in an environment where the code to manipulate web content runs in a different process from the main add-on code. This article highlights the main features of that design.</dd>
+ <dt><a href="Guides/Testing_the_Add-on_SDK">Testing the Add-on SDK</a></dt>
+ <dd>Learn how to run the Add-on SDK test suites.</dd>
+</dl>
+</div>
+</div>
+
+<hr>
+<h3 id="SDK_infrastructure"><a name="sdk-infrastructure">SDK infrastructure</a></h3>
+
+<div class="column-container">
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Module_structure_of_the_SDK">Module structure of the SDK</a></dt>
+ <dd>The SDK, and add-ons built using it, are of composed from reusable JavaScript modules. This explains what these modules are, how to load modules, and how the SDK's module tree is structured.</dd>
+ <dt><a href="Guides/SDK_API_Lifecycle">SDK API lifecycle</a></dt>
+ <dd>Definition of the lifecycle for the SDK's APIs, including the stability ratings for APIs.</dd>
+</dl>
+</div>
+
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Program_ID">Program ID</a></dt>
+ <dd>The Program ID is a unique identifier for your add-on. This guide explains how it's created, what it's used for and how to define your own.</dd>
+ <dt><a href="Guides/Firefox_Compatibility">Firefox compatibility</a></dt>
+ <dd>Working out which Firefox releases a given SDK release is compatible with, and dealing with compatibility problems.</dd>
+</dl>
+</div>
+</div>
+
+<hr>
+<h3 id="SDK_idioms"><a name="sdk-idioms">SDK idioms</a></h3>
+
+<div class="column-container">
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Working_with_Events">Working With Events</a></dt>
+ <dd>Write event-driven code using the the SDK's event emitting framework.</dd>
+ <dt><a href="Guides/Content_Scripts">Content scripts guide</a></dt>
+ <dd>An overview of content scripts, including: what they are, what they can do, how to load them, how to communicate with them.</dd>
+</dl>
+</div>
+
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Two_Types_of_Scripts">Two Types of Scripts</a></dt>
+ <dd>This article explains the differences between the APIs available to your main add-on code and those available to content scripts.</dd>
+</dl>
+</div>
+</div>
+
+<hr>
+<h3 id="XUL_migration"><a name="xul-migration">XUL migration</a></h3>
+
+<div class="column-container">
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/XUL_Migration_Guide">XUL Migration Guide</a></dt>
+ <dd>Techniques to help port a XUL add-on to the SDK.</dd>
+ <dt><a href="Guides/XUL_vs_SDK">XUL versus the SDK</a></dt>
+ <dd>A comparison of the strengths and weaknesses of the SDK, compared to traditional XUL-based add-ons.</dd>
+</dl>
+</div>
+
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Porting_the_Library_Detector">Porting Example</a></dt>
+ <dd>A walkthrough of porting a relatively simple XUL-based add-on to the SDK.</dd>
+</dl>
+</div>
+</div>
+
+<hr>
+<h3 id="Multiprocess_Firefox"><a name="multiprocess-firefox">Multiprocess Firefox</a></h3>
+
+<div class="column-container">
+<div class="column-half">
+<dl>
+ <dt><a href="Guides/Multiprocess_Firefox_and_the_SDK">Multiprocess Firefox and the SDK</a></dt>
+ <dd>How to check whether your add-on is compatible with multiprocess Firefox, and fix it if it isn't.</dd>
+</dl>
+</div>
+
+<div class="column-half"> </div>
+</div>
+
+<hr>
+<div>
+<div class="overheadIndicator communitybox" dir="ltr">
+<div class="column-container">
+<h2 id="Join_the_Add-on_SDK_community">Join the Add-on SDK community</h2>
+
+<div class="column-half">
+<div class="communitysubhead">Choose your preferred method for joining the discussion:</div>
+
+<ul class="communitymailinglist">
+ <li><a href="https://lists.mozilla.org/listinfo/">Mailing list</a></li>
+ <li><a href="https://twitter.com/mozillajetpack">Twitter</a></li>
+ <li><a href="http://stackoverflow.com/questions/tagged/firefox-addon-sdk">Stack Overflow</a></li>
+ <li><a href="http://groups.google.com/group/mozilla-labs-jetpack">Newsgroup</a></li>
+ <li><a href="http://groups.google.com/group/mozilla-labs-jetpack/feeds">RSS feed</a></li>
+</ul>
+</div>
+
+<div class="column-half">
+<ul class="communitycontact">
+ <li><strong>IRC: </strong><a href="irc://irc.mozilla.org/jetpack">#jetpack</a> <span class="smaller">(<a href="https://wiki.mozilla.org/IRC">learn more</a>)</span></li>
+ <li><strong>Team info: </strong><a href="https://wiki.mozilla.org/Jetpack" title="Designs and plans for the SDK tools">Jetpack Wiki</a></li>
+</ul>
+</div>
+</div>
+</div>
+</div>
diff --git a/files/pt-br/mozilla/add-ons/sdk/guides/working_with_events/index.html b/files/pt-br/mozilla/add-ons/sdk/guides/working_with_events/index.html
new file mode 100644
index 0000000000..9c51d1328f
--- /dev/null
+++ b/files/pt-br/mozilla/add-ons/sdk/guides/working_with_events/index.html
@@ -0,0 +1,154 @@
+---
+title: Trabalhando com Eventos
+slug: Mozilla/Add-ons/SDK/Guides/Working_with_Events
+translation_of: Archive/Add-ons/Add-on_SDK/Guides/Working_with_Events
+---
+<p>O Add-on SDK suporta programação dirigida a evento.</p>
+
+<p>Objetos emitem eventos sobre mudança de estados que devem ser interessantes ao código do add-on, tais como abertura de janelas, carregamento de páginas, requisições de rede completas, e cliques de mouse. Pelo registro de uma função de escuta para um emissor de evento um add-on pode receber notificações destes eventos.</p>
+
+<p><span>Nós falamos sobre scripts de conteúdo em mais detalhes no guia <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">Working with Content Scripts</a>.</span></p>
+
+<p>Adicionalmente, se você está usando scripts de conteúdo para interagir com o conteúdo web, você pode definir seus próprios eventos e usá-los para comunicar entre o código principal do add-on e os scripts de conteúdo. <span id="result_box" lang="pt"><span class="hps">Neste caso,</span> <span class="hps">uma extremidade</span> <span class="hps">da conversa</span> <span class="hps">emite</span> <span class="hps">os</span> <span class="hps">eventos</span><span>,</span> <span class="hps">e</span> <span class="hps">a outra extremidade</span> <span class="hps">ouve</span></span>.</p>
+
+<p>Portanto, há dois modos principais que você interagirá com o framework emissor de eventos:</p>
+
+<ul>
+ <li>
+ <p><strong>escutando eventos embutidos</strong> emitidos pelos objetos no SDK, tais como abertura de tab, carregamento de páginas, cliques de mouse</p>
+ </li>
+ <li>
+ <p><strong>enviando e recebendo eventos definidos pelos usuários</strong> entre scripts de conteúdo e o código do add-on</p>
+ </li>
+</ul>
+
+<p>Este guia cobre somente o primeiro destes; o segundo é explicado no guia <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">Working with Content Scripts</a>.</p>
+
+<h2 id="Adicionando_Escutadores">Adicionando Escutadores</h2>
+
+<p>Você pode adicionar um escutador para um emissor de evento pela chamada ao seu método<code> on(type, listener)</code>.</p>
+
+<p>Ele leva dois parâmetros:</p>
+
+<ul>
+ <li>
+ <p><strong><code>type</code></strong>: o tipo de evento que nós estamos interessado, identificado por uma string. Muitos emissores de evento devem emitir mais do que um tipo de evento: por exemplo, a janela do navegador deve emitir ambos os eventos <code>open</code> e <code>close</code>. A lista de tipos de eventos válidos é específica a cada emissor de evento e é incluída em sua documentação.</p>
+ </li>
+ <li>
+ <p><strong><code>listener</code></strong>: o escutador em si. Esta é uma função que será chamada sempre que o evento ocorrer. O argumento que será passado para o escutador é específico a um tipo de evento e é documentado com o emissor de evento.</p>
+ </li>
+</ul>
+
+<p>Por exemplo, o seguinte add-on registra uma escuta com o módulo <a href="/en-US/Add-ons/SDK/High-Level_APIs/tabs"><code>tabs</code></a> para esperar pelo evento <code>ready</code>, e registra uma string no console reportando o evento:</p>
+
+<pre class="brush: js">var tabs = require("sdk/tabs");
+
+tabs.on("ready", function () {
+ console.log("tab loaded");
+});
+</pre>
+
+<p>Não é possível enumerar o conjunto de escutas para um dado evento.</p>
+
+<p>O valor de <code>this</code> na função de escuta é o objeto que emitiu o evento.</p>
+
+<h3 id="Escutando_Todos_os_Eventos">Escutando Todos os Eventos</h3>
+
+<p>Você pode passar o curinga "*" como o argumento <code>type</code>. Se você fizer isso, a escuta será chamada para qualquer evento emitido por qualquer objeto, e seu argumento será o nome do evento:</p>
+
+<pre class="brush: js">var ui = require("sdk/ui");
+var panels = require("sdk/panel");
+var self = require("sdk/self");
+
+var panel = panels.Panel({
+ contentURL: self.data.url("panel.html")
+});
+
+panel.on("*", function(e) {
+ console.log("event " + e + " was emitted");
+});
+
+var button = ui.ActionButton({
+ id: "my-button",
+ label: "my button",
+ icon: "./icon-16.png",
+ onClick: handleClick
+});
+
+function handleClick(state) {
+ panel.show({
+ position: button
+ });
+}</pre>
+
+<p>Esta característica do curinga não funciona ainda nos módulos<a href="/en-US/Add-ons/SDK/High-Level_APIs/tabs"><code> tabs</code></a> ou <a href="/en-US/Add-ons/SDK/High-Level_APIs/windows"><code>window</code></a>.</p>
+
+<h3 id="Adicionando_escutas_em_construtores">Adicionando escutas em construtores</h3>
+
+<p>Emissores de evento podem ser módulos como no caso do evento <code>ready</code> acima, ou eles podem ser objetos retornados pelos construtores.</p>
+
+<p>No último caso o objeto <code>options</code> passado para o construtor tipicamente define propriedades cujos nomes são nomes de tipos de eventos suportados prefixados com "on": por exemplo, "onOpen", "onReady" e assim por diante. Então o construtor pode atribuir uma função de escuta para aquela propriedade como uma alternativa a chamada do método do objeto <code>on()</code>.</p>
+
+<p>Por exemplo: o objeto <a href="/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_action"><code>ActionButton</code></a> emite um evento quando o botão é clicado.</p>
+
+<p>O add-on a seguir cria um botão e atribui uma escuta para a propriedade <code>onClick</code> do objeto fornecida no <code>options</code> do construtor do objeto botão. A escuta carrega https://developer.mozilla.org/:</p>
+
+<pre class="brush: js">require("sdk/ui/button/action").ActionButton({
+  id: "visit-mozilla",
+  label: "Visit Mozilla",
+  icon: "./icon-16.png",
+  onClick: function() {
+    require("sdk/tabs").open("https://developer.mozilla.org/");
+  }
+});
+</pre>
+
+<p>Isto é exatamente equivalente a construir o botão e então chamar o método <code>on()</code> do botão</p>
+
+<pre class="brush: js">var button = require("sdk/ui/button/action").ActionButton({
+  id: "visit-mozilla",
+  label: "Visit Mozilla",
+  icon: "./icon-16.png"
+});
+
+button.on("click", function() {
+  require("sdk/tabs").open("https://developer.mozilla.org/");
+});
+</pre>
+
+<h2 id="Removendo_Escutas_de_Evento">Removendo Escutas de Evento</h2>
+
+<p>Escutas de evento pode ser removidos pela chamada de <code>removeListener(type, listener)</code>, fornecendo o tipo do evento e escuta a remover.</p>
+
+<p>A escuta deve ter sido previamente adicionada usando um dos métodos descritos acima.</p>
+
+<p>No add-on a seguir, nós adicionamos duas escutas para o <a href="https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs#ready">evento <code>ready</code> do módulo<code> tab</code></a>. Uma das funções de manipulação remove a escuta.</p>
+
+<p>Então nós abrimos duas abas.</p>
+
+<pre class="brush: js">var tabs = require("sdk/tabs");
+
+function listener1() {
+ console.log("Listener 1");
+ tabs.removeListener("ready", listener1);
+}
+
+function listener2() {
+ console.log("Listener 2");
+}
+
+tabs.on("ready", listener1);
+tabs.on("ready", listener2);
+
+tabs.open("https://www.mozilla.org");
+tabs.open("https://www.mozilla.org");
+</pre>
+
+<p>Nós devemos ver a saída como esta:</p>
+
+<pre>info: tabevents: Listener 1
+info: tabevents: Listener 2
+info: tabevents: Listener 2
+</pre>
+
+<p>As escutas serão removidas automaticamente quando o add-on for descarregado.</p>