I was surprised by this detail listed in the "debug mode" section:
> Script resources: No longer minified, concatenated and loaded from load.php. Instead, load.php will instruct the client to request each source file directly. This makes debugging scripts easier with your browser's developer tools. Transformations such as closure don't apply, so scripts may execute in the global scope.
Relatedly, the JS coding conventions suggest that a namespace closure is mandatory around each file.
However, reading the implementation in ResourceLoader#makeLoaderImplementScript
, I discovered that each file is automatically surrounded by a closure regardless of the debug flag. Also, some MediaWiki-core modules such as mediawiki.Title/Title.js are missing the closure. Experimenting with a local wiki confirms that the closure is always added around every file.
Based on this, shall we update the documentation to recommend no closures, to save a few bytes and a level of indentation?