To implement Javascript error logging, we need to wrap every asynchronous function in a try-catch block. (The alternative would be using window.onerror, which has lots of reliability problems.) To do that, an error logging module needs to be loaded before all normal modules, and it will need to decorate low-level asynchronous functions (setTimeout/setInterval, AJAX, event handling) so they wrap their callbacks in try...catch.
See the JS error logging RfC for more context, and T1345 for the current plans for JS error logging.