6 ms·
> The only valid value, to this day, is "text/javascript". Other script types have been supported for a while. Some compile-to-javascript languages can be setu
by pdkl95 11y ago
> The only valid value, to this day, is "text/javascript".
Other script types have been supported for a while. Some compile-to-javascript languages can be setup to use script tags in their language. For example, CoffeeScript can be setup[1] to compile <script type="text/coffeescript"> tags at runtime.
Also, WebGL can load shaders[2] from script tags of type "x-shader/x-vertex" and "x-shader/x-fragment".
[1] http://coffeescript.org/#scripts http://coffeescript.org/#scripts
[2] see the source of http://mdn.github.io/webgl-examples/tutorial/sample3/ http://mdn.github.io/webgl-examples/tutorial/sample3/ for a basic example.