Skip to content
GitLab
Explore
Sign in
This is an archived project. Repository and other project resources are read-only.
A17
a17-helpers
Wiki
setFocusOnTarget
setFocusOnTarget
· Changes
Page history
docs all using *.md fileformat
authored
Mar 07, 2018
by
Mike Byrne
Hide whitespace changes
Inline
Side-by-side
setFocusOnTarget.md
0 → 100644
View page @
cd38ef7c
# setFocusOnTarget
## description
Sets focus on a node
## requires
*
nothing
## parameters
*
node - required - DOM node to focus
## returns
*
nothing
## example usage:
```
js
var
button
=
document
.
querySelector
(
'
button
'
);
setFocusOnTarget
(
button
);
// the button will be focused
```
```
js
var
h1
=
document
.
querySelector
(
'
h1
'
);
setFocusOnTarget
(
h1
);
// the h1 will be focused
```