Making subclass with .prototype and __proto__
<p>I've recently been learning javascript by writing some gnome shell extensions, and hence my understanding of Javascript has been shaped by the examples I've observed in the gnome-shell javascript sources. I have a feeling I've been understanding classes wrong and just want some clarification.</p>

<p>I've written a few of my own subclasses, and in each case I've defined them simply by following similar code in the gnome-shell javascript source:</p>

<pre><code>Subclass = function() {
    this._init.apply(this,arguments);
}
Subclass.prototype = {
    __proto__: Superclass.prototype,
    _init: function() {
        Superclass.prototype._init.call(this);
    },
    // add other methods of Subclass here.
}
</code></pre>

<p>Up to now I thought this was the standard way of making a class <code>Subclass</code> that was basically <code>Superclass</code> plus extras. I assumed that every object had a <code>_init</code> method.</p>

<p>I've recently tried to apply the same method to make a subclass of a <code>Clutter.Actor</code> (what's important is that it's not a GNOME-shell-defined class), and realised that the above way of subclassing objects is not the standard. For one, not every class has a <code>_init</code> function as I assumed; this is just something that GNOME-shell has done in their javascript classes.</p>

<p>So, <strong>my questions are</strong>:</p>

<ol>
<li>Is there any documentation regarding the above method of creating subclasses? All the tutorials I've seen say to set <code>Subclass.prototype = new Superclass()</code> instead of doing the <code>Subclass.prototype = { __proto__:Superclass.prototype, define_prototype_methods_here }</code> method, but my thought is that there must be some method to it if gnome-shell uses it consistently?</li>
<li>If I wanted to stay as close as possible to the above way of defining classes (just so I can retain some code similarity to GNOME-shell for which I am writing extensions), <strong>what do I replace <code>Superclass.prototype._init.call(this)</code> with</strong> in <code>Subclass._init</code> to make sure that the <code>Subclass.prototype</code> gets all the methods/properties of <code>Superclass</code> (which I then add on to in my definition of <code>Subclass.prototype</code>), if the <code>Superclass</code> doesn't have an <code>_init</code> function (i.e. does it have some equivalent constructor function I call)?</li>
</ol>

<p>I'm really confused about this all so please forgive me if my question doesn't make much sense; it'll be because of the extent of my misunderstanding &amp; confusion!</p>

<p><strong>EDIT</strong>: clarification: 
- I know the <code>__proto__</code> is not recommended because it is non-standard, but my code is never going to run in a browser - it's only ever going to run with GNOME javascript (which is basically the Mozilla javascript engine), so I don't need to worry about cross-compatibility.</p>
