I have created chrome extension, which can handle current page ajax request, but my extension can't handle ajax request, which crated by other exstension (that requests I can see in chroome network tool). How can I handle ajax which initiators are other exstension scripts ??
-
2Possible duplicate of [Is it possible to catch requests from another extension?](http://stackoverflow.com/questions/37926493/is-it-possible-to-catch-requests-from-another-extension) – Haibara Ai Jul 04 '16 at 00:03
-
@HaibaraAi It's possible that requests made directly from content script (as opposed to originating from extension origin) can be caught. Needs testing. – Xan Jul 05 '16 at 12:01
-
You need to show your current code for catching requests. – Xan Jul 05 '16 at 12:02
1 Answers
please take a look at this
The webRequest API only exposes requests that the extension has permission to see, given its host permissions. Moreover, only the following schemes are accessible: http://, https://, ftp://, file://, or chrome-extension://. In addition, even certain requests with URLs using one of the above schemes are hidden, e.g., chrome-extension://other_extension_id where other_extension_id is not the ID of the extension to handle the request, https://www.google.com/chrome, and others (this list is not complete). Also synchronous XMLHttpRequests from your extension are hidden from blocking event handlers in order to prevent deadlocks. Note that for some of the supported schemes the set of available events might be limited due to the nature of the corresponding protocol. For example, for the file: scheme, only onBeforeRequest, onResponseStarted, onCompleted, and onErrorOccurred may be dispatched.
According to that, could you please check your host permissions settings and add there chrome-extension://*
or just <all_urls>

- 818
- 8
- 11