Please add a summary to this article.
1.0
51
Introduced
Gecko 2.0
Inherits from:
nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Method overview
boolean canDropLink(in nsIDOMDragEvent aEvent, in PRBool aAllowSameDocument); |
AString dropLink(in nsIDOMDragEvent aEvent, out AString aName, [optional] in boolean aDisallowInherit); |
void dropLinks(in nsIDOMDragEvent aEvent, [optional] in boolean aDisallowInherit, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDroppedLinkItem aLinks); |
Methods
canDropLink()
Determines if a link being dragged can be dropped.
boolean canDropLink( in nsIDOMDragEvent aEvent, in PRBool aAllowSameDocument );
Parameters
aEvent
- A dragenter or dragover event.
aAllowSameDocument
- If
false
, drops are only allowed if the document of the source of the drag is different from the destination. This check includes any parent, sibling and child frames in the same content tree. Iftrue
, the source is not checked.
Return value
true
if the link being dragged can be dropped.
Exceptions thrown
Missing Exception
- Missing Description
dropLink()
Given a drop event, determines the link being dragged. If a uri is returned the caller can, for instance, load it. If null
is returned, there is no valid link to be dropped.
AString dropLink( in nsIDOMDragEvent aEvent, out AString aName, [optional] in boolean aDisallowInherit );
Parameters
aEvent
- A drop event.
aName
- The link title if it exists, or an empty string otherwise.
Return value
A uri, or null
if there is no valid link to be dropped.
Exceptions thrown
- NS_ERROR_DOM_SECURITY_ERR
- Error will be thrown and the event canceled if the receiving target should not load the uri for security reasons. This will occur if the source of the drag initiated a link for dragging that it itself cannot access. This prevents a source document from tricking the user into a dragging a chrome url for example.
dropLinks()
Given a drop event, determines the link being dragged. If non-empty links array is returned the caller can, for instance, load it. If empty links array is returned, there is no valid link to be dropped.
void dropLinks( in nsIDOMDragEvent aEvent, [optional] in boolean aDisallowInherit, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDroppedLinkItem aLinks );
Parameters
aEvent
- A drop event.
aDisallowInherit
aCount
- Receives the count of
aLinks
array aLinks
- Recives an array of objects with
nsIDroppedLinkItem
interface
Return value
Nothing.