I work with some advanced JavaScript people and they have used the SUPER keyword in their code. I admit, I don't have a good grasp of how and why one can and would use this.
Can someone direct me or show me how to become well versed in its usage and reasoning thereof?
Here are some examples:
openup: function( $super ) {
$super();
this.shop.enable_access();
}
addLeft: function( data ) {
var cell = Element('td');
if ( data.item_data ) {
var item = new SRIL(data.item_data);
item.attach(cell);
item.show();
}
return cell;
}
var SRIL = Class.create(Module, {
initialize: function( $super, data ) {
$super({ dom: 'show_line' });
this.data = data;
if ( data.Type[0] == 'Car' ) {
//some code
}
else {
// some code
}
}
});