-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
173 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.. _howto_contacts: | ||
|
||
=========================== | ||
Working with vCard contacts | ||
=========================== | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Getting your API added to Thunderbird | ||
===================================== | ||
|
||
If you think your API would be useful to other extensions, consider having it added to Thunderbird. | ||
`File a bug in the Extensions API component`__ and add your schema and implementation files as | ||
attachments. | ||
|
||
__ https://bugzilla.mozilla.org/enter_bug.cgi?product=Thunderbird&component=Add-Ons%3A%20Extensions%20API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Using folder and message types | ||
============================== | ||
|
||
The built-in schema define some common objects that you may wish to return, namely | ||
:ref:`MailFolder <folders.MailFolder>`, :ref:`MessageHeader <messages.MessageHeader>`, | ||
and :ref:`MessageList <messages.MessageList>`. | ||
|
||
To use these types, interact with the ``folderManager`` or ``messageManager`` objects which are | ||
members of the ``context.extension`` object passed to ``getAPI``: | ||
|
||
.. code-block:: javascript | ||
// Get an nsIMsgFolder from a MailFolder: | ||
let realFolder = context.extension.folderManager.get(accountId, path); | ||
// Get a MailFolder from an nsIMsgFolder: | ||
context.extension.folderManager.convert(realFolder); | ||
// Get an nsIMsgDBHdr from a MessageHeader: | ||
let realMessage = context.extension.messageManager.get(messageId); | ||
// Get a MessageHeader from an nsIMsgDBHdr: | ||
context.extension.messageManager.convert(realMessage); | ||
// Start a MessageList from an array or enumerator of nsIMsgDBHdr: | ||
context.extension.messageManager.startMessageList(realFolder.messages); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The Experiment API generator | ||
============================ | ||
|
||
Try the `Experiment API generator`__ to quickly get started making a WebExtension Experiment API. It | ||
doesn't cover all the possibilities, but should be useful for most use-cases or learning how | ||
things work. | ||
|
||
__ https://darktrojan.github.io/generator/generator.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Using tabs and windows | ||
====================== | ||
|
||
To access tabs or windows using the ID values from the built-in APIs, use the ``tabManager`` or | ||
``windowManager`` objects. These are have functions similar to, but not the same as, the APIs: | ||
|
||
.. code-block:: javascript | ||
// Get a real tab from a tab ID: | ||
let tabObject = context.extension.tabManager.get(tabId); | ||
let realTab = tabObject.nativeTab; | ||
let realTabWindow = tabObject.window; | ||
// Get a tab ID from a real tab: | ||
context.extension.tabManager.getWrapper(realTab).id; | ||
// Query tabs: (note this returns a Generator, not an array like the API) | ||
context.extension.tabManager.query(queryInfo); | ||
"Tabs" are a bit weird. For a tab on the main Thunderbird window, the ``nativeTab`` property is | ||
the ``tabInfo`` object you'd get from that window's ``<tabmail>``. For a tab *not* on the main | ||
window, e.g. a "tab" representing the message composition window, both ``nativeTab`` and ``window`` | ||
properties refer to the window itself. | ||
|
||
.. code-block:: javascript | ||
// Get a real window from a window ID: | ||
let windowObject = context.extension.windowManager.get(windowId); | ||
let realWindow = windowObject.window; | ||
// Get a window ID from a real window: | ||
context.extension.windowManager.getWrapper(realWindow).id; | ||
// Get all windows: (note this returns a Generator, not an array like the API) | ||
context.extension.windowManager.getAll(); | ||
For more things you could use on ``tabObject`` or ``windowObject`` in the examples above, see | ||
`the Tab, TabMailTab, and Window classes in the source code`__. | ||
|
||
__ https://hg.mozilla.org/releases/comm-esr78/file/tip/mail/components/extensions/parent/ext-mail.js#l763 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.