Class DropControl
Identifies a drop, and provides control for current drop object.
Instances of this class are passed as arguments to the
drop
events from content-studio
.
It allows extensions to identify the current drop, and get the
drop as String
data type.
Constructor Attributes | Constructor Name and Description |
---|---|
This class is typically only instantiated by Content Studio.
|
Method Attributes | Method Name and Description |
---|---|
getData(mimeType)
Returns the dropped content for a specified
mimeType . |
|
supports(mimeType)
Checks whether or this DropControl supports a specified
mimeType . |
Method Detail
getData(mimeType)
Returns the dropped content for a specified
mimeType
. The
content is returned as a string
.
- Parameters:
- {string} mimeType
- The MIME type of the content to be retrieved.
- Throws:
- ScriptException
if the specified
mimeType
is not supported or the dropped content cannot be read.
- Returns:
- The dropped content as a
string
.
{boolean}
supports(mimeType)
Checks whether or this DropControl supports a specified
mimeType
.
- Parameters:
- {string} mimeType
- The MIME type to check for.
- Returns:
- {boolean}
true
if the specifiedmimeType
is supported by this DropControl,false
otherwise.