/ Published in: JavaScript
Expand |
Embed | Plain Text
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.'); };
You need to login to post a comment.
