getCurrentPosition deprecated on Google Apps iFrame?

限于喜欢 提交于 2019-11-30 22:00:14

问题


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?

https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes#TOC-To-continue-to-use-permissions-from-iframes-on-your-website...


回答1:


This new feature requested in the apps script support blog. You can vote for it.



来源:https://stackoverflow.com/questions/46677563/getcurrentposition-deprecated-on-google-apps-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!