I study chrome extension **MV3** not **MV2**

I want to get frame id(integer) by frame id tag(string), not `all_frames: True` to use at `chrome.scripting.executeScript`

Because if there are many iframes, the code can be applied where I don't intend to.

For example, I want to inject javascript code only at iframe of **da\_iframe\_time** at this site [www.naver.com](https://www.naver.com/)

[![naver site picture](https://i.stack.imgur.com/2cwou.jpg)](https://i.stack.imgur.com/2cwou.jpg)

I wrote the code below based on the reference, but I don't know how to find the frame id using id tag.

> 
> background.js(serviceworker)
> 
> 
> 

```
chrome.webNavigation.onCommitted.addListener(function(tab) {
    chrome.webNavigation.getAllFrames({tabId: tab.tabId}, function(res){
        // I want to use the id tag here to find the frame id I want.
        for(let idx=0; idx<res.length; idx++){
            console.log(res[idx].frameId);
        }
        chrome.scripting.executeScript({
            target: {tabId: tab.tabId, frameIds: [""]},
            files: ['injectCode.js']
        });
    })
});

```