Closed
Description
It would be really neat if there was a way to write a function that would be called for a warning instead of only being able to use a console or periodically check jQuery.migrateWarnings
. Possibly a event triggered on document
when there is a warning?
My use case is a large single page application that uses jQuery around the place. It would be nice to set jQuery.migrateMute = true
and add a function that listened for warnings and reported them somewhere custom. Possibly something like:
$(document).on('warning.jqmigrate', function (event, message) {
handleJqueryMigrateMessage(message);
});