Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Most JS engine, even new ones don't allow functions to be named new.

  • Loading branch information...
commit 91821b58c42f0b3335a318ab4fd9be68531dc51e 1 parent badda73
Tim Caswell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/proto.js
2  lib/proto.js
View
@@ -60,7 +60,7 @@ if (typeof proto.extend !== 'function') {
// Implement new for easy self-initializing objects
if (typeof proto.new !== 'function') {
- Object.defineProperty(Object.prototype, "new", {value: function new() {
+ Object.defineProperty(Object.prototype, "new", {value: function () {
var obj = Object.create(this);
if (obj.initialize) obj.initialize.apply(obj, arguments);
return obj;
Please sign in to comment.
Something went wrong with that request. Please try again.