Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/selection

DOM selection manipulation
https://github.com/component/selection

Last synced: 13 days ago
JSON representation

DOM selection manipulation

Awesome Lists containing this project

README

        

# selection

DOM selection manipulation. Barely functional, probably not
useful to you :D

## Installation

Install with [component(1)](http://component.io):

$ component install component/selection

## Example

```js
var selection = require('selection');

var sel = selection(document.querySelector('p'));

// range
sel.select(4, 7);

// move caret
sel.select(10)
```

## License

MIT