Shortens slice expression in channel helpers as per rwaldron's suggestion.

This commit is contained in:
jaubourg 2011-05-24 17:27:05 +02:00
parent 57634a2c15
commit 1f084d024d

View file

@ -5,7 +5,8 @@
publish: "fire",
subscribe: "add",
unsubscribe: "remove"
};
},
sliceChannel = [].slice;
jQuery.Channel = function( name ) {
var callbacks,
@ -27,7 +28,7 @@
jQuery.each( channelMethods, function( method ) {
jQuery[ method ] = function( name ) {
var channel = jQuery.Channel( name );
channel[ method ].apply( channel, Array.prototype.slice.call( arguments, 1 ) );
channel[ method ].apply( channel, sliceChannel.call( arguments, 1 ) );
};
});