[Webkit-unassigned] [Bug 19155] Inspector should support console.dir
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 14 15:55:44 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=19155
------- Comment #5 from timothy at hatcher.name 2008-08-14 15:55 PDT -------
(In reply to comment #4)
Opps. Didn't mean to hit submit yet.
I think you can remove WebInspector.ConsoleDomProperty and just append a
WebInspector.ObjectPropertiesSection to the in the console message. This will
give you all the behavior of the Properties sidebar pane. You can look in
PropertiesSidebarPane.js and ScopeChainSidebarPane.js to see how they are used.
It should be as simple as:
var propertiesSection = new WebInspector.ObjectPropertiesSection(object, title,
null, null, true);
propertiesSection.element.section = propertiesSection; // Store a reference so
the section object isn't collected.
consoleMessageElement.appendChild(propertiesSection.element);
The title var will be tricky. It would be nice to know the expression that was
passed to console.dir. But I don't think we have that. So just pass null for
the title and ObjectPropertiesSection will use the Object name for toString.
Let me know if you have any issues using this in the console! We might need to
add some style rules for the console use.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list