Apps Script - Can't use google.script.run from within a js function in an html template?

前端 未结 2 1491
醉话见心
醉话见心 2021-02-11 04:00

UPDATED: This is totally possible. I just was closing the host window before the async method completed. My interpretation was that the running context would persist, even i

2条回答
  •  抹茶落季
    2021-02-11 04:20

    Instead of using HtmlService.createTemplateFromFile you could use:

     HtmlService.createHtmlOutputFromFile('simpleDialog');
    

    Here you can find more information about this function https://developers.google.com/apps-script/guides/html/

提交回复
热议问题