How to load one certain js before all others? We are struggling around here with SVG in IE8. Amongst other approaches we'ld also like to try the SVG Web Toolkit. In it's quick start guide they say:


  To use SVG Web, you must drop a script tag into your HTML page. This must be the first script tag on your page.


The JS is now loaded by a custom module. I tried

drupal_add_js($modulepath . '/libraries/svg.js', array(
   'group' =&gt; JS_LIBRARY,
   'weight' =&gt; -1000,
   'every_page' =&gt; TRUE));


When I vary these options it's sometimes higher, sometimes lower. The above code makes it the highest I can get it. But there still are quite a number of scripts loaded prior to it.

How can we ensure the svg.js to load first? Is there maybe a way to do it with drupal_add_js in our custom module?
Can you try with hook_js_alter