Also it would be good to test what scripts that have already been
loaded so that the script is not loaded twice. All that is required
is that before a script file is downloaded the load routine checks if
this file has already been placed in the head, if so it is not loaded
again. This is required if you are downloading functionality via AJAX
and this functionality requires JS or Styles to be loaded for it to
function correctly. your server may not know what is already
downloaded but the browser does.
If interested in these enhancements i have implemented both of them
and they seem to be working very well in IE 8, Chrome 4.0 and FF. I
also have implemented krosaen's suggestion to load additional scripts
as well.
With these three enhancements, Enhance.js is a very powerful script
loaded that provides a lot of flexibility with very little code - very
nicely done!
For your first request, we've been discussing adding an option
("scriptsLoaded") that would accept a callback function that would
execute when all scripts have loaded. We discussed it in this other
thread:
http://groups.google.com/group/enhancejs/browse_thread/thread/e4348aa72191ccb7?hl=en
I've added both requests to the issues section:
http://code.google.com/p/enhancejs/issues/detail?id=6
http://code.google.com/p/enhancejs/issues/detail?id=7
Thanks!
Scott