Correctly Suppressing Warnings in DataTables?

前端 未结 6 2249
小蘑菇
小蘑菇 2020-12-24 12:13

I\'m trying to correctly suppress warnings (alerts) in DataTables. The standard behavior of DataTables is to throw a javascript alert when an error occurs; however, this is

6条回答
  •  暖寄归人
    2020-12-24 12:32

    Let me add my 2 cents to davidkonrad's answer above. One way of modifying _fnLog function without changing the file is to get reference to that method from Api instance in datatables settings:

    $.fn.dataTableSettings[0].oApi._fnLog = function(settings, level, msg, tn) {
        // Modified version of _fnLog
    }
    

    Hope that this will be helpful for someone.

提交回复
热议问题