1

I want to call a function in content script JavaScript page when a jQuery ajax call is made in a web page.

I tried using the $(doc).ajaxComplete() function in the content script page but it is not getting called when an ajax call is made from web page, but when an ajax call is made from content script page the .ajaxComplete() is working.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • Have you tried `jQuery(document).ajaxStart()` ? see https://api.jquery.com/ajaxStart/ – Chris Jul 04 '18 at 13:09
  • I also found this with `$.ajaxSetup`: https://stackoverflow.com/a/9043790/5609537 – Chris Jul 04 '18 at 13:12
  • Content scripts run in *isolated world*. You need to [Insert code into the page context using a content script](//stackoverflow.com/q/9515704) – wOxxOm Jul 04 '18 at 13:13

0 Answers0