diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:01:24 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:48:39 +0900 |
commit | 2e7006ce24c42ec2b6642346d153429338e7334e (patch) | |
tree | f1eb9e843ab4ec5d7d3f08fff8c858174b6f1284 /src/content/presenters/Hint.ts | |
parent | 0881f92d20cb7b4f5a75671df739c3eaa3cd0ff0 (diff) |
npm run lint:fix
Diffstat (limited to 'src/content/presenters/Hint.ts')
-rw-r--r-- | src/content/presenters/Hint.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/content/presenters/Hint.ts b/src/content/presenters/Hint.ts index 60c0f4c..44b8185 100644 --- a/src/content/presenters/Hint.ts +++ b/src/content/presenters/Hint.ts @@ -6,7 +6,7 @@ interface Point { } const hintPosition = (element: Element): Point => { - let { left, top, right, bottom } = doms.viewportRect(element); + const { left, top, right, bottom } = doms.viewportRect(element); if (element.tagName !== 'AREA') { return { x: left, y: top }; @@ -26,15 +26,15 @@ export default abstract class Hint { constructor(target: HTMLElement, tag: string) { this.tag = tag; - let doc = target.ownerDocument; + const doc = target.ownerDocument; if (doc === null) { throw new TypeError('ownerDocument is null'); } - let { x, y } = hintPosition(target); - let { scrollX, scrollY } = window; + const { x, y } = hintPosition(target); + const { scrollX, scrollY } = window; - let hint = doc.createElement('span'); + const hint = doc.createElement('span'); hint.className = 'vimvixen-hint'; hint.textContent = tag; hint.style.left = x + scrollX + 'px'; @@ -95,7 +95,7 @@ export class InputHint extends Hint { } activate(): void { - let target = this.target; + const target = this.target; switch (target.tagName.toLowerCase()) { case 'input': switch ((target as HTMLInputElement).type) { |