3 QUnit
.module( 'mediawiki', QUnit
.newMwEnvironment() );
5 QUnit
.test( 'Initial check', 8, function ( assert
) {
6 assert
.ok( window
.jQuery
, 'jQuery defined' );
7 assert
.ok( window
.$, '$j defined' );
8 assert
.ok( window
.$j
, '$j defined' );
9 assert
.strictEqual( window
.$, window
.jQuery
, '$ alias to jQuery' );
10 assert
.strictEqual( window
.$j
, window
.jQuery
, '$j alias to jQuery' );
12 assert
.ok( window
.mediaWiki
, 'mediaWiki defined' );
13 assert
.ok( window
.mw
, 'mw defined' );
14 assert
.strictEqual( window
.mw
, window
.mediaWiki
, 'mw alias to mediaWiki' );
17 QUnit
.test( 'mw.Map', 17, function ( assert
) {
18 var arry
, conf
, funky
, globalConf
, nummy
, someValues
;
20 assert
.ok( mw
.Map
, 'mw.Map defined' );
24 funky = function () {};
28 // Tests for input validation
29 assert
.strictEqual( conf
.get( 'inexistantKey' ), null, 'Map.get returns null if selection was a string and the key was not found' );
30 assert
.strictEqual( conf
.set( 'myKey', 'myValue' ), true, 'Map.set returns boolean true if a value was set for a valid key string' );
31 assert
.strictEqual( conf
.set( funky
, 'Funky' ), false, 'Map.set returns boolean false if key was invalid (Function)' );
32 assert
.strictEqual( conf
.set( arry
, 'Arry' ), false, 'Map.set returns boolean false if key was invalid (Array)' );
33 assert
.strictEqual( conf
.set( nummy
, 'Nummy' ), false, 'Map.set returns boolean false if key was invalid (Number)' );
34 assert
.equal( conf
.get( 'myKey' ), 'myValue', 'Map.get returns a single value value correctly' );
35 assert
.strictEqual( conf
.get( nummy
), null, 'Map.get ruturns null if selection was invalid (Number)' );
36 assert
.strictEqual( conf
.get( funky
), null, 'Map.get ruturns null if selection was invalid (Function)' );
38 // Multiple values at once
44 assert
.strictEqual( conf
.set( someValues
), true, 'Map.set returns boolean true if multiple values were set by passing an object' );
45 assert
.deepEqual( conf
.get( ['foo', 'lorem'] ), {
48 }, 'Map.get returns multiple values correctly as an object' );
50 assert
.deepEqual( conf
.get( ['foo', 'notExist'] ), {
53 }, 'Map.get return includes keys that were not found as null values' );
55 assert
.strictEqual( conf
.exists( 'foo' ), true, 'Map.exists returns boolean true if a key exists' );
56 assert
.strictEqual( conf
.exists( 'notExist' ), false, 'Map.exists returns boolean false if a key does not exists' );
58 // Interacting with globals and accessing the values object
59 assert
.strictEqual( conf
.get(), conf
.values
, 'Map.get returns the entire values object by reference (if called without arguments)' );
61 conf
.set( 'globalMapChecker', 'Hi' );
63 assert
.ok( false === 'globalMapChecker' in window
, 'new mw.Map did not store its values in the global window object by default' );
65 globalConf
= new mw
.Map( true );
66 globalConf
.set( 'anotherGlobalMapChecker', 'Hello' );
68 assert
.ok( 'anotherGlobalMapChecker' in window
, 'new mw.Map( true ) did store its values in the global window object' );
70 // Whitelist this global variable for QUnit's 'noglobal' mode
71 if ( QUnit
.config
.noglobals
) {
72 QUnit
.config
.pollution
.push( 'anotherGlobalMapChecker' );
76 QUnit
.test( 'mw.config', 1, function ( assert
) {
77 assert
.ok( mw
.config
instanceof mw
.Map
, 'mw.config instance of mw.Map' );
80 QUnit
.test( 'mw.message & mw.messages', 20, function ( assert
) {
81 var goodbye
, hello
, pluralMessage
;
83 assert
.ok( mw
.messages
, 'messages defined' );
84 assert
.ok( mw
.messages
instanceof mw
.Map
, 'mw.messages instance of mw.Map' );
85 assert
.ok( mw
.messages
.set( 'hello', 'Hello <b>awesome</b> world' ), 'mw.messages.set: Register' );
87 hello
= mw
.message( 'hello' );
89 assert
.equal( hello
.format
, 'plain', 'Message property "format" defaults to "plain"' );
90 assert
.strictEqual( hello
.map
, mw
.messages
, 'Message property "map" defaults to the global instance in mw.messages' );
91 assert
.equal( hello
.key
, 'hello', 'Message property "key" (currect key)' );
92 assert
.deepEqual( hello
.parameters
, [], 'Message property "parameters" defaults to an empty array' );
95 assert
.ok( hello
.params
, 'Message prototype "params"' );
97 hello
.format
= 'plain';
98 assert
.equal( hello
.toString(), 'Hello <b>awesome</b> world', 'Message.toString returns the message as a string with the current "format"' );
100 assert
.equal( hello
.escaped(), 'Hello <b>awesome</b> world', 'Message.escaped returns the escaped message' );
101 assert
.equal( hello
.format
, 'escaped', 'Message.escaped correctly updated the "format" property' );
104 assert
.equal( hello
.format
, 'parse', 'Message.parse correctly updated the "format" property' );
107 assert
.equal( hello
.format
, 'plain', 'Message.plain correctly updated the "format" property' );
109 assert
.strictEqual( hello
.exists(), true, 'Message.exists returns true for existing messages' );
111 goodbye
= mw
.message( 'goodbye' );
112 assert
.strictEqual( goodbye
.exists(), false, 'Message.exists returns false for nonexistent messages' );
114 assert
.equal( goodbye
.plain(), '<goodbye>', 'Message.toString returns plain <key> if format is "plain" and key does not exist' );
116 assert
.equal( goodbye
.escaped(), '<goodbye>', 'Message.toString returns properly escaped <key> if format is "escaped" and key does not exist' );
118 assert
.ok( mw
.messages
.set( 'pluraltestmsg', 'There {{PLURAL:$1|is|are}} $1 {{PLURAL:$1|result|results}}' ), 'mw.messages.set: Register' );
119 pluralMessage
= mw
.message( 'pluraltestmsg' , 6 );
120 assert
.equal( pluralMessage
.plain(), 'There are 6 results', 'plural get resolved when format is plain' );
121 assert
.equal( pluralMessage
.parse(), 'There are 6 results', 'plural get resolved when format is parse' );
125 QUnit
.test( 'mw.msg', 11, function ( assert
) {
126 assert
.ok( mw
.messages
.set( 'hello', 'Hello <b>awesome</b> world' ), 'mw.messages.set: Register' );
127 assert
.equal( mw
.msg( 'hello' ), 'Hello <b>awesome</b> world', 'Gets message with default options (existing message)' );
128 assert
.equal( mw
.msg( 'goodbye' ), '<goodbye>', 'Gets message with default options (nonexistent message)' );
130 assert
.ok( mw
.messages
.set( 'plural-item' , 'Found $1 {{PLURAL:$1|item|items}}' ) );
131 assert
.equal( mw
.msg( 'plural-item', 5 ), 'Found 5 items', 'Apply plural for count 5' );
132 assert
.equal( mw
.msg( 'plural-item', 0 ), 'Found 0 items', 'Apply plural for count 0' );
133 assert
.equal( mw
.msg( 'plural-item', 1 ), 'Found 1 item', 'Apply plural for count 1' );
135 assert
.ok( mw
.messages
.set('gender-plural-msg' , '{{GENDER:$1|he|she|they}} {{PLURAL:$2|is|are}} awesome' ) );
136 assert
.equal( mw
.msg( 'gender-plural-msg', 'male', 1 ), 'he is awesome', 'Gender test for male, plural count 1' );
137 assert
.equal( mw
.msg( 'gender-plural-msg', 'female', '1' ), 'she is awesome', 'Gender test for female, plural count 1' );
138 assert
.equal( mw
.msg( 'gender-plural-msg', 'unknown', 10 ), 'they are awesome', 'Gender test for neutral, plural count 10' );
143 * The sync style load test (for @import). This is, in a way, also an open bug for
144 * ResourceLoader ("execute js after styles are loaded"), but browsers don't offer a
145 * way to get a callback from when a stylesheet is loaded (that is, including any
146 * @import rules inside). To work around this, we'll have a little time loop to check
147 * if the styles apply.
148 * Note: This test originally used new Image() and onerror to get a callback
149 * when the url is loaded, but that is fragile since it doesn't monitor the
150 * same request as the css @import, and Safari 4 has issues with
151 * onerror/onload not being fired at all in weird cases like this.
153 function assertStyleAsync( assert
, $element
, prop
, val
, fn
) {
155 el
= $element
.get( 0 ),
156 styleTestTimeout
= ( QUnit
.config
.testTimeout
- 200 ) || 5000;
158 function isCssImportApplied() {
159 // Trigger reflow, repaint, redraw, whatever (cross-browser)
160 var x
= $element
.css( 'height' );
162 el
.className
= el
.className
;
163 x
= document
.documentElement
.clientHeight
;
165 return $element
.css( prop
) === val
;
168 function styleTestLoop() {
169 var styleTestSince
= new Date().getTime() - styleTestStart
;
170 // If it is passing or if we timed out, run the real test and stop the loop
171 if ( isCssImportApplied() || styleTestSince
> styleTestTimeout
) {
172 assert
.equal( $element
.css( prop
), val
,
173 'style "' + prop
+ ': ' + val
+ '" from url is applied (after ' + styleTestSince
+ 'ms)'
182 // Otherwise, keep polling
183 setTimeout( styleTestLoop
, 150 );
187 styleTestStart
= new Date().getTime();
191 function urlStyleTest( selector
, prop
, val
) {
193 mw
.config
.get( 'wgScriptPath' ) +
194 '/tests/qunit/data/styleTest.css.php?' +
203 QUnit
.asyncTest( 'mw.loader', 2, function ( assert
) {
206 mw
.loader
.testCallback = function () {
208 assert
.strictEqual( isAwesomeDone
, undefined, 'Implementing module is.awesome: isAwesomeDone should still be undefined');
209 isAwesomeDone
= true;
212 mw
.loader
.implement( 'test.callback', [QUnit
.fixurl( mw
.config
.get( 'wgScriptPath' ) + '/tests/qunit/data/callMwLoaderTestCallback.js' )], {}, {} );
214 mw
.loader
.using( 'test.callback', function () {
216 // /sample/awesome.js declares the "mw.loader.testCallback" function
217 // which contains a call to start() and ok()
218 assert
.strictEqual( isAwesomeDone
, true, 'test.callback module should\'ve caused isAwesomeDone to be true' );
219 delete mw
.loader
.testCallback
;
223 assert
.ok( false, 'Error callback fired while loader.using "test.callback" module' );
227 QUnit
.test( 'mw.loader.implement( styles={ "css": [text, ..] } )', 2, function ( assert
) {
228 var $element
= $( '<div class="mw-test-implement-a"></div>' ).appendTo( '#qunit-fixture' );
231 $element
.css( 'float' ),
240 $element
.css( 'float' ),
246 'all': '.mw-test-implement-a { float: right; }'
256 QUnit
.asyncTest( 'mw.loader.implement( styles={ "url": { <media>: [url, ..] } } )', 7, function ( assert
) {
257 var $element1
= $( '<div class="mw-test-implement-b1"></div>' ).appendTo( '#qunit-fixture' ),
258 $element2
= $( '<div class="mw-test-implement-b2"></div>' ).appendTo( '#qunit-fixture' ),
259 $element3
= $( '<div class="mw-test-implement-b3"></div>' ).appendTo( '#qunit-fixture' );
262 $element1
.css( 'text-align' ),
267 $element2
.css( 'float' ),
272 $element3
.css( 'text-align' ),
280 // Note: QUnit.start() must only be called when the entire test is
281 // complete. So, make sure that we don't start until *both*
282 // assertStyleAsync calls have completed.
284 assertStyleAsync( assert
, $element2
, 'float', 'left', function () {
285 assert
.notEqual( $element1
.css( 'text-align' ), 'center', 'print style is not applied' );
288 if ( pending
=== 0 ) {
292 assertStyleAsync( assert
, $element3
, 'float', 'right', function () {
293 assert
.notEqual( $element1
.css( 'text-align' ), 'center', 'print style is not applied' );
296 if ( pending
=== 0 ) {
303 'print': [urlStyleTest( '.mw-test-implement-b1', 'text-align', 'center' )],
305 // bug 40834: Make sure it actually works with more than 1 stylesheet reference
306 urlStyleTest( '.mw-test-implement-b2', 'float', 'left' ),
307 urlStyleTest( '.mw-test-implement-b3', 'float', 'right' )
319 // Backwards compatibility
320 QUnit
.test( 'mw.loader.implement( styles={ <media>: text } ) (back-compat)', 2, function ( assert
) {
321 var $element
= $( '<div class="mw-test-implement-c"></div>' ).appendTo( '#qunit-fixture' );
324 $element
.css( 'float' ),
333 $element
.css( 'float' ),
339 'all': '.mw-test-implement-c { float: right; }'
349 // Backwards compatibility
350 QUnit
.asyncTest( 'mw.loader.implement( styles={ <media>: [url, ..] } ) (back-compat)', 4, function ( assert
) {
351 var $element
= $( '<div class="mw-test-implement-d"></div>' ).appendTo( '#qunit-fixture' ),
352 $element2
= $( '<div class="mw-test-implement-d2"></div>' ).appendTo( '#qunit-fixture' );
355 $element
.css( 'float' ),
360 $element2
.css( 'text-align' ),
368 assertStyleAsync( assert
, $element
, 'float', 'right', function () {
370 assert
.notEqual( $element2
.css( 'text-align' ), 'center', 'print style is not applied (bug 40500)' );
376 'all': [urlStyleTest( '.mw-test-implement-d', 'float', 'right' )],
377 'print': [urlStyleTest( '.mw-test-implement-d2', 'text-align', 'center' )]
387 // @import (bug 31676)
388 QUnit
.asyncTest( 'mw.loader.implement( styles has @import)', 5, function ( assert
) {
389 var isJsExecuted
, $element
;
392 'test.implement.import',
394 assert
.strictEqual( isJsExecuted
, undefined, 'javascript not executed multiple times' );
397 assert
.equal( mw
.loader
.getState( 'test.implement.import' ), 'ready', 'module state is "ready" while implement() is executing javascript' );
399 $element
= $( '<div class="mw-test-implement-import">Foo bar</div>' ).appendTo( '#qunit-fixture' );
401 assert
.equal( mw
.msg( 'test-foobar' ), 'Hello Foobar, $1!', 'Messages are loaded before javascript execution' );
403 assertStyleAsync( assert
, $element
, 'float', 'right', function () {
404 assert
.equal( $element
.css( 'text-align' ),'center',
405 'CSS styles after the @import rule are working'
414 + urlStyleTest( '.mw-test-implement-import', 'float', 'right' )
416 + '.mw-test-implement-import { text-align: center; }'
420 'test-foobar': 'Hello Foobar, $1!'
424 mw
.loader
.load( 'test.implement' );
428 QUnit
.asyncTest( 'mw.loader.implement( only messages )' , 2, function ( assert
) {
429 assert
.assertFalse( mw
.messages
.exists( 'bug_29107' ), 'Verify that the test message doesn\'t exist yet' );
431 mw
.loader
.implement( 'test.implement.msgs', [], {}, { 'bug_29107': 'loaded' } );
432 mw
.loader
.using( 'test.implement.msgs', function() {
434 assert
.ok( mw
.messages
.exists( 'bug_29107' ), 'Bug 29107: messages-only module should implement ok' );
437 assert
.ok( false, 'Error callback fired while implementing "test.implement.msgs" module' );
441 QUnit
.test( 'mw.loader erroneous indirect dependency', 3, function ( assert
) {
442 mw
.loader
.register( [
443 ['test.module1', '0'],
444 ['test.module2', '0', ['test.module1']],
445 ['test.module3', '0', ['test.module2']]
447 mw
.loader
.implement( 'test.module1', function () { throw new Error( 'expected' ); }, {}, {} );
448 assert
.strictEqual( mw
.loader
.getState( 'test.module1' ), 'error', 'Expected "error" state for test.module1' );
449 assert
.strictEqual( mw
.loader
.getState( 'test.module2' ), 'error', 'Expected "error" state for test.module2' );
450 assert
.strictEqual( mw
.loader
.getState( 'test.module3' ), 'error', 'Expected "error" state for test.module3' );
453 QUnit
.test( 'mw.loader out-of-order implementation', 9, function ( assert
) {
454 mw
.loader
.register( [
455 ['test.module4', '0'],
456 ['test.module5', '0', ['test.module4']],
457 ['test.module6', '0', ['test.module5']]
459 mw
.loader
.implement( 'test.module4', function () {}, {}, {} );
460 assert
.strictEqual( mw
.loader
.getState( 'test.module4' ), 'ready', 'Expected "ready" state for test.module4' );
461 assert
.strictEqual( mw
.loader
.getState( 'test.module5' ), 'registered', 'Expected "registered" state for test.module5' );
462 assert
.strictEqual( mw
.loader
.getState( 'test.module6' ), 'registered', 'Expected "registered" state for test.module6' );
463 mw
.loader
.implement( 'test.module6', function () {}, {}, {} );
464 assert
.strictEqual( mw
.loader
.getState( 'test.module4' ), 'ready', 'Expected "ready" state for test.module4' );
465 assert
.strictEqual( mw
.loader
.getState( 'test.module5' ), 'registered', 'Expected "registered" state for test.module5' );
466 assert
.strictEqual( mw
.loader
.getState( 'test.module6' ), 'loaded', 'Expected "loaded" state for test.module6' );
467 mw
.loader
.implement( 'test.module5', function() {}, {}, {} );
468 assert
.strictEqual( mw
.loader
.getState( 'test.module4' ), 'ready', 'Expected "ready" state for test.module4' );
469 assert
.strictEqual( mw
.loader
.getState( 'test.module5' ), 'ready', 'Expected "ready" state for test.module5' );
470 assert
.strictEqual( mw
.loader
.getState( 'test.module6' ), 'ready', 'Expected "ready" state for test.module6' );
473 QUnit
.test( 'mw.loader missing dependency', 13, function ( assert
) {
474 mw
.loader
.register( [
475 ['test.module7', '0'],
476 ['test.module8', '0', ['test.module7']],
477 ['test.module9', '0', ['test.module8']]
479 mw
.loader
.implement( 'test.module8', function () {}, {}, {} );
480 assert
.strictEqual( mw
.loader
.getState( 'test.module7' ), 'registered', 'Expected "registered" state for test.module7' );
481 assert
.strictEqual( mw
.loader
.getState( 'test.module8' ), 'loaded', 'Expected "loaded" state for test.module8' );
482 assert
.strictEqual( mw
.loader
.getState( 'test.module9' ), 'registered', 'Expected "registered" state for test.module9' );
483 mw
.loader
.state( 'test.module7', 'missing' );
484 assert
.strictEqual( mw
.loader
.getState( 'test.module7' ), 'missing', 'Expected "missing" state for test.module7' );
485 assert
.strictEqual( mw
.loader
.getState( 'test.module8' ), 'error', 'Expected "error" state for test.module8' );
486 assert
.strictEqual( mw
.loader
.getState( 'test.module9' ), 'error', 'Expected "error" state for test.module9' );
487 mw
.loader
.implement( 'test.module9', function () {}, {}, {} );
488 assert
.strictEqual( mw
.loader
.getState( 'test.module7' ), 'missing', 'Expected "missing" state for test.module7' );
489 assert
.strictEqual( mw
.loader
.getState( 'test.module8' ), 'error', 'Expected "error" state for test.module8' );
490 assert
.strictEqual( mw
.loader
.getState( 'test.module9' ), 'error', 'Expected "error" state for test.module9' );
494 assert
.ok( false, 'Success fired despite missing dependency' );
495 assert
.ok( true , 'QUnit expected() count dummy' );
497 function ( e
, dependencies
) {
498 assert
.strictEqual( $.isArray( dependencies
), true, 'Expected array of dependencies' );
499 assert
.deepEqual( dependencies
, ['test.module7'], 'Error callback called with module test.module7' );
505 assert
.ok( false, 'Success fired despite missing dependency' );
506 assert
.ok( true , 'QUnit expected() count dummy' );
508 function ( e
, dependencies
) {
509 assert
.strictEqual( $.isArray( dependencies
), true, 'Expected array of dependencies' );
513 ['test.module7', 'test.module8', 'test.module9'],
514 'Error callback called with all three modules as dependencies'
520 QUnit
.asyncTest( 'mw.loader dependency handling', 5, function ( assert
) {
524 loadScript
: QUnit
.fixurl( mw
.config
.get( 'wgScriptPath' ) + '/tests/qunit/data/load.mock.php' )
528 mw
.loader
.register( [
529 // [module, version, dependencies, group, source]
530 ['testMissing', '1', [], null, 'testloader'],
531 ['testUsesMissing', '1', ['testMissing'], null, 'testloader'],
532 ['testUsesNestedMissing', '1', ['testUsesMissing'], null, 'testloader']
535 function verifyModuleStates() {
536 assert
.equal( mw
.loader
.getState( 'testMissing' ), 'missing', 'Module not known to server must have state "missing"' );
537 assert
.equal( mw
.loader
.getState( 'testUsesMissing' ), 'error', 'Module with missing dependency must have state "error"' );
538 assert
.equal( mw
.loader
.getState( 'testUsesNestedMissing' ), 'error', 'Module with indirect missing dependency must have state "error"' );
541 mw
.loader
.using( ['testUsesNestedMissing'],
543 assert
.ok( false, 'Error handler should be invoked.' );
544 assert
.ok( true ); // Dummy to reach QUnit expect()
546 verifyModuleStates();
550 function ( e
, badmodules
) {
551 assert
.ok( true, 'Error handler should be invoked.' );
552 // As soon as server spits out state('testMissing', 'missing');
553 // it will bubble up and trigger the error callback.
554 // Therefor the badmodules array is not testUsesMissing or testUsesNestedMissing.
555 assert
.deepEqual( badmodules
, ['testMissing'], 'Bad modules as expected.' );
557 verifyModuleStates();
564 QUnit
.asyncTest( 'mw.loader( "//protocol-relative" ) (bug 30825)', 2, function ( assert
) {
565 // This bug was actually already fixed in 1.18 and later when discovered in 1.17.
566 // Test is for regressions!
568 // Forge an URL to the test callback script
569 var target
= QUnit
.fixurl(
570 mw
.config
.get( 'wgServer' ) + mw
.config
.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js'
573 // Confirm that mw.loader.load() works with protocol-relative URLs
574 target
= target
.replace( /https?:/, '' );
576 assert
.equal( target
.substr( 0, 2 ), '//',
577 'URL must be relative to test relative URLs!'
581 // The target calls QUnit.start
582 mw
.loader
.load( target
);
585 QUnit
.test( 'mw.html', 13, function ( assert
) {
586 assert
.throws( function () {
588 }, TypeError
, 'html.escape throws a TypeError if argument given is not a string' );
590 assert
.equal( mw
.html
.escape( '<mw awesome="awesome" value=\'test\' />' ),
591 '<mw awesome="awesome" value='test' />', 'escape() escapes special characters to html entities' );
593 assert
.equal( mw
.html
.element(),
594 '<undefined/>', 'element() always returns a valid html string (even without arguments)' );
596 assert
.equal( mw
.html
.element( 'div' ), '<div/>', 'element() Plain DIV (simple)' );
598 assert
.equal( mw
.html
.element( 'div', {}, '' ), '<div></div>', 'element() Basic DIV (simple)' );
606 '<div id="foobar"/>',
607 'html.element DIV (attribs)' );
609 assert
.equal( mw
.html
.element( 'p', null, 12 ), '<p>12</p>', 'Numbers are valid content and should be casted to a string' );
611 assert
.equal( mw
.html
.element( 'p', { title
: 12 }, '' ), '<p title="12"></p>', 'Numbers are valid attribute values' );
613 // Example from https://www.mediawiki.org/wiki/ResourceLoader/Default_modules#mediaWiki.html
619 mw
.html
.element( 'img', { src
: '<' } )
622 '<div><img src="<"/></div>',
623 'Raw inclusion of another element'
632 '<option selected="selected">Foo</option>',
633 'Attributes may have boolean values. True copies the attribute name to the value.'
643 '<option value="foo">Foo</option>',
644 'Attributes may have boolean values. False keeps the attribute from output.'
647 assert
.equal( mw
.html
.element( 'div',
650 'html.element DIV (content)' );
652 assert
.equal( mw
.html
.element( 'a',
653 { href
: 'http://mediawiki.org/w/index.php?title=RL&action=history' }, 'a' ),
654 '<a href="http://mediawiki.org/w/index.php?title=RL&action=history">a</a>',
655 'html.element DIV (attribs + content)' );
659 }( mediaWiki
, jQuery
) );