0

I am creating a web application in ReactJS, and I want to access Chrome APIs such as chrome.proxy, chrome.management, and chrome.tabs in my web application.

function App() {
  const onProxyConnect = () => {
    chrome.proxy.settings.get((details)=>{
      console.log({details}) //proxy details
    })
  };
  return (
    <div className='App'>
      <button onClick={onProxyConnect}>click</button>
    </div>
  );
}

export default App;

2
  • Not possible. In Chrome the app can send a message to a chrome extension's onMessageExternal listener in the background script so that it will call the API. In Both Chrome and Firefox the app can send a DOM CustomEvent to the content script of an extension running in the page so that it will send another message to its background script that will call the API. Commented Feb 1, 2024 at 13:33
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Feb 1, 2024 at 18:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.