简体   繁体   中英

Chrome Extension: communication between iframe and popup

I'm developing a Chrome extension, Which presents the user with an iFrame once the popup window is shown. I wish to invoke javascript function back on the hosting page. Now while I can access the "parent" object (it is not null) I can not invoke any method (like you would do with standard webpage that hosts an iFrame).

Any ideas how to accomplish this?

Thanks, E.

If the iFrame is an extension page, then you can use chrome.extension.getViews http://code.google.com/chrome/extensions/extension.html#method-getViews

That will get the list of views for that extension, and can manipulate it that way.

您可以使用opener属性访问创建弹出窗口的窗口。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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