r23240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23239‎ | r23240 | r23241 >
Date:18:39, 22 June 2007
Author:brion
Status:old
Tags:
Comment:
'class' is a reserved word in JavaScript. :) Changing parameter name to 'className' fixes ajax watch in:
* IE 7/Win
* Safari 3/Win
* Safari 2/Mac
* Mozilla 1.1/Mac
Modified paths:
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -1219,11 +1219,11 @@
12201220 * something, replacing any preexisting message.
12211221 *
12221222 * @param String message HTML to be put inside the right div
1223 - * @param String class Used in adding a class; should be different for each
 1223+ * @param String className Used in adding a class; should be different for each
12241224 * call to allow CSS/JS to hide different boxes. null = no class used.
12251225 * @return Boolean True on success, false on failure
12261226 */
1227 -function jsMsg( message, class ) {
 1227+function jsMsg( message, className ) {
12281228 if ( !document.getElementById ) {
12291229 return false;
12301230 }
@@ -1253,8 +1253,8 @@
12541254 }
12551255
12561256 messageDiv.setAttribute( 'id', 'mw-js-message' );
1257 - if( class ) {
1258 - messageDiv.setAttribute( 'class', 'mw-js-message-'+class );
 1257+ if( className ) {
 1258+ messageDiv.setAttribute( 'class', 'mw-js-message-'+className );
12591259 }
12601260 messageDiv.innerHTML = message;
12611261 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r23407Merged revisions 23203-23405 via svnmerge from...david23:00, 25 June 2007

Status & tagging log