So ES 6 is bringing us Maps (and none too soon). Wishing to subclass Map for my own nefarious purposes, I tried the following (abbreviated for clarity):
function
Actually, it doesn't really 'work' in FF, since FF also allows to create maps simply by calling Map()
.
However, according to http://kangax.github.io/compat-table/es6/ we do not have compatibility for subclassing in modern browser (fascinating enough, IE has some support here).
tl;dr V8/SpiderMonkey are not fully ES6 compatible yet.