Contents

webView(_:shouldChangeSelectedDOMRange:to:affinity:stillSelecting:)

Returns whether the user should be allowed to change the selected range.

Declaration

optional func webView(_ webView: WebView!, shouldChangeSelectedDOMRange currentRange: DOMRange!, to proposedRange: DOMRange!, affinity selectionAffinity: NSSelectionAffinity, stillSelecting flag: Bool) -> Bool

Parameters

  • webView:

    The web view that the user is editing.

  • currentRange:

    The old range the user wants to change.

  • proposedRange:

    The new range the user wants to select.

  • selectionAffinity:

    The direction of the selection.

  • flag:

    True if the user is still selecting; otherwise, False.

Return Value

true if the user is allowed to change the selected range; otherwise, false.

See Also

Related Documentation