Summary: | Web Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||||||||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||
Hardware: | All | ||||||||||||||||||
OS: | All | ||||||||||||||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-06-02 19:07:10 PDT
Created attachment 280403 [details]
[IMAGE] TypeErrors everywhere
This seems like a dupe of https://bugs.webkit.org/show_bug.cgi?id=153911. *** This bug has been marked as a duplicate of bug 153911 *** Similar, but I'd have considered them different. I'm going to unduplicated this, because it is different. I have a fix for this. Created attachment 282395 [details]
[IMAGE] document.body before
Created attachment 282396 [details]
[IMAGE] document.body after
Created attachment 282397 [details]
[IMAGE] LoadEvent before
Created attachment 282398 [details]
[IMAGE] LoadEvent after
Created attachment 282400 [details]
[PATCH] Proposed Fix
So the way this works is: The preview will show native accessors as values in the preview: js> loadEvent ▶︎ Event { type: "foo", ... } And when you expand, the first expansion _conveniently_ immediately shows you both own properties/functions and native getters up in the prototype chain: js> loadEvent ▼ Event [B] ownPropertyBoolean: true [S] type: "foo" ... ▶︎ Event Prototype And when you expand the prototypes, it will show the individual properties/functions + accessors on those prototypes: js> loadEvent ▼ Event [B] ownPropertyBoolean: true [S] type: "foo" ... ▼ Event Prototype [?] type: (Get) ... ▶︎ Object Prototype This is the best of both worlds. Quick access to values. Yet still having the ability to ultimately find out exactly which prototype the accessor came from. Comment on attachment 282400 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=282400&action=review > Source/JavaScriptCore/inspector/InjectedScriptSource.js:647 > + // Developers may create such a descriptors, so we should be resilient: "such a descriptors" => "such a descriptor" Created attachment 282413 [details]
[PATCH] For Landing
|