Asignar un nuevo método a cada nodo

<head>
	  <script>
 function add()
		  {
			  Node.prototype.d = function(){
			  console.log(this.textContent)	
};
let a =			  document.getElementById("a");
let b =			  document.getElementById("b");
a.d();
b.d();
}
      </script>  
  </head>
  <body>
<button id="btn" onclick="add()">Press </button>
<div id="a">aaaa</div>
<div id="b">bbbb</div> 
</body>
Javasper