From: Krinkle Date: Wed, 20 Apr 2011 20:45:01 +0000 (+0000) Subject: bug 28413: Fix IE problems with self-closing link-elements in .innerHTML. Using ... X-Git-Tag: 1.31.0-rc.0~30668 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=b82d2a04cc1c058e2b0120f62d008ffd037130b5;p=lhc%2Fweb%2Fwiklou.git bug 28413: Fix IE problems with self-closing link-elements in .innerHTML. Using { attributes } instead so jQuery will use document.createElement instead of innerHTML. See also bug 28413 comments --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index bf81dd7724..a1b3261a54 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -1028,9 +1028,11 @@ window.mediaWiki = new ( function( $ ) { // Support adding arbitrary external scripts if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) { if ( type === 'text/css' ) { - $( 'head' ) - .append( $( '' ) - .attr( 'href', modules ) ); + $( 'head' ).append( $( '', { + rel: 'stylesheet', + type: 'text/css', + href: modules + } ) ); return true; } else if ( type === 'text/javascript' || typeof type === 'undefined' ) { var script = mediaWiki.html.element( 'script', @@ -1206,6 +1208,10 @@ window.mediaWiki = new ( function( $ ) { } )( jQuery ); +// Alias $j to jQuery for backwards compatibility +window.$j = jQuery; +window.mw = mediaWiki; + /* Auto-register from pre-loaded startup scripts */ if ( $.isFunction( startUp ) ) { @@ -1214,8 +1220,4 @@ if ( $.isFunction( startUp ) ) { } // Add jQuery Cookie to initial payload (used in mediaWiki.user) -mediaWiki.loader.load( 'jquery.cookie' ); - -// Alias $j to jQuery for backwards compatibility -window.$j = jQuery; -window.mw = mediaWiki; +mw.loader.load( 'jquery.cookie' );