Skip to content
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

All instances created with $.Class() show up in the devtools as ret or Object #178

Open
LeaVerou opened this issue Mar 4, 2016 · 0 comments

Comments

@LeaVerou
Copy link
Owner

LeaVerou commented Mar 4, 2016

ret in Chrome, Object in Firefox.

Reduced testcase:

var Foo = $.Class({}); 
var foo = new Foo(); // ret

I've done some research on how to fix this, and it doesn't seem easy. Function#name is read-only, but it can be overridden with Object.defineProperty. However, even if we do that, it still doesn't show up in the devtools. There is also Function#displayName, which is proprietary, but that doesn't seem to work either. We could use eval(), but I'd really rather not. At this point, I’m out of ideas. Anyone else has any?

@LeaVerou LeaVerou changed the title All classes created with $.Class() show up in the devtools as ret or Object All instances created with $.Class() show up in the devtools as ret or Object Mar 4, 2016
LeaVerou added a commit that referenced this issue Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant