I am new to JS and need a help please. I am trying to get the content of the following div to appear when I hover on it, here is a snippet of my code.
const currentTab = await Logic.currentTab();
const currentPage = document.getElementById("current-page");
currentPage.innerHTML = `<span class="page-title truncate-text">${currentTab.title}</span>`;
const favIconElement = Utils.createFavIconElement(currentTab.favIconUrl || "");
currentPage.prepend(favIconElement);
#current-tab img {
max-block-size: var(--icon-size);
}
#current-page{
display: table-cell;
}
#current-tab .page-title {
font-size: var(--font-size-heading);
grid-column: 2 / 4;
}
<span><div id="current-page"></div></span>