Search code examples
androidgoogle-chromeandroid-emulatorconsolecontent-script

Chrome Content Script doesn't run when inspecting WebView for Android Emulator


I have a Chrome Content Script setup to match <all_urls>. It runs when I load any website or local file in the browser. But I can't figure out how to get it to run when I'm inspecting a WebView from the Android Emulator which I'm accessing via chrome://inspect/#devices.

Is it possible for Content Scripts to load when inspecting a device WebView like this?


Solution

  • I'll answer my own question. It's not possible because the Content Script I've written is running in the desktop browser, whereas the app I'm inspecting is in the device browser - two totally different environments. I would need a Content Script in the device browser, but the mobile Chrome browser doesn't support this as of now.