* @class mw.Uri
*/
-( function ( mw, $ ) {
+( function () {
var parser, properties;
/**
// Copy data over from existing URI object
for ( prop in uri ) {
// Only copy direct properties, not inherited ones
- if ( uri.hasOwnProperty( prop ) ) {
+ if ( Object.prototype.hasOwnProperty.call( uri, prop ) ) {
// Deep copy object properties
if ( Array.isArray( uri[ prop ] ) || $.isPlainObject( uri[ prop ] ) ) {
this[ prop ] = $.extend( true, {}, uri[ prop ] );
*/
getQueryString: function () {
var args = [];
+ // eslint-disable-next-line no-restricted-properties
$.each( this.query, function ( key, val ) {
var k = Uri.encode( key ),
vals = Array.isArray( val ) ? val : [ val ];
return location.href;
} );
-}( mediaWiki, jQuery ) );
+}() );