Access browser events in chrome extension - DOM events in chrome extension

I am writing a chrome plugin in which I would like to receive events such as "loading", "unloading" of the window and page. However, I do not get any specific hint to start with.

Can someone tell me how to capture the DOM event in the plugin?

Does Chrome support this feature?

Thanks.

+4
source share
1 answer

You will need Content Scripts , and you simply add the normal browser events to the JavaScript that you enter as you indicated in your question. Each page will have this script content, and it will listen for these events.

+7
source

Source: https://habr.com/ru/post/1310071/


All Articles