mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Restore documentation that got incorrectly removed at some point. Bug 279587,
patch by Chris Thomas (CTho) <cst@andrew.cmu.edu>, r=ben, sr=bzbarsky
This commit is contained in:
parent
ce83dc01e5
commit
361aa1170b
@ -313,9 +313,26 @@ var transferUtils = {
|
||||
* nsDragAndDrop - a convenience wrapper for nsTransferable, nsITransferable
|
||||
* and nsIDragService/nsIDragSession.
|
||||
*
|
||||
* USAGE INFORMATION: see 'README-nsDragAndDrop.html' in the same source directory
|
||||
* as this file (typically xpfe/global/resources/content)
|
||||
*/
|
||||
* Use: map the handler functions to the 'ondraggesture', 'ondragover' and
|
||||
* 'ondragdrop' event handlers on your XML element, e.g.
|
||||
* <xmlelement ondraggesture="nsDragAndDrop.startDrag(event, observer);"
|
||||
* ondragover="nsDragAndDrop.startDrag(event, observer);"
|
||||
* ondragdrop="nsDragAndDrop.drop(event, observer);"/>
|
||||
*
|
||||
* You need to create an observer js object with the following member
|
||||
* functions:
|
||||
* Object onDragStart (event) // called when drag initiated,
|
||||
* // returns flavour list with data
|
||||
* // to stuff into transferable
|
||||
* void onDragOver (Object flavour) // called when element is dragged
|
||||
* // over, so that it can perform
|
||||
* // any drag-over feedback for provided
|
||||
* // flavour
|
||||
* void onDrop (Object data) // formatted data object dropped.
|
||||
* Object getSupportedFlavours () // returns a flavour list so that
|
||||
* // nsTransferable can determine
|
||||
* // whether or not to accept drop.
|
||||
**/
|
||||
|
||||
var nsDragAndDrop = {
|
||||
|
||||
|
@ -55,9 +55,26 @@
|
||||
* nsDragAndDrop - a convenience wrapper for nsTransferable, nsITransferable
|
||||
* and nsIDragService/nsIDragSession.
|
||||
*
|
||||
* USAGE INFORMATION: see 'README-nsDragAndDrop.html' in the same source directory
|
||||
* as this file (typically xpfe/global/resources/content)
|
||||
*/
|
||||
* Use: map the handler functions to the 'ondraggesture', 'ondragover' and
|
||||
* 'ondragdrop' event handlers on your XML element, e.g.
|
||||
* <xmlelement ondraggesture="nsDragAndDrop.startDrag(event, observer);"
|
||||
* ondragover="nsDragAndDrop.startDrag(event, observer);"
|
||||
* ondragdrop="nsDragAndDrop.drop(event, observer);"/>
|
||||
*
|
||||
* You need to create an observer js object with the following member
|
||||
* functions:
|
||||
* Object onDragStart (event) // called when drag initiated,
|
||||
* // returns flavour list with data
|
||||
* // to stuff into transferable
|
||||
* void onDragOver (Object flavour) // called when element is dragged
|
||||
* // over, so that it can perform
|
||||
* // any drag-over feedback for provided
|
||||
* // flavour
|
||||
* void onDrop (Object data) // formatted data object dropped.
|
||||
* Object getSupportedFlavours () // returns a flavour list so that
|
||||
* // nsTransferable can determine
|
||||
* // whether or not to accept drop.
|
||||
**/
|
||||
|
||||
var nsDragAndDrop = {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user