How can I get the url of the host page in the content script iframe? #78
-
in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
There are two things here: Content Script: Content Script Iframe: To get webpage url just get Iframe parent address. |
Beta Was this translation helpful? Give feedback.
You can send message to background js, which will return the url of this tab?
Content Script or Iframe:
Backgroundjs:
I would recommend doing maximum work in background js, this is where all chrome APIs are available, it has the most permissions/ access. USe content script/ iframe for user interface purpose.