type

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

MDN Reference