r88074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88073‎ | r88074 | r88075 >
Date:13:21, 14 May 2011
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Fixed language in comments and error messages - see comments in r88053.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -1124,7 +1124,6 @@
11251125 * attribute when adding a script element to the body
11261126 * @param style Object: Object of CSS strings keyed by media-type or Object of lists of URLs
11271127 * keyed by media-type
1128 - * as the href attribute when adding a link element to the head
11291128 * @param msgs Object: List of key/value pairs to be passed through mw.messages.set
11301129 */
11311130 this.implement = function( module, script, style, msgs ) {
@@ -1136,7 +1135,7 @@
11371136 throw new Error( 'script must be a function or an array, not a ' + typeof script );
11381137 }
11391138 if ( !$.isPlainObject( style ) ) {
1140 - throw new Error( 'style must be a object or a string, not a ' + typeof style );
 1139+ throw new Error( 'style must be an object or a string, not a ' + typeof style );
11411140 }
11421141 if ( !$.isPlainObject( msgs ) ) {
11431142 throw new Error( 'msgs must be an object, not a ' + typeof msgs );

Follow-up revisions

RevisionCommit summaryAuthorDate
r88143(bug 27073) Lazy init the style marker and insert if not available (ie. when ...krinkle10:33, 15 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88053Added direct file loading functionality to debug mode for both scripts and st...tparscal12:15, 14 May 2011

Comments

#Comment by Catrope (talk | contribs)   13:24, 14 May 2011
 			if ( !$.isPlainObject( style ) ) {
-				throw new Error( 'style must be a object or a string, not a ' + typeof style );
+				throw new Error( 'style must be an object or a string, not a ' + typeof style );

OK so the grammar is fixed, but isn't it true that style can only be an object, not a string?

Status & tagging log