Check the type attribute for scripts.

#2828
:)