summaryrefslogtreecommitdiff
path: root/lists.js
diff options
context:
space:
mode:
authorNathan Dinsmore <nathan@users.noreply.github.com>2015-06-17 17:11:40 -0400
committerNathan Dinsmore <nathan@users.noreply.github.com>2015-06-17 17:11:40 -0400
commit87c2503571bd7f5e753bc16a05bd198fc58d7d7c (patch)
tree4545f569b3989ee1d2e5d1cc3e3f31108ea06742 /lists.js
parent3885ced35aee903f74d48c293bc3f0665a38dba5 (diff)
downloadsnap-87c2503571bd7f5e753bc16a05bd198fc58d7d7c.tar.gz
snap-87c2503571bd7f5e753bc16a05bd198fc58d7d7c.zip
Use Object.create(…) instead of new …() for inheritance (faster)
Diffstat (limited to 'lists.js')
-rw-r--r--lists.js2
1 files changed, 1 insertions, 1 deletions
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;