INNER CODE UNIT · Python
initTocHighlight
gurkenlabs/litiengine · config/javadoc/generate_js.py:547
function initTocHighlight() {
updateTocHeader();
const tocLinks = document.querySelectorAll('ol.toc-list a');
if (!tocLinks.length) return;
const headings = [];
tocLinks.forEach(link => {
const href = link.getAttribute('href');
if (href && href.startsWith('#') && href.length > 1) {
const target = document.getElementById(href.substring(1));
if (target) {
headings.push({ link, target });
}
}
});
if (!headings.length) return;