var Shape = function(type)
{
this.type = type;
addEventListener("resize", this.align);
}
Shape.prototype.align = function()
{
alert(this.type);
}
.
var variable = new Shape('rectangle');
When I resized, I want alert rectangle but it alerts undefined
alert(this)(or rather log it to the console), what do you see?