DOM Inspector: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Sevenspade (talk | contribs) (→Interfaces: add two attributes that are internally unused, but present nonetheless) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
== UI Improvements == | |||
There is considerable scope for improvement to the UI of the DOM Inspector. | |||
* ability to remember sessions | |||
* show inspector views as tabs instead of dropdown list items | |||
* autocomplete for the URL bar | |||
* consolidate mismatched UI items | |||
* inline search for computed style, etc. views with save ability | |||
* computed style etc saves scroll position | |||
* option to inspect the current window at startup instead of the current document | |||
* option to add "inspect this element" to right-click menu (like https://addons.mozilla.org/extensions/moreinfo.php?id=434) | |||
* The "find a node to inspect by id, tag, or attribute" ui could be changed to work like find-as-you-type | |||
* the trees can get really deep, and i constantly find myself trying to make the window bigger, and scrolling upward to find the parent of the node i'm looking at. not sure if there's a good way to address this? | |||
* microsoft developer toolbar is interesting: http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en having an option to pin/unpin would be cool. | |||
* maybe integrate event spy? https://addons.mozilla.org/extensions/moreinfo.php?id=1100 | |||
… more [https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&bug_severity=enhancement&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=DOM%20Inspector&known_name=DOM%20Inspector&query_based_on=DOM%20Inspector DOM Inspector enhancement bugs] | |||
== Interfaces == | |||
DOM Inspector's interfaces are not formalized, but if they were, they'd look something like this: | |||
interface domiIViewer : domiIObservable { | |||
readonly attribute AString uid; | |||
readonly attribute domiIPanel pane; | |||
// bug 570879 is concerned with renaming selection to object | |||
attribute nsISupports subject; | |||
readonly attribute nsISupports selection; | |||
void destroy(); | |||
boolean isCommandEnabled(in string aCommandName); | |||
nsITransaction getCommand(in string aCommandName); | |||
} | |||
interface domiIPanel : domiIObservable { | |||
readonly attribute domiIPanelset panelset; | |||
readonly attribute domiIPanel linkedPanel; | |||
attribute nsISupports subject; | |||
attribute nsIVariant params; | |||
readonly attribute domiIViewer viewer; | |||
readonly attribute nsIDOMDocument viewerDocument; | |||
void initialize(); | |||
void notifyViewerReady(in domiIViewer aViewer); | |||
void onViewerListCommand(in nsIDOMElement aViewerMenuItem); | |||
} | |||
interface domiIPanelset : domiIObservable { | |||
readonly attribute domiIViewerRegistry registry; | |||
readonly attribute boolean initialized; | |||
readonly attribute nsIStringBundle stringBundle; | |||
readonly attribute domiIFlasher flasher; | |||
readonly attribute aString clipboardFlavor; | |||
void initialize(); | |||
void onViewerRegistryLoad(); | |||
void onViewerRegistryLoadError(); | |||
readonly attribute long panelCount; | |||
domiIPanel getPanel(in unsigned long aIndex); | |||
void updateAllCommands(); | |||
AString getCommandAttribute(in AString aCommandName, | |||
in aString aAttributeName); | |||
AString setCommandAttribute(in AString aCommandName, | |||
in aString aAttributeName, | |||
in AString aValue); | |||
void execCommand(in AString aCommandName); | |||
void setClipboardData(in nsIVariant aData, in AString aFlavor, | |||
in AString aTextRepresentation); | |||
nsIVariant getClipboardData(); | |||
} | |||
interface domiIObserver : nsISupports { | |||
void onEvent(domiIEvent aEventData); | |||
} | |||
interface domiIEvent : nsISupports { | |||
readonly attribute domiIObservable target; | |||
readonly attribute AString type; | |||
} | |||
interface domiIObservable : nsISupports { | |||
void addObserver(in string aEventName, in domiIObserver aObserver); | |||
void removeObserver(in string aEventName, in domiIObserver aObserver); | |||
} | |||
Latest revision as of 01:34, 12 October 2010
UI Improvements
There is considerable scope for improvement to the UI of the DOM Inspector.
- ability to remember sessions
- show inspector views as tabs instead of dropdown list items
- autocomplete for the URL bar
- consolidate mismatched UI items
- inline search for computed style, etc. views with save ability
- computed style etc saves scroll position
- option to inspect the current window at startup instead of the current document
- option to add "inspect this element" to right-click menu (like https://addons.mozilla.org/extensions/moreinfo.php?id=434)
- The "find a node to inspect by id, tag, or attribute" ui could be changed to work like find-as-you-type
- the trees can get really deep, and i constantly find myself trying to make the window bigger, and scrolling upward to find the parent of the node i'm looking at. not sure if there's a good way to address this?
- microsoft developer toolbar is interesting: http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en having an option to pin/unpin would be cool.
- maybe integrate event spy? https://addons.mozilla.org/extensions/moreinfo.php?id=1100
… more DOM Inspector enhancement bugs
Interfaces
DOM Inspector's interfaces are not formalized, but if they were, they'd look something like this:
interface domiIViewer : domiIObservable {
readonly attribute AString uid;
readonly attribute domiIPanel pane;
// bug 570879 is concerned with renaming selection to object
attribute nsISupports subject;
readonly attribute nsISupports selection;
void destroy();
boolean isCommandEnabled(in string aCommandName);
nsITransaction getCommand(in string aCommandName);
}
interface domiIPanel : domiIObservable {
readonly attribute domiIPanelset panelset;
readonly attribute domiIPanel linkedPanel;
attribute nsISupports subject;
attribute nsIVariant params;
readonly attribute domiIViewer viewer;
readonly attribute nsIDOMDocument viewerDocument;
void initialize();
void notifyViewerReady(in domiIViewer aViewer);
void onViewerListCommand(in nsIDOMElement aViewerMenuItem);
}
interface domiIPanelset : domiIObservable {
readonly attribute domiIViewerRegistry registry;
readonly attribute boolean initialized;
readonly attribute nsIStringBundle stringBundle;
readonly attribute domiIFlasher flasher;
readonly attribute aString clipboardFlavor;
void initialize();
void onViewerRegistryLoad();
void onViewerRegistryLoadError();
readonly attribute long panelCount;
domiIPanel getPanel(in unsigned long aIndex);
void updateAllCommands();
AString getCommandAttribute(in AString aCommandName,
in aString aAttributeName);
AString setCommandAttribute(in AString aCommandName,
in aString aAttributeName,
in AString aValue);
void execCommand(in AString aCommandName);
void setClipboardData(in nsIVariant aData, in AString aFlavor,
in AString aTextRepresentation);
nsIVariant getClipboardData();
}
interface domiIObserver : nsISupports {
void onEvent(domiIEvent aEventData);
}
interface domiIEvent : nsISupports {
readonly attribute domiIObservable target;
readonly attribute AString type;
}
interface domiIObservable : nsISupports {
void addObserver(in string aEventName, in domiIObserver aObserver);
void removeObserver(in string aEventName, in domiIObserver aObserver);
}