apache / apache/cordova-plugin-inappbrowser

ExecuteScript callback does not return promise results.

Open
#516 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

If I execute a script that returns a promise in the executeScript function, I always get a blank object "{}" as a response. Ideally, I should be getting the resolved value of the promise.

eg: executeScript({
code: 'new Promise((resolve) => resolve(window.location.href))',
})

returns {}

Any help will be greatly appreciated.

Thanks

Contributor guide

Open the contributing guide

Research direction

Start at the executeScript entry point and reproduce the example with a script that resolves a promise to window.location.href. Trace how the callback serializes the result; done means the resolved value is returned instead of {}.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.