title: DOM injection with namespace
body: <p>I know that extending DOM elements is a bad practice. But I was wondering if it's ok to inject methods to specific elements under namespace. Following example shows what I mean.</p>
  
  <pre><code>var element = document.getElementById('my-element');
  
  var inject = function (element) { 
      var nameSpace = element.nameSpace = {};
      nameSpace.method1 = function () {
          //do something
      }
      nameSpace.method2 = function () {
          //do something
      }
  }
  
  inject(element);
  </code></pre>
  
  <p>Is this acceptable?</p>