If the browser supports DOMContentLoaded event, the initialisation routine listener should be added when the event hasn't occured yet (i.e. the document is still loading).
When JS files are loaded asynchronously, the complete event has already been fired and BN doesn't get initialised.
Note: Possible states for the document.readyState that might be relevant to this are 'loading', 'interactive' and 'complete'. Relevant discussion: https://stackoverflow.com/a/9237129/2303501
If the browser supports DOMContentLoaded event, the initialisation routine listener should be added when the event hasn't occured yet (i.e. the document is still loading).
When JS files are loaded asynchronously, the complete event has already been fired and BN doesn't get initialised.
Note: Possible states for the document.readyState that might be relevant to this are 'loading', 'interactive' and 'complete'. Relevant discussion: https://stackoverflow.com/a/9237129/2303501