Files
kredits-web/app/initializers/defer-loading.js
T
galfert e51586a78c Pause app boot until window load event fired
Refs #17

Allows the user provided Web3 instance to be inserted before we
try to use it.
2017-06-13 13:35:44 +02:00

16 lines
419 B
JavaScript

/**
* This pauses the app's boot process until the window load event is fired.
* It allows the user provided Web3 instance (e.g. Metamask, Mist Browser)
* to be inserted before we try to use it.
*/
export default {
name: 'defer-loading',
initialize: function(application) {
application.deferReadiness();
window.addEventListener('load', function() {
application.advanceReadiness();
});
}
};