1.1.0 • Published 10 years ago
select-all-hook v1.1.0
select-all-hook 
virtual-dom hook for selecting all text in an element
Install
$ npm install --save select-all-hookUsage
var h = require('virtual-dom/h')
var SelectAllHook = require('select-all-hook')
function render (state) {
return h('input', {
select: SelectAllHook()
})
}API
SelectAllHook([predicate]) -> object
Creates a virtual-dom hook that will select all text in the target element.
predicate
Type: function
An optional function predicate. If provided, the hook will only be applied when the predicate evaluates to truthy.
License
MIT © Ben Drucker