K
K
Kirill Zhilyaev2017-06-04 23:02:20
Google Chrome
Kirill Zhilyaev, 2017-06-04 23:02:20

How to send ajax requests from extension?

I am writing an extension. I ran into difficulties, namely I can not use the window of the page. But I found a solution - to embed javascript into the page, but as I understand it - I need the ability to send AJAX requests as script extensions can. How can you inject a script into an extension and not lose the ability to make AJAX requests where necessary (of course ignoring Origin)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Developer, 2019-11-05
@sadvakasov

Add the permissions field to the manifest.json extension and specify the addresses to which you want to send Ajax requests

"permissions": [
    "webRequest",
    "<all_urls>"
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question