Manual:Hooks/ResourceLoaderGetConfigVars

Details
ResourceLoaderStartUpModule::getConfig runs this hook. Use it to export static configuration variables to JavaScript. Values that depend on the current page or request state must be added through instead.
 * &$vars: Array of variables to be added into the output of the startup module.

Example
Set some configuration variables for JavaScript from the hook:

Retrieve these values in browser JavaScript: