frintjs/frint

Proposal: App registration upon availability of other Apps

Open

#432 aperta il 12 lug 2018

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (37 fork)batch import
help wantedproposal

Metriche repository

Star
 (746 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Currently

If we want to wait for certain Apps to be available first, before registering a new App, we do it like this:

window.app.getAppOnceAvailable$('FooApp').subscribe(
  fooApp => window.app.registerApp(BazApp)
);

Proposal

We can make things a bit more easier:

window.app.registerAppOnceAvailable(['FooApp', 'BarApp'], BazApp);

(not convinced with the method name registerOnceAvailable yet)

Relates to #425

Guida contributor