apache / apache/cordova-browser

Add an optional flag to prevent opening a new browser tab

Open
#109 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
174
Forks
86
Avg merge
8h 15m
Merged PRs (30d)
6

Description

# Feature Request

## Motivation Behind Feature
In order to view file changes you need to stop and restart the browser server; when that is done Cordova opens a new tab on the active browser, even if a tab is already open for the Cordova project.
Having to close the currently open tab each time the server is rebooted gets annoying.

## Feature Description

Add a optional argument `--no-launch` which will start the server, but won't open a new browser window/tab.

Example:
`cordova run browser --no-launch`

## Alternatives or Workarounds

Using `cordova serve` achieves this functionality; however, serve currently has an issue with loading plugins:

![image](https://user-images.githubusercontent.com/85203568/197294360-d115790b-01ff-4bcd-a93b-6f0d0c3a04a4.png)

(The plugins work as expected when using `cordova run browser` or `cordova run android`.)

Contributor guide

Open the contributing guide

Research direction

Start at the `cordova run browser` entry point and trace how browser launch arguments are parsed and passed to the server. Check how `cordova serve` avoids opening a tab, then define completion as supporting `--no-launch` without changing the default launch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.