Closed
Description
The following issue was raised by the W3C TAG as part of their review of the Web Audio API
ISSUE: Subclassing
Related to a lack of constructors, but worth calling out independently, it's not currently possible to meaningfully compose node types, either through mixins or through subclassing. In JS, this sort of "is a" relationship is usually set up through the subclassing pattern:
var SubNodeType = function() {
SuperNodeType.call(this);
};
SubNodeType.prototype = Object.create(SuperNodeType.prototype);
SubNodeType.prototype.constructor = SubNodeType;
// ...
There doesn't seem to be any way in the current design to enable this sort of composition. This is deeply unfortunate.