From e5956687c9b6a2e90c7f16a5abc9e295eeaee990 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Thu, 28 Jun 2018 20:39:33 -0400 Subject: [PATCH] Add jsdoc to registerTabClickListeners --- src/ts/browser-action.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ts/browser-action.ts b/src/ts/browser-action.ts index 7a6bb6d..09e1ad8 100644 --- a/src/ts/browser-action.ts +++ b/src/ts/browser-action.ts @@ -9,10 +9,15 @@ const MAIN_TEMPLATE: twig.Template = twig.twig({href: MAIN_TEMPLATE_URI, async: document.addEventListener("DOMContentLoaded", () => { tabs.getWindows((windows: chrome.windows.Window[]) => { document.querySelector("body").innerHTML = String(MAIN_TEMPLATE.render({windows})); - registerTabClickListeners(); + registerTabClickListeners; }); }); +/** + * registerTabClickListeners registers click listeners to switch tabs. + * + * @returns {void} + */ function registerTabClickListeners(): void { let tabElements = document.getElementsByClassName("tab"); [].forEach.call(tabElements, (element) => {