apache / apache/cordova-plugin-inappbrowser
Managing multiple instances of In App Browser
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hey there! Is it possible to have two instances of the in app browser alive at the same time? I have a situation where I need to keep an instance alive and summon it at different times. I am just using show and hide as needed. However, in addition to this long living instance, I also need to have short lived instances that can be created and destroyed. For these instances I am calling show and close. The issue that I am experiencing is that when i close the second instance, the first long living instance gets destroyed as well. In code it looks something like this.
```
const ref1 = window.open(url, '_blank', REF1_CONFIG);
const ref2 = window.open(url, '_blank', REF2_CONFIG);
ref2.close();
ref1.show();
//error ?? Tried to show IAB after it was closed.
```
The behavior that I am looking for is that ref1 would persist and not be tied to ref2. Is this possible?
Contributor guide
Research direction
Start by tracing the window.open, show, and close lifecycle described in the example, then reproduce the sequence with two browser references. Done means closing ref2 leaves ref1 alive and allows ref1.show() to work; check the plugin's existing platform behavior before deciding whether this is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100