为什么Microsoft Edge显示“状态:失败”当Chrome每次工作时,在Google Apps脚本中使用客户端服务器函数集成时?
我的代码
我有一个测试范围,并且我有一个链接到它的应用程序脚本项目。
代码。GS的
function onOpen()
{
var testMenu = SpreadsheetApp.getUi()
.createMenu('Custom Menu');
testMenu.addItem('Show UI in sidebar', 'showSidebar');
testMenu.addToUi();
};
function showSidebar(){
var html = HtmlService.createTemplateFromFile('Page');
SpreadsheetApp.getUi().showSidebar(html.evaluate());
}
function doWorkInAppsScriptFile()
{
Logger.log("WORKING")
}
代码
<h2>google script run test</h2>
<div style="width:98%;margin:10px">
<div style="width:98%;margin:10px;padding:10px;text-align:center">
<input type="button" id="saveButton" onclick="onSave()" value="Save" style="background:DarkGreen;color:White;font-weight:bold;margin:10px"/>
</div>
</div>
<script type="text/javascript">
function onSave(){
google.script.run.doWorkInAppsScriptFile();
}
</script>
。
这是Microsoft Edge中的 不足以发表图像)
Microsoft Edge失败(在Google Chrome运行时 ,它显示出“从Google Chrome出现”。完全的”:
- 完成
- (64位)版本103.0.1264.37(官方构建)(64位)
- Chrome版本:版本102.0.5005.115(官方构建)(64位)
My code
I have a test spread sheet and I have an Apps Script project linked to it.
Here is the code for Code.gs
function onOpen()
{
var testMenu = SpreadsheetApp.getUi()
.createMenu('Custom Menu');
testMenu.addItem('Show UI in sidebar', 'showSidebar');
testMenu.addToUi();
};
function showSidebar(){
var html = HtmlService.createTemplateFromFile('Page');
SpreadsheetApp.getUi().showSidebar(html.evaluate());
}
function doWorkInAppsScriptFile()
{
Logger.log("WORKING")
}
And the code for Page.html
<h2>google script run test</h2>
<div style="width:98%;margin:10px">
<div style="width:98%;margin:10px;padding:10px;text-align:center">
<input type="button" id="saveButton" onclick="onSave()" value="Save" style="background:DarkGreen;color:White;font-weight:bold;margin:10px"/>
</div>
</div>
<script type="text/javascript">
function onSave(){
google.script.run.doWorkInAppsScriptFile();
}
</script>
Problem
In Microsoft edge: the Apps Script logger shows "Status: Failed"
Microsoft edge failure (Not enough rep to post image)
While when running from google chrome it shows "Completed":
Google completion
Other info:
- OS: Arch Linux
- Edge Version: Version 103.0.1264.37 (Official build) (64-bit)Version 103.0.1264.37 (Official build) (64-bit)
- Chrome version: Version 102.0.5005.115 (Official Build) (64-bit)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了。如果我登录所有帐户,则可以使用。
I figured it out. If I sign out of all accounts, it works.