Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communicate progress #1

Open
TheJaredWilcurt opened this issue Apr 26, 2021 · 0 comments
Open

Communicate progress #1

TheJaredWilcurt opened this issue Apr 26, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@TheJaredWilcurt
Copy link
Member

TheJaredWilcurt commented Apr 26, 2021

The main window should be able to communicate with the splash screen via websockets to update a progress bar and message as it is loading.

// index.html
nwSplasher.sendProgress({
  percent: 33,
  message: 'Encabulating Unilateral Phase Detractors'
});

This makes me want to do a version bump and change the API to an options object

// spash.html
nwSplasher.loadAppWindowInBackground({
  url: 'index.html',
  newWindowOptions: {},
  port: 4443,
  onProgressUpdate: function (data) {
    console.log(data.percent, data.message);
  })
});

but could stay as is and just be another arg:

// spash.html
function onProgressUpdate (data) {
  console.log(data.percent, data.message);
}
nwSplasher.loadAppWindowInBackground('index.html', {}, 4443, onProgressUpdate);
@TheJaredWilcurt TheJaredWilcurt added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant