WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142999
Web Inspector: ES6: Provide a better view for Classes in the console
https://bugs.webkit.org/show_bug.cgi?id=142999
Summary
Web Inspector: ES6: Provide a better view for Classes in the console
Joseph Pecoraro
Reported
2015-03-23 22:55:43 PDT
* 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
Attachments
[PATCH] Proposed Fix
(36.31 KB, patch)
2015-03-23 23:42 PDT
,
Joseph Pecoraro
timothy
: review+
joepeck
: commit-queue-
Details
Formatted Diff
Diff
[IMAGE] Class View
(75.96 KB, image/png)
2015-03-23 23:43 PDT
,
Joseph Pecoraro
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-03-23 22:56:16 PDT
<
rdar://problem/20271520
>
Joseph Pecoraro
Comment 2
2015-03-23 23:42:17 PDT
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.
Joseph Pecoraro
Comment 3
2015-03-23 23:43:11 PDT
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.
Timothy Hatcher
Comment 4
2015-03-24 05:31:39 PDT
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.
Joseph Pecoraro
Comment 5
2015-03-26 18:43:48 PDT
http://trac.webkit.org/changeset/182047
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug