Javascript: Is prototype.length readonly or not? Follow
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.This 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?
Please sign in to leave a comment.
It is not, we will fix this bug shortly