3 ms·
Curious question: Can you explain a bit more on "will block behind the cssdom due to the way it injects" As far as I know, requireJS doesn't do XHR requests an
by lewisjoe 9y ago
Curious question: Can you explain a bit more on "will block behind the cssdom due to the way it injects"
As far as I know, requireJS doesn't do XHR requests and evals. That sounds ugly. I think it dynamically injects a script tag and loads the module. I maybe wrong.
Either way, how's it a blocking one?
So, the only thing that makes fetchInject, differ from requireJS is the non-blocking way. Is my understanding correct?
- dgoldstein0 9y agoalso wondering about the cssom comment. I can confirm that requirejs works by injecting <script> tags - <script async> to be precise. requirejs' api isn't promise based, but that's mostly an aesthetic concern. btw you seem to imply that requirejs blocks - what do you mean by that?
- thehandofkwll 9y agoThis article by an engineer at Google explains it pretty well. My own testing has shown the same results. https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/ https://www.igvita.com/2014/05/20/script-injected-async-scri...