apache / apache/cordova-plugin-inappbrowser

inAppbrowser.executeScript not working in Android

Open
#402 8 comments 1 reaction 0 assignees View on GitHub
platform: android support
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I need to use executeScript like :
`inAppRef.addEventListener('loadstop', function() {
inApp.executeScript({
code: "document.getElementsByTagName('html')[0].innerHTML"
}, function(html) {
// my code using html
}
}`
This is working well with iOS but not with Android. The loadstop is triggered but not the function(html).

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported Android behavior with the provided loadstop and executeScript example, then compare it with the working iOS behavior. Trace the Android executeScript entry point and callback path. Done means the callback receives the requested HTML on Android as it does on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, javascript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.