在Chrome扩展中创建隐藏的iframe [英] Creating a hidden iframe in a chrome extension
问题描述
是否可以在google-chrome扩展程序的background.html页面上创建一个iframe,并让它向网站发出请求?我不确定扩展是如何工作的。 Chrome是否会自动忽略所有显示标签,或者它会不可见地运行它?
我的理解是扩展的后台页面从不显示,但应该按预期运行 code> img 标签的code> src 属性将导致图像数据被提取)。我是实施扩展的新手,但架构概览似乎意味着这与我见过的示例一样。
您可以点击扩展控制面板中background.html的链接,然后检查source / dom / etc。
Is it possible to create an iframe on the background.html page in a google-chrome extension and have it make the request to the website? I am not sure how exactly the extension works. Does chrome automatically ignore all display tags or will it run it invisibly?
My understanding is that the background page of an extension is never displayed, but it should "run" as expected (e.g. src
attribute of an img
tag will cause the image data to be fetched). I'm new to implementing extensions, but the architecture overview seems to imply this, as do the samples I've seen.
You can click on the link to background.html in the extensions control panel and inspect the source/dom/etc.
这篇关于在Chrome扩展中创建隐藏的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!