Download the Chrome extension before loading all page elements

I would like to download the Chrome extension before all page load elements (and not after). Is it possible? Thanks!

+4
source share
2 answers

If by extension you mean the content script, then the most you can do is set the "run_at": "document_start" property in the manifest, which means

"[content script] files are entered after any files from css, but before any other DOM is built or any other script is run."

(more details) .

You cannot contact your background page before the page starts loading, although there is no synchronous messaging.

+6
source

I have been trying for years. I do not know how. I can’t find the answer anywhere. "run_at": "document_start" does not work. It never has.

0
source

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


All Articles