Pause app boot until window load event fired #21

Merged
galfert merged 2 commits from feature/wait_for_web3 into master 2017-06-13 12:37:20 +00:00
Showing only changes of commit e51586a78c - Show all commits
+15
View File
@@ -0,0 +1,15 @@
/**
* 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();
});
}
};