I\'m struggling with using Browserify and document ready events. How do I craft a module that exports content only available after the document ready event has fired? How do I
Usually you have one master file that fires up the entire application, so you can simply wrap it in the ready callback. It doesn't make much sense to do anything before the document is ready anyway. Sure you could return a function in every single file that does DOM manipulation, but that would turn into a mess quickly.
document.addEventListener('DOMContentLoaded', function () {
var app = require('./app');
// ...
});