How to close sidebar with the new IFRAME mode in G

2019-06-01 15:58发布

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!

1条回答
时光不老,我们不散
2楼-- · 2019-06-01 16:39

you need a () after close. google.script.host.close()

查看更多
登录 后发表回答