title: calling parent implementations of privileged functions
body: <p>I have an inheritance relationship between two JavaScript classes<sup>1</sup></p>
  
  <pre><code>RealTimeChart = function(chartAttributes) {
  
      var chart = new FusionCharts(chartAttributes);
  
      this.appendData = function(data) {
          chart.feedData(data);
      }
  };
  
  RealTimeGauge = function(chartAttributes) {
      chartAttributes.type = 'AngularGauge';
  
      // call parent constructor
      RealTimeChart.call(this, chartAttributes);
  };
  
  // inherit from RealTimeChart
  RealTimeGauge.prototype = Object.create(RealTimeChart.prototype);
  </code></pre>
  
  <p>In <code>RealTimeGauge</code> I would like to override <code>appendData()</code>. The implementation of this function in <code>RealTimeGauge</code> needs to call the parent implementation, is this possible?</p>
  
  <p>It's relatively straightforward to do this if I change <code>appendData</code> to a prototype function, e.g.</p>
  
  <pre><code>// parent class
  RealTimeChart.prototype.appendData = function(data) {
      this.chart.feedData(data);
  };
  
  // child class
  RealTimeGauge.prototype.appendData = function(data) {
  
      console.log("doing custom stuff...");
  
      // call the parent function to add the data to the chart
      RealTimeChart.prototype.appendData.call(this, data);
  };
  </code></pre>
  
  <p>However, if I make <code>appendData</code> a prototype function rather than a privileged function, I also have to make <code>chart</code> a public property, which I'd rather not do. Is it possible to call the parent implementation of <code>appendData</code> form <code>RealTimeGauge</code> if it's a privileged function?</p>
  
  <ol>
  <li>I know they're not really classes, but I don't know of a better name for them</li>
  </ol>