new Main(square).on('click',show);
function Main(item) { if (!(this instanceof Main)){ return new Main(item); } if (typeof item == 'string') { alert('Item is not element'); return; } this.elem = item; }