title: Manifest v3 fetch data from external API
body: <p>I'm developing a Browser (Chrome, Firefox) extension with react with Manifest v3.
  In my app, I have a search bar where I show suggested words based on the value typed by the user (like search engine do).
  In manifest v2, I used to load this script like so:</p>
  <pre><code>  &quot;content_security_policy&quot;: &quot;script-src 'self' https://suggest.finditnowonline.com; object-src 'self'&quot; 
  </code></pre>
  <p>In v3 this is not supprted anymore but I cannot find the way how I could  still make my code work.
  he most  relevant resource I found online  are  this answer: <a href="https://stackoverflow.com/questions/65769339/content-security-policy-in-manifest-v3-for-facebook-page-plugin">Content Security Policy in Manifest V3 for Facebook Page Plugin</a></p>
  <p>and this documentation: <a href="https://www.chromium.org/Home/chromium-security/extension-content-script-fetches" rel="nofollow noreferrer">https://www.chromium.org/Home/chromium-security/extension-content-script-fetches</a></p>
  <p>But I cannot understand how I can implement my script from the background.js page since It needs to fetch the API dynamically, every time the user type something in the  input field.</p>
  <p>This is the react code: where I fetch the  api</p>
  <pre><code> useEffect(() =&gt; {
      const fetchSuggestedWords = async () =&gt; {
        try {
          const res = await fetchJsonp(`${process.env.SUGGESTED_WORDS_URL}${searchValue}`)
          const suggestedWordsArray = await res.json()
          setSuggestedWords(suggestedWordsArray[1].slice(0, 10))
          return
        } catch {
          console.log('error fetching suggested results')
        }
      }
  
      if (searchSuggestedWords) {
        fetchSuggestedWords()
      }
    }, [searchValue])
  </code></pre>
  <p>Where <code>searchValue</code> is a state update whenever the onChange event is trigger on the input field.</p>
  <p>Any tips on how to approach this new format?
  Would people recommend not switching to Manifest v3 just yet?</p>