Note that __proto__ may not be available in JavaScript versions other than that in Mozilla. An alternative, but less optimal version of extend(), which should work everywhere, is:
function extend(child, super)
{
for (var property in super.prototype) {
if (typeof child.prototype[property] == "undefined")
child.prototype[property] = super.prototype[property];
}
return child;
}
Group items matching
in title, tags, annotations or urlJavaScript, Tail-Call Optimization - 2 views
1 - 8 of 8
Showing 20▼ items per page