15.3.4.5.2 [[Construct]] for bind

2010-07-04

This is the [[Construct]] method for function objects returned by a call to Function.prototype.bind. It takes care of the bound parameters and appends additionally given arguments to that list. Note that the this value is not changed!

Code: (Meta Ecma)
function GetSpecialBindConstructor(ExtraArgs){
var target = this.[[TargetFunction]];
if (!([[Construct]] in target)) throw TypeError;
var boundArgs = this.[[BoundArgs]];
var args = boundArgs.concat(ExtraArgs);
return target.[[Construct]](args);
}