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

1.7/callbacks^2
jaubourg 2011-05-24 17:27:05 +02:00
parent 96b0089c9c
commit 8c39fc855e
1 changed files with 3 additions and 2 deletions

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 ) );
};
});