For both types of elements, `.selectionStart`, `.selectionEnd`, `.selectionDirection`, `.setSelectionRange()`, `.select()` and the `select` event are now implemented. (cherry picked from commit 814ca3267ed73d7ad8492ef69ff87f95240cf922)