Iframe can't find chrome.tabs.query

Hello, I’m porting a Chrome extension to Firefox. Here’s the situation:
In the Chrome extension, I need every page has a different popup and popup can stay in its own page. I choose to use webextension API to create different iframes in every pages. So when I switch between different tabs, popup won’t close. And I use chrome.tabs.query() in extension so that I can let background script know what popup the different tabs store.

But when I porting it to Firefox, the js in iframe can’t find chrome.tabs.query(). Here’s the console log information of the “chrome” variable, it seems that Firefox don’t allow me to use this API.

I’am sure that I import it in web_accessible_resources of manifest.json. And the src of the iframe has this form:
moz-extension://773089ae-bfc8-4898-978e-9338a2647f60/iframe_index.html

By the way, I import the javascript with probloem into content_scripts and change “all_frames” to true. But it can’t work.
Is there any solution to solve this problem? Thanks for your help