Use this file to discover all available pages before exploring further.
The background.js file is an essential component in the extension’s architecture, managing communication between the content script and the DevTools panel. It sets up listeners for various events, injects the content script into active tabs, and forwards messages from the content script to the DevTools panel.
This listener waits for connections from the DevTools panel. Once a connection is established, the devToolsListener function is added as a message listener and the content script is injected into the active tab. The devToolsListener function is then removed when the DevTools disconnects.
This event listener listens for messages from the content script. It handles the events and sends messages to the DevTools panel through the established connection.