Title: try-catch
Last modified: September 8, 2020

---

# try-catch

 *  Resolved [mrbalkon](https://wordpress.org/support/users/mrbalkon/)
 * (@mrbalkon)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/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); }
 * }
 * );

Viewing 1 replies (of 1 total)

 *  Plugin Author [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * (@denisco)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/try-catch/#post-13857103)
 * Hello [@mrbalkon](https://wordpress.org/support/users/mrbalkon/),
 * I’m sorry to be late with the reply.
 * Thank you for your suggestion. [It will be released](https://github.com/yadenis/DCO-Comment-Attachment/blob/dev/assets/dco-comment-attachment.js)
   in the next version.

Viewing 1 replies (of 1 total)

The topic ‘try-catch’ is closed to new replies.

 * ![](https://ps.w.org/dco-comment-attachment/assets/icon-256x256.png?rev=2082370)
 * [DCO Comment Attachment](https://wordpress.org/plugins/dco-comment-attachment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dco-comment-attachment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dco-comment-attachment/)
 * [Active Topics](https://wordpress.org/support/plugin/dco-comment-attachment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dco-comment-attachment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dco-comment-attachment/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/try-catch/#post-13857103)
 * Status: resolved