L
Laser Lips
Hi All,
When I wish to dynamically get the name of a function I can use
arguments.callee.toString() to work out the function name.
But when prototyping functions like in the following example, the
function name is emitted.
<script tyle='text/javascript'>
function hello()
{
alert(arguments.callee.toString());
}
hello();
function DCS(){}
DCS.prototype.hello=function()
{
alert(arguments.callee.toString());
}
var DCS=new DCS();
DCS.hello();
</script>
I guess this has been asked before but I can't find anything.
Thank you,
Graham Vincent
When I wish to dynamically get the name of a function I can use
arguments.callee.toString() to work out the function name.
But when prototyping functions like in the following example, the
function name is emitted.
<script tyle='text/javascript'>
function hello()
{
alert(arguments.callee.toString());
}
hello();
function DCS(){}
DCS.prototype.hello=function()
{
alert(arguments.callee.toString());
}
var DCS=new DCS();
DCS.hello();
</script>
I guess this has been asked before but I can't find anything.
Thank you,
Graham Vincent