mediawiki.util: Remove redundant IE8 support from addCSS()
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 11 Sep 2019 04:31:32 +0000 (05:31 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 11 Sep 2019 04:55:57 +0000 (05:55 +0100)
Was added in 8eda03743c (2013) for IE8 support, but MW now
requires IE11+. The HTMLStyleElement.sheet property is available
in all supported browsers.

<https://caniuse.com/#feat=mdn-api_htmlstyleelement_sheet>

The method itself was introduced in 2010 (79618024c2 / r76324).

Change-Id: Ia6a778a6d55e9257b9e55edfedd8f17587b96c1c

resources/src/mediawiki.util/util.js

index d932415..57843cb 100644 (file)
@@ -187,7 +187,7 @@ util = {
         */
        addCSS: function ( text ) {
                var s = mw.loader.addStyleTag( text );
-               return s.sheet || s.styleSheet || s;
+               return s.sheet;
        },
 
        /**