Last modified: 2014-10-15 00:14:09 UTC
We need a standard event which is fired in every mode (stable/beta/alpha) when a page is ready for modules to bind to. Right now we have: M.on( 'page-loaded', ... ); $( ... ); M.define( 'module', { init: ... } ); // and mwMobileFrontendConfig.settings.initOnDefine We should probably just leave the first one and make it consistent in every mode.
Due to the way ResourceLoader works there is no way to trigger a page-loaded event on the first page. I thus suggest that * page-loaded event should only fire for lazy loaded page Therefore modules can either run (on initially loaded pages) or future loaded pages. * We should probably just run code for the intially loaded page. e.g. init(); Previously this created problems with tests which couldn't cope with modules self initialising (hence existence of mw.config.set( 'wgInitOnDefine', false ); ) but hopefully this is less of a problem now.
I guess this will go with the death of the ajax loading feature.
Change 164141 had a related patch set uploaded by Jdlrobson: WIP: Remove all the ajax related things. https://gerrit.wikimedia.org/r/164141
Change 164141 merged by jenkins-bot: Remove all the ajax related things. https://gerrit.wikimedia.org/r/164141