Cross-origin in iframe content

Skip to first unread message

Keval Kankrecha

Jun 9, 2024, 2:20:07 PMJun 9
to Chromium Extensions
Hello currently i am creating a chrome extention for a website in which iframe is exist so whenever i am try to access data of the iframe it gives cross-origin related error 

you response will great for me?

Martin Sonesson [C]

Jun 10, 2024, 2:24:06 AMJun 10
to Chromium Extensions, Keval Kankrecha
Browsers don't allow for scripts to read the contents of inside an iframe for security reasons against XSS attacks. You can only read the contents of an iframe if it has the same origin as the parent site.

See this:


Jun 10, 2024, 6:24:13 AMJun 10
to Chromium Extensions, Martin Sonesson [C], Keval Kankrecha
Martin Sonesson, that's irrelevant for extensions which can run a content script inside the iframe.

Keval Kankrecha, as I explained in the other thread you have a typo and a possible mistake in the other code that you didn't show.

Reply all
Reply to author
0 new messages