gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

Add an option for the script type variable when using <sj:head> #988

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is not a bug, this is a feature.

When using the <sj:head/> tag the javascript files are included as follows:

<script type="text/javascript" src="/struts/js/base/jquery-***.min.js"></script>

This is 100% normal and 100% correct.

There are some frameworks that can speed up your web-page by controlling the 
javascript download and execution.

One of these is: http://stevesouders.com/controljs/

ControlJS hooks in on the "type" attribute to find out which elements it 
controls.  With the current version of your excellent plugin we cannot alter 
the type.

The suggestion is:
Can you add an attribute on the sj:head tag where we can set the desired type 
of the output.  The default value would be "text/javascript" so it is backwards 
compatible.

Original issue reported on code.google.com by tbri...@gmail.com on 3 Jun 2013 at 12:51