[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/resources/src/mediawiki.page/ -> mediawiki.page.startup.js (source)

   1  ( function ( mw, $ ) {
   2  
   3      mw.page = {};
   4  
   5      // Client profile classes for <html>
   6      // Allows for easy hiding/showing of JS or no-JS-specific UI elements
   7      $( 'html' )
   8          .addClass( 'client-js' )
   9          .removeClass( 'client-nojs' );
  10  
  11      $( function () {
  12          mw.util.init();
  13  
  14          /**
  15           * Fired when wiki content is being added to the DOM
  16           *
  17           * It is encouraged to fire it before the main DOM is changed (when $content
  18           * is still detatched).  However, this order is not defined either way, so you
  19           * should only rely on $content itself.
  20           *
  21           * This includes the ready event on a page load (including post-edit loads)
  22           * and when content has been previewed with LivePreview.
  23           *
  24           * @event wikipage_content
  25           * @member mw.hook
  26           * @param {jQuery} $content The most appropriate element containing the content,
  27           *   such as #mw-content-text (regular content root) or #wikiPreview (live preview
  28           *   root)
  29           */
  30          mw.hook( 'wikipage.content' ).fire( $( '#mw-content-text' ) );
  31      } );
  32  
  33  }( mediaWiki, jQuery ) );


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1