Skip to content

Commit 167a139

Browse files
authored
Add note about onReady not resolving when office.js is blocked (#5418)
1 parent e1fb441 commit 167a139

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/develop/initialize-add-in.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Initialize your Office Add-in
33
description: Learn how to initialize your Office Add-in.
4-
ms.date: 08/18/2023
4+
ms.date: 10/16/2025
55
ms.localizationpriority: medium
66
---
77

@@ -87,6 +87,9 @@ However, there are exceptions to this practice. For example, suppose you want to
8787

8888
Another exception would be if you want a progress indicator to appear in the task pane while the add-in is loading. In this scenario, your code should call the jQuery `ready` and use its callback to render the progress indicator. Then the `Office.onReady` callback can replace the progress indicator with the final UI.
8989

90+
> [!IMPORTANT]
91+
> If the Office JavaScript API library files are blocked by network filters, firewalls, or browser extensions, `Office.onReady` will never resolve.
92+
9093
## Initialize with Office.initialize
9194

9295
An initialize event fires when the Office.js library is loaded and ready for user interaction. You can assign a handler to `Office.initialize` that implements your initialization logic. The following is an example that checks to see that the user's version of Excel supports all the APIs that the add-in might call.

docs/develop/loading-the-dom-and-runtime-environment.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Loading the DOM and runtime environment
33
description: Load the DOM and Office Add-ins runtime environment.
4-
ms.date: 05/20/2023
4+
ms.date: 10/16/2025
55
ms.localizationpriority: medium
66
---
77

@@ -30,6 +30,9 @@ The following events occur when a content or task pane add-in starts.
3030

3131
5. The Office client application loads the runtime environment, which downloads and caches the Office JavaScript API library files from the content distribution network (CDN) server, and then calls the add-in's event handler for the [initialize](/javascript/api/office#Office_initialize_reason_) event of the [Office](/javascript/api/office) object, if a handler has been assigned to it. At this time it also checks to see if any callbacks (or chained `then()` method) have been passed (or chained) to the `Office.onReady` handler. For more information about the distinction between `Office.initialize` and `Office.onReady`, see [Initialize your add-in](initialize-add-in.md).
3232

33+
> [!IMPORTANT]
34+
> If the Office JavaScript API library files are blocked by network filters, firewalls, or browser extensions, `Office.onReady` will never resolve.
35+
3336
6. When the DOM and HTML body finish loading and the add-in finishes initializing, the main function of the add-in can proceed.
3437

3538
## Startup of an Outlook add-in

0 commit comments

Comments
 (0)