How to convey the message of devtools.js in background.js the extension for Google Chrome?

I want to convey information about the network connections in the background page for further processing:
chrome.devtools.network.onRequestFinished.addListener(
 function(request) {
chrome.extension.sendMessage(request.request.url);
}
);

However, sendMessage is not working inside devtools.html/devtools.js =(

How to send a message devtools.js ➜ background.js?
And tell me whether messages about connections in General to come if the developer console is not open?

Yes, I read the documentation and it says that the Toolkit chrome.devtools.* only works from devtools.js as long as you open the console. However, if this is true, then I don't understand how it works let's say this is extension. It does not require opening the console and connections like that!
April 4th 20 at 13:22
1 answer
April 4th 20 at 13:24
Read, however the problem I have is harder than lock headers. I need to catch the IP address of the source during a video call via a browser. Or have I misunderstood you? - gisselle_Huels commented on April 4th 20 at 13:27
@gisselle_Huels, there is not only with headers work. Catch the url request and then do what you want. You carefully examples view. - lois.Botsford commented on April 4th 20 at 13:30
@lois.Botsford, in the interaction of RTP with the idea of no URLS, only IP addresses. Will I be able to see where is the media? - gisselle_Huels commented on April 4th 20 at 13:33
@gisselle_Huels, XS )) Everything is in your hands. Try it, post what happens )) - lois.Botsford commented on April 4th 20 at 13:36
@lois.Botsford, okay, thank you very much for the tip) I Will try. - gisselle_Huels commented on April 4th 20 at 13:39
@lois.Botsford, unfortunately nothing happened. Created handler at all stages of the connections from onBeforeRequest to onCompleted next track the properties of all objects for the presence of the ip address that I had known in advance. Tests done on https://talky.io

Alas, my ip address did not appear in any object and in any property. Tried manually looking and it seems that the webRequest API displays exclusively http connection in addition to them nothing had happened. - gisselle_Huels commented on April 4th 20 at 13:42
@gisselle_Huels, sorry. Well, a little experience in the knowledge Bank )) - lois.Botsford commented on April 4th 20 at 13:45

Find more questions by tags JavaScriptGoogle ChromeExtensions for browsers