从嵌入式应用脚本导航父站点

时间:2017-10-12 19:26:06

标签: javascript google-apps-script

我正在开发一个内部谷歌网站,并一直在利用嵌入式应用程序脚本来促进网站上更复杂的功能。我遇到了一个障碍,但是我想提供编辑记录的能力,利用已经开发的另一个页面,但是使用按钮从Web应用程序导航到它。单击按钮时,它会将iframe父级(站点)导航到我想要的URL。目前,我收到一个javascript错误,指示

> "VM804:5 Unsafe JavaScript attempt to initiate navigation for frame
> with URL
> 'https://n-z2vljuo5gowvr7ouc7uiijx7cxg3lrswlus2nqq-0lu-script.googleusercontent.com/userCodeAppPanel'
> from frame with URL
> 'https://n-z2vljuo5gowvr7ouc7uiijx7cxg3lrswlus2nqq-0lu-script.googleusercontent.com/userCodeAppPanel'.
> The frame attempting navigation is sandboxed, and is therefore
> disallowed from navigating its ancestors."

是否还有其他人遇到类似问题并能够解决这个问题?

1 个答案:

答案 0 :(得分:0)

您可以尝试重新启用更改父框架allow-top-navigation的{​​{1}}。

检查Guidelines and Limitations of the HTML Code and Embed a Site ElementsW3C specifications以了解详情。