Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var obj = {};
- obj.foo = function() {
- alert('foo!');
- };
- (function test(parent, fnName) {
- //find what object fn is from
- //basically, want 'obj' here so I can do stuff to obj
- var fn = parent[fnName]
- })(obj, 'foo');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement