javascript - How to get frame's current src using chrome extension? -


i have webpage contains 2 frames:top , main. main frame not under domain, , websites.

yes can $("#main").attr("src") reach "first" src, not "current" src.

and know it's not possible done javascript due security issue, thinking creating chrome extension it.

i tried content script, think can not because it's add js page.

is there offer advices? thx

i can answer part:

i tried content script, think can not because it's add js page.

you need set "all_frames": true in manifest:

"content_scripts": [ {     "js": [ "script.js" ],     "matches": [ "http://*/*", "https://*/*" ],     "all_frames": true } ], 

this inject scripts each frame well.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -