nsIContextMenuInfo

nsIContextMenuInfo

A helper object for implementors of nsIContextMenuListener2.

Attributes

mouseEvent

The DOM context menu event.

targetNode

The DOM node most relevant to the context.

Given the CONTEXT_LINK flag, targetNode may not
nescesarily be a link. This returns the anchor from targetNode
if it has one or that of its nearest ancestor if it does not.

imageContainer

Given the CONTEXT_IMAGE flag, these methods can be
used in order to get the image for viewing, saving, or for the clipboard.

@return NS_OK if successful, otherwise NS_ERROR_FAILURE if no
image was found, or NS_ERROR_NULL_POINTER if an internal error occurs where we think there
is an image, but for some reason it cannot be returned.

imageSrc

backgroundImageContainer

Given the CONTEXT_BACKGROUND_IMAGE flag, these methods can be
used in order to get the image for viewing, saving, or for the clipboard.

@return NS_OK if successful, otherwise NS_ERROR_FAILURE if no background
image was found, or NS_ERROR_NULL_POINTER if an internal error occurs where we think there is a
background image, but for some reason it cannot be returned.

backgroundImageSrc