How can I get the url of the host page in the content script iframe? #78
|
in the |
Answered by
mubaidr
Jul 16, 2024
Replies: 1 comment 5 replies
|
There are two things here: Content Script: Content Script Iframe: To get webpage url just get Iframe parent address. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.