Google Apps iFrame上弃用getCurrentPosition? [英] getCurrentPosition deprecated on Google Apps iFrame?
问题描述
我通过Google Apps脚本上的HTML模板运行Google地图。
这意味着整个Web应用程序都存在于使用以下内容创建的iFrame中:
function doGet(e){var template = HtmlService.createTemplateFromFile('index.html'); template.action = ScriptApp.getService()。getUrl();返回template.evaluate()。setTitle('Google Map on Apps Script').setFaviconUrl('https://developers.google.com/_static/907a9d4ef3/images/favicon.png').setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL );}
以前从来没有这个问题,但现在getCurrentPosition是即将被禁用的不包含allow =geolocation属性的iFrame。
有谁知道如何将此属性添加到使用Google Apps脚本HTMLService?有没有类似于.setXFrameOptionsMode的东西?我在这里错过了什么?
应用脚本支持博客。
您可以为它投票。
I'm running a Google Map through an HTML template on Google Apps Script. This means that the entire web app exists within an iFrame created with the following:
function doGet(e) {
var template = HtmlService.createTemplateFromFile('index.html');
template.action = ScriptApp.getService().getUrl();
return template.evaluate().setTitle('Google Map on Apps Script').setFaviconUrl('https://developers.google.com/_static/907a9d4ef3/images/favicon.png').setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
This was never an issue before but now getCurrentPosition is about to be disabled for iFrames that don't include the allow="geolocation" attribute.
Does anyone know of a way to add this attribute to an iFrame created with the Google Apps Script HTMLService? Is there perhaps something similar to .setXFrameOptionsMode? What am I missing here?
This new feature requested in the apps script support blog. You can vote for it.
这篇关于Google Apps iFrame上弃用getCurrentPosition?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!