A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
According to the Office.onReady Typescript documentation "...it can also be used outside the add-in. In that case, once Office.js determines that it is running outside of an Office host application, it will call the callback and resolve the promise with "null" for both the host and platform."
Thus, I am expecting both host and platform to be null when opening my app in the browser, inside onReady.
Current Behavior
Reading the host/application after Office.onReady after launching an application in the browser shows:
Host: "Excel" Platform: "PC"
This is especially weird given I'm on a Mac. As a workaround, I use if (!isEmpty(Office.context)) to check if I'm in or out of Word.
Expected Behavior
According to the
Office.onReady
Typescript documentation "...it can also be used outside the add-in. In that case, once Office.js determines that it is running outside of an Office host application, it will call the callback and resolve the promise with "null" for both the host and platform."Thus, I am expecting both host and platform to be null when opening my app in the browser, inside onReady.
Current Behavior
Reading the host/application after Office.onReady after launching an application in the browser shows: Host: "Excel" Platform: "PC"
This is especially weird given I'm on a Mac. As a workaround, I use
if (!isEmpty(Office.context))
to check if I'm in or out of Word.Steps to Reproduce, or Live Example
Context
I'm trying to do some basic UI testing with VS Code debugging, and also run an addin in Word without needing to recompile.
Your Environment