script.js icon indicating copy to clipboard operation
script.js copied to clipboard

Support progress callback

Open tot-ra opened this issue 10 years ago • 1 comments

Would be nice if script loading() could report about % of progress while loading (if JS is ~2 mb then it would be useful), as suggested by Mozilla, its possible with ajax.. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Monitoring_progress

tot-ra avatar Feb 11 '15 15:02 tot-ra

Don't know if you got your answer already, but scriptjs doesn't use xhr ("ajax") to load its scripts. It creates a script element in the DOM that loads the scripts (see: https://github.com/ded/script.js/blob/master/src/script.js#l66). This doesn't support the onprogress event that xhr supports.

Flux159 avatar Apr 03 '15 21:04 Flux159