From 13272a4928c94de434e4f4d31aeb73b165e864b5 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 22 Apr 2020 21:37:21 +0100 Subject: [PATCH] resourceloader: Remove internal 'sync' option from ClientHtml This only existed for Special:JavaScriptTest, which no longer uses it as of I739850483. Change-Id: If60def1a53707d31adf897b10baed109ebb6b8f0 --- includes/resourceloader/ResourceLoaderClientHtml.php | 4 +--- .../resourceloader/ResourceLoaderClientHtmlTest.php | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php b/includes/resourceloader/ResourceLoaderClientHtml.php index 93e37c221eb..83b98d88b7c 100644 --- a/includes/resourceloader/ResourceLoaderClientHtml.php +++ b/includes/resourceloader/ResourceLoaderClientHtml.php @@ -468,10 +468,8 @@ JAVASCRIPT; // Use cases: // - startup (naturally because this is what will define mw.loader) // - html5shiv (loads synchronously in old IE before the async startup module arrives) - // - QUnit (needed in SpecialJavaScriptTest before async startup) $chunk = Html::element( 'script', [ - // The 'sync' option is only supported in combination with 'raw'. - 'async' => !isset( $extraQuery['sync'] ), + 'async' => true, 'src' => $url ] ); } else { diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php index c4e8e71e70c..cbe523e06e8 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php @@ -230,13 +230,6 @@ Deprecation message.' ] 'extra' => [ 'raw' => '1' ], 'output' => '', ], - [ - 'context' => [], - 'modules' => [ 'test.scripts' ], - 'only' => ResourceLoaderModule::TYPE_SCRIPTS, - 'extra' => [ 'raw' => '1', 'sync' => '1' ], - 'output' => '', - ], [ 'context' => [], 'modules' => [ 'test.scripts.user' ],