You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/toggle-selection
邓鹏 5b92377d90
message
4 years ago
..
example message 4 years ago
.npmignore message 4 years ago
README.md message 4 years ago
index.js message 4 years ago
package.json message 4 years ago

README.md

Toggle Selection

Simple module exposing function that deselects current browser selection and returns function that restores selection.

var deselect = require('toggle-selection');
var reselect = deselect(); // remove all selection
// … 
// do something with current selection, text, etc;
// …
reselect(); // restore selection

All credits go to @shvaikalesh.

Example

example recording