如何在Google Apps脚本中使用新的IFRAME模式关闭侧边栏? [英] How to close sidebar with the new IFRAME mode in Google Apps Script?
本文介绍了如何在Google Apps脚本中使用新的IFRAME模式关闭侧边栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在电子表格中使用了一个侧边栏。由于引入了新的 IFRAME
模式,我现在将边栏初始化为:
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
它工作正常,除了现在以下函数在成功运行myFunction之后不会关闭侧栏
google.script.run
.withSuccessHandler(google.script.host.close)
.myFunction(myVar);
有谁知道如何解决这个问题?
<您需要一个
()
在关闭
之后。 google.script.host.close()
I'm using a sidebar in a spreadsheet. Due to the introduction of the new IFRAME
mode, I'm now initialising the sidebar with:
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
It is working fine, except now the following function doesn't close the sidebar after successfully running myFunction as per below:
google.script.run
.withSuccessHandler(google.script.host.close)
.myFunction(myVar);
Does anyone know how to fix this?
Thanks in advance!
解决方案
you need a ()
after close
.
google.script.host.close()
这篇关于如何在Google Apps脚本中使用新的IFRAME模式关闭侧边栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文