wikibits: Remove redundant stubs for document.write
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 21 Apr 2018 01:54:33 +0000 (02:54 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 21 Apr 2018 01:54:33 +0000 (02:54 +0100)
The browser already warns for these, and our stubs were actually
making it somewhat worse by appending to a weird place in the page
instead of what the browser does (which is to either allow it
properly, or ignore).

Bug: T192623
Change-Id: I1924b252a8b986c4f1ad65f96149b8c06c1fad9b

resources/src/mediawiki.legacy/wikibits.js

index 27d049e..f58f039 100644 (file)
        window.importScript = importScript;
        window.importStylesheet = importStylesheet;
 
-       /**
-        * Replace document.write/writeln with basic html parsing that appends
-        * to the <body> to avoid blanking pages. Added JavaScript will not run.
-        *
-        * @deprecated since 1.26
-        */
-       [ 'write', 'writeln' ].forEach( function ( method ) {
-               mw.log.deprecate( document, method, function () {
-                       $( 'body' ).append( $.parseHTML( Array.prototype.join.call( arguments, '' ) ) );
-               }, 'Use jQuery or mw.loader.load instead.', 'document.' + method );
-       } );
-
 }( mediaWiki, jQuery ) );