Let\'s say I have the following code snippet.
function test(id) { alert(id); }
testChild.prototype = new test();
function testChild(){}
var instance = new
By taking advantage of variable arguments and the apply() method, you could do it this way. Here's a fiddle for this example.
function test(id) { alert(id); }
function testChild() {
testChild.prototype.apply(this, arguments);
alert('also doing my own stuff');
}
testChild.prototype = test;
var instance = new testChild('hi', 'unused', 'optional', 'args');