Great stuff.
I think it should be in mw.util , alongside mw.util.jsMessage() , which I assume it obsoletes.
Is the system documented somewhere already so gadget/script authors can
start using it?
I don't see anything yet in https://www.mediawiki.org/wiki/ResourceLoader/Default_modules