Open philcruz opened 7 years ago
Our application was getting errors going to certain pages that required url parameters. Tracked it down to this code in lazy
if(fileObj.ext === 'css'){ //Hack for listening to link tag onload event var img = document.createElement('img'); img.onerror = function(){ if( typeof(clbk) !== 'undefined' ){ clbk(); } }; img.src = '#';
I see that it using this technique http://www.backalleycoder.com/2011/03/20/link-tag-css-stylesheet-load-event/ to listen for css load events.
However, setting
img.src = '#'
is calling the requested page (again) and not the css. Should it be
img.src = fileObj.path
instead? Even if it's not causing errors it is calling the requested page unnecessarily.
Hi Phil, Unfortunately I am not maintaining this project anymore. Please feel free to fork or create a pull request with your well tested suggestion.
Our application was getting errors going to certain pages that required url parameters. Tracked it down to this code in lazy
I see that it using this technique http://www.backalleycoder.com/2011/03/20/link-tag-css-stylesheet-load-event/ to listen for css load events.
However, setting
img.src = '#'
is calling the requested page (again) and not the css. Should it be
img.src = fileObj.path
instead? Even if it's not causing errors it is calling the requested page unnecessarily.