Hi,
I'm a new user of this wonderful plugin but I have an issue.
I encountered an issue where the executeScript method does not work as expected. When trying to execute a script in the InAppBrowser’s WebView, nothing happens.
The script does not execute, and no error is logged.
Expected behavior
The executeScript method should inject the provided script (alert('Hello from the website!');) into the WebView and execute it.
I test it on an Xcode iOs Simulator :
Here the output :
⚡️ To Native -> InAppBrowser openWebView 655573
⚡️ TO JS undefined
⚡️ TO JS {"url":"https:\/\/www.google.fr\/"}
⚡️ TO JS {"url":"https:\/\/www.google.fr\/"}
⚡️ TO JS {"url":"https:\/\/www.google.fr\/"}
⚡️ TO JS {"url":"https:\/\/www.google.fr\/"}
⚡️ To Native -> InAppBrowser addListener 655574
⚡️ To Native -> InAppBrowser executeScript 655575
⚡️ TO JS undefined
⚡️ [log] - URL changed: https://www.google.fr/
⚡️ TO JS undefined
Capacitor doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be
safely deleted.
💊 Capacitor Doctor 💊
Version
6.9.13
Platform(s)
Current behavior
Hi, I'm a new user of this wonderful plugin but I have an issue. I encountered an issue where the executeScript method does not work as expected. When trying to execute a script in the InAppBrowser’s WebView, nothing happens. The script does not execute, and no error is logged.
Expected behavior
The executeScript method should inject the provided script (alert('Hello from the website!');) into the WebView and execute it.
Reproduction
No response
Steps to reproduce
Other information
I test it on an Xcode iOs Simulator : Here the output : ⚡️ To Native -> InAppBrowser openWebView 655573 ⚡️ TO JS undefined ⚡️ TO JS {"url":"https:\/\/www.google.fr\/"} ⚡️ TO JS {"url":"https:\/\/www.google.fr\/"} ⚡️ TO JS {"url":"https:\/\/www.google.fr\/"} ⚡️ TO JS {"url":"https:\/\/www.google.fr\/"} ⚡️ To Native -> InAppBrowser addListener 655574 ⚡️ To Native -> InAppBrowser executeScript 655575 ⚡️ TO JS undefined ⚡️ [log] - URL changed: https://www.google.fr/ ⚡️ TO JS undefined
Capacitor doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted. 💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2
[info] Using Gemfile: RubyGems bundle installed [success] iOS looking great! 👌 [success] Android looking great! 👌
Before submitting
Fastest way to fix this issue