Constructors

Properties

element: HTMLElement

The 'dropzone' element.

Memberof

FileDrop

Member

fileDroppedCallbackBinary: IDroppedCallbackBinary

The binary file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackJSON: IDroppedCallbackJSON

The JSON file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackSVG: IDroppedCallbackSVG

The SVG file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackText: IDroppedCallbackText

The text file drop callback.

Memberof

FileDrop

Member

Methods

  • Restored the drop sensitive element's opacity back to 1.0.

    Parameters

    • event: DragEvent

      The event.

    Returns void

  • Toggles the drop sensitive element's opacity to 0.5.

    Parameters

    • event: DragEvent

      The event.

    Returns void

  • Install the JSON (MIME type json*) file drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as an object (parsed JSON).

    Parameters

    • callback: IDroppedCallbackJSON

    Returns void

  • Install the text file (MIME type text/plain) drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as a string.

    Parameters

    • callback: IDroppedCallbackText

    Returns void

Generated using TypeDoc