@f/focus-element

1.0.0 • Public • Published

focus-element

Build status Git tag NPM version Code style

Set the focus on a particular DOM element

Installation

$ npm install @f/focus-element

Usage

var focus = require('@f/focus-element')

function onClick (node) {
  focus(node.querySelector('input'))
}

API

focusElement(node)

  • node - The DOM node you want to focus

Returns: void

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @f/focus-element

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • f