I can only see how to execute a script in the top level frame or in all frames in a certain tab:
chrome.tabs.executeScript(integer tabId, object details, function callback)
Where if details.allFrames
is true
then it will be executed in each subframe, but if it is false, it will only execute in the top level frame. How can I provide a frameId
to execute the script in?
As far as I know, you can't. Instead, set allFrames: true
and write javascript in the content script to detect if it is the correct frame, and return without doing anything if it is not the correct frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With