Contents

setSelectedDOMRange(_:affinity:)

Selects a range of nodes.

Declaration

func setSelectedDOMRange(_ range: DOMRange!, affinity selectionAffinity: NSSelectionAffinity)

Parameters

  • range:

    The range of nodes to select. If range is nil, the current selection is cleared. This method raises a DOMRangeExcepton if the range has been detached or refers to nodes not displayed by the receiver.

  • selectionAffinity:

    See the Selectionaffinity property for information on selection affinity.

See Also

Related Documentation

Selecting Content in the Document