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.
Defined in: builtins.js.
Constructor Attributes | Constructor Name and Description |
---|---|
This class is typically only instantiated by Content Studio.
|
Method Attributes | Method Name and Description |
---|---|
getData(mimeType, String, mimeType)
Returns the dorpped content for the given
mimeType . |
|
supports(mimeType)
Checks whether current drop supports the given
mimeType |
Method Detail
getData(mimeType, String, mimeType)
Returns the dorpped content for the given
mimeType
. The
data is returned as a string
.
- Parameters:
- {string} mimeType
- the
mimeType
of the dropped content - String
- mimeType
- Throws:
- ScriptException
if the
mimeType
is not supported or there is error reading the dropped content.
- Returns:
- the dropped content as
string
supports(mimeType)
Checks whether current drop supports the given
mimeType
- Parameters:
- {string} mimeType
- the mime-type to be checked for the dropped content
- Returns:
true
if themimeType
is supported,false
otherwise