AFAIU, "mime" and "script type" are a bit out of sync, specifically in some browsers (at least in IE) script type="application/javascript" will not work. Also for dart, official script type is "application/dart" but mime library returns "application/vnd.dart". I renamed the "mime" variable to "scriptType" to minimize ambiguity.