summaryrefslogtreecommitdiff
path: root/xml.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 /xml.js
parent3885ced35aee903f74d48c293bc3f0665a38dba5 (diff)
downloadsnap-87c2503571bd7f5e753bc16a05bd198fc58d7d7c.tar.gz
snap-87c2503571bd7f5e753bc16a05bd198fc58d7d7c.zip
Use Object.create(…) instead of new …() for inheritance (faster)
Diffstat (limited to 'xml.js')
-rw-r--r--xml.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/xml.js b/xml.js
index fb612ce..d1cdf68 100644
--- a/xml.js
+++ b/xml.js
@@ -166,7 +166,7 @@ ReadStream.prototype.word = function () {
// XML_Element inherits from Node:
-XML_Element.prototype = new Node();
+XML_Element.prototype = Object.create(Node.prototype);
XML_Element.prototype.constructor = XML_Element;
XML_Element.uber = Node.prototype;