I think code will explain better than words. Basically the goal is that only Customizable section should be edited in future (means, 400, 500 etc should be added without interfering with code in Static section).
Right now I’m trying to pass screenId. You could say that I Can just replace function() with function(id) but that’s not the only variable I will be passing in future therefore it would be great if I could inherit those variables like I could inherit this.id between prototypes without need to pass them as function’s argument.
Code you can find here: http://jsfiddle.net/J4pK6/
Thanks in advance for your time and support.
Mike
This will be fixed by using
screens[screenId].content.call(this);Reworked code
Reference:this and call
Thanks to Felix Kling