| 1 | # MediaWiki Frontend API |
| 2 | |
| 3 | This documentation describes the public API that user scripts, gadgets, skins, and extensions can use to interact with [MediaWiki](https://www.mediawiki.org/wiki/Special:MyLanguage/MediaWiki). |
| 4 | To interact with MediaWiki from outside a wiki, use the [Action API](https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page). |
| 5 | |
| 6 | The MediaWiki frontend API consists of [global variables](namespaces.html) and [ResourceLoader modules](modules.html). |
| 7 | |
| 8 | ## Get started |
| 9 | - [Write your first user script](https://www.mediawiki.org/wiki/Special:MyLanguage/Gadget_kitchen) |
| 10 | - Develop [extensions](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Developing_extensions) and [skins](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_make_a_MediaWiki_skin) |
| 11 | |
| 12 | ## Explore the documentation |
| 13 | Browse namespaces and classes within the [MediaWiki base library](mw.html). |
| 14 | |
| 15 | ### Manage dependencies |
| 16 | Load modules and scripts to use in your code. |
| 17 | |
| 18 | - [mw.loader](mw.loader.html) |
| 19 | |
| 20 | ### Access wiki configuration |
| 21 | Get information about wikis, pages, and users. See the complete [list of configuration values](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Interface/JavaScript#mw.config). |
| 22 | |
| 23 | - [mw.config](mw.html#.config) |
| 24 | |
| 25 | ### Use the API |
| 26 | Interact with a wiki's API to query pages, edit pages, perform patrolling actions, and more. |
| 27 | |
| 28 | - [mw.Api](mw.Api.html) — The [Action API](https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page) is a full-featured API that includes a complete set of actions and parameters. To try it out, visit [Special:ApiSandbox](https://www.mediawiki.org/wiki/Special:ApiSandbox) on any wiki. |
| 29 | - [mw.Rest](mw.Rest.html) — The [REST API](https://www.mediawiki.org/wiki/Special:MyLanguage/API:REST_API) is a simplified API for performing basic read and write operations. |
| 30 | |
| 31 | ### Integrate with wiki features |
| 32 | Hooks let you register and fire events that you can use to extend and enhance the behavior of MediaWiki. |
| 33 | |
| 34 | - [mw.hook](Hook.html) |
| 35 | - [global events](Hooks.html) |
| 36 | |
| 37 | ### Format and parse system messages |
| 38 | Handle translatable text or HTML strings that are part of the MediaWiki interface. |
| 39 | |
| 40 | - [mw.message](mw.html#.message) |
| 41 | - [mw.language](mw.language.html) |
| 42 | |
| 43 | ### Send notifications |
| 44 | Display pop-up notifications to users. |
| 45 | |
| 46 | - [mw.notification](mw.notification.html) |
| 47 | |
| 48 | ### Interact with users |
| 49 | Get information about users, sessions, and user preferences. |
| 50 | |
| 51 | - [mw.user](mw.user.html) |
| 52 | |
| 53 | ### Interact with pages |
| 54 | Construct and parse page elements. |
| 55 | |
| 56 | - [mw.Title](mw.Title.html) |
| 57 | - [mw.Uri](mw.Uri.html) |
| 58 | |
| 59 | ### Utilities |
| 60 | Get helpful methods for handling URLs, CSS, regular expressions, and more. |
| 61 | |
| 62 | - [mw.util](module-mediawiki.util.html) |
| 63 | |
| 64 | ### Debugging and error reporting |
| 65 | Log errors, send deprecation warnings, and debug your code. |
| 66 | |
| 67 | - [mw.Debug](mw.Debug.html) |
| 68 | - [mw.errorLogger](mw.errorLogger.html) |
| 69 | - [mw.log](mw.log.html) |
| 70 | |
| 71 | ### Upstream |
| 72 | - [OOjs](https://doc.wikimedia.org/oojs/master/index.html) — JavaScript library for working with objects |
| 73 | - [OOUI](https://doc.wikimedia.org/oojs-ui/master/js/) — component-based JavaScript UI library |
| 74 | |
| 75 | ## Contribute |
| 76 | - [Report a bug](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=JSDoc-WMF-theme) using [Wikimedia Phabricator](https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator) |
| 77 | - [JSDoc WMF theme](https://gerrit.wikimedia.org/g/jsdoc/wmf-theme) |
| 78 | - [MediaWiki core](https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/) |