简体   繁体   English

js / jquery - 如何从iframe内部更改现有的iframe属性

[英]js/jquery - How to change existing iframe attribute from inside the iframe

I am working with TFS and I'm trying to upload an extension(web page) to the dashboard. 我正在使用TFS,我正在尝试将扩展(网页)上传到仪表板。 When the dashboard loads my extension it wrapps my it with Iframe. 当仪表板加载我的扩展时,它会用Iframe包装我的。

TFS Iframe example TFS Iframe示例

The iframe sandbox attribute missing the allow-same-origin which allow me to manipulate the page that contains my extension. iframe沙箱属性缺少allow-same-origin ,允许我操作包含我的扩展名的页面。 Is there a way to change the iframe attribute from my extension web page? 有没有办法从我的扩展程序网页更改iframe属性? the whole page looks like: 整个页面看起来像:

<html> // Tfs page
<body>
<div> // main page
    <iframe sandbox='allow-scripts ...'> // the iframe that wrapps my extension, missing 'allow-same-origin'
        <html> // my extension
        <body>
        ...
        </body>
        </html>
    </iframe>
</body>
</html>

Thanks... 谢谢...

我认为这是有目的的:您应该使用SDK与VSTS / TFS进行交互,否则很容易想象一个在深层网络中销售公司知识产权的流氓扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM