[Webkit-unassigned] [Bug 63580] New: Web Inspector: General Purpose Tree API in Extension API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 28 16:24:51 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=63580
Summary: Web Inspector: General Purpose Tree API in Extension
API
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Inspector
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: wycats at gmail.com
CC: timothy at apple.com, rik at webkit.org, keishi at webkit.org,
pmuellr at yahoo.com, joepeck at webkit.org,
pfeldman at chromium.org, yurys at chromium.org,
bweinstein at apple.com, apavlov at chromium.org,
loislo at chromium.org
Currently, the extension API makes it possible to do three things in sidebars:
* setObject: display an object
* setExpression: watch an expression and display the result
* setPage: insert an iframe (which has access to the devtools API)
However, it is not possible to insert any arbitrary tree in a sidebar, which would make it possible to do a lot more without resorting to a full-on custom page in an iframe. I'd like to propose an API for a tree structure representation that could be inserted into the sidebar (using something like setTree) and other areas that know how to render trees.
Straw Man:
var tree = new devtools.Tree({ title: "Root" });
var node1 = new devtools.Tree.Node({ title: "Child" });
var node2 = new devtools.Tree.Node({ key: "name", value: "result" });
var node3 = new devtools.Tree.Node({ key: "<span>name</span>", value: "<span style='color: green'>{{hello}}</span>", markup: true });
tree.appendChild(node1);
node1.appendChild(node2);
sidebar.setTree(tree);
// can insert new nodes and modify titles, keys, and values here
By default, the value in a key/value node is a span wrapping the text. If the developer flags the node as markup, he will be expected to provide a wrapping span, and can use any desired markup for styling. It would also be nice (but not strictly necessary) if an enumerated list of classes for these spans would be considered public APIs.
--
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