在 webapp html 文件中使用 Apps 脚本库? [英] Using an Apps Script library in a webapp html file?

查看:31
本文介绍了在 webapp html 文件中使用 Apps 脚本库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在 Apps 脚本中使用库.当从 .GS 文件引用库代码时,我可以使库工作,但是通过 .HTML 文件访问它们时我无法使库工作(我收到消息 xxx 未定义)

I'm just starting to use libraries in Apps Script. I can get libraries to work when the library code is referenced from a .GS file but the I cannot get libraries to work when accessing them via .HTML files (I get a message xxx is undefined)

在我花更多时间在此之前,任何人都可以确认库仅适用于 .GS 文件

Before I spend anymore time on this can anyone confirm that libraries are only for .GS files

谢谢

推荐答案

您不能直接调用库函数,但如果您在 Google Apps Script 端创建一个调用库函数的函数,

You cannot call library functions directly, but if you create a function that calls library functions on the Google Apps Script side,

google.script.run.withSuccessHandler (onSuccess) .gasfunction ()

可以调用

有多种用途.

参考链接:库函数不能直接调用

这篇关于在 webapp html 文件中使用 Apps 脚本库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆