From ac307e41e2f41580b5886b13c974ef973737dd3a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 22 Jun 2007 18:39:40 +0000 Subject: [PATCH] '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 --- skins/common/wikibits.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index a0603647a3..496112711e 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -1219,11 +1219,11 @@ function ts_alternate(table) { * something, replacing any preexisting message. * * @param String message HTML to be put inside the right div - * @param String class Used in adding a class; should be different for each + * @param String className Used in adding a class; should be different for each * call to allow CSS/JS to hide different boxes. null = no class used. * @return Boolean True on success, false on failure */ -function jsMsg( message, class ) { +function jsMsg( message, className ) { if ( !document.getElementById ) { return false; } @@ -1253,8 +1253,8 @@ function jsMsg( message, class ) { } messageDiv.setAttribute( 'id', 'mw-js-message' ); - if( class ) { - messageDiv.setAttribute( 'class', 'mw-js-message-'+class ); + if( className ) { + messageDiv.setAttribute( 'class', 'mw-js-message-'+className ); } messageDiv.innerHTML = message; return true; -- 2.20.1