+ case 'register':
+ if ( alternateFn ) {
+ throw new Error( 'Another textSelection API was already registered' );
+ }
+ $( this ).data( 'jquery.textSelection', options );
+ // No need to update alternateFn as this command only stores the options.
+ // A command that uses it will set it again.
+ return;
+ case 'unregister':
+ $( this ).removeData( 'jquery.textSelection' );
+ return;