* SUMMARY Provide a better view of classes in the console when referred to by the class name / constructor function. * TEST If I have a "var myClass = class Foo { /* ... */ };" and I console.log(myClass) or write `myClass` in the console, I want to view the API of the class, not the constructor function. If I really want to see the function, I can `myClass.toString()`. * NOTES - WebKit currently just shows the toString of the constructor function - Firefox currently shows the toString of the constructor function - Chrome currently shows the toString of the entire class
<rdar://problem/20271520>
Created attachment 249314 [details] [PATCH] Proposed Fix I'm hitting some mysterious crashes, but I don't know if they are my changes. Regardless I will not land this without figuring out what is causing those.
Created attachment 249315 [details] [IMAGE] Class View This is the basic class view we see right now. It is basically a re-purposed API view. Ultimately we will probably want something better to show all static functions, and all methods.
Comment on attachment 249314 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=249314&action=review I think the "A prototype" and "B prototype" toggle buttons should say "class" in ClassAPI mode. Maybe we need a badge or type treatment for static once you have them? > LayoutTests/inspector/model/remote-object-expected.txt:4100 > + "_description": "ReferenceError: Can't find variable: person" Oops? > Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js:96 > + ClassAPI: Symbol("object-tree--class-api"), // API view without an object instance, can not invoke getters. Double hyphen.
http://trac.webkit.org/changeset/182047