Re: get object name from within object
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 23 Jul 2005 11:47:20 +0100
Lasse Reichstein Nielsen wrote:
<snip>
> Still, arguments.callee is the only way to access the
> current function without knowing its name. It's just that
> it only works inside that function, and at that point,
> you should know the name.
Which means that the only circumstances where arguments.callee would be
necessary is when the function is anonymous (the result of an anonymous
function expression or the use of the Function constructor, but only
sometimes), or when the author has (rather stupidly) re-used the
function's name as a formal parameter, local variable or inner function
name and so masked the property on the scope chain that refers to the
function itself.
Richard.
.
- Follow-Ups:
- Re: get object name from within object
- From: Lasse Reichstein Nielsen
- Re: get object name from within object
- References:
- get object name from within object
- From: warteschlange
- Re: get object name from within object
- From: VK
- Re: get object name from within object
- From: Lasse Reichstein Nielsen
- get object name from within object
- Prev by Date: Re: IE Performance Slowdown
- Next by Date: Re: IE Performance Slowdown
- Previous by thread: Re: get object name from within object
- Next by thread: Re: get object name from within object
- Index(es):
Relevant Pages
|
Loading