DEV Community

Discussion on: How Chrome extensions work

Collapse
 
sayan11 profile image
Sayan

Can you please let me know the purpose of doing so? There must be some other way to achieve the same result without declaring any url patterns.

Collapse
 
roman_fedyshyn profile image
Roman Fedyshyn

the main purpose it's allowing to insert our element on each page if we need, but without communication between page and extension it's impossible, for example maybe you know such extension as Grammarly, they have the same behaviour but that's a commercial project so I'm not sure that they will reveal how it works under the hood :)

Thread Thread
 
sayan11 profile image
Sayan

You can inject a content script if you want to make changes on the web page. Because afaik, there's no way to use wildcard patterns in the externally_connectable matches. I'd be glad to help you with content scripts.