Skip to content

Commit 527ad93

Browse files
[office-js][office-js-preview] (Outlook) Add note about the InitializationContextChanged event (DefinitelyTyped#72407)
1 parent 26cd4e4 commit 527ad93

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

types/office-js-preview/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21529,6 +21529,10 @@ declare namespace Office {
2152921529
*
2153021530
* - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using
2153121531
* `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it.
21532+
*
21533+
* - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
21534+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
21535+
* to the `contextData` property.
2153221536
*/
2153321537
contextData: any;
2153421538
}
@@ -23674,6 +23678,10 @@ declare namespace Office {
2367423678
*
2367523679
* - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client.
2367623680
* Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog.
23681+
*
23682+
* - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
23683+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
23684+
* to the `contextData` property.
2367723685
*/
2367823686
contextData?: any;
2367923687
/**
@@ -23853,6 +23861,10 @@ declare namespace Office {
2385323861
*
2385423862
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
2385523863
*
23864+
* - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
23865+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
23866+
* to the `contextData` property.
23867+
*
2385623868
* - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation
2385723869
* of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using
2385823870
* `JSON.parse()` once you retrieve it.

types/office-js/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21064,6 +21064,10 @@ declare namespace Office {
2106421064
*
2106521065
* - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using
2106621066
* `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it.
21067+
*
21068+
* - To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
21069+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
21070+
* to the `contextData` property.
2106721071
*/
2106821072
contextData: any;
2106921073
}
@@ -23150,6 +23154,10 @@ declare namespace Office {
2315023154
*
2315123155
* - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client.
2315223156
* Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog.
23157+
*
23158+
* - To prevent the task pane of a Smart Alerts add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
23159+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
23160+
* to the `contextData` property.
2315323161
*/
2315423162
contextData?: any;
2315523163
/**
@@ -23329,6 +23337,10 @@ declare namespace Office {
2332923337
*
2333023338
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
2333123339
*
23340+
* - To prevent the task pane of a spam-reporting add-in from relaunching if it's already open, implement a handler for the `Office.EventType.InitializationContextChanged` event.
23341+
* You can then pass the {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true | event arguments}
23342+
* to the `contextData` property.
23343+
*
2333223344
* - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation
2333323345
* of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using
2333423346
* `JSON.parse()` once you retrieve it.

0 commit comments

Comments
 (0)