Function names in Web console

Discuss building things with or for the Mozilla Platform.
Locked
Mikado
Posts: 7
Joined: August 29th, 2007, 5:38 pm

Function names in Web console

Post by Mikado »

When inspecting a function reference, Firefox shows its original function name that seems otherwise inaccessible to the user.
Example: http://jsfiddle.net/yxvu9o4r/1/
Let's open the console and type:

Code: Select all

cd(result)
ref

This prints a function reference visualised as "function myFunc()" that is, indeed, its function name.
However, not "name", "displayName" nor "toSource()" of this function reference would contain the above string. Is it possible to access it from user code?
Locked