Javascript: Is prototype.length readonly or not?

function CutString(string, limit)
{
// temporary node to parse the html tags in the string
this.tempDiv = document.createElement('div');
this.tempDiv.id = "TempNodeForTest";
this.tempDiv.innerHTML = string;
// while parsing text no of characters parsed
this.charCount = 0;
this.limit = limit;
}

CutString.prototype.length = function()
{
return this.calculateLength(this.tempDiv);
};


P.S. Forum editor sucks as always. Read message from bottom to top.
prototype-length.pngThis is piece of small librrary which I found somewhere on google code. It works in all browsers. Today I noticed that phpstorm says. Who is right, me or it?

1 comment
Comment actions Permalink

It is not, we will fix this bug shortly

0

Please sign in to leave a comment.