API for host information
We need host information for tracking environments and reproducing errors.
The method with requirements checking and the undocumented feature with reading the sessionStorage or querystring are painful as requirements change and undocumented features disappear.
Office.js could provide an API for this, as its internally use host information to load custom host scripts.

Thanks for this suggestion! You can obtain host information from the Context object. There’s more information here: https://github.com/OfficeDev/office-js-docs/blob/master/reference/shared/context.md
Please take a look and let us know if you have any feedback.
Thanks,
Office Extensibility Team