I'm developing a chrome extension and I want to display in the popup (when a user click extension icon) a page that has an url
of localhost
, in this page I will check if a user is logged in my site and depend on status I will display content in the page.
So I tried these:
First:
popup.html
(that doesn't contain the iframe
)popup.js
create an iframe
and give it an src
, width
, height
. than append it to the body.Second:
Neither the first nor the second works. and I get this:
But when I use a normal site in src
, like http://bing.com
it works and show the page of bing.com
--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/6d29e994-54de-4515-a97a-6cac702e9517%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
And when you go to localhost in a regular tab, does it behave differently?☆PhistucK
On Sat, Jul 14, 2018 at 12:21 PM Oussama He <oussa...@gmail.com> wrote:
0--I'm developing a chrome extension and I want to display in the popup (when a user click extension icon) a page that has an
url
oflocalhost
, in this page I will check if a user is logged in my site and depend on status I will display content in the page.
So I tried these:First:
- create a
popup.html
(that doesn't contain theiframe
)- in
popup.js
create aniframe
and give it ansrc
,width
,height
. than append it to the body.Second:
- in the popup.html add the iframe with the src of localhost.
- in popup.js create an iframe and give it an src, width, height. than append it to the body.
Neither the first nor the second works. and I get this:
But when I use a normal site in
src
, likehttp://bing.com
it works and show the page of bing.com
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
What does the console say? there must be an error?
--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/42454973-b834-4777-add3-fea8d010bf34%40chromium.org.