OOP. Calling methods from within methods
<p>How do I call class methods from functions within the class? My code is:</p>

<pre><code>var myExtension = {

    init: function() {
        // Call onPageLoad
    },  

    onPageLoad: function() {  
        // Do something    
    },

}  
</code></pre>

<p>I've tried ...</p>

<pre><code>onPageLoad();
</code></pre>

<p>... from within the init method but it's saying it's not defined.</p>

<p>I'm not having much luck with google because I don't understand the syntax used. All the JS OOP examples I find online are in a different format. I'm using the format Mozilla use for extension development.</p>
