[removed] and $(document).ready

后端 未结 4 1347
囚心锁ツ
囚心锁ツ 2020-12-14 14:50

According to http://caniuse.com/script-defer, most browsers support the script tag\'s defer attribute.

I would like to know if scripts spec

4条回答
  •  孤街浪徒
    2020-12-14 15:33

    To defer inline javscript you can use type="module" which then makes $(document).ready() redundant.

    
    

    Because type="module" implies defer scripts will execute in order with other deferred scripts.

    See can I use 92% browser support in September 2020. https://caniuse.com/es6-module

提交回复
热议问题