如何在 Google App 脚本中获取操作系统版本和名称?

How to get Operating System version and name in Google App Script?

我目前正在开发 GMail 插件,它需要一些与操作系统相关的信息。当我们 运行 'Navigator.UserAgent'

时我们得到的信息类型

我可以使用事件参数 'clientPlatform' 确定 some/partial 数据。但它没有 Navigator.UserAgent.

中更详细的信息

我也试过HtmlService.getUserAgent()但是它返回了null。

有没有办法从 Google Apps 脚本中获取类似 'userAgent' 的属性?

来自https://developers.google.com/apps-script/reference/html/html-service#getuseragent

getUserAgent()

Gets the user-agent string for the current browser. Returns null for most script executions if not used in a web app's doGet() or doPost() function.

换句话说,仅在 Web Apps Gmail-Addons 上是不可能的。