After T133462 is resolved, we can split some of the mediawiki.base utilities into their own file and publish them as their own versioned libraries.
Ideas:
* mediawiki.html (mw.html.element, mw.html.escape)
* mediawiki.message (mw.Message, mw.msg)
Use cases:
* ..
>>! **Original task description:**
> When working on a side project (written in node) I found myself keen to use the i18n JavaScript code in MediaWiki. To my frustration it's buried inside mediawiki.js with multiple other things and unnecessarily tied to the mediawiki implementation of Map.
>
> I'd like to rectify this with the following proposal:
>
> [] Drop support of mw.Map for browser native Map standard (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map).
> [] Introduce mediawiki-map shim npm library for browsers that do not support Map
> [] Introduce mediawiki-html-construction-helper npm library (https://github.com/jdlrobson/mediawiki-html-construction-helper)
> [] Introduce mediawiki-messages module that makes use of browser native Map and mediawiki-html-construction-helper (https://github.com/jdlrobson/mediawiki-messages)
> [] Update StartupModule to load these libraries
> [] Publish libraries on npm for consumption outside the MediaWiki ecosystem.
>
> Benefits:
> * Removal of Map code should save us a few bytes (browser support is pretty good for what we use it for)
> * More generic reusable code for other people's projects.
>
>
>