title: Javascript: How to remove the eventListener?
body: <p>How do I remove the event listener below using Javascript? </p>
  
  <pre><code>    var commentArea=$(this).parent().find('.comment_input_content')[0];
  
      commentEditDropbox = commentArea;
      commentEditDropbox.addEventListener("dragenter", dragenter, false);
      commentEditDropbox.addEventListener("dragover", dragover, false);
      commentEditDropbox.addEventListener("drop", drop, false);
      function dragenter(e) {
        e.stopPropagation();
        e.preventDefault();
        // $("#topic_content_input").css("cursor:copy");        
      }
      function dragover(e) {
        e.stopPropagation();
        e.preventDefault();
        // $("#topic_content_input").css("cursor:copy");
      }
      function drop(e) {
        e.stopPropagation();
        e.preventDefault();
        // $("#topic_content_input").css("cursor:copy");
        var dt = e.dataTransfer;
        var files = dt.files;
        var attr = $(this).attr('contenteditable');
        // if contenteditable is true
        if(attr){
        commentEditHandleFileSelect(files);
        alert("drop");
          }
      }
  </code></pre>
  
  <p>I tired code below simply by replacing addEventListener to removeEventlistener, but not working :( </p>
  
  <pre><code>var commentArea=$(this).parent().find('.comment_input_content')[0];
  
  commentEditDropbox = commentArea;
  commentEditDropbox.removeEventListener("dragenter", dragenter, false);
  commentEditDropbox.removeEventListener("dragover", dragover, false);
  commentEditDropbox.removeEventListener("drop", drop, false);
  </code></pre>