The type read-only property of the Selection interface returns a string describing the type of the current selection.
type
external String get type;