-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current interop issue: some browsers use displayName property #14
Comments
@domenic sorry for the delay here; can you elaborate on exactly how (and which) some browsers use this property? |
Some browsers use the displayName property of a function, instead of using the function's name property, in stack traces. As for exactly which, I have the time to raise a known issue for the proposal champions, but not to do the research required to drive the proposal, since I am not a champion myself. |
Thanks; looks like Safari, at least, shows function f() { return new Error(); }
f.displayName = 'g';
f().stack; Chrome and Firefox and IE 11 and Edge do not. |
For Firefox/SpiderMonkey, there's also reason to clearly define expectations here because when there is no "name" for a function, SpiderMonkey currently attempts to provide a useful description of where the anonymous function is declared, for example:
results in
with
which output
|
They should only be using
name
these days, but some still keep it around. Would be good to standardize on this being disallowed and write tests as such.The text was updated successfully, but these errors were encountered: