Hi,
I’ve encountered quite a strange error when loading one of my scripts in Safari (4.0.3/Mac):
I have no idea, what Safari is complaining about, since it works in FF 3.5 and Opera 10, does anyone of you have an idea?
thanks, Dormi
I’ve encountered quite a strange error when loading one of my scripts in Safari (4.0.3/Mac):
SyntaxError: Parse error …/mod_core.js:26
thanks, Dormi
Code:
// by Gavin Kistner
[B]Function.prototype.extends = function(parentClassOrObject)[/B] // line 26
{
if (parentClassOrObject.constructor == Function)
{ //Normal Inheritance
this.prototype = new parentClassOrObject;
this.prototype.constructor = this;
this.prototype.parent = parentClassOrObject.prototype;
}
else
{ //Pure Virtual Inheritance
this.prototype = parentClassOrObject;
this.prototype.constructor = this;
this.prototype.parent = parentClassOrObject;
}
return this;
}
Comment