Using jQuery.byteLimit with callback can go into a endless loop, when the text returned by the callback is longer than the maximum.
Use the following command and type some text into the input:
$( '<input />' ).appendTo( '#firstHeading' ).byteLimit( 5, function( text ) { return 'longText'+text; } );
Maybe you have to load the byteLimit function before, use this command:
mw.loader.load('jquery.byteLimit');
Version: 1.21.x
Severity: normal