Skip to content

Communicate progress #1

@TheJaredWilcurt

Description

@TheJaredWilcurt

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions