blacklabel/custom_events — pull request #8 by jtrussell (2014-10-07 13:18:32+00:00)
Title: Preserve return value of wrapped methods

Highcharts relies on chaining some of these wrapped methods so we must preserve their return values.

For example, without thisHighcharts loses track of plot lines and plot bands making it impossible to remove them later. I added this code to the bottom of the script on the demo page:

```
setTimeout(function() {
console.log(Highcharts.charts[0].yAxis[0].plotLinesAndBands.length);
console.log(Highcharts.charts[0].yAxis[1].plotLinesAndBands.length);
}, 500);
```

Before the change see:

> 0
> 0

After the change we see:

> 2
> 0