[Webkit-unassigned] [Bug 28983] WebInspector: Wrap primitive values (as objects) in InspectorController::wrap

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 4 23:31:50 PDT 2009


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





--- Comment #3 from Pavel Feldman <pfeldman at chromium.org>  2009-09-04 23:31:50 PDT ---
(In reply to comment #2)
> wrt watches: I still need to get the properties of the result of the watch
> expression evaluation.  That's how it currently works anyway - eval the
> expression, and then the result appears in the tree just like a normal property
> inspector.  The result's properties appear in the tree as children of the
> expression.  I don't believe the current ObjectProperty* code is factored well
> enough for me to do this easily, so I did that part "by hand".
> 

Imagine that you have objectProxy that is a result of your evaluation. Try
typing the following:

element.appendChild(new WebInspector.ObjectPropertiesSection(objectProxy,
watchedExpression, null, true).element);

That will render what you need in one line. What doesn't work here for you? As
I mentioned in this bug, rendering primitive values could be trickier, but you
can check for the typeof and render it manually in one line.

> I can imagine other uses within the debugger for the ability to get the
> properties of an arbitrary object, so I think this needs to be a 1st class
> capability.  For instance, I've been thinking of writing some kind of object
> explorer where you could see a graphical layout of an object, it's properties,
> their properties, etc.  Such a tool would also need a way to get a list of
> properties of an arbitrary object.

No, it would not. There are generic capabilities that would be reused for that.
Like dumping object structure in console (by means of dir(object)), allows
getting and rendering arbitrary objects. You don't need to write an object
explorer - it is already in place.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list