Personal tools

DOM Inspector

From MozillaWiki

Jump to: navigation, search

UI Improvements

There is considerable scope for improvement to the UI of the DOM Inspector.

… 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);
 
 }