Subclassing ES6 Set in javascript -



Subclassing ES6 Set in javascript -

i'm running problems when trying inherit new set available in ecmascript 6. class defined such:

function selectionmanager () { set.call(this); } selectionmanager.prototype = object.create(set.prototype); selectionmanager.prototype.add = function (unit) { unit.setisselected(true); set.prototype.add.call(this, unit); }; /* functions left out */

when trying phone call add next error: typeerror: set operation called on non-set object

the code available @ http://jsfiddle.net/6nq1gqx7/

the draft es6 states should possible subclass set, right way of doing so?

looks beingness tracked:

https://github.com/google/traceur-compiler/issues/1413

javascript set ecmascript-6 ecmascript-harmony

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -