Runtime element
Configures your add-in to use a shared JavaScript runtime so that various components all run in the same runtime. Child of the Runtimes element.
Add-in type: Task pane, Mail
Valid only in these VersionOverrides schemas:
- Task pane 1.0
- Mail 1.1
For more information, see Version overrides in the add-in only manifest.
Associated with these requirement sets:
- SharedRuntime 1.1 (Only when used in a task pane add-in.)
- Mailbox 1.10 and later (When used in an Outlook add-in that implements event-based activation.)
- Mailbox preview (When used in an Outlook add-in that implements the integrated spam reporting (preview) feature.)
Important
For the shared JavaScript runtime, this element enables the ribbon, task pane, and other supported components to use the same runtime. However, the SharedRuntime requirement set is only available in some Office applications. For more information, see Shared runtime requirement sets.
Outlook
- For event-based activation, this element enables your add-in to run on composing a new item, for example. For supported clients and other information, see Configure your Outlook add-in for event-based activation.
- For integrated spam reporting (preview), this element enables your add-in to process unsolicited messages. To learn more about how to implement the integrated spam reporting feature in your add-in, see Implement an integrated spam-reporting add-in (preview).
Note that the event-based activation and integrated spam reporting features must use the same runtime. Multiple runtimes aren't currently supported in Outlook.
Syntax
<Runtimes>
<Runtime resid="ContosoAddin.Url" lifetime="long" />
</Runtimes>
Contained in
Child elements
Element | Required | Description |
---|---|---|
Override | No | Outlook: Specifies the URL location of the JavaScript file that Outlook on Windows requires for LaunchEvent extension point and ReportPhishingCommandSurface extension point (preview) handlers. Important: At present, you can only define one <Override> element and it must be of type javascript . |
Attributes
Attribute | Required | Description |
---|---|---|
resid | Yes | Specifies the URL location of the HTML page for your add-in. The resid can be no more than 32 characters and must match an id attribute of a Url element in the Resources element. |
lifetime | No | The default value for lifetime is short and doesn't need to be specified. Outlook event-based activation and spam-reporting add-ins use only the short value. If you want to use a shared runtime in an Excel add-in, explicitly set the value to long . |
lifetime attribute
Optional. Represents the length of time the add-in is allowed to run.
Available values
short
: Default. Used only for Outlook event-based activation and spam-reporting add-ins. After the add-in is activated, it will run for a maximum amount of time as specified by the platform. Currently, that's around 5 minutes. This is the only value supported by Outlook.
long
: Used only when configuring a shared JavaScript runtime. The add-in can start on document open and run indefinitely. For example, task pane code will continue running even when the user closes the task pane. This is the only value supported by the shared runtime.