Is it possible that add a iframe which will load a page outside the extension in content script?

152 views
Skip to first unread message

gogoend

unread,
Apr 8, 2024, 7:53:20 AM4/8/24
to Chromium Extensions
Hi, there

I'm developing a extension, which includes pay feature. The backend of pay feature is provided by Strip. I've written a page which includes Strip and can process pay on my own host server, and want to embed the page in the content script of extension via iframe.

Is it possible? 
Will this behavior disobey  remove-remote-code ?

Oliver Dunk

unread,
Apr 8, 2024, 7:55:06 AM4/8/24
to gogoend, Chromium Extensions
Hi,

To clarify, is your intent to use the content script to embed a Stripe payment form into a third-party website?

If so, it would be great to hear more about your use case. It's not immediately clear to me when you would need to do this which makes it a little hard to reason about where this is likely to fall when it comes to policy.
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/eb0a36cd-1e68-4bdd-90b8-b4f703db6cb4n%40chromium.org.
Message has been deleted
Message has been deleted

gogoend

unread,
Apr 8, 2024, 10:10:20 AM4/8/24
to Chromium Extensions, Oliver Dunk, Chromium Extensions, gogoend
emmmm, what I want is make user can use Stripe payment form on the website they're visiting.
And I have developed a page contains Stripe payment form on my site, so that I want to embed the page on user's page via content script via iframe.

I hope that during payment progress, user can stay at current page, rather than open a new tab and continue there.

wOxxOm

unread,
Apr 8, 2024, 3:37:27 PM4/8/24
to Chromium Extensions, gogoend, Oliver Dunk, Chromium Extensions
Embedding an external site doesn't violate the external code policy, on the contrary it's one of the officially recommended methods. Note that it won't work if the site's CSP forbids embedding unknown iframes, so you'll have to embed an extension frame first, then it'll embed the external frame. Example: https://stackoverflow.com/a/24649134
Reply all
Reply to author
Forward
0 new messages