In an ideal world mw.mobileFrontend would just have two methods - require and define (and hopefully these would one day land in core in some form)
To achieve this we'll need to do several things... (Please break out sub tasks as and when you see fit)
- Move getCurrentPage to M.define( 'page' )
- Move overlayManager and router as defined modules using M.define (T86246)
- M should no longer need to be an EventEmitter - we should use M.require( 'eventemitter' ) instead or use events on Skin
- Move assertMode, getMode, isAlphaGroupMember isBetaGroupMember to MobileContext.js (DONE)
- Do not register init function (DONE)
- move loadModule to its own function (DONE)
- Move isTestA to more appropriate place (DONE)
- same for pageApi (DONE)
- Rename application.js to init.js for consistency purposes.