[web-audio-api] Subclassing (#251)

The following issue was raised by the W3C TAG as part of their [review of the Web Audio API](https://github.com/w3ctag/spec-reviews/blob/master/2013/07/WebAudio.md)

### 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:

```js
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.


---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/251

Received on Thursday, 17 October 2013 12:24:02 UTC