nsIContextMenuListener2

IID:7fb719b3-d804-4964-9596-77cf924ee314
Inherits From:nsISupports
Status:UNDER_REVIEW

This is an extended version of nsIContextMenuListener It provides a helper class, nsIContextMenuInfo, to allow access to background images as well as various utilities.


Constants

PRUint32 CONTEXT_NONE = 0
PRUint32 CONTEXT_LINK = 1
PRUint32 CONTEXT_IMAGE = 2
PRUint32 CONTEXT_DOCUMENT = 4
PRUint32 CONTEXT_TEXT = 8
PRUint32 CONTEXT_INPUT = 16
PRUint32 CONTEXT_BACKGROUND_IMAGE = 32

Methods

void onShowContextMenu ( PRUint32 contextFlags , nsIContextMenuInfo utils )

void onShowContextMenu ( PRUint32 contextFlags , nsIContextMenuInfo utils )

Called when the browser receives a context menu event (e.g. user is right-mouse clicking somewhere on the document). The combination of flags, along with the attributes of aUtils, indicate where and what was clicked on.

The following table describes what context flags and node combinations are possible.

AContextFlags utils.targetNode

CONTEXT_LINK CONTEXT_IMAGE CONTEXT_IMAGE CONTEXT_LINK with as an ancestor CONTEXT_INPUT CONTEXT_INPUT CONTEXT_IMAGE with type=image CONTEXT_TEXT