| 1 | # Globals |
| 2 | |
| 3 | ## [mw](mw.html) |
| 4 | |
| 5 | The `mw` object is the historical entry point for MediaWiki's public-facing frontend API. In some cases, APIs are available on the `mw` object in addition to inside a [module](modules.html). |
| 6 | Generally, the use of a module is recommended where possible as it is more robust to changes in how code is organized. |
| 7 | |
| 8 | ## [Hooks](Hooks.html) |
| 9 | |
| 10 | The [`mw.hook`](mw.html#.hook) method provides an API to run JavaScript code when certain events occur. |
| 11 | For example, you can use a hook to run code after a page is edited. |
| 12 | For a list of stable hooks provided by MediaWiki core, see [Hooks](Hooks.html). |
| 13 | |
| 14 | Extensions and skins can also add hooks. See the documentation for those codebases for more information on the hooks they provide. |
| 15 | |
| 16 | ## [window](window.html) |
| 17 | |
| 18 | Historical methods defined on the window object. |