title: .ondragstart not equivalent to .addEventListener("dragstart"
body: <p>I want to make an img element unselectable and undraggable because I'm using it as a window resizing control (clicking and dragging on the surrounding div resizes a window).</p>
  
  <p>It works perfectly fine as the following:</p>
  
  <pre><code>noSelect[x].ondragstart = function() {return false};
  </code></pre>
  
  <p>But since this will be used in a firefox(3.6.*) extension which uses an XPCNativeWrapper around every HTMLElement, I cannot use ".onsdragstart" and have to use ".addEventListener"</p>
  
  <p>The problem is the equivalent to the above code isn't working. Clicking and dragging the img triggers firefox's default image dragging, instead of resizing my window in the following:</p>
  
  <pre><code>noSelect[x].addEventListener("dragstart", function () {return false}, false)
  </code></pre>
  
  <p>Are the two lines of code quoted above not equivalent? </p>
  
  <p>Full context for unselectable objects:</p>
  
  <pre><code>var noSelect = document.getElementsByClassName("noSelect")
      for (x in noSelect) {
          if (x == "length")
              break
          noSelect[x].unselectable = "on";
          noSelect[x].onselectstart = function(){return false};
          noSelect[x].ondragstart = function() {return false};
          noSelect[x].style.userSelect = "none"; // w3c standard
          noSelect[x].style.MozUserSelect = "none"; // Firefox
      }
  </code></pre>