From 6bead2fe75539b853b29ece12163172312e11458 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 30 Oct 2017 19:16:52 -0700 Subject: [PATCH] resourceloader: Remove outdated readyState handler for base modules request There is a bug in IE10 where under certain conditions[1], the browser will fire 'onreadystatechange' on script tags before the script has executed. To avoid this bug, simply remove this outdated compatibility code. It was originally placed in startup.js in 2011 for compatibility with IE6-8, and was inspired by the internal source code behind jQuery's ajax transport for script tags. jQuery no longer does this either and uses 'script.onload' in all browsers, which is supported by IE 9 and above. MediaWiki currently requires IE 10 for its Grade A experience. Looking further, it actually seems that Microsoft has now retroactively documented that readyState="loaded" in IE6-10, for script tags, represents the completion of the download, not the execution. [2] Presumably the reason we did not find this bug earlier is because of the rare conditions [1], and because even then, on most page views, readyState="loaded" is never fired. Instead, usually the event is skipped by IE and the first and only readyState event is readyState="complete". [1] The conditions are: A relatively short HTML page, with a script from