From 43c73fb150ff6b7a85bbf9bc139aab6fcb628ae4 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 5 May 2023 15:09:08 +0100 Subject: ResourceLoader: Drop mw.inspect support for browsers without console.table Change-Id: Ifa3fba7cf27aa3f1314f131f3a36fd4679e57711 --- resources/src/mediawiki.inspect.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'resources/src/mediawiki.inspect.js') diff --git a/resources/src/mediawiki.inspect.js b/resources/src/mediawiki.inspect.js index 540dfe7f4a79..1c2d9630a316 100644 --- a/resources/src/mediawiki.inspect.js +++ b/resources/src/mediawiki.inspect.js @@ -192,25 +192,12 @@ }; /** - * Print tabular data to the console, using console.table, console.log, - * or mw.log (in declining order of preference). + * Print tabular data to the console using console.table. * * @param {Array} data Tabular data represented as an array of objects * with common properties. */ - inspect.dumpTable = function ( data ) { - try { - // Use Function.prototype#call to force an exception on Firefox, - // which doesn't define console#table but doesn't complain if you - // try to invoke it. - // eslint-disable-next-line no-useless-call, compat/compat - console.table.call( console, data ); - return; - } catch ( e ) {} - try { - console.log( JSON.stringify( data, null, 2 ) ); - } catch ( e ) {} - }; + inspect.dumpTable = console.table; /** * Generate and print reports. -- cgit v1.2.3