Add jsdoc to registerTabClickListeners

This commit is contained in:
Nick Krichevsky 2018-06-28 20:39:33 -04:00
parent 5a1b6b342b
commit e5956687c9

View file

@ -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) => {