Class Firebug.Panel
Base class for all panels. Every derived panel must define a constructor and
register with Firebug.registerPanel
method. An instance of the panel
object is created by the framework for each browser tab where Firebug is activated.
Defined in: firebug.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Firebug.Panel.breakOnNext(armed)
Called by the framework when the user clicks on the Break On Next button.
|
<static> |
Firebug.Panel.getBreakOnNextTooltip(enabled)
Returns labels for Break On Next tooltip (one for enabled and one for disabled state).
|
<static> |
Firebug.Panel.getContextMenuItems(object:, target:)
Called by chrome.onContextMenu to build the context menu when this panel has focus.
|
<static> |
Firebug.Panel.getInspectNode(node)
Called by the framework when inspecting is in progress.
|
<static> |
Firebug.Panel.getSearchOptionsMenuItems()
Retrieves the search options that this modules supports.
|
<static> |
Firebug.Panel.getSourceLink(target, object)
If the panel supports source viewing, then return a SourceLink, else null
|
<static> |
Firebug.Panel.highlight(show)
UI signal that a tab needs attention, eg Script panel is currently stopped on a breakpoint
|
<static> |
Firebug.Panel.inspectNode(node)
Called by the framework when inspecting is in progress and the user moves mouse over
a new page element.
|
<static> |
Firebug.Panel.navigateToNextDocument(match, reverse)
Navigates to the next document whose match parameter returns true.
|
<static> |
Firebug.Panel.onTextSizeChange(zoom:)
Called after chrome.applyTextSize
|
<static> |
Firebug.Panel.refresh()
Redisplay the panel based on the current location and selection
|
<static> |
Firebug.Panel.shouldBreakOnNext()
Called when a panel is selected/displayed.
|
<static> |
Firebug.Panel.startInspecting()
Called by the framework when the user starts inspecting.
|
<static> |
Firebug.Panel.stopInspecting(node, canceled)
Called by the framework when the user stops inspecting.
|
<static> |
Firebug.Panel.supportsBreakOnNext()
Called by the framework to see if the panel currently supports BON
|
<static> |
Firebug.Panel.supportsObject(object, type)
Returns a number indicating the view's ability to inspect the object.
|
<static> |
Firebug.Panel.updateLocation(object)
The location object has been changed, the panel should update it view
|
<static> |
Firebug.Panel.updateSelection(object)
Firebug wants to show an object to the user and this panel has the best supportsObject()
result for the object.
|
Method Detail
<static>
Firebug.Panel.breakOnNext(armed)
Called by the framework when the user clicks on the Break On Next button.
- Parameters:
- {Boolean} armed
- Set to true if the Break On Next feature is to be armed for action and set to false if the Break On Next should be disarmed. If 'armed' is true, then the next call to shouldBreakOnNext should be |true|.
<static>
Firebug.Panel.getBreakOnNextTooltip(enabled)
Returns labels for Break On Next tooltip (one for enabled and one for disabled state).
- Parameters:
- {Boolean} enabled
- Set to true if the Break On Next feature is currently activated for this panel.
<static>
Firebug.Panel.getContextMenuItems(object:, target:)
Called by chrome.onContextMenu to build the context menu when this panel has focus.
See also FirebugRep for a similar function also called by onContextMenu
Extensions may monkey patch and chain off this call
- Parameters:
- object:
- the 'realObject', a model value, eg a DOM property
- target:
- the HTML element clicked on.
- Returns:
- an array of menu items.
<static>
Firebug.Panel.getInspectNode(node)
Called by the framework when inspecting is in progress. Allows to inspect
only nodes that are supported by the panel. Derived panels can provide effective
algorithms to provide these nodes.
- Parameters:
- {Element} node
- Currently inspected page element.
<static>
Firebug.Panel.getSearchOptionsMenuItems()
Retrieves the search options that this modules supports.
This is used by the search UI to present the proper options.
<static>
Firebug.Panel.getSourceLink(target, object)
If the panel supports source viewing, then return a SourceLink, else null
- Parameters:
- target
- an element from the panel under the mouse
- object
- the realObject under the mouse
<static>
Firebug.Panel.highlight(show)
UI signal that a tab needs attention, eg Script panel is currently stopped on a breakpoint
- Parameters:
- show
<static>
{Boolean}
Firebug.Panel.inspectNode(node)
Called by the framework when inspecting is in progress and the user moves mouse over
a new page element. Inspecting must be enabled for the panel (panel.inspectable == true).
This method is called in a timeout to avoid performance penalties when the user moves
the mouse over the page elements too fast.
- Parameters:
- {Element} node
- The page element being inspected
- Returns:
- {Boolean} Returns true if the node should be selected within the panel using the default panel selection mechanism (i.e. by calling panel.select(node) method).
<static>
Firebug.Panel.navigateToNextDocument(match, reverse)
Navigates to the next document whose match parameter returns true.
- Parameters:
- match
- reverse
<static>
Firebug.Panel.onTextSizeChange(zoom:)
Called after chrome.applyTextSize
- Parameters:
- zoom:
- ratio of current size to normal size, eg 1.5
<static>
Firebug.Panel.refresh()
Redisplay the panel based on the current location and selection
<static>
Firebug.Panel.shouldBreakOnNext()
Called when a panel is selected/displayed. The method should return true
if the Break On Next feature is currently armed for this panel.
<static>
Firebug.Panel.startInspecting()
Called by the framework when the user starts inspecting. Inspecting must be enabled
for the panel (panel.inspectable == true)
<static>
Firebug.Panel.stopInspecting(node, canceled)
Called by the framework when the user stops inspecting. Inspecting must be enabled
for the panel (panel.inspectable == true)
- Parameters:
- {Element} node
- The last page element inspected
- {Boolean} canceled
- Set to true if inspecing has been canceled by pressing the escape key.
<static>
Firebug.Panel.supportsBreakOnNext()
Called by the framework to see if the panel currently supports BON
<static>
Firebug.Panel.supportsObject(object, type)
Returns a number indicating the view's ability to inspect the object.
Zero means not supported, and higher numbers indicate specificity.
- Parameters:
- object
- type
<static>
Firebug.Panel.updateLocation(object)
The location object has been changed, the panel should update it view
- Parameters:
- object
- a location, must be one of getLocationList() returns if getDefaultLocation() can return null, then updateLocation must handle it here.
<static>
Firebug.Panel.updateSelection(object)
Firebug wants to show an object to the user and this panel has the best supportsObject()
result for the object. If the panel displays a container for objects of this type,
it should set this.selectedObject = object
- Parameters:
- object