diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 11:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 11:10:36 +0900 |
commit | b1a6f374dca078dee2406ebe049715b826e37ca2 (patch) | |
tree | 5367c48648e2018f55f12d847baba94559e10040 /src/content/presenters/FocusPresenter.ts | |
parent | b2dcdedad729ff7087867da50e20578f9fc8fb29 (diff) | |
parent | da72c2ddd916d79d134662e3985b53a4ac78af7a (diff) |
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/content/presenters/FocusPresenter.ts')
-rw-r--r-- | src/content/presenters/FocusPresenter.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/presenters/FocusPresenter.ts b/src/content/presenters/FocusPresenter.ts index 7e20cd6..842c41e 100644 --- a/src/content/presenters/FocusPresenter.ts +++ b/src/content/presenters/FocusPresenter.ts @@ -6,10 +6,10 @@ export default interface FocusPresenter { export class FocusPresenterImpl implements FocusPresenter { focusFirstElement(): boolean { - let inputTypes = ['email', 'number', 'search', 'tel', 'text', 'url']; - let inputSelector = inputTypes.map(type => `input[type=${type}]`).join(','); - let targets = window.document.querySelectorAll(inputSelector + ',textarea'); - let target = Array.from(targets).find(doms.isVisible); + const inputTypes = ['email', 'number', 'search', 'tel', 'text', 'url']; + const inputSelector = inputTypes.map(type => `input[type=${type}]`).join(','); + const targets = window.document.querySelectorAll(inputSelector + ',textarea'); + const target = Array.from(targets).find(doms.isVisible); if (target instanceof HTMLInputElement) { target.focus(); return true; |