Last modified: 2011-10-24 23:46:37 UTC
In Html.php there are multiple places where the attribute type="text/javascript" is skipped or removed in HTML5 output mode. http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Html.php?view=markup According to the HTML5 spec this is allowed. Now I found a case where it's important to always have the type attribute. In the Opera web browser with the "NoAds" Opera extension installed and active all script without the type attribute are blocked. Now you tell me "this is a problem of the extension then, not a problem of MediaWiki". I do not agree. It's impossible to tell if this extension is the only one with this particular problem. Fixing the extension would solve the problem for this extension only, leaving an unknown number of extensions and other tools and scripts broken. Instead of starting a discussion about this I suggest to simply add the type attribute. It's not wrong or forbidden according to the spec. It's valid HTML5. It's more compatible with this attribute. The one and only downside is: it adds a few bytes. That's all from what I know. A few bytes for better compatibility. Previous discussion about this topic: http://www.mediawiki.org/wiki/Thread:Project:Current_issues/All_JavaScript_broken_in_Opera_due_to_jQuery_not_loaded%3F Could be related to Bug #25179 and several other bugs relates to the Resource Loader but I'm not sure since there is to less information.
I'm sorry. I was sure I found the reason but adding type="text/javascript" does not help.