Why does the Responsive plugin log e.namespace to console as of 1.0.5?

Why does the Responsive plugin log e.namespace to console as of 1.0.5?

axelljaxellj Posts: 2Questions: 1Answers: 0

I recently upgraded to responsive plugin 1.0.5 and noticed that I got the string "dt" logged to console on every pageload. The culprit turned out to be the init listener:

// Attach a listener to the document which listens for DataTables initialisation
// events so we can automatically initialise
$(document).on( 'init.dt.dtr', function (e, settings, json) {
    if ( e.namespace !== 'dt' ) {
        return;
    }

    if ( $(settings.nTable).hasClass( 'responsive' ) ||
         $(settings.nTable).hasClass( 'dt-responsive' ) ||
         settings.oInit.responsive ||
         DataTable.defaults.responsive
    ) {
        console.log( e.namespace ); // <-- ack, prints 'dt'

        var init = settings.oInit.responsive;

        if ( init !== false ) {
            new Responsive( settings, $.isPlainObject( init ) ? init : {}  );
        }
    }
} );

I will be manually editing sources to save my (poor, misguided) IE8 users, but this seems like a bad idea overall. Why is this being done? Who should I bug? The contact page linked in the plugin source directed me to these very forums. I have been unable to find a search function, and attempts to find similar topics failed.

Many thanks in advance,
Axel

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,304Questions: 1Answers: 10,433 Site admin
    edited April 2015 Answer ✓

    Its a bug :-(. Really sorry about that - I left a debug statement in the code at the point of release which was really stupid.

    The nightly version already has it fixed.

    I'll be publishing a new release with this fix soon.

    Allan

  • axelljaxellj Posts: 2Questions: 1Answers: 0

    Got it - figured something like that had happened. Glad I'm not the only one making mistakes :)

    Cheers,
    Axel

This discussion has been closed.