[Webkit-unassigned] [Bug 137306] Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 16 14:01:22 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=137306

--- Comment #5 from Joseph Pecoraro <joepeck at webkit.org> ---
Currently ObjectPropertiesSection populates either ALL properties (ScopeChainSidebar only) or OWN properties (normal case). ObjectPropertyTreeElement populates just OWN properties.

Instead, what I want to do is make the normal case fetch not just OWN properties, but OWN+GETTER properties. The only time we should fetch OWN properties is describing a __proto__.

What OWN+GETTER properties means, is OWN properties, and all the getter properties from parent prototypes.

--

That should meant that logging an Event object, you will immediately get all of the useful properties and values on that object. When you expand the __proto__ chain, it will be to see the APIs of those prototypes (what getters/setters they define, any own property constants on those prototypes, any methods they define).

--

There will be next steps after this:

(1) WebKit's Native Property descriptors are invalid. Object.getOwnPropertyDescriptor(MouseEvent.prototype, "altKey") gives us a descriptor with "get" undefined. It should be a function.

(2) We probably don't want to always evaluate a getter. For the native MouseEvent.prototype.altKey getter that should be fine, but for a non-native getter Foo.prototype.foo, we may not want to. We should detect this case, and provide a way to manually evaluate the getter or not.

(3) In the case of overridden getters, users might want to get the value of the getter in a parent prototype. If both SuperClassA and SuperClassB define a getter for "foo", you might want to know the SuperClassA and SuperClassB values of "foo". With the above proposal, __proto__'s will just show APIs, to then interact with the object will require another step.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150116/5f553f6a/attachment-0002.html>


More information about the webkit-unassigned mailing list