You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/develop/referencing-the-javascript-api-for-office-library-from-its-cdn.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Referencing the Office JavaScript API library
3
3
description: Learn how to reference the Office JavaScript API library and type definitions in your add-in.
4
-
ms.date: 01/07/2025
4
+
ms.date: 01/14/2025
5
5
ms.localizationpriority: medium
6
6
---
7
7
@@ -21,6 +21,31 @@ This will download and cache the Office JavaScript API files the first time your
21
21
> [!IMPORTANT]
22
22
> You must reference the Office JavaScript API from inside the `<head>` section of the page to ensure that the API is fully initialized prior to any body elements.
23
23
24
+
## Office.js-specific web API behavior
25
+
26
+
Office.js replaces the default [Window.history](https://developer.mozilla.org/docs/Web/API/History) methods of `replaceState` and `pushState` with `null`. This is done to [support older Microsoft webviews and Office versions](support-ie-11.md). If your add-in relies on these methods and doesn't need to run on Office versions that use the Internet Explorer 11 browser control, replace the Office.js library reference with the following workaround.
Thank you to [@stepper and the Stack Overflow community](https://stackoverflow.com/questions/42642863/office-js-nullifies-browser-history-functions-breaking-history-usage) for suggesting and verifying this workaround.
48
+
24
49
## API versioning and backward compatibility
25
50
26
51
In the previous HTML snippet, the `/1/` in front of `office.js` in the CDN URL specifies the latest incremental release within version 1 of Office.js. Because the Office JavaScript API maintains backward compatibility, the latest release will continue to support API members that were introduced earlier in version 1.
0 commit comments