title: javascript - remove inline event handlers / attributes of a node
body: <p>Given an HTML node from the dom,
  I need to remove all inline event handlers / attributes such as: onclick, onmouseover, onmousedown etc. </p>
  
  <p>I know that:</p>
  
  <pre><code>document.getElementById("some_id").attributes
  </code></pre>
  
  <p>returns all the attributes, and I can eliminate some attriubtes, but then there is also attributes like: id, class, name etc.</p>
  
  <p>How do I seperate the two types of attributes?</p>
  
  <p>Completely different approches for solving the problem are also an option.</p>
  
  <p>EDIT: I'm trying to remove only inline events,
  and I also need to "save" them elsewhere before deletion, so cloning for complete disposal is not an option</p>