Support » Plugin: DCO Comment Attachment » try-catch

  • I thin, you guys need do somethimg like this, cause there are some console errors in some pages

    _________________________
    document.addEventListener( ‘DOMContentLoaded’, function() {
    // This is a dirty method, but there is no hook in WordPress to add attributes to the commenting form.

    try{
    document
    .getElementById( ‘respond’ )
    .querySelector( ‘form’ )
    .setAttribute( ‘enctype’, ‘multipart/form-data’ );
    } catch(e){
    // console.log(e);
    }

    }

    );

  • You must be logged in to reply to this topic.