ref

String.prototype.ref = function () {
for (var args = [], i = 0; i < arguments.length; i++)
args.push('arguments[' + i + ']');
if (window[this] && window[this] instanceof Function)
return eval('(new window.' + this + '(' + args.join(',') + '))');
throw new Error('Function window.' + this + ' does not exist.');
};

source

Leave a Reply