GAS:無法在 Firefox 中使用 HtmlService 自定對鬆式
GAS: Unable to use HtmlService custom dialogs in Firefox
我正在尝试在Google Apps Script中创建自定义对话框,如下所示:
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Custom Menu')
.addItem('Show dialog', 'showDialog')
.addToUi();
}
function showDialog() {
var html = HtmlService.createHtmlOutputFromFile('Page')
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setWidth(400)
.setHeight(300);
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.showModalDialog(html, 'My custom dialog');
}
Page.html
在哪里:
Hello, world! <input type="button" value="Close" onclick="google.script.host.close()" />
在Chrome中,它按预期工作。在Firefox 34中,对话框显示,但是当我单击关闭按钮时,它不会触发回调google.script.host.close()
。
Firebug 报告错误:
ReferenceError: google is not defined userCodeAppPanel (line 1)
这是
FF/IE的已知错误,请使用本机沙盒直到修复并遵循 https://code.google.com/p/google-apps-script-issues/issues/detail?id=4617 中的问题。
相关文章:
- 为什么这在IE中的工作方式与在Firefox中不同
- JS可以在Chrome中工作,但不能在Firefox中工作
- createElement("a") - FireFox JavaScript
- 为什么javascript:void(0)在Firefox中不起作用
- Facebook登录按钮没有'不能在Firefox上工作
- jpm的默认Firefox路径没有'不起作用
- 重载JS'firefox中的对象原型
- Ajax调用在Firefox中不会自动响应
- JS在firefox中无法正常工作
- firefox插件和dev/panel之间的通信
- IE/Chrome中未定义的函数,但Firefox中没有
- ascii输入键通过firefox中的javascript返回0
- 在firefox和chrome中的左侧显示iframe滚动条
- html5 drawImage适用于firefox,而不是chrome
- angularjs$valid-on-dates在firefox中报告错误
- 您可以使用JavaScript和Firefox扩展来更改现有页面吗
- 设置 CSS 背景在 Firefox 中不起作用
- 如何从Javascript打开Firefox
- 滚动在Chrome中有效,但在Firefox或IE中无效
- GAS:無法在 Firefox 中使用 HtmlService 自定對鬆式