开发者

Chrome Extension: communication between iframe and popup

开发者 https://www.devze.com 2023-01-08 19:53 出处:网络
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 \"p

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开发者_如何学C) 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.


You can use the opener property to access the window that created the popup.

0

精彩评论

暂无评论...
验证码 换一张
取 消