draw-selection
A node module for drawing boxes around a DOM selection.
Install
npm install draw-selection
Run
drawSelection([containerEl [, styles]])
args
containerEl
- (optional)Element
to insert the boxes (assumes the selection is relative to that container)styles
- (optional)object
that contains CSS properties and values to apply to the boxes (default{ outline: '1px solid red', 'pointer-events': 'none' }
)
returns
els
- an array ofElement
s that were created
hello, world!
var drawSelection = var sel = windowsel var range = documentrangesel
License
Copyright 2015 Cameron Lakenen