niko42,
<script>
var Events = function(){};
Events.prototype.t1 = function(){alert(1)};
Events.prototype.t2 = function(){alert(2)};
Events.prototype.t3 = function(){alert(3)};
var e = new Events();
for(var v in e){
e[v]();// как вызвать метод?
}
</script>
<script>
var Events = {
t1 : function(){alert(1)},
t2 : function(){alert(2)},
t3 : function(){alert(3)}
};
var e = Object.create(Events);
for(var v in e){
e[v]();// как вызвать метод?
}
</script>