JSFiddle - React, Tailwind, and code Playground
HTML
<div id="myDiv" onclick="this.Obj.foo(); return false;">Click me</div>
JavaScript
function Obj ( node ) {
var _data = node.Obj = [];
_data.foo = function(){ alert(this) }
return _data;
}
var tmpObj = Obj( document.getElementById( "myDiv" ) );
tmpObj.push("123");