mediawiki.page.ready: Use wikipage.content instead of domready
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 18 Jul 2013 00:47:55 +0000 (02:47 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 26 Jul 2013 00:08:23 +0000 (02:08 +0200)
commit736e7e843afd6654dbf287334db3d135f7376633
treea78b0a1bdc5e194047de407052483e070a162e94
parentbfd90e846ea9b691cb7365ac3cc9b30d18cd47d9
mediawiki.page.ready: Use wikipage.content instead of domready

Restructure mediawiki.page.ready to add to the "wikipage.content"
hook instead of using document-ready.

Except for parts that aren't inside the wikipage content.
Portlet links are outside content entirely and should run only
once from document-ready still. Inputs with placeholders can be
both inside and outside (inside with e.g. InputBox extension,
outside in e.g. search bar of skin) so it needs to be in both.
The one in document-ready needs to exclude ones in content to
avoid applying the placeholder polyfill twice.

This also opens up the doors for extensions and gadgets to
reliably both fire and add to this hook:
- Code can fire this hook when rendering a new DOM (such as
  LivePreview, VisualEditor, ..).
- Code can add to this hook to enhance page content and have it
  properly re-run when there is a new DOM (e.g. gadgets like
  Navigation popups, Reference Tooltips, ..).

Also added release notes for 2e97025.

Bug: 30713
Bug: 33399
Bug: 51565
Change-Id: Icb0eda9edf2aeb3d612ff1d9bfea4859d33e1fbb
RELEASE-NOTES-1.22
maintenance/jsduck/config.json
resources/mediawiki.page/mediawiki.page.ready.js
resources/mediawiki.page/mediawiki.page.startup.js
resources/mediawiki/mediawiki.js