【发布时间】:2015-01-09 15:02:11
【问题描述】:
在 GAS 中,我想将 HTML 内容放在标签中,例如 described here。
我在this jsFiddle 中构建了一个工作原型。 (由于代码是 HTML,它不能在这个问题中正确呈现,否则我会包含它。所以只需导航到 the jsFiddle 即可查看。它也在 GAS project here 上的 index.html 文件中.)
但是,当我将 the jsFiddle 迁移到 my GAS project here 时,它停止工作。 (再次参见 GAS 中的 index.html 文件。)
您可以通过clicking here 看到 GAS 项目的输出。 请注意,这些选项卡不再像在 jsFiddle 版本中那样工作。
问题似乎是 index.html 文件第 47 行的资源没有加载。
检查您的 Chrome 开发者工具,注意控制台错误:
Uncaught In strict mode code, functions can only be declared at top level or immediately within another function.
注意其他控制台错误:
GET https://static-focus-opensocial.googleusercontent.com/gadgets/proxy?contain…DqEcDcnD&url=https%3A%2F%2Fgetbootstrap.com%2Fdist%2Fjs%2Fbootstrap.min.js 504 (Gateway Timeout) Uncaught Error: not loaded
所以你有它。有没有人可以想到让 bootstrap.js 资源(第 47 行)正确加载?还是我们必须求助于像described here 这样的“黑客”?
【问题讨论】:
标签: javascript twitter-bootstrap google-apps-script