Skip to content

Commit

Permalink
Add link to HTML spec for element types and selection
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosikmd committed Apr 12, 2018
1 parent 7ec68da commit a96034f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-dom/src/client/ReactInputSelection.js
Expand Up @@ -22,6 +22,11 @@ function isInDocument(node) {
* Input selection module for React.
*/

/**
* @hasSelectionCapabilities: we get the element types that support selection
* from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
* and `selectionEnd` rows.
*/
export function hasSelectionCapabilities(elem) {
const nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return (
Expand Down

0 comments on commit a96034f

Please sign in to comment.