谷歌硬盘中的Caja安全,GWT不兼容?
我想将谷歌硬盘中的Caja安全,GWT不兼容?,gwt,google-apps-script,google-drive-api,google-caja,Gwt,Google Apps Script,Google Drive Api,Google Caja,我想将GWT作为边栏嵌入到谷歌文档中。对于一个简单的jquery网页,一切都很好,但是当我嵌入最小的GWT应用程序时,它也不会显示出来。我将GWT应用程序缩减到最低限度: public class TemplateBuilder implements EntryPoint { public void onModuleLoad() { Window.alert("hello world"); } } 我包括以下GWT应用程序: 在code.gs中 function
GWT
作为边栏嵌入到谷歌文档中。对于一个简单的jquery
网页,一切都很好,但是当我嵌入最小的GWT应用程序时,它也不会显示出来。我将GWT应用程序缩减到最低限度:
public class TemplateBuilder implements EntryPoint {
public void onModuleLoad() {
Window.alert("hello world");
}
}
我包括以下GWT应用程序:
在code.gs中
function showSidebar() {
var htmlOutput = HtmlService.createHtmlOutputFromFile("sidebar.html").setTitle("Template Builder").setWidth(350);
htmlOutput.setSandboxMode(HtmlService.SandboxMode.NATIVE);
DocumentApp.getUi().showSidebar(htmlOutput);
}
在sidebar.html中
<html>
<head>
<script src="http://remoteserver/templatebuilder.nocache.js"></script>
</head>
<body>
<div id="globalStats" />
</body>
</html>
沙盒模式:原生904833574-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MK7wi1l9-fbv4ffzj9h74zcqopkxwgv_798;192
Object[Object Object]没有方法“replace”904833574-maestro\u htmlapp\u bin\u maestro\u htmlapp.js?lib=MK7wi1l9-fbv4ffzj9h74zcqopkxwgv\u66
Kp904833574-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MK7wi1l9-fBV4ffZJJ9h74zcqOPkxWgv_:66
applyFunctionses-single-frame.opt.js?debug=1:1454
tamingNullAdviceses-single-frame.opt.js?debug=1:1338
applyFeralFunctionses-single-frame.opt.js?debug=1:1320
applyFeralFunctionses-single-frame.opt.js?debug=1:1347
tses-single-frame.opt.js?debug=1:1386
plugin_dispatchEventses-single-frame.opt.js?debug=1:1308
wrapperses-single-frame.opt.js?debug=1:1085
dispatchEventses-single-frame.opt.js?debug=1:781
(anonymous function)ses-single-frame.opt.js?debug=1:1090
_SubConfidence.amplifyses-single-frame.opt.js?debug=1:840
(anonymous function)ses-single-frame.opt.js?debug=1:1090
amplifierMethodses-single-frame.opt.js?debug=1:838
dispatchToListenersses-single-frame.opt.js?debug=1:1268
(anonymous function)ses-single-frame.opt.js?debug=1:1268
(anonymous function)ses-single-frame.opt.js?debug=1:620
execDelayedScriptsses-single-frame.opt.js?debug=1:622
signalLoadedses-single-frame.opt.js?debug=1:620
(anonymous function)ses-single-frame.opt.js?debug=1:1476
fulfilledses-single-frame.opt.js?debug=1:1419
doneses-single-frame.opt.js?debug=1:1427
fulfilledses-single-frame.opt.js?debug=1:1419
(anonymous function)ses-single-frame.opt.js?debug=1:1421
runses-single-frame.opt.js?debug=1:1420
不幸的是,GAS HTMLService不支持GWT。 可以创建一个自定义链接器,将GWT应用程序编译成单个js文件,以使其正常工作,但不确定
Kp904833574-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MK7wi1l9-fBV4ffZJJ9h74zcqOPkxWgv_:66
applyFunctionses-single-frame.opt.js?debug=1:1454
tamingNullAdviceses-single-frame.opt.js?debug=1:1338
applyFeralFunctionses-single-frame.opt.js?debug=1:1320
applyFeralFunctionses-single-frame.opt.js?debug=1:1347
tses-single-frame.opt.js?debug=1:1386
plugin_dispatchEventses-single-frame.opt.js?debug=1:1308
wrapperses-single-frame.opt.js?debug=1:1085
dispatchEventses-single-frame.opt.js?debug=1:781
(anonymous function)ses-single-frame.opt.js?debug=1:1090
_SubConfidence.amplifyses-single-frame.opt.js?debug=1:840
(anonymous function)ses-single-frame.opt.js?debug=1:1090
amplifierMethodses-single-frame.opt.js?debug=1:838
dispatchToListenersses-single-frame.opt.js?debug=1:1268
(anonymous function)ses-single-frame.opt.js?debug=1:1268
(anonymous function)ses-single-frame.opt.js?debug=1:620
execDelayedScriptsses-single-frame.opt.js?debug=1:622
signalLoadedses-single-frame.opt.js?debug=1:620
(anonymous function)ses-single-frame.opt.js?debug=1:1476
fulfilledses-single-frame.opt.js?debug=1:1419
doneses-single-frame.opt.js?debug=1:1427
fulfilledses-single-frame.opt.js?debug=1:1419
(anonymous function)ses-single-frame.opt.js?debug=1:1421
runses-single-frame.opt.js?debug=1:1420