Manual:$wgResourceLoaderValidateJS/zh

From Linux Web Expert

Revision as of 08:43, 8 April 2024 by 122.100.88.89 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> ResourceLoader</translate>: $wgResourceLoaderValidateJS
Validate JavaScript code loaded from wiki pages.
<translate> Introduced in version:</translate>1.18.0 (r91608)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(布尔值)
<translate> Default value:</translate>true

Details

Validate JavaScript code loaded from wiki pages. If a syntax error is found, the script is replaced with a warning logged to the browser console. This ensures errors are found early and consistently (independent of the editor's own browser), and prevents breaking other modules loaded in the same batch from load.php.