Module: bajaux/dragdrop/Envelope


<abstract> new (require("bajaux/dragdrop/Envelope"))(arr)

Base class for Envelope implementations. These define methods of
transformation between raw JSON and data values (Baja values or otherwise),
for use in drag/drop or other data-transfer situations.

Parameters:
Name Type Description
arr Array

an array of values to store in this envelope

Methods


<abstract> getMimeType()

Get a mime type to identify the data type transformed by this envelope.

Returns:
Type
String

<abstract> toJson()

Get a JSON representation of the data contained in this envelope.

Returns:

a promise to be resolved with an array of
raw JSON objects

Type
Promise

<abstract> toValues()

Get the actual values represented by this envelope.

Returns:

a promise to be resolved with an array of
data values

Type
Promise