Added comment about why you should not be depending on mediaWiki.user.sessionId befor...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 14 Dec 2010 00:08:07 +0000 (00:08 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 14 Dec 2010 00:08:07 +0000 (00:08 +0000)
resources/mediawiki/mediawiki.js

index 641459f..561db60 100644 (file)
@@ -328,6 +328,10 @@ window.mediaWiki = new ( function( $ ) {
                 * Gets the current user's name or a random session ID automatically generated and kept in
                 * a cookie.
                 * 
+                * Do not use this method before the first call to mediaWiki.loader.go(), it depends on
+                * jquery.cookie, which is added to the first payload just after mediaWiki is defined, but
+                * won't be loaded until the first call to go().
+                * 
                 * @return string user name or random session ID
                 */
                this.sessionId = function () {