Interface nsIDragSessionType

Hierarchy

Properties

canDrop: boolean

Set the current state of the drag, whether it can be dropped or not. usually the target "frame" sets this so the native system can render the correct feedback

csp: nsIContentSecurityPolicy

the triggering csp. This may be different than sourceNode's csp when sourceNode is xul:browser and the drag is triggered in a browsing context inside it.

dataTransfer: DataTransfer

The data transfer object for the current drag.

dragAction: number

Sets the action (copy, move, link, et.c) for the current drag

numDropItems: number

Get the number of items that were dropped

onlyChromeDrop: boolean

Indicates if the drop event should be dispatched only to chrome.

sourceNode: Node

The dom node that was originally dragged to start the session, which will be null if the drag originated outside the application.

sourceTopWindowContext: WindowContext

The top-level window context where the drag was started, which will be null if the drag originated outside the application. Useful for determining if a drop originated in the same top-level window context.

sourceWindowContext: WindowContext

The window context where the drag was started, which will be null if the drag originated outside the application. Useful for determining if a drop originated in the same window context.

triggeringPrincipal: nsIPrincipal

the triggering principal. This may be different than sourceNode's principal when sourceNode is xul:browser and the drag is triggered in a browsing context inside it.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Returns void

  • Get data from a Drag&Drop. Can be called while the drag is in process or after the drop has completed.

    Parameters

    • aTransferable: nsITransferable

      the transferable for the data to be put into

    • aItemIndex: number

      which of multiple drag items, zero-based

    Returns void

  • Returns DataTransfer

  • Returns effects allowed at starting the session for tests.

    Returns number

  • Check to set if any of the native data on the clipboard matches this data flavor

    Parameters

    • aDataFlavor: string

    Returns boolean

  • Returns true if the session is for dragging text in a text in text control element.

    Returns bool

  • Returns true if current session was started with synthesized drag start.

    Returns bool

  • Parameters

    • aDataTransfer: DataTransfer

    Returns void

  • Sets drag end point of synthesized session when the test does not dispatch "drop" event.

    Parameters

    • aScreenX: number
    • aScreenY: number

    Returns void

  • Returns void

  • Parameters

    • aImage: Node
    • aImageX: number
    • aImageY: number

    Returns void

  • Replace source node and selection with new ones. If sourceNode is a native anonymous node, it may be replaced at reframing. If sourceNode is disconnected from the document, we cannot dispatch dragend event properly. When this is called, sourceNode or aNewSourceNode should be a native anonymous node.

    Parameters

    • aNewSourceNode: Node
    • aNewSelection: Selection

    Returns void

  • Returns void

Generated using TypeDoc