On Sat, Sep 5, 2009 at 7:32 PM, Garrett Smith<[email protected]> wrote: > A function's |name| is a nonstandard extension. > > javascript: function xxx(){} alert( [xxx.name, xxx.displayName+""] ) > > Webkit, Chrome, Seamonkey:- > elert: "xxx, undefined" > > A function may have a nonstandard |name| property set automatically in > some browsers. The |displayName| property is not set automatically in > any of the three tested browsers. > > > By using FunctionDeclaration, where syntactially valid, an identifier > is assigned.
The debugger in Safari 4 is using the displayName property to display function names in stack traces if it was set. It might, indeed, not be set automatically. The whole purpose is that it can be set manually. The name property would be find, too, for that but it is read-only in all implementations. Cheers Malte --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~----------~----~----~----~------~----~------~--~---
