diff options
author | Ed Sanders <esanders@wikimedia.org> | 2023-05-05 15:09:08 +0100 |
---|---|---|
committer | Krinkle <krinkle@fastmail.com> | 2023-05-09 00:49:05 +0000 |
commit | 43c73fb150ff6b7a85bbf9bc139aab6fcb628ae4 (patch) | |
tree | 05d14dddda7d429551055595cf777e3ba45c5f92 /resources/src/mediawiki.inspect.js | |
parent | d046f2e67b644e6dd5b09e54129065ab79f135b0 (diff) | |
download | mediawikicore-43c73fb150ff6b7a85bbf9bc139aab6fcb628ae4.tar.gz mediawikicore-43c73fb150ff6b7a85bbf9bc139aab6fcb628ae4.zip |
ResourceLoader: Drop mw.inspect support for browsers without console.table
Change-Id: Ifa3fba7cf27aa3f1314f131f3a36fd4679e57711
Diffstat (limited to 'resources/src/mediawiki.inspect.js')
-rw-r--r-- | resources/src/mediawiki.inspect.js | 17 |
1 files changed, 2 insertions, 15 deletions
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. |