From 87c2503571bd7f5e753bc16a05bd198fc58d7d7c Mon Sep 17 00:00:00 2001 From: Nathan Dinsmore Date: Wed, 17 Jun 2015 17:11:40 -0400 Subject: Use Object.create(…) instead of new …() for inheritance (faster) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lists.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lists.js') diff --git a/lists.js b/lists.js index bd856fe..be7f933 100644 --- a/lists.js +++ b/lists.js @@ -363,7 +363,7 @@ List.prototype.equalTo = function (other) { // ListWatcherMorph inherits from BoxMorph: -ListWatcherMorph.prototype = new BoxMorph(); +ListWatcherMorph.prototype = Object.create(BoxMorph.prototype); ListWatcherMorph.prototype.constructor = ListWatcherMorph; ListWatcherMorph.uber = BoxMorph.prototype; -- cgit v1.3.1