browserify and document ready?

后端 未结 5 1083
慢半拍i
慢半拍i 2021-02-08 00:28

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

5条回答
  •  轮回少年
    2021-02-08 01:10

    I would suggest to use window.onload Something along the lines of

    const main = () => {
    
    //Your logic here
    
    }
    
    window.onload = main;

提交回复
热议问题